0010ebb0 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10ebb0: 55 push %ebp 10ebb1: 89 e5 mov %esp,%ebp 10ebb3: 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; 10ebb6: 8b 50 10 mov 0x10(%eax),%edx 10ebb9: 8b 4a 34 mov 0x34(%edx),%ecx switch( node->type ) { 10ebbc: 8b 10 mov (%eax),%edx 10ebbe: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10ebc2: 77 12 ja 10ebd6 <== ALWAYS TAKEN 10ebc4: 8b 52 4c mov 0x4c(%edx),%edx 10ebc7: ff 24 95 c8 0f 12 00 jmp *0x120fc8(,%edx,4) 10ebce: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10ebd0: 8b 51 0c mov 0xc(%ecx),%edx 10ebd3: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10ebd6: 31 c0 xor %eax,%eax 10ebd8: c9 leave 10ebd9: c3 ret 10ebda: 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; 10ebdc: 8b 51 08 mov 0x8(%ecx),%edx 10ebdf: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10ebe2: 31 c0 xor %eax,%eax 10ebe4: c9 leave 10ebe5: c3 ret 10ebe6: 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; 10ebe8: c7 40 08 00 11 12 00 movl $0x121100,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10ebef: 31 c0 xor %eax,%eax 10ebf1: c9 leave 10ebf2: c3 ret 10ebf3: 90 nop <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10ebf4: c7 40 08 00 10 12 00 movl $0x121000,0x8(%eax) break; } return 0; } 10ebfb: 31 c0 xor %eax,%eax 10ebfd: c9 leave 10ebfe: c3 ret 10ebff: 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; 10ec00: c7 40 08 c0 10 12 00 movl $0x1210c0,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10ec07: 31 c0 xor %eax,%eax 10ec09: c9 leave 10ec0a: c3 ret 00111fc0 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 111fc0: 55 push %ebp 111fc1: 89 e5 mov %esp,%ebp 111fc3: 53 push %ebx 111fc4: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 111fc7: 6a 64 push $0x64 111fc9: 6a 01 push $0x1 111fcb: e8 ec d9 ff ff call 10f9bc 111fd0: 89 c3 mov %eax,%ebx if ( !node ) 111fd2: 83 c4 10 add $0x10,%esp 111fd5: 85 c0 test %eax,%eax 111fd7: 74 4f je 112028 <== ALWAYS TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 111fd9: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 111fdf: 8b 45 08 mov 0x8(%ebp),%eax 111fe2: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 111fe5: 51 push %ecx 111fe6: 6a 20 push $0x20 111fe8: ff 75 0c pushl 0xc(%ebp) 111feb: 8d 43 0c lea 0xc(%ebx),%eax 111fee: 50 push %eax 111fef: e8 c8 22 00 00 call 1142bc /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 111ff4: 8b 45 10 mov 0x10(%ebp),%eax 111ff7: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 111ffa: e8 61 db ff ff call 10fb60 111fff: 66 89 43 3c mov %ax,0x3c(%ebx) node->st_gid = getegid(); 112003: e8 48 db ff ff call 10fb50 112008: 66 89 43 3e mov %ax,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 11200c: 58 pop %eax 11200d: 5a pop %edx 11200e: 6a 00 push $0x0 112010: 8d 45 f0 lea -0x10(%ebp),%eax 112013: 50 push %eax 112014: e8 57 db ff ff call 10fb70 node->stat_atime = (time_t) tv.tv_sec; 112019: 8b 45 f0 mov -0x10(%ebp),%eax 11201c: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 11201f: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 112022: 89 43 48 mov %eax,0x48(%ebx) return node; 112025: 83 c4 10 add $0x10,%esp } 112028: 89 d8 mov %ebx,%eax 11202a: 8b 5d fc mov -0x4(%ebp),%ebx 11202d: c9 leave 11202e: c3 ret 0011369c : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 11369c: 55 push %ebp 11369d: 89 e5 mov %esp,%ebp 11369f: 57 push %edi 1136a0: 56 push %esi 1136a1: 53 push %ebx 1136a2: 83 ec 1c sub $0x1c,%esp 1136a5: 8b 7d 0c mov 0xc(%ebp),%edi 1136a8: 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; 1136ab: 8b 45 08 mov 0x8(%ebp),%eax 1136ae: 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(); 1136b0: e8 63 10 00 00 call 114718 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 1136b5: 66 3b 43 3c cmp 0x3c(%ebx),%ax 1136b9: 74 05 je 1136c0 <== NEVER TAKEN 1136bb: 66 85 c0 test %ax,%ax <== NOT EXECUTED 1136be: 75 2c jne 1136ec <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 1136c0: 66 89 7b 3c mov %di,0x3c(%ebx) jnode->st_gid = group; 1136c4: 66 89 73 3e mov %si,0x3e(%ebx) IMFS_update_ctime( jnode ); 1136c8: 83 ec 08 sub $0x8,%esp 1136cb: 6a 00 push $0x0 1136cd: 8d 45 e0 lea -0x20(%ebp),%eax 1136d0: 50 push %eax 1136d1: e8 b6 5d ff ff call 10948c 1136d6: 8b 45 e0 mov -0x20(%ebp),%eax 1136d9: 89 43 48 mov %eax,0x48(%ebx) 1136dc: 31 c0 xor %eax,%eax return 0; 1136de: 83 c4 10 add $0x10,%esp } 1136e1: 8d 65 f4 lea -0xc(%ebp),%esp 1136e4: 5b pop %ebx 1136e5: 5e pop %esi 1136e6: 5f pop %edi 1136e7: c9 leave 1136e8: c3 ret 1136e9: 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 ); 1136ec: e8 4b 51 00 00 call 11883c <__errno> <== NOT EXECUTED 1136f1: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 1136f7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1136fc: eb e3 jmp 1136e1 <== NOT EXECUTED 00112064 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 112064: 55 push %ebp 112065: 89 e5 mov %esp,%ebp 112067: 57 push %edi 112068: 56 push %esi 112069: 53 push %ebx 11206a: 83 ec 1c sub $0x1c,%esp 11206d: 8b 5d 08 mov 0x8(%ebp),%ebx 112070: 8b 75 0c mov 0xc(%ebp),%esi 112073: 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 ) 112076: 85 db test %ebx,%ebx 112078: 75 0a jne 112084 <== NEVER TAKEN 11207a: 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; } 11207c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11207f: 5b pop %ebx <== NOT EXECUTED 112080: 5e pop %esi <== NOT EXECUTED 112081: 5f pop %edi <== NOT EXECUTED 112082: c9 leave <== NOT EXECUTED 112083: c3 ret <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 112084: 50 push %eax 112085: a1 18 50 12 00 mov 0x125018,%eax 11208a: 8b 40 2c mov 0x2c(%eax),%eax 11208d: f7 d0 not %eax 11208f: 23 45 14 and 0x14(%ebp),%eax 112092: 50 push %eax 112093: ff 75 10 pushl 0x10(%ebp) 112096: 56 push %esi 112097: e8 24 ff ff ff call 111fc0 if ( !node ) 11209c: 83 c4 10 add $0x10,%esp 11209f: 85 c0 test %eax,%eax 1120a1: 74 d9 je 11207c <== ALWAYS TAKEN return NULL; /* * Set the type specific information */ switch (type) { 1120a3: 83 fe 07 cmp $0x7,%esi 1120a6: 76 18 jbe 1120c0 <== NEVER TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 1120a8: 68 1d 0a 12 00 push $0x120a1d <== NOT EXECUTED 1120ad: 68 bc 14 12 00 push $0x1214bc <== NOT EXECUTED 1120b2: 6a 5c push $0x5c <== NOT EXECUTED 1120b4: 68 50 14 12 00 push $0x121450 <== NOT EXECUTED 1120b9: e8 6a 5c ff ff call 107d28 <__assert_func> <== NOT EXECUTED 1120be: 66 90 xchg %ax,%ax <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 1120c0: ff 24 b5 9c 14 12 00 jmp *0x12149c(,%esi,4) 1120c7: 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; 1120c8: 8b 17 mov (%edi),%edx 1120ca: 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; 1120cd: 8b 13 mov (%ebx),%edx fs_info = parent_loc->mt_entry->fs_info; 1120cf: 8b 4b 10 mov 0x10(%ebx),%ecx 1120d2: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 1120d5: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 1120d8: 8b 4b 04 mov 0x4(%ebx),%ecx 1120db: 41 inc %ecx 1120dc: 89 4b 04 mov %ecx,0x4(%ebx) 1120df: 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 ); 1120e2: 83 ec 08 sub $0x8,%esp 1120e5: 50 push %eax 1120e6: 83 c2 50 add $0x50,%edx 1120e9: 52 push %edx 1120ea: 89 45 e4 mov %eax,-0x1c(%ebp) 1120ed: e8 26 9e ff ff call 10bf18 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 1120f2: 83 c4 10 add $0x10,%esp 1120f5: 8b 45 e4 mov -0x1c(%ebp),%eax } 1120f8: 8d 65 f4 lea -0xc(%ebp),%esp 1120fb: 5b pop %ebx 1120fc: 5e pop %esi 1120fd: 5f pop %edi 1120fe: c9 leave 1120ff: c3 ret node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 112100: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 112107: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 11210e: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 112115: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 11211c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 112123: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 11212a: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 112131: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 112138: eb 93 jmp 1120cd 11213a: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_FIFO: node->info.fifo.pipe = NULL; 11213c: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 112143: eb 88 jmp 1120cd 112145: 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; 112148: 8b 17 mov (%edi),%edx 11214a: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 11214d: 8b 57 04 mov 0x4(%edi),%edx 112150: 89 50 54 mov %edx,0x54(%eax) break; 112153: e9 75 ff ff ff jmp 1120cd */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 112158: 8d 50 54 lea 0x54(%eax),%edx 11215b: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 11215e: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 112165: 8d 50 50 lea 0x50(%eax),%edx 112168: 89 50 58 mov %edx,0x58(%eax) 11216b: e9 5d ff ff ff jmp 1120cd 00112030 : IMFS_jnode_t *IMFS_create_root_node(void) { 112030: 55 push %ebp 112031: 89 e5 mov %esp,%ebp 112033: 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) ); 112036: 68 ed 41 00 00 push $0x41ed 11203b: 68 39 0c 12 00 push $0x120c39 112040: 6a 01 push $0x1 112042: e8 79 ff ff ff call 111fc0 if ( !node ) 112047: 83 c4 10 add $0x10,%esp 11204a: 85 c0 test %eax,%eax 11204c: 74 13 je 112061 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11204e: 8d 50 54 lea 0x54(%eax),%edx 112051: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 112054: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 11205b: 8d 50 50 lea 0x50(%eax),%edx 11205e: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 112061: c9 leave 112062: c3 ret 001094f4 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 1094f4: 55 push %ebp 1094f5: 89 e5 mov %esp,%ebp 1094f7: 57 push %edi 1094f8: 56 push %esi 1094f9: 53 push %ebx 1094fa: 83 ec 1c sub $0x1c,%esp 1094fd: 8b 45 08 mov 0x8(%ebp),%eax 109500: 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 ); 109503: 85 c0 test %eax,%eax 109505: 74 7a je 109581 <== ALWAYS TAKEN assert( level >= 0 ); 109507: 85 f6 test %esi,%esi 109509: 0f 88 a4 00 00 00 js 1095b3 <== ALWAYS TAKEN assert( the_directory->type == IMFS_DIRECTORY ); 10950f: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 109513: 0f 85 81 00 00 00 jne 10959a <== ALWAYS TAKEN the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109519: 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; 10951c: 83 c0 54 add $0x54,%eax 10951f: 89 45 e4 mov %eax,-0x1c(%ebp) 109522: 39 c7 cmp %eax,%edi 109524: 74 41 je 109567 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 ); 109526: 8d 46 01 lea 0x1(%esi),%eax 109529: 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; 10952c: 31 db xor %ebx,%ebx 10952e: 66 90 xchg %ax,%ax for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 109530: a1 60 b1 12 00 mov 0x12b160,%eax 109535: ff 70 08 pushl 0x8(%eax) 109538: 6a 04 push $0x4 10953a: 6a 01 push $0x1 10953c: 68 f5 66 12 00 push $0x1266f5 109541: e8 4a f2 00 00 call 118790 !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++ ) 109546: 43 inc %ebx 109547: 83 c4 10 add $0x10,%esp 10954a: 39 de cmp %ebx,%esi 10954c: 7d e2 jge 109530 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 10954e: 83 ec 0c sub $0xc,%esp 109551: 57 push %edi 109552: e8 f5 fd ff ff call 10934c if ( the_jnode->type == IMFS_DIRECTORY ) 109557: 83 c4 10 add $0x10,%esp 10955a: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10955e: 74 10 je 109570 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 ) { 109560: 8b 3f mov (%edi),%edi assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109562: 3b 7d e4 cmp -0x1c(%ebp),%edi 109565: 75 c5 jne 10952c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 109567: 8d 65 f4 lea -0xc(%ebp),%esp 10956a: 5b pop %ebx 10956b: 5e pop %esi 10956c: 5f pop %edi 10956d: c9 leave 10956e: c3 ret 10956f: 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 ); 109570: 83 ec 08 sub $0x8,%esp 109573: ff 75 e0 pushl -0x20(%ebp) 109576: 57 push %edi 109577: e8 78 ff ff ff call 1094f4 10957c: 83 c4 10 add $0x10,%esp 10957f: eb df jmp 109560 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 109581: 68 dc 66 12 00 push $0x1266dc <== NOT EXECUTED 109586: 68 20 68 12 00 push $0x126820 <== NOT EXECUTED 10958b: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 109590: 68 18 67 12 00 push $0x126718 <== NOT EXECUTED 109595: e8 da 06 00 00 call 109c74 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 10959a: 68 64 67 12 00 push $0x126764 <== NOT EXECUTED 10959f: 68 20 68 12 00 push $0x126820 <== NOT EXECUTED 1095a4: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 1095a9: 68 18 67 12 00 push $0x126718 <== NOT EXECUTED 1095ae: e8 c1 06 00 00 call 109c74 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 1095b3: 68 ea 66 12 00 push $0x1266ea <== NOT EXECUTED 1095b8: 68 20 68 12 00 push $0x126820 <== NOT EXECUTED 1095bd: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 1095c2: 68 18 67 12 00 push $0x126718 <== NOT EXECUTED 1095c7: e8 a8 06 00 00 call 109c74 <__assert_func> <== NOT EXECUTED 0010ed7c : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10ed7c: 55 push %ebp 10ed7d: 89 e5 mov %esp,%ebp 10ed7f: 57 push %edi 10ed80: 56 push %esi 10ed81: 53 push %ebx 10ed82: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10ed85: 8b 45 14 mov 0x14(%ebp),%eax 10ed88: 8b 38 mov (%eax),%edi 10ed8a: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) 10ed91: 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 ); 10ed94: 8d 55 e4 lea -0x1c(%ebp),%edx 10ed97: 52 push %edx 10ed98: 56 push %esi 10ed99: ff 75 0c pushl 0xc(%ebp) 10ed9c: 8b 45 08 mov 0x8(%ebp),%eax 10ed9f: 03 45 a4 add -0x5c(%ebp),%eax 10eda2: 50 push %eax 10eda3: e8 48 08 00 00 call 10f5f0 10eda8: 89 c3 mov %eax,%ebx pathnamelen -= len; 10edaa: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10edad: 8b 4d 14 mov 0x14(%ebp),%ecx 10edb0: 8b 01 mov (%ecx),%eax 10edb2: 83 c4 10 add $0x10,%esp 10edb5: 85 c0 test %eax,%eax 10edb7: 0f 84 e7 00 00 00 je 10eea4 <== ALWAYS TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10edbd: 29 55 0c sub %edx,0xc(%ebp) i += len; 10edc0: 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 ) 10edc3: 85 db test %ebx,%ebx 10edc5: 75 45 jne 10ee0c * 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 ) { 10edc7: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10edcb: 0f 84 27 01 00 00 je 10eef8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10edd1: 83 ec 0c sub $0xc,%esp 10edd4: ff 75 14 pushl 0x14(%ebp) 10edd7: e8 d4 fd ff ff call 10ebb0 10eddc: 89 c3 mov %eax,%ebx 10edde: 58 pop %eax 10eddf: 5a pop %edx /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10ede0: ff 75 10 pushl 0x10(%ebp) 10ede3: ff 75 14 pushl 0x14(%ebp) 10ede6: e8 21 fe ff ff call 10ec0c 10edeb: 83 c4 10 add $0x10,%esp 10edee: 85 c0 test %eax,%eax 10edf0: 0f 85 d2 00 00 00 jne 10eec8 rtems_set_errno_and_return_minus_one( EACCES ); 10edf6: e8 d5 48 00 00 call 1136d0 <__errno> 10edfb: c7 00 0d 00 00 00 movl $0xd,(%eax) 10ee01: bb ff ff ff ff mov $0xffffffff,%ebx 10ee06: e9 bd 00 00 00 jmp 10eec8 10ee0b: 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 ) 10ee0c: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10ee10: 0f 84 be 00 00 00 je 10eed4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10ee16: 89 c7 mov %eax,%edi switch( type ) { 10ee18: 83 fb 03 cmp $0x3,%ebx 10ee1b: 74 1b je 10ee38 10ee1d: 83 fb 04 cmp $0x4,%ebx 10ee20: 0f 84 92 00 00 00 je 10eeb8 10ee26: 83 fb 02 cmp $0x2,%ebx 10ee29: 74 51 je 10ee7c /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10ee2b: 83 fb 04 cmp $0x4,%ebx 10ee2e: 0f 85 60 ff ff ff jne 10ed94 <== NEVER TAKEN 10ee34: eb 91 jmp 10edc7 <== NOT EXECUTED 10ee36: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10ee38: 8b 40 4c mov 0x4c(%eax),%eax 10ee3b: 83 f8 03 cmp $0x3,%eax 10ee3e: 0f 84 00 01 00 00 je 10ef44 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10ee44: 83 f8 04 cmp $0x4,%eax 10ee47: 0f 84 6e 01 00 00 je 10efbb /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10ee4d: 48 dec %eax 10ee4e: 0f 85 11 01 00 00 jne 10ef65 /* * 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 ) { 10ee54: 8b 47 5c mov 0x5c(%edi),%eax 10ee57: 85 c0 test %eax,%eax 10ee59: 0f 85 1b 01 00 00 jne 10ef7a /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10ee5f: 83 ec 08 sub $0x8,%esp 10ee62: 56 push %esi 10ee63: 57 push %edi 10ee64: e8 f7 06 00 00 call 10f560 10ee69: 89 c7 mov %eax,%edi if ( !node ) 10ee6b: 83 c4 10 add $0x10,%esp 10ee6e: 85 c0 test %eax,%eax 10ee70: 74 32 je 10eea4 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10ee72: 8b 45 14 mov 0x14(%ebp),%eax 10ee75: 89 38 mov %edi,(%eax) break; 10ee77: e9 18 ff ff ff jmp 10ed94 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10ee7c: 8b 15 18 50 12 00 mov 0x125018,%edx 10ee82: 39 42 18 cmp %eax,0x18(%edx) 10ee85: 0f 84 09 ff ff ff je 10ed94 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10ee8b: 8b 4d 14 mov 0x14(%ebp),%ecx 10ee8e: 8b 51 10 mov 0x10(%ecx),%edx /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10ee91: 39 42 1c cmp %eax,0x1c(%edx) 10ee94: 0f 84 42 01 00 00 je 10efdc pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10ee9a: 8b 78 08 mov 0x8(%eax),%edi 10ee9d: 85 ff test %edi,%edi 10ee9f: 75 d1 jne 10ee72 10eea1: 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 ); 10eea4: e8 27 48 00 00 call 1136d0 <__errno> 10eea9: c7 00 02 00 00 00 movl $0x2,(%eax) 10eeaf: bb ff ff ff ff mov $0xffffffff,%ebx 10eeb4: eb 12 jmp 10eec8 10eeb6: 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 ); 10eeb8: e8 13 48 00 00 call 1136d0 <__errno> 10eebd: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10eec3: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10eec8: 89 d8 mov %ebx,%eax 10eeca: 8d 65 f4 lea -0xc(%ebp),%esp 10eecd: 5b pop %ebx 10eece: 5e pop %esi 10eecf: 5f pop %edi 10eed0: c9 leave 10eed1: c3 ret 10eed2: 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 ) ) 10eed4: 83 ec 08 sub $0x8,%esp 10eed7: 6a 01 push $0x1 10eed9: ff 75 14 pushl 0x14(%ebp) 10eedc: e8 2b fd ff ff call 10ec0c 10eee1: 83 c4 10 add $0x10,%esp 10eee4: 85 c0 test %eax,%eax 10eee6: 0f 84 0a ff ff ff je 10edf6 10eeec: 8b 55 14 mov 0x14(%ebp),%edx 10eeef: 8b 02 mov (%edx),%eax 10eef1: e9 20 ff ff ff jmp 10ee16 10eef6: 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 ) { 10eef8: 8b 70 5c mov 0x5c(%eax),%esi 10eefb: 85 f6 test %esi,%esi 10eefd: 0f 84 ce fe ff ff je 10edd1 newloc = node->info.directory.mt_fs->mt_fs_root; 10ef03: 8d 7d d0 lea -0x30(%ebp),%edi 10ef06: 83 c6 1c add $0x1c,%esi 10ef09: b9 05 00 00 00 mov $0x5,%ecx 10ef0e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10ef10: 8d 75 d0 lea -0x30(%ebp),%esi 10ef13: b1 05 mov $0x5,%cl 10ef15: 8b 7d 14 mov 0x14(%ebp),%edi 10ef18: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10ef1a: 8b 45 e4 mov -0x1c(%ebp),%eax 10ef1d: 8b 4d 14 mov 0x14(%ebp),%ecx 10ef20: 8b 51 0c mov 0xc(%ecx),%edx 10ef23: 51 push %ecx 10ef24: ff 75 10 pushl 0x10(%ebp) 10ef27: 8b 4d 0c mov 0xc(%ebp),%ecx 10ef2a: 01 c1 add %eax,%ecx 10ef2c: 51 push %ecx 10ef2d: 8b 4d a4 mov -0x5c(%ebp),%ecx 10ef30: 29 c1 sub %eax,%ecx 10ef32: 8b 45 08 mov 0x8(%ebp),%eax 10ef35: 01 c8 add %ecx,%eax 10ef37: 50 push %eax 10ef38: ff 12 call *(%edx) 10ef3a: 89 c3 mov %eax,%ebx 10ef3c: 83 c4 10 add $0x10,%esp 10ef3f: eb 87 jmp 10eec8 10ef41: 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 ); 10ef44: 83 ec 08 sub $0x8,%esp 10ef47: 6a 00 push $0x0 10ef49: ff 75 14 pushl 0x14(%ebp) 10ef4c: e8 0b fd ff ff call 10ec5c node = pathloc->node_access; 10ef51: 8b 55 14 mov 0x14(%ebp),%edx 10ef54: 8b 3a mov (%edx),%edi if ( !node ) 10ef56: 83 c4 10 add $0x10,%esp 10ef59: 85 ff test %edi,%edi 10ef5b: 74 08 je 10ef65 <== ALWAYS TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 10ef5d: 8b 47 4c mov 0x4c(%edi),%eax 10ef60: e9 e8 fe ff ff jmp 10ee4d /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10ef65: e8 66 47 00 00 call 1136d0 <__errno> 10ef6a: c7 00 14 00 00 00 movl $0x14,(%eax) 10ef70: bb ff ff ff ff mov $0xffffffff,%ebx 10ef75: e9 4e ff ff ff jmp 10eec8 * 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; 10ef7a: 8d 7d d0 lea -0x30(%ebp),%edi 10ef7d: 8d 70 1c lea 0x1c(%eax),%esi 10ef80: b9 05 00 00 00 mov $0x5,%ecx 10ef85: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10ef87: 8d 75 d0 lea -0x30(%ebp),%esi 10ef8a: b1 05 mov $0x5,%cl 10ef8c: 8b 7d 14 mov 0x14(%ebp),%edi 10ef8f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10ef91: 8b 55 e4 mov -0x1c(%ebp),%edx 10ef94: 8b 4d 14 mov 0x14(%ebp),%ecx 10ef97: 8b 41 0c mov 0xc(%ecx),%eax 10ef9a: 51 push %ecx 10ef9b: ff 75 10 pushl 0x10(%ebp) 10ef9e: 8b 4d 0c mov 0xc(%ebp),%ecx 10efa1: 01 d1 add %edx,%ecx 10efa3: 51 push %ecx 10efa4: 8b 4d a4 mov -0x5c(%ebp),%ecx 10efa7: 29 d1 sub %edx,%ecx 10efa9: 8b 55 08 mov 0x8(%ebp),%edx 10efac: 01 ca add %ecx,%edx 10efae: 52 push %edx 10efaf: ff 10 call *(%eax) 10efb1: 89 c3 mov %eax,%ebx 10efb3: 83 c4 10 add $0x10,%esp 10efb6: e9 0d ff ff ff jmp 10eec8 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 10efbb: 83 ec 08 sub $0x8,%esp 10efbe: 6a 00 push $0x0 10efc0: ff 75 14 pushl 0x14(%ebp) 10efc3: e8 f0 fc ff ff call 10ecb8 10efc8: 89 c3 mov %eax,%ebx node = pathloc->node_access; 10efca: 8b 4d 14 mov 0x14(%ebp),%ecx 10efcd: 8b 39 mov (%ecx),%edi if ( result == -1 ) 10efcf: 83 c4 10 add $0x10,%esp 10efd2: 83 f8 ff cmp $0xffffffff,%eax 10efd5: 75 86 jne 10ef5d <== NEVER TAKEN 10efd7: e9 ec fe ff ff jmp 10eec8 <== 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; 10efdc: 8d 7d d0 lea -0x30(%ebp),%edi 10efdf: 8d 72 08 lea 0x8(%edx),%esi 10efe2: eb 9c jmp 10ef80 0010f090 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10f090: 55 push %ebp 10f091: 89 e5 mov %esp,%ebp 10f093: 57 push %edi 10f094: 56 push %esi 10f095: 53 push %ebx 10f096: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10f099: 8b 45 0c mov 0xc(%ebp),%eax 10f09c: 8b 18 mov (%eax),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10f09e: 31 c0 xor %eax,%eax 10f0a0: b9 ff ff ff ff mov $0xffffffff,%ecx 10f0a5: 8b 7d 08 mov 0x8(%ebp),%edi 10f0a8: f2 ae repnz scas %es:(%edi),%al 10f0aa: f7 d1 not %ecx 10f0ac: 8d 71 ff lea -0x1(%ecx),%esi 10f0af: 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 ); 10f0b6: 8d 55 e4 lea -0x1c(%ebp),%edx 10f0b9: 52 push %edx 10f0ba: 8d 4d af lea -0x51(%ebp),%ecx 10f0bd: 51 push %ecx 10f0be: 56 push %esi 10f0bf: 8b 45 08 mov 0x8(%ebp),%eax 10f0c2: 03 45 a4 add -0x5c(%ebp),%eax 10f0c5: 50 push %eax 10f0c6: e8 25 05 00 00 call 10f5f0 10f0cb: 89 c7 mov %eax,%edi pathlen -= len; 10f0cd: 8b 55 e4 mov -0x1c(%ebp),%edx 10f0d0: 29 d6 sub %edx,%esi i += len; if ( !pathloc->node_access ) 10f0d2: 8b 4d 0c mov 0xc(%ebp),%ecx 10f0d5: 8b 01 mov (%ecx),%eax 10f0d7: 83 c4 10 add $0x10,%esp 10f0da: 85 c0 test %eax,%eax 10f0dc: 0f 84 2a 01 00 00 je 10f20c <== ALWAYS TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10f0e2: 85 ff test %edi,%edi 10f0e4: 75 1a jne 10f100 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10f0e6: e8 e5 45 00 00 call 1136d0 <__errno> 10f0eb: c7 00 11 00 00 00 movl $0x11,(%eax) 10f0f1: 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; } 10f0f6: 89 d8 mov %ebx,%eax 10f0f8: 8d 65 f4 lea -0xc(%ebp),%esp 10f0fb: 5b pop %ebx 10f0fc: 5e pop %esi 10f0fd: 5f pop %edi 10f0fe: c9 leave 10f0ff: c3 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10f100: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f104: 0f 84 ca 00 00 00 je 10f1d4 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10f10a: 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; 10f10d: 89 c3 mov %eax,%ebx switch( type ) { 10f10f: 83 ff 02 cmp $0x2,%edi 10f112: 0f 84 8c 00 00 00 je 10f1a4 10f118: 76 26 jbe 10f140 10f11a: 83 ff 03 cmp $0x3,%edi 10f11d: 74 2d je 10f14c 10f11f: 83 ff 04 cmp $0x4,%edi 10f122: 75 92 jne 10f0b6 <== 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 ); 10f124: e8 a7 45 00 00 call 1136d0 <__errno> 10f129: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10f12f: 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; } 10f134: 89 d8 mov %ebx,%eax 10f136: 8d 65 f4 lea -0xc(%ebp),%esp 10f139: 5b pop %ebx 10f13a: 5e pop %esi 10f13b: 5f pop %edi 10f13c: c9 leave 10f13d: c3 ret 10f13e: 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 ) { 10f140: 85 ff test %edi,%edi 10f142: 74 a2 je 10f0e6 <== ALWAYS TAKEN 10f144: e9 6d ff ff ff jmp 10f0b6 10f149: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10f14c: 8b 40 4c mov 0x4c(%eax),%eax 10f14f: 83 f8 03 cmp $0x3,%eax 10f152: 0f 84 86 01 00 00 je 10f2de <== ALWAYS TAKEN result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10f158: 83 f8 04 cmp $0x4,%eax 10f15b: 0f 84 9c 01 00 00 je 10f2fd <== ALWAYS TAKEN if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 10f161: 85 db test %ebx,%ebx 10f163: 0f 84 27 01 00 00 je 10f290 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10f169: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f16d: 0f 85 1d 01 00 00 jne 10f290 /* * 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 ) { 10f173: 8b 43 5c mov 0x5c(%ebx),%eax 10f176: 85 c0 test %eax,%eax 10f178: 0f 85 27 01 00 00 jne 10f2a5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10f17e: 83 ec 08 sub $0x8,%esp 10f181: 8d 45 af lea -0x51(%ebp),%eax 10f184: 50 push %eax 10f185: 53 push %ebx 10f186: e8 d5 03 00 00 call 10f560 10f18b: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10f18d: 83 c4 10 add $0x10,%esp 10f190: 85 c0 test %eax,%eax 10f192: 0f 84 8c 00 00 00 je 10f224 done = true; else pathloc->node_access = node; 10f198: 8b 55 0c mov 0xc(%ebp),%edx 10f19b: 89 02 mov %eax,(%edx) 10f19d: e9 14 ff ff ff jmp 10f0b6 10f1a2: 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 ) 10f1a4: 8b 15 18 50 12 00 mov 0x125018,%edx 10f1aa: 39 42 18 cmp %eax,0x18(%edx) 10f1ad: 0f 84 03 ff ff ff je 10f0b6 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10f1b3: 8b 4d 0c mov 0xc(%ebp),%ecx 10f1b6: 8b 51 10 mov 0x10(%ecx),%edx 10f1b9: 39 42 1c cmp %eax,0x1c(%edx) 10f1bc: 0f 84 5a 01 00 00 je 10f31c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 10f1c2: 8b 58 08 mov 0x8(%eax),%ebx 10f1c5: 85 db test %ebx,%ebx 10f1c7: 74 43 je 10f20c rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 10f1c9: 8b 4d 0c mov 0xc(%ebp),%ecx 10f1cc: 89 19 mov %ebx,(%ecx) break; 10f1ce: e9 e3 fe ff ff jmp 10f0b6 10f1d3: 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 ) ) 10f1d4: 83 ec 08 sub $0x8,%esp 10f1d7: 6a 01 push $0x1 10f1d9: ff 75 0c pushl 0xc(%ebp) 10f1dc: 89 55 a0 mov %edx,-0x60(%ebp) 10f1df: e8 28 fa ff ff call 10ec0c 10f1e4: 83 c4 10 add $0x10,%esp 10f1e7: 85 c0 test %eax,%eax 10f1e9: 8b 55 a0 mov -0x60(%ebp),%edx 10f1ec: 0f 84 89 00 00 00 je 10f27b <== ALWAYS TAKEN 10f1f2: 8b 4d 0c mov 0xc(%ebp),%ecx 10f1f5: 8b 01 mov (%ecx),%eax 10f1f7: e9 0e ff ff ff jmp 10f10a /* * 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++) { 10f1fc: 8a 42 01 mov 0x1(%edx),%al 10f1ff: 42 inc %edx 10f200: 84 c0 test %al,%al 10f202: 74 44 je 10f248 if ( !IMFS_is_separator( path[ i ] ) ) 10f204: 3c 2f cmp $0x2f,%al 10f206: 74 f4 je 10f1fc 10f208: 3c 5c cmp $0x5c,%al 10f20a: 74 f0 je 10f1fc rtems_set_errno_and_return_minus_one( ENOENT ); 10f20c: e8 bf 44 00 00 call 1136d0 <__errno> 10f211: c7 00 02 00 00 00 movl $0x2,(%eax) 10f217: bb ff ff ff ff mov $0xffffffff,%ebx 10f21c: e9 d5 fe ff ff jmp 10f0f6 10f221: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10f224: 8b 45 a4 mov -0x5c(%ebp),%eax 10f227: 2b 45 e4 sub -0x1c(%ebp),%eax 10f22a: 03 45 08 add 0x8(%ebp),%eax 10f22d: 8b 4d 10 mov 0x10(%ebp),%ecx 10f230: 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++) { 10f232: 8b 4d 08 mov 0x8(%ebp),%ecx 10f235: 8b 55 a4 mov -0x5c(%ebp),%edx 10f238: 8a 04 11 mov (%ecx,%edx,1),%al 10f23b: 84 c0 test %al,%al 10f23d: 74 09 je 10f248 10f23f: 8b 55 a4 mov -0x5c(%ebp),%edx 10f242: 01 ca add %ecx,%edx 10f244: eb be jmp 10f204 10f246: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10f248: 83 ec 0c sub $0xc,%esp 10f24b: ff 75 0c pushl 0xc(%ebp) 10f24e: e8 5d f9 ff ff call 10ebb0 10f253: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 10f255: 8b 55 0c mov 0xc(%ebp),%edx 10f258: 8b 02 mov (%edx),%eax 10f25a: 83 c4 10 add $0x10,%esp 10f25d: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10f261: 75 2d jne 10f290 <== ALWAYS TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10f263: 83 ec 08 sub $0x8,%esp 10f266: 6a 03 push $0x3 10f268: ff 75 0c pushl 0xc(%ebp) 10f26b: e8 9c f9 ff ff call 10ec0c 10f270: 83 c4 10 add $0x10,%esp 10f273: 85 c0 test %eax,%eax 10f275: 0f 85 7b fe ff ff jne 10f0f6 rtems_set_errno_and_return_minus_one( EACCES ); 10f27b: e8 50 44 00 00 call 1136d0 <__errno> 10f280: c7 00 0d 00 00 00 movl $0xd,(%eax) 10f286: bb ff ff ff ff mov $0xffffffff,%ebx 10f28b: e9 66 fe ff ff jmp 10f0f6 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f290: e8 3b 44 00 00 call 1136d0 <__errno> 10f295: c7 00 14 00 00 00 movl $0x14,(%eax) 10f29b: bb ff ff ff ff mov $0xffffffff,%ebx 10f2a0: e9 51 fe ff ff jmp 10f0f6 * 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; 10f2a5: 8d 7d d0 lea -0x30(%ebp),%edi 10f2a8: 8d 70 1c lea 0x1c(%eax),%esi 10f2ab: b9 05 00 00 00 mov $0x5,%ecx 10f2b0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f2b2: 8d 75 d0 lea -0x30(%ebp),%esi 10f2b5: b1 05 mov $0x5,%cl 10f2b7: 8b 7d 0c mov 0xc(%ebp),%edi 10f2ba: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f2bc: 51 push %ecx 10f2bd: 8b 4d 0c mov 0xc(%ebp),%ecx 10f2c0: 8b 41 0c mov 0xc(%ecx),%eax 10f2c3: ff 75 10 pushl 0x10(%ebp) 10f2c6: 51 push %ecx 10f2c7: 8b 55 a4 mov -0x5c(%ebp),%edx 10f2ca: 2b 55 e4 sub -0x1c(%ebp),%edx 10f2cd: 03 55 08 add 0x8(%ebp),%edx 10f2d0: 52 push %edx 10f2d1: ff 50 04 call *0x4(%eax) 10f2d4: 89 c3 mov %eax,%ebx 10f2d6: 83 c4 10 add $0x10,%esp 10f2d9: e9 18 fe ff ff jmp 10f0f6 case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10f2de: 83 ec 08 sub $0x8,%esp 10f2e1: 6a 00 push $0x0 10f2e3: ff 75 0c pushl 0xc(%ebp) 10f2e6: e8 f9 fc ff ff call 10efe4 if ( result == -1 ) 10f2eb: 83 c4 10 add $0x10,%esp 10f2ee: 83 f8 ff cmp $0xffffffff,%eax 10f2f1: 74 4d je 10f340 <== ALWAYS TAKEN 10f2f3: 8b 45 0c mov 0xc(%ebp),%eax 10f2f6: 8b 18 mov (%eax),%ebx 10f2f8: e9 64 fe ff ff jmp 10f161 return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10f2fd: 83 ec 08 sub $0x8,%esp 10f300: 6a 00 push $0x0 10f302: ff 75 0c pushl 0xc(%ebp) 10f305: e8 da fc ff ff call 10efe4 if ( result == -1 ) 10f30a: 83 c4 10 add $0x10,%esp 10f30d: 83 f8 ff cmp $0xffffffff,%eax 10f310: 74 2e je 10f340 <== ALWAYS TAKEN 10f312: 8b 55 0c mov 0xc(%ebp),%edx 10f315: 8b 1a mov (%edx),%ebx 10f317: e9 45 fe ff ff jmp 10f161 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10f31c: 8d 7d d0 lea -0x30(%ebp),%edi 10f31f: 8d 72 08 lea 0x8(%edx),%esi 10f322: b9 05 00 00 00 mov $0x5,%ecx 10f327: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f329: 8d 75 d0 lea -0x30(%ebp),%esi 10f32c: b1 05 mov $0x5,%cl 10f32e: 8b 7d 0c mov 0xc(%ebp),%edi 10f331: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f333: 53 push %ebx 10f334: 8b 55 0c mov 0xc(%ebp),%edx 10f337: 8b 42 0c mov 0xc(%edx),%eax 10f33a: ff 75 10 pushl 0x10(%ebp) 10f33d: 52 push %edx 10f33e: eb 87 jmp 10f2c7 10f340: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f342: e9 af fd ff ff jmp 10f0f6 <== NOT EXECUTED 0010ec5c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10ec5c: 55 push %ebp 10ec5d: 89 e5 mov %esp,%ebp 10ec5f: 53 push %ebx 10ec60: 83 ec 04 sub $0x4,%esp 10ec63: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10ec66: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10ec68: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10ec6c: 75 3c jne 10ecaa <== ALWAYS TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10ec6e: 8b 40 50 mov 0x50(%eax),%eax 10ec71: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10ec73: 83 ec 0c sub $0xc,%esp 10ec76: 53 push %ebx 10ec77: e8 34 ff ff ff call 10ebb0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ec7c: 58 pop %eax 10ec7d: 5a pop %edx 10ec7e: ff 75 0c pushl 0xc(%ebp) 10ec81: 53 push %ebx 10ec82: e8 85 ff ff ff call 10ec0c 10ec87: 83 c4 10 add $0x10,%esp 10ec8a: 85 c0 test %eax,%eax 10ec8c: 74 0a je 10ec98 <== ALWAYS TAKEN 10ec8e: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10ec90: 8b 5d fc mov -0x4(%ebp),%ebx 10ec93: c9 leave 10ec94: c3 ret 10ec95: 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 ); 10ec98: e8 33 4a 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10ec9d: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10eca3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10eca8: eb e6 jmp 10ec90 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10ecaa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ecad: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10ecb2: e8 85 cf ff ff call 10bc3c <== NOT EXECUTED 0010efe4 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10efe4: 55 push %ebp 10efe5: 89 e5 mov %esp,%ebp 10efe7: 57 push %edi 10efe8: 56 push %esi 10efe9: 53 push %ebx 10efea: 83 ec 0c sub $0xc,%esp 10efed: 8b 75 08 mov 0x8(%ebp),%esi 10eff0: 8b 7d 0c mov 0xc(%ebp),%edi 10eff3: 8b 15 18 50 12 00 mov 0x125018,%edx 10eff9: eb 0e jmp 10f009 10effb: 90 nop <== NOT EXECUTED */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 10effc: 83 f8 04 cmp $0x4,%eax 10efff: 74 53 je 10f054 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10f001: 83 e8 03 sub $0x3,%eax 10f004: 83 f8 01 cmp $0x1,%eax 10f007: 77 3a ja 10f043 <== NEVER TAKEN { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 10f009: 8b 1e mov (%esi),%ebx /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 10f00b: 8b 42 30 mov 0x30(%edx),%eax 10f00e: 40 inc %eax 10f00f: 66 89 42 30 mov %ax,0x30(%edx) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 10f013: 66 83 f8 05 cmp $0x5,%ax 10f017: 77 57 ja 10f070 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 10f019: 8b 43 4c mov 0x4c(%ebx),%eax 10f01c: 83 f8 03 cmp $0x3,%eax 10f01f: 75 db jne 10effc result = IMFS_evaluate_hard_link( node, flags ); 10f021: 83 ec 08 sub $0x8,%esp 10f024: 57 push %edi 10f025: 56 push %esi 10f026: e8 31 fc ff ff call 10ec5c 10f02b: 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 ) ) ); 10f02e: 85 c0 test %eax,%eax 10f030: 75 33 jne 10f065 <== ALWAYS TAKEN 10f032: 8b 43 4c mov 0x4c(%ebx),%eax 10f035: 8b 15 18 50 12 00 mov 0x125018,%edx 10f03b: 83 e8 03 sub $0x3,%eax 10f03e: 83 f8 01 cmp $0x1,%eax 10f041: 76 c6 jbe 10f009 <== NEVER TAKEN 10f043: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 10f045: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 10f04b: 8d 65 f4 lea -0xc(%ebp),%esp 10f04e: 5b pop %ebx 10f04f: 5e pop %esi 10f050: 5f pop %edi 10f051: c9 leave 10f052: c3 ret 10f053: 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 ); 10f054: 83 ec 08 sub $0x8,%esp 10f057: 57 push %edi 10f058: 56 push %esi 10f059: e8 5a fc ff ff call 10ecb8 10f05e: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10f061: 85 c0 test %eax,%eax 10f063: 74 cd je 10f032 10f065: 8b 15 18 50 12 00 mov 0x125018,%edx 10f06b: eb d8 jmp 10f045 10f06d: 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; 10f070: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) rtems_set_errno_and_return_minus_one( ELOOP ); 10f076: e8 55 46 00 00 call 1136d0 <__errno> 10f07b: c7 00 5c 00 00 00 movl $0x5c,(%eax) 10f081: b8 ff ff ff ff mov $0xffffffff,%eax */ rtems_filesystem_link_counts = 0; return result; } 10f086: 8d 65 f4 lea -0xc(%ebp),%esp 10f089: 5b pop %ebx 10f08a: 5e pop %esi 10f08b: 5f pop %edi 10f08c: c9 leave 10f08d: c3 ret 0010ec0c : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10ec0c: 55 push %ebp 10ec0d: 89 e5 mov %esp,%ebp 10ec0f: 57 push %edi 10ec10: 56 push %esi 10ec11: 53 push %ebx 10ec12: 83 ec 0c sub $0xc,%esp 10ec15: 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; 10ec18: 8b 45 08 mov 0x8(%ebp),%eax 10ec1b: 8b 18 mov (%eax),%ebx #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10ec1d: e8 3e 0f 00 00 call 10fb60 10ec22: 89 c6 mov %eax,%esi st_gid = getegid(); 10ec24: e8 27 0f 00 00 call 10fb50 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 10ec29: 66 3b 73 3c cmp 0x3c(%ebx),%si 10ec2d: 74 1d je 10ec4c flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 10ec2f: 66 3b 43 3e cmp 0x3e(%ebx),%ax 10ec33: 74 1f je 10ec54 <== 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 ) 10ec35: 8b 43 30 mov 0x30(%ebx),%eax 10ec38: 21 f8 and %edi,%eax 10ec3a: 39 c7 cmp %eax,%edi 10ec3c: 0f 94 c0 sete %al 10ec3f: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10ec42: 83 c4 0c add $0xc,%esp 10ec45: 5b pop %ebx 10ec46: 5e pop %esi 10ec47: 5f pop %edi 10ec48: c9 leave 10ec49: c3 ret 10ec4a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 10ec4c: c1 e7 06 shl $0x6,%edi 10ec4f: eb e4 jmp 10ec35 10ec51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 10ec54: c1 e7 03 shl $0x3,%edi 10ec57: eb dc jmp 10ec35 0010ecb8 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10ecb8: 55 push %ebp 10ecb9: 89 e5 mov %esp,%ebp 10ecbb: 57 push %edi 10ecbc: 56 push %esi 10ecbd: 53 push %ebx 10ecbe: 83 ec 0c sub $0xc,%esp 10ecc1: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10ecc4: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10ecc6: 83 78 4c 04 cmpl $0x4,0x4c(%eax) 10ecca: 0f 85 9f 00 00 00 jne 10ed6f <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 10ecd0: 8b 50 08 mov 0x8(%eax),%edx 10ecd3: 85 d2 test %edx,%edx 10ecd5: 0f 84 87 00 00 00 je 10ed62 <== 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; 10ecdb: 89 13 mov %edx,(%ebx) rtems_filesystem_get_sym_start_loc( 10ecdd: 8b 50 50 mov 0x50(%eax),%edx 10ece0: 8a 0a mov (%edx),%cl 10ece2: 80 f9 2f cmp $0x2f,%cl 10ece5: 74 09 je 10ecf0 10ece7: 80 f9 5c cmp $0x5c,%cl 10ecea: 74 04 je 10ecf0 <== ALWAYS TAKEN 10ecec: 84 c9 test %cl,%cl 10ecee: 75 5c jne 10ed4c <== NEVER TAKEN 10ecf0: 8b 35 18 50 12 00 mov 0x125018,%esi 10ecf6: 83 c6 18 add $0x18,%esi 10ecf9: b9 05 00 00 00 mov $0x5,%ecx 10ecfe: 89 df mov %ebx,%edi 10ed00: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10ed02: 8b 50 50 mov 0x50(%eax),%edx 10ed05: 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] ), 10ed0a: 01 c2 add %eax,%edx 10ed0c: 31 c0 xor %eax,%eax 10ed0e: b9 ff ff ff ff mov $0xffffffff,%ecx 10ed13: 89 d7 mov %edx,%edi 10ed15: f2 ae repnz scas %es:(%edi),%al 10ed17: f7 d1 not %ecx 10ed19: 49 dec %ecx /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10ed1a: 53 push %ebx 10ed1b: ff 75 0c pushl 0xc(%ebp) 10ed1e: 51 push %ecx 10ed1f: 52 push %edx 10ed20: e8 57 00 00 00 call 10ed7c 10ed25: 89 c6 mov %eax,%esi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10ed27: 89 1c 24 mov %ebx,(%esp) 10ed2a: e8 81 fe ff ff call 10ebb0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ed2f: 59 pop %ecx 10ed30: 5f pop %edi 10ed31: ff 75 0c pushl 0xc(%ebp) 10ed34: 53 push %ebx 10ed35: e8 d2 fe ff ff call 10ec0c 10ed3a: 83 c4 10 add $0x10,%esp 10ed3d: 85 c0 test %eax,%eax 10ed3f: 74 0f je 10ed50 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10ed41: 89 f0 mov %esi,%eax 10ed43: 8d 65 f4 lea -0xc(%ebp),%esp 10ed46: 5b pop %ebx 10ed47: 5e pop %esi 10ed48: 5f pop %edi 10ed49: c9 leave 10ed4a: c3 ret 10ed4b: 90 nop <== NOT EXECUTED * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 10ed4c: 31 c0 xor %eax,%eax 10ed4e: eb ba jmp 10ed0a /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10ed50: e8 7b 49 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10ed55: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10ed5b: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10ed60: eb df jmp 10ed41 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 10ed62: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ed65: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10ed6a: e8 cd ce ff ff call 10bc3c <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10ed6f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ed72: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10ed77: e8 c0 ce ff ff call 10bc3c <== NOT EXECUTED 00112170 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 112170: 55 push %ebp 112171: 89 e5 mov %esp,%ebp 112173: 53 push %ebx 112174: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 112177: 8b 45 08 mov 0x8(%ebp),%eax 11217a: 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(); 11217c: e8 df d9 ff ff call 10fb60 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 112181: 66 3b 43 3c cmp 0x3c(%ebx),%ax 112185: 74 05 je 11218c <== NEVER TAKEN 112187: 66 85 c0 test %ax,%ax <== NOT EXECUTED 11218a: 75 34 jne 1121c0 <== 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); 11218c: 8b 45 0c mov 0xc(%ebp),%eax 11218f: 25 ff 0f 00 00 and $0xfff,%eax 112194: 8b 53 30 mov 0x30(%ebx),%edx 112197: 81 e2 00 f0 ff ff and $0xfffff000,%edx 11219d: 09 d0 or %edx,%eax 11219f: 89 43 30 mov %eax,0x30(%ebx) IMFS_update_ctime( jnode ); 1121a2: 83 ec 08 sub $0x8,%esp 1121a5: 6a 00 push $0x0 1121a7: 8d 45 f0 lea -0x10(%ebp),%eax 1121aa: 50 push %eax 1121ab: e8 c0 d9 ff ff call 10fb70 1121b0: 8b 45 f0 mov -0x10(%ebp),%eax 1121b3: 89 43 48 mov %eax,0x48(%ebx) 1121b6: 31 c0 xor %eax,%eax return 0; 1121b8: 83 c4 10 add $0x10,%esp } 1121bb: 8b 5d fc mov -0x4(%ebp),%ebx 1121be: c9 leave 1121bf: 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 ); 1121c0: e8 0b 15 00 00 call 1136d0 <__errno> <== NOT EXECUTED 1121c5: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 1121cb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1121d0: eb e9 jmp 1121bb <== NOT EXECUTED 0010f4bc : } int IMFS_fifo_close( rtems_libio_t *iop ) { 10f4bc: 55 push %ebp <== NOT EXECUTED 10f4bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f4bf: 57 push %edi <== NOT EXECUTED 10f4c0: 56 push %esi <== NOT EXECUTED 10f4c1: 53 push %ebx <== NOT EXECUTED 10f4c2: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10f4c5: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10f4c8: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 10f4cb: 53 push %ebx <== NOT EXECUTED 10f4cc: 8d 47 50 lea 0x50(%edi),%eax <== NOT EXECUTED 10f4cf: 50 push %eax <== NOT EXECUTED 10f4d0: e8 a7 25 00 00 call 111a7c <== NOT EXECUTED 10f4d5: 89 c6 mov %eax,%esi <== NOT EXECUTED if (! err) { 10f4d7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f4da: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10f4dd: 74 0d je 10f4ec <== 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); 10f4df: 7c 37 jl 10f518 <== NOT EXECUTED } 10f4e1: 89 f0 mov %esi,%eax <== NOT EXECUTED 10f4e3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f4e6: 5b pop %ebx <== NOT EXECUTED 10f4e7: 5e pop %esi <== NOT EXECUTED 10f4e8: 5f pop %edi <== NOT EXECUTED 10f4e9: c9 leave <== NOT EXECUTED 10f4ea: c3 ret <== NOT EXECUTED 10f4eb: 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; 10f4ec: 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) 10f4f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f4f6: 57 push %edi <== NOT EXECUTED 10f4f7: e8 3c 07 00 00 call 10fc38 <== NOT EXECUTED 10f4fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f4ff: 85 c0 test %eax,%eax <== NOT EXECUTED 10f501: 75 de jne 10f4e1 <== NOT EXECUTED 10f503: 66 83 7f 34 00 cmpw $0x0,0x34(%edi) <== NOT EXECUTED 10f508: 75 d7 jne 10f4e1 <== NOT EXECUTED free(jnode); 10f50a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f50d: 57 push %edi <== NOT EXECUTED 10f50e: e8 69 8b ff ff call 10807c <== NOT EXECUTED 10f513: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f516: eb c9 jmp 10f4e1 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10f518: e8 b3 41 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10f51d: f7 de neg %esi <== NOT EXECUTED 10f51f: 89 30 mov %esi,(%eax) <== NOT EXECUTED 10f521: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10f526: eb b9 jmp 10f4e1 <== NOT EXECUTED 0010f38c : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10f38c: 55 push %ebp <== NOT EXECUTED 10f38d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f38f: 53 push %ebx <== NOT EXECUTED 10f390: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10f393: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f396: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10f399: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED int err; if (command == FIONBIO) { 10f39c: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx <== NOT EXECUTED 10f3a2: 74 1c je 10f3c0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 10f3a4: 50 push %eax <== NOT EXECUTED 10f3a5: 51 push %ecx <== NOT EXECUTED 10f3a6: 52 push %edx <== NOT EXECUTED 10f3a7: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10f3aa: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10f3ad: e8 aa 22 00 00 call 11165c <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10f3b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f3b5: 85 c0 test %eax,%eax <== NOT EXECUTED 10f3b7: 78 3e js 10f3f7 <== NOT EXECUTED } 10f3b9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f3bc: c9 leave <== NOT EXECUTED 10f3bd: c3 ret <== NOT EXECUTED 10f3be: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 10f3c0: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10f3c2: 74 20 je 10f3e4 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 10f3c4: 8b 11 mov (%ecx),%edx <== NOT EXECUTED 10f3c6: 85 d2 test %edx,%edx <== NOT EXECUTED 10f3c8: 74 0e je 10f3d8 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 10f3ca: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 10f3ce: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 10f3d0: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f3d3: c9 leave <== NOT EXECUTED 10f3d4: c3 ret <== NOT EXECUTED 10f3d5: 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; 10f3d8: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 10f3dc: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 10f3de: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f3e1: c9 leave <== NOT EXECUTED 10f3e2: c3 ret <== NOT EXECUTED 10f3e3: 90 nop <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 10f3e4: bb 0e 00 00 00 mov $0xe,%ebx <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 10f3e9: e8 e2 42 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10f3ee: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10f3f0: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f3f5: eb c2 jmp 10f3b9 <== NOT EXECUTED 10f3f7: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f3f9: f7 db neg %ebx <== NOT EXECUTED 10f3fb: eb ec jmp 10f3e9 <== NOT EXECUTED 0010f348 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10f348: 55 push %ebp <== NOT EXECUTED 10f349: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f34b: 53 push %ebx <== NOT EXECUTED 10f34c: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10f34f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 10f352: 50 push %eax <== NOT EXECUTED 10f353: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 10f356: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10f359: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f35c: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10f35f: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10f362: e8 95 22 00 00 call 1115fc <== NOT EXECUTED 10f367: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f369: 99 cltd <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10f36a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10f36d: 85 d2 test %edx,%edx <== NOT EXECUTED 10f36f: 78 05 js 10f376 <== NOT EXECUTED } 10f371: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f374: c9 leave <== NOT EXECUTED 10f375: c3 ret <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 10f376: e8 55 43 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10f37b: f7 db neg %ebx <== NOT EXECUTED 10f37d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10f37f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f384: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 10f389: eb e6 jmp 10f371 <== NOT EXECUTED 0010f528 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10f528: 55 push %ebp 10f529: 89 e5 mov %esp,%ebp 10f52b: 53 push %ebx 10f52c: 83 ec 0c sub $0xc,%esp 10f52f: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 10f532: 50 push %eax 10f533: 8b 40 38 mov 0x38(%eax),%eax 10f536: 83 c0 50 add $0x50,%eax 10f539: 50 push %eax 10f53a: e8 51 26 00 00 call 111b90 10f53f: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 10f541: 83 c4 10 add $0x10,%esp 10f544: 85 c0 test %eax,%eax 10f546: 78 07 js 10f54f <== NEVER TAKEN } 10f548: 89 d8 mov %ebx,%eax 10f54a: 8b 5d fc mov -0x4(%ebp),%ebx 10f54d: c9 leave 10f54e: c3 ret ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 10f54f: e8 7c 41 00 00 call 1136d0 <__errno> 10f554: f7 db neg %ebx 10f556: 89 18 mov %ebx,(%eax) 10f558: bb ff ff ff ff mov $0xffffffff,%ebx 10f55d: eb e9 jmp 10f548 0010f460 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10f460: 55 push %ebp <== NOT EXECUTED 10f461: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f463: 56 push %esi <== NOT EXECUTED 10f464: 53 push %ebx <== NOT EXECUTED 10f465: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10f468: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10f46b: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 10f46e: 50 push %eax <== NOT EXECUTED 10f46f: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10f472: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f475: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10f478: e8 3f 22 00 00 call 1116bc <== NOT EXECUTED 10f47d: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 10f47f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f482: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10f485: 7e 21 jle 10f4a8 <== NOT EXECUTED IMFS_update_atime(jnode); 10f487: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f48a: 6a 00 push $0x0 <== NOT EXECUTED 10f48c: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10f48f: 50 push %eax <== NOT EXECUTED 10f490: e8 db 06 00 00 call 10fb70 <== NOT EXECUTED 10f495: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10f498: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 10f49b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 10f49e: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f4a0: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10f4a3: 5b pop %ebx <== NOT EXECUTED 10f4a4: 5e pop %esi <== NOT EXECUTED 10f4a5: c9 leave <== NOT EXECUTED 10f4a6: c3 ret <== NOT EXECUTED 10f4a7: 90 nop <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 10f4a8: 74 f4 je 10f49e <== NOT EXECUTED 10f4aa: e8 21 42 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10f4af: f7 db neg %ebx <== NOT EXECUTED 10f4b1: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10f4b3: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 10f4b8: eb e4 jmp 10f49e <== NOT EXECUTED 0010f400 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10f400: 55 push %ebp <== NOT EXECUTED 10f401: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f403: 56 push %esi <== NOT EXECUTED 10f404: 53 push %ebx <== NOT EXECUTED 10f405: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10f408: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10f40b: 8b 58 38 mov 0x38(%eax),%ebx <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10f40e: 50 push %eax <== NOT EXECUTED 10f40f: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10f412: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f415: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 10f418: e8 5f 24 00 00 call 11187c <== NOT EXECUTED 10f41d: 89 c6 mov %eax,%esi <== NOT EXECUTED if (err > 0) { 10f41f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f422: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10f425: 7e 25 jle 10f44c <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 10f427: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f42a: 6a 00 push $0x0 <== NOT EXECUTED 10f42c: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10f42f: 50 push %eax <== NOT EXECUTED 10f430: e8 3b 07 00 00 call 10fb70 <== NOT EXECUTED 10f435: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10f438: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED 10f43b: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED 10f43e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 10f441: 89 f0 mov %esi,%eax <== NOT EXECUTED 10f443: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10f446: 5b pop %ebx <== NOT EXECUTED 10f447: 5e pop %esi <== NOT EXECUTED 10f448: c9 leave <== NOT EXECUTED 10f449: c3 ret <== NOT EXECUTED 10f44a: 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); 10f44c: 74 f3 je 10f441 <== NOT EXECUTED 10f44e: e8 7d 42 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10f453: f7 de neg %esi <== NOT EXECUTED 10f455: 89 30 mov %esi,(%eax) <== NOT EXECUTED 10f457: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10f45c: eb e3 jmp 10f441 <== NOT EXECUTED 0010f560 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10f560: 55 push %ebp 10f561: 89 e5 mov %esp,%ebp 10f563: 57 push %edi 10f564: 56 push %esi 10f565: 53 push %ebx 10f566: 83 ec 0c sub $0xc,%esp 10f569: 8b 45 08 mov 0x8(%ebp),%eax 10f56c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10f56f: 85 c0 test %eax,%eax 10f571: 74 67 je 10f5da <== ALWAYS TAKEN if ( !name ) 10f573: 85 db test %ebx,%ebx 10f575: 74 2d je 10f5a4 <== ALWAYS TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10f577: bf 90 10 12 00 mov $0x121090,%edi 10f57c: b9 02 00 00 00 mov $0x2,%ecx 10f581: 89 de mov %ebx,%esi 10f583: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f585: 74 13 je 10f59a <== ALWAYS TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10f587: bf 92 10 12 00 mov $0x121092,%edi 10f58c: b9 03 00 00 00 mov $0x3,%ecx 10f591: 89 de mov %ebx,%esi 10f593: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f595: 75 19 jne 10f5b0 <== NEVER TAKEN return directory->Parent; 10f597: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10f59a: 8d 65 f4 lea -0xc(%ebp),%esp 10f59d: 5b pop %ebx 10f59e: 5e pop %esi 10f59f: 5f pop %edi 10f5a0: c9 leave 10f5a1: c3 ret 10f5a2: 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; 10f5a4: 31 c0 xor %eax,%eax if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10f5a6: 8d 65 f4 lea -0xc(%ebp),%esp 10f5a9: 5b pop %ebx 10f5aa: 5e pop %esi 10f5ab: 5f pop %edi 10f5ac: c9 leave 10f5ad: c3 ret 10f5ae: 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; 10f5b0: 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; 10f5b3: 8d 78 54 lea 0x54(%eax),%edi 10f5b6: 39 fe cmp %edi,%esi 10f5b8: 75 08 jne 10f5c2 10f5ba: eb e8 jmp 10f5a4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10f5bc: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10f5be: 39 fe cmp %edi,%esi 10f5c0: 74 e2 je 10f5a4 !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 ) ) 10f5c2: 8d 46 0c lea 0xc(%esi),%eax 10f5c5: 83 ec 08 sub $0x8,%esp 10f5c8: 50 push %eax 10f5c9: 53 push %ebx 10f5ca: e8 c9 4b 00 00 call 114198 10f5cf: 83 c4 10 add $0x10,%esp 10f5d2: 85 c0 test %eax,%eax 10f5d4: 75 e6 jne 10f5bc 10f5d6: 89 f0 mov %esi,%eax 10f5d8: eb c0 jmp 10f59a /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10f5da: 68 38 10 12 00 push $0x121038 <== NOT EXECUTED 10f5df: 68 95 10 12 00 push $0x121095 <== NOT EXECUTED 10f5e4: 6a 2a push $0x2a <== NOT EXECUTED 10f5e6: 68 44 10 12 00 push $0x121044 <== NOT EXECUTED 10f5eb: e8 38 87 ff ff call 107d28 <__assert_func> <== NOT EXECUTED 00114268 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 114268: 55 push %ebp 114269: 89 e5 mov %esp,%ebp 11426b: 57 push %edi 11426c: 56 push %esi 11426d: 53 push %ebx 11426e: 83 ec 3c sub $0x3c,%esp 114271: 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; 114274: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 114277: 8d 55 d4 lea -0x2c(%ebp),%edx 11427a: 89 55 c4 mov %edx,-0x3c(%ebp) 11427d: 8d 70 1c lea 0x1c(%eax),%esi 114280: b9 05 00 00 00 mov $0x5,%ecx 114285: 89 d7 mov %edx,%edi 114287: 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; 114289: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; 114290: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 114293: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 114296: 83 ec 0c sub $0xc,%esp 114299: 8d 45 d4 lea -0x2c(%ebp),%eax 11429c: 50 push %eax 11429d: e8 0e f6 ff ff call 1138b0 if ( jnode->type != IMFS_DIRECTORY ) { 1142a2: 83 c4 10 add $0x10,%esp 1142a5: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 1142a9: 75 2d jne 1142d8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1142ab: 8d 43 54 lea 0x54(%ebx),%eax 1142ae: 39 43 50 cmp %eax,0x50(%ebx) 1142b1: 74 3e je 1142f1 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 1142b3: 85 db test %ebx,%ebx 1142b5: 74 15 je 1142cc if ( jnode->type == IMFS_DIRECTORY ) { 1142b7: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 1142bb: 75 d3 jne 114290 <== ALWAYS TAKEN 1142bd: 8d 43 54 lea 0x54(%ebx),%eax 1142c0: 39 43 50 cmp %eax,0x50(%ebx) 1142c3: 74 cb je 114290 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 1142c5: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 1142c8: 85 db test %ebx,%ebx 1142ca: 75 c4 jne 114290 <== NEVER TAKEN 1142cc: 31 c0 xor %eax,%eax return 0; } 1142ce: 8d 65 f4 lea -0xc(%ebp),%esp 1142d1: 5b pop %ebx 1142d2: 5e pop %esi 1142d3: 5f pop %edi 1142d4: c9 leave 1142d5: c3 ret 1142d6: 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 ); 1142d8: 83 ec 08 sub $0x8,%esp 1142db: 8d 55 d4 lea -0x2c(%ebp),%edx 1142de: 52 push %edx if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 1142df: 6a 00 push $0x0 1142e1: e8 4a 4b ff ff call 108e30 if (result != 0) 1142e6: 83 c4 10 add $0x10,%esp 1142e9: 85 c0 test %eax,%eax 1142eb: 75 0d jne 1142fa <== ALWAYS TAKEN 1142ed: 89 f3 mov %esi,%ebx 1142ef: eb c2 jmp 1142b3 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 1142f1: 83 ec 08 sub $0x8,%esp 1142f4: 8d 45 d4 lea -0x2c(%ebp),%eax 1142f7: 50 push %eax 1142f8: eb e5 jmp 1142df if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 1142fa: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1142fd: eb cf jmp 1142ce <== NOT EXECUTED 0010f5f0 : const char *path, int pathlen, char *token, int *token_len ) { 10f5f0: 55 push %ebp 10f5f1: 89 e5 mov %esp,%ebp 10f5f3: 57 push %edi 10f5f4: 56 push %esi 10f5f5: 53 push %ebx 10f5f6: 8b 75 08 mov 0x8(%ebp),%esi 10f5f9: 8b 7d 0c mov 0xc(%ebp),%edi 10f5fc: 8b 45 10 mov 0x10(%ebp),%eax 10f5ff: 8b 5d 14 mov 0x14(%ebp),%ebx register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10f602: 8a 16 mov (%esi),%dl while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10f604: 80 fa 2f cmp $0x2f,%dl 10f607: 0f 84 94 00 00 00 je 10f6a1 10f60d: 80 fa 5c cmp $0x5c,%dl 10f610: 0f 84 8b 00 00 00 je 10f6a1 10f616: 84 d2 test %dl,%dl 10f618: 0f 84 94 00 00 00 je 10f6b2 10f61e: 85 ff test %edi,%edi 10f620: 7e 7f jle 10f6a1 <== ALWAYS TAKEN token[i] = c; 10f622: 88 10 mov %dl,(%eax) 10f624: 31 d2 xor %edx,%edx 10f626: 66 90 xchg %ax,%ax return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10f628: 42 inc %edx 10f629: 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) ) { 10f62c: 80 f9 2f cmp $0x2f,%cl 10f62f: 74 1f je 10f650 10f631: 80 f9 5c cmp $0x5c,%cl 10f634: 74 1a je 10f650 10f636: 84 c9 test %cl,%cl 10f638: 74 16 je 10f650 10f63a: 39 d7 cmp %edx,%edi 10f63c: 7e 12 jle 10f650 token[i] = c; 10f63e: 88 0c 10 mov %cl,(%eax,%edx,1) if ( i == IMFS_NAME_MAX ) 10f641: 83 fa 20 cmp $0x20,%edx 10f644: 75 e2 jne 10f628 10f646: b8 04 00 00 00 mov $0x4,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f64b: 5b pop %ebx 10f64c: 5e pop %esi 10f64d: 5f pop %edi 10f64e: c9 leave 10f64f: c3 ret i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10f650: 80 7c 10 ff 00 cmpb $0x0,-0x1(%eax,%edx,1) 10f655: 74 04 je 10f65b <== ALWAYS TAKEN token[i] = '\0'; 10f657: c6 04 10 00 movb $0x0,(%eax,%edx,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10f65b: 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 ) 10f65d: bf ac 10 12 00 mov $0x1210ac,%edi 10f662: b9 03 00 00 00 mov $0x3,%ecx 10f667: 89 c6 mov %eax,%esi 10f669: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f66b: 75 0b jne 10f678 10f66d: b8 02 00 00 00 mov $0x2,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f672: 5b pop %ebx 10f673: 5e pop %esi 10f674: 5f pop %edi 10f675: c9 leave 10f676: c3 ret 10f677: 90 nop <== NOT EXECUTED */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10f678: bf ad 10 12 00 mov $0x1210ad,%edi 10f67d: b9 02 00 00 00 mov $0x2,%ecx 10f682: 89 c6 mov %eax,%esi 10f684: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f686: 0f 97 c0 seta %al 10f689: 0f 92 c2 setb %dl 10f68c: 28 d0 sub %dl,%al 10f68e: 0f be c0 movsbl %al,%eax 10f691: 83 f8 01 cmp $0x1,%eax 10f694: 19 c0 sbb %eax,%eax 10f696: 83 e0 fe and $0xfffffffe,%eax 10f699: 83 c0 03 add $0x3,%eax type = IMFS_CURRENT_DIR; } return type; } 10f69c: 5b pop %ebx 10f69d: 5e pop %esi 10f69e: 5f pop %edi 10f69f: c9 leave 10f6a0: c3 ret /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 10f6a1: 88 10 mov %dl,(%eax) i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10f6a3: 83 ff 01 cmp $0x1,%edi 10f6a6: 19 c0 sbb %eax,%eax 10f6a8: 40 inc %eax 10f6a9: 89 c2 mov %eax,%edx /* * Set token_len to the number of characters copied. */ *token_len = i; 10f6ab: 89 13 mov %edx,(%ebx) else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f6ad: 5b pop %ebx 10f6ae: 5e pop %esi 10f6af: 5f pop %edi 10f6b0: c9 leave 10f6b1: c3 ret /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 10f6b2: c6 00 00 movb $0x0,(%eax) 10f6b5: 31 c0 xor %eax,%eax 10f6b7: 31 d2 xor %edx,%edx /* * Set token_len to the number of characters copied. */ *token_len = i; 10f6b9: 89 13 mov %edx,(%ebx) 10f6bb: eb f0 jmp 10f6ad 0010f6c0 : 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 ) { 10f6c0: 55 push %ebp 10f6c1: 89 e5 mov %esp,%ebp 10f6c3: 57 push %edi 10f6c4: 56 push %esi 10f6c5: 53 push %ebx 10f6c6: 83 ec 0c sub $0xc,%esp 10f6c9: 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, 10f6cc: 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) { 10f6d2: 83 f9 10 cmp $0x10,%ecx 10f6d5: 74 18 je 10f6ef <== ALWAYS TAKEN 10f6d7: 31 d2 xor %edx,%edx 10f6d9: b8 20 00 00 00 mov $0x20,%eax 10f6de: 39 c1 cmp %eax,%ecx 10f6e0: 74 0d je 10f6ef 10f6e2: d1 e0 shl %eax 10f6e4: 42 inc %edx 10f6e5: 83 fa 05 cmp $0x5,%edx 10f6e8: 75 f4 jne 10f6de <== NEVER TAKEN 10f6ea: 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) 10f6ef: 89 0d 28 70 12 00 mov %ecx,0x127028 /* * 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(); 10f6f5: e8 36 29 00 00 call 112030 10f6fa: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 10f6fd: 8b 45 14 mov 0x14(%ebp),%eax 10f700: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 10f703: 8b 45 0c mov 0xc(%ebp),%eax 10f706: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 10f709: 8d 7b 38 lea 0x38(%ebx),%edi 10f70c: be 20 14 12 00 mov $0x121420,%esi 10f711: b9 0c 00 00 00 mov $0xc,%ecx 10f716: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 10f718: 83 ec 08 sub $0x8,%esp 10f71b: 6a 10 push $0x10 10f71d: 6a 01 push $0x1 10f71f: e8 98 02 00 00 call 10f9bc if ( !fs_info ) { 10f724: 83 c4 10 add $0x10,%esp 10f727: 85 c0 test %eax,%eax 10f729: 74 3e je 10f769 <== 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; 10f72b: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 10f72e: 8b 15 2c 70 12 00 mov 0x12702c,%edx 10f734: 89 10 mov %edx,(%eax) 10f736: 42 inc %edx 10f737: 89 15 2c 70 12 00 mov %edx,0x12702c fs_info->ino_count = 1; 10f73d: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 10f744: 8b 55 10 mov 0x10(%ebp),%edx 10f747: 89 50 08 mov %edx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 10f74a: 8b 55 14 mov 0x14(%ebp),%edx 10f74d: 89 50 0c mov %edx,0xc(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 10f750: 8b 43 1c mov 0x1c(%ebx),%eax 10f753: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 10f75a: e8 a9 1e 00 00 call 111608 10f75f: 31 c0 xor %eax,%eax return 0; } 10f761: 8d 65 f4 lea -0xc(%ebp),%esp 10f764: 5b pop %ebx 10f765: 5e pop %esi 10f766: 5f pop %edi 10f767: c9 leave 10f768: 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); 10f769: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f76c: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 10f76f: e8 08 89 ff ff call 10807c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 10f774: e8 57 3f 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10f779: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10f77f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f784: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f787: eb d8 jmp 10f761 <== NOT EXECUTED 00108b24 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 108b24: 55 push %ebp 108b25: 89 e5 mov %esp,%ebp 108b27: 57 push %edi 108b28: 53 push %ebx 108b29: 83 ec 50 sub $0x50,%esp 108b2c: 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; 108b2f: 8b 45 08 mov 0x8(%ebp),%eax 108b32: 8b 00 mov (%eax),%eax 108b34: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 108b37: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 108b3c: 77 66 ja 108ba4 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 ); 108b3e: 31 c0 xor %eax,%eax 108b40: b9 ff ff ff ff mov $0xffffffff,%ecx 108b45: 89 d7 mov %edx,%edi 108b47: f2 ae repnz scas %es:(%edi),%al 108b49: f7 d1 not %ecx 108b4b: 49 dec %ecx 108b4c: 8d 45 f4 lea -0xc(%ebp),%eax 108b4f: 50 push %eax 108b50: 8d 5d b7 lea -0x49(%ebp),%ebx 108b53: 53 push %ebx 108b54: 51 push %ecx 108b55: 52 push %edx 108b56: e8 35 b8 00 00 call 114390 * 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( 108b5b: 8d 45 d8 lea -0x28(%ebp),%eax 108b5e: 89 04 24 mov %eax,(%esp) 108b61: 68 ff a1 00 00 push $0xa1ff 108b66: 53 push %ebx 108b67: 6a 03 push $0x3 108b69: ff 75 0c pushl 0xc(%ebp) 108b6c: e8 33 ac 00 00 call 1137a4 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 108b71: 83 c4 20 add $0x20,%esp 108b74: 85 c0 test %eax,%eax 108b76: 74 3e je 108bb6 <== 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++; 108b78: 8b 45 d8 mov -0x28(%ebp),%eax 108b7b: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 108b7f: 83 ec 08 sub $0x8,%esp 108b82: 6a 00 push $0x0 108b84: 8d 45 ec lea -0x14(%ebp),%eax 108b87: 50 push %eax 108b88: e8 ff 08 00 00 call 10948c 108b8d: 8b 55 ec mov -0x14(%ebp),%edx 108b90: 8b 45 d8 mov -0x28(%ebp),%eax 108b93: 89 50 48 mov %edx,0x48(%eax) 108b96: 31 c0 xor %eax,%eax return 0; 108b98: 83 c4 10 add $0x10,%esp } 108b9b: 8d 65 f8 lea -0x8(%ebp),%esp 108b9e: 5b pop %ebx 108b9f: 5f pop %edi 108ba0: c9 leave 108ba1: c3 ret 108ba2: 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 ); 108ba4: e8 93 fc 00 00 call 11883c <__errno> 108ba9: c7 00 1f 00 00 00 movl $0x1f,(%eax) 108baf: b8 ff ff ff ff mov $0xffffffff,%eax 108bb4: eb e5 jmp 108b9b ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 108bb6: e8 81 fc 00 00 call 11883c <__errno> <== NOT EXECUTED 108bbb: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108bc1: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108bc6: eb d3 jmp 108b9b <== NOT EXECUTED 00116b74 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 116b74: 55 push %ebp 116b75: 89 e5 mov %esp,%ebp 116b77: 53 push %ebx 116b78: 83 ec 04 sub $0x4,%esp 116b7b: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 116b7e: 85 c0 test %eax,%eax 116b80: 74 50 je 116bd2 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116b82: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 116b86: 75 31 jne 116bb9 <== 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 ); 116b88: 52 push %edx 116b89: 6a 01 push $0x1 116b8b: ff 75 0c pushl 0xc(%ebp) 116b8e: 50 push %eax 116b8f: e8 b8 fa ff ff call 11664c 116b94: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 116b96: 83 c4 10 add $0x10,%esp 116b99: 8b 00 mov (%eax),%eax 116b9b: 85 c0 test %eax,%eax 116b9d: 74 09 je 116ba8 #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 116b9f: 31 c0 xor %eax,%eax return 0; } 116ba1: 8b 5d fc mov -0x4(%ebp),%ebx 116ba4: c9 leave 116ba5: c3 ret 116ba6: 66 90 xchg %ax,%ax <== NOT EXECUTED #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 116ba8: e8 7b fa ff ff call 116628 if ( !memory ) 116bad: 85 c0 test %eax,%eax 116baf: 74 04 je 116bb5 <== ALWAYS TAKEN return 1; *block_entry_ptr = memory; 116bb1: 89 03 mov %eax,(%ebx) 116bb3: eb ea jmp 116b9f fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 116bb5: b0 01 mov $0x1,%al <== NOT EXECUTED 116bb7: eb e8 jmp 116ba1 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116bb9: 68 60 68 12 00 push $0x126860 <== NOT EXECUTED 116bbe: 68 5f 69 12 00 push $0x12695f <== NOT EXECUTED 116bc3: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 116bc8: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 116bcd: e8 ae 24 ff ff call 109080 <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 116bd2: 68 ec 67 12 00 push $0x1267ec <== NOT EXECUTED 116bd7: 68 5f 69 12 00 push $0x12695f <== NOT EXECUTED 116bdc: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 116be1: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 116be6: e8 95 24 ff ff call 109080 <__assert_func> <== NOT EXECUTED 00116bec : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 116bec: 55 push %ebp 116bed: 89 e5 mov %esp,%ebp 116bef: 57 push %edi 116bf0: 56 push %esi 116bf1: 53 push %ebx 116bf2: 83 ec 2c sub $0x2c,%esp 116bf5: 8b 5d 08 mov 0x8(%ebp),%ebx 116bf8: 8b 45 0c mov 0xc(%ebp),%eax 116bfb: 8b 55 10 mov 0x10(%ebp),%edx 116bfe: 89 45 d8 mov %eax,-0x28(%ebp) 116c01: 89 55 dc mov %edx,-0x24(%ebp) /* * Perform internal consistency checks */ assert( the_jnode ); 116c04: 85 db test %ebx,%ebx 116c06: 0f 84 29 01 00 00 je 116d35 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116c0c: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 116c10: 0f 85 06 01 00 00 jne 116d1c <== ALWAYS TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 116c16: a1 b0 c5 12 00 mov 0x12c5b0,%eax 116c1b: 89 c1 mov %eax,%ecx 116c1d: c1 e9 02 shr $0x2,%ecx 116c20: 8d 51 01 lea 0x1(%ecx),%edx 116c23: 0f af d1 imul %ecx,%edx 116c26: 42 inc %edx 116c27: 0f af d1 imul %ecx,%edx 116c2a: 4a dec %edx 116c2b: 0f af d0 imul %eax,%edx 116c2e: 31 c9 xor %ecx,%ecx 116c30: 3b 4d dc cmp -0x24(%ebp),%ecx 116c33: 7f 1c jg 116c51 <== ALWAYS TAKEN 116c35: 7d 15 jge 116c4c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 116c37: e8 00 1c 00 00 call 11883c <__errno> <== NOT EXECUTED 116c3c: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 116c42: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 116c47: e9 9e 00 00 00 jmp 116cea <== NOT EXECUTED 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 ) 116c4c: 3b 55 d8 cmp -0x28(%ebp),%edx 116c4f: 76 e6 jbe 116c37 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 116c51: 8b 53 50 mov 0x50(%ebx),%edx 116c54: 8b 4b 54 mov 0x54(%ebx),%ecx 116c57: 89 55 e0 mov %edx,-0x20(%ebp) 116c5a: 89 4d e4 mov %ecx,-0x1c(%ebp) 116c5d: 39 4d dc cmp %ecx,-0x24(%ebp) 116c60: 0f 8e 8e 00 00 00 jle 116cf4 <== NEVER TAKEN /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 116c66: 89 45 d0 mov %eax,-0x30(%ebp) 116c69: 89 c1 mov %eax,%ecx 116c6b: c1 f9 1f sar $0x1f,%ecx 116c6e: 89 4d d4 mov %ecx,-0x2c(%ebp) 116c71: ff 75 d4 pushl -0x2c(%ebp) 116c74: ff 75 d0 pushl -0x30(%ebp) 116c77: ff 75 dc pushl -0x24(%ebp) 116c7a: ff 75 d8 pushl -0x28(%ebp) 116c7d: e8 7a cb 00 00 call 1237fc <__divdi3> 116c82: 83 c4 10 add $0x10,%esp 116c85: 89 c6 mov %eax,%esi old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 116c87: ff 75 d4 pushl -0x2c(%ebp) 116c8a: ff 75 d0 pushl -0x30(%ebp) 116c8d: ff 75 e4 pushl -0x1c(%ebp) 116c90: ff 75 e0 pushl -0x20(%ebp) 116c93: e8 64 cb 00 00 call 1237fc <__divdi3> 116c98: 83 c4 10 add $0x10,%esp 116c9b: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 116c9e: 39 c6 cmp %eax,%esi 116ca0: 72 6a jb 116d0c <== ALWAYS TAKEN 116ca2: 89 c7 mov %eax,%edi 116ca4: eb 07 jmp 116cad 116ca6: 66 90 xchg %ax,%ax <== NOT EXECUTED 116ca8: 47 inc %edi 116ca9: 39 fe cmp %edi,%esi 116cab: 72 5f jb 116d0c if ( IMFS_memfile_addblock( the_jnode, block ) ) { 116cad: 83 ec 08 sub $0x8,%esp 116cb0: 57 push %edi 116cb1: 53 push %ebx 116cb2: e8 bd fe ff ff call 116b74 116cb7: 83 c4 10 add $0x10,%esp 116cba: 85 c0 test %eax,%eax 116cbc: 74 ea je 116ca8 <== NEVER TAKEN for ( ; block>=old_blocks ; block-- ) { 116cbe: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED 116cc1: 77 17 ja 116cda <== NOT EXECUTED 116cc3: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 116cc6: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 116cc8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 116ccb: 57 push %edi <== NOT EXECUTED 116ccc: 53 push %ebx <== NOT EXECUTED 116ccd: e8 d6 fb ff ff call 1168a8 <== 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-- ) { 116cd2: 4f dec %edi <== NOT EXECUTED 116cd3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116cd6: 39 fe cmp %edi,%esi <== NOT EXECUTED 116cd8: 76 ee jbe 116cc8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 116cda: e8 5d 1b 00 00 call 11883c <__errno> <== NOT EXECUTED 116cdf: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 116ce5: 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; } 116cea: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116ced: 5b pop %ebx <== NOT EXECUTED 116cee: 5e pop %esi <== NOT EXECUTED 116cef: 5f pop %edi <== NOT EXECUTED 116cf0: c9 leave <== NOT EXECUTED 116cf1: c3 ret <== NOT EXECUTED 116cf2: 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 ) 116cf4: 7c 09 jl 116cff <== ALWAYS TAKEN 116cf6: 39 55 d8 cmp %edx,-0x28(%ebp) 116cf9: 0f 87 67 ff ff ff ja 116c66 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 116cff: 31 c0 xor %eax,%eax return 0; } 116d01: 8d 65 f4 lea -0xc(%ebp),%esp 116d04: 5b pop %ebx 116d05: 5e pop %esi 116d06: 5f pop %edi 116d07: c9 leave 116d08: c3 ret 116d09: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 116d0c: 8b 45 d8 mov -0x28(%ebp),%eax 116d0f: 8b 55 dc mov -0x24(%ebp),%edx 116d12: 89 43 50 mov %eax,0x50(%ebx) 116d15: 89 53 54 mov %edx,0x54(%ebx) 116d18: 31 c0 xor %eax,%eax 116d1a: eb e5 jmp 116d01 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116d1c: 68 60 68 12 00 push $0x126860 <== NOT EXECUTED 116d21: 68 75 69 12 00 push $0x126975 <== NOT EXECUTED 116d26: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 116d2b: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 116d30: e8 4b 23 ff ff call 109080 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 116d35: 68 ec 67 12 00 push $0x1267ec <== NOT EXECUTED 116d3a: 68 75 69 12 00 push $0x126975 <== NOT EXECUTED 116d3f: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 116d44: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 116d49: e8 32 23 ff ff call 109080 <__assert_func> <== NOT EXECUTED 0011664c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 11664c: 55 push %ebp 11664d: 89 e5 mov %esp,%ebp 11664f: 57 push %edi 116650: 56 push %esi 116651: 53 push %ebx 116652: 83 ec 1c sub $0x1c,%esp 116655: 8b 5d 08 mov 0x8(%ebp),%ebx 116658: 8b 7d 0c mov 0xc(%ebp),%edi 11665b: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 11665e: 85 db test %ebx,%ebx 116660: 0f 84 58 01 00 00 je 1167be <== ALWAYS TAKEN if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 116666: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 11666a: 0f 85 67 01 00 00 jne 1167d7 <== ALWAYS TAKEN /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 116670: 8b 0d b0 c5 12 00 mov 0x12c5b0,%ecx 116676: c1 e9 02 shr $0x2,%ecx 116679: 8d 41 ff lea -0x1(%ecx),%eax 11667c: 39 c7 cmp %eax,%edi 11667e: 76 44 jbe 1166c4 <== NEVER TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 116680: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 116683: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 116686: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 116689: 39 d7 cmp %edx,%edi <== NOT EXECUTED 11668b: 77 57 ja 1166e4 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 11668d: 89 f8 mov %edi,%eax <== NOT EXECUTED 11668f: 29 c8 sub %ecx,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 116691: 31 d2 xor %edx,%edx <== NOT EXECUTED 116693: f7 f1 div %ecx <== NOT EXECUTED 116695: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 116697: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 11669a: 85 f6 test %esi,%esi <== NOT EXECUTED 11669c: 0f 84 96 00 00 00 je 116738 <== NOT EXECUTED if ( !p ) { 1166a2: 85 c0 test %eax,%eax <== NOT EXECUTED 1166a4: 0f 84 dd 00 00 00 je 116787 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 1166aa: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 1166ad: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 1166af: 85 c0 test %eax,%eax <== NOT EXECUTED 1166b1: 0f 84 ba 00 00 00 je 116771 <== 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 ]; 1166b7: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 1166ba: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1166bd: 5b pop %ebx <== NOT EXECUTED 1166be: 5e pop %esi <== NOT EXECUTED 1166bf: 5f pop %edi <== NOT EXECUTED 1166c0: c9 leave <== NOT EXECUTED 1166c1: c3 ret <== NOT EXECUTED 1166c2: 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; 1166c4: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 1166c7: 85 f6 test %esi,%esi 1166c9: 0f 84 85 00 00 00 je 116754 if ( !p ) { 1166cf: 85 c0 test %eax,%eax 1166d1: 0f 84 89 00 00 00 je 116760 p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 1166d7: 8d 04 b8 lea (%eax,%edi,4),%eax /* * This means the requested block number is out of range. */ return 0; } 1166da: 8d 65 f4 lea -0xc(%ebp),%esp 1166dd: 5b pop %ebx 1166de: 5e pop %esi 1166df: 5f pop %edi 1166e0: c9 leave 1166e1: c3 ret 1166e2: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 1166e4: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 1166e7: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 1166ea: 4a dec %edx <== NOT EXECUTED 1166eb: 39 d7 cmp %edx,%edi <== NOT EXECUTED 1166ed: 77 59 ja 116748 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 1166ef: 29 c7 sub %eax,%edi <== NOT EXECUTED 1166f1: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 1166f3: 31 d2 xor %edx,%edx <== NOT EXECUTED 1166f5: f7 f1 div %ecx <== NOT EXECUTED 1166f7: 89 d7 mov %edx,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 1166f9: 31 d2 xor %edx,%edx <== NOT EXECUTED 1166fb: f7 f1 div %ecx <== NOT EXECUTED 1166fd: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 1166ff: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 116702: 85 f6 test %esi,%esi <== NOT EXECUTED 116704: 0f 84 9a 00 00 00 je 1167a4 <== NOT EXECUTED if ( !p ) { 11670a: 85 c0 test %eax,%eax <== NOT EXECUTED 11670c: 0f 84 de 00 00 00 je 1167f0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 116712: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 116715: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 116717: 85 c0 test %eax,%eax <== NOT EXECUTED 116719: 0f 84 f2 00 00 00 je 116811 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 11671f: 8d 1c 90 lea (%eax,%edx,4),%ebx <== NOT EXECUTED 116722: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 116724: 85 c0 test %eax,%eax <== NOT EXECUTED 116726: 75 af jne 1166d7 <== NOT EXECUTED p2 = memfile_alloc_block(); 116728: e8 fb fe ff ff call 116628 <== NOT EXECUTED if ( !p2 ) 11672d: 85 c0 test %eax,%eax <== NOT EXECUTED 11672f: 74 17 je 116748 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 116731: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 116733: eb a2 jmp 1166d7 <== NOT EXECUTED 116735: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 116738: 85 c0 test %eax,%eax <== NOT EXECUTED 11673a: 74 0c je 116748 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 11673c: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED if ( !p ) 11673f: 85 c0 test %eax,%eax <== NOT EXECUTED 116741: 0f 85 70 ff ff ff jne 1166b7 <== NOT EXECUTED 116747: 90 nop <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 116748: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 11674a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11674d: 5b pop %ebx <== NOT EXECUTED 11674e: 5e pop %esi <== NOT EXECUTED 11674f: 5f pop %edi <== NOT EXECUTED 116750: c9 leave <== NOT EXECUTED 116751: c3 ret <== NOT EXECUTED 116752: 66 90 xchg %ax,%ax <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 116754: 85 c0 test %eax,%eax 116756: 0f 85 7b ff ff ff jne 1166d7 <== NEVER TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 11675c: 31 c0 xor %eax,%eax <== NOT EXECUTED 11675e: eb ea jmp 11674a <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 116760: e8 c3 fe ff ff call 116628 if ( !p ) 116765: 85 c0 test %eax,%eax 116767: 74 df je 116748 <== ALWAYS TAKEN return 0; info->indirect = p; 116769: 89 43 58 mov %eax,0x58(%ebx) 11676c: e9 66 ff ff ff jmp 1166d7 info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 116771: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 116774: e8 af fe ff ff call 116628 <== NOT EXECUTED if ( !p1 ) 116779: 85 c0 test %eax,%eax <== NOT EXECUTED 11677b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 11677e: 74 c8 je 116748 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 116780: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 116782: e9 30 ff ff ff jmp 1166b7 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 116787: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 11678a: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 11678d: e8 96 fe ff ff call 116628 <== NOT EXECUTED if ( !p ) 116792: 85 c0 test %eax,%eax <== NOT EXECUTED 116794: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 116797: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 11679a: 74 ac je 116748 <== NOT EXECUTED return 0; info->doubly_indirect = p; 11679c: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED 11679f: e9 06 ff ff ff jmp 1166aa <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 1167a4: 85 c0 test %eax,%eax <== NOT EXECUTED 1167a6: 74 a0 je 116748 <== 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 ]; 1167a8: 8b 0c 88 mov (%eax,%ecx,4),%ecx <== NOT EXECUTED if ( !p1 ) 1167ab: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1167ad: 74 99 je 116748 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 1167af: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 1167b6: 03 04 91 add (%ecx,%edx,4),%eax <== NOT EXECUTED 1167b9: e9 fc fe ff ff jmp 1166ba <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 1167be: 68 ec 67 12 00 push $0x1267ec <== NOT EXECUTED 1167c3: 68 d0 68 12 00 push $0x1268d0 <== NOT EXECUTED 1167c8: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 1167cd: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 1167d2: e8 a9 28 ff ff call 109080 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 1167d7: 68 60 68 12 00 push $0x126860 <== NOT EXECUTED 1167dc: 68 d0 68 12 00 push $0x1268d0 <== NOT EXECUTED 1167e1: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 1167e6: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 1167eb: e8 90 28 ff ff call 109080 <__assert_func> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 1167f0: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1167f3: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 1167f6: e8 2d fe ff ff call 116628 <== NOT EXECUTED if ( !p ) 1167fb: 85 c0 test %eax,%eax <== NOT EXECUTED 1167fd: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 116800: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 116803: 0f 84 3f ff ff ff je 116748 <== NOT EXECUTED return 0; info->triply_indirect = p; 116809: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED 11680c: e9 01 ff ff ff jmp 116712 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 116811: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 116814: e8 0f fe ff ff call 116628 <== NOT EXECUTED if ( !p1 ) 116819: 85 c0 test %eax,%eax <== NOT EXECUTED 11681b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 11681e: 0f 84 24 ff ff ff je 116748 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 116824: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 116826: e9 f4 fe ff ff jmp 11671f <== NOT EXECUTED 0011716c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 11716c: 55 push %ebp 11716d: 89 e5 mov %esp,%ebp 11716f: 57 push %edi 117170: 56 push %esi 117171: 53 push %ebx 117172: 83 ec 4c sub $0x4c,%esp 117175: 8b 75 0c mov 0xc(%ebp),%esi 117178: 8b 7d 10 mov 0x10(%ebp),%edi 11717b: 8b 45 18 mov 0x18(%ebp),%eax /* * Perform internal consistency checks */ assert( the_jnode ); 11717e: 8b 55 08 mov 0x8(%ebp),%edx 117181: 85 d2 test %edx,%edx 117183: 0f 84 8e 02 00 00 je 117417 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 117189: 8b 4d 08 mov 0x8(%ebp),%ecx 11718c: 8b 51 4c mov 0x4c(%ecx),%edx 11718f: 8d 4a fb lea -0x5(%edx),%ecx 117192: 83 f9 01 cmp $0x1,%ecx 117195: 0f 87 63 02 00 00 ja 1173fe <== ALWAYS TAKEN /* * Error checks on arguments */ assert( dest ); 11719b: 8b 5d 14 mov 0x14(%ebp),%ebx 11719e: 85 db test %ebx,%ebx 1171a0: 0f 84 26 02 00 00 je 1173cc <== ALWAYS TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 1171a6: 85 c0 test %eax,%eax 1171a8: 0f 84 f0 01 00 00 je 11739e <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 1171ae: 83 fa 06 cmp $0x6,%edx 1171b1: 0f 84 5d 01 00 00 je 117314 <== 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; 1171b7: 89 f2 mov %esi,%edx if ( last_byte > the_jnode->info.file.size ) 1171b9: 8b 4d 08 mov 0x8(%ebp),%ecx 1171bc: 8b 49 50 mov 0x50(%ecx),%ecx 1171bf: 89 4d cc mov %ecx,-0x34(%ebp) 1171c2: 8d 1c 30 lea (%eax,%esi,1),%ebx 1171c5: 89 5d d0 mov %ebx,-0x30(%ebp) 1171c8: 31 c9 xor %ecx,%ecx 1171ca: 8b 5d 08 mov 0x8(%ebp),%ebx 1171cd: 3b 4b 54 cmp 0x54(%ebx),%ecx 1171d0: 0f 8e e2 00 00 00 jle 1172b8 <== NEVER TAKEN my_length = the_jnode->info.file.size - start; 1171d6: 8b 5d cc mov -0x34(%ebp),%ebx 1171d9: 29 d3 sub %edx,%ebx 1171db: 89 5d cc mov %ebx,-0x34(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 1171de: a1 b0 c5 12 00 mov 0x12c5b0,%eax 1171e3: 89 45 d0 mov %eax,-0x30(%ebp) 1171e6: 99 cltd 1171e7: 89 d3 mov %edx,%ebx 1171e9: 52 push %edx 1171ea: 50 push %eax 1171eb: 57 push %edi 1171ec: 56 push %esi 1171ed: 89 45 c0 mov %eax,-0x40(%ebp) 1171f0: e8 57 c7 00 00 call 12394c <__moddi3> 1171f5: 83 c4 10 add $0x10,%esp 1171f8: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1171fb: 8b 4d c0 mov -0x40(%ebp),%ecx 1171fe: 53 push %ebx 1171ff: 51 push %ecx 117200: 57 push %edi 117201: 56 push %esi 117202: e8 f5 c5 00 00 call 1237fc <__divdi3> 117207: 83 c4 10 add $0x10,%esp 11720a: 89 c3 mov %eax,%ebx if ( start_offset ) { 11720c: 8b 4d c8 mov -0x38(%ebp),%ecx 11720f: 85 c9 test %ecx,%ecx 117211: 0f 85 b1 00 00 00 jne 1172c8 117217: 8b 55 14 mov 0x14(%ebp),%edx 11721a: 89 55 c8 mov %edx,-0x38(%ebp) 11721d: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 117224: 8b 55 d0 mov -0x30(%ebp),%edx 117227: 39 55 cc cmp %edx,-0x34(%ebp) 11722a: 72 39 jb 117265 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 11722c: 50 push %eax 11722d: 6a 00 push $0x0 11722f: 53 push %ebx 117230: ff 75 08 pushl 0x8(%ebp) 117233: e8 14 f4 ff ff call 11664c assert( block_ptr ); 117238: 83 c4 10 add $0x10,%esp 11723b: 85 c0 test %eax,%eax 11723d: 0f 84 70 01 00 00 je 1173b3 <== ALWAYS TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 117243: 8b 30 mov (%eax),%esi 117245: 8b 7d c8 mov -0x38(%ebp),%edi 117248: 8b 4d d0 mov -0x30(%ebp),%ecx 11724b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 11724d: 89 7d c8 mov %edi,-0x38(%ebp) block++; 117250: 43 inc %ebx my_length -= to_copy; 117251: 8b 4d d0 mov -0x30(%ebp),%ecx 117254: 29 4d cc sub %ecx,-0x34(%ebp) copied += to_copy; 117257: 01 4d c4 add %ecx,-0x3c(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 11725a: 8b 7d cc mov -0x34(%ebp),%edi 11725d: 39 3d b0 c5 12 00 cmp %edi,0x12c5b0 117263: 76 c7 jbe 11722c * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 117265: 8b 7d cc mov -0x34(%ebp),%edi 117268: 85 ff test %edi,%edi 11726a: 74 27 je 117293 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 11726c: 56 push %esi 11726d: 6a 00 push $0x0 11726f: 53 push %ebx 117270: ff 75 08 pushl 0x8(%ebp) 117273: e8 d4 f3 ff ff call 11664c assert( block_ptr ); 117278: 83 c4 10 add $0x10,%esp 11727b: 85 c0 test %eax,%eax 11727d: 0f 84 62 01 00 00 je 1173e5 <== ALWAYS TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 117283: 8b 30 mov (%eax),%esi 117285: 8b 7d c8 mov -0x38(%ebp),%edi 117288: 8b 4d cc mov -0x34(%ebp),%ecx 11728b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 11728d: 8b 45 cc mov -0x34(%ebp),%eax 117290: 01 45 c4 add %eax,-0x3c(%ebp) } IMFS_update_atime( the_jnode ); 117293: 83 ec 08 sub $0x8,%esp 117296: 6a 00 push $0x0 117298: 8d 45 e0 lea -0x20(%ebp),%eax 11729b: 50 push %eax 11729c: e8 eb 21 ff ff call 10948c 1172a1: 8b 45 e0 mov -0x20(%ebp),%eax 1172a4: 8b 55 08 mov 0x8(%ebp),%edx 1172a7: 89 42 40 mov %eax,0x40(%edx) return copied; 1172aa: 8b 45 c4 mov -0x3c(%ebp),%eax 1172ad: 83 c4 10 add $0x10,%esp } 1172b0: 8d 65 f4 lea -0xc(%ebp),%esp 1172b3: 5b pop %ebx 1172b4: 5e pop %esi 1172b5: 5f pop %edi 1172b6: c9 leave 1172b7: 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 ) 1172b8: 0f 8d ba 00 00 00 jge 117378 <== NEVER TAKEN 1172be: 89 45 cc mov %eax,-0x34(%ebp) 1172c1: e9 18 ff ff ff jmp 1171de 1172c6: 66 90 xchg %ax,%ax <== 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 ); 1172c8: 52 push %edx 1172c9: 6a 00 push $0x0 1172cb: 53 push %ebx 1172cc: ff 75 08 pushl 0x8(%ebp) 1172cf: e8 78 f3 ff ff call 11664c assert( block_ptr ); 1172d4: 83 c4 10 add $0x10,%esp 1172d7: 85 c0 test %eax,%eax 1172d9: 0f 84 51 01 00 00 je 117430 <== 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; 1172df: 8b 4d d0 mov -0x30(%ebp),%ecx 1172e2: 2b 4d c8 sub -0x38(%ebp),%ecx 1172e5: 8b 55 cc mov -0x34(%ebp),%edx 1172e8: 39 ca cmp %ecx,%edx 1172ea: 0f 87 9c 00 00 00 ja 11738c 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 ); 1172f0: 8b 75 c8 mov -0x38(%ebp),%esi 1172f3: 03 30 add (%eax),%esi dest += to_copy; 1172f5: 8b 7d 14 mov 0x14(%ebp),%edi 1172f8: 89 d1 mov %edx,%ecx 1172fa: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 1172fc: 89 7d c8 mov %edi,-0x38(%ebp) block++; 1172ff: 43 inc %ebx my_length -= to_copy; 117300: 29 55 cc sub %edx,-0x34(%ebp) 117303: a1 b0 c5 12 00 mov 0x12c5b0,%eax 117308: 89 45 d0 mov %eax,-0x30(%ebp) 11730b: 89 55 c4 mov %edx,-0x3c(%ebp) 11730e: e9 11 ff ff ff jmp 117224 117313: 90 nop <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 117314: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 117317: 8b 5b 58 mov 0x58(%ebx),%ebx <== NOT EXECUTED 11731a: 89 5d cc mov %ebx,-0x34(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 11731d: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 117320: 8b 51 50 mov 0x50(%ecx),%edx <== NOT EXECUTED 117323: 8b 49 54 mov 0x54(%ecx),%ecx <== NOT EXECUTED 117326: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED 117329: 89 4d b4 mov %ecx,-0x4c(%ebp) <== NOT EXECUTED 11732c: 29 f2 sub %esi,%edx <== NOT EXECUTED 11732e: 19 f9 sbb %edi,%ecx <== NOT EXECUTED 117330: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 117333: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 117336: 31 db xor %ebx,%ebx <== NOT EXECUTED 117338: 39 cb cmp %ecx,%ebx <== NOT EXECUTED 11733a: 7e 58 jle 117394 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 11733c: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED 11733f: 29 f2 sub %esi,%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 117341: 03 75 cc add -0x34(%ebp),%esi <== NOT EXECUTED 117344: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 117347: 89 d1 mov %edx,%ecx <== NOT EXECUTED 117349: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 11734b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11734e: 6a 00 push $0x0 <== NOT EXECUTED 117350: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 117353: 50 push %eax <== NOT EXECUTED 117354: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 117357: e8 30 21 ff ff call 10948c <== NOT EXECUTED 11735c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 11735f: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 117362: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED return my_length; 117365: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 117368: 89 d0 mov %edx,%eax <== NOT EXECUTED 11736a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 11736d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 117370: 5b pop %ebx <== NOT EXECUTED 117371: 5e pop %esi <== NOT EXECUTED 117372: 5f pop %edi <== NOT EXECUTED 117373: c9 leave <== NOT EXECUTED 117374: c3 ret <== NOT EXECUTED 117375: 8d 76 00 lea 0x0(%esi),%esi <== 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 ) 117378: 8b 4d cc mov -0x34(%ebp),%ecx 11737b: 39 4d d0 cmp %ecx,-0x30(%ebp) 11737e: 0f 87 52 fe ff ff ja 1171d6 117384: e9 35 ff ff ff jmp 1172be 117389: 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; 11738c: 89 ca mov %ecx,%edx 11738e: e9 5d ff ff ff jmp 1172f0 117393: 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)) 117394: 7c 04 jl 11739a <== NOT EXECUTED 117396: 39 d0 cmp %edx,%eax <== NOT EXECUTED 117398: 77 a2 ja 11733c <== NOT EXECUTED 11739a: 89 c2 mov %eax,%edx <== NOT EXECUTED 11739c: eb a3 jmp 117341 <== 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 ); 11739e: e8 99 14 00 00 call 11883c <__errno> <== NOT EXECUTED 1173a3: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1173a9: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1173ae: e9 fd fe ff ff jmp 1172b0 <== 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 ); 1173b3: 68 02 68 12 00 push $0x126802 <== NOT EXECUTED 1173b8: 68 02 69 12 00 push $0x126902 <== NOT EXECUTED 1173bd: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 1173c2: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 1173c7: e8 b4 1c ff ff call 109080 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 1173cc: 68 13 68 12 00 push $0x126813 <== NOT EXECUTED 1173d1: 68 02 69 12 00 push $0x126902 <== NOT EXECUTED 1173d6: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 1173db: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 1173e0: e8 9b 1c ff ff call 109080 <__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 ); 1173e5: 68 02 68 12 00 push $0x126802 <== NOT EXECUTED 1173ea: 68 02 69 12 00 push $0x126902 <== NOT EXECUTED 1173ef: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 1173f4: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 1173f9: e8 82 1c ff ff call 109080 <__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 || 1173fe: 68 84 68 12 00 push $0x126884 <== NOT EXECUTED 117403: 68 02 69 12 00 push $0x126902 <== NOT EXECUTED 117408: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 11740d: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 117412: e8 69 1c ff ff call 109080 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 117417: 68 ec 67 12 00 push $0x1267ec <== NOT EXECUTED 11741c: 68 02 69 12 00 push $0x126902 <== NOT EXECUTED 117421: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 117426: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 11742b: e8 50 1c ff ff call 109080 <__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 ); 117430: 68 02 68 12 00 push $0x126802 <== NOT EXECUTED 117435: 68 02 69 12 00 push $0x126902 <== NOT EXECUTED 11743a: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 11743f: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 117444: e8 37 1c ff ff call 109080 <__assert_func> <== NOT EXECUTED 001168f4 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 1168f4: 55 push %ebp 1168f5: 89 e5 mov %esp,%ebp 1168f7: 57 push %edi 1168f8: 56 push %esi 1168f9: 53 push %ebx 1168fa: 83 ec 1c sub $0x1c,%esp /* * Perform internal consistency checks */ assert( the_jnode ); 1168fd: 8b 55 08 mov 0x8(%ebp),%edx 116900: 85 d2 test %edx,%edx 116902: 0f 84 61 01 00 00 je 116a69 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116908: 8b 45 08 mov 0x8(%ebp),%eax 11690b: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 11690f: 0f 85 6d 01 00 00 jne 116a82 <== 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; 116915: 8b 3d b0 c5 12 00 mov 0x12c5b0,%edi 11691b: c1 ef 02 shr $0x2,%edi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 11691e: 8b 55 08 mov 0x8(%ebp),%edx 116921: 8b 42 58 mov 0x58(%edx),%eax 116924: 85 c0 test %eax,%eax 116926: 74 12 je 11693a if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 116928: 83 ec 08 sub $0x8,%esp 11692b: 57 push %edi 11692c: 89 d0 mov %edx,%eax 11692e: 83 c0 58 add $0x58,%eax 116931: 50 push %eax 116932: e8 f5 fe ff ff call 11682c 116937: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 11693a: 8b 4d 08 mov 0x8(%ebp),%ecx 11693d: 8b 51 5c mov 0x5c(%ecx),%edx 116940: 85 d2 test %edx,%edx 116942: 74 57 je 11699b <== NEVER TAKEN for ( i=0 ; i<== NOT EXECUTED 116950: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 116952: 31 db xor %ebx,%ebx <== NOT EXECUTED 116954: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 116957: eb 06 jmp 11695f <== NOT EXECUTED 116959: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 11695c: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 11695f: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED 116962: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) <== NOT EXECUTED 116966: 74 14 je 11697c <== NOT EXECUTED memfile_free_blocks_in_table( 116968: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11696b: 57 push %edi <== NOT EXECUTED 11696c: 01 ca add %ecx,%edx <== NOT EXECUTED 11696e: 52 push %edx <== NOT EXECUTED 11696f: e8 b8 fe ff ff call 11682c <== NOT EXECUTED 116974: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116977: a1 b0 c5 12 00 mov 0x12c5b0,%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 ); 116988: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11698b: 57 push %edi <== NOT EXECUTED 11698c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 11698f: 83 c0 5c add $0x5c,%eax <== NOT EXECUTED 116992: 50 push %eax <== NOT EXECUTED 116993: e8 94 fe ff ff call 11682c <== NOT EXECUTED 116998: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } if ( info->triply_indirect ) { 11699b: 8b 45 08 mov 0x8(%ebp),%eax 11699e: 8b 50 60 mov 0x60(%eax),%edx 1169a1: 85 d2 test %edx,%edx 1169a3: 0f 84 b6 00 00 00 je 116a5f <== NEVER TAKEN for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 1169b9: 8b 32 mov (%edx),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 1169bb: 85 f6 test %esi,%esi <== NOT EXECUTED 1169bd: 0f 84 89 00 00 00 je 116a4c <== NOT EXECUTED 1169c3: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED 1169ca: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 1169d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED 1169db: 31 d2 xor %edx,%edx <== NOT EXECUTED 1169dd: 31 db xor %ebx,%ebx <== NOT EXECUTED 1169df: 90 nop <== NOT EXECUTED if ( p[j] ) { 1169e0: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 1169e3: 8b 0c 16 mov (%esi,%edx,1),%ecx <== NOT EXECUTED 1169e6: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1169e8: 74 15 je 1169ff <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 1169ea: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1169ed: 57 push %edi <== NOT EXECUTED 1169ee: 8d 14 16 lea (%esi,%edx,1),%edx <== NOT EXECUTED 1169f1: 52 push %edx <== NOT EXECUTED 1169f2: e8 35 fe ff ff call 11682c <== NOT EXECUTED 1169f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1169fa: a1 b0 c5 12 00 mov 0x12c5b0,%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( 116a0b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 116a0e: 57 push %edi <== NOT EXECUTED 116a0f: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 116a12: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 116a15: 03 41 60 add 0x60(%ecx),%eax <== NOT EXECUTED 116a18: 50 push %eax <== NOT EXECUTED 116a19: e8 0e fe ff ff call 11682c <== 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 */ 116a33: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 116a36: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 116a39: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 116a3c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 116a3f: 8b 51 60 mov 0x60(%ecx),%edx <== NOT EXECUTED 116a42: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 116a45: 8b 34 0a mov (%edx,%ecx,1),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 116a48: 85 f6 test %esi,%esi <== NOT EXECUTED 116a4a: 75 88 jne 1169d4 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 116a4c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 116a4f: 57 push %edi <== NOT EXECUTED 116a50: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 116a53: 83 c0 60 add $0x60,%eax <== NOT EXECUTED 116a56: 50 push %eax <== NOT EXECUTED 116a57: e8 d0 fd ff ff call 11682c <== NOT EXECUTED 116a5c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 116a5f: 31 c0 xor %eax,%eax 116a61: 8d 65 f4 lea -0xc(%ebp),%esp 116a64: 5b pop %ebx 116a65: 5e pop %esi 116a66: 5f pop %edi 116a67: c9 leave 116a68: c3 ret /* * Perform internal consistency checks */ assert( the_jnode ); 116a69: 68 ec 67 12 00 push $0x1267ec <== NOT EXECUTED 116a6e: 68 14 69 12 00 push $0x126914 <== NOT EXECUTED 116a73: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 116a78: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 116a7d: e8 fe 25 ff ff call 109080 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116a82: 68 60 68 12 00 push $0x126860 <== NOT EXECUTED 116a87: 68 14 69 12 00 push $0x126914 <== NOT EXECUTED 116a8c: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 116a91: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 116a96: e8 e5 25 ff ff call 109080 <__assert_func> <== NOT EXECUTED 001168a8 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 1168a8: 55 push %ebp <== NOT EXECUTED 1168a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1168ab: 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 ); 1168ae: 6a 00 push $0x0 <== NOT EXECUTED 1168b0: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1168b3: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1168b6: e8 91 fd ff ff call 11664c <== NOT EXECUTED assert( block_ptr ); 1168bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1168be: 85 c0 test %eax,%eax <== NOT EXECUTED 1168c0: 74 18 je 1168da <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 1168c2: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 1168c4: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 1168ca: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1168cd: 52 push %edx <== NOT EXECUTED 1168ce: e8 39 fd ff ff call 11660c <== NOT EXECUTED } return 1; } 1168d3: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1168d8: c9 leave <== NOT EXECUTED 1168d9: 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 ); 1168da: 68 02 68 12 00 push $0x126802 <== NOT EXECUTED 1168df: 68 45 69 12 00 push $0x126945 <== NOT EXECUTED 1168e4: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 1168e9: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 1168ee: e8 8d 27 ff ff call 109080 <__assert_func> <== NOT EXECUTED 00116e3c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 116e3c: 55 push %ebp 116e3d: 89 e5 mov %esp,%ebp 116e3f: 57 push %edi 116e40: 56 push %esi 116e41: 53 push %ebx 116e42: 83 ec 3c sub $0x3c,%esp 116e45: 8b 5d 0c mov 0xc(%ebp),%ebx 116e48: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 116e4b: 8b 4d 08 mov 0x8(%ebp),%ecx 116e4e: 85 c9 test %ecx,%ecx 116e50: 0f 84 d8 01 00 00 je 11702e <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116e56: 8b 45 08 mov 0x8(%ebp),%eax 116e59: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 116e5d: 0f 85 b2 01 00 00 jne 117015 <== ALWAYS TAKEN /* * Error check arguments */ assert( source ); 116e63: 8b 55 14 mov 0x14(%ebp),%edx 116e66: 85 d2 test %edx,%edx 116e68: 0f 84 d9 01 00 00 je 117047 <== ALWAYS TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 116e6e: 8b 45 18 mov 0x18(%ebp),%eax 116e71: 85 c0 test %eax,%eax 116e73: 0f 84 6c 01 00 00 je 116fe5 <== 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; if ( last_byte > the_jnode->info.file.size ) { 116e79: 8b 45 18 mov 0x18(%ebp),%eax 116e7c: 01 d8 add %ebx,%eax 116e7e: 31 d2 xor %edx,%edx 116e80: 8b 4d 08 mov 0x8(%ebp),%ecx 116e83: 3b 51 54 cmp 0x54(%ecx),%edx 116e86: 7c 10 jl 116e98 <== ALWAYS TAKEN 116e88: 0f 8f 26 01 00 00 jg 116fb4 <== ALWAYS TAKEN 116e8e: 3b 41 50 cmp 0x50(%ecx),%eax 116e91: 0f 87 1d 01 00 00 ja 116fb4 <== NEVER TAKEN 116e97: 90 nop <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 116e98: a1 b0 c5 12 00 mov 0x12c5b0,%eax 116e9d: 89 45 d4 mov %eax,-0x2c(%ebp) 116ea0: 99 cltd 116ea1: 89 45 c8 mov %eax,-0x38(%ebp) 116ea4: 89 55 cc mov %edx,-0x34(%ebp) 116ea7: 52 push %edx 116ea8: 50 push %eax 116ea9: 56 push %esi 116eaa: 53 push %ebx 116eab: e8 9c ca 00 00 call 12394c <__moddi3> 116eb0: 83 c4 10 add $0x10,%esp 116eb3: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 116eb5: ff 75 cc pushl -0x34(%ebp) 116eb8: ff 75 c8 pushl -0x38(%ebp) 116ebb: 56 push %esi 116ebc: 53 push %ebx 116ebd: e8 3a c9 00 00 call 1237fc <__divdi3> 116ec2: 83 c4 10 add $0x10,%esp 116ec5: 89 c3 mov %eax,%ebx if ( start_offset ) { 116ec7: 85 ff test %edi,%edi 116ec9: 0f 85 a1 00 00 00 jne 116f70 116ecf: 8b 75 14 mov 0x14(%ebp),%esi 116ed2: 8b 55 18 mov 0x18(%ebp),%edx 116ed5: 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 ) { 116edc: 3b 55 d4 cmp -0x2c(%ebp),%edx 116edf: 72 3b jb 116f1c 116ee1: 8d 76 00 lea 0x0(%esi),%esi block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 116ee4: 51 push %ecx 116ee5: 6a 00 push $0x0 116ee7: 53 push %ebx 116ee8: ff 75 08 pushl 0x8(%ebp) 116eeb: 89 55 c4 mov %edx,-0x3c(%ebp) 116eee: e8 59 f7 ff ff call 11664c assert( block_ptr ); 116ef3: 83 c4 10 add $0x10,%esp 116ef6: 85 c0 test %eax,%eax 116ef8: 8b 55 c4 mov -0x3c(%ebp),%edx 116efb: 0f 84 fb 00 00 00 je 116ffc <== 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 ); 116f01: 8b 00 mov (%eax),%eax src += to_copy; 116f03: 89 c7 mov %eax,%edi 116f05: 8b 4d d4 mov -0x2c(%ebp),%ecx 116f08: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 116f0a: 43 inc %ebx my_length -= to_copy; 116f0b: 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( 116f0e: 8b 4d d4 mov -0x2c(%ebp),%ecx 116f11: 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 ) { 116f14: 39 15 b0 c5 12 00 cmp %edx,0x12c5b0 116f1a: 76 c8 jbe 116ee4 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 116f1c: 85 d2 test %edx,%edx 116f1e: 74 28 je 116f48 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 116f20: 50 push %eax 116f21: 6a 00 push $0x0 116f23: 53 push %ebx 116f24: ff 75 08 pushl 0x8(%ebp) 116f27: 89 55 c4 mov %edx,-0x3c(%ebp) 116f2a: e8 1d f7 ff ff call 11664c assert( block_ptr ); 116f2f: 83 c4 10 add $0x10,%esp 116f32: 85 c0 test %eax,%eax 116f34: 8b 55 c4 mov -0x3c(%ebp),%edx 116f37: 0f 84 23 01 00 00 je 117060 <== 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 ); 116f3d: 8b 00 mov (%eax),%eax 116f3f: 89 c7 mov %eax,%edi 116f41: 89 d1 mov %edx,%ecx 116f43: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 116f45: 01 55 c8 add %edx,-0x38(%ebp) } IMFS_mtime_ctime_update( the_jnode ); 116f48: 83 ec 08 sub $0x8,%esp 116f4b: 6a 00 push $0x0 116f4d: 8d 45 e0 lea -0x20(%ebp),%eax 116f50: 50 push %eax 116f51: e8 36 25 ff ff call 10948c 116f56: 8b 45 e0 mov -0x20(%ebp),%eax 116f59: 8b 55 08 mov 0x8(%ebp),%edx 116f5c: 89 42 44 mov %eax,0x44(%edx) 116f5f: 89 42 48 mov %eax,0x48(%edx) return copied; 116f62: 83 c4 10 add $0x10,%esp } 116f65: 8b 45 c8 mov -0x38(%ebp),%eax 116f68: 8d 65 f4 lea -0xc(%ebp),%esp 116f6b: 5b pop %ebx 116f6c: 5e pop %esi 116f6d: 5f pop %edi 116f6e: c9 leave 116f6f: 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 ); 116f70: 56 push %esi 116f71: 6a 00 push $0x0 116f73: 50 push %eax 116f74: ff 75 08 pushl 0x8(%ebp) 116f77: e8 d0 f6 ff ff call 11664c assert( block_ptr ); 116f7c: 83 c4 10 add $0x10,%esp 116f7f: 85 c0 test %eax,%eax 116f81: 0f 84 f2 00 00 00 je 117079 <== 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; 116f87: 8b 55 d4 mov -0x2c(%ebp),%edx 116f8a: 29 fa sub %edi,%edx 116f8c: 89 55 c8 mov %edx,-0x38(%ebp) 116f8f: 8b 4d 18 mov 0x18(%ebp),%ecx 116f92: 39 ca cmp %ecx,%edx 116f94: 77 4a ja 116fe0 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 ); 116f96: 03 38 add (%eax),%edi src += to_copy; 116f98: 8b 75 14 mov 0x14(%ebp),%esi 116f9b: 8b 4d c8 mov -0x38(%ebp),%ecx 116f9e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 116fa0: 43 inc %ebx my_length -= to_copy; 116fa1: 8b 55 18 mov 0x18(%ebp),%edx 116fa4: 2b 55 c8 sub -0x38(%ebp),%edx copied += to_copy; 116fa7: a1 b0 c5 12 00 mov 0x12c5b0,%eax 116fac: 89 45 d4 mov %eax,-0x2c(%ebp) 116faf: e9 28 ff ff ff jmp 116edc * 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 ); 116fb4: 57 push %edi 116fb5: 52 push %edx 116fb6: 50 push %eax 116fb7: ff 75 08 pushl 0x8(%ebp) 116fba: e8 2d fc ff ff call 116bec if ( status ) 116fbf: 83 c4 10 add $0x10,%esp 116fc2: 85 c0 test %eax,%eax 116fc4: 0f 84 ce fe ff ff je 116e98 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 116fca: e8 6d 18 00 00 call 11883c <__errno> <== NOT EXECUTED 116fcf: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 116fd5: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 116fdc: eb 87 jmp 116f65 <== NOT EXECUTED 116fde: 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; 116fe0: 89 4d c8 mov %ecx,-0x38(%ebp) 116fe3: eb b1 jmp 116f96 * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 116fe5: e8 52 18 00 00 call 11883c <__errno> <== NOT EXECUTED 116fea: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 116ff0: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 116ff7: e9 69 ff ff ff jmp 116f65 <== 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 ); 116ffc: 68 02 68 12 00 push $0x126802 <== NOT EXECUTED 117001: 68 ef 68 12 00 push $0x1268ef <== NOT EXECUTED 117006: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 11700b: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 117010: e8 6b 20 ff ff call 109080 <__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 ); 117015: 68 60 68 12 00 push $0x126860 <== NOT EXECUTED 11701a: 68 ef 68 12 00 push $0x1268ef <== NOT EXECUTED 11701f: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 117024: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 117029: e8 52 20 ff ff call 109080 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 11702e: 68 ec 67 12 00 push $0x1267ec <== NOT EXECUTED 117033: 68 ef 68 12 00 push $0x1268ef <== NOT EXECUTED 117038: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 11703d: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 117042: e8 39 20 ff ff call 109080 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 117047: 68 0c 68 12 00 push $0x12680c <== NOT EXECUTED 11704c: 68 ef 68 12 00 push $0x1268ef <== NOT EXECUTED 117051: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 117056: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 11705b: e8 20 20 ff ff call 109080 <__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 ); 117060: 68 02 68 12 00 push $0x126802 <== NOT EXECUTED 117065: 68 ef 68 12 00 push $0x1268ef <== NOT EXECUTED 11706a: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 11706f: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 117074: e8 07 20 ff ff call 109080 <__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 ); 117079: 68 02 68 12 00 push $0x126802 <== NOT EXECUTED 11707e: 68 ef 68 12 00 push $0x1268ef <== NOT EXECUTED 117083: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 117088: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 11708d: e8 ee 1f ff ff call 109080 <__assert_func> <== NOT EXECUTED 0010f78c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10f78c: 55 push %ebp 10f78d: 89 e5 mov %esp,%ebp 10f78f: 57 push %edi 10f790: 56 push %esi 10f791: 53 push %ebx 10f792: 83 ec 5c sub $0x5c,%esp 10f795: 8b 55 08 mov 0x8(%ebp),%edx 10f798: 8b 5d 0c mov 0xc(%ebp),%ebx 10f79b: 8b 75 10 mov 0x10(%ebp),%esi 10f79e: 8b 45 14 mov 0x14(%ebp),%eax 10f7a1: 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 ); 10f7a4: 31 c0 xor %eax,%eax 10f7a6: b9 ff ff ff ff mov $0xffffffff,%ecx 10f7ab: 89 d7 mov %edx,%edi 10f7ad: f2 ae repnz scas %es:(%edi),%al 10f7af: f7 d1 not %ecx 10f7b1: 49 dec %ecx 10f7b2: 8d 45 e4 lea -0x1c(%ebp),%eax 10f7b5: 50 push %eax 10f7b6: 8d 7d af lea -0x51(%ebp),%edi 10f7b9: 57 push %edi 10f7ba: 51 push %ecx 10f7bb: 52 push %edx 10f7bc: e8 2f fe ff ff call 10f5f0 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 10f7c1: 89 d8 mov %ebx,%eax 10f7c3: 25 00 f0 00 00 and $0xf000,%eax 10f7c8: 83 c4 10 add $0x10,%esp 10f7cb: 3d 00 40 00 00 cmp $0x4000,%eax 10f7d0: 74 5e je 10f830 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 10f7d2: 3d 00 80 00 00 cmp $0x8000,%eax 10f7d7: 74 4f je 10f828 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 10f7d9: 3d 00 60 00 00 cmp $0x6000,%eax 10f7de: 74 38 je 10f818 10f7e0: 3d 00 20 00 00 cmp $0x2000,%eax 10f7e5: 74 31 je 10f818 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 10f7e7: 3d 00 10 00 00 cmp $0x1000,%eax 10f7ec: 75 4a jne 10f838 <== ALWAYS TAKEN 10f7ee: 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( 10f7f3: 83 ec 0c sub $0xc,%esp 10f7f6: 8d 45 d0 lea -0x30(%ebp),%eax 10f7f9: 50 push %eax 10f7fa: 53 push %ebx 10f7fb: 57 push %edi 10f7fc: 52 push %edx 10f7fd: ff 75 18 pushl 0x18(%ebp) 10f800: e8 5f 28 00 00 call 112064 new_name, mode, &info ); if ( !new_node ) 10f805: 83 c4 20 add $0x20,%esp 10f808: 85 c0 test %eax,%eax 10f80a: 74 3e je 10f84a <== ALWAYS TAKEN 10f80c: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 10f80e: 8d 65 f4 lea -0xc(%ebp),%esp 10f811: 5b pop %ebx 10f812: 5e pop %esi 10f813: 5f pop %edi 10f814: c9 leave 10f815: c3 ret 10f816: 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 ); 10f818: 89 75 d0 mov %esi,-0x30(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 10f81b: 8b 45 a4 mov -0x5c(%ebp),%eax 10f81e: 89 45 d4 mov %eax,-0x2c(%ebp) 10f821: 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) ) { 10f826: eb cb jmp 10f7f3 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 10f828: ba 05 00 00 00 mov $0x5,%edx 10f82d: eb c4 jmp 10f7f3 10f82f: 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 ); 10f830: ba 01 00 00 00 mov $0x1,%edx 10f835: eb bc jmp 10f7f3 10f837: 90 nop <== NOT EXECUTED 10f838: e8 93 3e 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10f83d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10f843: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f848: eb c4 jmp 10f80e <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 10f84a: e8 81 3e 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10f84f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10f855: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f85a: eb b2 jmp 10f80e <== NOT EXECUTED 00108c98 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 108c98: 55 push %ebp 108c99: 89 e5 mov %esp,%ebp 108c9b: 83 ec 08 sub $0x8,%esp 108c9e: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 108ca1: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 108ca4: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108ca8: 75 0a jne 108cb4 <== 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; 108caa: 89 50 5c mov %edx,0x5c(%eax) 108cad: 31 c0 xor %eax,%eax return 0; } 108caf: c9 leave 108cb0: c3 ret 108cb1: 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 ); 108cb4: e8 83 fb 00 00 call 11883c <__errno> <== NOT EXECUTED 108cb9: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 108cbf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 108cc4: c9 leave <== NOT EXECUTED 108cc5: c3 ret <== NOT EXECUTED 0010934c : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 10934c: 55 push %ebp 10934d: 89 e5 mov %esp,%ebp 10934f: 53 push %ebx 109350: 83 ec 04 sub $0x4,%esp 109353: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 109356: 85 db test %ebx,%ebx 109358: 0f 84 7f 01 00 00 je 1094dd <== ALWAYS TAKEN fprintf(stdout, "%s", the_jnode->name ); 10935e: 83 ec 08 sub $0x8,%esp 109361: a1 60 b1 12 00 mov 0x12b160,%eax 109366: ff 70 08 pushl 0x8(%eax) 109369: 8d 43 0c lea 0xc(%ebx),%eax 10936c: 50 push %eax 10936d: e8 e6 e7 00 00 call 117b58 switch( the_jnode->type ) { 109372: 8b 43 4c mov 0x4c(%ebx),%eax 109375: 83 c4 10 add $0x10,%esp 109378: 83 f8 07 cmp $0x7,%eax 10937b: 76 2b jbe 1093a8 <== NEVER TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 10937d: 52 push %edx <== NOT EXECUTED 10937e: 50 push %eax <== NOT EXECUTED 10937f: 68 ce 66 12 00 push $0x1266ce <== NOT EXECUTED 109384: a1 60 b1 12 00 mov 0x12b160,%eax <== NOT EXECUTED 109389: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10938c: e8 9f e6 00 00 call 117a30 <== NOT EXECUTED assert(0); 109391: 68 9e 47 12 00 push $0x12479e <== NOT EXECUTED 109396: 68 34 68 12 00 push $0x126834 <== NOT EXECUTED 10939b: 6a 6c push $0x6c <== NOT EXECUTED 10939d: 68 18 67 12 00 push $0x126718 <== NOT EXECUTED 1093a2: e8 cd 08 00 00 call 109c74 <__assert_func> <== NOT EXECUTED 1093a7: 90 nop <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 1093a8: ff 24 85 00 68 12 00 jmp *0x126800(,%eax,4) 1093af: 90 nop <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 1093b0: a1 60 b1 12 00 mov 0x12b160,%eax <== NOT EXECUTED 1093b5: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 1093b8: 6a 12 push $0x12 <== NOT EXECUTED 1093ba: 6a 01 push $0x1 <== NOT EXECUTED 1093bc: 68 bb 66 12 00 push $0x1266bb <== NOT EXECUTED 1093c1: e8 ca f3 00 00 call 118790 <== NOT EXECUTED assert(0); 1093c6: 68 9e 47 12 00 push $0x12479e <== NOT EXECUTED 1093cb: 68 34 68 12 00 push $0x126834 <== NOT EXECUTED 1093d0: 6a 67 push $0x67 <== NOT EXECUTED 1093d2: 68 18 67 12 00 push $0x126718 <== NOT EXECUTED 1093d7: e8 98 08 00 00 call 109c74 <__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)", 1093dc: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 1093df: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 1093e2: 68 8c 66 12 00 push $0x12668c <== NOT EXECUTED 1093e7: a1 60 b1 12 00 mov 0x12b160,%eax <== NOT EXECUTED 1093ec: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 1093ef: e8 3c e6 00 00 call 117a30 <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 1093f4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 1093f7: c7 45 08 d5 69 12 00 movl $0x1269d5,0x8(%ebp) <== NOT EXECUTED } 1093fe: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109401: c9 leave <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109402: e9 e9 ff 00 00 jmp 1193f0 <== NOT EXECUTED 109407: 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 ")", 109408: 51 push %ecx 109409: ff 73 50 pushl 0x50(%ebx) 10940c: 68 9b 66 12 00 push $0x12669b 109411: a1 60 b1 12 00 mov 0x12b160,%eax 109416: ff 70 08 pushl 0x8(%eax) 109419: e8 12 e6 00 00 call 117a30 (uint32_t)the_jnode->info.file.size ); #endif break; 10941e: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109421: c7 45 08 d5 69 12 00 movl $0x1269d5,0x8(%ebp) } 109428: 8b 5d fc mov -0x4(%ebp),%ebx 10942b: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 10942c: e9 bf ff 00 00 jmp 1193f0 109431: 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" ); 109434: a1 60 b1 12 00 mov 0x12b160,%eax <== NOT EXECUTED 109439: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10943c: 6a 13 push $0x13 <== NOT EXECUTED 10943e: 6a 01 push $0x1 <== NOT EXECUTED 109440: 68 a7 66 12 00 push $0x1266a7 <== NOT EXECUTED 109445: e8 46 f3 00 00 call 118790 <== NOT EXECUTED assert(0); 10944a: 68 9e 47 12 00 push $0x12479e <== NOT EXECUTED 10944f: 68 34 68 12 00 push $0x126834 <== NOT EXECUTED 109454: 6a 62 push $0x62 <== NOT EXECUTED 109456: 68 18 67 12 00 push $0x126718 <== NOT EXECUTED 10945b: e8 14 08 00 00 call 109c74 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 109460: a1 60 b1 12 00 mov 0x12b160,%eax <== NOT EXECUTED 109465: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109468: 6a 13 push $0x13 <== NOT EXECUTED 10946a: 6a 01 push $0x1 <== NOT EXECUTED 10946c: 68 a7 66 12 00 push $0x1266a7 <== NOT EXECUTED 109471: e8 1a f3 00 00 call 118790 <== NOT EXECUTED assert(0); 109476: 68 9e 47 12 00 push $0x12479e <== NOT EXECUTED 10947b: 68 34 68 12 00 push $0x126834 <== NOT EXECUTED 109480: 6a 5d push $0x5d <== NOT EXECUTED 109482: 68 18 67 12 00 push $0x126718 <== NOT EXECUTED 109487: e8 e8 07 00 00 call 109c74 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 10948c: ff 73 54 pushl 0x54(%ebx) 10948f: ff 73 50 pushl 0x50(%ebx) 109492: 68 79 66 12 00 push $0x126679 109497: a1 60 b1 12 00 mov 0x12b160,%eax 10949c: ff 70 08 pushl 0x8(%eax) 10949f: e8 8c e5 00 00 call 117a30 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 1094a4: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 1094a7: c7 45 08 d5 69 12 00 movl $0x1269d5,0x8(%ebp) } 1094ae: 8b 5d fc mov -0x4(%ebp),%ebx 1094b1: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 1094b2: e9 39 ff 00 00 jmp 1193f0 1094b7: 90 nop <== NOT EXECUTED assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 1094b8: 83 ec 08 sub $0x8,%esp 1094bb: a1 60 b1 12 00 mov 0x12b160,%eax 1094c0: ff 70 08 pushl 0x8(%eax) 1094c3: 6a 2f push $0x2f 1094c5: e8 a2 e5 00 00 call 117a6c break; 1094ca: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 1094cd: c7 45 08 d5 69 12 00 movl $0x1269d5,0x8(%ebp) } 1094d4: 8b 5d fc mov -0x4(%ebp),%ebx 1094d7: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 1094d8: e9 13 ff 00 00 jmp 1193f0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 1094dd: 68 6f 66 12 00 push $0x12666f <== NOT EXECUTED 1094e2: 68 34 68 12 00 push $0x126834 <== NOT EXECUTED 1094e7: 6a 38 push $0x38 <== NOT EXECUTED 1094e9: 68 18 67 12 00 push $0x126718 <== NOT EXECUTED 1094ee: e8 81 07 00 00 call 109c74 <__assert_func> <== NOT EXECUTED 00108cd8 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 108cd8: 55 push %ebp 108cd9: 89 e5 mov %esp,%ebp 108cdb: 57 push %edi 108cdc: 56 push %esi 108cdd: 53 push %ebx 108cde: 83 ec 0c sub $0xc,%esp 108ce1: 8b 7d 0c mov 0xc(%ebp),%edi 108ce4: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *node; int i; node = loc->node_access; 108ce7: 8b 45 08 mov 0x8(%ebp),%eax 108cea: 8b 18 mov (%eax),%ebx if ( node->type != IMFS_SYM_LINK ) 108cec: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 108cf0: 75 36 jne 108d28 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 108cf2: 85 f6 test %esi,%esi 108cf4: 74 2e je 108d24 <== ALWAYS TAKEN 108cf6: 8b 43 50 mov 0x50(%ebx),%eax 108cf9: 8a 10 mov (%eax),%dl 108cfb: 84 d2 test %dl,%dl 108cfd: 74 25 je 108d24 <== ALWAYS TAKEN int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 108cff: 31 c9 xor %ecx,%ecx 108d01: 31 c0 xor %eax,%eax 108d03: eb 0d jmp 108d12 108d05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 108d08: 8b 53 50 mov 0x50(%ebx),%edx 108d0b: 8a 14 02 mov (%edx,%eax,1),%dl 108d0e: 84 d2 test %dl,%dl 108d10: 74 0a je 108d1c buf[i] = node->info.sym_link.name[i]; 108d12: 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++ ) 108d15: 40 inc %eax 108d16: 89 c1 mov %eax,%ecx 108d18: 39 c6 cmp %eax,%esi 108d1a: 77 ec ja 108d08 buf[i] = node->info.sym_link.name[i]; return i; } 108d1c: 83 c4 0c add $0xc,%esp 108d1f: 5b pop %ebx 108d20: 5e pop %esi 108d21: 5f pop %edi 108d22: c9 leave 108d23: 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++ ) 108d24: 31 c0 xor %eax,%eax <== NOT EXECUTED 108d26: eb f4 jmp 108d1c <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 108d28: e8 0f fb 00 00 call 11883c <__errno> <== NOT EXECUTED 108d2d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108d33: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108d38: eb e2 jmp 108d1c <== NOT EXECUTED 00108d3c : 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 */ ) { 108d3c: 55 push %ebp <== NOT EXECUTED 108d3d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108d3f: 53 push %ebx <== NOT EXECUTED 108d40: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 108d43: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 108d46: 8b 18 mov (%eax),%ebx <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 108d48: 6a 20 push $0x20 <== NOT EXECUTED 108d4a: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 108d4d: 8d 43 0c lea 0xc(%ebx),%eax <== NOT EXECUTED 108d50: 50 push %eax <== NOT EXECUTED 108d51: e8 96 06 01 00 call 1193ec <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 108d56: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108d59: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED 108d5c: 85 c9 test %ecx,%ecx <== NOT EXECUTED 108d5e: 74 0c je 108d6c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 108d60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d63: 53 push %ebx <== NOT EXECUTED 108d64: e8 93 4a 00 00 call 10d7fc <_Chain_Extract> <== NOT EXECUTED 108d69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 108d6c: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 108d6f: 8b 00 mov (%eax),%eax <== NOT EXECUTED the_jnode->Parent = new_parent; 108d71: 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 ); 108d74: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108d77: 53 push %ebx <== NOT EXECUTED 108d78: 83 c0 50 add $0x50,%eax <== NOT EXECUTED 108d7b: 50 push %eax <== NOT EXECUTED 108d7c: e8 57 4a 00 00 call 10d7d8 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 108d81: 58 pop %eax <== NOT EXECUTED 108d82: 5a pop %edx <== NOT EXECUTED 108d83: 6a 00 push $0x0 <== NOT EXECUTED 108d85: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 108d88: 50 push %eax <== NOT EXECUTED 108d89: e8 fe 06 00 00 call 10948c <== NOT EXECUTED 108d8e: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 108d91: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED return 0; } 108d94: 31 c0 xor %eax,%eax <== NOT EXECUTED 108d96: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108d99: c9 leave <== NOT EXECUTED 108d9a: c3 ret <== NOT EXECUTED 0010f86c : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 10f86c: 55 push %ebp 10f86d: 89 e5 mov %esp,%ebp 10f86f: 56 push %esi 10f870: 53 push %ebx 10f871: 83 ec 10 sub $0x10,%esp 10f874: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 10f877: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 10f879: 8b 43 08 mov 0x8(%ebx),%eax 10f87c: 85 c0 test %eax,%eax 10f87e: 74 13 je 10f893 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10f880: 83 ec 0c sub $0xc,%esp 10f883: 53 push %ebx 10f884: e8 cb 10 00 00 call 110954 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 10f889: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10f890: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 10f893: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 10f897: 83 ec 08 sub $0x8,%esp 10f89a: 6a 00 push $0x0 10f89c: 8d 45 f0 lea -0x10(%ebp),%eax 10f89f: 50 push %eax 10f8a0: e8 cb 02 00 00 call 10fb70 10f8a5: 8b 45 f0 mov -0x10(%ebp),%eax 10f8a8: 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) ) { 10f8ab: 89 1c 24 mov %ebx,(%esp) 10f8ae: e8 85 03 00 00 call 10fc38 10f8b3: 83 c4 10 add $0x10,%esp 10f8b6: 85 c0 test %eax,%eax 10f8b8: 75 25 jne 10f8df <== ALWAYS TAKEN 10f8ba: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10f8bf: 75 1e jne 10f8df <== ALWAYS TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 10f8c1: a1 18 50 12 00 mov 0x125018,%eax 10f8c6: 8b 50 04 mov 0x4(%eax),%edx 10f8c9: 3b 16 cmp (%esi),%edx 10f8cb: 74 33 je 10f900 <== ALWAYS TAKEN /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 10f8cd: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 10f8d1: 74 15 je 10f8e8 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 10f8d3: 83 ec 0c sub $0xc,%esp 10f8d6: 53 push %ebx 10f8d7: e8 a0 87 ff ff call 10807c 10f8dc: 83 c4 10 add $0x10,%esp } return 0; } 10f8df: 31 c0 xor %eax,%eax 10f8e1: 8d 65 f8 lea -0x8(%ebp),%esp 10f8e4: 5b pop %ebx 10f8e5: 5e pop %esi 10f8e6: c9 leave 10f8e7: c3 ret /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 10f8e8: 8b 43 50 mov 0x50(%ebx),%eax 10f8eb: 85 c0 test %eax,%eax 10f8ed: 74 e4 je 10f8d3 <== ALWAYS TAKEN free( (void*) the_jnode->info.sym_link.name ); 10f8ef: 83 ec 0c sub $0xc,%esp 10f8f2: 50 push %eax 10f8f3: e8 84 87 ff ff call 10807c 10f8f8: 83 c4 10 add $0x10,%esp 10f8fb: eb d6 jmp 10f8d3 10f8fd: 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; 10f900: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 10f907: eb c4 jmp 10f8cd <== NOT EXECUTED 0010f90c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10f90c: 55 push %ebp 10f90d: 89 e5 mov %esp,%ebp 10f90f: 56 push %esi 10f910: 53 push %ebx 10f911: 8b 4d 08 mov 0x8(%ebp),%ecx 10f914: 8b 45 0c mov 0xc(%ebp),%eax IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 10f917: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10f919: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10f91d: 76 15 jbe 10f934 <== NEVER TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10f91f: e8 ac 3d 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10f924: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10f92a: 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; } 10f92f: 5b pop %ebx <== NOT EXECUTED 10f930: 5e pop %esi <== NOT EXECUTED 10f931: c9 leave <== NOT EXECUTED 10f932: c3 ret <== NOT EXECUTED 10f933: 90 nop <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 10f934: 8b 5a 4c mov 0x4c(%edx),%ebx 10f937: ff 24 9d 38 11 12 00 jmp *0x121138(,%ebx,4) 10f93e: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10f940: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED 10f947: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== NOT EXECUTED * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 10f94e: 8b 49 10 mov 0x10(%ecx),%ecx 10f951: 8b 49 34 mov 0x34(%ecx),%ecx 10f954: 8b 09 mov (%ecx),%ecx /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 10f956: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10f95c: 89 48 04 mov %ecx,0x4(%eax) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 10f95f: 8b 4a 30 mov 0x30(%edx),%ecx 10f962: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10f965: 8b 4a 34 mov 0x34(%edx),%ecx 10f968: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10f96c: 8b 4a 38 mov 0x38(%edx),%ecx 10f96f: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10f972: 8b 4a 3c mov 0x3c(%edx),%ecx 10f975: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10f979: 66 8b 4a 3e mov 0x3e(%edx),%cx 10f97d: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10f981: 8b 4a 40 mov 0x40(%edx),%ecx 10f984: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10f987: 8b 4a 44 mov 0x44(%edx),%ecx 10f98a: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10f98d: 8b 52 48 mov 0x48(%edx),%edx 10f990: 89 50 38 mov %edx,0x38(%eax) 10f993: 31 c0 xor %eax,%eax return 0; } 10f995: 5b pop %ebx 10f996: 5e pop %esi 10f997: c9 leave 10f998: c3 ret 10f999: 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 ); 10f99c: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10f99f: 8b 72 50 mov 0x50(%edx),%esi 10f9a2: 89 70 18 mov %esi,0x18(%eax) 10f9a5: 89 58 1c mov %ebx,0x1c(%eax) break; 10f9a8: eb a4 jmp 10f94e 10f9aa: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10f9ac: 8b 5a 50 mov 0x50(%edx),%ebx 10f9af: 8b 72 54 mov 0x54(%edx),%esi 10f9b2: 89 58 20 mov %ebx,0x20(%eax) 10f9b5: 89 70 24 mov %esi,0x24(%eax) break; 10f9b8: eb 94 jmp 10f94e 00108d9c : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 108d9c: 55 push %ebp 108d9d: 89 e5 mov %esp,%ebp 108d9f: 57 push %edi 108da0: 53 push %ebx 108da1: 83 ec 40 sub $0x40,%esp 108da4: 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 ); 108da7: 31 c0 xor %eax,%eax 108da9: b9 ff ff ff ff mov $0xffffffff,%ecx 108dae: 89 d7 mov %edx,%edi 108db0: f2 ae repnz scas %es:(%edi),%al 108db2: f7 d1 not %ecx 108db4: 49 dec %ecx 108db5: 8d 45 f4 lea -0xc(%ebp),%eax 108db8: 50 push %eax 108db9: 8d 5d bf lea -0x41(%ebp),%ebx 108dbc: 53 push %ebx 108dbd: 51 push %ecx 108dbe: 52 push %edx 108dbf: e8 cc b5 00 00 call 114390 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 108dc4: 58 pop %eax 108dc5: ff 75 0c pushl 0xc(%ebp) 108dc8: e8 47 05 01 00 call 119314 108dcd: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 108dd0: 83 c4 10 add $0x10,%esp 108dd3: 85 c0 test %eax,%eax 108dd5: 74 27 je 108dfe <== 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( 108dd7: 83 ec 0c sub $0xc,%esp 108dda: 8d 45 e0 lea -0x20(%ebp),%eax 108ddd: 50 push %eax 108dde: 68 ff a1 00 00 push $0xa1ff 108de3: 53 push %ebx 108de4: 6a 04 push $0x4 108de6: ff 75 08 pushl 0x8(%ebp) 108de9: e8 b6 a9 00 00 call 1137a4 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 108dee: 83 c4 20 add $0x20,%esp 108df1: 85 c0 test %eax,%eax 108df3: 74 1b je 108e10 <== ALWAYS TAKEN 108df5: 31 c0 xor %eax,%eax free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 108df7: 8d 65 f8 lea -0x8(%ebp),%esp 108dfa: 5b pop %ebx 108dfb: 5f pop %edi 108dfc: c9 leave 108dfd: 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); 108dfe: e8 39 fa 00 00 call 11883c <__errno> <== NOT EXECUTED 108e03: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108e09: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108e0e: eb e7 jmp 108df7 <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 108e10: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e13: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 108e16: e8 f5 05 00 00 call 109410 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 108e1b: e8 1c fa 00 00 call 11883c <__errno> <== NOT EXECUTED 108e20: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108e26: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108e2b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108e2e: eb c7 jmp 108df7 <== NOT EXECUTED 00108e30 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 108e30: 55 push %ebp 108e31: 89 e5 mov %esp,%ebp 108e33: 57 push %edi 108e34: 56 push %esi 108e35: 53 push %ebx 108e36: 83 ec 3c sub $0x3c,%esp 108e39: 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; 108e3c: 8b 13 mov (%ebx),%edx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 108e3e: 83 7a 4c 03 cmpl $0x3,0x4c(%edx) 108e42: 74 18 je 108e5c /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 108e44: 83 ec 08 sub $0x8,%esp 108e47: 8b 43 08 mov 0x8(%ebx),%eax 108e4a: 53 push %ebx 108e4b: ff 75 08 pushl 0x8(%ebp) 108e4e: ff 50 34 call *0x34(%eax) return result; 108e51: 83 c4 10 add $0x10,%esp } 108e54: 8d 65 f4 lea -0xc(%ebp),%esp 108e57: 5b pop %ebx 108e58: 5e pop %esi 108e59: 5f pop %edi 108e5a: c9 leave 108e5b: c3 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 108e5c: 8b 42 50 mov 0x50(%edx),%eax 108e5f: 85 c0 test %eax,%eax 108e61: 74 79 je 108edc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 108e63: 8d 7d cc lea -0x34(%ebp),%edi 108e66: b9 05 00 00 00 mov $0x5,%ecx 108e6b: 89 de mov %ebx,%esi 108e6d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 108e6f: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 108e72: 83 ec 0c sub $0xc,%esp 108e75: 8d 75 cc lea -0x34(%ebp),%esi 108e78: 56 push %esi 108e79: 89 55 c4 mov %edx,-0x3c(%ebp) 108e7c: e8 2f aa 00 00 call 1138b0 /* * 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) 108e81: 8b 55 c4 mov -0x3c(%ebp),%edx 108e84: 8b 42 50 mov 0x50(%edx),%eax 108e87: 8b 48 34 mov 0x34(%eax),%ecx 108e8a: 83 c4 10 add $0x10,%esp 108e8d: 66 83 f9 01 cmp $0x1,%cx 108e91: 74 27 je 108eba if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 108e93: 49 dec %ecx 108e94: 66 89 48 34 mov %cx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 108e98: 83 ec 08 sub $0x8,%esp 108e9b: 6a 00 push $0x0 108e9d: 8d 45 e0 lea -0x20(%ebp),%eax 108ea0: 50 push %eax 108ea1: 89 55 c4 mov %edx,-0x3c(%ebp) 108ea4: e8 e3 05 00 00 call 10948c 108ea9: 8b 55 c4 mov -0x3c(%ebp),%edx 108eac: 8b 42 50 mov 0x50(%edx),%eax 108eaf: 8b 55 e0 mov -0x20(%ebp),%edx 108eb2: 89 50 48 mov %edx,0x48(%eax) 108eb5: 83 c4 10 add $0x10,%esp 108eb8: eb 8a jmp 108e44 * 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 ); 108eba: 83 ec 08 sub $0x8,%esp 108ebd: 56 push %esi 108ebe: ff 75 08 pushl 0x8(%ebp) 108ec1: 8b 45 d4 mov -0x2c(%ebp),%eax 108ec4: ff 50 34 call *0x34(%eax) if ( result != 0 ) 108ec7: 83 c4 10 add $0x10,%esp 108eca: 85 c0 test %eax,%eax 108ecc: 0f 84 72 ff ff ff je 108e44 108ed2: b8 ff ff ff ff mov $0xffffffff,%eax 108ed7: e9 78 ff ff ff jmp 108e54 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 108edc: e8 5b f9 00 00 call 11883c <__errno> <== NOT EXECUTED 108ee1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108ee7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108eec: e9 63 ff ff ff jmp 108e54 <== NOT EXECUTED 00108ef4 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 108ef4: 55 push %ebp 108ef5: 89 e5 mov %esp,%ebp 108ef7: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 108efa: 8b 45 08 mov 0x8(%ebp),%eax 108efd: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 108f00: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108f04: 75 12 jne 108f18 <== ALWAYS TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 108f06: 8b 50 5c mov 0x5c(%eax),%edx 108f09: 85 d2 test %edx,%edx 108f0b: 74 1d je 108f2a <== 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; 108f0d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 108f14: 31 c0 xor %eax,%eax return 0; } 108f16: c9 leave 108f17: 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 ); 108f18: e8 1f f9 00 00 call 11883c <__errno> <== NOT EXECUTED 108f1d: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 108f23: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 108f28: c9 leave <== NOT EXECUTED 108f29: 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 */ 108f2a: e8 0d f9 00 00 call 11883c <__errno> <== NOT EXECUTED 108f2f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108f35: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 108f3a: c9 leave <== NOT EXECUTED 108f3b: c3 ret <== NOT EXECUTED 00108220 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 108220: 55 push %ebp 108221: 89 e5 mov %esp,%ebp 108223: 57 push %edi 108224: 56 push %esi 108225: 53 push %ebx 108226: 83 ec 0c sub $0xc,%esp 108229: 8b 5d 08 mov 0x8(%ebp),%ebx 10822c: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 10822f: a1 28 56 12 00 mov 0x125628,%eax 108234: 85 c0 test %eax,%eax 108236: 74 02 je 10823a <== NEVER TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 108238: ff 10 call *(%eax) <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 10823a: e8 79 ff ff ff call 1081b8 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 10823f: a1 2c 56 12 00 mov 0x12562c,%eax 108244: 85 c0 test %eax,%eax 108246: 74 13 je 10825b <== NEVER TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 108248: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10824b: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10824e: 53 push %ebx <== NOT EXECUTED 10824f: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 108251: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 108254: 29 c6 sub %eax,%esi <== NOT EXECUTED 108256: 89 c3 mov %eax,%ebx <== NOT EXECUTED 108258: 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 ( 10825b: 80 3d 25 56 12 00 00 cmpb $0x0,0x125625 108262: 75 1f jne 108283 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 108264: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 10826b: 75 3f jne 1082ac void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 10826d: 6a 04 push $0x4 10826f: 56 push %esi 108270: 53 push %ebx 108271: ff 35 58 31 12 00 pushl 0x123158 108277: e8 f8 41 00 00 call 10c474 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 10827c: 83 c4 10 add $0x10,%esp 10827f: 85 c0 test %eax,%eax 108281: 74 3c je 1082bf <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 108283: 8b 1d 80 72 12 00 mov 0x127280,%ebx 108289: 83 ec 0c sub $0xc,%esp 10828c: ff 35 58 31 12 00 pushl 0x123158 108292: e8 7d 4d 00 00 call 10d014 <_Protected_heap_Get_size> 108297: 8d 1c 18 lea (%eax,%ebx,1),%ebx 10829a: 89 1d 80 72 12 00 mov %ebx,0x127280 1082a0: 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 } 1082a3: 8d 65 f4 lea -0xc(%ebp),%esp 1082a6: 5b pop %ebx 1082a7: 5e pop %esi 1082a8: 5f pop %edi 1082a9: c9 leave 1082aa: c3 ret 1082ab: 90 nop <== NOT EXECUTED if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 1082ac: 31 c0 xor %eax,%eax 1082ae: 89 df mov %ebx,%edi 1082b0: 89 f1 mov %esi,%ecx 1082b2: 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 ) { 1082b4: 80 3d 25 56 12 00 00 cmpb $0x0,0x125625 1082bb: 74 b0 je 10826d <== NEVER TAKEN 1082bd: eb c4 jmp 108283 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 1082bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1082c2: 6a 1a push $0x1a <== NOT EXECUTED 1082c4: e8 73 39 00 00 call 10bc3c <== NOT EXECUTED 0010a3a0 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 10a3a0: 55 push %ebp <== NOT EXECUTED 10a3a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a3a3: 57 push %edi <== NOT EXECUTED 10a3a4: 56 push %esi <== NOT EXECUTED 10a3a5: 53 push %ebx <== NOT EXECUTED 10a3a6: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10a3a9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 10a3ac: 85 db test %ebx,%ebx <== NOT EXECUTED 10a3ae: 0f 84 c5 00 00 00 je 10a479 <== NOT EXECUTED return; if ( !print_handler ) 10a3b4: a1 e0 bf 16 00 mov 0x16bfe0,%eax <== NOT EXECUTED 10a3b9: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10a3bc: 85 c0 test %eax,%eax <== NOT EXECUTED 10a3be: 0f 84 b5 00 00 00 je 10a479 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 10a3c4: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 10a3c7: 0f 84 d7 00 00 00 je 10a4a4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 10a3cd: 8d b3 c4 00 00 00 lea 0xc4(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 10a3d3: 8b 93 d8 00 00 00 mov 0xd8(%ebx),%edx <== NOT EXECUTED 10a3d9: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 10a3dc: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10a3df: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 10a3e2: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 10a3e5: 8b 3e mov (%esi),%edi <== NOT EXECUTED 10a3e7: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 10a3ea: 57 push %edi <== NOT EXECUTED 10a3eb: 50 push %eax <== NOT EXECUTED 10a3ec: e8 77 ff ff ff call 10a368 <== NOT EXECUTED if ( high_water_mark ) 10a3f1: 59 pop %ecx <== NOT EXECUTED 10a3f2: 5a pop %edx <== NOT EXECUTED 10a3f3: 85 c0 test %eax,%eax <== NOT EXECUTED 10a3f5: 0f 84 c9 00 00 00 je 10a4c4 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 10a3fb: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10a3fe: 01 fa add %edi,%edx <== NOT EXECUTED 10a400: 29 c2 sub %eax,%edx <== NOT EXECUTED 10a402: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED else used = 0; if ( the_thread ) { 10a405: 85 db test %ebx,%ebx <== NOT EXECUTED 10a407: 0f 84 c7 00 00 00 je 10a4d4 <== NOT EXECUTED (*print_handler)( 10a40d: 52 push %edx <== NOT EXECUTED 10a40e: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 10a411: 50 push %eax <== NOT EXECUTED 10a412: 6a 05 push $0x5 <== NOT EXECUTED 10a414: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10a417: e8 f4 59 00 00 call 10fe10 <== NOT EXECUTED 10a41c: 50 push %eax <== NOT EXECUTED 10a41d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10a420: 68 67 b0 15 00 push $0x15b067 <== NOT EXECUTED 10a425: ff 35 dc bf 16 00 pushl 0x16bfdc <== NOT EXECUTED 10a42b: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10a42e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 10a431: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10a434: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a437: 57 push %edi <== NOT EXECUTED 10a438: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 10a43b: 8b 16 mov (%esi),%edx <== NOT EXECUTED 10a43d: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 10a441: 52 push %edx <== NOT EXECUTED 10a442: 50 push %eax <== NOT EXECUTED 10a443: 68 82 b0 15 00 push $0x15b082 <== NOT EXECUTED 10a448: ff 35 dc bf 16 00 pushl 0x16bfdc <== NOT EXECUTED 10a44e: ff 15 e0 bf 16 00 call *0x16bfe0 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 10a454: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10a457: 8b 1d d8 bf 16 00 mov 0x16bfd8,%ebx <== NOT EXECUTED 10a45d: 85 db test %ebx,%ebx <== NOT EXECUTED 10a45f: 74 23 je 10a484 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 10a461: 51 push %ecx <== NOT EXECUTED 10a462: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10a465: 68 ad b0 15 00 push $0x15b0ad <== NOT EXECUTED 10a46a: ff 35 dc bf 16 00 pushl 0x16bfdc <== NOT EXECUTED 10a470: ff 15 e0 bf 16 00 call *0x16bfe0 <== NOT EXECUTED 10a476: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 10a479: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a47c: 5b pop %ebx <== NOT EXECUTED 10a47d: 5e pop %esi <== NOT EXECUTED 10a47e: 5f pop %edi <== NOT EXECUTED 10a47f: c9 leave <== NOT EXECUTED 10a480: c3 ret <== NOT EXECUTED 10a481: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 10a484: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a487: 68 a0 b0 15 00 push $0x15b0a0 <== NOT EXECUTED 10a48c: ff 35 dc bf 16 00 pushl 0x16bfdc <== NOT EXECUTED 10a492: ff 15 e0 bf 16 00 call *0x16bfe0 <== NOT EXECUTED 10a498: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 10a49b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a49e: 5b pop %ebx <== NOT EXECUTED 10a49f: 5e pop %esi <== NOT EXECUTED 10a4a0: 5f pop %edi <== NOT EXECUTED 10a4a1: c9 leave <== NOT EXECUTED 10a4a2: c3 ret <== NOT EXECUTED 10a4a3: 90 nop <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 10a4a4: 8b 0d 54 ed 16 00 mov 0x16ed54,%ecx <== NOT EXECUTED 10a4aa: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10a4ac: 74 cb je 10a479 <== NOT EXECUTED 10a4ae: 31 db xor %ebx,%ebx <== NOT EXECUTED 10a4b0: be 50 ed 16 00 mov $0x16ed50,%esi <== NOT EXECUTED 10a4b5: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 10a4bc: e9 1b ff ff ff jmp 10a3dc <== NOT EXECUTED 10a4c1: 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 ) 10a4c4: 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 ) { 10a4cb: 85 db test %ebx,%ebx <== NOT EXECUTED 10a4cd: 0f 85 3a ff ff ff jne 10a40d <== NOT EXECUTED 10a4d3: 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 ); 10a4d4: 50 push %eax <== NOT EXECUTED 10a4d5: 6a ff push $0xffffffff <== NOT EXECUTED 10a4d7: 68 74 b0 15 00 push $0x15b074 <== NOT EXECUTED 10a4dc: ff 35 dc bf 16 00 pushl 0x16bfdc <== NOT EXECUTED 10a4e2: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10a4e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a4e8: e9 44 ff ff ff jmp 10a431 <== NOT EXECUTED 0010a6f8 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 10a6f8: 55 push %ebp 10a6f9: 89 e5 mov %esp,%ebp 10a6fb: 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) 10a6fc: 8b 3d d8 bf 16 00 mov 0x16bfd8,%edi 10a702: 85 ff test %edi,%edi 10a704: 75 4d jne 10a753 10a706: 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 ]; 10a708: 89 c2 mov %eax,%edx 10a70a: 83 e2 03 and $0x3,%edx 10a70d: 8b 14 95 ec b1 15 00 mov 0x15b1ec(,%edx,4),%edx 10a714: 89 14 85 40 ed 16 00 mov %edx,0x16ed40(,%eax,4) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 10a71b: 40 inc %eax 10a71c: 83 f8 04 cmp $0x4,%eax 10a71f: 75 e7 jne 10a708 /* * 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) { 10a721: 8b 15 08 ef 16 00 mov 0x16ef08,%edx 10a727: 85 d2 test %edx,%edx 10a729: 74 1e je 10a749 <== ALWAYS TAKEN 10a72b: 8b 0d c8 ee 16 00 mov 0x16eec8,%ecx 10a731: 85 c9 test %ecx,%ecx 10a733: 74 14 je 10a749 <== ALWAYS TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 10a735: 89 15 54 ed 16 00 mov %edx,0x16ed54 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 10a73b: 29 d1 sub %edx,%ecx 10a73d: 89 0d 50 ed 16 00 mov %ecx,0x16ed50 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 10a743: b0 a5 mov $0xa5,%al 10a745: 89 d7 mov %edx,%edi 10a747: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 10a749: c7 05 d8 bf 16 00 01 movl $0x1,0x16bfd8 10a750: 00 00 00 } 10a753: 5f pop %edi 10a754: c9 leave 10a755: c3 ret 0010a368 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 10a368: 55 push %ebp <== NOT EXECUTED 10a369: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a36b: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 10a36e: 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; 10a371: 8d 41 10 lea 0x10(%ecx),%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 10a374: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 10a377: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 10a37a: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10a37c: 73 1d jae 10a39b <== NOT EXECUTED if (*base != U32_PATTERN) 10a37e: 81 79 10 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x10(%ecx) <== NOT EXECUTED 10a385: 74 0d je 10a394 <== NOT EXECUTED 10a387: eb 14 jmp 10a39d <== NOT EXECUTED 10a389: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10a38c: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 10a392: 75 09 jne 10a39d <== 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++) 10a394: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 10a397: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10a399: 77 f1 ja 10a38c <== NOT EXECUTED 10a39b: 31 c0 xor %eax,%eax <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 10a39d: c9 leave <== NOT EXECUTED 10a39e: c3 ret <== NOT EXECUTED 0010a56c : * * 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) { 10a56c: 55 push %ebp <== NOT EXECUTED 10a56d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a56f: 56 push %esi <== NOT EXECUTED 10a570: 53 push %ebx <== NOT EXECUTED 10a571: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 10a574: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10a577: 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); 10a57a: 8b b3 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 10a580: 68 ca b0 15 00 push $0x15b0ca <== NOT EXECUTED 10a585: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 10a588: e8 2b 29 00 00 call 10ceb8 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 10a58d: 58 pop %eax <== NOT EXECUTED 10a58e: 5a pop %edx <== NOT EXECUTED 10a58f: 53 push %ebx <== NOT EXECUTED 10a590: 68 da b0 15 00 push $0x15b0da <== NOT EXECUTED 10a595: e8 1e 29 00 00 call 10ceb8 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 10a59a: 5a pop %edx <== NOT EXECUTED 10a59b: 59 pop %ecx <== NOT EXECUTED 10a59c: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10a59f: 68 f7 b0 15 00 push $0x15b0f7 <== NOT EXECUTED 10a5a4: e8 0f 29 00 00 call 10ceb8 <== NOT EXECUTED printk( 10a5a9: 59 pop %ecx <== NOT EXECUTED 10a5aa: 58 pop %eax <== NOT EXECUTED 10a5ab: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 10a5ae: 68 09 b1 15 00 push $0x15b109 <== NOT EXECUTED 10a5b3: e8 00 29 00 00 call 10ceb8 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 10a5b8: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10a5bb: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 10a5be: 50 push %eax <== NOT EXECUTED 10a5bf: 6a 20 push $0x20 <== NOT EXECUTED 10a5c1: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10a5c4: e8 47 58 00 00 call 10fe10 <== NOT EXECUTED 10a5c9: 59 pop %ecx <== NOT EXECUTED 10a5ca: 5a pop %edx <== NOT EXECUTED 10a5cb: 50 push %eax <== NOT EXECUTED 10a5cc: 68 1d b1 15 00 push $0x15b11d <== NOT EXECUTED 10a5d1: e8 e2 28 00 00 call 10ceb8 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 10a5d6: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED 10a5dc: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax <== NOT EXECUTED 10a5e2: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 10a5e5: 53 push %ebx <== NOT EXECUTED 10a5e6: 51 push %ecx <== NOT EXECUTED 10a5e7: 50 push %eax <== NOT EXECUTED 10a5e8: 68 80 b1 15 00 push $0x15b180 <== NOT EXECUTED 10a5ed: e8 c6 28 00 00 call 10ceb8 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 10a5f2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10a5f5: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 10a5f8: 84 d2 test %dl,%dl <== NOT EXECUTED 10a5fa: 74 10 je 10a60c <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 10a5fc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a5ff: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 10a604: e8 83 60 00 00 call 11068c <== NOT EXECUTED 10a609: 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); 10a60c: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 10a60f: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 10a612: 56 push %esi <== NOT EXECUTED 10a613: 50 push %eax <== NOT EXECUTED 10a614: 6a 10 push $0x10 <== NOT EXECUTED 10a616: 68 b4 b1 15 00 push $0x15b1b4 <== NOT EXECUTED 10a61b: e8 98 28 00 00 call 10ceb8 <== NOT EXECUTED 10a620: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a623: eb d7 jmp 10a5fc <== NOT EXECUTED 0010bdcc <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10bdcc: 55 push %ebp 10bdcd: 89 e5 mov %esp,%ebp 10bdcf: 53 push %ebx 10bdd0: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bdd3: 8b 1d 58 76 12 00 mov 0x127658,%ebx 10bdd9: 81 fb 5c 76 12 00 cmp $0x12765c,%ebx 10bddf: 74 10 je 10bdf1 <_API_extensions_Run_postdriver+0x25><== ALWAYS TAKEN 10bde1: 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)(); 10bde4: 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 ) { 10bde7: 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 ; 10bde9: 81 fb 5c 76 12 00 cmp $0x12765c,%ebx 10bdef: 75 f3 jne 10bde4 <_API_extensions_Run_postdriver+0x18> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10bdf1: 58 pop %eax 10bdf2: 5b pop %ebx 10bdf3: c9 leave 10bdf4: c3 ret 0010bdf8 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10bdf8: 55 push %ebp 10bdf9: 89 e5 mov %esp,%ebp 10bdfb: 53 push %ebx 10bdfc: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bdff: 8b 1d 58 76 12 00 mov 0x127658,%ebx 10be05: 81 fb 5c 76 12 00 cmp $0x12765c,%ebx 10be0b: 74 1c je 10be29 <_API_extensions_Run_postswitch+0x31><== ALWAYS TAKEN 10be0d: 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 ); 10be10: 83 ec 0c sub $0xc,%esp 10be13: ff 35 b8 74 12 00 pushl 0x1274b8 10be19: 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 ) { 10be1c: 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 ; 10be1e: 83 c4 10 add $0x10,%esp 10be21: 81 fb 5c 76 12 00 cmp $0x12765c,%ebx 10be27: 75 e7 jne 10be10 <_API_extensions_Run_postswitch+0x18> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10be29: 8b 5d fc mov -0x4(%ebp),%ebx 10be2c: c9 leave 10be2d: c3 ret 0010e0a0 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e0a0: 55 push %ebp 10e0a1: 89 e5 mov %esp,%ebp 10e0a3: 57 push %edi 10e0a4: 56 push %esi 10e0a5: 53 push %ebx 10e0a6: 83 ec 1c sub $0x1c,%esp 10e0a9: 8b 5d 08 mov 0x8(%ebp),%ebx 10e0ac: 8b 7d 0c mov 0xc(%ebp),%edi 10e0af: 8b 4d 14 mov 0x14(%ebp),%ecx 10e0b2: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e0b5: 8b 35 f8 a1 12 00 mov 0x12a1f8,%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 ); 10e0bb: 9c pushf 10e0bc: fa cli 10e0bd: 8f 45 e4 popl -0x1c(%ebp) switch ( the_rwlock->current_state ) { 10e0c0: 8b 43 44 mov 0x44(%ebx),%eax 10e0c3: 85 c0 test %eax,%eax 10e0c5: 75 1d jne 10e0e4 <_CORE_RWLock_Obtain_for_reading+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e0c7: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10e0ce: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e0d1: ff 75 e4 pushl -0x1c(%ebp) 10e0d4: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e0d5: 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 */ } 10e0dc: 8d 65 f4 lea -0xc(%ebp),%esp 10e0df: 5b pop %ebx 10e0e0: 5e pop %esi 10e0e1: 5f pop %edi 10e0e2: c9 leave 10e0e3: 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 ) { 10e0e4: 48 dec %eax 10e0e5: 74 51 je 10e138 <_CORE_RWLock_Obtain_for_reading+0x98> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e0e7: 84 d2 test %dl,%dl 10e0e9: 75 15 jne 10e100 <_CORE_RWLock_Obtain_for_reading+0x60> _ISR_Enable( level ); 10e0eb: ff 75 e4 pushl -0x1c(%ebp) 10e0ee: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e0ef: 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 */ } 10e0f6: 8d 65 f4 lea -0xc(%ebp),%esp 10e0f9: 5b pop %ebx 10e0fa: 5e pop %esi 10e0fb: 5f pop %edi 10e0fc: c9 leave 10e0fd: c3 ret 10e0fe: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e100: 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; 10e107: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10e10a: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10e10d: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e114: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10e11b: ff 75 e4 pushl -0x1c(%ebp) 10e11e: 9d popf _Thread_queue_Enqueue_with_handler( 10e11f: c7 45 10 a4 e2 10 00 movl $0x10e2a4,0x10(%ebp) 10e126: 89 4d 0c mov %ecx,0xc(%ebp) 10e129: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e12c: 8d 65 f4 lea -0xc(%ebp),%esp 10e12f: 5b pop %ebx 10e130: 5e pop %esi 10e131: 5f pop %edi 10e132: 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( 10e133: e9 74 19 00 00 jmp 10faac <_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 ); 10e138: 83 ec 0c sub $0xc,%esp 10e13b: 53 push %ebx 10e13c: 88 55 e0 mov %dl,-0x20(%ebp) 10e13f: 89 4d dc mov %ecx,-0x24(%ebp) 10e142: e8 85 1c 00 00 call 10fdcc <_Thread_queue_First> if ( !waiter ) { 10e147: 83 c4 10 add $0x10,%esp 10e14a: 85 c0 test %eax,%eax 10e14c: 8a 55 e0 mov -0x20(%ebp),%dl 10e14f: 8b 4d dc mov -0x24(%ebp),%ecx 10e152: 75 93 jne 10e0e7 <_CORE_RWLock_Obtain_for_reading+0x47><== ALWAYS TAKEN the_rwlock->number_of_readers += 1; 10e154: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e157: ff 75 e4 pushl -0x1c(%ebp) 10e15a: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e15b: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10e162: e9 75 ff ff ff jmp 10e0dc <_CORE_RWLock_Obtain_for_reading+0x3c> 0010e168 <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e168: 55 push %ebp 10e169: 89 e5 mov %esp,%ebp 10e16b: 57 push %edi 10e16c: 56 push %esi 10e16d: 53 push %ebx 10e16e: 83 ec 0c sub $0xc,%esp 10e171: 8b 45 08 mov 0x8(%ebp),%eax 10e174: 8b 7d 0c mov 0xc(%ebp),%edi 10e177: 8b 75 14 mov 0x14(%ebp),%esi 10e17a: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e17d: 8b 15 f8 a1 12 00 mov 0x12a1f8,%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 ); 10e183: 9c pushf 10e184: fa cli 10e185: 59 pop %ecx switch ( the_rwlock->current_state ) { 10e186: 83 78 44 00 cmpl $0x0,0x44(%eax) 10e18a: 75 18 jne 10e1a4 <_CORE_RWLock_Obtain_for_writing+0x3c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e18c: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10e193: 51 push %ecx 10e194: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e195: 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 */ } 10e19c: 83 c4 0c add $0xc,%esp 10e19f: 5b pop %ebx 10e1a0: 5e pop %esi 10e1a1: 5f pop %edi 10e1a2: c9 leave 10e1a3: c3 ret /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e1a4: 84 db test %bl,%bl 10e1a6: 75 14 jne 10e1bc <_CORE_RWLock_Obtain_for_writing+0x54> _ISR_Enable( level ); 10e1a8: 51 push %ecx 10e1a9: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e1aa: 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 */ } 10e1b1: 83 c4 0c add $0xc,%esp 10e1b4: 5b pop %ebx 10e1b5: 5e pop %esi 10e1b6: 5f pop %edi 10e1b7: c9 leave 10e1b8: c3 ret 10e1b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10e1bc: 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; 10e1c3: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10e1c6: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10e1c9: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e1d0: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10e1d7: 51 push %ecx 10e1d8: 9d popf _Thread_queue_Enqueue_with_handler( 10e1d9: c7 45 10 a4 e2 10 00 movl $0x10e2a4,0x10(%ebp) 10e1e0: 89 75 0c mov %esi,0xc(%ebp) 10e1e3: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e1e6: 83 c4 0c add $0xc,%esp 10e1e9: 5b pop %ebx 10e1ea: 5e pop %esi 10e1eb: 5f pop %edi 10e1ec: 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( 10e1ed: e9 ba 18 00 00 jmp 10faac <_Thread_queue_Enqueue_with_handler> 0010e1f4 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10e1f4: 55 push %ebp 10e1f5: 89 e5 mov %esp,%ebp 10e1f7: 53 push %ebx 10e1f8: 83 ec 04 sub $0x4,%esp 10e1fb: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e1fe: 8b 0d f8 a1 12 00 mov 0x12a1f8,%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 ); 10e204: 9c pushf 10e205: fa cli 10e206: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10e207: 8b 43 44 mov 0x44(%ebx),%eax 10e20a: 85 c0 test %eax,%eax 10e20c: 74 7a je 10e288 <_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 ) { 10e20e: 48 dec %eax 10e20f: 74 63 je 10e274 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e211: 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; 10e218: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10e21f: 52 push %edx 10e220: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10e221: 83 ec 0c sub $0xc,%esp 10e224: 53 push %ebx 10e225: e8 66 17 00 00 call 10f990 <_Thread_queue_Dequeue> if ( next ) { 10e22a: 83 c4 10 add $0x10,%esp 10e22d: 85 c0 test %eax,%eax 10e22f: 74 39 je 10e26a <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10e231: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e235: 74 61 je 10e298 <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10e237: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e23a: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10e241: eb 17 jmp 10e25a <_CORE_RWLock_Release+0x66> 10e243: 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 ) 10e244: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e248: 74 20 je 10e26a <_CORE_RWLock_Release+0x76><== ALWAYS TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10e24a: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10e24d: 83 ec 08 sub $0x8,%esp 10e250: 50 push %eax 10e251: 53 push %ebx 10e252: e8 5d 1a 00 00 call 10fcb4 <_Thread_queue_Extract> } 10e257: 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 ); 10e25a: 83 ec 0c sub $0xc,%esp 10e25d: 53 push %ebx 10e25e: e8 69 1b 00 00 call 10fdcc <_Thread_queue_First> if ( !next || 10e263: 83 c4 10 add $0x10,%esp 10e266: 85 c0 test %eax,%eax 10e268: 75 da jne 10e244 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e26a: 31 c0 xor %eax,%eax 10e26c: 8b 5d fc mov -0x4(%ebp),%ebx 10e26f: c9 leave 10e270: c3 ret 10e271: 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; 10e274: 8b 43 48 mov 0x48(%ebx),%eax 10e277: 48 dec %eax 10e278: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10e27b: 85 c0 test %eax,%eax 10e27d: 74 92 je 10e211 <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10e27f: 52 push %edx 10e280: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e281: 31 c0 xor %eax,%eax 10e283: 8b 5d fc mov -0x4(%ebp),%ebx 10e286: c9 leave 10e287: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10e288: 52 push %edx 10e289: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e28a: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e291: 31 c0 xor %eax,%eax 10e293: 8b 5d fc mov -0x4(%ebp),%ebx 10e296: c9 leave 10e297: 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; 10e298: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10e29f: eb c9 jmp 10e26a <_CORE_RWLock_Release+0x76> 0010e2a4 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10e2a4: 55 push %ebp 10e2a5: 89 e5 mov %esp,%ebp 10e2a7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e2aa: 8d 45 f4 lea -0xc(%ebp),%eax 10e2ad: 50 push %eax 10e2ae: ff 75 08 pushl 0x8(%ebp) 10e2b1: e8 e2 12 00 00 call 10f598 <_Thread_Get> switch ( location ) { 10e2b6: 83 c4 10 add $0x10,%esp 10e2b9: 8b 55 f4 mov -0xc(%ebp),%edx 10e2bc: 85 d2 test %edx,%edx 10e2be: 75 17 jne 10e2d7 <_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 ); 10e2c0: 83 ec 0c sub $0xc,%esp 10e2c3: 50 push %eax 10e2c4: e8 d3 1b 00 00 call 10fe9c <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e2c9: a1 38 a1 12 00 mov 0x12a138,%eax 10e2ce: 48 dec %eax 10e2cf: a3 38 a1 12 00 mov %eax,0x12a138 10e2d4: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e2d7: c9 leave 10e2d8: c3 ret 00112b24 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 112b24: 55 push %ebp 112b25: 89 e5 mov %esp,%ebp 112b27: 57 push %edi 112b28: 56 push %esi 112b29: 53 push %ebx 112b2a: 83 ec 1c sub $0x1c,%esp 112b2d: 8b 45 08 mov 0x8(%ebp),%eax 112b30: 8b 5d 0c mov 0xc(%ebp),%ebx 112b33: 8b 75 14 mov 0x14(%ebp),%esi 112b36: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 112b39: 8b 15 b8 74 12 00 mov 0x1274b8,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 112b3f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 112b46: 9c pushf 112b47: fa cli 112b48: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 112b4b: 8b 48 48 mov 0x48(%eax),%ecx 112b4e: 41 inc %ecx 112b4f: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 112b52: 83 78 40 00 cmpl $0x0,0x40(%eax) 112b56: 75 05 jne 112b5d <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 112b58: 3b 48 44 cmp 0x44(%eax),%ecx 112b5b: 74 2b je 112b88 <_CORE_barrier_Wait+0x64> 112b5d: 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; 112b64: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 112b67: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 112b6a: ff 75 e4 pushl -0x1c(%ebp) 112b6d: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 112b6e: c7 45 10 9c dd 10 00 movl $0x10dd9c,0x10(%ebp) 112b75: 89 75 0c mov %esi,0xc(%ebp) 112b78: 89 45 08 mov %eax,0x8(%ebp) } 112b7b: 83 c4 1c add $0x1c,%esp 112b7e: 5b pop %ebx 112b7f: 5e pop %esi 112b80: 5f pop %edi 112b81: 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 ); 112b82: e9 05 af ff ff jmp 10da8c <_Thread_queue_Enqueue_with_handler> 112b87: 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; 112b88: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 112b8f: ff 75 e4 pushl -0x1c(%ebp) 112b92: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 112b93: 89 7d 10 mov %edi,0x10(%ebp) 112b96: 89 5d 0c mov %ebx,0xc(%ebp) 112b99: 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 ); } 112b9c: 83 c4 1c add $0x1c,%esp 112b9f: 5b pop %ebx 112ba0: 5e pop %esi 112ba1: 5f pop %edi 112ba2: 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 ); 112ba3: e9 4c ff ff ff jmp 112af4 <_CORE_barrier_Release> 00119afc <_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 ) { 119afc: 55 push %ebp 119afd: 89 e5 mov %esp,%ebp 119aff: 57 push %edi 119b00: 56 push %esi 119b01: 53 push %ebx 119b02: 83 ec 1c sub $0x1c,%esp 119b05: 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 ) { 119b08: 8b 45 10 mov 0x10(%ebp),%eax 119b0b: 39 43 4c cmp %eax,0x4c(%ebx) 119b0e: 72 60 jb 119b70 <_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 ) { 119b10: 8b 43 48 mov 0x48(%ebx),%eax 119b13: 85 c0 test %eax,%eax 119b15: 75 45 jne 119b5c <_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))) { 119b17: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 119b1e: eb 18 jmp 119b38 <_CORE_message_queue_Broadcast+0x3c> waitp = &the_thread->Wait; number_broadcasted += 1; 119b20: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 119b23: 8b 42 2c mov 0x2c(%edx),%eax 119b26: 89 c7 mov %eax,%edi 119b28: 8b 75 0c mov 0xc(%ebp),%esi 119b2b: 8b 4d 10 mov 0x10(%ebp),%ecx 119b2e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 119b30: 8b 42 28 mov 0x28(%edx),%eax 119b33: 8b 55 10 mov 0x10(%ebp),%edx 119b36: 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))) { 119b38: 83 ec 0c sub $0xc,%esp 119b3b: 53 push %ebx 119b3c: e8 03 25 00 00 call 11c044 <_Thread_queue_Dequeue> 119b41: 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 = 119b43: 83 c4 10 add $0x10,%esp 119b46: 85 c0 test %eax,%eax 119b48: 75 d6 jne 119b20 <_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; 119b4a: 8b 55 e4 mov -0x1c(%ebp),%edx 119b4d: 8b 45 1c mov 0x1c(%ebp),%eax 119b50: 89 10 mov %edx,(%eax) 119b52: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119b54: 8d 65 f4 lea -0xc(%ebp),%esp 119b57: 5b pop %ebx 119b58: 5e pop %esi 119b59: 5f pop %edi 119b5a: c9 leave 119b5b: 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; 119b5c: 8b 55 1c mov 0x1c(%ebp),%edx 119b5f: c7 02 00 00 00 00 movl $0x0,(%edx) 119b65: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119b67: 8d 65 f4 lea -0xc(%ebp),%esp 119b6a: 5b pop %ebx 119b6b: 5e pop %esi 119b6c: 5f pop %edi 119b6d: c9 leave 119b6e: c3 ret 119b6f: 90 nop <== NOT EXECUTED { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 119b70: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119b75: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 119b78: 5b pop %ebx <== NOT EXECUTED 119b79: 5e pop %esi <== NOT EXECUTED 119b7a: 5f pop %edi <== NOT EXECUTED 119b7b: c9 leave <== NOT EXECUTED 119b7c: c3 ret <== NOT EXECUTED 00114c10 <_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 ) { 114c10: 55 push %ebp 114c11: 89 e5 mov %esp,%ebp 114c13: 57 push %edi 114c14: 56 push %esi 114c15: 53 push %ebx 114c16: 83 ec 0c sub $0xc,%esp 114c19: 8b 5d 08 mov 0x8(%ebp),%ebx 114c1c: 8b 75 10 mov 0x10(%ebp),%esi 114c1f: 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; 114c22: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114c25: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114c2c: 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; 114c2f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 114c36: 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)) { 114c3d: a8 03 test $0x3,%al 114c3f: 75 1b jne 114c5c <_CORE_message_queue_Initialize+0x4c> 114c41: 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)); 114c43: 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 * 114c46: 89 f8 mov %edi,%eax 114c48: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114c4b: 39 d0 cmp %edx,%eax 114c4d: 73 25 jae 114c74 <_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; 114c4f: 31 c0 xor %eax,%eax } 114c51: 8d 65 f4 lea -0xc(%ebp),%esp 114c54: 5b pop %ebx 114c55: 5e pop %esi 114c56: 5f pop %edi 114c57: c9 leave 114c58: c3 ret 114c59: 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); 114c5c: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114c5f: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114c62: 39 d0 cmp %edx,%eax 114c64: 77 e9 ja 114c4f <_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)); 114c66: 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 * 114c69: 89 f8 mov %edi,%eax 114c6b: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114c6e: 39 d0 cmp %edx,%eax 114c70: 72 dd jb 114c4f <_CORE_message_queue_Initialize+0x3f><== ALWAYS TAKEN 114c72: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114c74: 83 ec 0c sub $0xc,%esp 114c77: 50 push %eax 114c78: e8 cf 29 00 00 call 11764c <_Workspace_Allocate> 114c7d: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114c80: 83 c4 10 add $0x10,%esp 114c83: 85 c0 test %eax,%eax 114c85: 74 c8 je 114c4f <_CORE_message_queue_Initialize+0x3f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114c87: 57 push %edi 114c88: 56 push %esi 114c89: 50 push %eax 114c8a: 8d 43 68 lea 0x68(%ebx),%eax 114c8d: 50 push %eax 114c8e: e8 d9 4b 00 00 call 11986c <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 114c93: 8d 43 54 lea 0x54(%ebx),%eax 114c96: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 114c99: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 114ca0: 8d 43 50 lea 0x50(%ebx),%eax 114ca3: 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( 114ca6: 6a 06 push $0x6 114ca8: 68 80 00 00 00 push $0x80 114cad: 8b 45 0c mov 0xc(%ebp),%eax 114cb0: 83 38 01 cmpl $0x1,(%eax) 114cb3: 0f 94 c0 sete %al 114cb6: 0f b6 c0 movzbl %al,%eax 114cb9: 50 push %eax 114cba: 53 push %ebx 114cbb: e8 74 1f 00 00 call 116c34 <_Thread_queue_Initialize> 114cc0: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114cc2: 83 c4 20 add $0x20,%esp } 114cc5: 8d 65 f4 lea -0xc(%ebp),%esp 114cc8: 5b pop %ebx 114cc9: 5e pop %esi 114cca: 5f pop %edi 114ccb: c9 leave 114ccc: c3 ret 001109ac <_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 ) { 1109ac: 55 push %ebp 1109ad: 89 e5 mov %esp,%ebp 1109af: 56 push %esi 1109b0: 53 push %ebx 1109b1: 8b 45 08 mov 0x8(%ebp),%eax 1109b4: 8b 55 0c mov 0xc(%ebp),%edx 1109b7: 8b 4d 10 mov 0x10(%ebp),%ecx 1109ba: 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 ) { 1109bd: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx 1109c3: 74 53 je 110a18 <_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 ) { 1109c5: 81 f9 00 00 00 80 cmp $0x80000000,%ecx 1109cb: 74 6f je 110a3c <_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; 1109cd: 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; 1109d0: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 1109d3: 39 f3 cmp %esi,%ebx 1109d5: 74 05 je 1109dc <_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 ) { 1109d7: 3b 4b 08 cmp 0x8(%ebx),%ecx 1109da: 7d 2c jge 110a08 <_CORE_message_queue_Insert_message+0x5c> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 1109dc: 9c pushf 1109dd: fa cli 1109de: 5e pop %esi SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 1109df: ff 40 48 incl 0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 1109e2: 8b 4b 04 mov 0x4(%ebx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 1109e5: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 1109e8: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 1109ea: 89 11 mov %edx,(%ecx) the_node->next = before_node; 1109ec: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 1109ee: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 1109f1: 56 push %esi 1109f2: 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 ) 1109f3: 8b 50 60 mov 0x60(%eax),%edx 1109f6: 85 d2 test %edx,%edx 1109f8: 74 3d je 110a37 <_CORE_message_queue_Insert_message+0x8b> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 1109fa: 8b 40 64 mov 0x64(%eax),%eax 1109fd: 89 45 08 mov %eax,0x8(%ebp) #endif } 110a00: 5b pop %ebx 110a01: 5e pop %esi 110a02: 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); 110a03: ff e2 jmp *%edx 110a05: 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; 110a08: 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 ) ) { 110a0a: 39 f3 cmp %esi,%ebx 110a0c: 74 ce je 1109dc <_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 ) { 110a0e: 3b 4b 08 cmp 0x8(%ebx),%ecx 110a11: 7c c9 jl 1109dc <_CORE_message_queue_Insert_message+0x30> 110a13: eb f3 jmp 110a08 <_CORE_message_queue_Insert_message+0x5c> 110a15: 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 ); 110a18: 9c pushf 110a19: fa cli 110a1a: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110a1b: ff 40 48 incl 0x48(%eax) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 110a1e: 8d 48 54 lea 0x54(%eax),%ecx 110a21: 89 0a mov %ecx,(%edx) old_last_node = the_chain->last; 110a23: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 110a26: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 110a29: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 110a2b: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 110a2e: 53 push %ebx 110a2f: 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 ) 110a30: 8b 50 60 mov 0x60(%eax),%edx 110a33: 85 d2 test %edx,%edx 110a35: 75 c3 jne 1109fa <_CORE_message_queue_Insert_message+0x4e><== ALWAYS TAKEN (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 110a37: 5b pop %ebx 110a38: 5e pop %esi 110a39: c9 leave 110a3a: c3 ret 110a3b: 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 ); 110a3c: 9c pushf 110a3d: fa cli 110a3e: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110a3f: ff 40 48 incl 0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110a42: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 110a45: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 110a48: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 110a4b: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 110a4e: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 110a50: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 110a53: 53 push %ebx 110a54: 9d popf 110a55: eb 9c jmp 1109f3 <_CORE_message_queue_Insert_message+0x47> 00114cd0 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114cd0: 55 push %ebp 114cd1: 89 e5 mov %esp,%ebp 114cd3: 57 push %edi 114cd4: 56 push %esi 114cd5: 53 push %ebx 114cd6: 83 ec 2c sub $0x2c,%esp 114cd9: 8b 55 08 mov 0x8(%ebp),%edx 114cdc: 8b 45 0c mov 0xc(%ebp),%eax 114cdf: 89 45 dc mov %eax,-0x24(%ebp) 114ce2: 8b 4d 10 mov 0x10(%ebp),%ecx 114ce5: 89 4d e0 mov %ecx,-0x20(%ebp) 114ce8: 8b 45 14 mov 0x14(%ebp),%eax 114ceb: 8b 5d 1c mov 0x1c(%ebp),%ebx 114cee: 89 5d d8 mov %ebx,-0x28(%ebp) 114cf1: 0f b6 7d 18 movzbl 0x18(%ebp),%edi ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114cf5: 8b 0d 58 10 13 00 mov 0x131058,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114cfb: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114d02: 9c pushf 114d03: fa cli 114d04: 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)); 114d07: 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; 114d0a: 8d 72 54 lea 0x54(%edx),%esi 114d0d: 39 f3 cmp %esi,%ebx 114d0f: 74 7b je 114d8c <_CORE_message_queue_Seize+0xbc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114d11: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 114d13: 89 4a 50 mov %ecx,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 114d16: 8d 72 50 lea 0x50(%edx),%esi 114d19: 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; 114d1c: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 114d1f: ff 75 e4 pushl -0x1c(%ebp) 114d22: 9d popf *size_p = the_message->Contents.size; 114d23: 8b 4b 0c mov 0xc(%ebx),%ecx 114d26: 89 08 mov %ecx,(%eax) _Thread_Executing->Wait.count = 114d28: 8b 73 08 mov 0x8(%ebx),%esi 114d2b: 8b 0d 58 10 13 00 mov 0x131058,%ecx 114d31: 89 71 24 mov %esi,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 114d34: 8d 4b 10 lea 0x10(%ebx),%ecx 114d37: 89 4d e4 mov %ecx,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114d3a: 8b 08 mov (%eax),%ecx 114d3c: 8b 7d e0 mov -0x20(%ebp),%edi 114d3f: 8b 75 e4 mov -0x1c(%ebp),%esi 114d42: 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 ); 114d44: 83 ec 0c sub $0xc,%esp 114d47: 52 push %edx 114d48: 89 55 d4 mov %edx,-0x2c(%ebp) 114d4b: e8 68 1b 00 00 call 1168b8 <_Thread_queue_Dequeue> if ( !the_thread ) { 114d50: 83 c4 10 add $0x10,%esp 114d53: 85 c0 test %eax,%eax 114d55: 8b 55 d4 mov -0x2c(%ebp),%edx 114d58: 0f 84 86 00 00 00 je 114de4 <_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; 114d5e: 8b 48 24 mov 0x24(%eax),%ecx 114d61: 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; 114d64: 8b 48 30 mov 0x30(%eax),%ecx 114d67: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114d6a: 8b 70 2c mov 0x2c(%eax),%esi 114d6d: 8b 7d e4 mov -0x1c(%ebp),%edi 114d70: 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( 114d72: 8b 43 08 mov 0x8(%ebx),%eax 114d75: 89 45 10 mov %eax,0x10(%ebp) 114d78: 89 5d 0c mov %ebx,0xc(%ebp) 114d7b: 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 ); } 114d7e: 8d 65 f4 lea -0xc(%ebp),%esp 114d81: 5b pop %ebx 114d82: 5e pop %esi 114d83: 5f pop %edi 114d84: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 114d85: e9 22 4b 00 00 jmp 1198ac <_CORE_message_queue_Insert_message> 114d8a: 66 90 xchg %ax,%ax <== NOT EXECUTED return; } #endif } if ( !wait ) { 114d8c: 89 fb mov %edi,%ebx 114d8e: 84 db test %bl,%bl 114d90: 75 16 jne 114da8 <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 114d92: ff 75 e4 pushl -0x1c(%ebp) 114d95: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114d96: 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 ); } 114d9d: 8d 65 f4 lea -0xc(%ebp),%esp 114da0: 5b pop %ebx 114da1: 5e pop %esi 114da2: 5f pop %edi 114da3: c9 leave 114da4: c3 ret 114da5: 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; 114da8: 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; 114daf: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 114db2: 8b 5d dc mov -0x24(%ebp),%ebx 114db5: 89 59 20 mov %ebx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114db8: 8b 5d e0 mov -0x20(%ebp),%ebx 114dbb: 89 59 2c mov %ebx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114dbe: 89 41 28 mov %eax,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114dc1: ff 75 e4 pushl -0x1c(%ebp) 114dc4: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114dc5: c7 45 10 e4 6c 11 00 movl $0x116ce4,0x10(%ebp) 114dcc: 8b 45 d8 mov -0x28(%ebp),%eax 114dcf: 89 45 0c mov %eax,0xc(%ebp) 114dd2: 89 55 08 mov %edx,0x8(%ebp) } 114dd5: 8d 65 f4 lea -0xc(%ebp),%esp 114dd8: 5b pop %ebx 114dd9: 5e pop %esi 114dda: 5f pop %edi 114ddb: 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 ); 114ddc: e9 f3 1b 00 00 jmp 1169d4 <_Thread_queue_Enqueue_with_handler> 114de1: 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 ); 114de4: 89 5d 0c mov %ebx,0xc(%ebp) 114de7: 83 c2 68 add $0x68,%edx 114dea: 89 55 08 mov %edx,0x8(%ebp) } 114ded: 8d 65 f4 lea -0xc(%ebp),%esp 114df0: 5b pop %ebx 114df1: 5e pop %esi 114df2: 5f pop %edi 114df3: c9 leave 114df4: e9 97 fd ff ff jmp 114b90 <_Chain_Append> 0010bf60 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10bf60: 55 push %ebp 10bf61: 89 e5 mov %esp,%ebp 10bf63: 57 push %edi 10bf64: 56 push %esi 10bf65: 53 push %ebx 10bf66: 83 ec 1c sub $0x1c,%esp 10bf69: 8b 5d 08 mov 0x8(%ebp),%ebx 10bf6c: 8b 75 0c mov 0xc(%ebp),%esi 10bf6f: 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 ) { 10bf72: 8b 45 10 mov 0x10(%ebp),%eax 10bf75: 39 43 4c cmp %eax,0x4c(%ebx) 10bf78: 72 2e jb 10bfa8 <_CORE_message_queue_Submit+0x48> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10bf7a: 8b 43 48 mov 0x48(%ebx),%eax 10bf7d: 85 c0 test %eax,%eax 10bf7f: 74 37 je 10bfb8 <_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 ) { 10bf81: 39 43 44 cmp %eax,0x44(%ebx) 10bf84: 0f 87 b6 00 00 00 ja 10c040 <_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 ) { 10bf8a: 84 c9 test %cl,%cl 10bf8c: 0f 84 ea 00 00 00 je 10c07c <_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() ) { 10bf92: a1 94 74 12 00 mov 0x127494,%eax 10bf97: 85 c0 test %eax,%eax 10bf99: 74 5d je 10bff8 <_CORE_message_queue_Submit+0x98> 10bf9b: 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 } 10bfa0: 8d 65 f4 lea -0xc(%ebp),%esp 10bfa3: 5b pop %ebx 10bfa4: 5e pop %esi 10bfa5: 5f pop %edi 10bfa6: c9 leave 10bfa7: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10bfa8: 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 } 10bfad: 8d 65 f4 lea -0xc(%ebp),%esp 10bfb0: 5b pop %ebx 10bfb1: 5e pop %esi 10bfb2: 5f pop %edi 10bfb3: c9 leave 10bfb4: c3 ret 10bfb5: 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 ); 10bfb8: 83 ec 0c sub $0xc,%esp 10bfbb: 53 push %ebx 10bfbc: 88 4d e4 mov %cl,-0x1c(%ebp) 10bfbf: e8 ac 19 00 00 call 10d970 <_Thread_queue_Dequeue> 10bfc4: 89 c2 mov %eax,%edx if ( the_thread ) { 10bfc6: 83 c4 10 add $0x10,%esp 10bfc9: 85 c0 test %eax,%eax 10bfcb: 8a 4d e4 mov -0x1c(%ebp),%cl 10bfce: 0f 84 b8 00 00 00 je 10c08c <_CORE_message_queue_Submit+0x12c> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10bfd4: 8b 40 2c mov 0x2c(%eax),%eax 10bfd7: 89 c7 mov %eax,%edi 10bfd9: 8b 4d 10 mov 0x10(%ebp),%ecx 10bfdc: 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; 10bfde: 8b 42 28 mov 0x28(%edx),%eax 10bfe1: 8b 4d 10 mov 0x10(%ebp),%ecx 10bfe4: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10bfe6: 8b 45 1c mov 0x1c(%ebp),%eax 10bfe9: 89 42 24 mov %eax,0x24(%edx) 10bfec: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bfee: 8d 65 f4 lea -0xc(%ebp),%esp 10bff1: 5b pop %ebx 10bff2: 5e pop %esi 10bff3: 5f pop %edi 10bff4: c9 leave 10bff5: c3 ret 10bff6: 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; 10bff8: a1 b8 74 12 00 mov 0x1274b8,%eax ISR_Level level; _ISR_Disable( level ); 10bffd: 9c pushf 10bffe: fa cli 10bfff: 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; 10c000: 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; 10c007: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10c00a: 8b 55 14 mov 0x14(%ebp),%edx 10c00d: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10c010: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10c013: 8b 55 10 mov 0x10(%ebp),%edx 10c016: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10c019: 8b 55 1c mov 0x1c(%ebp),%edx 10c01c: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10c01f: 51 push %ecx 10c020: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10c021: 50 push %eax 10c022: 68 9c dd 10 00 push $0x10dd9c 10c027: ff 75 24 pushl 0x24(%ebp) 10c02a: 53 push %ebx 10c02b: e8 5c 1a 00 00 call 10da8c <_Thread_queue_Enqueue_with_handler> 10c030: b8 07 00 00 00 mov $0x7,%eax } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10c035: 83 c4 10 add $0x10,%esp #endif } 10c038: 8d 65 f4 lea -0xc(%ebp),%esp 10c03b: 5b pop %ebx 10c03c: 5e pop %esi 10c03d: 5f pop %edi 10c03e: c9 leave 10c03f: 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 *) 10c040: 83 ec 0c sub $0xc,%esp 10c043: 8d 43 68 lea 0x68(%ebx),%eax 10c046: 50 push %eax 10c047: e8 f0 fe ff ff call 10bf3c <_Chain_Get> 10c04c: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c04e: 8d 40 10 lea 0x10(%eax),%eax 10c051: 89 c7 mov %eax,%edi 10c053: 8b 4d 10 mov 0x10(%ebp),%ecx 10c056: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10c058: 8b 4d 10 mov 0x10(%ebp),%ecx 10c05b: 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; 10c05e: 8b 45 1c mov 0x1c(%ebp),%eax 10c061: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c064: 83 c4 0c add $0xc,%esp 10c067: 50 push %eax 10c068: 52 push %edx 10c069: 53 push %ebx 10c06a: e8 3d 49 00 00 call 1109ac <_CORE_message_queue_Insert_message> 10c06f: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c071: 83 c4 10 add $0x10,%esp 10c074: e9 34 ff ff ff jmp 10bfad <_CORE_message_queue_Submit+0x4d> 10c079: 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 ) { 10c07c: 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 } 10c081: 8d 65 f4 lea -0xc(%ebp),%esp 10c084: 5b pop %ebx 10c085: 5e pop %esi 10c086: 5f pop %edi 10c087: c9 leave 10c088: c3 ret 10c089: 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 ) { 10c08c: 8b 43 48 mov 0x48(%ebx),%eax 10c08f: e9 ed fe ff ff jmp 10bf81 <_CORE_message_queue_Submit+0x21> 0010c0a0 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c0a0: 55 push %ebp 10c0a1: 89 e5 mov %esp,%ebp 10c0a3: 57 push %edi 10c0a4: 56 push %esi 10c0a5: 53 push %ebx 10c0a6: 83 ec 0c sub $0xc,%esp 10c0a9: 8b 45 08 mov 0x8(%ebp),%eax 10c0ac: 8b 5d 0c mov 0xc(%ebp),%ebx 10c0af: 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; 10c0b2: 8d 78 40 lea 0x40(%eax),%edi 10c0b5: b9 04 00 00 00 mov $0x4,%ecx 10c0ba: 89 de mov %ebx,%esi 10c0bc: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c0be: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c0c1: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c0c8: 85 d2 test %edx,%edx 10c0ca: 75 30 jne 10c0fc <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c0cc: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c0d3: 8b 15 b8 74 12 00 mov 0x1274b8,%edx 10c0d9: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c0dc: 8b 4a 08 mov 0x8(%edx),%ecx 10c0df: 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; 10c0e2: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c0e5: 83 f9 02 cmp $0x2,%ecx 10c0e8: 74 05 je 10c0ef <_CORE_mutex_Initialize+0x4f> 10c0ea: 83 f9 03 cmp $0x3,%ecx 10c0ed: 75 22 jne 10c111 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c0ef: 8b 4a 14 mov 0x14(%edx),%ecx 10c0f2: 3b 48 4c cmp 0x4c(%eax),%ecx 10c0f5: 72 41 jb 10c138 <_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++; 10c0f7: ff 42 1c incl 0x1c(%edx) 10c0fa: eb 15 jmp 10c111 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c0fc: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c103: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c10a: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c111: 6a 05 push $0x5 10c113: 68 00 04 00 00 push $0x400 10c118: 31 d2 xor %edx,%edx 10c11a: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c11e: 0f 95 c2 setne %dl 10c121: 52 push %edx 10c122: 50 push %eax 10c123: e8 c4 1b 00 00 call 10dcec <_Thread_queue_Initialize> 10c128: 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; 10c12a: 83 c4 10 add $0x10,%esp } 10c12d: 8d 65 f4 lea -0xc(%ebp),%esp 10c130: 5b pop %ebx 10c131: 5e pop %esi 10c132: 5f pop %edi 10c133: c9 leave 10c134: c3 ret 10c135: 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 ) 10c138: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c13d: 8d 65 f4 lea -0xc(%ebp),%esp 10c140: 5b pop %ebx 10c141: 5e pop %esi 10c142: 5f pop %edi 10c143: c9 leave 10c144: c3 ret 0010c198 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c198: 55 push %ebp 10c199: 89 e5 mov %esp,%ebp 10c19b: 53 push %ebx 10c19c: 83 ec 14 sub $0x14,%esp 10c19f: 8b 5d 08 mov 0x8(%ebp),%ebx 10c1a2: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c1a5: a1 f8 73 12 00 mov 0x1273f8,%eax 10c1aa: 85 c0 test %eax,%eax 10c1ac: 74 04 je 10c1b2 <_CORE_mutex_Seize+0x1a> 10c1ae: 84 d2 test %dl,%dl 10c1b0: 75 36 jne 10c1e8 <_CORE_mutex_Seize+0x50><== NEVER TAKEN 10c1b2: 83 ec 08 sub $0x8,%esp 10c1b5: 8d 45 18 lea 0x18(%ebp),%eax 10c1b8: 50 push %eax 10c1b9: 53 push %ebx 10c1ba: 88 55 f4 mov %dl,-0xc(%ebp) 10c1bd: e8 96 48 00 00 call 110a58 <_CORE_mutex_Seize_interrupt_trylock> 10c1c2: 83 c4 10 add $0x10,%esp 10c1c5: 85 c0 test %eax,%eax 10c1c7: 8a 55 f4 mov -0xc(%ebp),%dl 10c1ca: 74 14 je 10c1e0 <_CORE_mutex_Seize+0x48> 10c1cc: 84 d2 test %dl,%dl 10c1ce: 75 30 jne 10c200 <_CORE_mutex_Seize+0x68> 10c1d0: ff 75 18 pushl 0x18(%ebp) 10c1d3: 9d popf 10c1d4: a1 b8 74 12 00 mov 0x1274b8,%eax 10c1d9: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c1e0: 8b 5d fc mov -0x4(%ebp),%ebx 10c1e3: c9 leave 10c1e4: c3 ret 10c1e5: 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 ); 10c1e8: 83 3d c0 75 12 00 01 cmpl $0x1,0x1275c0 10c1ef: 76 c1 jbe 10c1b2 <_CORE_mutex_Seize+0x1a> 10c1f1: 53 push %ebx 10c1f2: 6a 13 push $0x13 10c1f4: 6a 00 push $0x0 10c1f6: 6a 00 push $0x0 10c1f8: e8 9b 05 00 00 call 10c798 <_Internal_error_Occurred> 10c1fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c200: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c207: a1 b8 74 12 00 mov 0x1274b8,%eax 10c20c: 89 58 44 mov %ebx,0x44(%eax) 10c20f: 8b 55 0c mov 0xc(%ebp),%edx 10c212: 89 50 20 mov %edx,0x20(%eax) 10c215: a1 f8 73 12 00 mov 0x1273f8,%eax 10c21a: 40 inc %eax 10c21b: a3 f8 73 12 00 mov %eax,0x1273f8 10c220: ff 75 18 pushl 0x18(%ebp) 10c223: 9d popf 10c224: 83 ec 08 sub $0x8,%esp 10c227: ff 75 14 pushl 0x14(%ebp) 10c22a: 53 push %ebx 10c22b: e8 18 ff ff ff call 10c148 <_CORE_mutex_Seize_interrupt_blocking> 10c230: 83 c4 10 add $0x10,%esp } 10c233: 8b 5d fc mov -0x4(%ebp),%ebx 10c236: c9 leave 10c237: c3 ret 00110a58 <_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 ) { 110a58: 55 push %ebp 110a59: 89 e5 mov %esp,%ebp 110a5b: 56 push %esi 110a5c: 53 push %ebx 110a5d: 8b 45 08 mov 0x8(%ebp),%eax 110a60: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 110a63: 8b 15 b8 74 12 00 mov 0x1274b8,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 110a69: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110a70: 8b 58 50 mov 0x50(%eax),%ebx 110a73: 85 db test %ebx,%ebx 110a75: 74 31 je 110aa8 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 110a77: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 110a7e: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110a81: 8b 5a 08 mov 0x8(%edx),%ebx 110a84: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 110a87: 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; 110a8e: 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 ) || 110a91: 83 fb 02 cmp $0x2,%ebx 110a94: 74 26 je 110abc <_CORE_mutex_Seize_interrupt_trylock+0x64> 110a96: 83 fb 03 cmp $0x3,%ebx 110a99: 74 3d je 110ad8 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 110a9b: ff 31 pushl (%ecx) 110a9d: 9d popf 110a9e: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 110aa0: 8d 65 f8 lea -0x8(%ebp),%esp 110aa3: 5b pop %ebx 110aa4: 5e pop %esi 110aa5: c9 leave 110aa6: c3 ret 110aa7: 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 ) ) { 110aa8: 3b 50 5c cmp 0x5c(%eax),%edx 110aab: 74 17 je 110ac4 <_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 ); 110aad: b8 01 00 00 00 mov $0x1,%eax 110ab2: 8d 65 f8 lea -0x8(%ebp),%esp 110ab5: 5b pop %ebx 110ab6: 5e pop %esi 110ab7: c9 leave 110ab8: c3 ret 110ab9: 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++; 110abc: ff 42 1c incl 0x1c(%edx) 110abf: eb da jmp 110a9b <_CORE_mutex_Seize_interrupt_trylock+0x43> 110ac1: 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 ) { 110ac4: 8b 58 40 mov 0x40(%eax),%ebx 110ac7: 85 db test %ebx,%ebx 110ac9: 75 45 jne 110b10 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 110acb: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 110ace: ff 31 pushl (%ecx) 110ad0: 9d popf 110ad1: 31 c0 xor %eax,%eax 110ad3: eb dd jmp 110ab2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110ad5: 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++; 110ad8: 8b 5a 1c mov 0x1c(%edx),%ebx 110adb: 8d 73 01 lea 0x1(%ebx),%esi 110ade: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 110ae1: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 110ae4: 39 70 4c cmp %esi,0x4c(%eax) 110ae7: 74 6b je 110b54 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 110ae9: 72 39 jb 110b24 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 110aeb: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 110af2: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 110af9: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 110b00: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 110b03: ff 31 pushl (%ecx) 110b05: 9d popf 110b06: 31 c0 xor %eax,%eax 110b08: 8d 65 f8 lea -0x8(%ebp),%esp 110b0b: 5b pop %ebx 110b0c: 5e pop %esi 110b0d: c9 leave 110b0e: c3 ret 110b0f: 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 ) { 110b10: 4b dec %ebx 110b11: 75 9a jne 110aad <_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; 110b13: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _ISR_Enable( *level_p ); 110b1a: ff 31 pushl (%ecx) 110b1c: 9d popf 110b1d: 31 c0 xor %eax,%eax 110b1f: eb 91 jmp 110ab2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110b21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110b24: 8b 15 f8 73 12 00 mov 0x1273f8,%edx 110b2a: 42 inc %edx 110b2b: 89 15 f8 73 12 00 mov %edx,0x1273f8 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 110b31: ff 31 pushl (%ecx) 110b33: 9d popf _Thread_Change_priority( 110b34: 52 push %edx 110b35: 6a 00 push $0x0 110b37: ff 70 4c pushl 0x4c(%eax) 110b3a: ff 70 5c pushl 0x5c(%eax) 110b3d: e8 2a c5 ff ff call 10d06c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 110b42: e8 0d ca ff ff call 10d554 <_Thread_Enable_dispatch> 110b47: 31 c0 xor %eax,%eax 110b49: 83 c4 10 add $0x10,%esp 110b4c: e9 61 ff ff ff jmp 110ab2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110b51: 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 ); 110b54: ff 31 pushl (%ecx) 110b56: 9d popf 110b57: 31 c0 xor %eax,%eax 110b59: e9 54 ff ff ff jmp 110ab2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 0010c238 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c238: 55 push %ebp 10c239: 89 e5 mov %esp,%ebp 10c23b: 53 push %ebx 10c23c: 83 ec 04 sub $0x4,%esp 10c23f: 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; 10c242: 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 ) { 10c245: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c249: 74 15 je 10c260 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c24b: 3b 05 b8 74 12 00 cmp 0x1274b8,%eax 10c251: 74 0d je 10c260 <_CORE_mutex_Surrender+0x28> 10c253: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c258: 8b 5d fc mov -0x4(%ebp),%ebx 10c25b: c9 leave 10c25c: c3 ret 10c25d: 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 ) 10c260: 8b 53 54 mov 0x54(%ebx),%edx 10c263: 85 d2 test %edx,%edx 10c265: 74 65 je 10c2cc <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c267: 4a dec %edx 10c268: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c26b: 85 d2 test %edx,%edx 10c26d: 75 5d jne 10c2cc <_CORE_mutex_Surrender+0x94> 10c26f: 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 ) || 10c272: 83 fa 02 cmp $0x2,%edx 10c275: 0f 84 99 00 00 00 je 10c314 <_CORE_mutex_Surrender+0xdc> 10c27b: 83 fa 03 cmp $0x3,%edx 10c27e: 0f 84 90 00 00 00 je 10c314 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c284: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c28b: 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 ) || 10c292: 83 fa 02 cmp $0x2,%edx 10c295: 74 5d je 10c2f4 <_CORE_mutex_Surrender+0xbc> 10c297: 83 fa 03 cmp $0x3,%edx 10c29a: 74 58 je 10c2f4 <_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 ) ) ) { 10c29c: 83 ec 0c sub $0xc,%esp 10c29f: 53 push %ebx 10c2a0: e8 cb 16 00 00 call 10d970 <_Thread_queue_Dequeue> 10c2a5: 83 c4 10 add $0x10,%esp 10c2a8: 85 c0 test %eax,%eax 10c2aa: 74 7c je 10c328 <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c2ac: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c2af: 8b 50 08 mov 0x8(%eax),%edx 10c2b2: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c2b5: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c2bc: 8b 53 48 mov 0x48(%ebx),%edx 10c2bf: 83 fa 02 cmp $0x2,%edx 10c2c2: 74 58 je 10c31c <_CORE_mutex_Surrender+0xe4> 10c2c4: 83 fa 03 cmp $0x3,%edx 10c2c7: 74 0b je 10c2d4 <_CORE_mutex_Surrender+0x9c> 10c2c9: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c2cc: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c2ce: 8b 5d fc mov -0x4(%ebp),%ebx 10c2d1: c9 leave 10c2d2: c3 ret 10c2d3: 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++; 10c2d4: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c2d7: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c2da: 3b 50 14 cmp 0x14(%eax),%edx 10c2dd: 73 ed jae 10c2cc <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c2df: 51 push %ecx 10c2e0: 6a 00 push $0x0 10c2e2: 52 push %edx 10c2e3: 50 push %eax 10c2e4: e8 83 0d 00 00 call 10d06c <_Thread_Change_priority> 10c2e9: 31 c0 xor %eax,%eax 10c2eb: 83 c4 10 add $0x10,%esp 10c2ee: e9 65 ff ff ff jmp 10c258 <_CORE_mutex_Surrender+0x20> 10c2f3: 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 && 10c2f4: 8b 50 1c mov 0x1c(%eax),%edx 10c2f7: 85 d2 test %edx,%edx 10c2f9: 75 a1 jne 10c29c <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c2fb: 8b 50 18 mov 0x18(%eax),%edx 10c2fe: 3b 50 14 cmp 0x14(%eax),%edx 10c301: 74 99 je 10c29c <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c303: 51 push %ecx 10c304: 6a 01 push $0x1 10c306: 52 push %edx 10c307: 50 push %eax 10c308: e8 5f 0d 00 00 call 10d06c <_Thread_Change_priority> 10c30d: 83 c4 10 add $0x10,%esp 10c310: eb 8a jmp 10c29c <_CORE_mutex_Surrender+0x64> 10c312: 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--; 10c314: ff 48 1c decl 0x1c(%eax) 10c317: e9 68 ff ff ff jmp 10c284 <_CORE_mutex_Surrender+0x4c> 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++; 10c31c: ff 40 1c incl 0x1c(%eax) 10c31f: 31 c0 xor %eax,%eax break; 10c321: e9 32 ff ff ff jmp 10c258 <_CORE_mutex_Surrender+0x20> 10c326: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c328: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c32f: 31 c0 xor %eax,%eax 10c331: e9 22 ff ff ff jmp 10c258 <_CORE_mutex_Surrender+0x20> 0011492c <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 11492c: 55 push %ebp 11492d: 89 e5 mov %esp,%ebp 11492f: 57 push %edi 114930: 56 push %esi 114931: 53 push %ebx 114932: 83 ec 1c sub $0x1c,%esp 114935: 8b 45 08 mov 0x8(%ebp),%eax 114938: 8b 7d 0c mov 0xc(%ebp),%edi 11493b: 8b 75 14 mov 0x14(%ebp),%esi 11493e: 8a 5d 10 mov 0x10(%ebp),%bl Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 114941: 8b 15 58 d1 12 00 mov 0x12d158,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 114947: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 11494e: 9c pushf 11494f: fa cli 114950: 8f 45 e4 popl -0x1c(%ebp) if ( the_semaphore->count != 0 ) { 114953: 8b 48 48 mov 0x48(%eax),%ecx 114956: 85 c9 test %ecx,%ecx 114958: 75 46 jne 1149a0 <_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 ) { 11495a: 84 db test %bl,%bl 11495c: 75 16 jne 114974 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 11495e: ff 75 e4 pushl -0x1c(%ebp) 114961: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 114962: 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 ); } 114969: 83 c4 1c add $0x1c,%esp 11496c: 5b pop %ebx 11496d: 5e pop %esi 11496e: 5f pop %edi 11496f: c9 leave 114970: c3 ret 114971: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 114974: 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; 11497b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 11497e: 89 7a 20 mov %edi,0x20(%edx) _ISR_Enable( level ); 114981: ff 75 e4 pushl -0x1c(%ebp) 114984: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 114985: c7 45 10 a4 15 11 00 movl $0x1115a4,0x10(%ebp) 11498c: 89 75 0c mov %esi,0xc(%ebp) 11498f: 89 45 08 mov %eax,0x8(%ebp) } 114992: 83 c4 1c add $0x1c,%esp 114995: 5b pop %ebx 114996: 5e pop %esi 114997: 5f pop %edi 114998: 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 ); 114999: e9 f6 c8 ff ff jmp 111294 <_Thread_queue_Enqueue_with_handler> 11499e: 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; 1149a0: 49 dec %ecx 1149a1: 89 48 48 mov %ecx,0x48(%eax) _ISR_Enable( level ); 1149a4: ff 75 e4 pushl -0x1c(%ebp) 1149a7: 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 ); } 1149a8: 83 c4 1c add $0x1c,%esp 1149ab: 5b pop %ebx 1149ac: 5e pop %esi 1149ad: 5f pop %edi 1149ae: c9 leave 1149af: c3 ret 0010c384 <_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 ) { 10c384: 55 push %ebp 10c385: 89 e5 mov %esp,%ebp 10c387: 53 push %ebx 10c388: 83 ec 10 sub $0x10,%esp 10c38b: 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)) ) { 10c38e: 53 push %ebx 10c38f: e8 dc 15 00 00 call 10d970 <_Thread_queue_Dequeue> 10c394: 83 c4 10 add $0x10,%esp 10c397: 85 c0 test %eax,%eax 10c399: 74 09 je 10c3a4 <_CORE_semaphore_Surrender+0x20> 10c39b: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c39d: 8b 5d fc mov -0x4(%ebp),%ebx 10c3a0: c9 leave 10c3a1: c3 ret 10c3a2: 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 ); 10c3a4: 9c pushf 10c3a5: fa cli 10c3a6: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c3a7: 8b 43 48 mov 0x48(%ebx),%eax 10c3aa: 3b 43 40 cmp 0x40(%ebx),%eax 10c3ad: 72 0d jb 10c3bc <_CORE_semaphore_Surrender+0x38><== NEVER TAKEN 10c3af: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10c3b4: 52 push %edx 10c3b5: 9d popf } return status; } 10c3b6: 8b 5d fc mov -0x4(%ebp),%ebx 10c3b9: c9 leave 10c3ba: c3 ret 10c3bb: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c3bc: 40 inc %eax 10c3bd: 89 43 48 mov %eax,0x48(%ebx) 10c3c0: 31 c0 xor %eax,%eax 10c3c2: eb f0 jmp 10c3b4 <_CORE_semaphore_Surrender+0x30> 0010cd34 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10cd34: 55 push %ebp 10cd35: 89 e5 mov %esp,%ebp 10cd37: 53 push %ebx 10cd38: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10cd3b: 9c pushf 10cd3c: fa cli 10cd3d: 59 pop %ecx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cd3e: 8b 50 04 mov 0x4(%eax),%edx 10cd41: 85 d2 test %edx,%edx 10cd43: 75 0b jne 10cd50 <_CORE_spinlock_Release+0x1c> _ISR_Enable( level ); 10cd45: 51 push %ecx 10cd46: 9d popf 10cd47: 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; } 10cd4c: 5b pop %ebx 10cd4d: c9 leave 10cd4e: c3 ret 10cd4f: 90 nop <== NOT EXECUTED } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10cd50: 8b 58 0c mov 0xc(%eax),%ebx 10cd53: 8b 15 18 87 12 00 mov 0x128718,%edx 10cd59: 3b 5a 08 cmp 0x8(%edx),%ebx 10cd5c: 74 0a je 10cd68 <_CORE_spinlock_Release+0x34> _ISR_Enable( level ); 10cd5e: 51 push %ecx 10cd5f: 9d popf 10cd60: 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; } 10cd65: 5b pop %ebx 10cd66: c9 leave 10cd67: c3 ret } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10cd68: 8b 50 08 mov 0x8(%eax),%edx 10cd6b: 4a dec %edx 10cd6c: 89 50 08 mov %edx,0x8(%eax) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10cd6f: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_spinlock->holder = 0; 10cd76: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _ISR_Enable( level ); 10cd7d: 51 push %ecx 10cd7e: 9d popf 10cd7f: 31 c0 xor %eax,%eax return CORE_SPINLOCK_SUCCESSFUL; 10cd81: eb c9 jmp 10cd4c <_CORE_spinlock_Release+0x18> 0010cd84 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10cd84: 55 push %ebp 10cd85: 89 e5 mov %esp,%ebp 10cd87: 56 push %esi 10cd88: 53 push %ebx 10cd89: 8b 5d 08 mov 0x8(%ebp),%ebx 10cd8c: 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 ); 10cd8f: 9c pushf 10cd90: fa cli 10cd91: 58 pop %eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10cd92: 8b 53 04 mov 0x4(%ebx),%edx 10cd95: 4a dec %edx 10cd96: 74 60 je 10cdf8 <_CORE_spinlock_Wait+0x74> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10cd98: 8b 53 08 mov 0x8(%ebx),%edx 10cd9b: 42 inc %edx 10cd9c: 89 53 08 mov %edx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cd9f: 8b 53 04 mov 0x4(%ebx),%edx 10cda2: 85 d2 test %edx,%edx 10cda4: 74 22 je 10cdc8 <_CORE_spinlock_Wait+0x44> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10cda6: 84 c9 test %cl,%cl 10cda8: 74 39 je 10cde3 <_CORE_spinlock_Wait+0x5f> 10cdaa: 66 90 xchg %ax,%ax * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10cdac: 50 push %eax 10cdad: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10cdae: e8 ed 11 00 00 call 10dfa0 <_Thread_Enable_dispatch> 10cdb3: a1 58 86 12 00 mov 0x128658,%eax 10cdb8: 40 inc %eax 10cdb9: a3 58 86 12 00 mov %eax,0x128658 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10cdbe: 9c pushf 10cdbf: fa cli 10cdc0: 58 pop %eax _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cdc1: 8b 53 04 mov 0x4(%ebx),%edx 10cdc4: 85 d2 test %edx,%edx 10cdc6: 75 e4 jne 10cdac <_CORE_spinlock_Wait+0x28> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10cdc8: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10cdcf: 8b 15 18 87 12 00 mov 0x128718,%edx 10cdd5: 8b 52 08 mov 0x8(%edx),%edx 10cdd8: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10cddb: 50 push %eax 10cddc: 9d popf 10cddd: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10cddf: 5b pop %ebx 10cde0: 5e pop %esi 10cde1: c9 leave 10cde2: c3 ret /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 10cde3: 8b 53 08 mov 0x8(%ebx),%edx 10cde6: 4a dec %edx 10cde7: 89 53 08 mov %edx,0x8(%ebx) _ISR_Enable( level ); 10cdea: 50 push %eax 10cdeb: 9d popf 10cdec: b8 05 00 00 00 mov $0x5,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10cdf1: 5b pop %ebx 10cdf2: 5e pop %esi 10cdf3: c9 leave 10cdf4: c3 ret 10cdf5: 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) ) { 10cdf8: 8b 73 0c mov 0xc(%ebx),%esi 10cdfb: 8b 15 18 87 12 00 mov 0x128718,%edx 10ce01: 3b 72 08 cmp 0x8(%edx),%esi 10ce04: 75 92 jne 10cd98 <_CORE_spinlock_Wait+0x14> _ISR_Enable( level ); 10ce06: 50 push %eax 10ce07: 9d popf 10ce08: b8 01 00 00 00 mov $0x1,%eax return CORE_SPINLOCK_HOLDER_RELOCKING; 10ce0d: eb d0 jmp 10cddf <_CORE_spinlock_Wait+0x5b> 0010bf3c <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10bf3c: 55 push %ebp 10bf3d: 89 e5 mov %esp,%ebp 10bf3f: 53 push %ebx 10bf40: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10bf43: 9c pushf 10bf44: fa cli 10bf45: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10bf46: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bf48: 8d 4a 04 lea 0x4(%edx),%ecx 10bf4b: 39 c8 cmp %ecx,%eax 10bf4d: 74 0d je 10bf5c <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10bf4f: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10bf51: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10bf53: 89 51 04 mov %edx,0x4(%ecx) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10bf56: 53 push %ebx 10bf57: 9d popf return return_node; } 10bf58: 5b pop %ebx 10bf59: c9 leave 10bf5a: c3 ret 10bf5b: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bf5c: 31 c0 xor %eax,%eax 10bf5e: eb f6 jmp 10bf56 <_Chain_Get+0x1a> 0011096c <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 11096c: 55 push %ebp 11096d: 89 e5 mov %esp,%ebp 11096f: 57 push %edi 110970: 56 push %esi 110971: 53 push %ebx 110972: 8b 7d 08 mov 0x8(%ebp),%edi 110975: 8b 4d 10 mov 0x10(%ebp),%ecx 110978: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 11097b: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 11097d: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 110984: 85 c9 test %ecx,%ecx 110986: 74 17 je 11099f <_Chain_Initialize+0x33><== ALWAYS TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 110988: 8b 45 0c mov 0xc(%ebp),%eax 11098b: eb 05 jmp 110992 <_Chain_Initialize+0x26> 11098d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED while ( count-- ) { 110990: 89 d8 mov %ebx,%eax current->next = next; 110992: 89 02 mov %eax,(%edx) next->previous = current; 110994: 89 50 04 mov %edx,0x4(%eax) 110997: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 11099a: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 11099c: 49 dec %ecx 11099d: 75 f1 jne 110990 <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 11099f: 8d 47 04 lea 0x4(%edi),%eax 1109a2: 89 02 mov %eax,(%edx) the_chain->last = current; 1109a4: 89 57 08 mov %edx,0x8(%edi) } 1109a7: 5b pop %ebx 1109a8: 5e pop %esi 1109a9: 5f pop %edi 1109aa: c9 leave 1109ab: c3 ret 0010afc4 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10afc4: 55 push %ebp 10afc5: 89 e5 mov %esp,%ebp 10afc7: 57 push %edi 10afc8: 56 push %esi 10afc9: 53 push %ebx 10afca: 83 ec 2c sub $0x2c,%esp 10afcd: 8b 45 08 mov 0x8(%ebp),%eax 10afd0: 8b 4d 0c mov 0xc(%ebp),%ecx 10afd3: 8b 55 10 mov 0x10(%ebp),%edx 10afd6: 89 55 dc mov %edx,-0x24(%ebp) 10afd9: 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; 10afdc: 8b 1d b8 74 12 00 mov 0x1274b8,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10afe2: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10afe9: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi _ISR_Disable( level ); 10afef: 9c pushf 10aff0: fa cli 10aff1: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10aff4: 8b 16 mov (%esi),%edx 10aff6: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10aff9: 21 c2 and %eax,%edx 10affb: 89 55 e4 mov %edx,-0x1c(%ebp) 10affe: 74 0d je 10b00d <_Event_Seize+0x49> 10b000: 39 d0 cmp %edx,%eax 10b002: 0f 84 84 00 00 00 je 10b08c <_Event_Seize+0xc8> 10b008: f6 c1 02 test $0x2,%cl 10b00b: 75 7f jne 10b08c <_Event_Seize+0xc8> <== NEVER TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b00d: f6 c1 01 test $0x1,%cl 10b010: 75 62 jne 10b074 <_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; 10b012: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b015: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b018: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b01b: c7 05 a8 7d 12 00 01 movl $0x1,0x127da8 10b022: 00 00 00 _ISR_Enable( level ); 10b025: ff 75 e0 pushl -0x20(%ebp) 10b028: 9d popf if ( ticks ) { 10b029: 8b 45 dc mov -0x24(%ebp),%eax 10b02c: 85 c0 test %eax,%eax 10b02e: 0f 85 80 00 00 00 jne 10b0b4 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b034: 83 ec 08 sub $0x8,%esp 10b037: 68 00 01 00 00 push $0x100 10b03c: 53 push %ebx 10b03d: e8 fe 2d 00 00 call 10de40 <_Thread_Set_state> _ISR_Disable( level ); 10b042: 9c pushf 10b043: fa cli 10b044: 5a pop %edx sync_state = _Event_Sync_state; 10b045: a1 a8 7d 12 00 mov 0x127da8,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b04a: c7 05 a8 7d 12 00 00 movl $0x0,0x127da8 10b051: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b054: 83 c4 10 add $0x10,%esp 10b057: 83 f8 01 cmp $0x1,%eax 10b05a: 74 4c je 10b0a8 <_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 ); 10b05c: 89 55 10 mov %edx,0x10(%ebp) 10b05f: 89 5d 0c mov %ebx,0xc(%ebp) 10b062: 89 45 08 mov %eax,0x8(%ebp) } 10b065: 8d 65 f4 lea -0xc(%ebp),%esp 10b068: 5b pop %ebx 10b069: 5e pop %esi 10b06a: 5f pop %edi 10b06b: 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 ); 10b06c: e9 af 1f 00 00 jmp 10d020 <_Thread_blocking_operation_Cancel> 10b071: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b074: ff 75 e0 pushl -0x20(%ebp) 10b077: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b078: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b07f: 8b 55 e4 mov -0x1c(%ebp),%edx 10b082: 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 ); } 10b084: 8d 65 f4 lea -0xc(%ebp),%esp 10b087: 5b pop %ebx 10b088: 5e pop %esi 10b089: 5f pop %edi 10b08a: c9 leave 10b08b: 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 = 10b08c: 8b 45 e4 mov -0x1c(%ebp),%eax 10b08f: f7 d0 not %eax 10b091: 23 45 d4 and -0x2c(%ebp),%eax 10b094: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b096: ff 75 e0 pushl -0x20(%ebp) 10b099: 9d popf *event_out = seized_events; 10b09a: 8b 45 e4 mov -0x1c(%ebp),%eax 10b09d: 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 ); } 10b09f: 8d 65 f4 lea -0xc(%ebp),%esp 10b0a2: 5b pop %ebx 10b0a3: 5e pop %esi 10b0a4: 5f pop %edi 10b0a5: c9 leave 10b0a6: c3 ret 10b0a7: 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 ); 10b0a8: 52 push %edx 10b0a9: 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 ); } 10b0aa: 8d 65 f4 lea -0xc(%ebp),%esp 10b0ad: 5b pop %ebx 10b0ae: 5e pop %esi 10b0af: 5f pop %edi 10b0b0: c9 leave 10b0b1: c3 ret 10b0b2: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b0b4: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b0b7: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b0be: c7 43 64 68 b2 10 00 movl $0x10b268,0x64(%ebx) the_watchdog->id = id; 10b0c5: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b0c8: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b0cf: 8b 45 dc mov -0x24(%ebp),%eax 10b0d2: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b0d5: 83 ec 08 sub $0x8,%esp 10b0d8: 8d 43 48 lea 0x48(%ebx),%eax 10b0db: 50 push %eax 10b0dc: 68 d8 74 12 00 push $0x1274d8 10b0e1: e8 e2 33 00 00 call 10e4c8 <_Watchdog_Insert> 10b0e6: 83 c4 10 add $0x10,%esp 10b0e9: e9 46 ff ff ff jmp 10b034 <_Event_Seize+0x70> 0010b144 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b144: 55 push %ebp 10b145: 89 e5 mov %esp,%ebp 10b147: 57 push %edi 10b148: 56 push %esi 10b149: 53 push %ebx 10b14a: 83 ec 1c sub $0x1c,%esp 10b14d: 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 ]; 10b150: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b156: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b159: 9c pushf 10b15a: fa cli 10b15b: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b15e: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b160: 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 ) ) { 10b163: 89 c7 mov %eax,%edi 10b165: 21 d7 and %edx,%edi 10b167: 89 7d e0 mov %edi,-0x20(%ebp) 10b16a: 74 74 je 10b1e0 <_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() && 10b16c: 8b 3d 94 74 12 00 mov 0x127494,%edi 10b172: 85 ff test %edi,%edi 10b174: 74 0c je 10b182 <_Event_Surrender+0x3e> 10b176: 3b 1d b8 74 12 00 cmp 0x1274b8,%ebx 10b17c: 0f 84 96 00 00 00 je 10b218 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b182: f6 43 11 01 testb $0x1,0x11(%ebx) 10b186: 74 4c je 10b1d4 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b188: 3b 45 e0 cmp -0x20(%ebp),%eax 10b18b: 74 05 je 10b192 <_Event_Surrender+0x4e> 10b18d: 83 e6 02 and $0x2,%esi 10b190: 74 42 je 10b1d4 <_Event_Surrender+0x90> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b192: 8b 45 e0 mov -0x20(%ebp),%eax 10b195: f7 d0 not %eax 10b197: 21 d0 and %edx,%eax 10b199: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b19b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b1a2: 8b 43 28 mov 0x28(%ebx),%eax 10b1a5: 8b 7d e0 mov -0x20(%ebp),%edi 10b1a8: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b1aa: ff 75 e4 pushl -0x1c(%ebp) 10b1ad: 9d popf 10b1ae: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b1af: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b1b3: 74 37 je 10b1ec <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b1b5: ff 75 e4 pushl -0x1c(%ebp) 10b1b8: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b1b9: 83 ec 08 sub $0x8,%esp 10b1bc: 68 f8 ff 03 10 push $0x1003fff8 10b1c1: 53 push %ebx 10b1c2: e8 e5 1f 00 00 call 10d1ac <_Thread_Clear_state> 10b1c7: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b1ca: 8d 65 f4 lea -0xc(%ebp),%esp 10b1cd: 5b pop %ebx 10b1ce: 5e pop %esi 10b1cf: 5f pop %edi 10b1d0: c9 leave 10b1d1: c3 ret 10b1d2: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b1d4: ff 75 e4 pushl -0x1c(%ebp) 10b1d7: 9d popf } 10b1d8: 8d 65 f4 lea -0xc(%ebp),%esp 10b1db: 5b pop %ebx 10b1dc: 5e pop %esi 10b1dd: 5f pop %edi 10b1de: c9 leave 10b1df: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b1e0: ff 75 e4 pushl -0x1c(%ebp) 10b1e3: 9d popf } return; } } _ISR_Enable( level ); } 10b1e4: 8d 65 f4 lea -0xc(%ebp),%esp 10b1e7: 5b pop %ebx 10b1e8: 5e pop %esi 10b1e9: 5f pop %edi 10b1ea: c9 leave 10b1eb: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b1ec: 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 ); 10b1f3: ff 75 e4 pushl -0x1c(%ebp) 10b1f6: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b1f7: 83 ec 0c sub $0xc,%esp 10b1fa: 8d 43 48 lea 0x48(%ebx),%eax 10b1fd: 50 push %eax 10b1fe: e8 fd 33 00 00 call 10e600 <_Watchdog_Remove> 10b203: 58 pop %eax 10b204: 5a pop %edx 10b205: 68 f8 ff 03 10 push $0x1003fff8 10b20a: 53 push %ebx 10b20b: e8 9c 1f 00 00 call 10d1ac <_Thread_Clear_state> 10b210: 83 c4 10 add $0x10,%esp 10b213: eb c3 jmp 10b1d8 <_Event_Surrender+0x94> 10b215: 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) || 10b218: 8b 3d a8 7d 12 00 mov 0x127da8,%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() && 10b21e: 83 ff 02 cmp $0x2,%edi 10b221: 74 0d je 10b230 <_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)) ) { 10b223: 8b 3d a8 7d 12 00 mov 0x127da8,%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() && 10b229: 4f dec %edi 10b22a: 0f 85 52 ff ff ff jne 10b182 <_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) ) { 10b230: 3b 45 e0 cmp -0x20(%ebp),%eax 10b233: 74 05 je 10b23a <_Event_Surrender+0xf6> 10b235: 83 e6 02 and $0x2,%esi 10b238: 74 22 je 10b25c <_Event_Surrender+0x118><== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b23a: 8b 45 e0 mov -0x20(%ebp),%eax 10b23d: f7 d0 not %eax 10b23f: 21 d0 and %edx,%eax 10b241: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b243: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b24a: 8b 43 28 mov 0x28(%ebx),%eax 10b24d: 8b 55 e0 mov -0x20(%ebp),%edx 10b250: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b252: c7 05 a8 7d 12 00 03 movl $0x3,0x127da8 10b259: 00 00 00 } _ISR_Enable( level ); 10b25c: ff 75 e4 pushl -0x1c(%ebp) 10b25f: 9d popf return; 10b260: e9 73 ff ff ff jmp 10b1d8 <_Event_Surrender+0x94> 0010b268 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b268: 55 push %ebp 10b269: 89 e5 mov %esp,%ebp 10b26b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b26e: 8d 45 f4 lea -0xc(%ebp),%eax 10b271: 50 push %eax 10b272: ff 75 08 pushl 0x8(%ebp) 10b275: e8 fe 22 00 00 call 10d578 <_Thread_Get> switch ( location ) { 10b27a: 83 c4 10 add $0x10,%esp 10b27d: 8b 55 f4 mov -0xc(%ebp),%edx 10b280: 85 d2 test %edx,%edx 10b282: 75 37 jne 10b2bb <_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 ); 10b284: 9c pushf 10b285: fa cli 10b286: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b287: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b28e: 3b 05 b8 74 12 00 cmp 0x1274b8,%eax 10b294: 74 2a je 10b2c0 <_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; 10b296: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b29d: 52 push %edx 10b29e: 9d popf 10b29f: 83 ec 08 sub $0x8,%esp 10b2a2: 68 f8 ff 03 10 push $0x1003fff8 10b2a7: 50 push %eax 10b2a8: e8 ff 1e 00 00 call 10d1ac <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b2ad: a1 f8 73 12 00 mov 0x1273f8,%eax 10b2b2: 48 dec %eax 10b2b3: a3 f8 73 12 00 mov %eax,0x1273f8 10b2b8: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b2bb: c9 leave 10b2bc: c3 ret 10b2bd: 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 ) 10b2c0: 8b 0d a8 7d 12 00 mov 0x127da8,%ecx 10b2c6: 49 dec %ecx 10b2c7: 75 cd jne 10b296 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b2c9: c7 05 a8 7d 12 00 02 movl $0x2,0x127da8 10b2d0: 00 00 00 10b2d3: eb c1 jmp 10b296 <_Event_Timeout+0x2e> 00110c10 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110c10: 55 push %ebp 110c11: 89 e5 mov %esp,%ebp 110c13: 57 push %edi 110c14: 56 push %esi 110c15: 53 push %ebx 110c16: 83 ec 2c sub $0x2c,%esp 110c19: 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; 110c1c: 8b 45 08 mov 0x8(%ebp),%eax 110c1f: 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; 110c22: 8b 50 10 mov 0x10(%eax),%edx 110c25: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 110c28: 89 f8 mov %edi,%eax 110c2a: 83 c0 04 add $0x4,%eax 110c2d: 89 45 e0 mov %eax,-0x20(%ebp) 110c30: 0f 82 5a 01 00 00 jb 110d90 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 110c36: 8b 75 14 mov 0x14(%ebp),%esi 110c39: 85 f6 test %esi,%esi 110c3b: 0f 85 48 01 00 00 jne 110d89 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110c41: 39 4d 08 cmp %ecx,0x8(%ebp) 110c44: 0f 84 50 01 00 00 je 110d9a <_Heap_Allocate_aligned_with_boundary+0x18a> 110c4a: 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; 110c51: 8b 55 d4 mov -0x2c(%ebp),%edx 110c54: 83 c2 07 add $0x7,%edx 110c57: 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; 110c5a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 110c61: 29 7d d8 sub %edi,-0x28(%ebp) 110c64: eb 19 jmp 110c7f <_Heap_Allocate_aligned_with_boundary+0x6f> 110c66: 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; 110c68: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 110c6b: 85 db test %ebx,%ebx 110c6d: 0f 85 e9 00 00 00 jne 110d5c <_Heap_Allocate_aligned_with_boundary+0x14c><== NEVER TAKEN break; } block = block->next; 110c73: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110c76: 39 4d 08 cmp %ecx,0x8(%ebp) 110c79: 0f 84 25 01 00 00 je 110da4 <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 110c7f: 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 ) { 110c82: 8b 59 04 mov 0x4(%ecx),%ebx 110c85: 39 5d e0 cmp %ebx,-0x20(%ebp) 110c88: 73 e9 jae 110c73 <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 110c8a: 8b 55 10 mov 0x10(%ebp),%edx 110c8d: 85 d2 test %edx,%edx 110c8f: 74 d7 je 110c68 <_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; 110c91: 8b 45 08 mov 0x8(%ebp),%eax 110c94: 8b 40 14 mov 0x14(%eax),%eax 110c97: 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; 110c9a: 83 e3 fe and $0xfffffffe,%ebx 110c9d: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 110ca0: 8d 51 08 lea 0x8(%ecx),%edx 110ca3: 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; 110ca6: 8b 75 c8 mov -0x38(%ebp),%esi 110ca9: 29 c6 sub %eax,%esi 110cab: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110cad: 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); 110cb0: 89 d8 mov %ebx,%eax 110cb2: 31 d2 xor %edx,%edx 110cb4: f7 75 10 divl 0x10(%ebp) 110cb7: 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 ) { 110cb9: 39 de cmp %ebx,%esi 110cbb: 73 0b jae 110cc8 <_Heap_Allocate_aligned_with_boundary+0xb8> 110cbd: 89 f0 mov %esi,%eax 110cbf: 31 d2 xor %edx,%edx 110cc1: f7 75 10 divl 0x10(%ebp) 110cc4: 89 f3 mov %esi,%ebx 110cc6: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 110cc8: 8b 45 14 mov 0x14(%ebp),%eax 110ccb: 85 c0 test %eax,%eax 110ccd: 74 59 je 110d28 <_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; 110ccf: 8d 34 3b lea (%ebx,%edi,1),%esi 110cd2: 89 f0 mov %esi,%eax 110cd4: 31 d2 xor %edx,%edx 110cd6: f7 75 14 divl 0x14(%ebp) 110cd9: 89 f0 mov %esi,%eax 110cdb: 29 d0 sub %edx,%eax 110cdd: 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 ) { 110cdf: 39 c3 cmp %eax,%ebx 110ce1: 73 45 jae 110d28 <_Heap_Allocate_aligned_with_boundary+0x118> 110ce3: 39 c6 cmp %eax,%esi 110ce5: 76 41 jbe 110d28 <_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; 110ce7: 8b 45 cc mov -0x34(%ebp),%eax 110cea: 01 f8 add %edi,%eax 110cec: 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 ) { 110cef: 39 d0 cmp %edx,%eax 110cf1: 77 80 ja 110c73 <_Heap_Allocate_aligned_with_boundary+0x63> 110cf3: 89 ce mov %ecx,%esi 110cf5: eb 0e jmp 110d05 <_Heap_Allocate_aligned_with_boundary+0xf5> 110cf7: 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 ) { 110cf8: 39 c1 cmp %eax,%ecx 110cfa: 76 2a jbe 110d26 <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 110cfc: 39 55 dc cmp %edx,-0x24(%ebp) 110cff: 0f 87 a3 00 00 00 ja 110da8 <_Heap_Allocate_aligned_with_boundary+0x198><== ALWAYS TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110d05: 89 d3 mov %edx,%ebx 110d07: 29 fb sub %edi,%ebx 110d09: 89 d8 mov %ebx,%eax 110d0b: 31 d2 xor %edx,%edx 110d0d: f7 75 10 divl 0x10(%ebp) 110d10: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110d12: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110d15: 89 c8 mov %ecx,%eax 110d17: 31 d2 xor %edx,%edx 110d19: f7 75 14 divl 0x14(%ebp) 110d1c: 89 c8 mov %ecx,%eax 110d1e: 29 d0 sub %edx,%eax 110d20: 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 ) { 110d22: 39 c3 cmp %eax,%ebx 110d24: 72 d2 jb 110cf8 <_Heap_Allocate_aligned_with_boundary+0xe8> 110d26: 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 ) { 110d28: 39 5d cc cmp %ebx,-0x34(%ebp) 110d2b: 0f 87 42 ff ff ff ja 110c73 <_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; 110d31: be f8 ff ff ff mov $0xfffffff8,%esi 110d36: 29 ce sub %ecx,%esi 110d38: 01 de add %ebx,%esi 110d3a: 89 d8 mov %ebx,%eax 110d3c: 31 d2 xor %edx,%edx 110d3e: f7 75 d4 divl -0x2c(%ebp) 110d41: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 110d43: 39 75 d0 cmp %esi,-0x30(%ebp) 110d46: 0f 86 1f ff ff ff jbe 110c6b <_Heap_Allocate_aligned_with_boundary+0x5b> 110d4c: 85 f6 test %esi,%esi 110d4e: 0f 85 1f ff ff ff jne 110c73 <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 110d54: 85 db test %ebx,%ebx 110d56: 0f 84 17 ff ff ff je 110c73 <_Heap_Allocate_aligned_with_boundary+0x63><== ALWAYS TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 110d5c: 8b 55 e4 mov -0x1c(%ebp),%edx 110d5f: 8b 45 08 mov 0x8(%ebp),%eax 110d62: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 110d65: 57 push %edi 110d66: 53 push %ebx 110d67: 51 push %ecx 110d68: 50 push %eax 110d69: e8 3a b9 ff ff call 10c6a8 <_Heap_Block_allocate> 110d6e: 89 d8 mov %ebx,%eax 110d70: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 110d73: 8b 4d e4 mov -0x1c(%ebp),%ecx 110d76: 8b 55 08 mov 0x8(%ebp),%edx 110d79: 39 4a 44 cmp %ecx,0x44(%edx) 110d7c: 73 14 jae 110d92 <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 110d7e: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 110d81: 8d 65 f4 lea -0xc(%ebp),%esp 110d84: 5b pop %ebx 110d85: 5e pop %esi 110d86: 5f pop %edi 110d87: c9 leave 110d88: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 110d89: 3b 7d 14 cmp 0x14(%ebp),%edi 110d8c: 76 21 jbe 110daf <_Heap_Allocate_aligned_with_boundary+0x19f> 110d8e: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 110d90: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 110d92: 8d 65 f4 lea -0xc(%ebp),%esp 110d95: 5b pop %ebx 110d96: 5e pop %esi 110d97: 5f pop %edi 110d98: c9 leave 110d99: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110d9a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 110da1: 8d 76 00 lea 0x0(%esi),%esi 110da4: 31 c0 xor %eax,%eax 110da6: eb cb jmp 110d73 <_Heap_Allocate_aligned_with_boundary+0x163> 110da8: 89 f1 mov %esi,%ecx <== NOT EXECUTED 110daa: e9 c4 fe ff ff jmp 110c73 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 110daf: 8b 5d 10 mov 0x10(%ebp),%ebx 110db2: 85 db test %ebx,%ebx 110db4: 0f 85 87 fe ff ff jne 110c41 <_Heap_Allocate_aligned_with_boundary+0x31> 110dba: 89 55 10 mov %edx,0x10(%ebp) 110dbd: e9 7f fe ff ff jmp 110c41 <_Heap_Allocate_aligned_with_boundary+0x31> 0010c6a8 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10c6a8: 55 push %ebp 10c6a9: 89 e5 mov %esp,%ebp 10c6ab: 57 push %edi 10c6ac: 56 push %esi 10c6ad: 53 push %ebx 10c6ae: 83 ec 10 sub $0x10,%esp 10c6b1: 8b 75 08 mov 0x8(%ebp),%esi 10c6b4: 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; 10c6b7: 89 5d ec mov %ebx,-0x14(%ebp) 10c6ba: 8b 7d 10 mov 0x10(%ebp),%edi 10c6bd: 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; 10c6c0: 89 f8 mov %edi,%eax 10c6c2: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10c6c4: 8b 53 04 mov 0x4(%ebx),%edx 10c6c7: 83 e2 fe and $0xfffffffe,%edx 10c6ca: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10c6cf: 0f 85 8b 00 00 00 jne 10c760 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10c6d5: 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; 10c6d8: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10c6db: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10c6de: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10c6e1: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10c6e4: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10c6e7: 8b 53 04 mov 0x4(%ebx),%edx 10c6ea: 83 e2 fe and $0xfffffffe,%edx 10c6ed: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10c6f0: 8b 56 10 mov 0x10(%esi),%edx 10c6f3: 89 55 e4 mov %edx,-0x1c(%ebp) 10c6f6: 39 d0 cmp %edx,%eax 10c6f8: 72 72 jb 10c76c <_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; 10c6fa: 8b 43 04 mov 0x4(%ebx),%eax 10c6fd: 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 ) 10c700: 8b 45 10 mov 0x10(%ebp),%eax 10c703: 31 d2 xor %edx,%edx 10c705: f7 75 e4 divl -0x1c(%ebp) 10c708: 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; 10c70a: 89 f8 mov %edi,%eax 10c70c: 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; 10c70e: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10c711: f6 43 04 01 testb $0x1,0x4(%ebx) 10c715: 75 69 jne 10c780 <_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); 10c717: 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; 10c719: 8b 53 04 mov 0x4(%ebx),%edx 10c71c: 83 e2 fe and $0xfffffffe,%edx 10c71f: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10c721: 89 c2 mov %eax,%edx 10c723: 83 ca 01 or $0x1,%edx 10c726: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10c729: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10c72b: 8b 45 f0 mov -0x10(%ebp),%eax 10c72e: 83 e0 fe and $0xfffffffe,%eax 10c731: 03 45 ec add -0x14(%ebp),%eax 10c734: 29 f8 sub %edi,%eax 10c736: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10c739: ff 75 14 pushl 0x14(%ebp) 10c73c: 51 push %ecx 10c73d: 57 push %edi 10c73e: 56 push %esi 10c73f: e8 80 fe ff ff call 10c5c4 <_Heap_Block_split> 10c744: 89 fb mov %edi,%ebx 10c746: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10c749: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10c74c: 39 46 34 cmp %eax,0x34(%esi) 10c74f: 76 03 jbe 10c754 <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10c751: 89 46 34 mov %eax,0x34(%esi) } return block; } 10c754: 89 d8 mov %ebx,%eax 10c756: 8d 65 f4 lea -0xc(%ebp),%esp 10c759: 5b pop %ebx 10c75a: 5e pop %esi 10c75b: 5f pop %edi 10c75c: c9 leave 10c75d: c3 ret 10c75e: 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 ); 10c760: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10c762: 8b 56 10 mov 0x10(%esi),%edx 10c765: 89 55 e4 mov %edx,-0x1c(%ebp) 10c768: 39 d0 cmp %edx,%eax 10c76a: 73 8e jae 10c6fa <_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 ); 10c76c: 03 45 14 add 0x14(%ebp),%eax 10c76f: 50 push %eax 10c770: 51 push %ecx 10c771: 53 push %ebx 10c772: 56 push %esi 10c773: e8 4c fe ff ff call 10c5c4 <_Heap_Block_split> 10c778: 83 c4 10 add $0x10,%esp 10c77b: eb cc jmp 10c749 <_Heap_Block_allocate+0xa1> 10c77d: 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; 10c780: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10c783: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10c786: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10c789: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10c78c: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10c78f: ff 46 38 incl 0x38(%esi) 10c792: 89 d9 mov %ebx,%ecx 10c794: eb 8b jmp 10c721 <_Heap_Block_allocate+0x79> 0010c5c4 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c5c4: 55 push %ebp 10c5c5: 89 e5 mov %esp,%ebp 10c5c7: 57 push %edi 10c5c8: 56 push %esi 10c5c9: 53 push %ebx 10c5ca: 83 ec 14 sub $0x14,%esp 10c5cd: 8b 4d 08 mov 0x8(%ebp),%ecx 10c5d0: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c5d3: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10c5d6: 8b 41 14 mov 0x14(%ecx),%eax 10c5d9: 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; 10c5dc: 8b 43 04 mov 0x4(%ebx),%eax 10c5df: 89 45 e4 mov %eax,-0x1c(%ebp) 10c5e2: 89 c6 mov %eax,%esi 10c5e4: 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; 10c5e7: 8b 55 e8 mov -0x18(%ebp),%edx 10c5ea: 83 ea 08 sub $0x8,%edx 10c5ed: 8b 45 14 mov 0x14(%ebp),%eax 10c5f0: 39 d0 cmp %edx,%eax 10c5f2: 73 02 jae 10c5f6 <_Heap_Block_split+0x32> 10c5f4: 89 d0 mov %edx,%eax 10c5f6: 83 c0 08 add $0x8,%eax 10c5f9: 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; 10c5fc: 31 d2 xor %edx,%edx 10c5fe: f7 f7 div %edi if ( remainder != 0 ) { 10c600: 85 d2 test %edx,%edx 10c602: 75 70 jne 10c674 <_Heap_Block_split+0xb0> 10c604: 8b 7d f0 mov -0x10(%ebp),%edi 10c607: 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); 10c60a: 8d 04 33 lea (%ebx,%esi,1),%eax 10c60d: 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 ) { 10c610: 8d 56 04 lea 0x4(%esi),%edx 10c613: 2b 55 f0 sub -0x10(%ebp),%edx 10c616: 8b 7d e8 mov -0x18(%ebp),%edi 10c619: 83 c7 04 add $0x4,%edi 10c61c: 39 fa cmp %edi,%edx 10c61e: 72 60 jb 10c680 <_Heap_Block_split+0xbc> 10c620: 8b 55 ec mov -0x14(%ebp),%edx 10c623: 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; 10c625: 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; 10c628: 8b 7d e4 mov -0x1c(%ebp),%edi 10c62b: 83 e7 01 and $0x1,%edi 10c62e: 0b 7d ec or -0x14(%ebp),%edi 10c631: 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; 10c634: 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; 10c637: 8b 58 04 mov 0x4(%eax),%ebx 10c63a: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10c63d: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10c642: 75 4c jne 10c690 <_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; 10c644: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10c647: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10c64a: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c64d: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c650: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c653: 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; 10c656: 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); 10c658: 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; 10c65b: 89 f1 mov %esi,%ecx 10c65d: 83 c9 01 or $0x1,%ecx 10c660: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c663: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c665: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c669: 83 c4 14 add $0x14,%esp 10c66c: 5b pop %ebx 10c66d: 5e pop %esi 10c66e: 5f pop %edi 10c66f: c9 leave 10c670: c3 ret 10c671: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10c674: 03 7d f0 add -0x10(%ebp),%edi 10c677: 29 d7 sub %edx,%edi 10c679: 89 7d ec mov %edi,-0x14(%ebp) 10c67c: eb 8c jmp 10c60a <_Heap_Block_split+0x46> 10c67e: 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; 10c680: 8b 45 e0 mov -0x20(%ebp),%eax 10c683: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c687: 83 c4 14 add $0x14,%esp 10c68a: 5b pop %ebx 10c68b: 5e pop %esi 10c68c: 5f pop %edi 10c68d: c9 leave 10c68e: c3 ret 10c68f: 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; 10c690: 8b 7d 10 mov 0x10(%ebp),%edi 10c693: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10c696: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10c699: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10c69c: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10c69f: 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; 10c6a2: ff 41 38 incl 0x38(%ecx) 10c6a5: eb b4 jmp 10c65b <_Heap_Block_split+0x97> 00114570 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 114570: 55 push %ebp 114571: 89 e5 mov %esp,%ebp 114573: 56 push %esi 114574: 53 push %ebx 114575: 8b 4d 08 mov 0x8(%ebp),%ecx 114578: 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; 11457b: 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; 11457e: 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; 114581: 3b 41 18 cmp 0x18(%ecx),%eax 114584: 73 3a jae 1145c0 <_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 ) { 114586: 39 d0 cmp %edx,%eax 114588: 74 0e je 114598 <_Heap_Extend+0x28> 11458a: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 11458f: 8d 65 f8 lea -0x8(%ebp),%esp 114592: 5b pop %ebx 114593: 5e pop %esi 114594: c9 leave 114595: c3 ret 114596: 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; 114598: 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; 11459b: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 11459e: 29 d8 sub %ebx,%eax 1145a0: 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); 1145a3: 89 f0 mov %esi,%eax 1145a5: 31 d2 xor %edx,%edx 1145a7: f7 71 10 divl 0x10(%ecx) 1145aa: 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; 1145ac: 8b 45 14 mov 0x14(%ebp),%eax 1145af: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 1145b1: 39 71 14 cmp %esi,0x14(%ecx) 1145b4: 76 1a jbe 1145d0 <_Heap_Extend+0x60> <== NEVER TAKEN 1145b6: 31 c0 xor %eax,%eax <== NOT EXECUTED _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1145b8: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1145bb: 5b pop %ebx <== NOT EXECUTED 1145bc: 5e pop %esi <== NOT EXECUTED 1145bd: c9 leave <== NOT EXECUTED 1145be: c3 ret <== NOT EXECUTED 1145bf: 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 ) { 1145c0: 39 d0 cmp %edx,%eax 1145c2: 73 c2 jae 114586 <_Heap_Extend+0x16> 1145c4: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1145c9: 8d 65 f8 lea -0x8(%ebp),%esp 1145cc: 5b pop %ebx 1145cd: 5e pop %esi 1145ce: c9 leave 1145cf: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1145d0: 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; 1145d3: 8b 43 04 mov 0x4(%ebx),%eax 1145d6: 83 e0 01 and $0x1,%eax 1145d9: 09 f0 or %esi,%eax 1145db: 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 = 1145de: 8b 41 20 mov 0x20(%ecx),%eax 1145e1: 29 d0 sub %edx,%eax 1145e3: 83 c8 01 or $0x1,%eax 1145e6: 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; 1145e9: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 1145ec: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 1145ef: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 1145f2: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 1145f5: 83 ec 08 sub $0x8,%esp 1145f8: 83 c3 08 add $0x8,%ebx 1145fb: 53 push %ebx 1145fc: 51 push %ecx 1145fd: e8 e2 ae ff ff call 10f4e4 <_Heap_Free> 114602: 31 c0 xor %eax,%eax 114604: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 114607: 8d 65 f8 lea -0x8(%ebp),%esp 11460a: 5b pop %ebx 11460b: 5e pop %esi 11460c: c9 leave 11460d: c3 ret 00110dc4 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110dc4: 55 push %ebp 110dc5: 89 e5 mov %esp,%ebp 110dc7: 57 push %edi 110dc8: 56 push %esi 110dc9: 53 push %ebx 110dca: 83 ec 18 sub $0x18,%esp 110dcd: 8b 5d 08 mov 0x8(%ebp),%ebx 110dd0: 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 ) 110dd3: 8d 48 f8 lea -0x8(%eax),%ecx 110dd6: 31 d2 xor %edx,%edx 110dd8: f7 73 10 divl 0x10(%ebx) 110ddb: 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; 110ddd: 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 110de0: 39 c1 cmp %eax,%ecx 110de2: 72 07 jb 110deb <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 110de4: 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 110de7: 39 f1 cmp %esi,%ecx 110de9: 76 0d jbe 110df8 <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 110deb: 31 c0 xor %eax,%eax } 110ded: 83 c4 18 add $0x18,%esp 110df0: 5b pop %ebx 110df1: 5e pop %esi 110df2: 5f pop %edi 110df3: c9 leave 110df4: c3 ret 110df5: 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; 110df8: 8b 51 04 mov 0x4(%ecx),%edx 110dfb: 89 55 f0 mov %edx,-0x10(%ebp) 110dfe: 83 e2 fe and $0xfffffffe,%edx 110e01: 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); 110e04: 01 ca add %ecx,%edx 110e06: 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 110e09: 39 d0 cmp %edx,%eax 110e0b: 77 de ja 110deb <_Heap_Free+0x27> <== ALWAYS TAKEN 110e0d: 39 d6 cmp %edx,%esi 110e0f: 72 da jb 110deb <_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; 110e11: 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 ) ) { 110e14: f7 c7 01 00 00 00 test $0x1,%edi 110e1a: 74 cf je 110deb <_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; 110e1c: 83 e7 fe and $0xfffffffe,%edi 110e1f: 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 110e22: 39 d6 cmp %edx,%esi 110e24: 0f 84 e2 00 00 00 je 110f0c <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 110e2a: 8b 55 dc mov -0x24(%ebp),%edx 110e2d: 8b 7d e8 mov -0x18(%ebp),%edi 110e30: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 110e34: 89 7d e0 mov %edi,-0x20(%ebp) 110e37: 8a 55 e0 mov -0x20(%ebp),%dl 110e3a: 83 e2 01 and $0x1,%edx 110e3d: 88 55 e7 mov %dl,-0x19(%ebp) 110e40: 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 ) ) { 110e44: f6 45 f0 01 testb $0x1,-0x10(%ebp) 110e48: 75 46 jne 110e90 <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 110e4a: 8b 39 mov (%ecx),%edi 110e4c: 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); 110e4f: 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 110e51: 39 c8 cmp %ecx,%eax 110e53: 77 96 ja 110deb <_Heap_Free+0x27> <== ALWAYS TAKEN 110e55: 39 ce cmp %ecx,%esi 110e57: 72 92 jb 110deb <_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) ) { 110e59: f6 41 04 01 testb $0x1,0x4(%ecx) 110e5d: 74 8c je 110deb <_Heap_Free+0x27> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 110e5f: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 110e63: 0f 84 af 00 00 00 je 110f18 <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 110e69: 8b 45 ec mov -0x14(%ebp),%eax 110e6c: 03 45 e8 add -0x18(%ebp),%eax 110e6f: 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; 110e71: 8b 55 dc mov -0x24(%ebp),%edx 110e74: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 110e77: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 110e7a: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 110e7d: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 110e80: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110e83: 89 c2 mov %eax,%edx 110e85: 83 ca 01 or $0x1,%edx 110e88: 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; 110e8b: 89 04 01 mov %eax,(%ecx,%eax,1) 110e8e: eb 2c jmp 110ebc <_Heap_Free+0xf8> 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 */ 110e90: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 110e94: 74 3e je 110ed4 <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 110e96: 8b 7d e8 mov -0x18(%ebp),%edi 110e99: 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; 110e9c: 8b 75 dc mov -0x24(%ebp),%esi 110e9f: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 110ea2: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 110ea5: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 110ea8: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 110eab: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 110eae: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110eb1: 89 f8 mov %edi,%eax 110eb3: 83 c8 01 or $0x1,%eax 110eb6: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 110eb9: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 110ebc: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 110ebf: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 110ec2: 8b 55 ec mov -0x14(%ebp),%edx 110ec5: 01 53 30 add %edx,0x30(%ebx) 110ec8: b0 01 mov $0x1,%al return( true ); } 110eca: 83 c4 18 add $0x18,%esp 110ecd: 5b pop %ebx 110ece: 5e pop %esi 110ecf: 5f pop %edi 110ed0: c9 leave 110ed1: c3 ret 110ed2: 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; 110ed4: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 110ed7: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 110eda: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 110edd: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 110ee0: 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; 110ee3: 8b 45 ec mov -0x14(%ebp),%eax 110ee6: 83 c8 01 or $0x1,%eax 110ee9: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110eec: 8b 7d dc mov -0x24(%ebp),%edi 110eef: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 110ef3: 8b 45 ec mov -0x14(%ebp),%eax 110ef6: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 110ef8: 8b 43 38 mov 0x38(%ebx),%eax 110efb: 40 inc %eax 110efc: 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; 110eff: 3b 43 3c cmp 0x3c(%ebx),%eax 110f02: 76 b8 jbe 110ebc <_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; 110f04: 89 43 3c mov %eax,0x3c(%ebx) 110f07: eb b3 jmp 110ebc <_Heap_Free+0xf8> 110f09: 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 110f0c: c6 45 e7 00 movb $0x0,-0x19(%ebp) 110f10: e9 2f ff ff ff jmp 110e44 <_Heap_Free+0x80> 110f15: 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; 110f18: 8b 45 ec mov -0x14(%ebp),%eax 110f1b: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110f1e: 89 c6 mov %eax,%esi 110f20: 83 ce 01 or $0x1,%esi 110f23: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110f26: 8b 55 dc mov -0x24(%ebp),%edx 110f29: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 110f2d: 89 02 mov %eax,(%edx) 110f2f: eb 8b jmp 110ebc <_Heap_Free+0xf8> 0012ece0 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 12ece0: 55 push %ebp 12ece1: 89 e5 mov %esp,%ebp 12ece3: 57 push %edi 12ece4: 56 push %esi 12ece5: 53 push %ebx 12ece6: 8b 7d 08 mov 0x8(%ebp),%edi 12ece9: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 12ecec: c7 06 00 00 00 00 movl $0x0,(%esi) info->largest = 0; 12ecf2: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) info->total = 0; 12ecf9: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 12ed00: 8b 57 08 mov 0x8(%edi),%edx for(the_block = _Heap_Free_list_first(the_heap); 12ed03: 39 d7 cmp %edx,%edi 12ed05: 74 2a je 12ed31 <_Heap_Get_free_information+0x51><== ALWAYS TAKEN 12ed07: bb 01 00 00 00 mov $0x1,%ebx 12ed0c: 31 c9 xor %ecx,%ecx 12ed0e: eb 02 jmp 12ed12 <_Heap_Get_free_information+0x32> 12ed10: 89 c3 mov %eax,%ebx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 12ed12: 8b 42 04 mov 0x4(%edx),%eax 12ed15: 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; 12ed18: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 12ed1a: 39 46 04 cmp %eax,0x4(%esi) 12ed1d: 73 03 jae 12ed22 <_Heap_Get_free_information+0x42> info->largest = the_size; 12ed1f: 89 46 04 mov %eax,0x4(%esi) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 12ed22: 8b 52 08 mov 0x8(%edx),%edx 12ed25: 8d 43 01 lea 0x1(%ebx),%eax info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 12ed28: 39 d7 cmp %edx,%edi 12ed2a: 75 e4 jne 12ed10 <_Heap_Get_free_information+0x30> 12ed2c: 89 1e mov %ebx,(%esi) 12ed2e: 89 4e 08 mov %ecx,0x8(%esi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 12ed31: 5b pop %ebx 12ed32: 5e pop %esi 12ed33: 5f pop %edi 12ed34: c9 leave 12ed35: c3 ret 0013ddb8 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 13ddb8: 55 push %ebp 13ddb9: 89 e5 mov %esp,%ebp 13ddbb: 57 push %edi 13ddbc: 56 push %esi 13ddbd: 53 push %ebx 13ddbe: 83 ec 04 sub $0x4,%esp 13ddc1: 8b 45 08 mov 0x8(%ebp),%eax 13ddc4: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 13ddc7: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 13ddca: 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; 13ddcd: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 13ddd3: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 13ddda: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 13dde1: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 13dde8: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 13ddef: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 13ddf6: 39 fb cmp %edi,%ebx 13ddf8: 74 45 je 13de3f <_Heap_Get_information+0x87><== ALWAYS TAKEN 13ddfa: 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; 13ddfd: 8d 46 0c lea 0xc(%esi),%eax 13de00: 89 45 f0 mov %eax,-0x10(%ebp) 13de03: eb 16 jmp 13de1b <_Heap_Get_information+0x63> 13de05: 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) ) 13de08: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 13de0a: ff 00 incl (%eax) info->total += the_size; 13de0c: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 13de0f: 39 50 04 cmp %edx,0x4(%eax) 13de12: 73 03 jae 13de17 <_Heap_Get_information+0x5f> info->largest = the_size; 13de14: 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 ) { 13de17: 39 df cmp %ebx,%edi 13de19: 74 15 je 13de30 <_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; 13de1b: 89 ca mov %ecx,%edx 13de1d: 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); 13de20: 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; 13de22: 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) ) 13de25: f6 c1 01 test $0x1,%cl 13de28: 74 de je 13de08 <_Heap_Get_information+0x50> 13de2a: 8b 45 f0 mov -0x10(%ebp),%eax 13de2d: eb db jmp 13de0a <_Heap_Get_information+0x52> 13de2f: 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 ) { 13de30: 8b 46 14 mov 0x14(%esi),%eax 13de33: 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; 13de36: 89 46 14 mov %eax,0x14(%esi) } 13de39: 58 pop %eax 13de3a: 5b pop %ebx 13de3b: 5e pop %esi 13de3c: 5f pop %edi 13de3d: c9 leave 13de3e: 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 ) { 13de3f: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 13de44: eb f0 jmp 13de36 <_Heap_Get_information+0x7e><== NOT EXECUTED 0010c474 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c474: 55 push %ebp 10c475: 89 e5 mov %esp,%ebp 10c477: 57 push %edi 10c478: 56 push %esi 10c479: 53 push %ebx 10c47a: 83 ec 10 sub $0x10,%esp 10c47d: 8b 5d 08 mov 0x8(%ebp),%ebx 10c480: 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 ) { 10c483: 85 c9 test %ecx,%ecx 10c485: 0f 85 f5 00 00 00 jne 10c580 <_Heap_Initialize+0x10c> 10c48b: b1 04 mov $0x4,%cl 10c48d: 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; 10c494: 8b 75 0c mov 0xc(%ebp),%esi 10c497: 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; 10c49a: 89 f0 mov %esi,%eax 10c49c: 31 d2 xor %edx,%edx 10c49e: f7 f1 div %ecx if ( remainder != 0 ) { 10c4a0: 85 d2 test %edx,%edx 10c4a2: 74 05 je 10c4a9 <_Heap_Initialize+0x35> return value - remainder + alignment; 10c4a4: 8d 34 31 lea (%ecx,%esi,1),%esi 10c4a7: 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 ( 10c4a9: 8b 55 0c mov 0xc(%ebp),%edx 10c4ac: 03 55 10 add 0x10(%ebp),%edx 10c4af: 89 55 ec mov %edx,-0x14(%ebp) 10c4b2: 0f 82 d9 00 00 00 jb 10c591 <_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); 10c4b8: 8d 7e f8 lea -0x8(%esi),%edi 10c4bb: 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 ( 10c4be: 39 75 10 cmp %esi,0x10(%ebp) 10c4c1: 0f 86 ca 00 00 00 jbe 10c591 <_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; 10c4c7: 8b 45 10 mov 0x10(%ebp),%eax 10c4ca: 29 f0 sub %esi,%eax 10c4cc: 89 c6 mov %eax,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c4ce: 31 d2 xor %edx,%edx 10c4d0: f7 f1 div %ecx 10c4d2: 29 d6 sub %edx,%esi 10c4d4: 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 ( 10c4d7: 39 75 f0 cmp %esi,-0x10(%ebp) 10c4da: 0f 87 b1 00 00 00 ja 10c591 <_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; 10c4e0: 89 f0 mov %esi,%eax 10c4e2: 83 e8 08 sub $0x8,%eax return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 10c4e5: 89 0f mov %ecx,(%edi) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c4e7: 89 f2 mov %esi,%edx 10c4e9: 83 ca 01 or $0x1,%edx 10c4ec: 89 57 04 mov %edx,0x4(%edi) first_block->next = _Heap_Free_list_tail( heap ); 10c4ef: 89 5f 08 mov %ebx,0x8(%edi) first_block->prev = _Heap_Free_list_head( heap ); 10c4f2: 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); 10c4f5: 01 fe add %edi,%esi 10c4f7: 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; 10c4fa: 8b 55 e4 mov -0x1c(%ebp),%edx 10c4fd: 89 16 mov %edx,(%esi) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 10c4ff: 89 fa mov %edi,%edx 10c501: 29 f2 sub %esi,%edx 10c503: 89 56 04 mov %edx,0x4(%esi) /* Heap control */ heap->page_size = page_size; 10c506: 89 4b 10 mov %ecx,0x10(%ebx) heap->min_block_size = min_block_size; 10c509: 8b 75 f0 mov -0x10(%ebp),%esi 10c50c: 89 73 14 mov %esi,0x14(%ebx) heap->area_begin = heap_area_begin; 10c50f: 8b 55 0c mov 0xc(%ebp),%edx 10c512: 89 53 18 mov %edx,0x18(%ebx) heap->area_end = heap_area_end; 10c515: 8b 75 ec mov -0x14(%ebp),%esi 10c518: 89 73 1c mov %esi,0x1c(%ebx) heap->first_block = first_block; 10c51b: 89 7b 20 mov %edi,0x20(%ebx) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 10c51e: 89 7b 08 mov %edi,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c521: 89 7b 0c mov %edi,0xc(%ebx) /* Statistics */ stats->size = first_block_size; 10c524: 8b 55 e4 mov -0x1c(%ebp),%edx 10c527: 89 53 2c mov %edx,0x2c(%ebx) stats->free_size = first_block_size; 10c52a: 89 53 30 mov %edx,0x30(%ebx) stats->min_free_size = first_block_size; 10c52d: 89 53 34 mov %edx,0x34(%ebx) stats->free_blocks = 1; 10c530: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c537: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->used_blocks = 0; 10c53e: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) stats->max_search = 0; 10c545: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) stats->allocs = 0; 10c54c: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) stats->searches = 0; 10c553: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) stats->frees = 0; 10c55a: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) stats->resizes = 0; 10c561: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) stats->instance = instance++; 10c568: 8b 15 20 70 12 00 mov 0x127020,%edx 10c56e: 89 53 28 mov %edx,0x28(%ebx) 10c571: 42 inc %edx 10c572: 89 15 20 70 12 00 mov %edx,0x127020 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 10c578: 83 c4 10 add $0x10,%esp 10c57b: 5b pop %ebx 10c57c: 5e pop %esi 10c57d: 5f pop %edi 10c57e: c9 leave 10c57f: c3 ret uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c580: 89 c8 mov %ecx,%eax 10c582: 83 e0 03 and $0x3,%eax 10c585: 74 05 je 10c58c <_Heap_Initialize+0x118> return value - remainder + alignment; 10c587: 83 c1 04 add $0x4,%ecx 10c58a: 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 ) { 10c58c: 83 f9 03 cmp $0x3,%ecx 10c58f: 77 0b ja 10c59c <_Heap_Initialize+0x128> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 10c591: 31 c0 xor %eax,%eax } 10c593: 83 c4 10 add $0x10,%esp 10c596: 5b pop %ebx 10c597: 5e pop %esi 10c598: 5f pop %edi 10c599: c9 leave 10c59a: c3 ret 10c59b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c59c: b8 10 00 00 00 mov $0x10,%eax 10c5a1: 31 d2 xor %edx,%edx 10c5a3: f7 f1 div %ecx if ( remainder != 0 ) { 10c5a5: 85 d2 test %edx,%edx 10c5a7: 74 0d je 10c5b6 <_Heap_Initialize+0x142> return value - remainder + alignment; 10c5a9: 8d 41 10 lea 0x10(%ecx),%eax 10c5ac: 29 d0 sub %edx,%eax 10c5ae: 89 45 f0 mov %eax,-0x10(%ebp) 10c5b1: e9 de fe ff ff jmp 10c494 <_Heap_Initialize+0x20> uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c5b6: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) 10c5bd: e9 d2 fe ff ff jmp 10c494 <_Heap_Initialize+0x20> 0011eec0 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11eec0: 55 push %ebp 11eec1: 89 e5 mov %esp,%ebp 11eec3: 57 push %edi 11eec4: 56 push %esi 11eec5: 53 push %ebx 11eec6: 83 ec 2c sub $0x2c,%esp 11eec9: 8b 5d 08 mov 0x8(%ebp),%ebx 11eecc: 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 ) 11eecf: 8d 4e f8 lea -0x8(%esi),%ecx 11eed2: 89 f0 mov %esi,%eax 11eed4: 31 d2 xor %edx,%edx 11eed6: f7 73 10 divl 0x10(%ebx) 11eed9: 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; 11eedb: 8b 45 14 mov 0x14(%ebp),%eax 11eede: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11eee4: 8b 55 18 mov 0x18(%ebp),%edx 11eee7: 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 11eeed: 39 4b 20 cmp %ecx,0x20(%ebx) 11eef0: 76 0e jbe 11ef00 <_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; 11eef2: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11eef7: 8d 65 f4 lea -0xc(%ebp),%esp 11eefa: 5b pop %ebx 11eefb: 5e pop %esi 11eefc: 5f pop %edi 11eefd: c9 leave 11eefe: c3 ret 11eeff: 90 nop <== NOT EXECUTED 11ef00: 39 4b 24 cmp %ecx,0x24(%ebx) 11ef03: 72 ed jb 11eef2 <_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; 11ef05: 8b 41 04 mov 0x4(%ecx),%eax 11ef08: 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; 11ef0b: 8d 3c 01 lea (%ecx,%eax,1),%edi 11ef0e: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11ef11: 89 fa mov %edi,%edx 11ef13: 29 f2 sub %esi,%edx 11ef15: 83 c2 04 add $0x4,%edx 11ef18: 89 55 dc mov %edx,-0x24(%ebp) 11ef1b: 8b 57 04 mov 0x4(%edi),%edx 11ef1e: 83 e2 fe and $0xfffffffe,%edx 11ef21: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11ef24: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 11ef28: 83 e2 01 and $0x1,%edx 11ef2b: 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; 11ef2e: 8b 55 dc mov -0x24(%ebp),%edx 11ef31: 8b 7d 14 mov 0x14(%ebp),%edi 11ef34: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11ef36: 8a 55 e0 mov -0x20(%ebp),%dl 11ef39: 80 f2 01 xor $0x1,%dl 11ef3c: 88 55 e0 mov %dl,-0x20(%ebp) 11ef3f: 75 17 jne 11ef58 <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11ef41: 8b 55 dc mov -0x24(%ebp),%edx 11ef44: 39 55 10 cmp %edx,0x10(%ebp) 11ef47: 76 20 jbe 11ef69 <_Heap_Resize_block+0xa9> 11ef49: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11ef4e: 8d 65 f4 lea -0xc(%ebp),%esp 11ef51: 5b pop %ebx 11ef52: 5e pop %esi 11ef53: 5f pop %edi 11ef54: c9 leave 11ef55: c3 ret 11ef56: 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; 11ef58: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11ef5b: 8b 7d d0 mov -0x30(%ebp),%edi 11ef5e: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 11ef61: 8b 55 dc mov -0x24(%ebp),%edx 11ef64: 39 55 10 cmp %edx,0x10(%ebp) 11ef67: 77 e0 ja 11ef49 <_Heap_Resize_block+0x89> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11ef69: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 11ef6d: 74 31 je 11efa0 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11ef6f: 8b 79 04 mov 0x4(%ecx),%edi 11ef72: 83 e7 01 and $0x1,%edi 11ef75: 09 c7 or %eax,%edi 11ef77: 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; 11ef7a: 8b 7d d4 mov -0x2c(%ebp),%edi 11ef7d: 8b 7f 08 mov 0x8(%edi),%edi 11ef80: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 11ef83: 8b 55 d4 mov -0x2c(%ebp),%edx 11ef86: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 11ef89: 8b 55 e4 mov -0x1c(%ebp),%edx 11ef8c: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11ef8f: 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; 11ef92: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 11ef97: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11ef9a: 8b 7d d0 mov -0x30(%ebp),%edi 11ef9d: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11efa0: ff 75 10 pushl 0x10(%ebp) 11efa3: 56 push %esi 11efa4: 51 push %ecx 11efa5: 53 push %ebx 11efa6: e8 fd d6 fe ff call 10c6a8 <_Heap_Block_allocate> 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; 11efab: 8b 50 04 mov 0x4(%eax),%edx 11efae: 83 e2 fe and $0xfffffffe,%edx 11efb1: 29 f0 sub %esi,%eax 11efb3: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11efb7: 8b 55 18 mov 0x18(%ebp),%edx 11efba: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11efbc: ff 43 54 incl 0x54(%ebx) 11efbf: 31 c0 xor %eax,%eax 11efc1: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11efc4: 8d 65 f4 lea -0xc(%ebp),%esp 11efc7: 5b pop %ebx 11efc8: 5e pop %esi 11efc9: 5f pop %edi 11efca: c9 leave 11efcb: c3 ret 0011efcc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11efcc: 55 push %ebp 11efcd: 89 e5 mov %esp,%ebp 11efcf: 56 push %esi 11efd0: 53 push %ebx 11efd1: 8b 5d 08 mov 0x8(%ebp),%ebx 11efd4: 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 ) 11efd7: 8d 4e f8 lea -0x8(%esi),%ecx 11efda: 89 f0 mov %esi,%eax 11efdc: 31 d2 xor %edx,%edx 11efde: f7 73 10 divl 0x10(%ebx) 11efe1: 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; 11efe3: 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 11efe6: 39 c1 cmp %eax,%ecx 11efe8: 72 07 jb 11eff1 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11efea: 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 11efed: 39 d1 cmp %edx,%ecx 11efef: 76 07 jbe 11eff8 <_Heap_Size_of_alloc_area+0x2c><== NEVER TAKEN return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 11eff1: 31 c0 xor %eax,%eax } 11eff3: 5b pop %ebx 11eff4: 5e pop %esi 11eff5: c9 leave 11eff6: c3 ret 11eff7: 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); 11eff8: 8b 59 04 mov 0x4(%ecx),%ebx 11effb: 83 e3 fe and $0xfffffffe,%ebx 11effe: 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 11f000: 39 c8 cmp %ecx,%eax 11f002: 77 ed ja 11eff1 <_Heap_Size_of_alloc_area+0x25><== ALWAYS TAKEN 11f004: 39 ca cmp %ecx,%edx 11f006: 72 e9 jb 11eff1 <_Heap_Size_of_alloc_area+0x25><== ALWAYS TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11f008: f6 41 04 01 testb $0x1,0x4(%ecx) 11f00c: 74 e3 je 11eff1 <_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; 11f00e: 29 f1 sub %esi,%ecx 11f010: 8d 51 04 lea 0x4(%ecx),%edx 11f013: 8b 45 10 mov 0x10(%ebp),%eax 11f016: 89 10 mov %edx,(%eax) 11f018: b0 01 mov $0x1,%al return true; } 11f01a: 5b pop %ebx 11f01b: 5e pop %esi 11f01c: c9 leave 11f01d: c3 ret 0010d210 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d210: 55 push %ebp 10d211: 89 e5 mov %esp,%ebp 10d213: 57 push %edi 10d214: 56 push %esi 10d215: 53 push %ebx 10d216: 83 ec 3c sub $0x3c,%esp 10d219: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d21c: 8b 43 10 mov 0x10(%ebx),%eax 10d21f: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d222: 8b 53 14 mov 0x14(%ebx),%edx 10d225: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d228: 8b 43 24 mov 0x24(%ebx),%eax 10d22b: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d22e: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d231: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d235: 75 1d jne 10d254 <_Heap_Walk+0x44> 10d237: c7 45 e4 08 d2 10 00 movl $0x10d208,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d23e: 83 3d 80 9c 12 00 03 cmpl $0x3,0x129c80 10d245: 74 1d je 10d264 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d247: b0 01 mov $0x1,%al block = next_block; } return true; } 10d249: 8d 65 f4 lea -0xc(%ebp),%esp 10d24c: 5b pop %ebx 10d24d: 5e pop %esi 10d24e: 5f pop %edi 10d24f: c9 leave 10d250: c3 ret 10d251: 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; 10d254: c7 45 e4 d8 d5 10 00 movl $0x10d5d8,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d25b: 83 3d 80 9c 12 00 03 cmpl $0x3,0x129c80 10d262: 75 e3 jne 10d247 <_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)( 10d264: 52 push %edx 10d265: ff 73 0c pushl 0xc(%ebx) 10d268: ff 73 08 pushl 0x8(%ebx) 10d26b: ff 75 d8 pushl -0x28(%ebp) 10d26e: 56 push %esi 10d26f: ff 73 1c pushl 0x1c(%ebx) 10d272: ff 73 18 pushl 0x18(%ebx) 10d275: ff 75 dc pushl -0x24(%ebp) 10d278: ff 75 e0 pushl -0x20(%ebp) 10d27b: 68 90 1d 12 00 push $0x121d90 10d280: 6a 00 push $0x0 10d282: ff 75 0c pushl 0xc(%ebp) 10d285: 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 ) { 10d288: 83 c4 30 add $0x30,%esp 10d28b: 8b 45 e0 mov -0x20(%ebp),%eax 10d28e: 85 c0 test %eax,%eax 10d290: 0f 84 b2 00 00 00 je 10d348 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d296: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d29a: 0f 85 b0 00 00 00 jne 10d350 <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d2a0: 8b 45 dc mov -0x24(%ebp),%eax 10d2a3: 31 d2 xor %edx,%edx 10d2a5: f7 75 e0 divl -0x20(%ebp) 10d2a8: 85 d2 test %edx,%edx 10d2aa: 0f 85 ac 00 00 00 jne 10d35c <_Heap_Walk+0x14c> ); return false; } if ( 10d2b0: 8d 46 08 lea 0x8(%esi),%eax 10d2b3: 31 d2 xor %edx,%edx 10d2b5: f7 75 e0 divl -0x20(%ebp) 10d2b8: 85 d2 test %edx,%edx 10d2ba: 0f 85 a8 00 00 00 jne 10d368 <_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; 10d2c0: 8b 56 04 mov 0x4(%esi),%edx 10d2c3: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d2c6: 83 e2 01 and $0x1,%edx 10d2c9: 0f 84 a1 00 00 00 je 10d370 <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d2cf: 8b 06 mov (%esi),%eax 10d2d1: 39 45 e0 cmp %eax,-0x20(%ebp) 10d2d4: 75 4e jne 10d324 <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d2d6: 8b 55 d8 mov -0x28(%ebp),%edx 10d2d9: 8b 42 04 mov 0x4(%edx),%eax 10d2dc: 83 e0 fe and $0xfffffffe,%eax 10d2df: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d2e4: 0f 84 bd 02 00 00 je 10d5a7 <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d2ea: 8b 43 10 mov 0x10(%ebx),%eax 10d2ed: 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; 10d2f0: 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 ) { 10d2f3: 39 cb cmp %ecx,%ebx 10d2f5: 0f 84 08 01 00 00 je 10d403 <_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; 10d2fb: 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 10d2fe: 39 cf cmp %ecx,%edi 10d300: 76 76 jbe 10d378 <_Heap_Walk+0x168> <== NEVER TAKEN 10d302: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d304: 51 push %ecx 10d305: 68 d8 1e 12 00 push $0x121ed8 10d30a: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d30c: 6a 01 push $0x1 10d30e: ff 75 0c pushl 0xc(%ebp) 10d311: ff 55 e4 call *-0x1c(%ebp) 10d314: 31 c0 xor %eax,%eax 10d316: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10d319: 8d 65 f4 lea -0xc(%ebp),%esp 10d31c: 5b pop %ebx 10d31d: 5e pop %esi 10d31e: 5f pop %edi 10d31f: c9 leave 10d320: c3 ret 10d321: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10d324: 83 ec 0c sub $0xc,%esp 10d327: ff 75 e0 pushl -0x20(%ebp) 10d32a: 50 push %eax 10d32b: 68 ac 1e 12 00 push $0x121eac return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d330: 6a 01 push $0x1 10d332: ff 75 0c pushl 0xc(%ebp) 10d335: ff 55 e4 call *-0x1c(%ebp) 10d338: 31 c0 xor %eax,%eax 10d33a: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10d33d: 8d 65 f4 lea -0xc(%ebp),%esp 10d340: 5b pop %ebx 10d341: 5e pop %esi 10d342: 5f pop %edi 10d343: c9 leave 10d344: c3 ret 10d345: 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" ); 10d348: 57 push %edi 10d349: 68 07 21 12 00 push $0x122107 10d34e: eb bc jmp 10d30c <_Heap_Walk+0xfc> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d350: ff 75 e0 pushl -0x20(%ebp) 10d353: 68 1a 21 12 00 push $0x12211a 10d358: eb b2 jmp 10d30c <_Heap_Walk+0xfc> 10d35a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d35c: ff 75 dc pushl -0x24(%ebp) 10d35f: 68 24 1e 12 00 push $0x121e24 10d364: eb a6 jmp 10d30c <_Heap_Walk+0xfc> 10d366: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d368: 56 push %esi 10d369: 68 48 1e 12 00 push $0x121e48 10d36e: eb 9c jmp 10d30c <_Heap_Walk+0xfc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d370: 56 push %esi 10d371: 68 7c 1e 12 00 push $0x121e7c 10d376: eb 94 jmp 10d30c <_Heap_Walk+0xfc> && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d378: 8b 53 24 mov 0x24(%ebx),%edx 10d37b: 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 10d37e: 39 ca cmp %ecx,%edx 10d380: 72 82 jb 10d304 <_Heap_Walk+0xf4> <== ALWAYS TAKEN ); return false; } if ( 10d382: 8d 41 08 lea 0x8(%ecx),%eax 10d385: 31 d2 xor %edx,%edx 10d387: f7 75 d4 divl -0x2c(%ebp) 10d38a: 85 d2 test %edx,%edx 10d38c: 0f 85 20 02 00 00 jne 10d5b2 <_Heap_Walk+0x3a2> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d392: 8b 41 04 mov 0x4(%ecx),%eax 10d395: 83 e0 fe and $0xfffffffe,%eax 10d398: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d39d: 0f 85 29 02 00 00 jne 10d5cc <_Heap_Walk+0x3bc> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10d3a3: 8b 41 0c mov 0xc(%ecx),%eax 10d3a6: 39 c3 cmp %eax,%ebx 10d3a8: 0f 85 0f 02 00 00 jne 10d5bd <_Heap_Walk+0x3ad> <== ALWAYS TAKEN 10d3ae: 89 75 c8 mov %esi,-0x38(%ebp) 10d3b1: 89 de mov %ebx,%esi 10d3b3: eb 40 jmp 10d3f5 <_Heap_Walk+0x1e5> 10d3b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d3b8: 39 f9 cmp %edi,%ecx 10d3ba: 0f 82 44 ff ff ff jb 10d304 <_Heap_Walk+0xf4> 10d3c0: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d3c3: 0f 82 3b ff ff ff jb 10d304 <_Heap_Walk+0xf4> <== ALWAYS TAKEN ); return false; } if ( 10d3c9: 8d 41 08 lea 0x8(%ecx),%eax 10d3cc: 31 d2 xor %edx,%edx 10d3ce: f7 75 d4 divl -0x2c(%ebp) 10d3d1: 85 d2 test %edx,%edx 10d3d3: 0f 85 d9 01 00 00 jne 10d5b2 <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d3d9: 8b 41 04 mov 0x4(%ecx),%eax 10d3dc: 83 e0 fe and $0xfffffffe,%eax 10d3df: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d3e4: 0f 85 e2 01 00 00 jne 10d5cc <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10d3ea: 8b 41 0c mov 0xc(%ecx),%eax 10d3ed: 39 d8 cmp %ebx,%eax 10d3ef: 0f 85 c8 01 00 00 jne 10d5bd <_Heap_Walk+0x3ad> (*printer)( 10d3f5: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10d3f7: 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 ) { 10d3fa: 39 ce cmp %ecx,%esi 10d3fc: 75 ba jne 10d3b8 <_Heap_Walk+0x1a8> 10d3fe: 89 f3 mov %esi,%ebx 10d400: 8b 75 c8 mov -0x38(%ebp),%esi if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d403: 39 75 d8 cmp %esi,-0x28(%ebp) 10d406: 0f 84 3b fe ff ff je 10d247 <_Heap_Walk+0x37> <== ALWAYS TAKEN 10d40c: 8b 45 cc mov -0x34(%ebp),%eax 10d40f: 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; 10d410: 89 c1 mov %eax,%ecx 10d412: 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); 10d415: 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 ) { 10d418: a8 01 test $0x1,%al 10d41a: 74 30 je 10d44c <_Heap_Walk+0x23c> (*printer)( 10d41c: 83 ec 0c sub $0xc,%esp 10d41f: 51 push %ecx 10d420: 56 push %esi 10d421: 68 69 21 12 00 push $0x122169 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d426: 6a 00 push $0x0 10d428: ff 75 0c pushl 0xc(%ebp) 10d42b: 89 4d c4 mov %ecx,-0x3c(%ebp) 10d42e: ff 55 e4 call *-0x1c(%ebp) 10d431: 83 c4 20 add $0x20,%esp 10d434: 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 10d437: 39 7b 20 cmp %edi,0x20(%ebx) 10d43a: 76 20 jbe 10d45c <_Heap_Walk+0x24c> <== NEVER TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d43c: 83 ec 0c sub $0xc,%esp 10d43f: 57 push %edi 10d440: 56 push %esi 10d441: 68 84 1f 12 00 push $0x121f84 10d446: e9 e5 fe ff ff jmp 10d330 <_Heap_Walk+0x120> 10d44b: 90 nop <== NOT EXECUTED "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d44c: 83 ec 08 sub $0x8,%esp 10d44f: ff 36 pushl (%esi) 10d451: 51 push %ecx 10d452: 56 push %esi 10d453: 68 5c 1f 12 00 push $0x121f5c 10d458: eb cc jmp 10d426 <_Heap_Walk+0x216> 10d45a: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d45c: 39 7b 24 cmp %edi,0x24(%ebx) 10d45f: 72 db jb 10d43c <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10d461: 89 c8 mov %ecx,%eax 10d463: 31 d2 xor %edx,%edx 10d465: f7 75 e0 divl -0x20(%ebp) 10d468: 85 d2 test %edx,%edx 10d46a: 0f 85 02 01 00 00 jne 10d572 <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10d470: 39 4d dc cmp %ecx,-0x24(%ebp) 10d473: 0f 87 0b 01 00 00 ja 10d584 <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10d479: 39 fe cmp %edi,%esi 10d47b: 0f 83 17 01 00 00 jae 10d598 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d481: f6 47 04 01 testb $0x1,0x4(%edi) 10d485: 0f 85 91 00 00 00 jne 10d51c <_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; 10d48b: 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; 10d48e: 8b 46 04 mov 0x4(%esi),%eax 10d491: 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; 10d494: 83 e0 fe and $0xfffffffe,%eax 10d497: 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); 10d49a: 01 f0 add %esi,%eax 10d49c: 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)( 10d49f: 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; 10d4a2: 39 53 0c cmp %edx,0xc(%ebx) 10d4a5: 0f 84 99 00 00 00 je 10d544 <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10d4ab: 39 da cmp %ebx,%edx 10d4ad: 0f 84 a9 00 00 00 je 10d55c <_Heap_Walk+0x34c> 10d4b3: c7 45 c8 d9 1c 12 00 movl $0x121cd9,-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)( 10d4ba: 8b 46 0c mov 0xc(%esi),%eax 10d4bd: 39 c1 cmp %eax,%ecx 10d4bf: 74 7b je 10d53c <_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)" : ""), 10d4c1: 39 d8 cmp %ebx,%eax 10d4c3: 0f 84 9f 00 00 00 je 10d568 <_Heap_Walk+0x358> 10d4c9: b9 d9 1c 12 00 mov $0x121cd9,%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)( 10d4ce: ff 75 c8 pushl -0x38(%ebp) 10d4d1: 52 push %edx 10d4d2: 51 push %ecx 10d4d3: 50 push %eax 10d4d4: 56 push %esi 10d4d5: 68 44 20 12 00 push $0x122044 10d4da: 6a 00 push $0x0 10d4dc: ff 75 0c pushl 0xc(%ebp) 10d4df: 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 ) { 10d4e2: 8b 55 d0 mov -0x30(%ebp),%edx 10d4e5: 8b 02 mov (%edx),%eax 10d4e7: 83 c4 20 add $0x20,%esp 10d4ea: 39 45 d4 cmp %eax,-0x2c(%ebp) 10d4ed: 74 11 je 10d500 <_Heap_Walk+0x2f0> (*printer)( 10d4ef: 51 push %ecx 10d4f0: 52 push %edx 10d4f1: 50 push %eax 10d4f2: ff 75 d4 pushl -0x2c(%ebp) 10d4f5: 56 push %esi 10d4f6: 68 70 20 12 00 push $0x122070 10d4fb: e9 30 fe ff ff jmp 10d330 <_Heap_Walk+0x120> ); return false; } if ( !prev_used ) { 10d500: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10d504: 74 4a je 10d550 <_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; 10d506: 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 ) { 10d509: 39 d8 cmp %ebx,%eax 10d50b: 75 0a jne 10d517 <_Heap_Walk+0x307> <== NEVER TAKEN 10d50d: eb 21 jmp 10d530 <_Heap_Walk+0x320> <== NOT EXECUTED 10d50f: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10d510: 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 ) { 10d513: 39 d8 cmp %ebx,%eax 10d515: 74 19 je 10d530 <_Heap_Walk+0x320> if ( free_block == block ) { 10d517: 39 f0 cmp %esi,%eax 10d519: 75 f5 jne 10d510 <_Heap_Walk+0x300> 10d51b: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d51c: 39 7d d8 cmp %edi,-0x28(%ebp) 10d51f: 0f 84 22 fd ff ff je 10d247 <_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 ) { 10d525: 8b 47 04 mov 0x4(%edi),%eax 10d528: 89 fe mov %edi,%esi 10d52a: e9 e1 fe ff ff jmp 10d410 <_Heap_Walk+0x200> 10d52f: 90 nop <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d530: 56 push %esi 10d531: 68 dc 20 12 00 push $0x1220dc 10d536: e9 d1 fd ff ff jmp 10d30c <_Heap_Walk+0xfc> 10d53b: 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)( 10d53c: b9 94 21 12 00 mov $0x122194,%ecx 10d541: eb 8b jmp 10d4ce <_Heap_Walk+0x2be> 10d543: 90 nop <== NOT EXECUTED } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10d544: c7 45 c8 80 21 12 00 movl $0x122180,-0x38(%ebp) 10d54b: e9 6a ff ff ff jmp 10d4ba <_Heap_Walk+0x2aa> return false; } if ( !prev_used ) { (*printer)( 10d550: 56 push %esi 10d551: 68 ac 20 12 00 push $0x1220ac 10d556: e9 b1 fd ff ff jmp 10d30c <_Heap_Walk+0xfc> 10d55b: 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)" : "") 10d55c: c7 45 c8 8a 21 12 00 movl $0x12218a,-0x38(%ebp) 10d563: e9 52 ff ff ff jmp 10d4ba <_Heap_Walk+0x2aa> "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)" : ""), 10d568: b9 9f 21 12 00 mov $0x12219f,%ecx 10d56d: e9 5c ff ff ff jmp 10d4ce <_Heap_Walk+0x2be> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10d572: 83 ec 0c sub $0xc,%esp 10d575: 51 push %ecx 10d576: 56 push %esi 10d577: 68 b4 1f 12 00 push $0x121fb4 10d57c: e9 af fd ff ff jmp 10d330 <_Heap_Walk+0x120> 10d581: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( block_size < min_block_size ) { (*printer)( 10d584: 83 ec 08 sub $0x8,%esp 10d587: ff 75 dc pushl -0x24(%ebp) 10d58a: 51 push %ecx 10d58b: 56 push %esi 10d58c: 68 e4 1f 12 00 push $0x121fe4 10d591: e9 9a fd ff ff jmp 10d330 <_Heap_Walk+0x120> 10d596: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10d598: 83 ec 0c sub $0xc,%esp 10d59b: 57 push %edi 10d59c: 56 push %esi 10d59d: 68 10 20 12 00 push $0x122010 10d5a2: e9 89 fd ff ff jmp 10d330 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d5a7: 53 push %ebx 10d5a8: 68 38 21 12 00 push $0x122138 10d5ad: e9 5a fd ff ff jmp 10d30c <_Heap_Walk+0xfc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d5b2: 51 push %ecx 10d5b3: 68 f8 1e 12 00 push $0x121ef8 10d5b8: e9 4f fd ff ff jmp 10d30c <_Heap_Walk+0xfc> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d5bd: 83 ec 0c sub $0xc,%esp 10d5c0: 50 push %eax 10d5c1: 51 push %ecx 10d5c2: 68 28 1f 12 00 push $0x121f28 10d5c7: e9 64 fd ff ff jmp 10d330 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d5cc: 51 push %ecx 10d5cd: 68 4d 21 12 00 push $0x12214d 10d5d2: e9 35 fd ff ff jmp 10d30c <_Heap_Walk+0xfc> 0010bc50 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10bc50: 55 push %ebp 10bc51: 89 e5 mov %esp,%ebp 10bc53: 53 push %ebx 10bc54: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bc57: 8b 15 40 7e 12 00 mov 0x127e40,%edx 10bc5d: 85 d2 test %edx,%edx 10bc5f: 74 1a je 10bc7b <_IO_Initialize_all_drivers+0x2b><== ALWAYS TAKEN 10bc61: 31 db xor %ebx,%ebx 10bc63: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10bc64: 50 push %eax 10bc65: 6a 00 push $0x0 10bc67: 6a 00 push $0x0 10bc69: 53 push %ebx 10bc6a: e8 9d 4c 00 00 call 11090c void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bc6f: 43 inc %ebx 10bc70: 83 c4 10 add $0x10,%esp 10bc73: 39 1d 40 7e 12 00 cmp %ebx,0x127e40 10bc79: 77 e9 ja 10bc64 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10bc7b: 8b 5d fc mov -0x4(%ebp),%ebx 10bc7e: c9 leave 10bc7f: c3 ret 0010bc80 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bc80: 55 push %ebp 10bc81: 89 e5 mov %esp,%ebp 10bc83: 57 push %edi 10bc84: 56 push %esi 10bc85: 53 push %ebx 10bc86: 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; 10bc89: 8b 1d 54 32 12 00 mov 0x123254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bc8f: a1 50 32 12 00 mov 0x123250,%eax 10bc94: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bc97: 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 ) 10bc9d: 39 f0 cmp %esi,%eax 10bc9f: 72 17 jb 10bcb8 <_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; 10bca1: 89 1d 44 7e 12 00 mov %ebx,0x127e44 _IO_Number_of_drivers = number_of_drivers; 10bca7: 8b 45 e4 mov -0x1c(%ebp),%eax 10bcaa: a3 40 7e 12 00 mov %eax,0x127e40 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bcaf: 8d 65 f4 lea -0xc(%ebp),%esp 10bcb2: 5b pop %ebx 10bcb3: 5e pop %esi 10bcb4: 5f pop %edi 10bcb5: c9 leave 10bcb6: c3 ret 10bcb7: 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 *) 10bcb8: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bcbb: c1 e1 03 shl $0x3,%ecx 10bcbe: 83 ec 0c sub $0xc,%esp 10bcc1: 51 push %ecx 10bcc2: 89 4d dc mov %ecx,-0x24(%ebp) 10bcc5: e8 0e 2a 00 00 call 10e6d8 <_Workspace_Allocate_or_fatal_error> 10bcca: 89 c2 mov %eax,%edx 10bccc: a3 44 7e 12 00 mov %eax,0x127e44 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bcd1: 89 35 40 7e 12 00 mov %esi,0x127e40 memset( 10bcd7: 31 c0 xor %eax,%eax 10bcd9: 8b 4d dc mov -0x24(%ebp),%ecx 10bcdc: 89 d7 mov %edx,%edi 10bcde: 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++ ) 10bce0: 83 c4 10 add $0x10,%esp 10bce3: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bce6: 85 c9 test %ecx,%ecx 10bce8: 74 c5 je 10bcaf <_IO_Manager_initialization+0x2f><== ALWAYS TAKEN 10bcea: a1 44 7e 12 00 mov 0x127e44,%eax 10bcef: 89 45 e0 mov %eax,-0x20(%ebp) 10bcf2: 31 c0 xor %eax,%eax 10bcf4: 31 d2 xor %edx,%edx 10bcf6: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10bcf8: 8b 7d e0 mov -0x20(%ebp),%edi 10bcfb: 01 c7 add %eax,%edi 10bcfd: 8d 34 03 lea (%ebx,%eax,1),%esi 10bd00: b9 06 00 00 00 mov $0x6,%ecx 10bd05: 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++ ) 10bd07: 42 inc %edx 10bd08: 83 c0 18 add $0x18,%eax 10bd0b: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bd0e: 77 e8 ja 10bcf8 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bd10: 8d 65 f4 lea -0xc(%ebp),%esp 10bd13: 5b pop %ebx 10bd14: 5e pop %esi 10bd15: 5f pop %edi 10bd16: c9 leave 10bd17: c3 ret 0010c798 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c798: 55 push %ebp 10c799: 89 e5 mov %esp,%ebp 10c79b: 53 push %ebx 10c79c: 83 ec 08 sub $0x8,%esp 10c79f: 8b 45 08 mov 0x8(%ebp),%eax 10c7a2: 8b 55 0c mov 0xc(%ebp),%edx 10c7a5: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c7a8: a3 a0 74 12 00 mov %eax,0x1274a0 _Internal_errors_What_happened.is_internal = is_internal; 10c7ad: 88 15 a4 74 12 00 mov %dl,0x1274a4 _Internal_errors_What_happened.the_error = the_error; 10c7b3: 89 1d a8 74 12 00 mov %ebx,0x1274a8 _User_extensions_Fatal( the_source, is_internal, the_error ); 10c7b9: 53 push %ebx 10c7ba: 0f b6 d2 movzbl %dl,%edx 10c7bd: 52 push %edx 10c7be: 50 push %eax 10c7bf: e8 ac 1b 00 00 call 10e370 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c7c4: c7 05 c0 75 12 00 05 movl $0x5,0x1275c0 <== NOT EXECUTED 10c7cb: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c7ce: fa cli <== NOT EXECUTED 10c7cf: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c7d1: f4 hlt <== NOT EXECUTED 10c7d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c7d5: eb fe jmp 10c7d5 <_Internal_error_Occurred+0x3d><== NOT EXECUTED 00110f34 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110f34: 55 push %ebp 110f35: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 110f37: 8b 45 08 mov 0x8(%ebp),%eax 110f3a: 48 dec %eax 110f3b: 83 f8 03 cmp $0x3,%eax 110f3e: 77 0c ja 110f4c <_Objects_API_maximum_class+0x18> 110f40: 8b 04 85 fc 13 12 00 mov 0x1213fc(,%eax,4),%eax 110f47: c9 leave 110f48: c3 ret 110f49: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110f4c: 31 c0 xor %eax,%eax 110f4e: c9 leave 110f4f: c3 ret 0010c830 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c830: 55 push %ebp 10c831: 89 e5 mov %esp,%ebp 10c833: 56 push %esi 10c834: 53 push %ebx 10c835: 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 ) 10c838: 8b 43 18 mov 0x18(%ebx),%eax 10c83b: 85 c0 test %eax,%eax 10c83d: 75 0d jne 10c84c <_Objects_Allocate+0x1c><== NEVER TAKEN 10c83f: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10c841: 89 c8 mov %ecx,%eax 10c843: 8d 65 f8 lea -0x8(%ebp),%esp 10c846: 5b pop %ebx 10c847: 5e pop %esi 10c848: c9 leave 10c849: c3 ret 10c84a: 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 ); 10c84c: 8d 73 20 lea 0x20(%ebx),%esi 10c84f: 83 ec 0c sub $0xc,%esp 10c852: 56 push %esi 10c853: e8 e4 f6 ff ff call 10bf3c <_Chain_Get> 10c858: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c85a: 83 c4 10 add $0x10,%esp 10c85d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c861: 74 de je 10c841 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c863: 85 c0 test %eax,%eax 10c865: 74 29 je 10c890 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c867: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c86b: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c86f: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10c871: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c875: 31 d2 xor %edx,%edx 10c877: f7 f6 div %esi 10c879: c1 e0 02 shl $0x2,%eax 10c87c: 03 43 30 add 0x30(%ebx),%eax 10c87f: ff 08 decl (%eax) information->inactive--; 10c881: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10c885: 89 c8 mov %ecx,%eax 10c887: 8d 65 f8 lea -0x8(%ebp),%esp 10c88a: 5b pop %ebx 10c88b: 5e pop %esi 10c88c: c9 leave 10c88d: c3 ret 10c88e: 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 ); 10c890: 83 ec 0c sub $0xc,%esp 10c893: 53 push %ebx 10c894: e8 3b 00 00 00 call 10c8d4 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c899: 89 34 24 mov %esi,(%esp) 10c89c: e8 9b f6 ff ff call 10bf3c <_Chain_Get> 10c8a1: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c8a3: 83 c4 10 add $0x10,%esp 10c8a6: 85 c0 test %eax,%eax 10c8a8: 74 97 je 10c841 <_Objects_Allocate+0x11> 10c8aa: eb bb jmp 10c867 <_Objects_Allocate+0x37> 0010c8d4 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c8d4: 55 push %ebp 10c8d5: 89 e5 mov %esp,%ebp 10c8d7: 57 push %edi 10c8d8: 56 push %esi 10c8d9: 53 push %ebx 10c8da: 83 ec 4c sub $0x4c,%esp 10c8dd: 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 ); 10c8e0: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c8e4: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c8e7: 8b 4b 34 mov 0x34(%ebx),%ecx 10c8ea: 85 c9 test %ecx,%ecx 10c8ec: 0f 84 72 02 00 00 je 10cb64 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c8f2: 8b 7b 10 mov 0x10(%ebx),%edi 10c8f5: 66 89 7d d4 mov %di,-0x2c(%ebp) 10c8f9: 8b 7b 14 mov 0x14(%ebx),%edi 10c8fc: 31 d2 xor %edx,%edx 10c8fe: 8b 45 d4 mov -0x2c(%ebp),%eax 10c901: 66 f7 f7 div %di 10c904: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c907: 85 f6 test %esi,%esi 10c909: 0f 84 6c 02 00 00 je 10cb7b <_Objects_Extend_information+0x2a7><== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 10c90f: 8b 01 mov (%ecx),%eax 10c911: 85 c0 test %eax,%eax 10c913: 0f 84 72 02 00 00 je 10cb8b <_Objects_Extend_information+0x2b7><== ALWAYS TAKEN 10c919: 0f b7 ff movzwl %di,%edi 10c91c: 8b 55 d0 mov -0x30(%ebp),%edx 10c91f: 89 55 cc mov %edx,-0x34(%ebp) 10c922: 31 d2 xor %edx,%edx 10c924: 8b 45 cc mov -0x34(%ebp),%eax 10c927: eb 09 jmp 10c932 <_Objects_Extend_information+0x5e> 10c929: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c92c: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10c930: 74 07 je 10c939 <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10c932: 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++ ) { 10c934: 42 inc %edx 10c935: 39 d6 cmp %edx,%esi 10c937: 77 f3 ja 10c92c <_Objects_Extend_information+0x58> 10c939: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10c93c: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10c940: 01 f8 add %edi,%eax 10c942: 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 ) { 10c945: 3d ff ff 00 00 cmp $0xffff,%eax 10c94a: 0f 87 b1 01 00 00 ja 10cb01 <_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; 10c950: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10c954: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c958: 0f 85 ae 01 00 00 jne 10cb0c <_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 ); 10c95e: 83 ec 0c sub $0xc,%esp 10c961: 57 push %edi 10c962: 89 55 b4 mov %edx,-0x4c(%ebp) 10c965: e8 6e 1d 00 00 call 10e6d8 <_Workspace_Allocate_or_fatal_error> 10c96a: 89 45 c4 mov %eax,-0x3c(%ebp) 10c96d: 83 c4 10 add $0x10,%esp 10c970: 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 ) { 10c973: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c977: 39 45 cc cmp %eax,-0x34(%ebp) 10c97a: 0f 82 fe 00 00 00 jb 10ca7e <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10c980: 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 ); 10c983: 83 ec 0c sub $0xc,%esp 10c986: 8d 04 7f lea (%edi,%edi,2),%eax 10c989: 03 45 d4 add -0x2c(%ebp),%eax 10c98c: 03 45 d0 add -0x30(%ebp),%eax 10c98f: c1 e0 02 shl $0x2,%eax 10c992: 50 push %eax 10c993: 89 55 b4 mov %edx,-0x4c(%ebp) 10c996: e8 69 1d 00 00 call 10e704 <_Workspace_Allocate> 10c99b: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10c99e: 83 c4 10 add $0x10,%esp 10c9a1: 85 c0 test %eax,%eax 10c9a3: 8b 55 b4 mov -0x4c(%ebp),%edx 10c9a6: 0f 84 ef 01 00 00 je 10cb9b <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10c9ac: 8b 45 c8 mov -0x38(%ebp),%eax 10c9af: 8d 04 b8 lea (%eax,%edi,4),%eax 10c9b2: 89 45 b8 mov %eax,-0x48(%ebp) 10c9b5: 8b 4d c8 mov -0x38(%ebp),%ecx 10c9b8: 8d 3c f9 lea (%ecx,%edi,8),%edi 10c9bb: 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 ) { 10c9be: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c9c2: 39 45 d0 cmp %eax,-0x30(%ebp) 10c9c5: 0f 82 60 01 00 00 jb 10cb2b <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10c9cb: 8b 45 d0 mov -0x30(%ebp),%eax 10c9ce: 85 c0 test %eax,%eax 10c9d0: 74 16 je 10c9e8 <_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, 10c9d2: 31 c0 xor %eax,%eax 10c9d4: 8b 4d bc mov -0x44(%ebp),%ecx 10c9d7: 8b 7d d0 mov -0x30(%ebp),%edi 10c9da: 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; 10c9dc: 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++ ) { 10c9e3: 40 inc %eax 10c9e4: 39 c7 cmp %eax,%edi 10c9e6: 77 f4 ja 10c9dc <_Objects_Extend_information+0x108><== ALWAYS TAKEN 10c9e8: c1 e6 02 shl $0x2,%esi 10c9eb: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10c9ee: 8b 45 c8 mov -0x38(%ebp),%eax 10c9f1: 8b 7d c0 mov -0x40(%ebp),%edi 10c9f4: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10c9fb: 8b 4d b8 mov -0x48(%ebp),%ecx 10c9fe: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10ca05: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10ca09: 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 ; 10ca0c: 39 75 cc cmp %esi,-0x34(%ebp) 10ca0f: 73 19 jae 10ca2a <_Objects_Extend_information+0x156><== ALWAYS TAKEN 10ca11: 8b 7d cc mov -0x34(%ebp),%edi 10ca14: 8b 45 bc mov -0x44(%ebp),%eax 10ca17: 8d 0c b8 lea (%eax,%edi,4),%ecx 10ca1a: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10ca1c: 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++ ) { 10ca22: 40 inc %eax 10ca23: 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 ; 10ca26: 39 f0 cmp %esi,%eax 10ca28: 72 f2 jb 10ca1c <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10ca2a: 9c pushf 10ca2b: fa cli 10ca2c: 5f pop %edi old_tables = information->object_blocks; 10ca2d: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10ca30: 8b 45 c8 mov -0x38(%ebp),%eax 10ca33: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10ca36: 8b 45 b8 mov -0x48(%ebp),%eax 10ca39: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10ca3c: 8b 45 bc mov -0x44(%ebp),%eax 10ca3f: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10ca42: 8b 45 d4 mov -0x2c(%ebp),%eax 10ca45: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10ca49: 8b 33 mov (%ebx),%esi 10ca4b: c1 e6 18 shl $0x18,%esi 10ca4e: 81 ce 00 00 01 00 or $0x10000,%esi 10ca54: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10ca58: c1 e0 1b shl $0x1b,%eax 10ca5b: 09 c6 or %eax,%esi 10ca5d: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10ca61: 09 c6 or %eax,%esi 10ca63: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10ca66: 57 push %edi 10ca67: 9d popf if ( old_tables ) 10ca68: 85 c9 test %ecx,%ecx 10ca6a: 74 12 je 10ca7e <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10ca6c: 83 ec 0c sub $0xc,%esp 10ca6f: 51 push %ecx 10ca70: 89 55 b4 mov %edx,-0x4c(%ebp) 10ca73: e8 a8 1c 00 00 call 10e720 <_Workspace_Free> 10ca78: 83 c4 10 add $0x10,%esp 10ca7b: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10ca7e: c1 e2 02 shl $0x2,%edx 10ca81: 89 55 d0 mov %edx,-0x30(%ebp) 10ca84: 8b 43 34 mov 0x34(%ebx),%eax 10ca87: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca8a: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10ca8d: ff 73 18 pushl 0x18(%ebx) 10ca90: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10ca94: 52 push %edx 10ca95: 8b 7d d0 mov -0x30(%ebp),%edi 10ca98: ff 34 38 pushl (%eax,%edi,1) 10ca9b: 8d 7d dc lea -0x24(%ebp),%edi 10ca9e: 57 push %edi 10ca9f: e8 c8 3e 00 00 call 11096c <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10caa4: 8d 43 20 lea 0x20(%ebx),%eax 10caa7: 89 45 d4 mov %eax,-0x2c(%ebp) 10caaa: 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 ) { 10caad: 83 c4 10 add $0x10,%esp 10cab0: eb 2b jmp 10cadd <_Objects_Extend_information+0x209> 10cab2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object->id = _Objects_Build_id( 10cab4: 8b 13 mov (%ebx),%edx 10cab6: c1 e2 18 shl $0x18,%edx 10cab9: 81 ca 00 00 01 00 or $0x10000,%edx 10cabf: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10cac3: c1 e1 1b shl $0x1b,%ecx 10cac6: 09 ca or %ecx,%edx 10cac8: 09 f2 or %esi,%edx 10caca: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cacd: 83 ec 08 sub $0x8,%esp 10cad0: 50 push %eax 10cad1: ff 75 d4 pushl -0x2c(%ebp) 10cad4: e8 3f f4 ff ff call 10bf18 <_Chain_Append> index++; 10cad9: 46 inc %esi 10cada: 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 ) { 10cadd: 83 ec 0c sub $0xc,%esp 10cae0: 57 push %edi 10cae1: e8 56 f4 ff ff call 10bf3c <_Chain_Get> 10cae6: 83 c4 10 add $0x10,%esp 10cae9: 85 c0 test %eax,%eax 10caeb: 75 c7 jne 10cab4 <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10caed: 8b 43 30 mov 0x30(%ebx),%eax 10caf0: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10caf4: 8b 4d d0 mov -0x30(%ebp),%ecx 10caf7: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10cafa: 8b 43 14 mov 0x14(%ebx),%eax 10cafd: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10cb01: 8d 65 f4 lea -0xc(%ebp),%esp 10cb04: 5b pop %ebx 10cb05: 5e pop %esi 10cb06: 5f pop %edi 10cb07: c9 leave 10cb08: c3 ret 10cb09: 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 ); 10cb0c: 83 ec 0c sub $0xc,%esp 10cb0f: 57 push %edi 10cb10: 89 55 b4 mov %edx,-0x4c(%ebp) 10cb13: e8 ec 1b 00 00 call 10e704 <_Workspace_Allocate> 10cb18: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10cb1b: 83 c4 10 add $0x10,%esp 10cb1e: 85 c0 test %eax,%eax 10cb20: 8b 55 b4 mov -0x4c(%ebp),%edx 10cb23: 0f 85 4a fe ff ff jne 10c973 <_Objects_Extend_information+0x9f> 10cb29: eb d6 jmp 10cb01 <_Objects_Extend_information+0x22d> /* * 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, 10cb2b: c1 e6 02 shl $0x2,%esi 10cb2e: 89 75 c0 mov %esi,-0x40(%ebp) 10cb31: 8b 73 34 mov 0x34(%ebx),%esi 10cb34: 8b 7d c8 mov -0x38(%ebp),%edi 10cb37: 8b 4d c0 mov -0x40(%ebp),%ecx 10cb3a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cb3c: 8b 73 30 mov 0x30(%ebx),%esi 10cb3f: 8b 7d b8 mov -0x48(%ebp),%edi 10cb42: 8b 4d c0 mov -0x40(%ebp),%ecx 10cb45: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10cb47: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10cb4b: 03 45 d0 add -0x30(%ebp),%eax 10cb4e: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10cb55: 8b 73 1c mov 0x1c(%ebx),%esi 10cb58: 8b 7d bc mov -0x44(%ebp),%edi 10cb5b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cb5d: e9 8c fe ff ff jmp 10c9ee <_Objects_Extend_information+0x11a> 10cb62: 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 ) 10cb64: 8b 53 10 mov 0x10(%ebx),%edx 10cb67: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10cb6b: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10cb6f: 89 45 cc mov %eax,-0x34(%ebp) 10cb72: 31 d2 xor %edx,%edx 10cb74: 31 f6 xor %esi,%esi 10cb76: e9 c1 fd ff ff jmp 10c93c <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cb7b: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10cb7e: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10cb81: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10cb84: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cb86: e9 b1 fd ff ff jmp 10c93c <_Objects_Extend_information+0x68><== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10cb8b: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10cb8e: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10cb91: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10cb94: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cb96: e9 a1 fd ff ff jmp 10c93c <_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 ); 10cb9b: 83 ec 0c sub $0xc,%esp 10cb9e: ff 75 c4 pushl -0x3c(%ebp) 10cba1: e8 7a 1b 00 00 call 10e720 <_Workspace_Free> return; 10cba6: 83 c4 10 add $0x10,%esp 10cba9: e9 53 ff ff ff jmp 10cb01 <_Objects_Extend_information+0x22d> 0010cce0 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10cce0: 55 push %ebp 10cce1: 89 e5 mov %esp,%ebp 10cce3: 53 push %ebx 10cce4: 83 ec 14 sub $0x14,%esp 10cce7: 8b 55 08 mov 0x8(%ebp),%edx 10ccea: 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; 10cced: b8 01 00 00 00 mov $0x1,%eax 10ccf2: 2b 42 08 sub 0x8(%edx),%eax 10ccf5: 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 ) { 10ccf8: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10ccfc: 39 c8 cmp %ecx,%eax 10ccfe: 77 24 ja 10cd24 <_Objects_Get+0x44> 10cd00: 8b 0d f8 73 12 00 mov 0x1273f8,%ecx 10cd06: 41 inc %ecx 10cd07: 89 0d f8 73 12 00 mov %ecx,0x1273f8 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10cd0d: 8b 52 1c mov 0x1c(%edx),%edx 10cd10: 8b 04 82 mov (%edx,%eax,4),%eax 10cd13: 85 c0 test %eax,%eax 10cd15: 74 1b je 10cd32 <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10cd17: 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 } 10cd1d: 83 c4 14 add $0x14,%esp 10cd20: 5b pop %ebx 10cd21: c9 leave 10cd22: c3 ret 10cd23: 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; 10cd24: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cd2a: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cd2c: 83 c4 14 add $0x14,%esp 10cd2f: 5b pop %ebx 10cd30: c9 leave 10cd31: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10cd32: 89 45 f4 mov %eax,-0xc(%ebp) 10cd35: e8 1a 08 00 00 call 10d554 <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10cd3a: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cd40: 8b 45 f4 mov -0xc(%ebp),%eax 10cd43: eb d8 jmp 10cd1d <_Objects_Get+0x3d> 0010cc40 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10cc40: 55 push %ebp 10cc41: 89 e5 mov %esp,%ebp 10cc43: 56 push %esi 10cc44: 53 push %ebx 10cc45: 8b 75 08 mov 0x8(%ebp),%esi 10cc48: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cc4b: 85 db test %ebx,%ebx 10cc4d: 75 09 jne 10cc58 <_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 ) 10cc4f: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10cc51: 8d 65 f8 lea -0x8(%ebp),%esp 10cc54: 5b pop %ebx 10cc55: 5e pop %esi 10cc56: c9 leave 10cc57: 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 ); 10cc58: 83 ec 0c sub $0xc,%esp 10cc5b: 56 push %esi 10cc5c: e8 d3 42 00 00 call 110f34 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10cc61: 83 c4 10 add $0x10,%esp 10cc64: 85 c0 test %eax,%eax 10cc66: 74 e7 je 10cc4f <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10cc68: 39 c3 cmp %eax,%ebx 10cc6a: 77 e3 ja 10cc4f <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cc6c: 8b 04 b5 cc 73 12 00 mov 0x1273cc(,%esi,4),%eax 10cc73: 85 c0 test %eax,%eax 10cc75: 74 d8 je 10cc4f <_Objects_Get_information+0xf><== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10cc77: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10cc7a: 85 c0 test %eax,%eax 10cc7c: 74 d3 je 10cc51 <_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 ) 10cc7e: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cc83: 75 cc jne 10cc51 <_Objects_Get_information+0x11> 10cc85: eb c8 jmp 10cc4f <_Objects_Get_information+0xf> 0010cc88 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cc88: 55 push %ebp 10cc89: 89 e5 mov %esp,%ebp 10cc8b: 56 push %esi 10cc8c: 53 push %ebx 10cc8d: 8b 55 08 mov 0x8(%ebp),%edx 10cc90: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cc93: b8 01 00 00 00 mov $0x1,%eax 10cc98: 2b 42 08 sub 0x8(%edx),%eax 10cc9b: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cc9e: 9c pushf 10cc9f: fa cli 10cca0: 5e pop %esi if ( information->maximum >= index ) { 10cca1: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cca5: 39 c8 cmp %ecx,%eax 10cca7: 77 1b ja 10ccc4 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cca9: 8b 52 1c mov 0x1c(%edx),%edx 10ccac: 8b 04 82 mov (%edx,%eax,4),%eax 10ccaf: 85 c0 test %eax,%eax 10ccb1: 74 21 je 10ccd4 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10ccb3: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10ccb9: 8b 55 14 mov 0x14(%ebp),%edx 10ccbc: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10ccbe: 5b pop %ebx 10ccbf: 5e pop %esi 10ccc0: c9 leave 10ccc1: c3 ret 10ccc2: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10ccc4: 56 push %esi 10ccc5: 9d popf *location = OBJECTS_ERROR; 10ccc6: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cccc: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10ccce: 5b pop %ebx 10cccf: 5e pop %esi 10ccd0: c9 leave 10ccd1: c3 ret 10ccd2: 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 ); 10ccd4: 56 push %esi 10ccd5: 9d popf *location = OBJECTS_ERROR; 10ccd6: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10ccdc: eb e0 jmp 10ccbe <_Objects_Get_isr_disable+0x36> 00118760 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 118760: 55 push %ebp 118761: 89 e5 mov %esp,%ebp 118763: 57 push %edi 118764: 56 push %esi 118765: 53 push %ebx 118766: 83 ec 2c sub $0x2c,%esp 118769: 8b 55 08 mov 0x8(%ebp),%edx 11876c: 8b 75 0c mov 0xc(%ebp),%esi 11876f: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 118772: 85 f6 test %esi,%esi 118774: 75 0e jne 118784 <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 118776: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 118778: 89 d8 mov %ebx,%eax 11877a: 8d 65 f4 lea -0xc(%ebp),%esp 11877d: 5b pop %ebx 11877e: 5e pop %esi 11877f: 5f pop %edi 118780: c9 leave 118781: c3 ret 118782: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 118784: 85 db test %ebx,%ebx 118786: 74 f0 je 118778 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 118788: 85 d2 test %edx,%edx 11878a: 75 08 jne 118794 <_Objects_Get_name_as_string+0x34> 11878c: a1 78 52 13 00 mov 0x135278,%eax 118791: 8b 50 08 mov 0x8(%eax),%edx information = _Objects_Get_information_id( tmpId ); 118794: 83 ec 0c sub $0xc,%esp 118797: 52 push %edx 118798: 89 55 cc mov %edx,-0x34(%ebp) 11879b: e8 50 91 ff ff call 1118f0 <_Objects_Get_information_id> 1187a0: 89 c7 mov %eax,%edi if ( !information ) 1187a2: 83 c4 10 add $0x10,%esp 1187a5: 85 c0 test %eax,%eax 1187a7: 8b 55 cc mov -0x34(%ebp),%edx 1187aa: 74 ca je 118776 <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 1187ac: 51 push %ecx 1187ad: 8d 45 e4 lea -0x1c(%ebp),%eax 1187b0: 50 push %eax 1187b1: 52 push %edx 1187b2: 57 push %edi 1187b3: e8 f8 91 ff ff call 1119b0 <_Objects_Get> switch ( location ) { 1187b8: 83 c4 10 add $0x10,%esp 1187bb: 8b 55 e4 mov -0x1c(%ebp),%edx 1187be: 85 d2 test %edx,%edx 1187c0: 75 b4 jne 118776 <_Objects_Get_name_as_string+0x16> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 1187c2: 80 7f 38 00 cmpb $0x0,0x38(%edi) 1187c6: 74 4e je 118816 <_Objects_Get_name_as_string+0xb6> s = the_object->name.name_p; 1187c8: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 1187cb: 85 ff test %edi,%edi 1187cd: 74 6e je 11883d <_Objects_Get_name_as_string+0xdd> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1187cf: 4e dec %esi 1187d0: 89 75 d4 mov %esi,-0x2c(%ebp) 1187d3: 74 68 je 11883d <_Objects_Get_name_as_string+0xdd><== ALWAYS TAKEN 1187d5: 8a 07 mov (%edi),%al 1187d7: 84 c0 test %al,%al 1187d9: 74 62 je 11883d <_Objects_Get_name_as_string+0xdd> 1187db: 89 d9 mov %ebx,%ecx 1187dd: 31 d2 xor %edx,%edx 1187df: 89 5d d0 mov %ebx,-0x30(%ebp) 1187e2: eb 07 jmp 1187eb <_Objects_Get_name_as_string+0x8b> 1187e4: 8a 04 17 mov (%edi,%edx,1),%al 1187e7: 84 c0 test %al,%al 1187e9: 74 1b je 118806 <_Objects_Get_name_as_string+0xa6> *d = (isprint((unsigned char)*s)) ? *s : '*'; 1187eb: 0f b6 d8 movzbl %al,%ebx 1187ee: 8b 35 b8 27 13 00 mov 0x1327b8,%esi 1187f4: f6 44 1e 01 97 testb $0x97,0x1(%esi,%ebx,1) 1187f9: 75 02 jne 1187fd <_Objects_Get_name_as_string+0x9d> 1187fb: b0 2a mov $0x2a,%al 1187fd: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1187ff: 42 inc %edx 118800: 41 inc %ecx 118801: 3b 55 d4 cmp -0x2c(%ebp),%edx 118804: 72 de jb 1187e4 <_Objects_Get_name_as_string+0x84> 118806: 8b 5d d0 mov -0x30(%ebp),%ebx *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 118809: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 11880c: e8 83 9a ff ff call 112294 <_Thread_Enable_dispatch> return name; 118811: e9 62 ff ff ff jmp 118778 <_Objects_Get_name_as_string+0x18> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 118816: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 118819: 89 c2 mov %eax,%edx 11881b: c1 ea 18 shr $0x18,%edx 11881e: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 118821: 89 c2 mov %eax,%edx 118823: c1 ea 10 shr $0x10,%edx 118826: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 118829: 89 c2 mov %eax,%edx 11882b: c1 ea 08 shr $0x8,%edx 11882e: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 118831: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 118834: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 118838: 8d 7d df lea -0x21(%ebp),%edi 11883b: eb 92 jmp 1187cf <_Objects_Get_name_as_string+0x6f> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 11883d: 89 d9 mov %ebx,%ecx 11883f: eb c8 jmp 118809 <_Objects_Get_name_as_string+0xa9> 0011b1e4 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 11b1e4: 55 push %ebp 11b1e5: 89 e5 mov %esp,%ebp 11b1e7: 57 push %edi 11b1e8: 56 push %esi 11b1e9: 53 push %ebx 11b1ea: 83 ec 0c sub $0xc,%esp 11b1ed: 8b 5d 08 mov 0x8(%ebp),%ebx 11b1f0: 8b 75 0c mov 0xc(%ebp),%esi 11b1f3: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 11b1f6: 85 db test %ebx,%ebx 11b1f8: 75 0a jne 11b204 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11b1fa: 31 c0 xor %eax,%eax } 11b1fc: 8d 65 f4 lea -0xc(%ebp),%esp 11b1ff: 5b pop %ebx 11b200: 5e pop %esi 11b201: 5f pop %edi 11b202: c9 leave 11b203: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 11b204: 85 ff test %edi,%edi 11b206: 74 f2 je 11b1fa <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 11b208: 8b 45 14 mov 0x14(%ebp),%eax 11b20b: 85 c0 test %eax,%eax 11b20d: 74 eb je 11b1fa <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 11b20f: 66 85 f6 test %si,%si 11b212: 75 04 jne 11b218 <_Objects_Get_next+0x34> next_id = information->minimum_id; 11b214: 8b 73 08 mov 0x8(%ebx),%esi 11b217: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11b218: 66 39 73 10 cmp %si,0x10(%ebx) 11b21c: 72 22 jb 11b240 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 11b21e: 51 push %ecx 11b21f: 57 push %edi 11b220: 56 push %esi 11b221: 53 push %ebx 11b222: e8 89 67 ff ff call 1119b0 <_Objects_Get> next_id++; 11b227: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 11b228: 83 c4 10 add $0x10,%esp 11b22b: 8b 17 mov (%edi),%edx 11b22d: 85 d2 test %edx,%edx 11b22f: 75 e7 jne 11b218 <_Objects_Get_next+0x34> *next_id_p = next_id; 11b231: 8b 55 14 mov 0x14(%ebp),%edx 11b234: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 11b236: 8d 65 f4 lea -0xc(%ebp),%esp 11b239: 5b pop %ebx 11b23a: 5e pop %esi 11b23b: 5f pop %edi 11b23c: c9 leave 11b23d: c3 ret 11b23e: 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; 11b240: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 11b246: 8b 45 14 mov 0x14(%ebp),%eax 11b249: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 11b24f: 31 c0 xor %eax,%eax return 0; 11b251: eb a9 jmp 11b1fc <_Objects_Get_next+0x18> 0011b2dc <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b2dc: 55 push %ebp 11b2dd: 89 e5 mov %esp,%ebp 11b2df: 53 push %ebx 11b2e0: 8b 55 08 mov 0x8(%ebp),%edx 11b2e3: 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; 11b2e6: b8 01 00 00 00 mov $0x1,%eax 11b2eb: 2b 42 08 sub 0x8(%edx),%eax 11b2ee: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b2f1: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b2f5: 39 c8 cmp %ecx,%eax 11b2f7: 77 13 ja 11b30c <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b2f9: 8b 52 1c mov 0x1c(%edx),%edx 11b2fc: 8b 04 82 mov (%edx,%eax,4),%eax 11b2ff: 85 c0 test %eax,%eax 11b301: 74 09 je 11b30c <_Objects_Get_no_protection+0x30><== ALWAYS TAKEN *location = OBJECTS_LOCAL; 11b303: 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; } 11b309: 5b pop %ebx 11b30a: c9 leave 11b30b: 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; 11b30c: c7 03 01 00 00 00 movl $0x1,(%ebx) 11b312: 31 c0 xor %eax,%eax return NULL; } 11b314: 5b pop %ebx 11b315: c9 leave 11b316: c3 ret 00111a18 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 111a18: 55 push %ebp 111a19: 89 e5 mov %esp,%ebp 111a1b: 83 ec 18 sub $0x18,%esp 111a1e: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 111a21: 85 d2 test %edx,%edx 111a23: 75 08 jne 111a2d <_Objects_Id_to_name+0x15> 111a25: a1 78 52 13 00 mov 0x135278,%eax 111a2a: 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); 111a2d: 89 d0 mov %edx,%eax 111a2f: c1 e8 18 shr $0x18,%eax 111a32: 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 ) 111a35: 8d 48 ff lea -0x1(%eax),%ecx 111a38: 83 f9 03 cmp $0x3,%ecx 111a3b: 77 1d ja 111a5a <_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 ] ) 111a3d: 8b 04 85 8c 51 13 00 mov 0x13518c(,%eax,4),%eax 111a44: 85 c0 test %eax,%eax 111a46: 74 12 je 111a5a <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 111a48: 89 d1 mov %edx,%ecx 111a4a: c1 e9 1b shr $0x1b,%ecx 111a4d: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 111a50: 85 c0 test %eax,%eax 111a52: 74 06 je 111a5a <_Objects_Id_to_name+0x42><== ALWAYS TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 111a54: 80 78 38 00 cmpb $0x0,0x38(%eax) 111a58: 74 0a je 111a64 <_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; 111a5a: b8 03 00 00 00 mov $0x3,%eax } 111a5f: c9 leave 111a60: c3 ret 111a61: 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 ); 111a64: 51 push %ecx 111a65: 8d 4d f4 lea -0xc(%ebp),%ecx 111a68: 51 push %ecx 111a69: 52 push %edx 111a6a: 50 push %eax 111a6b: e8 40 ff ff ff call 1119b0 <_Objects_Get> if ( !the_object ) 111a70: 83 c4 10 add $0x10,%esp 111a73: 85 c0 test %eax,%eax 111a75: 74 e3 je 111a5a <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; *name = the_object->name; 111a77: 8b 50 0c mov 0xc(%eax),%edx 111a7a: 8b 45 0c mov 0xc(%ebp),%eax 111a7d: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 111a7f: e8 10 08 00 00 call 112294 <_Thread_Enable_dispatch> 111a84: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 111a86: c9 leave 111a87: c3 ret 0010cd48 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10cd48: 55 push %ebp 10cd49: 89 e5 mov %esp,%ebp 10cd4b: 57 push %edi 10cd4c: 56 push %esi 10cd4d: 53 push %ebx 10cd4e: 83 ec 0c sub $0xc,%esp 10cd51: 8b 45 08 mov 0x8(%ebp),%eax 10cd54: 8b 55 0c mov 0xc(%ebp),%edx 10cd57: 8b 5d 10 mov 0x10(%ebp),%ebx 10cd5a: 8b 75 20 mov 0x20(%ebp),%esi 10cd5d: 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; 10cd61: 89 10 mov %edx,(%eax) information->the_class = the_class; 10cd63: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10cd67: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10cd6a: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10cd71: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10cd78: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10cd7f: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10cd85: 8b 7d 1c mov 0x1c(%ebp),%edi 10cd88: 89 f9 mov %edi,%ecx 10cd8a: 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; 10cd8d: 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; 10cd93: 8b 3c 95 cc 73 12 00 mov 0x1273cc(,%edx,4),%edi 10cd9a: 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; 10cd9d: 8b 7d 14 mov 0x14(%ebp),%edi 10cda0: 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 = 10cda3: 89 f9 mov %edi,%ecx 10cda5: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10cda8: 8b 4d 14 mov 0x14(%ebp),%ecx 10cdab: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10cdb1: 85 ff test %edi,%edi 10cdb3: 74 04 je 10cdb9 <_Objects_Initialize_information+0x71> 10cdb5: 85 c9 test %ecx,%ecx 10cdb7: 74 6a je 10ce23 <_Objects_Initialize_information+0xdb> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cdb9: 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; 10cdbd: c7 40 1c 24 70 12 00 movl $0x127024,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10cdc4: c1 e2 18 shl $0x18,%edx 10cdc7: 81 ca 00 00 01 00 or $0x10000,%edx 10cdcd: c1 e3 1b shl $0x1b,%ebx 10cdd0: 09 da or %ebx,%edx 10cdd2: 31 db xor %ebx,%ebx 10cdd4: 85 c9 test %ecx,%ecx 10cdd6: 0f 95 c3 setne %bl 10cdd9: 09 da or %ebx,%edx 10cddb: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cdde: f7 c6 03 00 00 00 test $0x3,%esi 10cde4: 75 26 jne 10ce0c <_Objects_Initialize_information+0xc4> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10cde6: 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); 10cdea: 8d 50 24 lea 0x24(%eax),%edx 10cded: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10cdf0: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10cdf7: 8d 50 20 lea 0x20(%eax),%edx 10cdfa: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10cdfd: 85 c9 test %ecx,%ecx 10cdff: 75 13 jne 10ce14 <_Objects_Initialize_information+0xcc> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10ce01: 8d 65 f4 lea -0xc(%ebp),%esp 10ce04: 5b pop %ebx 10ce05: 5e pop %esi 10ce06: 5f pop %edi 10ce07: c9 leave 10ce08: c3 ret 10ce09: 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) & 10ce0c: 83 c6 04 add $0x4,%esi 10ce0f: 83 e6 fc and $0xfffffffc,%esi 10ce12: eb d2 jmp 10cde6 <_Objects_Initialize_information+0x9e> /* * 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 ); 10ce14: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10ce17: 8d 65 f4 lea -0xc(%ebp),%esp 10ce1a: 5b pop %ebx 10ce1b: 5e pop %esi 10ce1c: 5f pop %edi 10ce1d: 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 ); 10ce1e: e9 b1 fa ff ff jmp 10c8d4 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10ce23: 50 push %eax 10ce24: 6a 14 push $0x14 10ce26: 6a 01 push $0x1 10ce28: 6a 00 push $0x0 10ce2a: e8 69 f9 ff ff call 10c798 <_Internal_error_Occurred> 00117240 <_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 ) { 117240: 55 push %ebp 117241: 89 e5 mov %esp,%ebp 117243: 57 push %edi 117244: 56 push %esi 117245: 53 push %ebx 117246: 83 ec 1c sub $0x1c,%esp 117249: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 11724c: 8b 5d 10 mov 0x10(%ebp),%ebx 11724f: 85 db test %ebx,%ebx 117251: 74 75 je 1172c8 <_Objects_Name_to_id_string+0x88> return OBJECTS_INVALID_ADDRESS; if ( !name ) 117253: 8b 4d 0c mov 0xc(%ebp),%ecx 117256: 85 c9 test %ecx,%ecx 117258: 74 4b je 1172a5 <_Objects_Name_to_id_string+0x65> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 11725a: 8b 47 10 mov 0x10(%edi),%eax 11725d: 66 85 c0 test %ax,%ax 117260: 74 43 je 1172a5 <_Objects_Name_to_id_string+0x65> name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 117262: 0f b7 c0 movzwl %ax,%eax 117265: 89 45 e4 mov %eax,-0x1c(%ebp) 117268: 8b 47 1c mov 0x1c(%edi),%eax 11726b: bb 01 00 00 00 mov $0x1,%ebx 117270: 89 7d e0 mov %edi,-0x20(%ebp) 117273: 89 c7 mov %eax,%edi 117275: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; 117278: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 11727b: 85 f6 test %esi,%esi 11727d: 74 20 je 11729f <_Objects_Name_to_id_string+0x5f> continue; if ( !the_object->name.name_p ) 11727f: 8b 46 0c mov 0xc(%esi),%eax 117282: 85 c0 test %eax,%eax 117284: 74 19 je 11729f <_Objects_Name_to_id_string+0x5f> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 117286: 52 push %edx 117287: 8b 4d e0 mov -0x20(%ebp),%ecx 11728a: 0f b7 51 3a movzwl 0x3a(%ecx),%edx 11728e: 52 push %edx 11728f: 50 push %eax 117290: ff 75 0c pushl 0xc(%ebp) 117293: e8 cc 38 00 00 call 11ab64 117298: 83 c4 10 add $0x10,%esp 11729b: 85 c0 test %eax,%eax 11729d: 74 15 je 1172b4 <_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++ ) { 11729f: 43 inc %ebx 1172a0: 3b 5d e4 cmp -0x1c(%ebp),%ebx 1172a3: 76 d3 jbe 117278 <_Objects_Name_to_id_string+0x38> 1172a5: b8 01 00 00 00 mov $0x1,%eax } } } return OBJECTS_INVALID_NAME; } 1172aa: 8d 65 f4 lea -0xc(%ebp),%esp 1172ad: 5b pop %ebx 1172ae: 5e pop %esi 1172af: 5f pop %edi 1172b0: c9 leave 1172b1: c3 ret 1172b2: 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; 1172b4: 8b 46 08 mov 0x8(%esi),%eax 1172b7: 8b 55 10 mov 0x10(%ebp),%edx 1172ba: 89 02 mov %eax,(%edx) 1172bc: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 1172be: 8d 65 f4 lea -0xc(%ebp),%esp 1172c1: 5b pop %ebx 1172c2: 5e pop %esi 1172c3: 5f pop %edi 1172c4: c9 leave 1172c5: c3 ret 1172c6: 66 90 xchg %ax,%ax <== NOT EXECUTED uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 1172c8: b8 02 00 00 00 mov $0x2,%eax } } } return OBJECTS_INVALID_NAME; } 1172cd: 8d 65 f4 lea -0xc(%ebp),%esp 1172d0: 5b pop %ebx 1172d1: 5e pop %esi 1172d2: 5f pop %edi 1172d3: c9 leave 1172d4: c3 ret 0010ce64 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10ce64: 55 push %ebp 10ce65: 89 e5 mov %esp,%ebp 10ce67: 57 push %edi 10ce68: 56 push %esi 10ce69: 53 push %ebx 10ce6a: 8b 45 08 mov 0x8(%ebp),%eax 10ce6d: 8b 4d 0c mov 0xc(%ebp),%ecx 10ce70: 8b 55 10 mov 0x10(%ebp),%edx 10ce73: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10ce76: 85 ff test %edi,%edi 10ce78: 74 56 je 10ced0 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10ce7a: 85 c9 test %ecx,%ecx 10ce7c: 74 08 je 10ce86 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ce7e: 8b 70 10 mov 0x10(%eax),%esi 10ce81: 66 85 f6 test %si,%si 10ce84: 75 0a jne 10ce90 <_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++ ) { 10ce86: 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 } 10ce8b: 5b pop %ebx 10ce8c: 5e pop %esi 10ce8d: 5f pop %edi 10ce8e: c9 leave 10ce8f: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ce90: 85 d2 test %edx,%edx 10ce92: 75 20 jne 10ceb4 <_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++ ) { 10ce94: 0f b7 f6 movzwl %si,%esi 10ce97: 8b 58 1c mov 0x1c(%eax),%ebx 10ce9a: b8 01 00 00 00 mov $0x1,%eax 10ce9f: 90 nop the_object = information->local_table[ index ]; 10cea0: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cea3: 85 d2 test %edx,%edx 10cea5: 74 05 je 10ceac <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10cea7: 39 4a 0c cmp %ecx,0xc(%edx) 10ceaa: 74 18 je 10cec4 <_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++ ) { 10ceac: 40 inc %eax 10cead: 39 c6 cmp %eax,%esi 10ceaf: 73 ef jae 10cea0 <_Objects_Name_to_id_u32+0x3c> 10ceb1: eb d3 jmp 10ce86 <_Objects_Name_to_id_u32+0x22> 10ceb3: 90 nop <== NOT EXECUTED if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ceb4: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10ceba: 74 d8 je 10ce94 <_Objects_Name_to_id_u32+0x30> 10cebc: 4a dec %edx 10cebd: 75 c7 jne 10ce86 <_Objects_Name_to_id_u32+0x22> 10cebf: eb d3 jmp 10ce94 <_Objects_Name_to_id_u32+0x30> 10cec1: 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; 10cec4: 8b 42 08 mov 0x8(%edx),%eax 10cec7: 89 07 mov %eax,(%edi) 10cec9: 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 } 10cecb: 5b pop %ebx 10cecc: 5e pop %esi 10cecd: 5f pop %edi 10cece: c9 leave 10cecf: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10ced0: 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 } 10ced5: 5b pop %ebx 10ced6: 5e pop %esi 10ced7: 5f pop %edi 10ced8: c9 leave 10ced9: c3 ret 0010d534 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10d534: 55 push %ebp 10d535: 89 e5 mov %esp,%ebp 10d537: 57 push %edi 10d538: 56 push %esi 10d539: 53 push %ebx 10d53a: 83 ec 14 sub $0x14,%esp 10d53d: 8b 7d 08 mov 0x8(%ebp),%edi 10d540: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10d543: 0f b7 47 3a movzwl 0x3a(%edi),%eax 10d547: 50 push %eax 10d548: 53 push %ebx 10d549: e8 3e 7c 00 00 call 11518c 10d54e: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10d550: 83 c4 10 add $0x10,%esp 10d553: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10d557: 75 53 jne 10d5ac <_Objects_Set_name+0x78> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d559: 0f be 13 movsbl (%ebx),%edx 10d55c: c1 e2 18 shl $0x18,%edx 10d55f: 83 f8 01 cmp $0x1,%eax 10d562: 76 34 jbe 10d598 <_Objects_Set_name+0x64> 10d564: 0f be 43 01 movsbl 0x1(%ebx),%eax 10d568: c1 e0 10 shl $0x10,%eax 10d56b: 09 d0 or %edx,%eax 10d56d: 83 fe 02 cmp $0x2,%esi 10d570: 74 2d je 10d59f <_Objects_Set_name+0x6b> 10d572: 0f be 53 02 movsbl 0x2(%ebx),%edx 10d576: c1 e2 08 shl $0x8,%edx 10d579: 09 c2 or %eax,%edx 10d57b: 83 fe 03 cmp $0x3,%esi 10d57e: 74 24 je 10d5a4 <_Objects_Set_name+0x70> 10d580: 0f be 43 03 movsbl 0x3(%ebx),%eax 10d584: 09 c2 or %eax,%edx 10d586: 8b 45 0c mov 0xc(%ebp),%eax 10d589: 89 50 0c mov %edx,0xc(%eax) 10d58c: b0 01 mov $0x1,%al ); } return true; } 10d58e: 8d 65 f4 lea -0xc(%ebp),%esp 10d591: 5b pop %ebx 10d592: 5e pop %esi 10d593: 5f pop %edi 10d594: c9 leave 10d595: c3 ret 10d596: 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( 10d598: 89 d0 mov %edx,%eax 10d59a: 0d 00 00 20 00 or $0x200000,%eax 10d59f: 89 c2 mov %eax,%edx 10d5a1: 80 ce 20 or $0x20,%dh 10d5a4: b8 20 00 00 00 mov $0x20,%eax 10d5a9: eb d9 jmp 10d584 <_Objects_Set_name+0x50> 10d5ab: 90 nop <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 10d5ac: 83 ec 0c sub $0xc,%esp 10d5af: 8d 40 01 lea 0x1(%eax),%eax 10d5b2: 50 push %eax 10d5b3: e8 78 18 00 00 call 10ee30 <_Workspace_Allocate> 10d5b8: 89 c7 mov %eax,%edi if ( !d ) 10d5ba: 83 c4 10 add $0x10,%esp 10d5bd: 85 c0 test %eax,%eax 10d5bf: 74 43 je 10d604 <_Objects_Set_name+0xd0><== ALWAYS TAKEN return false; if ( the_object->name.name_p ) { 10d5c1: 8b 55 0c mov 0xc(%ebp),%edx 10d5c4: 8b 42 0c mov 0xc(%edx),%eax 10d5c7: 85 c0 test %eax,%eax 10d5c9: 74 16 je 10d5e1 <_Objects_Set_name+0xad> _Workspace_Free( (void *)the_object->name.name_p ); 10d5cb: 83 ec 0c sub $0xc,%esp 10d5ce: 50 push %eax 10d5cf: e8 78 18 00 00 call 10ee4c <_Workspace_Free> the_object->name.name_p = NULL; 10d5d4: 8b 45 0c mov 0xc(%ebp),%eax 10d5d7: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10d5de: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10d5e1: 50 push %eax 10d5e2: 56 push %esi 10d5e3: 53 push %ebx 10d5e4: 57 push %edi 10d5e5: e8 26 7b 00 00 call 115110 d[length] = '\0'; 10d5ea: c6 04 37 00 movb $0x0,(%edi,%esi,1) the_object->name.name_p = d; 10d5ee: 8b 55 0c mov 0xc(%ebp),%edx 10d5f1: 89 7a 0c mov %edi,0xc(%edx) 10d5f4: b0 01 mov $0x1,%al 10d5f6: 83 c4 10 add $0x10,%esp ); } return true; } 10d5f9: 8d 65 f4 lea -0xc(%ebp),%esp 10d5fc: 5b pop %ebx 10d5fd: 5e pop %esi 10d5fe: 5f pop %edi 10d5ff: c9 leave 10d600: c3 ret 10d601: 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 ) 10d604: 31 c0 xor %eax,%eax <== NOT EXECUTED 10d606: eb 86 jmp 10d58e <_Objects_Set_name+0x5a><== NOT EXECUTED 0010cedc <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10cedc: 55 push %ebp 10cedd: 89 e5 mov %esp,%ebp 10cedf: 57 push %edi 10cee0: 56 push %esi 10cee1: 53 push %ebx 10cee2: 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 ); 10cee5: 8b 45 08 mov 0x8(%ebp),%eax 10cee8: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10ceec: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10cef0: 0f b7 40 10 movzwl 0x10(%eax),%eax 10cef4: 29 d8 sub %ebx,%eax 10cef6: 31 d2 xor %edx,%edx 10cef8: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cefa: 85 c0 test %eax,%eax 10cefc: 74 21 je 10cf1f <_Objects_Shrink_information+0x43><== ALWAYS TAKEN if ( information->inactive_per_block[ block ] == 10cefe: 8b 55 08 mov 0x8(%ebp),%edx 10cf01: 8b 7a 30 mov 0x30(%edx),%edi 10cf04: 3b 0f cmp (%edi),%ecx 10cf06: 74 1f je 10cf27 <_Objects_Shrink_information+0x4b><== ALWAYS TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10cf08: 31 d2 xor %edx,%edx 10cf0a: eb 0e jmp 10cf1a <_Objects_Shrink_information+0x3e> } index_base += information->allocation_size; 10cf0c: 01 cb add %ecx,%ebx 10cf0e: 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 ] == 10cf15: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10cf18: 74 12 je 10cf2c <_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++ ) { 10cf1a: 42 inc %edx 10cf1b: 39 d0 cmp %edx,%eax 10cf1d: 77 ed ja 10cf0c <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10cf1f: 8d 65 f4 lea -0xc(%ebp),%esp 10cf22: 5b pop %ebx 10cf23: 5e pop %esi 10cf24: 5f pop %edi 10cf25: c9 leave 10cf26: 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 ] == 10cf27: 31 f6 xor %esi,%esi <== NOT EXECUTED 10cf29: 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; 10cf2c: 8b 55 08 mov 0x8(%ebp),%edx 10cf2f: 8b 42 20 mov 0x20(%edx),%eax 10cf32: 89 75 e4 mov %esi,-0x1c(%ebp) 10cf35: eb 07 jmp 10cf3e <_Objects_Shrink_information+0x62> 10cf37: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10cf38: 85 ff test %edi,%edi 10cf3a: 74 2c je 10cf68 <_Objects_Shrink_information+0x8c> 10cf3c: 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 ); 10cf3e: 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; 10cf42: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10cf44: 39 da cmp %ebx,%edx 10cf46: 72 f0 jb 10cf38 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10cf48: 8b 75 08 mov 0x8(%ebp),%esi 10cf4b: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10cf4f: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10cf52: 39 ca cmp %ecx,%edx 10cf54: 73 e2 jae 10cf38 <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10cf56: 83 ec 0c sub $0xc,%esp 10cf59: 50 push %eax 10cf5a: e8 f5 39 00 00 call 110954 <_Chain_Extract> 10cf5f: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10cf62: 85 ff test %edi,%edi 10cf64: 75 d6 jne 10cf3c <_Objects_Shrink_information+0x60> 10cf66: 66 90 xchg %ax,%ax 10cf68: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10cf6b: 83 ec 0c sub $0xc,%esp 10cf6e: 8b 55 08 mov 0x8(%ebp),%edx 10cf71: 8b 42 34 mov 0x34(%edx),%eax 10cf74: ff 34 30 pushl (%eax,%esi,1) 10cf77: e8 a4 17 00 00 call 10e720 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10cf7c: 8b 55 08 mov 0x8(%ebp),%edx 10cf7f: 8b 42 34 mov 0x34(%edx),%eax 10cf82: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10cf89: 8b 42 30 mov 0x30(%edx),%eax 10cf8c: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10cf93: 8b 42 14 mov 0x14(%edx),%eax 10cf96: 66 29 42 2c sub %ax,0x2c(%edx) return; 10cf9a: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10cf9d: 8d 65 f4 lea -0xc(%ebp),%esp 10cfa0: 5b pop %ebx 10cfa1: 5e pop %esi 10cfa2: 5f pop %edi 10cfa3: c9 leave 10cfa4: c3 ret 0010d4c8 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10d4c8: 55 push %ebp 10d4c9: 89 e5 mov %esp,%ebp 10d4cb: 57 push %edi 10d4cc: 56 push %esi 10d4cd: 53 push %ebx 10d4ce: 83 ec 38 sub $0x38,%esp 10d4d1: 8b 5d 08 mov 0x8(%ebp),%ebx 10d4d4: 8b 75 0c mov 0xc(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10d4d7: c7 06 00 00 00 00 movl $0x0,(%esi) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10d4dd: 53 push %ebx 10d4de: e8 6d 3c 00 00 call 111150 <_Timespec_Is_valid> 10d4e3: 83 c4 10 add $0x10,%esp 10d4e6: 84 c0 test %al,%al 10d4e8: 75 0a jne 10d4f4 <_POSIX_Absolute_timeout_to_ticks+0x2c> 10d4ea: 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; } 10d4ec: 8d 65 f4 lea -0xc(%ebp),%esp 10d4ef: 5b pop %ebx 10d4f0: 5e pop %esi 10d4f1: 5f pop %edi 10d4f2: c9 leave 10d4f3: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10d4f4: 83 ec 0c sub $0xc,%esp 10d4f7: 8d 7d e0 lea -0x20(%ebp),%edi 10d4fa: 57 push %edi 10d4fb: e8 58 1d 00 00 call 10f258 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10d500: 5a pop %edx 10d501: 59 pop %ecx 10d502: 57 push %edi 10d503: 53 push %ebx 10d504: e8 6f 3c 00 00 call 111178 <_Timespec_Less_than> 10d509: 83 c4 10 add $0x10,%esp 10d50c: 84 c0 test %al,%al 10d50e: 74 10 je 10d520 <_POSIX_Absolute_timeout_to_ticks+0x58> 10d510: 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; } 10d515: 8d 65 f4 lea -0xc(%ebp),%esp 10d518: 5b pop %ebx 10d519: 5e pop %esi 10d51a: 5f pop %edi 10d51b: c9 leave 10d51c: c3 ret 10d51d: 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 ); 10d520: 50 push %eax 10d521: 8d 45 d8 lea -0x28(%ebp),%eax 10d524: 50 push %eax 10d525: 53 push %ebx 10d526: 57 push %edi 10d527: 89 45 d4 mov %eax,-0x2c(%ebp) 10d52a: e8 6d 3c 00 00 call 11119c <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10d52f: 8b 45 d4 mov -0x2c(%ebp),%eax 10d532: 89 04 24 mov %eax,(%esp) 10d535: e8 9e 3c 00 00 call 1111d8 <_Timespec_To_ticks> 10d53a: 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 ) 10d53c: 83 c4 10 add $0x10,%esp 10d53f: 83 f8 01 cmp $0x1,%eax 10d542: 19 c0 sbb %eax,%eax 10d544: 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; } 10d547: 8d 65 f4 lea -0xc(%ebp),%esp 10d54a: 5b pop %ebx 10d54b: 5e pop %esi 10d54c: 5f pop %edi 10d54d: c9 leave 10d54e: c3 ret 0010c020 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10c020: 55 push %ebp 10c021: 89 e5 mov %esp,%ebp 10c023: 56 push %esi 10c024: 53 push %ebx 10c025: 8b 5d 08 mov 0x8(%ebp),%ebx 10c028: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10c02b: 85 db test %ebx,%ebx 10c02d: 74 39 je 10c068 <_POSIX_Condition_variables_Get+0x48> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10c02f: 8b 03 mov (%ebx),%eax 10c031: 83 f8 ff cmp $0xffffffff,%eax 10c034: 74 1a je 10c050 <_POSIX_Condition_variables_Get+0x30> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10c036: 52 push %edx 10c037: 56 push %esi 10c038: 50 push %eax 10c039: 68 a0 a1 12 00 push $0x12a1a0 10c03e: e8 15 2b 00 00 call 10eb58 <_Objects_Get> 10c043: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10c046: 8d 65 f8 lea -0x8(%ebp),%esp 10c049: 5b pop %ebx 10c04a: 5e pop %esi 10c04b: c9 leave 10c04c: c3 ret 10c04d: 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 ); 10c050: 83 ec 08 sub $0x8,%esp 10c053: 6a 00 push $0x0 10c055: 53 push %ebx 10c056: e8 19 00 00 00 call 10c074 if ( status ) { 10c05b: 83 c4 10 add $0x10,%esp 10c05e: 85 c0 test %eax,%eax 10c060: 75 06 jne 10c068 <_POSIX_Condition_variables_Get+0x48> 10c062: 8b 03 mov (%ebx),%eax 10c064: eb d0 jmp 10c036 <_POSIX_Condition_variables_Get+0x16> 10c066: 66 90 xchg %ax,%ax <== NOT EXECUTED *location = OBJECTS_ERROR; 10c068: c7 06 01 00 00 00 movl $0x1,(%esi) 10c06e: 31 c0 xor %eax,%eax return (POSIX_Condition_variables_Control *) 0; 10c070: eb d4 jmp 10c046 <_POSIX_Condition_variables_Get+0x26> 0010c13c <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10c13c: 55 push %ebp 10c13d: 89 e5 mov %esp,%ebp 10c13f: 57 push %edi 10c140: 56 push %esi 10c141: 53 push %ebx 10c142: 83 ec 24 sub $0x24,%esp 10c145: 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 ); 10c148: 8d 45 e4 lea -0x1c(%ebp),%eax 10c14b: 50 push %eax 10c14c: ff 75 08 pushl 0x8(%ebp) 10c14f: e8 cc fe ff ff call 10c020 <_POSIX_Condition_variables_Get> 10c154: 89 c7 mov %eax,%edi switch ( location ) { 10c156: 83 c4 10 add $0x10,%esp 10c159: 8b 45 e4 mov -0x1c(%ebp),%eax 10c15c: 85 c0 test %eax,%eax 10c15e: 74 10 je 10c170 <_POSIX_Condition_variables_Signal_support+0x34> 10c160: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c165: 8d 65 f4 lea -0xc(%ebp),%esp 10c168: 5b pop %ebx 10c169: 5e pop %esi 10c16a: 5f pop %edi 10c16b: c9 leave 10c16c: c3 ret 10c16d: 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 ); 10c170: 8d 77 18 lea 0x18(%edi),%esi 10c173: eb 0b jmp 10c180 <_POSIX_Condition_variables_Signal_support+0x44> 10c175: 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 ); 10c178: 84 db test %bl,%bl 10c17a: 74 20 je 10c19c <_POSIX_Condition_variables_Signal_support+0x60> 10c17c: 85 c0 test %eax,%eax 10c17e: 74 1c je 10c19c <_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 ); 10c180: 83 ec 0c sub $0xc,%esp 10c183: 56 push %esi 10c184: e8 5f 36 00 00 call 10f7e8 <_Thread_queue_Dequeue> if ( !the_thread ) 10c189: 83 c4 10 add $0x10,%esp 10c18c: 85 c0 test %eax,%eax 10c18e: 75 e8 jne 10c178 <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c190: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) } while ( is_broadcast && the_thread ); 10c197: 84 db test %bl,%bl 10c199: 75 e1 jne 10c17c <_POSIX_Condition_variables_Signal_support+0x40> 10c19b: 90 nop _Thread_Enable_dispatch(); 10c19c: e8 2b 32 00 00 call 10f3cc <_Thread_Enable_dispatch> 10c1a1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c1a3: 8d 65 f4 lea -0xc(%ebp),%esp 10c1a6: 5b pop %ebx 10c1a7: 5e pop %esi 10c1a8: 5f pop %edi 10c1a9: c9 leave 10c1aa: c3 ret 0010c204 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10c204: 55 push %ebp 10c205: 89 e5 mov %esp,%ebp 10c207: 57 push %edi 10c208: 56 push %esi 10c209: 53 push %ebx 10c20a: 83 ec 34 sub $0x34,%esp 10c20d: 8b 7d 08 mov 0x8(%ebp),%edi 10c210: 8b 5d 0c mov 0xc(%ebp),%ebx 10c213: 8a 45 14 mov 0x14(%ebp),%al 10c216: 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 ) ) { 10c219: 8d 75 e4 lea -0x1c(%ebp),%esi 10c21c: 56 push %esi 10c21d: 53 push %ebx 10c21e: e8 b1 01 00 00 call 10c3d4 <_POSIX_Mutex_Get> 10c223: 83 c4 10 add $0x10,%esp 10c226: 85 c0 test %eax,%eax 10c228: 74 21 je 10c24b <_POSIX_Condition_variables_Wait_support+0x47> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c22a: a1 b8 9c 12 00 mov 0x129cb8,%eax 10c22f: 48 dec %eax 10c230: a3 b8 9c 12 00 mov %eax,0x129cb8 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c235: 83 ec 08 sub $0x8,%esp 10c238: 56 push %esi 10c239: 57 push %edi 10c23a: e8 e1 fd ff ff call 10c020 <_POSIX_Condition_variables_Get> 10c23f: 89 c6 mov %eax,%esi switch ( location ) { 10c241: 83 c4 10 add $0x10,%esp 10c244: 8b 55 e4 mov -0x1c(%ebp),%edx 10c247: 85 d2 test %edx,%edx 10c249: 74 11 je 10c25c <_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 ) 10c24b: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c250: 89 f0 mov %esi,%eax 10c252: 8d 65 f4 lea -0xc(%ebp),%esp 10c255: 5b pop %ebx 10c256: 5e pop %esi 10c257: 5f pop %edi 10c258: c9 leave 10c259: c3 ret 10c25a: 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 ) ) { 10c25c: 8b 40 14 mov 0x14(%eax),%eax 10c25f: 85 c0 test %eax,%eax 10c261: 74 19 je 10c27c <_POSIX_Condition_variables_Wait_support+0x78> 10c263: 3b 03 cmp (%ebx),%eax 10c265: 74 15 je 10c27c <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 10c267: e8 60 31 00 00 call 10f3cc <_Thread_Enable_dispatch> 10c26c: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c271: 89 f0 mov %esi,%eax 10c273: 8d 65 f4 lea -0xc(%ebp),%esp 10c276: 5b pop %ebx 10c277: 5e pop %esi 10c278: 5f pop %edi 10c279: c9 leave 10c27a: c3 ret 10c27b: 90 nop <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10c27c: 83 ec 0c sub $0xc,%esp 10c27f: 53 push %ebx 10c280: e8 73 03 00 00 call 10c5f8 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10c285: 83 c4 10 add $0x10,%esp 10c288: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10c28c: 74 26 je 10c2b4 <_POSIX_Condition_variables_Wait_support+0xb0> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 10c28e: e8 39 31 00 00 call 10f3cc <_Thread_Enable_dispatch> 10c293: be 74 00 00 00 mov $0x74,%esi /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10c298: 83 ec 0c sub $0xc,%esp 10c29b: 53 push %ebx 10c29c: e8 cf 02 00 00 call 10c570 if ( mutex_status ) 10c2a1: 83 c4 10 add $0x10,%esp 10c2a4: 85 c0 test %eax,%eax 10c2a6: 75 a3 jne 10c24b <_POSIX_Condition_variables_Wait_support+0x47> case OBJECTS_ERROR: break; } return EINVAL; } 10c2a8: 89 f0 mov %esi,%eax 10c2aa: 8d 65 f4 lea -0xc(%ebp),%esp 10c2ad: 5b pop %ebx 10c2ae: 5e pop %esi 10c2af: 5f pop %edi 10c2b0: c9 leave 10c2b1: c3 ret 10c2b2: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 10c2b4: 8b 03 mov (%ebx),%eax 10c2b6: 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; 10c2b9: 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; 10c2c0: a1 78 9d 12 00 mov 0x129d78,%eax 10c2c5: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10c2cc: 83 c6 18 add $0x18,%esi 10c2cf: 89 70 44 mov %esi,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10c2d2: 8b 17 mov (%edi),%edx 10c2d4: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10c2d7: 50 push %eax 10c2d8: 68 68 fc 10 00 push $0x10fc68 10c2dd: ff 75 10 pushl 0x10(%ebp) 10c2e0: 56 push %esi 10c2e1: e8 1e 36 00 00 call 10f904 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c2e6: e8 e1 30 00 00 call 10f3cc <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10c2eb: a1 78 9d 12 00 mov 0x129d78,%eax 10c2f0: 8b 70 34 mov 0x34(%eax),%esi if ( status && status != ETIMEDOUT ) 10c2f3: 83 c4 10 add $0x10,%esp 10c2f6: 85 f6 test %esi,%esi 10c2f8: 74 9e je 10c298 <_POSIX_Condition_variables_Wait_support+0x94> 10c2fa: 83 fe 74 cmp $0x74,%esi 10c2fd: 0f 85 4d ff ff ff jne 10c250 <_POSIX_Condition_variables_Wait_support+0x4c><== ALWAYS TAKEN 10c303: eb 93 jmp 10c298 <_POSIX_Condition_variables_Wait_support+0x94> 00115f08 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 115f08: 55 push %ebp 115f09: 89 e5 mov %esp,%ebp 115f0b: 57 push %edi 115f0c: 56 push %esi 115f0d: 53 push %ebx 115f0e: 83 ec 34 sub $0x34,%esp 115f11: 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 ); 115f14: 68 ff 00 00 00 push $0xff 115f19: ff 75 08 pushl 0x8(%ebp) 115f1c: e8 3b 4d 00 00 call 11ac5c 115f21: 89 c3 mov %eax,%ebx 115f23: a1 98 01 13 00 mov 0x130198,%eax 115f28: 40 inc %eax 115f29: a3 98 01 13 00 mov %eax,0x130198 * 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 ) { 115f2e: 83 c4 10 add $0x10,%esp 115f31: 85 f6 test %esi,%esi 115f33: 0f 84 c3 00 00 00 je 115ffc <_POSIX_Message_queue_Create_support+0xf4> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 115f39: 8b 4e 04 mov 0x4(%esi),%ecx 115f3c: 85 c9 test %ecx,%ecx 115f3e: 0f 8e fc 00 00 00 jle 116040 <_POSIX_Message_queue_Create_support+0x138><== ALWAYS TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 115f44: 8b 56 08 mov 0x8(%esi),%edx 115f47: 85 d2 test %edx,%edx 115f49: 0f 8e f1 00 00 00 jle 116040 <_POSIX_Message_queue_Create_support+0x138><== ALWAYS TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } attr = *attr_ptr; 115f4f: 8d 7d d8 lea -0x28(%ebp),%edi 115f52: b9 04 00 00 00 mov $0x4,%ecx 115f57: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 115f59: 8b 45 dc mov -0x24(%ebp),%eax 115f5c: 89 45 d4 mov %eax,-0x2c(%ebp) 115f5f: 8b 45 e0 mov -0x20(%ebp),%eax 115f62: 89 45 d0 mov %eax,-0x30(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 115f65: 83 ec 0c sub $0xc,%esp 115f68: 68 60 05 13 00 push $0x130560 115f6d: e8 86 c7 ff ff call 1126f8 <_Objects_Allocate> 115f72: 89 c6 mov %eax,%esi } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 115f74: 83 c4 10 add $0x10,%esp 115f77: 85 c0 test %eax,%eax 115f79: 0f 84 03 01 00 00 je 116082 <_POSIX_Message_queue_Create_support+0x17a> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 115f7f: 8b 45 0c mov 0xc(%ebp),%eax 115f82: 89 46 10 mov %eax,0x10(%esi) the_mq->named = true; 115f85: c6 46 14 01 movb $0x1,0x14(%esi) the_mq->open_count = 1; 115f89: c7 46 18 01 00 00 00 movl $0x1,0x18(%esi) the_mq->linked = true; 115f90: 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); 115f94: 43 inc %ebx 115f95: 83 ec 0c sub $0xc,%esp 115f98: 53 push %ebx 115f99: e8 5a e7 ff ff call 1146f8 <_Workspace_Allocate> 115f9e: 89 c7 mov %eax,%edi if (!name) { 115fa0: 83 c4 10 add $0x10,%esp 115fa3: 85 c0 test %eax,%eax 115fa5: 0f 84 ac 00 00 00 je 116057 <_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 ); 115fab: 50 push %eax 115fac: 53 push %ebx 115fad: ff 75 08 pushl 0x8(%ebp) 115fb0: 57 push %edi 115fb1: e8 2a 4c 00 00 call 11abe0 * * 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; 115fb6: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) if ( !_CORE_message_queue_Initialize( 115fbd: ff 75 d0 pushl -0x30(%ebp) 115fc0: ff 75 d4 pushl -0x2c(%ebp) 115fc3: 8d 46 5c lea 0x5c(%esi),%eax 115fc6: 50 push %eax 115fc7: 8d 46 1c lea 0x1c(%esi),%eax 115fca: 50 push %eax 115fcb: e8 6c 0c 00 00 call 116c3c <_CORE_message_queue_Initialize> 115fd0: 83 c4 20 add $0x20,%esp 115fd3: 84 c0 test %al,%al 115fd5: 74 39 je 116010 <_POSIX_Message_queue_Create_support+0x108> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115fd7: 0f b7 56 08 movzwl 0x8(%esi),%edx 115fdb: a1 7c 05 13 00 mov 0x13057c,%eax 115fe0: 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; 115fe3: 89 7e 0c mov %edi,0xc(%esi) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 115fe6: 8b 45 14 mov 0x14(%ebp),%eax 115fe9: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 115feb: e8 7c d4 ff ff call 11346c <_Thread_Enable_dispatch> 115ff0: 31 c0 xor %eax,%eax return 0; } 115ff2: 8d 65 f4 lea -0xc(%ebp),%esp 115ff5: 5b pop %ebx 115ff6: 5e pop %esi 115ff7: 5f pop %edi 115ff8: c9 leave 115ff9: c3 ret 115ffa: 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 ) { 115ffc: c7 45 d4 0a 00 00 00 movl $0xa,-0x2c(%ebp) 116003: c7 45 d0 10 00 00 00 movl $0x10,-0x30(%ebp) 11600a: e9 56 ff ff ff jmp 115f65 <_POSIX_Message_queue_Create_support+0x5d> 11600f: 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 ); 116010: 83 ec 08 sub $0x8,%esp 116013: 56 push %esi 116014: 68 60 05 13 00 push $0x130560 116019: e8 5a ca ff ff call 112a78 <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 11601e: 89 3c 24 mov %edi,(%esp) 116021: e8 ee e6 ff ff call 114714 <_Workspace_Free> _Thread_Enable_dispatch(); 116026: e8 41 d4 ff ff call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 11602b: e8 e8 36 00 00 call 119718 <__errno> 116030: c7 00 1c 00 00 00 movl $0x1c,(%eax) 116036: b8 ff ff ff ff mov $0xffffffff,%eax 11603b: 83 c4 10 add $0x10,%esp 11603e: eb b2 jmp 115ff2 <_POSIX_Message_queue_Create_support+0xea> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 116040: e8 27 d4 ff ff call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 116045: e8 ce 36 00 00 call 119718 <__errno> 11604a: c7 00 16 00 00 00 movl $0x16,(%eax) 116050: b8 ff ff ff ff mov $0xffffffff,%eax 116055: eb 9b jmp 115ff2 <_POSIX_Message_queue_Create_support+0xea> 116057: 83 ec 08 sub $0x8,%esp 11605a: 56 push %esi 11605b: 68 60 05 13 00 push $0x130560 116060: e8 13 ca ff ff call 112a78 <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 116065: e8 02 d4 ff ff call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 11606a: e8 a9 36 00 00 call 119718 <__errno> 11606f: c7 00 0c 00 00 00 movl $0xc,(%eax) 116075: b8 ff ff ff ff mov $0xffffffff,%eax 11607a: 83 c4 10 add $0x10,%esp 11607d: e9 70 ff ff ff jmp 115ff2 <_POSIX_Message_queue_Create_support+0xea> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 116082: e8 e5 d3 ff ff call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 116087: e8 8c 36 00 00 call 119718 <__errno> 11608c: c7 00 17 00 00 00 movl $0x17,(%eax) 116092: b8 ff ff ff ff mov $0xffffffff,%eax 116097: e9 56 ff ff ff jmp 115ff2 <_POSIX_Message_queue_Create_support+0xea> 0011609c <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 11609c: 55 push %ebp 11609d: 89 e5 mov %esp,%ebp 11609f: 53 push %ebx 1160a0: 83 ec 14 sub $0x14,%esp 1160a3: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 1160a6: 85 db test %ebx,%ebx 1160a8: 74 05 je 1160af <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 1160aa: 80 3b 00 cmpb $0x0,(%ebx) 1160ad: 75 0d jne 1160bc <_POSIX_Message_queue_Name_to_id+0x20> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 1160af: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 1160b4: 8b 5d fc mov -0x4(%ebp),%ebx 1160b7: c9 leave 1160b8: c3 ret 1160b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 1160bc: 83 ec 08 sub $0x8,%esp 1160bf: 68 ff 00 00 00 push $0xff 1160c4: 53 push %ebx 1160c5: e8 92 4b 00 00 call 11ac5c 1160ca: 83 c4 10 add $0x10,%esp 1160cd: 3d fe 00 00 00 cmp $0xfe,%eax 1160d2: 76 0c jbe 1160e0 <_POSIX_Message_queue_Name_to_id+0x44> 1160d4: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 1160d9: 8b 5d fc mov -0x4(%ebp),%ebx 1160dc: c9 leave 1160dd: c3 ret 1160de: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 1160e0: 50 push %eax 1160e1: 8d 45 f4 lea -0xc(%ebp),%eax 1160e4: 50 push %eax 1160e5: 53 push %ebx 1160e6: 68 60 05 13 00 push $0x130560 1160eb: e8 50 11 00 00 call 117240 <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 1160f0: 8b 4d f4 mov -0xc(%ebp),%ecx 1160f3: 8b 55 0c mov 0xc(%ebp),%edx 1160f6: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 1160f8: 83 c4 10 add $0x10,%esp 1160fb: 83 f8 01 cmp $0x1,%eax 1160fe: 19 c0 sbb %eax,%eax 116100: f7 d0 not %eax 116102: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 116105: 8b 5d fc mov -0x4(%ebp),%ebx 116108: c9 leave 116109: c3 ret 0010fcb0 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10fcb0: 55 push %ebp 10fcb1: 89 e5 mov %esp,%ebp 10fcb3: 56 push %esi 10fcb4: 53 push %ebx 10fcb5: 83 ec 24 sub $0x24,%esp 10fcb8: 8b 5d 08 mov 0x8(%ebp),%ebx 10fcbb: 8b 75 14 mov 0x14(%ebp),%esi 10fcbe: 8a 45 18 mov 0x18(%ebp),%al 10fcc1: 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( 10fcc4: 8d 45 f4 lea -0xc(%ebp),%eax 10fcc7: 50 push %eax 10fcc8: 53 push %ebx 10fcc9: 68 00 07 13 00 push $0x130700 10fcce: e8 d5 2e 00 00 call 112ba8 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fcd3: 83 c4 10 add $0x10,%esp 10fcd6: 8b 55 f4 mov -0xc(%ebp),%edx 10fcd9: 85 d2 test %edx,%edx 10fcdb: 74 17 je 10fcf4 <_POSIX_Message_queue_Receive_support+0x44> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fcdd: e8 36 9a 00 00 call 119718 <__errno> 10fce2: c7 00 09 00 00 00 movl $0x9,(%eax) 10fce8: b8 ff ff ff ff mov $0xffffffff,%eax } 10fced: 8d 65 f8 lea -0x8(%ebp),%esp 10fcf0: 5b pop %ebx 10fcf1: 5e pop %esi 10fcf2: c9 leave 10fcf3: 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 ) { 10fcf4: 8b 48 14 mov 0x14(%eax),%ecx 10fcf7: 89 ca mov %ecx,%edx 10fcf9: 83 e2 03 and $0x3,%edx 10fcfc: 4a dec %edx 10fcfd: 0f 84 af 00 00 00 je 10fdb2 <_POSIX_Message_queue_Receive_support+0x102> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fd03: 8b 50 10 mov 0x10(%eax),%edx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10fd06: 8b 45 10 mov 0x10(%ebp),%eax 10fd09: 39 42 68 cmp %eax,0x68(%edx) 10fd0c: 77 62 ja 10fd70 <_POSIX_Message_queue_Receive_support+0xc0> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fd0e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10fd12: 75 48 jne 10fd5c <_POSIX_Message_queue_Receive_support+0xac><== NEVER TAKEN 10fd14: 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; 10fd16: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10fd1d: 83 ec 08 sub $0x8,%esp 10fd20: ff 75 1c pushl 0x1c(%ebp) 10fd23: 50 push %eax 10fd24: 8d 45 f0 lea -0x10(%ebp),%eax 10fd27: 50 push %eax 10fd28: ff 75 0c pushl 0xc(%ebp) 10fd2b: 53 push %ebx 10fd2c: 83 c2 1c add $0x1c,%edx 10fd2f: 52 push %edx 10fd30: e8 4b 1f 00 00 call 111c80 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10fd35: 83 c4 20 add $0x20,%esp 10fd38: e8 2f 37 00 00 call 11346c <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10fd3d: a1 58 02 13 00 mov 0x130258,%eax do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fd42: 8b 50 24 mov 0x24(%eax),%edx 10fd45: 89 16 mov %edx,(%esi) 10fd47: 85 d2 test %edx,%edx 10fd49: 78 21 js 10fd6c <_POSIX_Message_queue_Receive_support+0xbc> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10fd4b: 8b 40 34 mov 0x34(%eax),%eax 10fd4e: 85 c0 test %eax,%eax 10fd50: 75 3a jne 10fd8c <_POSIX_Message_queue_Receive_support+0xdc> return length_out; 10fd52: 8b 45 f0 mov -0x10(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fd55: 8d 65 f8 lea -0x8(%ebp),%esp 10fd58: 5b pop %ebx 10fd59: 5e pop %esi 10fd5a: c9 leave 10fd5b: c3 ret length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fd5c: 89 c8 mov %ecx,%eax 10fd5e: c1 e8 0e shr $0xe,%eax 10fd61: 83 f0 01 xor $0x1,%eax 10fd64: 83 e0 01 and $0x1,%eax 10fd67: eb ad jmp 10fd16 <_POSIX_Message_queue_Receive_support+0x66> 10fd69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fd6c: f7 1e negl (%esi) 10fd6e: eb db jmp 10fd4b <_POSIX_Message_queue_Receive_support+0x9b> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 10fd70: e8 f7 36 00 00 call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10fd75: e8 9e 99 00 00 call 119718 <__errno> 10fd7a: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10fd80: b8 ff ff ff ff mov $0xffffffff,%eax 10fd85: e9 63 ff ff ff jmp 10fced <_POSIX_Message_queue_Receive_support+0x3d> 10fd8a: 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( 10fd8c: e8 87 99 00 00 call 119718 <__errno> 10fd91: 89 c3 mov %eax,%ebx 10fd93: 83 ec 0c sub $0xc,%esp 10fd96: a1 58 02 13 00 mov 0x130258,%eax 10fd9b: ff 70 34 pushl 0x34(%eax) 10fd9e: e8 39 02 00 00 call 10ffdc <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10fda3: 89 03 mov %eax,(%ebx) 10fda5: b8 ff ff ff ff mov $0xffffffff,%eax 10fdaa: 83 c4 10 add $0x10,%esp 10fdad: e9 3b ff ff ff jmp 10fced <_POSIX_Message_queue_Receive_support+0x3d> 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(); 10fdb2: e8 b5 36 00 00 call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fdb7: e8 5c 99 00 00 call 119718 <__errno> 10fdbc: c7 00 09 00 00 00 movl $0x9,(%eax) 10fdc2: b8 ff ff ff ff mov $0xffffffff,%eax 10fdc7: e9 21 ff ff ff jmp 10fced <_POSIX_Message_queue_Receive_support+0x3d> 0010fdec <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10fdec: 55 push %ebp 10fded: 89 e5 mov %esp,%ebp 10fdef: 57 push %edi 10fdf0: 56 push %esi 10fdf1: 53 push %ebx 10fdf2: 83 ec 2c sub $0x2c,%esp 10fdf5: 8b 75 08 mov 0x8(%ebp),%esi 10fdf8: 8b 5d 14 mov 0x14(%ebp),%ebx 10fdfb: 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 ) 10fdfe: 83 fb 20 cmp $0x20,%ebx 10fe01: 0f 87 9d 00 00 00 ja 10fea4 <_POSIX_Message_queue_Send_support+0xb8> 10fe07: 51 push %ecx 10fe08: 8d 45 e4 lea -0x1c(%ebp),%eax 10fe0b: 50 push %eax 10fe0c: 56 push %esi 10fe0d: 68 00 07 13 00 push $0x130700 10fe12: 88 55 d4 mov %dl,-0x2c(%ebp) 10fe15: e8 8e 2d 00 00 call 112ba8 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fe1a: 83 c4 10 add $0x10,%esp 10fe1d: 8b 55 e4 mov -0x1c(%ebp),%edx 10fe20: 85 d2 test %edx,%edx 10fe22: 8a 55 d4 mov -0x2c(%ebp),%dl 10fe25: 75 69 jne 10fe90 <_POSIX_Message_queue_Send_support+0xa4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10fe27: 8b 48 14 mov 0x14(%eax),%ecx 10fe2a: f6 c1 03 test $0x3,%cl 10fe2d: 0f 84 85 00 00 00 je 10feb8 <_POSIX_Message_queue_Send_support+0xcc> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fe33: 8b 78 10 mov 0x10(%eax),%edi /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fe36: 84 d2 test %dl,%dl 10fe38: 75 3a jne 10fe74 <_POSIX_Message_queue_Send_support+0x88> 10fe3a: 31 c0 xor %eax,%eax do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10fe3c: ff 75 1c pushl 0x1c(%ebp) 10fe3f: 50 push %eax 10fe40: f7 db neg %ebx 10fe42: 53 push %ebx 10fe43: 6a 00 push $0x0 10fe45: 56 push %esi 10fe46: ff 75 10 pushl 0x10(%ebp) 10fe49: ff 75 0c pushl 0xc(%ebp) 10fe4c: 8d 47 1c lea 0x1c(%edi),%eax 10fe4f: 50 push %eax 10fe50: e8 57 1f 00 00 call 111dac <_CORE_message_queue_Submit> 10fe55: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10fe57: 83 c4 20 add $0x20,%esp 10fe5a: e8 0d 36 00 00 call 11346c <_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 ) 10fe5f: 83 fb 07 cmp $0x7,%ebx 10fe62: 74 20 je 10fe84 <_POSIX_Message_queue_Send_support+0x98> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 10fe64: 85 db test %ebx,%ebx 10fe66: 75 68 jne 10fed0 <_POSIX_Message_queue_Send_support+0xe4> 10fe68: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fe6a: 8d 65 f4 lea -0xc(%ebp),%esp 10fe6d: 5b pop %ebx 10fe6e: 5e pop %esi 10fe6f: 5f pop %edi 10fe70: c9 leave 10fe71: c3 ret 10fe72: 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 ) 10fe74: 89 c8 mov %ecx,%eax 10fe76: c1 e8 0e shr $0xe,%eax 10fe79: 83 f0 01 xor $0x1,%eax 10fe7c: 83 e0 01 and $0x1,%eax 10fe7f: eb bb jmp 10fe3c <_POSIX_Message_queue_Send_support+0x50> 10fe81: 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; 10fe84: a1 58 02 13 00 mov 0x130258,%eax 10fe89: 8b 58 34 mov 0x34(%eax),%ebx 10fe8c: eb d6 jmp 10fe64 <_POSIX_Message_queue_Send_support+0x78> 10fe8e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fe90: e8 83 98 00 00 call 119718 <__errno> 10fe95: c7 00 09 00 00 00 movl $0x9,(%eax) 10fe9b: b8 ff ff ff ff mov $0xffffffff,%eax 10fea0: eb c8 jmp 10fe6a <_POSIX_Message_queue_Send_support+0x7e> 10fea2: 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 ); 10fea4: e8 6f 98 00 00 call 119718 <__errno> 10fea9: c7 00 16 00 00 00 movl $0x16,(%eax) 10feaf: b8 ff ff ff ff mov $0xffffffff,%eax 10feb4: eb b4 jmp 10fe6a <_POSIX_Message_queue_Send_support+0x7e> 10feb6: 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(); 10feb8: e8 af 35 00 00 call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10febd: e8 56 98 00 00 call 119718 <__errno> 10fec2: c7 00 09 00 00 00 movl $0x9,(%eax) 10fec8: b8 ff ff ff ff mov $0xffffffff,%eax 10fecd: eb 9b jmp 10fe6a <_POSIX_Message_queue_Send_support+0x7e> 10fecf: 90 nop <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 10fed0: e8 43 98 00 00 call 119718 <__errno> 10fed5: 89 c6 mov %eax,%esi 10fed7: 83 ec 0c sub $0xc,%esp 10feda: 53 push %ebx 10fedb: e8 fc 00 00 00 call 10ffdc <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10fee0: 89 06 mov %eax,(%esi) 10fee2: b8 ff ff ff ff mov $0xffffffff,%eax 10fee7: 83 c4 10 add $0x10,%esp 10feea: e9 7b ff ff ff jmp 10fe6a <_POSIX_Message_queue_Send_support+0x7e> 0010d118 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10d118: 55 push %ebp 10d119: 89 e5 mov %esp,%ebp 10d11b: 56 push %esi 10d11c: 53 push %ebx 10d11d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d120: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d123: 85 db test %ebx,%ebx 10d125: 74 39 je 10d160 <_POSIX_Mutex_Get+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d127: 8b 03 mov (%ebx),%eax 10d129: 83 f8 ff cmp $0xffffffff,%eax 10d12c: 74 1a je 10d148 <_POSIX_Mutex_Get+0x30> return (POSIX_Mutex_Control *) 10d12e: 52 push %edx 10d12f: 56 push %esi 10d130: 50 push %eax 10d131: 68 60 b8 12 00 push $0x12b860 10d136: e8 fd 2a 00 00 call 10fc38 <_Objects_Get> 10d13b: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10d13e: 8d 65 f8 lea -0x8(%ebp),%esp 10d141: 5b pop %ebx 10d142: 5e pop %esi 10d143: c9 leave 10d144: c3 ret 10d145: 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 ); 10d148: 83 ec 08 sub $0x8,%esp 10d14b: 6a 00 push $0x0 10d14d: 53 push %ebx 10d14e: e8 65 00 00 00 call 10d1b8 10d153: 83 c4 10 add $0x10,%esp 10d156: 85 c0 test %eax,%eax 10d158: 75 06 jne 10d160 <_POSIX_Mutex_Get+0x48> 10d15a: 8b 03 mov (%ebx),%eax 10d15c: eb d0 jmp 10d12e <_POSIX_Mutex_Get+0x16> 10d15e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d160: c7 06 01 00 00 00 movl $0x1,(%esi) 10d166: 31 c0 xor %eax,%eax 10d168: eb d4 jmp 10d13e <_POSIX_Mutex_Get+0x26> 0010d0c4 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10d0c4: 55 push %ebp 10d0c5: 89 e5 mov %esp,%ebp 10d0c7: 56 push %esi 10d0c8: 53 push %ebx 10d0c9: 8b 5d 08 mov 0x8(%ebp),%ebx 10d0cc: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d0cf: 85 db test %ebx,%ebx 10d0d1: 74 39 je 10d10c <_POSIX_Mutex_Get_interrupt_disable+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d0d3: 8b 03 mov (%ebx),%eax 10d0d5: 83 f8 ff cmp $0xffffffff,%eax 10d0d8: 74 1a je 10d0f4 <_POSIX_Mutex_Get_interrupt_disable+0x30> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10d0da: ff 75 10 pushl 0x10(%ebp) 10d0dd: 56 push %esi 10d0de: 50 push %eax 10d0df: 68 60 b8 12 00 push $0x12b860 10d0e4: e8 f7 2a 00 00 call 10fbe0 <_Objects_Get_isr_disable> 10d0e9: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10d0ec: 8d 65 f8 lea -0x8(%ebp),%esp 10d0ef: 5b pop %ebx 10d0f0: 5e pop %esi 10d0f1: c9 leave 10d0f2: c3 ret 10d0f3: 90 nop <== NOT EXECUTED ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d0f4: 83 ec 08 sub $0x8,%esp 10d0f7: 6a 00 push $0x0 10d0f9: 53 push %ebx 10d0fa: e8 b9 00 00 00 call 10d1b8 10d0ff: 83 c4 10 add $0x10,%esp 10d102: 85 c0 test %eax,%eax 10d104: 75 06 jne 10d10c <_POSIX_Mutex_Get_interrupt_disable+0x48> 10d106: 8b 03 mov (%ebx),%eax 10d108: eb d0 jmp 10d0da <_POSIX_Mutex_Get_interrupt_disable+0x16> 10d10a: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d10c: c7 06 01 00 00 00 movl $0x1,(%esi) 10d112: 31 c0 xor %eax,%eax 10d114: eb d6 jmp 10d0ec <_POSIX_Mutex_Get_interrupt_disable+0x28> 0010d314 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10d314: 55 push %ebp 10d315: 89 e5 mov %esp,%ebp 10d317: 53 push %ebx 10d318: 83 ec 18 sub $0x18,%esp 10d31b: 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 ); 10d31e: 8d 45 f0 lea -0x10(%ebp),%eax 10d321: 50 push %eax 10d322: 8d 45 f4 lea -0xc(%ebp),%eax 10d325: 50 push %eax 10d326: ff 75 08 pushl 0x8(%ebp) 10d329: e8 96 fd ff ff call 10d0c4 <_POSIX_Mutex_Get_interrupt_disable> 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 34 jne 10d36c <_POSIX_Mutex_Lock_support+0x58> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10d338: 83 ec 0c sub $0xc,%esp 10d33b: ff 75 f0 pushl -0x10(%ebp) 10d33e: ff 75 10 pushl 0x10(%ebp) 10d341: 0f b6 db movzbl %bl,%ebx 10d344: 53 push %ebx 10d345: ff 70 08 pushl 0x8(%eax) 10d348: 83 c0 14 add $0x14,%eax 10d34b: 50 push %eax 10d34c: e8 db 1c 00 00 call 10f02c <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d351: 83 c4 14 add $0x14,%esp 10d354: a1 18 b5 12 00 mov 0x12b518,%eax 10d359: ff 70 34 pushl 0x34(%eax) 10d35c: e8 f3 00 00 00 call 10d454 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d361: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d364: 8b 5d fc mov -0x4(%ebp),%ebx 10d367: c9 leave 10d368: c3 ret 10d369: 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 ) { 10d36c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d371: 8b 5d fc mov -0x4(%ebp),%ebx 10d374: c9 leave 10d375: c3 ret 00114020 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 114020: 55 push %ebp 114021: 89 e5 mov %esp,%ebp 114023: 56 push %esi 114024: 53 push %ebx 114025: 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) 114028: 8b 55 0c mov 0xc(%ebp),%edx 11402b: 85 d2 test %edx,%edx 11402d: 0f 85 b9 00 00 00 jne 1140ec <_POSIX_Semaphore_Create_support+0xcc> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 114033: 85 db test %ebx,%ebx 114035: 74 1c je 114053 <_POSIX_Semaphore_Create_support+0x33> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 114037: 83 ec 08 sub $0x8,%esp 11403a: 68 ff 00 00 00 push $0xff 11403f: 53 push %ebx 114040: e8 f7 45 00 00 call 11863c 114045: 83 c4 10 add $0x10,%esp 114048: 3d fe 00 00 00 cmp $0xfe,%eax 11404d: 0f 87 ad 00 00 00 ja 114100 <_POSIX_Semaphore_Create_support+0xe0> 114053: a1 98 d0 12 00 mov 0x12d098,%eax 114058: 40 inc %eax 114059: a3 98 d0 12 00 mov %eax,0x12d098 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 11405e: 83 ec 0c sub $0xc,%esp 114061: 68 e0 d3 12 00 push $0x12d3e0 114066: e8 7d bf ff ff call 10ffe8 <_Objects_Allocate> 11406b: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 11406d: 83 c4 10 add $0x10,%esp 114070: 85 c0 test %eax,%eax 114072: 0f 84 9a 00 00 00 je 114112 <_POSIX_Semaphore_Create_support+0xf2> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 114078: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 11407f: 85 db test %ebx,%ebx 114081: 74 55 je 1140d8 <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; 114083: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 114087: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 11408e: 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; 114092: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 114099: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 1140a0: 50 push %eax 1140a1: ff 75 10 pushl 0x10(%ebp) 1140a4: 8d 46 5c lea 0x5c(%esi),%eax 1140a7: 50 push %eax 1140a8: 8d 46 1c lea 0x1c(%esi),%eax 1140ab: 50 push %eax 1140ac: e8 4b ba ff ff call 10fafc <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1140b1: 0f b7 56 08 movzwl 0x8(%esi),%edx 1140b5: a1 fc d3 12 00 mov 0x12d3fc,%eax 1140ba: 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; 1140bd: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 1140c0: 8b 45 14 mov 0x14(%ebp),%eax 1140c3: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 1140c5: e8 92 cc ff ff call 110d5c <_Thread_Enable_dispatch> 1140ca: 31 c0 xor %eax,%eax return 0; 1140cc: 83 c4 10 add $0x10,%esp } 1140cf: 8d 65 f8 lea -0x8(%ebp),%esp 1140d2: 5b pop %ebx 1140d3: 5e pop %esi 1140d4: c9 leave 1140d5: c3 ret 1140d6: 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; 1140d8: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 1140dc: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 1140e3: c6 40 15 00 movb $0x0,0x15(%eax) 1140e7: eb a9 jmp 114092 <_POSIX_Semaphore_Create_support+0x72> 1140e9: 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 ); 1140ec: e8 bb 36 00 00 call 1177ac <__errno> 1140f1: c7 00 58 00 00 00 movl $0x58,(%eax) 1140f7: b8 ff ff ff ff mov $0xffffffff,%eax 1140fc: eb d1 jmp 1140cf <_POSIX_Semaphore_Create_support+0xaf> 1140fe: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 114100: e8 a7 36 00 00 call 1177ac <__errno> 114105: c7 00 5b 00 00 00 movl $0x5b,(%eax) 11410b: b8 ff ff ff ff mov $0xffffffff,%eax 114110: eb bd jmp 1140cf <_POSIX_Semaphore_Create_support+0xaf> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 114112: e8 45 cc ff ff call 110d5c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 114117: e8 90 36 00 00 call 1177ac <__errno> 11411c: c7 00 1c 00 00 00 movl $0x1c,(%eax) 114122: b8 ff ff ff ff mov $0xffffffff,%eax 114127: eb a6 jmp 1140cf <_POSIX_Semaphore_Create_support+0xaf> 0011417c <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 11417c: 55 push %ebp 11417d: 89 e5 mov %esp,%ebp 11417f: 83 ec 18 sub $0x18,%esp 114182: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 114185: 85 c0 test %eax,%eax 114187: 74 05 je 11418e <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 114189: 80 38 00 cmpb $0x0,(%eax) 11418c: 75 0a jne 114198 <_POSIX_Semaphore_Name_to_id+0x1c> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 11418e: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 114193: c9 leave 114194: c3 ret 114195: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 114198: 52 push %edx 114199: 8d 55 f4 lea -0xc(%ebp),%edx 11419c: 52 push %edx 11419d: 50 push %eax 11419e: 68 e0 d3 12 00 push $0x12d3e0 1141a3: e8 88 0c 00 00 call 114e30 <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 1141a8: 8b 4d f4 mov -0xc(%ebp),%ecx 1141ab: 8b 55 0c mov 0xc(%ebp),%edx 1141ae: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 1141b0: 83 c4 10 add $0x10,%esp 1141b3: 83 f8 01 cmp $0x1,%eax 1141b6: 19 c0 sbb %eax,%eax 1141b8: f7 d0 not %eax 1141ba: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 1141bd: c9 leave 1141be: c3 ret 001141e8 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 1141e8: 55 push %ebp 1141e9: 89 e5 mov %esp,%ebp 1141eb: 53 push %ebx 1141ec: 83 ec 18 sub $0x18,%esp 1141ef: 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 *) 1141f2: 8d 45 f4 lea -0xc(%ebp),%eax 1141f5: 50 push %eax 1141f6: 8b 45 08 mov 0x8(%ebp),%eax 1141f9: ff 30 pushl (%eax) 1141fb: 68 e0 d3 12 00 push $0x12d3e0 114200: e8 93 c2 ff ff call 110498 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 114205: 83 c4 10 add $0x10,%esp 114208: 8b 55 f4 mov -0xc(%ebp),%edx 11420b: 85 d2 test %edx,%edx 11420d: 74 15 je 114224 <_POSIX_Semaphore_Wait_support+0x3c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 11420f: e8 98 35 00 00 call 1177ac <__errno> 114214: c7 00 16 00 00 00 movl $0x16,(%eax) 11421a: b8 ff ff ff ff mov $0xffffffff,%eax } 11421f: 8b 5d fc mov -0x4(%ebp),%ebx 114222: c9 leave 114223: c3 ret the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 114224: ff 75 10 pushl 0x10(%ebp) 114227: 0f b6 db movzbl %bl,%ebx 11422a: 53 push %ebx 11422b: ff 70 08 pushl 0x8(%eax) 11422e: 83 c0 1c add $0x1c,%eax 114231: 50 push %eax 114232: e8 f5 06 00 00 call 11492c <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 114237: e8 20 cb ff ff call 110d5c <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 11423c: 83 c4 10 add $0x10,%esp 11423f: a1 58 d1 12 00 mov 0x12d158,%eax 114244: 8b 40 34 mov 0x34(%eax),%eax 114247: 85 c0 test %eax,%eax 114249: 75 09 jne 114254 <_POSIX_Semaphore_Wait_support+0x6c> 11424b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 11424d: 8b 5d fc mov -0x4(%ebp),%ebx 114250: c9 leave 114251: c3 ret 114252: 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( 114254: e8 53 35 00 00 call 1177ac <__errno> 114259: 89 c3 mov %eax,%ebx 11425b: 83 ec 0c sub $0xc,%esp 11425e: a1 58 d1 12 00 mov 0x12d158,%eax 114263: ff 70 34 pushl 0x34(%eax) 114266: e8 4d 24 00 00 call 1166b8 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 11426b: 89 03 mov %eax,(%ebx) 11426d: b8 ff ff ff ff mov $0xffffffff,%eax 114272: 83 c4 10 add $0x10,%esp 114275: eb a8 jmp 11421f <_POSIX_Semaphore_Wait_support+0x37> 0011026c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 11026c: 55 push %ebp 11026d: 89 e5 mov %esp,%ebp 11026f: 83 ec 08 sub $0x8,%esp 110272: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110275: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 11027b: 8b 88 d4 00 00 00 mov 0xd4(%eax),%ecx 110281: 85 c9 test %ecx,%ecx 110283: 75 09 jne 11028e <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== ALWAYS TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 110285: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax) 11028c: 74 06 je 110294 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 11028e: 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(); 11028f: e9 0c d7 ff ff jmp 10d9a0 <_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 ) { 110294: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax 11029a: 85 c0 test %eax,%eax 11029c: 74 f0 je 11028e <_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; 11029e: a1 38 88 12 00 mov 0x128838,%eax 1102a3: 48 dec %eax 1102a4: a3 38 88 12 00 mov %eax,0x128838 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 1102a9: 83 ec 08 sub $0x8,%esp 1102ac: 6a ff push $0xffffffff 1102ae: 52 push %edx 1102af: e8 28 06 00 00 call 1108dc <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 1102b4: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 1102b7: c9 leave 1102b8: c3 ret 00111348 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 111348: 55 push %ebp 111349: 89 e5 mov %esp,%ebp 11134b: 57 push %edi 11134c: 56 push %esi 11134d: 53 push %ebx 11134e: 83 ec 18 sub $0x18,%esp 111351: 8b 5d 08 mov 0x8(%ebp),%ebx 111354: 8b 75 0c mov 0xc(%ebp),%esi 111357: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 11135a: ff 36 pushl (%esi) 11135c: e8 cb ff ff ff call 11132c <_POSIX_Priority_Is_valid> 111361: 83 c4 10 add $0x10,%esp 111364: 84 c0 test %al,%al 111366: 74 2a je 111392 <_POSIX_Thread_Translate_sched_param+0x4a><== ALWAYS TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111368: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 11136e: 8b 45 14 mov 0x14(%ebp),%eax 111371: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 111377: 85 db test %ebx,%ebx 111379: 74 25 je 1113a0 <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 11137b: 83 fb 01 cmp $0x1,%ebx 11137e: 0f 84 90 00 00 00 je 111414 <_POSIX_Thread_Translate_sched_param+0xcc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 111384: 83 fb 02 cmp $0x2,%ebx 111387: 0f 84 97 00 00 00 je 111424 <_POSIX_Thread_Translate_sched_param+0xdc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 11138d: 83 fb 04 cmp $0x4,%ebx 111390: 74 1e je 1113b0 <_POSIX_Thread_Translate_sched_param+0x68> if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 111392: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 111397: 8d 65 f4 lea -0xc(%ebp),%esp 11139a: 5b pop %ebx 11139b: 5e pop %esi 11139c: 5f pop %edi 11139d: c9 leave 11139e: c3 ret 11139f: 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; 1113a0: c7 07 01 00 00 00 movl $0x1,(%edi) 1113a6: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 1113a8: 8d 65 f4 lea -0xc(%ebp),%esp 1113ab: 5b pop %ebx 1113ac: 5e pop %esi 1113ad: 5f pop %edi 1113ae: c9 leave 1113af: c3 ret *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && 1113b0: 8b 5e 08 mov 0x8(%esi),%ebx 1113b3: 85 db test %ebx,%ebx 1113b5: 75 07 jne 1113be <_POSIX_Thread_Translate_sched_param+0x76> (param->sched_ss_repl_period.tv_nsec == 0) ) 1113b7: 8b 4e 0c mov 0xc(%esi),%ecx 1113ba: 85 c9 test %ecx,%ecx 1113bc: 74 d4 je 111392 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 1113be: 8b 56 10 mov 0x10(%esi),%edx 1113c1: 85 d2 test %edx,%edx 1113c3: 75 07 jne 1113cc <_POSIX_Thread_Translate_sched_param+0x84> (param->sched_ss_init_budget.tv_nsec == 0) ) 1113c5: 8b 46 14 mov 0x14(%esi),%eax 1113c8: 85 c0 test %eax,%eax 1113ca: 74 c6 je 111392 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 1113cc: 83 ec 0c sub $0xc,%esp 1113cf: 8d 46 08 lea 0x8(%esi),%eax 1113d2: 50 push %eax 1113d3: e8 cc de ff ff call 10f2a4 <_Timespec_To_ticks> 1113d8: 89 c3 mov %eax,%ebx 1113da: 8d 46 10 lea 0x10(%esi),%eax 1113dd: 89 04 24 mov %eax,(%esp) 1113e0: e8 bf de ff ff call 10f2a4 <_Timespec_To_ticks> 1113e5: 83 c4 10 add $0x10,%esp 1113e8: 39 c3 cmp %eax,%ebx 1113ea: 72 a6 jb 111392 <_POSIX_Thread_Translate_sched_param+0x4a> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 1113ec: 83 ec 0c sub $0xc,%esp 1113ef: ff 76 04 pushl 0x4(%esi) 1113f2: e8 35 ff ff ff call 11132c <_POSIX_Priority_Is_valid> 1113f7: 83 c4 10 add $0x10,%esp 1113fa: 84 c0 test %al,%al 1113fc: 74 94 je 111392 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 1113fe: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 111404: 8b 45 14 mov 0x14(%ebp),%eax 111407: c7 00 18 bc 10 00 movl $0x10bc18,(%eax) 11140d: 31 c0 xor %eax,%eax return 0; 11140f: eb 86 jmp 111397 <_POSIX_Thread_Translate_sched_param+0x4f> 111411: 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; 111414: c7 07 00 00 00 00 movl $0x0,(%edi) 11141a: 31 c0 xor %eax,%eax return 0; 11141c: e9 76 ff ff ff jmp 111397 <_POSIX_Thread_Translate_sched_param+0x4f> 111421: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 111424: c7 07 02 00 00 00 movl $0x2,(%edi) 11142a: 31 c0 xor %eax,%eax return 0; 11142c: e9 66 ff ff ff jmp 111397 <_POSIX_Thread_Translate_sched_param+0x4f> 00110230 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 110230: 55 push %ebp 110231: 89 e5 mov %esp,%ebp 110233: 57 push %edi 110234: 56 push %esi 110235: 53 push %ebx 110236: 83 ec 28 sub $0x28,%esp 110239: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 11023c: 68 ec 00 00 00 push $0xec 110241: 89 55 e4 mov %edx,-0x1c(%ebp) 110244: e8 bb e4 ff ff call 10e704 <_Workspace_Allocate> 110249: 89 c3 mov %eax,%ebx if ( !api ) 11024b: 83 c4 10 add $0x10,%esp 11024e: 85 c0 test %eax,%eax 110250: 8b 55 e4 mov -0x1c(%ebp),%edx 110253: 0f 84 2f 01 00 00 je 110388 <_POSIX_Threads_Create_extension+0x158> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 110259: 89 82 f8 00 00 00 mov %eax,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 11025f: b9 3c 00 00 00 mov $0x3c,%ecx 110264: 31 c0 xor %eax,%eax 110266: 89 df mov %ebx,%edi 110268: f3 aa rep stos %al,%es:(%edi) 11026a: c7 03 01 00 00 00 movl $0x1,(%ebx) 110270: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) 110277: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx) 11027e: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx) 110285: c7 43 34 01 00 00 00 movl $0x1,0x34(%ebx) 11028c: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 110293: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 11029a: c7 83 80 00 00 00 01 movl $0x1,0x80(%ebx) 1102a1: 00 00 00 api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 1102a4: be d8 13 12 00 mov $0x1213d8,%esi 1102a9: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi 1102af: b1 07 mov $0x7,%cl 1102b1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->schedparam.sched_priority = 1102b3: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 1102ba: 2b 42 14 sub 0x14(%edx),%eax 1102bd: 89 83 84 00 00 00 mov %eax,0x84(%ebx) _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 1102c3: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 1102ca: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 1102cd: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 1102d4: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 1102d7: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx) 1102de: 00 00 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1102e1: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax 1102e7: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) the_chain->permanent_null = NULL; 1102ed: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 1102f4: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1102f7: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax 1102fd: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 110303: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 11030a: 00 00 00 if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 11030d: 0f b6 42 0b movzbl 0xb(%edx),%eax 110311: 83 e0 07 and $0x7,%eax 110314: 83 f8 03 cmp $0x3,%eax 110317: 74 53 je 11036c <_POSIX_Threads_Create_extension+0x13c> #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; } else { api->signals_blocked = 0xffffffff; 110319: c7 83 cc 00 00 00 ff movl $0xffffffff,0xcc(%ebx) 110320: ff ff ff } _Thread_queue_Initialize( 110323: 6a 00 push $0x0 110325: 68 00 10 00 00 push $0x1000 11032a: 6a 00 push $0x0 11032c: 8d 43 40 lea 0x40(%ebx),%eax 11032f: 50 push %eax 110330: 89 55 e4 mov %edx,-0x1c(%ebp) 110333: e8 b4 d9 ff ff call 10dcec <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 110338: 8b 55 e4 mov -0x1c(%ebp),%edx 11033b: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11033e: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx) 110345: 00 00 00 the_watchdog->routine = routine; 110348: c7 83 c0 00 00 00 d8 movl $0x1103d8,0xc0(%ebx) 11034f: 03 11 00 the_watchdog->id = id; 110352: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) the_watchdog->user_data = user_data; 110358: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx) 11035e: b0 01 mov $0x1,%al _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 110360: 83 c4 10 add $0x10,%esp } 110363: 8d 65 f4 lea -0xc(%ebp),%esp 110366: 5b pop %ebx 110367: 5e pop %esi 110368: 5f pop %edi 110369: c9 leave 11036a: c3 ret 11036b: 90 nop <== 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; 11036c: a1 b8 74 12 00 mov 0x1274b8,%eax 110371: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 110377: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 11037d: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) 110383: eb 9e jmp 110323 <_POSIX_Threads_Create_extension+0xf3> 110385: 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 ) 110388: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 11038a: 8d 65 f4 lea -0xc(%ebp),%esp 11038d: 5b pop %ebx 11038e: 5e pop %esi 11038f: 5f pop %edi 110390: c9 leave 110391: c3 ret 001101a8 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 1101a8: 55 push %ebp 1101a9: 89 e5 mov %esp,%ebp 1101ab: 57 push %edi 1101ac: 56 push %esi 1101ad: 53 push %ebx 1101ae: 83 ec 28 sub $0x28,%esp 1101b1: 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 ]; 1101b4: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax 1101ba: 89 45 e4 mov %eax,-0x1c(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 1101bd: 57 push %edi 1101be: e8 f9 20 00 00 call 1122bc <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 1101c3: 89 3c 24 mov %edi,(%esp) 1101c6: e8 55 21 00 00 call 112320 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 1101cb: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 1101ce: 8b 5d e4 mov -0x1c(%ebp),%ebx 1101d1: 83 c3 40 add $0x40,%ebx 1101d4: 83 c4 10 add $0x10,%esp 1101d7: eb 08 jmp 1101e1 <_POSIX_Threads_Delete_extension+0x39> 1101d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; 1101dc: 8b 40 28 mov 0x28(%eax),%eax 1101df: 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 )) ) 1101e1: 83 ec 0c sub $0xc,%esp 1101e4: 53 push %ebx 1101e5: e8 86 d7 ff ff call 10d970 <_Thread_queue_Dequeue> 1101ea: 83 c4 10 add $0x10,%esp 1101ed: 85 c0 test %eax,%eax 1101ef: 75 eb jne 1101dc <_POSIX_Threads_Delete_extension+0x34> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 1101f1: 8b 45 e4 mov -0x1c(%ebp),%eax 1101f4: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax) 1101fb: 74 1f je 11021c <_POSIX_Threads_Delete_extension+0x74> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 1101fd: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi) 110204: 00 00 00 (void) _Workspace_Free( api ); 110207: 8b 45 e4 mov -0x1c(%ebp),%eax 11020a: 89 45 08 mov %eax,0x8(%ebp) } 11020d: 8d 65 f4 lea -0xc(%ebp),%esp 110210: 5b pop %ebx 110211: 5e pop %esi 110212: 5f pop %edi 110213: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 110214: e9 07 e5 ff ff jmp 10e720 <_Workspace_Free> 110219: 8d 76 00 lea 0x0(%esi),%esi <== 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 ); 11021c: 83 ec 0c sub $0xc,%esp 11021f: 05 a4 00 00 00 add $0xa4,%eax 110224: 50 push %eax 110225: e8 d6 e3 ff ff call 10e600 <_Watchdog_Remove> 11022a: 83 c4 10 add $0x10,%esp 11022d: eb ce jmp 1101fd <_POSIX_Threads_Delete_extension+0x55> 00110184 <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 110184: 55 push %ebp 110185: 89 e5 mov %esp,%ebp 110187: 83 ec 08 sub $0x8,%esp 11018a: 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 ) 11018d: 0f b6 42 0b movzbl 0xb(%edx),%eax 110191: 83 e0 07 and $0x7,%eax 110194: 83 f8 03 cmp $0x3,%eax 110197: 74 03 je 11019c <_POSIX_Threads_Exitted_extension+0x18> pthread_exit( executing->Wait.return_argument ); } 110199: c9 leave 11019a: c3 ret 11019b: 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 ); 11019c: 8b 42 28 mov 0x28(%edx),%eax 11019f: 89 45 08 mov %eax,0x8(%ebp) } 1101a2: 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 ); 1101a3: e9 28 24 00 00 jmp 1125d0 00110128 <_POSIX_Threads_Initialize_user_threads>: * * This routine creates and starts all configured user * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { 110128: 55 push %ebp 110129: 89 e5 mov %esp,%ebp 11012b: 83 ec 08 sub $0x8,%esp if ( _POSIX_Threads_Initialize_user_threads_p ) 11012e: a1 78 56 12 00 mov 0x125678,%eax 110133: 85 c0 test %eax,%eax 110135: 74 05 je 11013c <_POSIX_Threads_Initialize_user_threads+0x14> (*_POSIX_Threads_Initialize_user_threads_p)(); } 110137: c9 leave * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); 110138: ff e0 jmp *%eax 11013a: 66 90 xchg %ax,%ax <== NOT EXECUTED } 11013c: c9 leave 11013d: c3 ret 0010b938 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10b938: 55 push %ebp 10b939: 89 e5 mov %esp,%ebp 10b93b: 57 push %edi 10b93c: 56 push %esi 10b93d: 53 push %ebx 10b93e: 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; 10b941: 8b 3d 34 45 12 00 mov 0x124534,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10b947: a1 30 45 12 00 mov 0x124530,%eax 10b94c: 89 45 a4 mov %eax,-0x5c(%ebp) if ( !user_threads || maximum == 0 ) 10b94f: 85 ff test %edi,%edi 10b951: 74 44 je 10b997 <_POSIX_Threads_Initialize_user_threads_body+0x5f><== ALWAYS TAKEN 10b953: 85 c0 test %eax,%eax 10b955: 74 40 je 10b997 <_POSIX_Threads_Initialize_user_threads_body+0x5f><== ALWAYS TAKEN 10b957: 31 db xor %ebx,%ebx 10b959: 8d 75 a8 lea -0x58(%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 ); 10b95c: 83 ec 0c sub $0xc,%esp 10b95f: 56 push %esi 10b960: e8 cf 5a 00 00 call 111434 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10b965: 5a pop %edx 10b966: 59 pop %ecx 10b967: 6a 02 push $0x2 10b969: 56 push %esi 10b96a: e8 ed 5a 00 00 call 11145c (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10b96f: 59 pop %ecx 10b970: 58 pop %eax 10b971: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10b975: 56 push %esi 10b976: e8 15 5b 00 00 call 111490 status = pthread_create( 10b97b: 6a 00 push $0x0 10b97d: ff 34 df pushl (%edi,%ebx,8) 10b980: 56 push %esi 10b981: 8d 45 e4 lea -0x1c(%ebp),%eax 10b984: 50 push %eax 10b985: e8 9a fc ff ff call 10b624 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10b98a: 83 c4 20 add $0x20,%esp 10b98d: 85 c0 test %eax,%eax 10b98f: 75 0e jne 10b99f <_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++ ) { 10b991: 43 inc %ebx 10b992: 39 5d a4 cmp %ebx,-0x5c(%ebp) 10b995: 77 c5 ja 10b95c <_POSIX_Threads_Initialize_user_threads_body+0x24><== ALWAYS TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10b997: 8d 65 f4 lea -0xc(%ebp),%esp 10b99a: 5b pop %ebx 10b99b: 5e pop %esi 10b99c: 5f pop %edi 10b99d: c9 leave 10b99e: c3 ret &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10b99f: 52 push %edx 10b9a0: 50 push %eax 10b9a1: 6a 01 push $0x1 10b9a3: 6a 02 push $0x2 10b9a5: e8 ea 1d 00 00 call 10d794 <_Internal_error_Occurred> 001103d8 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 1103d8: 55 push %ebp 1103d9: 89 e5 mov %esp,%ebp 1103db: 56 push %esi 1103dc: 53 push %ebx 1103dd: 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 ]; 1103e0: 8b 9e f8 00 00 00 mov 0xf8(%esi),%ebx /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 1103e6: 83 ec 0c sub $0xc,%esp 1103e9: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax 1103ef: 50 push %eax 1103f0: e8 bf 0f 00 00 call 1113b4 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 1103f5: 89 46 78 mov %eax,0x78(%esi) 1103f8: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 1103ff: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 110405: 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 ) { 110408: 83 c4 10 add $0x10,%esp 11040b: 8b 4e 1c mov 0x1c(%esi),%ecx 11040e: 85 c9 test %ecx,%ecx 110410: 75 05 jne 110417 <_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 ) { 110412: 39 46 14 cmp %eax,0x14(%esi) 110415: 77 35 ja 11044c <_POSIX_Threads_Sporadic_budget_TSR+0x74> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 110417: 83 ec 0c sub $0xc,%esp 11041a: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax 110420: 50 push %eax 110421: e8 8e 0f 00 00 call 1113b4 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 110426: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11042c: 83 c4 10 add $0x10,%esp 11042f: 81 c3 a4 00 00 00 add $0xa4,%ebx 110435: 89 5d 0c mov %ebx,0xc(%ebp) 110438: c7 45 08 d8 74 12 00 movl $0x1274d8,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 11043f: 8d 65 f8 lea -0x8(%ebp),%esp 110442: 5b pop %ebx 110443: 5e pop %esi 110444: c9 leave 110445: e9 7e e0 ff ff jmp 10e4c8 <_Watchdog_Insert> 11044a: 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 ); 11044c: 52 push %edx 11044d: 6a 01 push $0x1 11044f: 50 push %eax 110450: 56 push %esi 110451: e8 16 cc ff ff call 10d06c <_Thread_Change_priority> 110456: 83 c4 10 add $0x10,%esp 110459: eb bc jmp 110417 <_POSIX_Threads_Sporadic_budget_TSR+0x3f> 00110394 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 110394: 55 push %ebp 110395: 89 e5 mov %esp,%ebp 110397: 83 ec 08 sub $0x8,%esp 11039a: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11039d: 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 */ 1103a3: 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); 1103aa: 0f b6 15 14 32 12 00 movzbl 0x123214,%edx 1103b1: 2b 91 88 00 00 00 sub 0x88(%ecx),%edx new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 1103b7: 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 ) { 1103ba: 8b 48 1c mov 0x1c(%eax),%ecx 1103bd: 85 c9 test %ecx,%ecx 1103bf: 75 05 jne 1103c6 <_POSIX_Threads_Sporadic_budget_callout+0x32><== ALWAYS TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 1103c1: 39 50 14 cmp %edx,0x14(%eax) 1103c4: 72 02 jb 1103c8 <_POSIX_Threads_Sporadic_budget_callout+0x34><== NEVER TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 1103c6: c9 leave <== NOT EXECUTED 1103c7: c3 ret <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_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 ); 1103c8: 51 push %ecx 1103c9: 6a 01 push $0x1 1103cb: 52 push %edx 1103cc: 50 push %eax 1103cd: e8 9a cc ff ff call 10d06c <_Thread_Change_priority> 1103d2: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 1103d5: c9 leave 1103d6: c3 ret 001122bc <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 1122bc: 55 push %ebp 1122bd: 89 e5 mov %esp,%ebp 1122bf: 57 push %edi 1122c0: 56 push %esi 1122c1: 53 push %ebx 1122c2: 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 ]; 1122c5: 8b 45 08 mov 0x8(%ebp),%eax 1122c8: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 1122ce: c7 86 d4 00 00 00 01 movl $0x1,0xd4(%esi) 1122d5: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1122d8: 8d 9e e4 00 00 00 lea 0xe4(%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; 1122de: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi) 1122e4: 74 30 je 112316 <_POSIX_Threads_cancel_run+0x5a> 1122e6: 66 90 xchg %ax,%ax thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 1122e8: 9c pushf 1122e9: fa cli 1122ea: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 1122eb: 8b 7b 04 mov 0x4(%ebx),%edi ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1122ee: 8b 17 mov (%edi),%edx previous = the_node->previous; 1122f0: 8b 47 04 mov 0x4(%edi),%eax next->previous = previous; 1122f3: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 1122f6: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 1122f8: 51 push %ecx 1122f9: 9d popf (*handler->routine)( handler->arg ); 1122fa: 83 ec 0c sub $0xc,%esp 1122fd: ff 77 0c pushl 0xc(%edi) 112300: ff 57 08 call *0x8(%edi) _Workspace_Free( handler ); 112303: 89 3c 24 mov %edi,(%esp) 112306: e8 15 c4 ff ff call 10e720 <_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; 11230b: 83 c4 10 add $0x10,%esp 11230e: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi) 112314: 75 d2 jne 1122e8 <_POSIX_Threads_cancel_run+0x2c><== ALWAYS TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 112316: 8d 65 f4 lea -0xc(%ebp),%esp 112319: 5b pop %ebx 11231a: 5e pop %esi 11231b: 5f pop %edi 11231c: c9 leave 11231d: c3 ret 00111148 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 111148: 55 push %ebp 111149: 89 e5 mov %esp,%ebp 11114b: 56 push %esi 11114c: 53 push %ebx 11114d: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 111150: 83 ec 0c sub $0xc,%esp 111153: 53 push %ebx 111154: e8 c3 df ff ff call 10f11c <_Watchdog_Remove> _ISR_Disable( level ); 111159: 9c pushf 11115a: fa cli 11115b: 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 ) { 11115c: 83 c4 10 add $0x10,%esp 11115f: 8b 43 08 mov 0x8(%ebx),%eax 111162: 85 c0 test %eax,%eax 111164: 74 0e je 111174 <_POSIX_Timer_Insert_helper+0x2c> _ISR_Enable( level ); 111166: 56 push %esi 111167: 9d popf 111168: 31 c0 xor %eax,%eax */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 11116a: 8d 65 f8 lea -0x8(%ebp),%esp 11116d: 5b pop %ebx 11116e: 5e pop %esi 11116f: c9 leave 111170: c3 ret 111171: 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; 111174: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 11117b: 8b 45 14 mov 0x14(%ebp),%eax 11117e: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 111181: 8b 45 10 mov 0x10(%ebp),%eax 111184: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 111187: 8b 45 18 mov 0x18(%ebp),%eax 11118a: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11118d: 8b 45 0c mov 0xc(%ebp),%eax 111190: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 111193: 83 ec 08 sub $0x8,%esp 111196: 53 push %ebx 111197: 68 58 94 12 00 push $0x129458 11119c: e8 43 de ff ff call 10efe4 <_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 ); 1111a1: 56 push %esi 1111a2: 9d popf 1111a3: b0 01 mov $0x1,%al return true; 1111a5: 83 c4 10 add $0x10,%esp } 1111a8: 8d 65 f8 lea -0x8(%ebp),%esp 1111ab: 5b pop %ebx 1111ac: 5e pop %esi 1111ad: c9 leave 1111ae: c3 ret 0010b744 <_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) { 10b744: 55 push %ebp 10b745: 89 e5 mov %esp,%ebp 10b747: 53 push %ebx 10b748: 83 ec 04 sub $0x4,%esp 10b74b: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10b74e: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10b751: 8b 53 54 mov 0x54(%ebx),%edx 10b754: 85 d2 test %edx,%edx 10b756: 75 28 jne 10b780 <_POSIX_Timer_TSR+0x3c> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10b758: 8b 43 58 mov 0x58(%ebx),%eax 10b75b: 85 c0 test %eax,%eax 10b75d: 75 21 jne 10b780 <_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; 10b75f: 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 ) ) { 10b763: 83 ec 08 sub $0x8,%esp 10b766: ff 73 44 pushl 0x44(%ebx) 10b769: ff 73 38 pushl 0x38(%ebx) 10b76c: e8 5f 55 00 00 call 110cd0 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10b771: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10b778: 83 c4 10 add $0x10,%esp } 10b77b: 8b 5d fc mov -0x4(%ebp),%ebx 10b77e: c9 leave 10b77f: 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( 10b780: 83 ec 0c sub $0xc,%esp 10b783: 53 push %ebx 10b784: 68 44 b7 10 00 push $0x10b744 10b789: ff 73 08 pushl 0x8(%ebx) 10b78c: ff 73 64 pushl 0x64(%ebx) 10b78f: 8d 43 10 lea 0x10(%ebx),%eax 10b792: 50 push %eax 10b793: e8 b0 59 00 00 call 111148 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10b798: 83 c4 20 add $0x20,%esp 10b79b: 84 c0 test %al,%al 10b79d: 74 dc je 10b77b <_POSIX_Timer_TSR+0x37> <== ALWAYS TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10b79f: 83 ec 0c sub $0xc,%esp 10b7a2: 8d 43 6c lea 0x6c(%ebx),%eax 10b7a5: 50 push %eax 10b7a6: e8 65 16 00 00 call 10ce10 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b7ab: 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 ) || 10b7af: 83 c4 10 add $0x10,%esp 10b7b2: eb af jmp 10b763 <_POSIX_Timer_TSR+0x1f> 001123d8 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 1123d8: 55 push %ebp 1123d9: 89 e5 mov %esp,%ebp 1123db: 57 push %edi 1123dc: 56 push %esi 1123dd: 53 push %ebx 1123de: 83 ec 48 sub $0x48,%esp 1123e1: 8b 75 08 mov 0x8(%ebp),%esi 1123e4: 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, 1123e7: 6a 01 push $0x1 1123e9: 0f b6 45 10 movzbl 0x10(%ebp),%eax 1123ed: 50 push %eax 1123ee: 8d 7d dc lea -0x24(%ebp),%edi 1123f1: 57 push %edi 1123f2: 53 push %ebx 1123f3: 56 push %esi 1123f4: e8 6b 00 00 00 call 112464 <_POSIX_signals_Clear_signals> 1123f9: 83 c4 20 add $0x20,%esp 1123fc: 84 c0 test %al,%al 1123fe: 74 58 je 112458 <_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 ) 112400: 8d 04 5b lea (%ebx,%ebx,2),%eax 112403: c1 e0 02 shl $0x2,%eax 112406: 8b 90 e8 79 12 00 mov 0x1279e8(%eax),%edx 11240c: 89 55 c4 mov %edx,-0x3c(%ebp) 11240f: 4a dec %edx 112410: 74 46 je 112458 <_POSIX_signals_Check_signal+0x80><== ALWAYS TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 112412: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 112418: 8b 90 e4 79 12 00 mov 0x1279e4(%eax),%edx 11241e: 09 ca or %ecx,%edx 112420: 89 96 cc 00 00 00 mov %edx,0xcc(%esi) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 112426: 83 b8 e0 79 12 00 02 cmpl $0x2,0x1279e0(%eax) 11242d: 74 21 je 112450 <_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 ); 11242f: 83 ec 0c sub $0xc,%esp 112432: 53 push %ebx 112433: 89 4d d4 mov %ecx,-0x2c(%ebp) 112436: ff 55 c4 call *-0x3c(%ebp) 112439: 83 c4 10 add $0x10,%esp 11243c: 8b 4d d4 mov -0x2c(%ebp),%ecx } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 11243f: 89 8e cc 00 00 00 mov %ecx,0xcc(%esi) 112445: b0 01 mov $0x1,%al return true; } 112447: 8d 65 f4 lea -0xc(%ebp),%esp 11244a: 5b pop %ebx 11244b: 5e pop %esi 11244c: 5f pop %edi 11244d: c9 leave 11244e: c3 ret 11244f: 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)( 112450: 50 push %eax 112451: 6a 00 push $0x0 112453: 57 push %edi 112454: eb dc jmp 112432 <_POSIX_signals_Check_signal+0x5a> 112456: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 112458: 31 c0 xor %eax,%eax } 11245a: 8d 65 f4 lea -0xc(%ebp),%esp 11245d: 5b pop %ebx 11245e: 5e pop %esi 11245f: 5f pop %edi 112460: c9 leave 112461: c3 ret 001133ec <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 1133ec: 55 push %ebp 1133ed: 89 e5 mov %esp,%ebp 1133ef: 53 push %ebx 1133f0: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 1133f3: 9c pushf 1133f4: fa cli 1133f5: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 1133f6: 8d 04 49 lea (%ecx,%ecx,2),%eax 1133f9: c1 e0 02 shl $0x2,%eax 1133fc: 83 b8 e0 79 12 00 02 cmpl $0x2,0x1279e0(%eax) 113403: 74 23 je 113428 <_POSIX_signals_Clear_process_signals+0x3c> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 113405: 49 dec %ecx 113406: b8 fe ff ff ff mov $0xfffffffe,%eax 11340b: d3 c0 rol %cl,%eax 11340d: 23 05 e8 7b 12 00 and 0x127be8,%eax 113413: a3 e8 7b 12 00 mov %eax,0x127be8 if ( !_POSIX_signals_Pending ) 113418: 85 c0 test %eax,%eax 11341a: 75 06 jne 113422 <_POSIX_signals_Clear_process_signals+0x36><== ALWAYS TAKEN _Thread_Do_post_task_switch_extension--; 11341c: ff 0d 9c 74 12 00 decl 0x12749c } _ISR_Enable( level ); 113422: 52 push %edx 113423: 9d popf } 113424: 5b pop %ebx 113425: c9 leave 113426: c3 ret 113427: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 113428: 8d 98 04 7c 12 00 lea 0x127c04(%eax),%ebx 11342e: 39 98 00 7c 12 00 cmp %ebx,0x127c00(%eax) 113434: 75 ec jne 113422 <_POSIX_signals_Clear_process_signals+0x36><== ALWAYS TAKEN 113436: eb cd jmp 113405 <_POSIX_signals_Clear_process_signals+0x19> 00112464 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 112464: 55 push %ebp 112465: 89 e5 mov %esp,%ebp 112467: 57 push %edi 112468: 56 push %esi 112469: 53 push %ebx 11246a: 83 ec 1c sub $0x1c,%esp 11246d: 8b 5d 0c mov 0xc(%ebp),%ebx 112470: 0f b6 7d 14 movzbl 0x14(%ebp),%edi static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 112474: 8d 4b ff lea -0x1(%ebx),%ecx 112477: b8 01 00 00 00 mov $0x1,%eax 11247c: 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 ) 11247e: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 112482: 75 3c jne 1124c0 <_POSIX_signals_Clear_signals+0x5c> 112484: 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 ); 112489: 9c pushf 11248a: fa cli 11248b: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 11248e: 89 fa mov %edi,%edx 112490: 84 d2 test %dl,%dl 112492: 74 3c je 1124d0 <_POSIX_signals_Clear_signals+0x6c> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 112494: 23 05 e8 7b 12 00 and 0x127be8,%eax 11249a: 85 c8 test %ecx,%eax 11249c: 74 5e je 1124fc <_POSIX_signals_Clear_signals+0x98> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 11249e: 8d 14 5b lea (%ebx,%ebx,2),%edx 1124a1: c1 e2 02 shl $0x2,%edx 1124a4: 83 ba e0 79 12 00 02 cmpl $0x2,0x1279e0(%edx) 1124ab: 74 53 je 112500 <_POSIX_signals_Clear_signals+0x9c> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 1124ad: 83 ec 0c sub $0xc,%esp 1124b0: 53 push %ebx 1124b1: e8 36 0f 00 00 call 1133ec <_POSIX_signals_Clear_process_signals> 1124b6: b0 01 mov $0x1,%al 1124b8: 83 c4 10 add $0x10,%esp 1124bb: eb 30 jmp 1124ed <_POSIX_signals_Clear_signals+0x89> 1124bd: 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; 1124c0: 8b 55 08 mov 0x8(%ebp),%edx 1124c3: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx 1124c9: f7 d1 not %ecx 1124cb: eb bc jmp 112489 <_POSIX_signals_Clear_signals+0x25> 1124cd: 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) ) { 1124d0: 8b 55 08 mov 0x8(%ebp),%edx 1124d3: 8b 9a d0 00 00 00 mov 0xd0(%edx),%ebx 1124d9: 89 c6 mov %eax,%esi 1124db: 21 de and %ebx,%esi 1124dd: 85 ce test %ecx,%esi 1124df: 74 1b je 1124fc <_POSIX_signals_Clear_signals+0x98> api->signals_pending &= ~mask; 1124e1: f7 d0 not %eax 1124e3: 21 d8 and %ebx,%eax 1124e5: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) 1124eb: b0 01 mov $0x1,%al do_callout = true; } } _ISR_Enable( level ); 1124ed: ff 75 e4 pushl -0x1c(%ebp) 1124f0: 9d popf return do_callout; } 1124f1: 8d 65 f4 lea -0xc(%ebp),%esp 1124f4: 5b pop %ebx 1124f5: 5e pop %esi 1124f6: 5f pop %edi 1124f7: c9 leave 1124f8: c3 ret 1124f9: 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; 1124fc: 31 c0 xor %eax,%eax 1124fe: eb ed jmp 1124ed <_POSIX_signals_Clear_signals+0x89> _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 *) 112500: 8d 8a 00 7c 12 00 lea 0x127c00(%edx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 112506: 8b 82 00 7c 12 00 mov 0x127c00(%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11250c: 8d 71 04 lea 0x4(%ecx),%esi 11250f: 39 f0 cmp %esi,%eax 112511: 74 45 je 112558 <_POSIX_signals_Clear_signals+0xf4> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112513: 8b 30 mov (%eax),%esi the_chain->first = new_first; 112515: 89 b2 00 7c 12 00 mov %esi,0x127c00(%edx) new_first->previous = _Chain_Head(the_chain); 11251b: 89 4e 04 mov %ecx,0x4(%esi) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 11251e: 83 ec 0c sub $0xc,%esp 112521: 53 push %ebx 112522: 89 45 e0 mov %eax,-0x20(%ebp) 112525: e8 c2 0e 00 00 call 1133ec <_POSIX_signals_Clear_process_signals> * It may be impossible to get here with an empty chain * BUT until that is proven we need to be defensive and * protect against it. */ if ( psiginfo ) { *info = psiginfo->Info; 11252a: 8b 45 e0 mov -0x20(%ebp),%eax 11252d: 8d 70 08 lea 0x8(%eax),%esi 112530: b9 03 00 00 00 mov $0x3,%ecx 112535: 8b 7d 10 mov 0x10(%ebp),%edi 112538: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11253a: c7 00 64 7b 12 00 movl $0x127b64,(%eax) old_last_node = the_chain->last; 112540: 8b 15 68 7b 12 00 mov 0x127b68,%edx the_chain->last = the_node; 112546: a3 68 7b 12 00 mov %eax,0x127b68 old_last_node->next = the_node; 11254b: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11254d: 89 50 04 mov %edx,0x4(%eax) 112550: 83 c4 10 add $0x10,%esp 112553: e9 55 ff ff ff jmp 1124ad <_POSIX_signals_Clear_signals+0x49> 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 ); 112558: 83 ec 0c sub $0xc,%esp 11255b: 53 push %ebx 11255c: e8 8b 0e 00 00 call 1133ec <_POSIX_signals_Clear_process_signals> 112561: 83 c4 10 add $0x10,%esp 112564: e9 44 ff ff ff jmp 1124ad <_POSIX_signals_Clear_signals+0x49> 0010c020 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10c020: 55 push %ebp 10c021: 89 e5 mov %esp,%ebp 10c023: 56 push %esi 10c024: 53 push %ebx 10c025: 8b 55 08 mov 0x8(%ebp),%edx 10c028: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10c02d: bb 01 00 00 00 mov $0x1,%ebx 10c032: 8d 48 ff lea -0x1(%eax),%ecx 10c035: 89 de mov %ebx,%esi 10c037: d3 e6 shl %cl,%esi 10c039: 85 d6 test %edx,%esi 10c03b: 75 20 jne 10c05d <_POSIX_signals_Get_highest+0x3d><== ALWAYS TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10c03d: 40 inc %eax 10c03e: 83 f8 20 cmp $0x20,%eax 10c041: 75 ef jne 10c032 <_POSIX_signals_Get_highest+0x12> 10c043: 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 ) ) { 10c045: bb 01 00 00 00 mov $0x1,%ebx 10c04a: eb 06 jmp 10c052 <_POSIX_signals_Get_highest+0x32> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10c04c: 40 inc %eax 10c04d: 83 f8 1b cmp $0x1b,%eax 10c050: 74 0b je 10c05d <_POSIX_signals_Get_highest+0x3d><== ALWAYS TAKEN if ( set & signo_to_mask( signo ) ) { 10c052: 8d 48 ff lea -0x1(%eax),%ecx 10c055: 89 de mov %ebx,%esi 10c057: d3 e6 shl %cl,%esi 10c059: 85 d6 test %edx,%esi 10c05b: 74 ef je 10c04c <_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; } 10c05d: 5b pop %ebx 10c05e: 5e pop %esi 10c05f: c9 leave 10c060: c3 ret 0011345c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 11345c: 55 push %ebp 11345d: 89 e5 mov %esp,%ebp 11345f: 57 push %edi 113460: 56 push %esi 113461: 53 push %ebx 113462: 83 ec 0c sub $0xc,%esp 113465: 8b 5d 08 mov 0x8(%ebp),%ebx 113468: 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 ]; 11346b: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 113471: 8d 4a ff lea -0x1(%edx),%ecx 113474: b8 01 00 00 00 mov $0x1,%eax 113479: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 11347b: 8b 4b 10 mov 0x10(%ebx),%ecx 11347e: 89 cf mov %ecx,%edi 113480: 81 e7 00 80 00 10 and $0x10008000,%edi 113486: 81 ff 00 80 00 10 cmp $0x10008000,%edi 11348c: 74 6e je 1134fc <_POSIX_signals_Unblock_thread+0xa0> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 11348e: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx 113494: f7 d2 not %edx 113496: 85 d0 test %edx,%eax 113498: 74 56 je 1134f0 <_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; 11349a: c6 43 74 01 movb $0x1,0x74(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 11349e: f7 c1 00 00 00 10 test $0x10000000,%ecx 1134a4: 74 32 je 1134d8 <_POSIX_signals_Unblock_thread+0x7c> the_thread->Wait.return_code = EINTR; 1134a6: 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) ){ 1134ad: 83 e1 08 and $0x8,%ecx 1134b0: 74 3e je 1134f0 <_POSIX_signals_Unblock_thread+0x94><== ALWAYS TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 1134b2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1134b6: 0f 84 a8 00 00 00 je 113564 <_POSIX_signals_Unblock_thread+0x108><== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1134bc: 83 ec 08 sub $0x8,%esp 1134bf: 68 f8 ff 03 10 push $0x1003fff8 1134c4: 53 push %ebx 1134c5: e8 e2 9c ff ff call 10d1ac <_Thread_Clear_state> 1134ca: 31 c0 xor %eax,%eax 1134cc: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 1134cf: 8d 65 f4 lea -0xc(%ebp),%esp 1134d2: 5b pop %ebx 1134d3: 5e pop %esi 1134d4: 5f pop %edi 1134d5: c9 leave 1134d6: c3 ret 1134d7: 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 ) { 1134d8: 85 c9 test %ecx,%ecx 1134da: 75 14 jne 1134f0 <_POSIX_signals_Unblock_thread+0x94><== ALWAYS TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1134dc: a1 94 74 12 00 mov 0x127494,%eax 1134e1: 85 c0 test %eax,%eax 1134e3: 74 0b je 1134f0 <_POSIX_signals_Unblock_thread+0x94> 1134e5: 3b 1d b8 74 12 00 cmp 0x1274b8,%ebx 1134eb: 74 6b je 113558 <_POSIX_signals_Unblock_thread+0xfc><== NEVER TAKEN 1134ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Signals_to_thread_executing = true; 1134f0: 31 c0 xor %eax,%eax } } return false; } 1134f2: 8d 65 f4 lea -0xc(%ebp),%esp 1134f5: 5b pop %ebx 1134f6: 5e pop %esi 1134f7: 5f pop %edi 1134f8: c9 leave 1134f9: c3 ret 1134fa: 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) ) { 1134fc: 85 43 30 test %eax,0x30(%ebx) 1134ff: 74 33 je 113534 <_POSIX_signals_Unblock_thread+0xd8> the_thread->Wait.return_code = EINTR; 113501: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 113508: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 11350b: 8b 4d 10 mov 0x10(%ebp),%ecx 11350e: 85 c9 test %ecx,%ecx 113510: 74 32 je 113544 <_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; 113512: b9 03 00 00 00 mov $0x3,%ecx 113517: 89 c7 mov %eax,%edi 113519: 8b 75 10 mov 0x10(%ebp),%esi 11351c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 11351e: 83 ec 0c sub $0xc,%esp 113521: 53 push %ebx 113522: e8 6d a7 ff ff call 10dc94 <_Thread_queue_Extract_with_proxy> 113527: b0 01 mov $0x1,%al return true; 113529: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 11352c: 8d 65 f4 lea -0xc(%ebp),%esp 11352f: 5b pop %ebx 113530: 5e pop %esi 113531: 5f pop %edi 113532: c9 leave 113533: 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) ) { 113534: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx 11353a: f7 d1 not %ecx 11353c: 85 c8 test %ecx,%eax 11353e: 75 c1 jne 113501 <_POSIX_signals_Unblock_thread+0xa5> 113540: eb ae jmp 1134f0 <_POSIX_signals_Unblock_thread+0x94> 113542: 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; 113544: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 113546: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 11354d: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 113554: eb c8 jmp 11351e <_POSIX_signals_Unblock_thread+0xc2> 113556: 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; 113558: c6 05 68 75 12 00 01 movb $0x1,0x127568 11355f: 31 c0 xor %eax,%eax 113561: eb 8f jmp 1134f2 <_POSIX_signals_Unblock_thread+0x96> 113563: 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 ); 113564: 83 ec 0c sub $0xc,%esp 113567: 8d 43 48 lea 0x48(%ebx),%eax 11356a: 50 push %eax 11356b: e8 90 b0 ff ff call 10e600 <_Watchdog_Remove> 113570: 83 c4 10 add $0x10,%esp 113573: e9 44 ff ff ff jmp 1134bc <_POSIX_signals_Unblock_thread+0x60> 0012eeb4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 12eeb4: 55 push %ebp 12eeb5: 89 e5 mov %esp,%ebp 12eeb7: 56 push %esi 12eeb8: 53 push %ebx 12eeb9: 8b 5d 08 mov 0x8(%ebp),%ebx 12eebc: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 12eebf: 85 db test %ebx,%ebx 12eec1: 74 35 je 12eef8 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 12eec3: 85 f6 test %esi,%esi 12eec5: 74 31 je 12eef8 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 12eec7: 83 ec 0c sub $0xc,%esp 12eeca: ff 35 b0 ef 16 00 pushl 0x16efb0 12eed0: e8 1b 1a fe ff call 1108f0 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 12eed5: 5a pop %edx 12eed6: 59 pop %ecx 12eed7: 56 push %esi 12eed8: 53 push %ebx 12eed9: e8 da ee 00 00 call 13ddb8 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 12eede: 58 pop %eax 12eedf: ff 35 b0 ef 16 00 pushl 0x16efb0 12eee5: e8 4e 1a fe ff call 110938 <_API_Mutex_Unlock> 12eeea: b0 01 mov $0x1,%al return true; 12eeec: 83 c4 10 add $0x10,%esp } 12eeef: 8d 65 f8 lea -0x8(%ebp),%esp 12eef2: 5b pop %ebx 12eef3: 5e pop %esi 12eef4: c9 leave 12eef5: c3 ret 12eef6: 66 90 xchg %ax,%ax <== NOT EXECUTED _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 12eef8: 31 c0 xor %eax,%eax } 12eefa: 8d 65 f8 lea -0x8(%ebp),%esp 12eefd: 5b pop %ebx 12eefe: 5e pop %esi 12eeff: c9 leave 12ef00: c3 ret 00110868 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110868: 55 push %ebp 110869: 89 e5 mov %esp,%ebp 11086b: 56 push %esi 11086c: 53 push %ebx 11086d: 83 ec 10 sub $0x10,%esp 110870: 8b 5d 08 mov 0x8(%ebp),%ebx 110873: 8b 75 0c mov 0xc(%ebp),%esi 110876: 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 ) { 110879: 8b 15 38 e0 12 00 mov 0x12e038,%edx 11087f: 85 d2 test %edx,%edx 110881: 74 19 je 11089c <_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 ); 110883: 0f b6 c0 movzbl %al,%eax 110886: 89 45 10 mov %eax,0x10(%ebp) 110889: 89 75 0c mov %esi,0xc(%ebp) 11088c: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 11088f: 8d 65 f8 lea -0x8(%ebp),%esp 110892: 5b pop %ebx 110893: 5e pop %esi 110894: 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 ); 110895: e9 f2 f1 ff ff jmp 10fa8c <_Heap_Walk> 11089a: 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(); 11089c: 83 ec 0c sub $0xc,%esp 11089f: ff 35 f0 e0 12 00 pushl 0x12e0f0 1108a5: 88 45 f4 mov %al,-0xc(%ebp) 1108a8: e8 eb e3 ff ff call 10ec98 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 1108ad: 83 c4 0c add $0xc,%esp 1108b0: 8a 45 f4 mov -0xc(%ebp),%al 1108b3: 0f b6 c0 movzbl %al,%eax 1108b6: 50 push %eax 1108b7: 56 push %esi 1108b8: 53 push %ebx 1108b9: e8 ce f1 ff ff call 10fa8c <_Heap_Walk> _RTEMS_Unlock_allocator(); 1108be: 5a pop %edx 1108bf: ff 35 f0 e0 12 00 pushl 0x12e0f0 1108c5: 88 45 f4 mov %al,-0xc(%ebp) 1108c8: e8 13 e4 ff ff call 10ece0 <_API_Mutex_Unlock> 1108cd: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 1108d0: 8a 45 f4 mov -0xc(%ebp),%al 1108d3: 8d 65 f8 lea -0x8(%ebp),%esp 1108d6: 5b pop %ebx 1108d7: 5e pop %esi 1108d8: c9 leave 1108d9: c3 ret 00110694 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 110694: 55 push %ebp 110695: 89 e5 mov %esp,%ebp 110697: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 11069a: a1 60 32 12 00 mov 0x123260,%eax 11069f: 85 c0 test %eax,%eax 1106a1: 74 05 je 1106a8 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 1106a3: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1106a4: ff e0 jmp *%eax 1106a6: 66 90 xchg %ax,%ax <== NOT EXECUTED } 1106a8: c9 leave 1106a9: c3 ret 0010b9cc <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10b9cc: 55 push %ebp 10b9cd: 89 e5 mov %esp,%ebp 10b9cf: 57 push %edi 10b9d0: 56 push %esi 10b9d1: 53 push %ebx 10b9d2: 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; 10b9d5: 8b 1d 0c 32 12 00 mov 0x12320c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10b9db: 8b 3d 08 32 12 00 mov 0x123208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10b9e1: 85 db test %ebx,%ebx 10b9e3: 74 46 je 10ba2b <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10b9e5: 85 ff test %edi,%edi 10b9e7: 74 42 je 10ba2b <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== ALWAYS TAKEN 10b9e9: 31 f6 xor %esi,%esi 10b9eb: 90 nop return_value = rtems_task_create( 10b9ec: 83 ec 08 sub $0x8,%esp 10b9ef: 8d 45 e4 lea -0x1c(%ebp),%eax 10b9f2: 50 push %eax 10b9f3: ff 73 0c pushl 0xc(%ebx) 10b9f6: ff 73 14 pushl 0x14(%ebx) 10b9f9: ff 73 04 pushl 0x4(%ebx) 10b9fc: ff 73 08 pushl 0x8(%ebx) 10b9ff: ff 33 pushl (%ebx) 10ba01: e8 96 fd ff ff call 10b79c user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10ba06: 83 c4 20 add $0x20,%esp 10ba09: 85 c0 test %eax,%eax 10ba0b: 75 26 jne 10ba33 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10ba0d: 51 push %ecx 10ba0e: ff 73 18 pushl 0x18(%ebx) 10ba11: ff 73 10 pushl 0x10(%ebx) 10ba14: ff 75 e4 pushl -0x1c(%ebp) 10ba17: e8 24 00 00 00 call 10ba40 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10ba1c: 83 c4 10 add $0x10,%esp 10ba1f: 85 c0 test %eax,%eax 10ba21: 75 10 jne 10ba33 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10ba23: 46 inc %esi 10ba24: 83 c3 1c add $0x1c,%ebx 10ba27: 39 f7 cmp %esi,%edi 10ba29: 77 c1 ja 10b9ec <_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 ); } } 10ba2b: 8d 65 f4 lea -0xc(%ebp),%esp 10ba2e: 5b pop %ebx 10ba2f: 5e pop %esi 10ba30: 5f pop %edi 10ba31: c9 leave 10ba32: 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 ); 10ba33: 52 push %edx 10ba34: 50 push %eax 10ba35: 6a 01 push $0x1 10ba37: 6a 01 push $0x1 10ba39: e8 5a 0d 00 00 call 10c798 <_Internal_error_Occurred> 001106f0 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 1106f0: 55 push %ebp 1106f1: 89 e5 mov %esp,%ebp 1106f3: 57 push %edi 1106f4: 56 push %esi 1106f5: 53 push %ebx 1106f6: 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 ]; 1106f9: 8b 45 08 mov 0x8(%ebp),%eax 1106fc: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 110702: 85 db test %ebx,%ebx 110704: 74 45 je 11074b <_RTEMS_tasks_Post_switch_extension+0x5b><== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 110706: 9c pushf 110707: fa cli 110708: 58 pop %eax signal_set = asr->signals_posted; 110709: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 11070c: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 110713: 50 push %eax 110714: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 110715: 85 f6 test %esi,%esi 110717: 74 32 je 11074b <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 110719: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 11071c: 50 push %eax 11071d: 8d 7d e4 lea -0x1c(%ebp),%edi 110720: 57 push %edi 110721: 68 ff ff 00 00 push $0xffff 110726: ff 73 10 pushl 0x10(%ebx) 110729: e8 d6 20 00 00 call 112804 (*asr->handler)( signal_set ); 11072e: 89 34 24 mov %esi,(%esp) 110731: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 110734: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110737: 83 c4 0c add $0xc,%esp 11073a: 57 push %edi 11073b: 68 ff ff 00 00 push $0xffff 110740: ff 75 e4 pushl -0x1c(%ebp) 110743: e8 bc 20 00 00 call 112804 110748: 83 c4 10 add $0x10,%esp } 11074b: 8d 65 f4 lea -0xc(%ebp),%esp 11074e: 5b pop %ebx 11074f: 5e pop %esi 110750: 5f pop %edi 110751: c9 leave 110752: c3 ret 0011064c <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 11064c: 55 push %ebp 11064d: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11064f: 8b 45 08 mov 0x8(%ebp),%eax 110652: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 110658: 85 c0 test %eax,%eax 11065a: 74 13 je 11066f <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 11065c: 8b 50 04 mov 0x4(%eax),%edx 11065f: 8b 0a mov (%edx),%ecx 110661: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 110664: 8b 48 08 mov 0x8(%eax),%ecx 110667: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110669: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 11066b: 85 c0 test %eax,%eax 11066d: 75 ed jne 11065c <_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; 11066f: 8b 45 0c mov 0xc(%ebp),%eax 110672: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 110678: 85 c0 test %eax,%eax 11067a: 74 13 je 11068f <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 11067c: 8b 50 04 mov 0x4(%eax),%edx 11067f: 8b 0a mov (%edx),%ecx 110681: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 110684: 8b 48 0c mov 0xc(%eax),%ecx 110687: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110689: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 11068b: 85 c0 test %eax,%eax 11068d: 75 ed jne 11067c <_RTEMS_tasks_Switch_extension+0x30><== ALWAYS TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 11068f: c9 leave 110690: c3 ret 0013d854 <_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 ) { 13d854: 55 push %ebp 13d855: 89 e5 mov %esp,%ebp 13d857: 57 push %edi 13d858: 56 push %esi 13d859: 53 push %ebx 13d85a: 83 ec 38 sub $0x38,%esp 13d85d: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 13d860: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 13d863: 8d 75 e0 lea -0x20(%ebp),%esi 13d866: 56 push %esi 13d867: e8 68 10 ff ff call 12e8d4 <_TOD_Get_uptime> _Timestamp_Subtract( 13d86c: 83 c4 0c add $0xc,%esp 13d86f: ff 75 0c pushl 0xc(%ebp) 13d872: 56 push %esi 13d873: 8d 43 4c lea 0x4c(%ebx),%eax 13d876: 50 push %eax 13d877: e8 a8 58 fd ff call 113124 <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 13d87c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 13d882: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 13d888: 89 45 d8 mov %eax,-0x28(%ebp) 13d88b: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 13d88e: 83 c4 10 add $0x10,%esp 13d891: 3b 3d b8 ef 16 00 cmp 0x16efb8,%edi 13d897: 74 0b je 13d8a4 <_Rate_monotonic_Get_status+0x50> 13d899: b0 01 mov $0x1,%al return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 13d89b: 8d 65 f4 lea -0xc(%ebp),%esp 13d89e: 5b pop %ebx 13d89f: 5e pop %esi 13d8a0: 5f pop %edi 13d8a1: c9 leave 13d8a2: c3 ret 13d8a3: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 13d8a4: 57 push %edi 13d8a5: 8d 7d d0 lea -0x30(%ebp),%edi 13d8a8: 57 push %edi 13d8a9: 56 push %esi 13d8aa: 68 c0 ef 16 00 push $0x16efc0 13d8af: e8 70 58 fd ff call 113124 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 13d8b4: 59 pop %ecx 13d8b5: 5e pop %esi 13d8b6: 57 push %edi 13d8b7: 8d 75 d8 lea -0x28(%ebp),%esi 13d8ba: 56 push %esi 13d8bb: e8 28 58 fd ff call 1130e8 <_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)) 13d8c0: 83 c3 44 add $0x44,%ebx 13d8c3: 58 pop %eax 13d8c4: 5a pop %edx 13d8c5: 53 push %ebx 13d8c6: 56 push %esi 13d8c7: e8 dc 06 00 00 call 13dfa8 <_Timespec_Less_than> 13d8cc: 83 c4 10 add $0x10,%esp 13d8cf: 84 c0 test %al,%al 13d8d1: 74 05 je 13d8d8 <_Rate_monotonic_Get_status+0x84> 13d8d3: 31 c0 xor %eax,%eax 13d8d5: eb c4 jmp 13d89b <_Rate_monotonic_Get_status+0x47> 13d8d7: 90 nop <== NOT EXECUTED return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 13d8d8: 57 push %edi 13d8d9: ff 75 10 pushl 0x10(%ebp) 13d8dc: 56 push %esi 13d8dd: 53 push %ebx 13d8de: e8 41 58 fd ff call 113124 <_Timespec_Subtract> 13d8e3: b0 01 mov $0x1,%al 13d8e5: 83 c4 10 add $0x10,%esp 13d8e8: eb b1 jmp 13d89b <_Rate_monotonic_Get_status+0x47> 0013d7e0 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 13d7e0: 55 push %ebp 13d7e1: 89 e5 mov %esp,%ebp 13d7e3: 57 push %edi 13d7e4: 56 push %esi 13d7e5: 53 push %ebx 13d7e6: 83 ec 28 sub $0x28,%esp 13d7e9: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 13d7ec: 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 ); 13d7ef: 8d 7d e0 lea -0x20(%ebp),%edi 13d7f2: 57 push %edi 13d7f3: e8 dc 10 ff ff call 12e8d4 <_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; 13d7f8: 8b 45 e0 mov -0x20(%ebp),%eax 13d7fb: 8b 55 e4 mov -0x1c(%ebp),%edx 13d7fe: 89 43 4c mov %eax,0x4c(%ebx) 13d801: 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; 13d804: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 13d80a: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 13d810: 89 43 44 mov %eax,0x44(%ebx) 13d813: 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) { 13d816: 83 c4 10 add $0x10,%esp 13d819: 3b 35 b8 ef 16 00 cmp 0x16efb8,%esi 13d81f: 74 0b je 13d82c <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 13d821: 8d 65 f4 lea -0xc(%ebp),%esp 13d824: 5b pop %ebx 13d825: 5e pop %esi 13d826: 5f pop %edi 13d827: c9 leave 13d828: c3 ret 13d829: 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( 13d82c: 51 push %ecx 13d82d: 8d 75 d8 lea -0x28(%ebp),%esi 13d830: 56 push %esi 13d831: 57 push %edi 13d832: 68 c0 ef 16 00 push $0x16efc0 13d837: e8 e8 58 fd ff call 113124 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 13d83c: 58 pop %eax 13d83d: 5a pop %edx 13d83e: 56 push %esi 13d83f: 83 c3 44 add $0x44,%ebx 13d842: 53 push %ebx 13d843: e8 a0 58 fd ff call 1130e8 <_Timespec_Add_to> 13d848: 83 c4 10 add $0x10,%esp } #endif } 13d84b: 8d 65 f4 lea -0xc(%ebp),%esp 13d84e: 5b pop %ebx 13d84f: 5e pop %esi 13d850: 5f pop %edi 13d851: c9 leave 13d852: c3 ret 0013db8c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 13db8c: 55 push %ebp 13db8d: 89 e5 mov %esp,%ebp 13db8f: 83 ec 2c sub $0x2c,%esp 13db92: 8d 45 f4 lea -0xc(%ebp),%eax 13db95: 50 push %eax 13db96: ff 75 08 pushl 0x8(%ebp) 13db99: 68 80 fb 16 00 push $0x16fb80 13db9e: e8 b9 3f fd ff call 111b5c <_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 ) { 13dba3: 83 c4 10 add $0x10,%esp 13dba6: 8b 55 f4 mov -0xc(%ebp),%edx 13dba9: 85 d2 test %edx,%edx 13dbab: 75 29 jne 13dbd6 <_Rate_monotonic_Timeout+0x4a><== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 13dbad: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13dbb0: f6 42 11 40 testb $0x40,0x11(%edx) 13dbb4: 74 08 je 13dbbe <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 13dbb6: 8b 4a 20 mov 0x20(%edx),%ecx 13dbb9: 3b 48 08 cmp 0x8(%eax),%ecx 13dbbc: 74 4e je 13dc0c <_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 ) { 13dbbe: 83 78 38 01 cmpl $0x1,0x38(%eax) 13dbc2: 74 14 je 13dbd8 <_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; 13dbc4: 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; 13dbcb: a1 f8 ee 16 00 mov 0x16eef8,%eax 13dbd0: 48 dec %eax 13dbd1: a3 f8 ee 16 00 mov %eax,0x16eef8 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13dbd6: c9 leave 13dbd7: 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; 13dbd8: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 13dbdf: 83 ec 0c sub $0xc,%esp 13dbe2: 50 push %eax 13dbe3: 89 45 e4 mov %eax,-0x1c(%ebp) 13dbe6: e8 f5 fb ff ff call 13d7e0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13dbeb: 8b 45 e4 mov -0x1c(%ebp),%eax 13dbee: 8b 50 3c mov 0x3c(%eax),%edx 13dbf1: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13dbf4: 5a pop %edx 13dbf5: 59 pop %ecx 13dbf6: 83 c0 10 add $0x10,%eax 13dbf9: 50 push %eax 13dbfa: 68 d8 ef 16 00 push $0x16efd8 13dbff: e8 f0 57 fd ff call 1133f4 <_Watchdog_Insert> 13dc04: 83 c4 10 add $0x10,%esp 13dc07: eb c2 jmp 13dbcb <_Rate_monotonic_Timeout+0x3f> 13dc09: 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 ); 13dc0c: 83 ec 08 sub $0x8,%esp 13dc0f: 68 f8 ff 03 10 push $0x1003fff8 13dc14: 52 push %edx 13dc15: 89 45 e4 mov %eax,-0x1c(%ebp) 13dc18: e8 bb 44 fd ff call 1120d8 <_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 ); 13dc1d: 8b 45 e4 mov -0x1c(%ebp),%eax 13dc20: 89 04 24 mov %eax,(%esp) 13dc23: eb c1 jmp 13dbe6 <_Rate_monotonic_Timeout+0x5a> 0013d8ec <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 13d8ec: 55 push %ebp 13d8ed: 89 e5 mov %esp,%ebp 13d8ef: 57 push %edi 13d8f0: 56 push %esi 13d8f1: 53 push %ebx 13d8f2: 83 ec 1c sub $0x1c,%esp 13d8f5: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 13d8f8: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 13d8fb: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 13d8ff: 0f 84 bf 00 00 00 je 13d9c4 <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 13d905: 52 push %edx 13d906: 8d 7d e0 lea -0x20(%ebp),%edi 13d909: 57 push %edi 13d90a: 8d 75 d8 lea -0x28(%ebp),%esi 13d90d: 56 push %esi 13d90e: 53 push %ebx 13d90f: e8 40 ff ff ff call 13d854 <_Rate_monotonic_Get_status> if (!valid_status) 13d914: 83 c4 10 add $0x10,%esp 13d917: 84 c0 test %al,%al 13d919: 75 09 jne 13d924 <_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 } 13d91b: 8d 65 f4 lea -0xc(%ebp),%esp 13d91e: 5b pop %ebx 13d91f: 5e pop %esi 13d920: 5f pop %edi 13d921: c9 leave 13d922: c3 ret 13d923: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 13d924: 83 ec 08 sub $0x8,%esp 13d927: 57 push %edi 13d928: 8d 43 6c lea 0x6c(%ebx),%eax 13d92b: 50 push %eax 13d92c: e8 b7 57 fd ff call 1130e8 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 13d931: 59 pop %ecx 13d932: 58 pop %eax 13d933: 8d 43 5c lea 0x5c(%ebx),%eax 13d936: 50 push %eax 13d937: 57 push %edi 13d938: e8 6b 06 00 00 call 13dfa8 <_Timespec_Less_than> 13d93d: 83 c4 10 add $0x10,%esp 13d940: 84 c0 test %al,%al 13d942: 74 0c je 13d950 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 13d944: 8b 45 e0 mov -0x20(%ebp),%eax 13d947: 8b 55 e4 mov -0x1c(%ebp),%edx 13d94a: 89 43 5c mov %eax,0x5c(%ebx) 13d94d: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 13d950: 83 ec 08 sub $0x8,%esp 13d953: 8d 43 64 lea 0x64(%ebx),%eax 13d956: 50 push %eax 13d957: 57 push %edi 13d958: e8 27 06 00 00 call 13df84 <_Timespec_Greater_than> 13d95d: 83 c4 10 add $0x10,%esp 13d960: 84 c0 test %al,%al 13d962: 74 0c je 13d970 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 13d964: 8b 45 e0 mov -0x20(%ebp),%eax 13d967: 8b 55 e4 mov -0x1c(%ebp),%edx 13d96a: 89 43 64 mov %eax,0x64(%ebx) 13d96d: 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 ); 13d970: 83 ec 08 sub $0x8,%esp 13d973: 56 push %esi 13d974: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 13d97a: 50 push %eax 13d97b: e8 68 57 fd ff call 1130e8 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 13d980: 58 pop %eax 13d981: 5a pop %edx 13d982: 8d 43 74 lea 0x74(%ebx),%eax 13d985: 50 push %eax 13d986: 56 push %esi 13d987: e8 1c 06 00 00 call 13dfa8 <_Timespec_Less_than> 13d98c: 83 c4 10 add $0x10,%esp 13d98f: 84 c0 test %al,%al 13d991: 75 39 jne 13d9cc <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 13d993: 83 ec 08 sub $0x8,%esp 13d996: 8d 43 7c lea 0x7c(%ebx),%eax 13d999: 50 push %eax 13d99a: 56 push %esi 13d99b: e8 e4 05 00 00 call 13df84 <_Timespec_Greater_than> 13d9a0: 83 c4 10 add $0x10,%esp 13d9a3: 84 c0 test %al,%al 13d9a5: 0f 84 70 ff ff ff je 13d91b <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 13d9ab: 8b 45 d8 mov -0x28(%ebp),%eax 13d9ae: 8b 55 dc mov -0x24(%ebp),%edx 13d9b1: 89 43 7c mov %eax,0x7c(%ebx) 13d9b4: 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 } 13d9ba: 8d 65 f4 lea -0xc(%ebp),%esp 13d9bd: 5b pop %ebx 13d9be: 5e pop %esi 13d9bf: 5f pop %edi 13d9c0: c9 leave 13d9c1: c3 ret 13d9c2: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 13d9c4: ff 43 58 incl 0x58(%ebx) 13d9c7: e9 39 ff ff ff jmp 13d905 <_Rate_monotonic_Update_statistics+0x19> */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 13d9cc: 8b 45 d8 mov -0x28(%ebp),%eax 13d9cf: 8b 55 dc mov -0x24(%ebp),%edx 13d9d2: 89 43 74 mov %eax,0x74(%ebx) 13d9d5: 89 53 78 mov %edx,0x78(%ebx) 13d9d8: eb b9 jmp 13d993 <_Rate_monotonic_Update_statistics+0xa7> 0010d9cc <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10d9cc: 55 push %ebp 10d9cd: 89 e5 mov %esp,%ebp 10d9cf: 53 push %ebx 10d9d0: 83 ec 04 sub $0x4,%esp 10d9d3: 8b 5d 08 mov 0x8(%ebp),%ebx 10d9d6: a1 38 22 13 00 mov 0x132238,%eax 10d9db: 40 inc %eax 10d9dc: a3 38 22 13 00 mov %eax,0x132238 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10d9e1: a1 cc 22 13 00 mov 0x1322cc,%eax if ( time->tv_sec < seconds ) 10d9e6: 8b 13 mov (%ebx),%edx 10d9e8: 39 d0 cmp %edx,%eax 10d9ea: 7f 34 jg 10da20 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10d9ec: 51 push %ecx 10d9ed: 29 c2 sub %eax,%edx 10d9ef: 52 push %edx 10d9f0: 6a 00 push $0x0 10d9f2: 68 0c 23 13 00 push $0x13230c 10d9f7: e8 04 25 00 00 call 10ff00 <_Watchdog_Adjust> 10d9fc: 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 ); 10d9ff: 8b 03 mov (%ebx),%eax 10da01: a3 cc 22 13 00 mov %eax,0x1322cc 10da06: 8b 43 04 mov 0x4(%ebx),%eax 10da09: a3 d0 22 13 00 mov %eax,0x1322d0 _TOD_Is_set = true; 10da0e: c6 05 4c 22 13 00 01 movb $0x1,0x13224c _TOD_Activate(); _Thread_Enable_dispatch(); } 10da15: 8b 5d fc mov -0x4(%ebp),%ebx 10da18: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10da19: e9 c2 12 00 00 jmp 10ece0 <_Thread_Enable_dispatch> 10da1e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10da20: 51 push %ecx 10da21: 29 d0 sub %edx,%eax 10da23: 50 push %eax 10da24: 6a 01 push $0x1 10da26: 68 0c 23 13 00 push $0x13230c 10da2b: e8 d0 24 00 00 call 10ff00 <_Watchdog_Adjust> 10da30: 83 c4 10 add $0x10,%esp 10da33: eb ca jmp 10d9ff <_TOD_Set+0x33> 0010c11c <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c11c: 55 push %ebp 10c11d: 89 e5 mov %esp,%ebp 10c11f: 56 push %esi 10c120: 53 push %ebx 10c121: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c124: 8b 72 08 mov 0x8(%edx),%esi 10c127: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c128: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c12a: 89 c3 mov %eax,%ebx 10c12c: 83 e3 03 and $0x3,%ebx 10c12f: 74 67 je 10c198 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c131: 8b 4a 04 mov 0x4(%edx),%ecx 10c134: 0f b7 8c 09 e0 36 12 movzwl 0x1236e0(%ecx,%ecx,1),%ecx 10c13b: 00 10c13c: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c13f: 0f b7 8c 1b 14 37 12 movzwl 0x123714(%ebx,%ebx,1),%ecx 10c146: 00 10c147: 2d c4 07 00 00 sub $0x7c4,%eax 10c14c: c1 e8 02 shr $0x2,%eax 10c14f: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c152: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c155: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c158: 8d 04 98 lea (%eax,%ebx,4),%eax 10c15b: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c15d: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c15f: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c162: 8d 04 81 lea (%ecx,%eax,4),%eax 10c165: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c168: c1 e0 02 shl $0x2,%eax 10c16b: 29 c8 sub %ecx,%eax 10c16d: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c170: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c173: 8b 4a 0c mov 0xc(%edx),%ecx 10c176: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c179: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c17c: c1 e1 02 shl $0x2,%ecx 10c17f: 03 4a 10 add 0x10(%edx),%ecx 10c182: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c185: 8d 14 92 lea (%edx,%edx,4),%edx 10c188: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c18f: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c192: 5b pop %ebx 10c193: 5e pop %esi 10c194: c9 leave 10c195: c3 ret 10c196: 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 ]; 10c198: 8b 4a 04 mov 0x4(%edx),%ecx 10c19b: 0f b7 8c 09 fa 36 12 movzwl 0x1236fa(%ecx,%ecx,1),%ecx 10c1a2: 00 10c1a3: 8d 34 31 lea (%ecx,%esi,1),%esi 10c1a6: eb 97 jmp 10c13f <_TOD_To_seconds+0x23> 0010c1a8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c1a8: 55 push %ebp 10c1a9: 89 e5 mov %esp,%ebp 10c1ab: 53 push %ebx 10c1ac: 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(); 10c1af: 8b 1d 2c 62 12 00 mov 0x12622c,%ebx if ((!the_tod) || 10c1b5: 85 c9 test %ecx,%ecx 10c1b7: 74 53 je 10c20c <_TOD_Validate+0x64> <== ALWAYS TAKEN 10c1b9: b8 40 42 0f 00 mov $0xf4240,%eax 10c1be: 31 d2 xor %edx,%edx 10c1c0: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c1c2: 3b 41 18 cmp 0x18(%ecx),%eax 10c1c5: 76 45 jbe 10c20c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c1c7: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c1cb: 77 3f ja 10c20c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c1cd: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c1d1: 77 39 ja 10c20c <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c1d3: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c1d7: 77 33 ja 10c20c <_TOD_Validate+0x64> (the_tod->month == 0) || 10c1d9: 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) || 10c1dc: 85 c0 test %eax,%eax 10c1de: 74 2c je 10c20c <_TOD_Validate+0x64> <== ALWAYS TAKEN 10c1e0: 83 f8 0c cmp $0xc,%eax 10c1e3: 77 27 ja 10c20c <_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) || 10c1e5: 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) || 10c1e7: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c1ed: 76 1d jbe 10c20c <_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) ) 10c1ef: 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) || 10c1f2: 85 c9 test %ecx,%ecx 10c1f4: 74 16 je 10c20c <_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 ) 10c1f6: 83 e2 03 and $0x3,%edx 10c1f9: 75 16 jne 10c211 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c1fb: 8b 04 85 54 37 12 00 mov 0x123754(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c202: 39 c8 cmp %ecx,%eax 10c204: 0f 93 c0 setae %al 10c207: eb 05 jmp 10c20e <_TOD_Validate+0x66> 10c209: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c20c: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c20e: 5b pop %ebx 10c20f: c9 leave 10c210: 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 ]; 10c211: 8b 04 85 20 37 12 00 mov 0x123720(,%eax,4),%eax 10c218: eb e8 jmp 10c202 <_TOD_Validate+0x5a> 0010d06c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d06c: 55 push %ebp 10d06d: 89 e5 mov %esp,%ebp 10d06f: 57 push %edi 10d070: 56 push %esi 10d071: 53 push %ebx 10d072: 83 ec 28 sub $0x28,%esp 10d075: 8b 5d 08 mov 0x8(%ebp),%ebx 10d078: 8b 75 0c mov 0xc(%ebp),%esi 10d07b: 8a 45 10 mov 0x10(%ebp),%al 10d07e: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d081: 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 ); 10d084: 53 push %ebx 10d085: e8 92 0e 00 00 call 10df1c <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 10d08a: 83 c4 10 add $0x10,%esp 10d08d: 39 73 14 cmp %esi,0x14(%ebx) 10d090: 74 0d je 10d09f <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d092: 83 ec 08 sub $0x8,%esp 10d095: 56 push %esi 10d096: 53 push %ebx 10d097: e8 38 0d 00 00 call 10ddd4 <_Thread_Set_priority> 10d09c: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d09f: 9c pushf 10d0a0: fa cli 10d0a1: 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; 10d0a2: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d0a5: 83 f8 04 cmp $0x4,%eax 10d0a8: 74 26 je 10d0d0 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d0aa: 83 e7 04 and $0x4,%edi 10d0ad: 74 15 je 10d0c4 <_Thread_Change_priority+0x58><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d0af: 52 push %edx 10d0b0: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d0b1: a9 e0 be 03 00 test $0x3bee0,%eax 10d0b6: 0f 85 bc 00 00 00 jne 10d178 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d0bc: 8d 65 f4 lea -0xc(%ebp),%esp 10d0bf: 5b pop %ebx 10d0c0: 5e pop %esi 10d0c1: 5f pop %edi 10d0c2: c9 leave 10d0c3: 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 ); 10d0c4: 89 c1 mov %eax,%ecx 10d0c6: 83 e1 fb and $0xfffffffb,%ecx 10d0c9: 89 4b 10 mov %ecx,0x10(%ebx) 10d0cc: eb e1 jmp 10d0af <_Thread_Change_priority+0x43> 10d0ce: 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 ) ) { 10d0d0: 83 e7 04 and $0x4,%edi 10d0d3: 75 45 jne 10d11a <_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 ); 10d0d5: 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; 10d0dc: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d0e2: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d0e9: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d0ec: 66 a1 ac 74 12 00 mov 0x1274ac,%ax 10d0f2: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d0f8: 66 a3 ac 74 12 00 mov %ax,0x1274ac _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d0fe: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d102: 0f 84 88 00 00 00 je 10d190 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d108: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d10e: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d111: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d113: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d115: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d117: 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 ); 10d11a: 52 push %edx 10d11b: 9d popf 10d11c: 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 ); 10d11d: 66 8b 1d ac 74 12 00 mov 0x1274ac,%bx 10d124: 31 c0 xor %eax,%eax 10d126: 89 c1 mov %eax,%ecx 10d128: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d12c: 0f b7 c9 movzwl %cx,%ecx 10d12f: 66 8b 9c 09 40 75 12 mov 0x127540(%ecx,%ecx,1),%bx 10d136: 00 10d137: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d13b: c1 e1 04 shl $0x4,%ecx 10d13e: 0f b7 c0 movzwl %ax,%eax 10d141: 8d 04 01 lea (%ecx,%eax,1),%eax 10d144: 8d 0c 40 lea (%eax,%eax,2),%ecx 10d147: a1 c0 73 12 00 mov 0x1273c0,%eax 10d14c: 8b 04 88 mov (%eax,%ecx,4),%eax 10d14f: a3 88 74 12 00 mov %eax,0x127488 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d154: 8b 0d b8 74 12 00 mov 0x1274b8,%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() && 10d15a: 39 c8 cmp %ecx,%eax 10d15c: 74 0d je 10d16b <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d15e: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d162: 74 07 je 10d16b <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d164: c6 05 c8 74 12 00 01 movb $0x1,0x1274c8 _ISR_Enable( level ); 10d16b: 52 push %edx 10d16c: 9d popf } 10d16d: 8d 65 f4 lea -0xc(%ebp),%esp 10d170: 5b pop %ebx 10d171: 5e pop %esi 10d172: 5f pop %edi 10d173: c9 leave 10d174: c3 ret 10d175: 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 ); 10d178: 89 5d 0c mov %ebx,0xc(%ebp) 10d17b: 8b 43 44 mov 0x44(%ebx),%eax 10d17e: 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 ); } 10d181: 8d 65 f4 lea -0xc(%ebp),%esp 10d184: 5b pop %ebx 10d185: 5e pop %esi 10d186: 5f pop %edi 10d187: 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 ); 10d188: e9 af 0b 00 00 jmp 10dd3c <_Thread_queue_Requeue> 10d18d: 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 ); 10d190: 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); 10d196: 8d 48 04 lea 0x4(%eax),%ecx 10d199: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d19b: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d19e: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d1a1: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d1a3: 89 4b 04 mov %ecx,0x4(%ebx) 10d1a6: e9 6f ff ff ff jmp 10d11a <_Thread_Change_priority+0xae> 0010d1ac <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d1ac: 55 push %ebp 10d1ad: 89 e5 mov %esp,%ebp 10d1af: 53 push %ebx 10d1b0: 8b 45 08 mov 0x8(%ebp),%eax 10d1b3: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d1b6: 9c pushf 10d1b7: fa cli 10d1b8: 5b pop %ebx current_state = the_thread->current_state; 10d1b9: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d1bc: 85 ca test %ecx,%edx 10d1be: 74 70 je 10d230 <_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); 10d1c0: f7 d2 not %edx 10d1c2: 21 ca and %ecx,%edx current_state = 10d1c4: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d1c7: 85 d2 test %edx,%edx 10d1c9: 75 65 jne 10d230 <_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; 10d1cb: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d1d1: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d1d8: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d1db: 66 8b 15 ac 74 12 00 mov 0x1274ac,%dx 10d1e2: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d1e8: 66 89 15 ac 74 12 00 mov %dx,0x1274ac _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d1ef: 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); 10d1f5: 8d 4a 04 lea 0x4(%edx),%ecx 10d1f8: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d1fa: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d1fd: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d200: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d202: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d205: 53 push %ebx 10d206: 9d popf 10d207: 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 ) { 10d208: 8b 50 14 mov 0x14(%eax),%edx 10d20b: 8b 0d 88 74 12 00 mov 0x127488,%ecx 10d211: 3b 51 14 cmp 0x14(%ecx),%edx 10d214: 73 1a jae 10d230 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d216: a3 88 74 12 00 mov %eax,0x127488 if ( _Thread_Executing->is_preemptible || 10d21b: a1 b8 74 12 00 mov 0x1274b8,%eax 10d220: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d224: 74 12 je 10d238 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d226: c6 05 c8 74 12 00 01 movb $0x1,0x1274c8 10d22d: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d230: 53 push %ebx 10d231: 9d popf } 10d232: 5b pop %ebx 10d233: c9 leave 10d234: c3 ret 10d235: 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 || 10d238: 85 d2 test %edx,%edx 10d23a: 74 ea je 10d226 <_Thread_Clear_state+0x7a><== ALWAYS TAKEN 10d23c: eb f2 jmp 10d230 <_Thread_Clear_state+0x84> 0010d240 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d240: 55 push %ebp 10d241: 89 e5 mov %esp,%ebp 10d243: 56 push %esi 10d244: 53 push %ebx 10d245: 8b 75 08 mov 0x8(%ebp),%esi 10d248: 8b 5d 0c mov 0xc(%ebp),%ebx 10d24b: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d24f: 8b 46 1c mov 0x1c(%esi),%eax 10d252: 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; 10d259: a1 f8 73 12 00 mov 0x1273f8,%eax 10d25e: 48 dec %eax 10d25f: a3 f8 73 12 00 mov %eax,0x1273f8 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d264: 83 ec 0c sub $0xc,%esp 10d267: 53 push %ebx 10d268: e8 9b 11 00 00 call 10e408 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d26d: a1 f8 73 12 00 mov 0x1273f8,%eax 10d272: 40 inc %eax 10d273: a3 f8 73 12 00 mov %eax,0x1273f8 /* * 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 ); 10d278: 59 pop %ecx 10d279: 58 pop %eax 10d27a: 53 push %ebx 10d27b: 56 push %esi 10d27c: e8 2b f6 ff ff call 10c8ac <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10d281: 58 pop %eax 10d282: 5a pop %edx 10d283: 6a 01 push $0x1 10d285: 53 push %ebx 10d286: e8 b5 0b 00 00 call 10de40 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d28b: 89 1c 24 mov %ebx,(%esp) 10d28e: e8 01 0a 00 00 call 10dc94 <_Thread_queue_Extract_with_proxy> 10d293: 83 c4 10 add $0x10,%esp 10d296: 84 c0 test %al,%al 10d298: 75 06 jne 10d2a0 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d29a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d29e: 74 68 je 10d308 <_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 ) ) 10d2a0: 3b 1d 80 74 12 00 cmp 0x127480,%ebx 10d2a6: 74 74 je 10d31c <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d2a8: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d2af: 00 00 00 if ( the_thread->Start.fp_context ) 10d2b2: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10d2b8: 85 c0 test %eax,%eax 10d2ba: 74 0c je 10d2c8 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d2bc: 83 ec 0c sub $0xc,%esp 10d2bf: 50 push %eax 10d2c0: e8 5b 14 00 00 call 10e720 <_Workspace_Free> 10d2c5: 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 ); 10d2c8: 83 ec 0c sub $0xc,%esp 10d2cb: 53 push %ebx 10d2cc: e8 23 0d 00 00 call 10dff4 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d2d1: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10d2d8: 00 00 00 if ( the_thread->extensions ) 10d2db: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax 10d2e1: 83 c4 10 add $0x10,%esp 10d2e4: 85 c0 test %eax,%eax 10d2e6: 74 0c je 10d2f4 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d2e8: 83 ec 0c sub $0xc,%esp 10d2eb: 50 push %eax 10d2ec: e8 2f 14 00 00 call 10e720 <_Workspace_Free> 10d2f1: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d2f4: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10d2fb: 00 00 00 } 10d2fe: 8d 65 f8 lea -0x8(%ebp),%esp 10d301: 5b pop %ebx 10d302: 5e pop %esi 10d303: c9 leave 10d304: c3 ret 10d305: 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 ); 10d308: 83 ec 0c sub $0xc,%esp 10d30b: 8d 43 48 lea 0x48(%ebx),%eax 10d30e: 50 push %eax 10d30f: e8 ec 12 00 00 call 10e600 <_Watchdog_Remove> 10d314: 83 c4 10 add $0x10,%esp 10d317: eb 87 jmp 10d2a0 <_Thread_Close+0x60> 10d319: 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; 10d31c: c7 05 80 74 12 00 00 movl $0x0,0x127480 10d323: 00 00 00 10d326: eb 80 jmp 10d2a8 <_Thread_Close+0x68> 0010d3bc <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d3bc: 55 push %ebp 10d3bd: 89 e5 mov %esp,%ebp 10d3bf: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d3c2: 8d 45 f4 lea -0xc(%ebp),%eax 10d3c5: 50 push %eax 10d3c6: ff 75 08 pushl 0x8(%ebp) 10d3c9: e8 aa 01 00 00 call 10d578 <_Thread_Get> switch ( location ) { 10d3ce: 83 c4 10 add $0x10,%esp 10d3d1: 8b 55 f4 mov -0xc(%ebp),%edx 10d3d4: 85 d2 test %edx,%edx 10d3d6: 75 1c jne 10d3f4 <_Thread_Delay_ended+0x38><== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d3d8: 83 ec 08 sub $0x8,%esp 10d3db: 68 18 00 00 10 push $0x10000018 10d3e0: 50 push %eax 10d3e1: e8 c6 fd ff ff call 10d1ac <_Thread_Clear_state> 10d3e6: a1 f8 73 12 00 mov 0x1273f8,%eax 10d3eb: 48 dec %eax 10d3ec: a3 f8 73 12 00 mov %eax,0x1273f8 10d3f1: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d3f4: c9 leave 10d3f5: c3 ret 0010d3f8 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d3f8: 55 push %ebp 10d3f9: 89 e5 mov %esp,%ebp 10d3fb: 57 push %edi 10d3fc: 56 push %esi 10d3fd: 53 push %ebx 10d3fe: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d401: 8b 1d b8 74 12 00 mov 0x1274b8,%ebx _ISR_Disable( level ); 10d407: 9c pushf 10d408: fa cli 10d409: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10d40a: 8a 15 c8 74 12 00 mov 0x1274c8,%dl 10d410: 84 d2 test %dl,%dl 10d412: 0f 84 10 01 00 00 je 10d528 <_Thread_Dispatch+0x130> 10d418: 8d 7d d8 lea -0x28(%ebp),%edi 10d41b: e9 d1 00 00 00 jmp 10d4f1 <_Thread_Dispatch+0xf9> 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 ); 10d420: 50 push %eax 10d421: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d422: 83 ec 0c sub $0xc,%esp 10d425: 8d 45 e0 lea -0x20(%ebp),%eax 10d428: 50 push %eax 10d429: e8 8a 37 00 00 call 110bb8 <_TOD_Get_uptime> _Timestamp_Subtract( 10d42e: 83 c4 0c add $0xc,%esp 10d431: 57 push %edi 10d432: 8d 45 e0 lea -0x20(%ebp),%eax 10d435: 50 push %eax 10d436: 68 c0 74 12 00 push $0x1274c0 10d43b: e8 b8 0d 00 00 call 10e1f8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d440: 5a pop %edx 10d441: 59 pop %ecx 10d442: 57 push %edi 10d443: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d449: 50 push %eax 10d44a: e8 6d 0d 00 00 call 10e1bc <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d44f: 8b 45 e0 mov -0x20(%ebp),%eax 10d452: 8b 55 e4 mov -0x1c(%ebp),%edx 10d455: a3 c0 74 12 00 mov %eax,0x1274c0 10d45a: 89 15 c4 74 12 00 mov %edx,0x1274c4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d460: a1 84 74 12 00 mov 0x127484,%eax 10d465: 83 c4 10 add $0x10,%esp 10d468: 85 c0 test %eax,%eax 10d46a: 74 10 je 10d47c <_Thread_Dispatch+0x84> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 10d46c: 8b 10 mov (%eax),%edx 10d46e: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d474: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10d47a: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d47c: 83 ec 08 sub $0x8,%esp 10d47f: 56 push %esi 10d480: 53 push %ebx 10d481: e8 02 10 00 00 call 10e488 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d486: 59 pop %ecx 10d487: 58 pop %eax 10d488: 81 c6 d4 00 00 00 add $0xd4,%esi 10d48e: 56 push %esi 10d48f: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10d495: 50 push %eax 10d496: e8 f5 12 00 00 call 10e790 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d49b: 83 c4 10 add $0x10,%esp 10d49e: 8b 93 ec 00 00 00 mov 0xec(%ebx),%edx 10d4a4: 85 d2 test %edx,%edx 10d4a6: 74 36 je 10d4de <_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 ); 10d4a8: a1 80 74 12 00 mov 0x127480,%eax 10d4ad: 39 c3 cmp %eax,%ebx 10d4af: 74 2d je 10d4de <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d4b1: 85 c0 test %eax,%eax 10d4b3: 74 11 je 10d4c6 <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d4b5: 83 ec 0c sub $0xc,%esp 10d4b8: 05 ec 00 00 00 add $0xec,%eax 10d4bd: 50 push %eax 10d4be: e8 01 13 00 00 call 10e7c4 <_CPU_Context_save_fp> 10d4c3: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d4c6: 83 ec 0c sub $0xc,%esp 10d4c9: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10d4cf: 50 push %eax 10d4d0: e8 f9 12 00 00 call 10e7ce <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d4d5: 89 1d 80 74 12 00 mov %ebx,0x127480 10d4db: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d4de: 8b 1d b8 74 12 00 mov 0x1274b8,%ebx _ISR_Disable( level ); 10d4e4: 9c pushf 10d4e5: fa cli 10d4e6: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10d4e7: 8a 15 c8 74 12 00 mov 0x1274c8,%dl 10d4ed: 84 d2 test %dl,%dl 10d4ef: 74 37 je 10d528 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10d4f1: 8b 35 88 74 12 00 mov 0x127488,%esi _Thread_Dispatch_disable_level = 1; 10d4f7: c7 05 f8 73 12 00 01 movl $0x1,0x1273f8 10d4fe: 00 00 00 _Context_Switch_necessary = false; 10d501: c6 05 c8 74 12 00 00 movb $0x0,0x1274c8 _Thread_Executing = heir; 10d508: 89 35 b8 74 12 00 mov %esi,0x1274b8 #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 ) 10d50e: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d512: 0f 85 08 ff ff ff jne 10d420 <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d518: 8b 15 c4 73 12 00 mov 0x1273c4,%edx 10d51e: 89 56 78 mov %edx,0x78(%esi) 10d521: e9 fa fe ff ff jmp 10d420 <_Thread_Dispatch+0x28> 10d526: 66 90 xchg %ax,%ax <== NOT EXECUTED executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10d528: c7 05 f8 73 12 00 00 movl $0x0,0x1273f8 10d52f: 00 00 00 _ISR_Enable( level ); 10d532: 50 push %eax 10d533: 9d popf if ( _Thread_Do_post_task_switch_extension || 10d534: a1 9c 74 12 00 mov 0x12749c,%eax 10d539: 85 c0 test %eax,%eax 10d53b: 75 06 jne 10d543 <_Thread_Dispatch+0x14b> executing->do_post_task_switch_extension ) { 10d53d: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10d541: 74 09 je 10d54c <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10d543: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10d547: e8 ac e8 ff ff call 10bdf8 <_API_extensions_Run_postswitch> } } 10d54c: 8d 65 f4 lea -0xc(%ebp),%esp 10d54f: 5b pop %ebx 10d550: 5e pop %esi 10d551: 5f pop %edi 10d552: c9 leave 10d553: c3 ret 00112bbc <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 112bbc: 55 push %ebp 112bbd: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 112bbf: a1 b8 74 12 00 mov 0x1274b8,%eax if ( !_States_Is_ready( executing->current_state ) || 112bc4: 8b 50 10 mov 0x10(%eax),%edx 112bc7: 85 d2 test %edx,%edx 112bc9: 75 0e jne 112bd9 <_Thread_Evaluate_mode+0x1d><== ALWAYS TAKEN 112bcb: 3b 05 88 74 12 00 cmp 0x127488,%eax 112bd1: 74 11 je 112be4 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 112bd3: 80 78 75 00 cmpb $0x0,0x75(%eax) 112bd7: 74 0b je 112be4 <_Thread_Evaluate_mode+0x28><== ALWAYS TAKEN _Context_Switch_necessary = true; 112bd9: c6 05 c8 74 12 00 01 movb $0x1,0x1274c8 112be0: b0 01 mov $0x1,%al return true; } return false; } 112be2: c9 leave 112be3: 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; 112be4: 31 c0 xor %eax,%eax } return false; } 112be6: c9 leave 112be7: c3 ret 0010d578 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d578: 55 push %ebp 10d579: 89 e5 mov %esp,%ebp 10d57b: 53 push %ebx 10d57c: 83 ec 04 sub $0x4,%esp 10d57f: 8b 45 08 mov 0x8(%ebp),%eax 10d582: 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 ) ) { 10d585: 85 c0 test %eax,%eax 10d587: 74 4b je 10d5d4 <_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); 10d589: 89 c2 mov %eax,%edx 10d58b: c1 ea 18 shr $0x18,%edx 10d58e: 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 ) 10d591: 8d 5a ff lea -0x1(%edx),%ebx 10d594: 83 fb 03 cmp $0x3,%ebx 10d597: 77 2b ja 10d5c4 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d599: 89 c3 mov %eax,%ebx 10d59b: c1 eb 1b shr $0x1b,%ebx 10d59e: 4b dec %ebx 10d59f: 75 23 jne 10d5c4 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d5a1: 8b 14 95 cc 73 12 00 mov 0x1273cc(,%edx,4),%edx if ( !api_information ) { 10d5a8: 85 d2 test %edx,%edx 10d5aa: 74 18 je 10d5c4 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10d5ac: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d5af: 85 d2 test %edx,%edx 10d5b1: 74 11 je 10d5c4 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d5b3: 53 push %ebx 10d5b4: 51 push %ecx 10d5b5: 50 push %eax 10d5b6: 52 push %edx 10d5b7: e8 24 f7 ff ff call 10cce0 <_Objects_Get> 10d5bc: 83 c4 10 add $0x10,%esp done: return tp; } 10d5bf: 8b 5d fc mov -0x4(%ebp),%ebx 10d5c2: c9 leave 10d5c3: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d5c4: c7 01 01 00 00 00 movl $0x1,(%ecx) 10d5ca: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d5cc: 8b 5d fc mov -0x4(%ebp),%ebx 10d5cf: c9 leave 10d5d0: c3 ret 10d5d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d5d4: a1 f8 73 12 00 mov 0x1273f8,%eax 10d5d9: 40 inc %eax 10d5da: a3 f8 73 12 00 mov %eax,0x1273f8 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; 10d5df: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d5e5: a1 b8 74 12 00 mov 0x1274b8,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d5ea: 8b 5d fc mov -0x4(%ebp),%ebx 10d5ed: c9 leave 10d5ee: c3 ret 00112be8 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112be8: 55 push %ebp 112be9: 89 e5 mov %esp,%ebp 112beb: 53 push %ebx 112bec: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112bef: 8b 1d b8 74 12 00 mov 0x1274b8,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 112bf5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 112bfb: 85 c0 test %eax,%eax 112bfd: 74 79 je 112c78 <_Thread_Handler+0x90> 112bff: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 112c00: a0 34 70 12 00 mov 0x127034,%al 112c05: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112c08: c6 05 34 70 12 00 01 movb $0x1,0x127034 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 112c0f: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 112c15: 85 c0 test %eax,%eax 112c17: 74 24 je 112c3d <_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 ); 112c19: a1 80 74 12 00 mov 0x127480,%eax 112c1e: 39 c3 cmp %eax,%ebx 112c20: 74 1b je 112c3d <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 112c22: 85 c0 test %eax,%eax 112c24: 74 11 je 112c37 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 112c26: 83 ec 0c sub $0xc,%esp 112c29: 05 ec 00 00 00 add $0xec,%eax 112c2e: 50 push %eax 112c2f: e8 90 bb ff ff call 10e7c4 <_CPU_Context_save_fp> 112c34: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 112c37: 89 1d 80 74 12 00 mov %ebx,0x127480 /* * 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 ); 112c3d: 83 ec 0c sub $0xc,%esp 112c40: 53 push %ebx 112c41: e8 b2 b6 ff ff call 10e2f8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 112c46: e8 09 a9 ff ff call 10d554 <_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) */ { 112c4b: 83 c4 10 add $0x10,%esp 112c4e: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 112c52: 74 28 je 112c7c <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112c54: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112c5a: 85 c0 test %eax,%eax 112c5c: 74 2d je 112c8b <_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 ) { 112c5e: 48 dec %eax 112c5f: 74 43 je 112ca4 <_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 ); 112c61: 83 ec 0c sub $0xc,%esp 112c64: 53 push %ebx 112c65: e8 ca b6 ff ff call 10e334 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 112c6a: 83 c4 0c add $0xc,%esp 112c6d: 6a 06 push $0x6 112c6f: 6a 01 push $0x1 112c71: 6a 00 push $0x0 112c73: e8 20 9b ff ff call 10c798 <_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); 112c78: fb sti 112c79: eb 85 jmp 112c00 <_Thread_Handler+0x18> 112c7b: 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 (); 112c7c: e8 9f c5 00 00 call 11f220 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112c81: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112c87: 85 c0 test %eax,%eax 112c89: 75 d3 jne 112c5e <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 112c8b: 83 ec 0c sub $0xc,%esp 112c8e: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 112c94: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 112c9a: 89 43 28 mov %eax,0x28(%ebx) 112c9d: 83 c4 10 add $0x10,%esp 112ca0: eb bf jmp 112c61 <_Thread_Handler+0x79> 112ca2: 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)( 112ca4: 83 ec 0c sub $0xc,%esp 112ca7: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 112cad: 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 = 112cb3: 89 43 28 mov %eax,0x28(%ebx) 112cb6: 83 c4 10 add $0x10,%esp 112cb9: eb a6 jmp 112c61 <_Thread_Handler+0x79> 0010d5f0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d5f0: 55 push %ebp 10d5f1: 89 e5 mov %esp,%ebp 10d5f3: 57 push %edi 10d5f4: 56 push %esi 10d5f5: 53 push %ebx 10d5f6: 83 ec 1c sub $0x1c,%esp 10d5f9: 8b 5d 0c mov 0xc(%ebp),%ebx 10d5fc: 8b 4d 10 mov 0x10(%ebp),%ecx 10d5ff: 8b 7d 14 mov 0x14(%ebp),%edi 10d602: 8b 75 1c mov 0x1c(%ebp),%esi 10d605: 8a 55 18 mov 0x18(%ebp),%dl 10d608: 8a 45 20 mov 0x20(%ebp),%al 10d60b: 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; 10d60e: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d615: 00 00 00 10d618: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d61f: 00 00 00 10d622: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d629: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d62c: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d633: 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 ) { 10d636: 85 c9 test %ecx,%ecx 10d638: 0f 84 13 02 00 00 je 10d851 <_Thread_Initialize+0x261> 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; 10d63e: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10d645: 89 f8 mov %edi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d647: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10d64d: 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 ) { 10d653: 84 d2 test %dl,%dl 10d655: 0f 85 89 01 00 00 jne 10d7e4 <_Thread_Initialize+0x1f4> 10d65b: 31 c0 xor %eax,%eax 10d65d: 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; 10d664: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10d66a: 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; 10d670: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d677: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d67e: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d685: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d68c: a1 98 74 12 00 mov 0x127498,%eax 10d691: 85 c0 test %eax,%eax 10d693: 0f 85 6b 01 00 00 jne 10d804 <_Thread_Initialize+0x214> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d699: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10d6a0: 00 00 00 10d6a3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d6aa: 8a 45 df mov -0x21(%ebp),%al 10d6ad: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d6b3: 8b 45 24 mov 0x24(%ebp),%eax 10d6b6: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d6bc: 8b 45 28 mov 0x28(%ebp),%eax 10d6bf: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10d6c5: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10d6c9: 75 08 jne 10d6d3 <_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; 10d6cb: a1 c4 73 12 00 mov 0x1273c4,%eax 10d6d0: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10d6d3: 8b 45 2c mov 0x2c(%ebp),%eax 10d6d6: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d6dc: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d6e3: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d6ea: 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; 10d6f1: 89 73 18 mov %esi,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d6f4: 89 b3 bc 00 00 00 mov %esi,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d6fa: 83 ec 08 sub $0x8,%esp 10d6fd: 56 push %esi 10d6fe: 53 push %ebx 10d6ff: e8 d0 06 00 00 call 10ddd4 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10d704: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d70b: 00 00 00 10d70e: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d715: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d718: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d71c: 8b 45 08 mov 0x8(%ebp),%eax 10d71f: 8b 40 1c mov 0x1c(%eax),%eax 10d722: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d725: 8b 45 30 mov 0x30(%ebp),%eax 10d728: 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 ); 10d72b: 89 1c 24 mov %ebx,(%esp) 10d72e: e8 8d 0c 00 00 call 10e3c0 <_User_extensions_Thread_create> if ( extension_status ) 10d733: 83 c4 10 add $0x10,%esp 10d736: 84 c0 test %al,%al 10d738: 0f 85 9a 00 00 00 jne 10d7d8 <_Thread_Initialize+0x1e8> return true; failed: if ( the_thread->libc_reent ) 10d73e: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d744: 85 c0 test %eax,%eax 10d746: 74 0c je 10d754 <_Thread_Initialize+0x164> _Workspace_Free( the_thread->libc_reent ); 10d748: 83 ec 0c sub $0xc,%esp 10d74b: 50 push %eax 10d74c: e8 cf 0f 00 00 call 10e720 <_Workspace_Free> 10d751: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d754: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10d75a: 85 c0 test %eax,%eax 10d75c: 74 0c je 10d76a <_Thread_Initialize+0x17a> _Workspace_Free( the_thread->API_Extensions[i] ); 10d75e: 83 ec 0c sub $0xc,%esp 10d761: 50 push %eax 10d762: e8 b9 0f 00 00 call 10e720 <_Workspace_Free> 10d767: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d76a: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10d770: 85 c0 test %eax,%eax 10d772: 74 0c je 10d780 <_Thread_Initialize+0x190> _Workspace_Free( the_thread->API_Extensions[i] ); 10d774: 83 ec 0c sub $0xc,%esp 10d777: 50 push %eax 10d778: e8 a3 0f 00 00 call 10e720 <_Workspace_Free> 10d77d: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d780: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10d786: 85 c0 test %eax,%eax 10d788: 74 0c je 10d796 <_Thread_Initialize+0x1a6><== NEVER TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10d78a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d78d: 50 push %eax <== NOT EXECUTED 10d78e: e8 8d 0f 00 00 call 10e720 <_Workspace_Free> <== NOT EXECUTED 10d793: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10d796: 8b 55 e4 mov -0x1c(%ebp),%edx 10d799: 85 d2 test %edx,%edx 10d79b: 74 0e je 10d7ab <_Thread_Initialize+0x1bb> (void) _Workspace_Free( extensions_area ); 10d79d: 83 ec 0c sub $0xc,%esp 10d7a0: ff 75 e4 pushl -0x1c(%ebp) 10d7a3: e8 78 0f 00 00 call 10e720 <_Workspace_Free> 10d7a8: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d7ab: 8b 45 e0 mov -0x20(%ebp),%eax 10d7ae: 85 c0 test %eax,%eax 10d7b0: 74 0e je 10d7c0 <_Thread_Initialize+0x1d0> (void) _Workspace_Free( fp_area ); 10d7b2: 83 ec 0c sub $0xc,%esp 10d7b5: ff 75 e0 pushl -0x20(%ebp) 10d7b8: e8 63 0f 00 00 call 10e720 <_Workspace_Free> 10d7bd: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d7c0: 83 ec 0c sub $0xc,%esp 10d7c3: 53 push %ebx 10d7c4: e8 2b 08 00 00 call 10dff4 <_Thread_Stack_Free> 10d7c9: 31 c0 xor %eax,%eax return false; 10d7cb: 83 c4 10 add $0x10,%esp } 10d7ce: 8d 65 f4 lea -0xc(%ebp),%esp 10d7d1: 5b pop %ebx 10d7d2: 5e pop %esi 10d7d3: 5f pop %edi 10d7d4: c9 leave 10d7d5: c3 ret 10d7d6: 66 90 xchg %ax,%ax <== 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 ) 10d7d8: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d7da: 8d 65 f4 lea -0xc(%ebp),%esp 10d7dd: 5b pop %ebx 10d7de: 5e pop %esi 10d7df: 5f pop %edi 10d7e0: c9 leave 10d7e1: c3 ret 10d7e2: 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 ); 10d7e4: 83 ec 0c sub $0xc,%esp 10d7e7: 6a 6c push $0x6c 10d7e9: e8 16 0f 00 00 call 10e704 <_Workspace_Allocate> 10d7ee: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10d7f1: 83 c4 10 add $0x10,%esp 10d7f4: 85 c0 test %eax,%eax 10d7f6: 0f 84 89 00 00 00 je 10d885 <_Thread_Initialize+0x295> 10d7fc: 8b 45 e0 mov -0x20(%ebp),%eax 10d7ff: e9 60 fe ff ff jmp 10d664 <_Thread_Initialize+0x74> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d804: 83 ec 0c sub $0xc,%esp 10d807: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d80e: 50 push %eax 10d80f: e8 f0 0e 00 00 call 10e704 <_Workspace_Allocate> 10d814: 89 45 e4 mov %eax,-0x1c(%ebp) (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d817: 83 c4 10 add $0x10,%esp 10d81a: 85 c0 test %eax,%eax 10d81c: 0f 84 1c ff ff ff je 10d73e <_Thread_Initialize+0x14e> goto failed; } the_thread->extensions = (void **) extensions_area; 10d822: 89 c1 mov %eax,%ecx 10d824: 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++ ) 10d82a: 8b 3d 98 74 12 00 mov 0x127498,%edi 10d830: 31 d2 xor %edx,%edx 10d832: 31 c0 xor %eax,%eax 10d834: eb 08 jmp 10d83e <_Thread_Initialize+0x24e> 10d836: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d838: 8b 8b 00 01 00 00 mov 0x100(%ebx),%ecx the_thread->extensions[i] = NULL; 10d83e: 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++ ) 10d845: 40 inc %eax 10d846: 89 c2 mov %eax,%edx 10d848: 39 c7 cmp %eax,%edi 10d84a: 73 ec jae 10d838 <_Thread_Initialize+0x248> 10d84c: e9 59 fe ff ff jmp 10d6aa <_Thread_Initialize+0xba> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10d851: 83 ec 08 sub $0x8,%esp 10d854: 57 push %edi 10d855: 53 push %ebx 10d856: 88 55 d8 mov %dl,-0x28(%ebp) 10d859: e8 32 07 00 00 call 10df90 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d85e: 83 c4 10 add $0x10,%esp 10d861: 85 c0 test %eax,%eax 10d863: 8a 55 d8 mov -0x28(%ebp),%dl 10d866: 74 16 je 10d87e <_Thread_Initialize+0x28e> 10d868: 39 c7 cmp %eax,%edi 10d86a: 77 12 ja 10d87e <_Thread_Initialize+0x28e><== ALWAYS TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10d86c: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10d872: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10d879: e9 c9 fd ff ff jmp 10d647 <_Thread_Initialize+0x57> if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10d87e: 31 c0 xor %eax,%eax 10d880: e9 49 ff ff ff jmp 10d7ce <_Thread_Initialize+0x1de> * 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 ) 10d885: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10d88c: e9 ad fe ff ff jmp 10d73e <_Thread_Initialize+0x14e> 00111eec <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 111eec: 55 push %ebp 111eed: 89 e5 mov %esp,%ebp 111eef: 53 push %ebx 111ef0: 83 ec 10 sub $0x10,%esp 111ef3: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 111ef6: 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; 111efd: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 111f03: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 111f06: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 111f0c: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 111f0f: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 111f15: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 111f1b: 8b 45 0c mov 0xc(%ebp),%eax 111f1e: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 111f24: 8b 45 10 mov 0x10(%ebp),%eax 111f27: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 111f2d: 53 push %ebx 111f2e: e8 89 c8 ff ff call 10e7bc <_Thread_queue_Extract_with_proxy> 111f33: 83 c4 10 add $0x10,%esp 111f36: 84 c0 test %al,%al 111f38: 75 06 jne 111f40 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 111f3a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111f3e: 74 28 je 111f68 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 111f40: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 111f46: 39 43 14 cmp %eax,0x14(%ebx) 111f49: 74 15 je 111f60 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 111f4b: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111f4e: 89 45 0c mov %eax,0xc(%ebp) 111f51: 89 5d 08 mov %ebx,0x8(%ebp) } } 111f54: 8b 5d fc mov -0x4(%ebp),%ebx 111f57: 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 ); 111f58: e9 2b ca ff ff jmp 10e988 <_Thread_Set_priority> 111f5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 111f60: 8b 5d fc mov -0x4(%ebp),%ebx 111f63: c9 leave 111f64: c3 ret 111f65: 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 ); 111f68: 83 ec 0c sub $0xc,%esp 111f6b: 8d 43 48 lea 0x48(%ebx),%eax 111f6e: 50 push %eax 111f6f: e8 80 d2 ff ff call 10f1f4 <_Watchdog_Remove> 111f74: 83 c4 10 add $0x10,%esp 111f77: eb c7 jmp 111f40 <_Thread_Reset+0x54> 00111274 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 111274: 55 push %ebp 111275: 89 e5 mov %esp,%ebp 111277: 56 push %esi 111278: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 111279: a1 b8 74 12 00 mov 0x1274b8,%eax ready = executing->ready; 11127e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111284: 9c pushf 111285: fa cli 111286: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 111287: 8b 1a mov (%edx),%ebx 111289: 3b 5a 08 cmp 0x8(%edx),%ebx 11128c: 74 3e je 1112cc <_Thread_Reset_timeslice+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11128e: 8b 30 mov (%eax),%esi previous = the_node->previous; 111290: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 111293: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 111296: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111298: 8d 5a 04 lea 0x4(%edx),%ebx 11129b: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 11129d: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1112a0: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1112a3: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1112a5: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 1112a8: 51 push %ecx 1112a9: 9d popf 1112aa: fa cli if ( _Thread_Is_heir( executing ) ) 1112ab: 3b 05 88 74 12 00 cmp 0x127488,%eax 1112b1: 74 0d je 1112c0 <_Thread_Reset_timeslice+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 1112b3: c6 05 c8 74 12 00 01 movb $0x1,0x1274c8 _ISR_Enable( level ); 1112ba: 51 push %ecx 1112bb: 9d popf } 1112bc: 5b pop %ebx 1112bd: 5e pop %esi 1112be: c9 leave 1112bf: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 1112c0: 8b 02 mov (%edx),%eax 1112c2: a3 88 74 12 00 mov %eax,0x127488 1112c7: eb ea jmp 1112b3 <_Thread_Reset_timeslice+0x3f> 1112c9: 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 ); 1112cc: 51 push %ecx 1112cd: 9d popf _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 1112ce: 5b pop %ebx 1112cf: 5e pop %esi 1112d0: c9 leave 1112d1: c3 ret 0010e8fc <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e8fc: 55 push %ebp 10e8fd: 89 e5 mov %esp,%ebp 10e8ff: 53 push %ebx 10e900: 83 ec 04 sub $0x4,%esp 10e903: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10e906: f6 43 10 01 testb $0x1,0x10(%ebx) 10e90a: 74 08 je 10e914 <_Thread_Restart+0x18> 10e90c: 31 c0 xor %eax,%eax return true; } return false; } 10e90e: 8b 5d fc mov -0x4(%ebp),%ebx 10e911: c9 leave 10e912: c3 ret 10e913: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10e914: 83 ec 0c sub $0xc,%esp 10e917: 53 push %ebx 10e918: e8 b3 01 00 00 call 10ead0 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10e91d: 83 c4 0c add $0xc,%esp 10e920: ff 75 10 pushl 0x10(%ebp) 10e923: ff 75 0c pushl 0xc(%ebp) 10e926: 53 push %ebx 10e927: e8 c0 35 00 00 call 111eec <_Thread_Reset> _Thread_Load_environment( the_thread ); 10e92c: 89 1c 24 mov %ebx,(%esp) 10e92f: e8 94 32 00 00 call 111bc8 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e934: 89 1c 24 mov %ebx,(%esp) 10e937: e8 0c 35 00 00 call 111e48 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10e93c: 89 1c 24 mov %ebx,(%esp) 10e93f: e8 b8 06 00 00 call 10effc <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10e944: 83 c4 10 add $0x10,%esp 10e947: 3b 1d 38 94 12 00 cmp 0x129438,%ebx 10e94d: 74 07 je 10e956 <_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 ); 10e94f: b0 01 mov $0x1,%al return true; } return false; } 10e951: 8b 5d fc mov -0x4(%ebp),%ebx 10e954: c9 leave 10e955: 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 ) 10e956: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10e95d: 74 18 je 10e977 <_Thread_Restart+0x7b> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10e95f: 83 ec 0c sub $0xc,%esp 10e962: 81 c3 ec 00 00 00 add $0xec,%ebx 10e968: 53 push %ebx 10e969: e8 50 0a 00 00 call 10f3be <_CPU_Context_restore_fp> 10e96e: 8b 1d 38 94 12 00 mov 0x129438,%ebx 10e974: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10e977: 83 ec 0c sub $0xc,%esp 10e97a: 81 c3 d4 00 00 00 add $0xd4,%ebx 10e980: 53 push %ebx 10e981: e8 27 0a 00 00 call 10f3ad <_CPU_Context_restore> 00111710 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111710: 55 push %ebp 111711: 89 e5 mov %esp,%ebp 111713: 53 push %ebx 111714: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 111717: 9c pushf 111718: fa cli 111719: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 11171a: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 11171d: f6 c2 02 test $0x2,%dl 111720: 74 6e je 111790 <_Thread_Resume+0x80> <== ALWAYS TAKEN 111722: 83 e2 fd and $0xfffffffd,%edx current_state = 111725: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 111728: 85 d2 test %edx,%edx 11172a: 75 64 jne 111790 <_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; 11172c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111732: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111739: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 11173c: 66 8b 15 2c c9 12 00 mov 0x12c92c,%dx 111743: 0b 90 94 00 00 00 or 0x94(%eax),%edx 111749: 66 89 15 2c c9 12 00 mov %dx,0x12c92c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111750: 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); 111756: 8d 5a 04 lea 0x4(%edx),%ebx 111759: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 11175b: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 11175e: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111761: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111763: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 111766: 51 push %ecx 111767: 9d popf 111768: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111769: 8b 50 14 mov 0x14(%eax),%edx 11176c: 8b 1d 08 c9 12 00 mov 0x12c908,%ebx 111772: 3b 53 14 cmp 0x14(%ebx),%edx 111775: 73 19 jae 111790 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 111777: a3 08 c9 12 00 mov %eax,0x12c908 if ( _Thread_Executing->is_preemptible || 11177c: a1 38 c9 12 00 mov 0x12c938,%eax 111781: 80 78 75 00 cmpb $0x0,0x75(%eax) 111785: 74 11 je 111798 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 111787: c6 05 48 c9 12 00 01 movb $0x1,0x12c948 11178e: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 111790: 51 push %ecx 111791: 9d popf } 111792: 5b pop %ebx 111793: c9 leave 111794: c3 ret 111795: 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 || 111798: 85 d2 test %edx,%edx 11179a: 74 eb je 111787 <_Thread_Resume+0x77> <== ALWAYS TAKEN 11179c: eb f2 jmp 111790 <_Thread_Resume+0x80> 0010de40 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10de40: 55 push %ebp 10de41: 89 e5 mov %esp,%ebp 10de43: 56 push %esi 10de44: 53 push %ebx 10de45: 8b 45 08 mov 0x8(%ebp),%eax 10de48: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10de4b: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10de51: 9c pushf 10de52: fa cli 10de53: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10de54: 8b 58 10 mov 0x10(%eax),%ebx 10de57: 85 db test %ebx,%ebx 10de59: 75 2d jne 10de88 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10de5b: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10de5e: 8b 1a mov (%edx),%ebx 10de60: 3b 5a 08 cmp 0x8(%edx),%ebx 10de63: 74 3b je 10dea0 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10de65: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10de67: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10de6a: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10de6d: 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 ); 10de6f: 51 push %ecx 10de70: 9d popf 10de71: fa cli if ( _Thread_Is_heir( the_thread ) ) 10de72: 3b 05 88 74 12 00 cmp 0x127488,%eax 10de78: 74 62 je 10dedc <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10de7a: 3b 05 b8 74 12 00 cmp 0x1274b8,%eax 10de80: 74 12 je 10de94 <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10de82: 51 push %ecx 10de83: 9d popf } 10de84: 5b pop %ebx 10de85: 5e pop %esi 10de86: c9 leave 10de87: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10de88: 09 f3 or %esi,%ebx 10de8a: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10de8d: 51 push %ecx 10de8e: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10de8f: 5b pop %ebx 10de90: 5e pop %esi 10de91: c9 leave 10de92: c3 ret 10de93: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10de94: c6 05 c8 74 12 00 01 movb $0x1,0x1274c8 10de9b: eb e5 jmp 10de82 <_Thread_Set_state+0x42> 10de9d: 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); 10dea0: 8d 5a 04 lea 0x4(%edx),%ebx 10dea3: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10dea5: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10deac: 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; 10deaf: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10deb5: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10debc: 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 ); 10debf: 66 83 3a 00 cmpw $0x0,(%edx) 10dec3: 75 aa jne 10de6f <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10dec5: 66 8b 15 ac 74 12 00 mov 0x1274ac,%dx 10decc: 23 90 98 00 00 00 and 0x98(%eax),%edx 10ded2: 66 89 15 ac 74 12 00 mov %dx,0x1274ac 10ded9: eb 94 jmp 10de6f <_Thread_Set_state+0x2f> 10dedb: 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 ); 10dedc: 66 8b 35 ac 74 12 00 mov 0x1274ac,%si 10dee3: 31 d2 xor %edx,%edx 10dee5: 89 d3 mov %edx,%ebx 10dee7: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10deeb: 0f b7 db movzwl %bx,%ebx 10deee: 66 8b b4 1b 40 75 12 mov 0x127540(%ebx,%ebx,1),%si 10def5: 00 10def6: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10defa: c1 e3 04 shl $0x4,%ebx 10defd: 0f b7 d2 movzwl %dx,%edx 10df00: 8d 14 13 lea (%ebx,%edx,1),%edx 10df03: 8d 1c 52 lea (%edx,%edx,2),%ebx 10df06: 8b 15 c0 73 12 00 mov 0x1273c0,%edx 10df0c: 8b 14 9a mov (%edx,%ebx,4),%edx 10df0f: 89 15 88 74 12 00 mov %edx,0x127488 10df15: e9 60 ff ff ff jmp 10de7a <_Thread_Set_state+0x3a> 0010df1c <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10df1c: 55 push %ebp 10df1d: 89 e5 mov %esp,%ebp 10df1f: 56 push %esi 10df20: 53 push %ebx 10df21: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10df24: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10df2a: 9c pushf 10df2b: fa cli 10df2c: 5b pop %ebx old_state = the_thread->current_state; 10df2d: 8b 50 10 mov 0x10(%eax),%edx the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 10df30: 89 d6 mov %edx,%esi 10df32: 83 ce 04 or $0x4,%esi 10df35: 89 70 10 mov %esi,0x10(%eax) if ( _States_Is_ready( old_state ) ) { 10df38: 85 d2 test %edx,%edx 10df3a: 75 11 jne 10df4d <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10df3c: 8b 11 mov (%ecx),%edx 10df3e: 3b 51 08 cmp 0x8(%ecx),%edx 10df41: 74 11 je 10df54 <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10df43: 8b 10 mov (%eax),%edx previous = the_node->previous; 10df45: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10df48: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10df4b: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10df4d: 53 push %ebx 10df4e: 9d popf } 10df4f: 5b pop %ebx 10df50: 5e pop %esi 10df51: c9 leave 10df52: c3 ret 10df53: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10df54: 8d 51 04 lea 0x4(%ecx),%edx 10df57: 89 11 mov %edx,(%ecx) the_chain->permanent_null = NULL; 10df59: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10df60: 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; 10df63: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10df69: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10df70: 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 ); 10df73: 66 83 3a 00 cmpw $0x0,(%edx) 10df77: 75 d4 jne 10df4d <_Thread_Set_transient+0x31> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10df79: 66 8b 15 ac 74 12 00 mov 0x1274ac,%dx 10df80: 23 90 98 00 00 00 and 0x98(%eax),%edx 10df86: 66 89 15 ac 74 12 00 mov %dx,0x1274ac 10df8d: eb be jmp 10df4d <_Thread_Set_transient+0x31> 0010df90 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10df90: 55 push %ebp 10df91: 89 e5 mov %esp,%ebp 10df93: 53 push %ebx 10df94: 83 ec 04 sub $0x4,%esp 10df97: a1 10 32 12 00 mov 0x123210,%eax 10df9c: 8b 5d 0c mov 0xc(%ebp),%ebx 10df9f: 39 c3 cmp %eax,%ebx 10dfa1: 73 02 jae 10dfa5 <_Thread_Stack_Allocate+0x15> 10dfa3: 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 ) { 10dfa5: a1 40 32 12 00 mov 0x123240,%eax 10dfaa: 85 c0 test %eax,%eax 10dfac: 74 32 je 10dfe0 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10dfae: 83 ec 0c sub $0xc,%esp 10dfb1: 53 push %ebx 10dfb2: ff d0 call *%eax 10dfb4: 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 ) 10dfb7: 85 c0 test %eax,%eax 10dfb9: 74 11 je 10dfcc <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10dfbb: 8b 55 08 mov 0x8(%ebp),%edx 10dfbe: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10dfc4: 89 d8 mov %ebx,%eax 10dfc6: 8b 5d fc mov -0x4(%ebp),%ebx 10dfc9: c9 leave 10dfca: c3 ret 10dfcb: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10dfcc: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10dfce: 8b 55 08 mov 0x8(%ebp),%edx 10dfd1: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10dfd7: 89 d8 mov %ebx,%eax 10dfd9: 8b 5d fc mov -0x4(%ebp),%ebx 10dfdc: c9 leave 10dfdd: c3 ret 10dfde: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10dfe0: 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 ); 10dfe3: 83 ec 0c sub $0xc,%esp 10dfe6: 53 push %ebx 10dfe7: e8 18 07 00 00 call 10e704 <_Workspace_Allocate> 10dfec: 83 c4 10 add $0x10,%esp 10dfef: eb c6 jmp 10dfb7 <_Thread_Stack_Allocate+0x27> 0010dff4 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10dff4: 55 push %ebp 10dff5: 89 e5 mov %esp,%ebp 10dff7: 83 ec 08 sub $0x8,%esp 10dffa: 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 ) 10dffd: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10e004: 74 16 je 10e01c <_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 ) 10e006: 8b 15 44 32 12 00 mov 0x123244,%edx 10e00c: 85 d2 test %edx,%edx 10e00e: 74 10 je 10e020 <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e010: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e016: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e019: 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 ); 10e01a: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e01c: c9 leave 10e01d: c3 ret 10e01e: 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 ); 10e020: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e026: 89 45 08 mov %eax,0x8(%ebp) } 10e029: 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 ); 10e02a: e9 f1 06 00 00 jmp 10e720 <_Workspace_Free> 0010e08c <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e08c: 55 push %ebp 10e08d: 89 e5 mov %esp,%ebp 10e08f: 53 push %ebx 10e090: 83 ec 04 sub $0x4,%esp 10e093: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10e096: f6 43 10 01 testb $0x1,0x10(%ebx) 10e09a: 75 08 jne 10e0a4 <_Thread_Start+0x18> 10e09c: 31 c0 xor %eax,%eax return true; } return false; } 10e09e: 8b 5d fc mov -0x4(%ebp),%ebx 10e0a1: c9 leave 10e0a2: c3 ret 10e0a3: 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; 10e0a4: 8b 45 10 mov 0x10(%ebp),%eax 10e0a7: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10e0ad: 8b 45 0c mov 0xc(%ebp),%eax 10e0b0: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10e0b6: 8b 45 14 mov 0x14(%ebp),%eax 10e0b9: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10e0bf: 8b 45 18 mov 0x18(%ebp),%eax 10e0c2: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e0c8: 83 ec 0c sub $0xc,%esp 10e0cb: 53 push %ebx 10e0cc: e8 7f 2e 00 00 call 110f50 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e0d1: 89 1c 24 mov %ebx,(%esp) 10e0d4: e8 f7 30 00 00 call 1111d0 <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e0d9: 89 1c 24 mov %ebx,(%esp) 10e0dc: e8 67 03 00 00 call 10e448 <_User_extensions_Thread_start> 10e0e1: b0 01 mov $0x1,%al return true; 10e0e3: 83 c4 10 add $0x10,%esp } return false; } 10e0e6: 8b 5d fc mov -0x4(%ebp),%ebx 10e0e9: c9 leave 10e0ea: c3 ret 001112d4 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 1112d4: 55 push %ebp 1112d5: 89 e5 mov %esp,%ebp 1112d7: 56 push %esi 1112d8: 53 push %ebx 1112d9: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 1112dc: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 1112e2: 9c pushf 1112e3: fa cli 1112e4: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 1112e5: 8b 58 10 mov 0x10(%eax),%ebx 1112e8: 85 db test %ebx,%ebx 1112ea: 75 34 jne 111320 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 1112ec: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 1112f3: 8b 1a mov (%edx),%ebx 1112f5: 3b 5a 08 cmp 0x8(%edx),%ebx 1112f8: 74 3e je 111338 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1112fa: 8b 18 mov (%eax),%ebx previous = the_node->previous; 1112fc: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 1112ff: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 111302: 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 ); 111304: 51 push %ecx 111305: 9d popf 111306: fa cli if ( _Thread_Is_heir( the_thread ) ) 111307: 3b 05 88 74 12 00 cmp 0x127488,%eax 11130d: 74 65 je 111374 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 11130f: 3b 05 b8 74 12 00 cmp 0x1274b8,%eax 111315: 74 15 je 11132c <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 111317: 51 push %ecx 111318: 9d popf } 111319: 5b pop %ebx 11131a: 5e pop %esi 11131b: c9 leave 11131c: c3 ret 11131d: 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 = 111320: 83 cb 02 or $0x2,%ebx 111323: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 111326: 51 push %ecx 111327: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 111328: 5b pop %ebx 111329: 5e pop %esi 11132a: c9 leave 11132b: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 11132c: c6 05 c8 74 12 00 01 movb $0x1,0x1274c8 111333: eb e2 jmp 111317 <_Thread_Suspend+0x43> 111335: 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); 111338: 8d 5a 04 lea 0x4(%edx),%ebx 11133b: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 11133d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 111344: 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; 111347: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 11134d: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 111354: 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 ); 111357: 66 83 3a 00 cmpw $0x0,(%edx) 11135b: 75 a7 jne 111304 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 11135d: 66 8b 15 ac 74 12 00 mov 0x1274ac,%dx 111364: 23 90 98 00 00 00 and 0x98(%eax),%edx 11136a: 66 89 15 ac 74 12 00 mov %dx,0x1274ac 111371: eb 91 jmp 111304 <_Thread_Suspend+0x30> 111373: 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 ); 111374: 66 8b 35 ac 74 12 00 mov 0x1274ac,%si 11137b: 31 d2 xor %edx,%edx 11137d: 89 d3 mov %edx,%ebx 11137f: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 111383: 0f b7 db movzwl %bx,%ebx 111386: 66 8b b4 1b 40 75 12 mov 0x127540(%ebx,%ebx,1),%si 11138d: 00 11138e: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 111392: c1 e3 04 shl $0x4,%ebx 111395: 0f b7 d2 movzwl %dx,%edx 111398: 8d 14 13 lea (%ebx,%edx,1),%edx 11139b: 8d 1c 52 lea (%edx,%edx,2),%ebx 11139e: 8b 15 c0 73 12 00 mov 0x1273c0,%edx 1113a4: 8b 14 9a mov (%edx,%ebx,4),%edx 1113a7: 89 15 88 74 12 00 mov %edx,0x127488 1113ad: e9 5d ff ff ff jmp 11130f <_Thread_Suspend+0x3b> 0010e0ec <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10e0ec: 55 push %ebp 10e0ed: 89 e5 mov %esp,%ebp 10e0ef: 53 push %ebx 10e0f0: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10e0f3: 8b 1d b8 74 12 00 mov 0x1274b8,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10e0f9: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10e0fd: 74 19 je 10e118 <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10e0ff: 8b 43 10 mov 0x10(%ebx),%eax 10e102: 85 c0 test %eax,%eax 10e104: 75 12 jne 10e118 <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10e106: 8b 43 7c mov 0x7c(%ebx),%eax 10e109: 83 f8 01 cmp $0x1,%eax 10e10c: 72 0a jb 10e118 <_Thread_Tickle_timeslice+0x2c> 10e10e: 83 f8 02 cmp $0x2,%eax 10e111: 76 29 jbe 10e13c <_Thread_Tickle_timeslice+0x50> 10e113: 83 f8 03 cmp $0x3,%eax 10e116: 74 08 je 10e120 <_Thread_Tickle_timeslice+0x34><== NEVER TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10e118: 8b 5d fc mov -0x4(%ebp),%ebx 10e11b: c9 leave 10e11c: c3 ret 10e11d: 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 ) 10e120: 8b 43 78 mov 0x78(%ebx),%eax 10e123: 48 dec %eax 10e124: 89 43 78 mov %eax,0x78(%ebx) 10e127: 85 c0 test %eax,%eax 10e129: 75 ed jne 10e118 <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10e12b: 83 ec 0c sub $0xc,%esp 10e12e: 53 push %ebx 10e12f: ff 93 80 00 00 00 call *0x80(%ebx) 10e135: 83 c4 10 add $0x10,%esp 10e138: eb de jmp 10e118 <_Thread_Tickle_timeslice+0x2c> 10e13a: 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 ) { 10e13c: 8b 43 78 mov 0x78(%ebx),%eax 10e13f: 48 dec %eax 10e140: 89 43 78 mov %eax,0x78(%ebx) 10e143: 85 c0 test %eax,%eax 10e145: 7f d1 jg 10e118 <_Thread_Tickle_timeslice+0x2c> _Thread_Reset_timeslice(); 10e147: e8 28 31 00 00 call 111274 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e14c: a1 c4 73 12 00 mov 0x1273c4,%eax 10e151: 89 43 78 mov %eax,0x78(%ebx) 10e154: eb c2 jmp 10e118 <_Thread_Tickle_timeslice+0x2c> 0010e158 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e158: 55 push %ebp 10e159: 89 e5 mov %esp,%ebp 10e15b: 56 push %esi 10e15c: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e15d: a1 b8 74 12 00 mov 0x1274b8,%eax ready = executing->ready; 10e162: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e168: 9c pushf 10e169: fa cli 10e16a: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10e16b: 8b 1a mov (%edx),%ebx 10e16d: 3b 5a 08 cmp 0x8(%edx),%ebx 10e170: 74 3e je 10e1b0 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e172: 8b 30 mov (%eax),%esi previous = the_node->previous; 10e174: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10e177: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10e17a: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e17c: 8d 5a 04 lea 0x4(%edx),%ebx 10e17f: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10e181: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10e184: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e187: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10e189: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e18c: 51 push %ecx 10e18d: 9d popf 10e18e: fa cli if ( _Thread_Is_heir( executing ) ) 10e18f: 3b 05 88 74 12 00 cmp 0x127488,%eax 10e195: 74 0d je 10e1a4 <_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; 10e197: c6 05 c8 74 12 00 01 movb $0x1,0x1274c8 _ISR_Enable( level ); 10e19e: 51 push %ecx 10e19f: 9d popf } 10e1a0: 5b pop %ebx 10e1a1: 5e pop %esi 10e1a2: c9 leave 10e1a3: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e1a4: 8b 02 mov (%edx),%eax 10e1a6: a3 88 74 12 00 mov %eax,0x127488 10e1ab: eb ea jmp 10e197 <_Thread_Yield_processor+0x3f> 10e1ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e1b0: 3b 05 88 74 12 00 cmp 0x127488,%eax 10e1b6: 75 df jne 10e197 <_Thread_Yield_processor+0x3f><== ALWAYS TAKEN 10e1b8: eb e4 jmp 10e19e <_Thread_Yield_processor+0x46> 0010d020 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10d020: 55 push %ebp 10d021: 89 e5 mov %esp,%ebp 10d023: 53 push %ebx 10d024: 83 ec 04 sub $0x4,%esp 10d027: 8b 5d 0c mov 0xc(%ebp),%ebx 10d02a: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10d02d: 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 ) ) { 10d034: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d038: 74 16 je 10d050 <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10d03a: 50 push %eax 10d03b: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d03c: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10d043: 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 } 10d046: 8b 5d fc mov -0x4(%ebp),%ebx 10d049: c9 leave 10d04a: e9 5d 01 00 00 jmp 10d1ac <_Thread_Clear_state> 10d04f: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d050: 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 ); 10d057: 50 push %eax 10d058: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d059: 83 ec 0c sub $0xc,%esp 10d05c: 8d 43 48 lea 0x48(%ebx),%eax 10d05f: 50 push %eax 10d060: e8 9b 15 00 00 call 10e600 <_Watchdog_Remove> 10d065: 83 c4 10 add $0x10,%esp 10d068: eb d2 jmp 10d03c <_Thread_blocking_operation_Cancel+0x1c> 0010d970 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10d970: 55 push %ebp 10d971: 89 e5 mov %esp,%ebp 10d973: 53 push %ebx 10d974: 83 ec 04 sub $0x4,%esp 10d977: 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 ) 10d97a: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10d97e: 74 1c je 10d99c <_Thread_queue_Dequeue+0x2c> 10d980: b8 e0 0f 11 00 mov $0x110fe0,%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 ); 10d985: 83 ec 0c sub $0xc,%esp 10d988: 53 push %ebx 10d989: ff d0 call *%eax _ISR_Disable( level ); 10d98b: 9c pushf 10d98c: fa cli 10d98d: 5a pop %edx if ( !the_thread ) { 10d98e: 83 c4 10 add $0x10,%esp 10d991: 85 c0 test %eax,%eax 10d993: 74 0f je 10d9a4 <_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 ); 10d995: 52 push %edx 10d996: 9d popf return the_thread; } 10d997: 8b 5d fc mov -0x4(%ebp),%ebx 10d99a: c9 leave 10d99b: 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 ) 10d99c: b8 bc d9 10 00 mov $0x10d9bc,%eax 10d9a1: eb e2 jmp 10d985 <_Thread_queue_Dequeue+0x15> 10d9a3: 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; 10d9a4: 8b 4b 30 mov 0x30(%ebx),%ecx 10d9a7: 49 dec %ecx 10d9a8: 83 f9 01 cmp $0x1,%ecx 10d9ab: 77 e8 ja 10d995 <_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; 10d9ad: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10d9b4: a1 b8 74 12 00 mov 0x1274b8,%eax 10d9b9: eb da jmp 10d995 <_Thread_queue_Dequeue+0x25> 0010d9bc <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10d9bc: 55 push %ebp 10d9bd: 89 e5 mov %esp,%ebp 10d9bf: 57 push %edi 10d9c0: 56 push %esi 10d9c1: 53 push %ebx 10d9c2: 83 ec 1c sub $0x1c,%esp 10d9c5: 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 ); 10d9c8: 9c pushf 10d9c9: fa cli 10d9ca: 58 pop %eax 10d9cb: 89 f2 mov %esi,%edx 10d9cd: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d9cf: 8d 5a 04 lea 0x4(%edx),%ebx 10d9d2: 39 1a cmp %ebx,(%edx) 10d9d4: 75 1a jne 10d9f0 <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10d9d6: 41 inc %ecx 10d9d7: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10d9da: 83 f9 04 cmp $0x4,%ecx 10d9dd: 75 f0 jne 10d9cf <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10d9df: 50 push %eax 10d9e0: 9d popf 10d9e1: 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 ); } 10d9e3: 89 d8 mov %ebx,%eax 10d9e5: 8d 65 f4 lea -0xc(%ebp),%esp 10d9e8: 5b pop %ebx 10d9e9: 5e pop %esi 10d9ea: 5f pop %edi 10d9eb: c9 leave 10d9ec: c3 ret 10d9ed: 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 *) 10d9f0: 8d 14 49 lea (%ecx,%ecx,2),%edx 10d9f3: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10d9f6: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10d9fd: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10da00: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10da02: 8b 73 04 mov 0x4(%ebx),%esi 10da05: 8d 7b 3c lea 0x3c(%ebx),%edi 10da08: 39 fa cmp %edi,%edx 10da0a: 74 76 je 10da82 <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10da0c: 8b 7b 40 mov 0x40(%ebx),%edi 10da0f: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10da12: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10da14: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10da16: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10da19: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10da1b: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10da1e: 8b 4b 38 mov 0x38(%ebx),%ecx 10da21: 3b 4b 40 cmp 0x40(%ebx),%ecx 10da24: 74 14 je 10da3a <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10da26: 8d 4a 38 lea 0x38(%edx),%ecx 10da29: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10da2c: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10da2f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10da32: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10da35: 83 c2 3c add $0x3c,%edx 10da38: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10da3a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10da3e: 74 18 je 10da58 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10da40: 50 push %eax 10da41: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10da42: 83 ec 08 sub $0x8,%esp 10da45: 68 f8 ff 03 10 push $0x1003fff8 10da4a: 53 push %ebx 10da4b: e8 5c f7 ff ff call 10d1ac <_Thread_Clear_state> 10da50: 83 c4 10 add $0x10,%esp 10da53: eb 8e jmp 10d9e3 <_Thread_queue_Dequeue_priority+0x27> 10da55: 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; 10da58: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10da5f: 50 push %eax 10da60: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10da61: 83 ec 0c sub $0xc,%esp 10da64: 8d 43 48 lea 0x48(%ebx),%eax 10da67: 50 push %eax 10da68: e8 93 0b 00 00 call 10e600 <_Watchdog_Remove> 10da6d: 58 pop %eax 10da6e: 5a pop %edx 10da6f: 68 f8 ff 03 10 push $0x1003fff8 10da74: 53 push %ebx 10da75: e8 32 f7 ff ff call 10d1ac <_Thread_Clear_state> 10da7a: 83 c4 10 add $0x10,%esp 10da7d: e9 61 ff ff ff jmp 10d9e3 <_Thread_queue_Dequeue_priority+0x27> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10da82: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10da84: 89 71 04 mov %esi,0x4(%ecx) 10da87: eb b1 jmp 10da3a <_Thread_queue_Dequeue_priority+0x7e> 00111058 <_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 ) { 111058: 55 push %ebp 111059: 89 e5 mov %esp,%ebp 11105b: 56 push %esi 11105c: 53 push %ebx 11105d: 8b 55 08 mov 0x8(%ebp),%edx 111060: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 111063: 9c pushf 111064: fa cli 111065: 59 pop %ecx sync_state = the_thread_queue->sync_state; 111066: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 111069: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 111070: 83 f8 01 cmp $0x1,%eax 111073: 74 0b je 111080 <_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; 111075: 8b 55 10 mov 0x10(%ebp),%edx 111078: 89 0a mov %ecx,(%edx) return sync_state; } 11107a: 5b pop %ebx 11107b: 5e pop %esi 11107c: c9 leave 11107d: c3 ret 11107e: 66 90 xchg %ax,%ax <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111080: 8d 72 04 lea 0x4(%edx),%esi 111083: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 111085: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 111088: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 11108b: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 11108d: 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; 111090: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 111093: 51 push %ecx 111094: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 111095: 5b pop %ebx 111096: 5e pop %esi 111097: c9 leave 111098: c3 ret 0010db24 <_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 ) { 10db24: 55 push %ebp 10db25: 89 e5 mov %esp,%ebp 10db27: 57 push %edi 10db28: 56 push %esi 10db29: 53 push %ebx 10db2a: 83 ec 08 sub $0x8,%esp 10db2d: 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); 10db30: 8d 47 3c lea 0x3c(%edi),%eax 10db33: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10db36: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10db3d: 8d 47 38 lea 0x38(%edi),%eax 10db40: 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; 10db43: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10db46: 89 d0 mov %edx,%eax 10db48: c1 e8 06 shr $0x6,%eax 10db4b: 8d 04 40 lea (%eax,%eax,2),%eax 10db4e: 8b 4d 08 mov 0x8(%ebp),%ecx 10db51: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10db54: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10db57: f6 c2 20 test $0x20,%dl 10db5a: 75 60 jne 10dbbc <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10db5c: 8d 46 04 lea 0x4(%esi),%eax 10db5f: 89 75 f0 mov %esi,-0x10(%ebp) 10db62: 89 7d ec mov %edi,-0x14(%ebp) 10db65: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10db67: 9c pushf 10db68: fa cli 10db69: 5e pop %esi search_thread = (Thread_Control *) header->first; 10db6a: 8b 4d f0 mov -0x10(%ebp),%ecx 10db6d: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10db6f: 39 f8 cmp %edi,%eax 10db71: 75 17 jne 10db8a <_Thread_queue_Enqueue_priority+0x66> 10db73: e9 09 01 00 00 jmp 10dc81 <_Thread_queue_Enqueue_priority+0x15d> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10db78: 56 push %esi 10db79: 9d popf 10db7a: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10db7b: 85 58 10 test %ebx,0x10(%eax) 10db7e: 0f 84 a8 00 00 00 je 10dc2c <_Thread_queue_Enqueue_priority+0x108><== ALWAYS TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10db84: 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 ) ) { 10db86: 39 f8 cmp %edi,%eax 10db88: 74 07 je 10db91 <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10db8a: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10db8d: 39 ca cmp %ecx,%edx 10db8f: 77 e7 ja 10db78 <_Thread_queue_Enqueue_priority+0x54> 10db91: 89 4d f0 mov %ecx,-0x10(%ebp) 10db94: 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 ) ) { 10db97: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10db99: 8b 4d 08 mov 0x8(%ebp),%ecx 10db9c: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10dba0: 0f 84 8e 00 00 00 je 10dc34 <_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; 10dba6: 8b 45 10 mov 0x10(%ebp),%eax 10dba9: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10dbab: 8b 55 08 mov 0x8(%ebp),%edx 10dbae: 8b 42 30 mov 0x30(%edx),%eax } 10dbb1: 83 c4 08 add $0x8,%esp 10dbb4: 5b pop %ebx 10dbb5: 5e pop %esi 10dbb6: 5f pop %edi 10dbb7: c9 leave 10dbb8: c3 ret 10dbb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10dbbc: 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; 10dbbf: 0f b6 0d 14 32 12 00 movzbl 0x123214,%ecx 10dbc6: 41 inc %ecx _ISR_Disable( level ); 10dbc7: 9c pushf 10dbc8: fa cli 10dbc9: 5f pop %edi search_thread = (Thread_Control *) header->last; 10dbca: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dbcd: 39 f0 cmp %esi,%eax 10dbcf: 75 12 jne 10dbe3 <_Thread_queue_Enqueue_priority+0xbf> 10dbd1: eb 17 jmp 10dbea <_Thread_queue_Enqueue_priority+0xc6> 10dbd3: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dbd4: 57 push %edi 10dbd5: 9d popf 10dbd6: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dbd7: 85 58 10 test %ebx,0x10(%eax) 10dbda: 74 4c je 10dc28 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10dbdc: 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 ) ) { 10dbdf: 39 f0 cmp %esi,%eax 10dbe1: 74 07 je 10dbea <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10dbe3: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dbe6: 39 ca cmp %ecx,%edx 10dbe8: 72 ea jb 10dbd4 <_Thread_queue_Enqueue_priority+0xb0> 10dbea: 89 fe mov %edi,%esi 10dbec: 89 4d ec mov %ecx,-0x14(%ebp) 10dbef: 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 ) ) { 10dbf2: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10dbf4: 8b 4d 08 mov 0x8(%ebp),%ecx 10dbf7: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10dbfb: 75 a9 jne 10dba6 <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dbfd: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10dc04: 3b 55 ec cmp -0x14(%ebp),%edx 10dc07: 74 56 je 10dc5f <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10dc09: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10dc0b: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10dc0d: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10dc10: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10dc12: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10dc15: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10dc18: 56 push %esi 10dc19: 9d popf 10dc1a: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dc1f: 83 c4 08 add $0x8,%esp 10dc22: 5b pop %ebx 10dc23: 5e pop %esi 10dc24: 5f pop %edi 10dc25: c9 leave 10dc26: c3 ret 10dc27: 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 ); 10dc28: 57 push %edi 10dc29: 9d popf goto restart_reverse_search; 10dc2a: eb 93 jmp 10dbbf <_Thread_queue_Enqueue_priority+0x9b> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dc2c: 56 push %esi <== NOT EXECUTED 10dc2d: 9d popf <== NOT EXECUTED goto restart_forward_search; 10dc2e: e9 34 ff ff ff jmp 10db67 <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED 10dc33: 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; 10dc34: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10dc3b: 3b 55 f0 cmp -0x10(%ebp),%edx 10dc3e: 74 1f je 10dc5f <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10dc40: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dc43: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dc45: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dc48: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dc4a: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dc4d: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10dc50: 56 push %esi 10dc51: 9d popf 10dc52: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dc57: 83 c4 08 add $0x8,%esp 10dc5a: 5b pop %ebx 10dc5b: 5e pop %esi 10dc5c: 5f pop %edi 10dc5d: c9 leave 10dc5e: c3 ret 10dc5f: 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; 10dc62: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dc65: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dc67: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dc6a: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dc6c: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dc6f: 8b 45 08 mov 0x8(%ebp),%eax 10dc72: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dc75: 53 push %ebx 10dc76: 9d popf 10dc77: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dc7c: e9 30 ff ff ff jmp 10dbb1 <_Thread_queue_Enqueue_priority+0x8d> 10dc81: 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 ) ) { 10dc84: 89 f3 mov %esi,%ebx 10dc86: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10dc8d: e9 07 ff ff ff jmp 10db99 <_Thread_queue_Enqueue_priority+0x75> 0010da8c <_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 ) { 10da8c: 55 push %ebp 10da8d: 89 e5 mov %esp,%ebp 10da8f: 57 push %edi 10da90: 56 push %esi 10da91: 53 push %ebx 10da92: 83 ec 24 sub $0x24,%esp 10da95: 8b 75 08 mov 0x8(%ebp),%esi 10da98: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10da9b: 8b 1d b8 74 12 00 mov 0x1274b8,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10daa1: ff 76 38 pushl 0x38(%esi) 10daa4: 53 push %ebx 10daa5: e8 96 03 00 00 call 10de40 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10daaa: 83 c4 10 add $0x10,%esp 10daad: 85 ff test %edi,%edi 10daaf: 75 33 jne 10dae4 <_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 ) 10dab1: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dab5: 74 64 je 10db1b <_Thread_queue_Enqueue_with_handler+0x8f> 10dab7: b8 58 10 11 00 mov $0x111058,%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 ); 10dabc: 51 push %ecx 10dabd: 8d 55 e4 lea -0x1c(%ebp),%edx 10dac0: 52 push %edx 10dac1: 53 push %ebx 10dac2: 56 push %esi 10dac3: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10dac5: 83 c4 10 add $0x10,%esp 10dac8: 83 f8 01 cmp $0x1,%eax 10dacb: 74 0e je 10dadb <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10dacd: 52 push %edx 10dace: ff 75 e4 pushl -0x1c(%ebp) 10dad1: 53 push %ebx 10dad2: 50 push %eax 10dad3: e8 48 f5 ff ff call 10d020 <_Thread_blocking_operation_Cancel> 10dad8: 83 c4 10 add $0x10,%esp } 10dadb: 8d 65 f4 lea -0xc(%ebp),%esp 10dade: 5b pop %ebx 10dadf: 5e pop %esi 10dae0: 5f pop %edi 10dae1: c9 leave 10dae2: c3 ret 10dae3: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10dae4: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dae7: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10daee: 8b 55 10 mov 0x10(%ebp),%edx 10daf1: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10daf4: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10daf7: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10dafe: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10db01: 83 ec 08 sub $0x8,%esp 10db04: 8d 43 48 lea 0x48(%ebx),%eax 10db07: 50 push %eax 10db08: 68 d8 74 12 00 push $0x1274d8 10db0d: e8 b6 09 00 00 call 10e4c8 <_Watchdog_Insert> 10db12: 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 ) 10db15: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10db19: 75 9c jne 10dab7 <_Thread_queue_Enqueue_with_handler+0x2b> 10db1b: b8 24 db 10 00 mov $0x10db24,%eax 10db20: eb 9a jmp 10dabc <_Thread_queue_Enqueue_with_handler+0x30> 0011109c <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 11109c: 55 push %ebp 11109d: 89 e5 mov %esp,%ebp 11109f: 83 ec 08 sub $0x8,%esp 1110a2: 8b 45 08 mov 0x8(%ebp),%eax 1110a5: 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 ) 1110a8: 83 78 34 01 cmpl $0x1,0x34(%eax) 1110ac: 74 0e je 1110bc <_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 ); 1110ae: 89 55 0c mov %edx,0xc(%ebp) 1110b1: 89 45 08 mov %eax,0x8(%ebp) } 1110b4: 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 ); 1110b5: e9 02 1c 00 00 jmp 112cbc <_Thread_queue_Extract_fifo> 1110ba: 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 ); 1110bc: 51 push %ecx 1110bd: 6a 00 push $0x0 1110bf: 52 push %edx 1110c0: 50 push %eax 1110c1: e8 06 00 00 00 call 1110cc <_Thread_queue_Extract_priority_helper> 1110c6: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 1110c9: c9 leave 1110ca: c3 ret 00112cbc <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 112cbc: 55 push %ebp 112cbd: 89 e5 mov %esp,%ebp 112cbf: 53 push %ebx 112cc0: 83 ec 04 sub $0x4,%esp 112cc3: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 112cc6: 9c pushf 112cc7: fa cli 112cc8: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 112cc9: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 112cd0: 74 2e je 112d00 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112cd2: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 112cd4: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 112cd7: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 112cda: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 112cdc: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 112ce3: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112ce7: 74 1f je 112d08 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 112ce9: 50 push %eax 112cea: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 112ceb: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 112cf2: 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 } 112cf5: 8b 5d fc mov -0x4(%ebp),%ebx 112cf8: c9 leave 112cf9: e9 ae a4 ff ff jmp 10d1ac <_Thread_Clear_state> 112cfe: 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 ); 112d00: 50 push %eax 112d01: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112d02: 8b 5d fc mov -0x4(%ebp),%ebx 112d05: c9 leave 112d06: c3 ret 112d07: 90 nop <== NOT EXECUTED 112d08: 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 ); 112d0f: 50 push %eax 112d10: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 112d11: 83 ec 0c sub $0xc,%esp 112d14: 8d 43 48 lea 0x48(%ebx),%eax 112d17: 50 push %eax 112d18: e8 e3 b8 ff ff call 10e600 <_Watchdog_Remove> 112d1d: 83 c4 10 add $0x10,%esp 112d20: eb c9 jmp 112ceb <_Thread_queue_Extract_fifo+0x2f> 001110cc <_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 ) { 1110cc: 55 push %ebp 1110cd: 89 e5 mov %esp,%ebp 1110cf: 57 push %edi 1110d0: 56 push %esi 1110d1: 53 push %ebx 1110d2: 83 ec 1c sub $0x1c,%esp 1110d5: 8b 5d 0c mov 0xc(%ebp),%ebx 1110d8: 8a 45 10 mov 0x10(%ebp),%al 1110db: 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 ); 1110de: 9c pushf 1110df: fa cli 1110e0: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1110e3: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 1110ea: 74 6c je 111158 <_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; 1110ec: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 1110ee: 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)); 1110f1: 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; 1110f4: 8d 73 3c lea 0x3c(%ebx),%esi 1110f7: 39 f0 cmp %esi,%eax 1110f9: 74 69 je 111164 <_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; 1110fb: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 1110fe: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 111100: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 111102: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 111105: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 111107: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 11110a: 8b 53 38 mov 0x38(%ebx),%edx 11110d: 3b 53 40 cmp 0x40(%ebx),%edx 111110: 74 11 je 111123 <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 111112: 8d 50 38 lea 0x38(%eax),%edx 111115: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 111118: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 11111b: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 11111e: 83 c0 3c add $0x3c,%eax 111121: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 111123: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 111127: 75 23 jne 11114c <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111129: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11112d: 74 3d je 11116c <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 11112f: ff 75 e4 pushl -0x1c(%ebp) 111132: 9d popf 111133: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 11113a: 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 } 11113d: 8d 65 f4 lea -0xc(%ebp),%esp 111140: 5b pop %ebx 111141: 5e pop %esi 111142: 5f pop %edi 111143: c9 leave 111144: e9 63 c0 ff ff jmp 10d1ac <_Thread_Clear_state> 111149: 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 ); 11114c: ff 75 e4 pushl -0x1c(%ebp) 11114f: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111150: 8d 65 f4 lea -0xc(%ebp),%esp 111153: 5b pop %ebx 111154: 5e pop %esi 111155: 5f pop %edi 111156: c9 leave 111157: 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 ); 111158: ff 75 e4 pushl -0x1c(%ebp) 11115b: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 11115c: 8d 65 f4 lea -0xc(%ebp),%esp 11115f: 5b pop %ebx 111160: 5e pop %esi 111161: 5f pop %edi 111162: c9 leave 111163: 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; 111164: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 111166: 89 4a 04 mov %ecx,0x4(%edx) 111169: eb b8 jmp 111123 <_Thread_queue_Extract_priority_helper+0x57> 11116b: 90 nop <== NOT EXECUTED 11116c: 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 ); 111173: ff 75 e4 pushl -0x1c(%ebp) 111176: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111177: 83 ec 0c sub $0xc,%esp 11117a: 8d 43 48 lea 0x48(%ebx),%eax 11117d: 50 push %eax 11117e: e8 7d d4 ff ff call 10e600 <_Watchdog_Remove> 111183: 83 c4 10 add $0x10,%esp 111186: eb ab jmp 111133 <_Thread_queue_Extract_priority_helper+0x67> 0010dc94 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10dc94: 55 push %ebp 10dc95: 89 e5 mov %esp,%ebp 10dc97: 83 ec 08 sub $0x8,%esp 10dc9a: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10dc9d: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10dca4: 75 06 jne 10dcac <_Thread_queue_Extract_with_proxy+0x18> 10dca6: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10dca8: c9 leave 10dca9: c3 ret 10dcaa: 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 ); 10dcac: 83 ec 08 sub $0x8,%esp 10dcaf: 50 push %eax 10dcb0: ff 70 44 pushl 0x44(%eax) 10dcb3: e8 e4 33 00 00 call 11109c <_Thread_queue_Extract> 10dcb8: b0 01 mov $0x1,%al return true; 10dcba: 83 c4 10 add $0x10,%esp } return false; } 10dcbd: c9 leave 10dcbe: c3 ret 0010fb38 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 10fb38: 55 push %ebp 10fb39: 89 e5 mov %esp,%ebp 10fb3b: 83 ec 08 sub $0x8,%esp 10fb3e: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10fb41: 83 78 34 01 cmpl $0x1,0x34(%eax) 10fb45: 74 0d je 10fb54 <_Thread_queue_First+0x1c> 10fb47: ba 34 30 11 00 mov $0x113034,%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 ); 10fb4c: 89 45 08 mov %eax,0x8(%ebp) } 10fb4f: 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 ); 10fb50: ff e2 jmp *%edx 10fb52: 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 ) 10fb54: ba 60 fb 10 00 mov $0x10fb60,%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 ); 10fb59: 89 45 08 mov %eax,0x8(%ebp) } 10fb5c: 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 ); 10fb5d: ff e2 jmp *%edx 00113034 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 113034: 55 push %ebp 113035: 89 e5 mov %esp,%ebp 113037: 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)); 11303a: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11303c: 83 c2 04 add $0x4,%edx 11303f: 39 d0 cmp %edx,%eax 113041: 74 05 je 113048 <_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; } 113043: c9 leave 113044: c3 ret 113045: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 113048: 31 c0 xor %eax,%eax 11304a: c9 leave 11304b: c3 ret 0010dcc0 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10dcc0: 55 push %ebp 10dcc1: 89 e5 mov %esp,%ebp 10dcc3: 56 push %esi 10dcc4: 53 push %ebx 10dcc5: 8b 5d 08 mov 0x8(%ebp),%ebx 10dcc8: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dccb: eb 06 jmp 10dcd3 <_Thread_queue_Flush+0x13> 10dccd: 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; 10dcd0: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dcd3: 83 ec 0c sub $0xc,%esp 10dcd6: 53 push %ebx 10dcd7: e8 94 fc ff ff call 10d970 <_Thread_queue_Dequeue> 10dcdc: 83 c4 10 add $0x10,%esp 10dcdf: 85 c0 test %eax,%eax 10dce1: 75 ed jne 10dcd0 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10dce3: 8d 65 f8 lea -0x8(%ebp),%esp 10dce6: 5b pop %ebx 10dce7: 5e pop %esi 10dce8: c9 leave 10dce9: c3 ret 0010dcec <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10dcec: 55 push %ebp 10dced: 89 e5 mov %esp,%ebp 10dcef: 8b 45 08 mov 0x8(%ebp),%eax 10dcf2: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10dcf5: 8b 4d 10 mov 0x10(%ebp),%ecx 10dcf8: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dcfb: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dcfe: 8b 4d 14 mov 0x14(%ebp),%ecx 10dd01: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dd04: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dd0b: 4a dec %edx 10dd0c: 74 12 je 10dd20 <_Thread_queue_Initialize+0x34> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dd0e: 8d 50 04 lea 0x4(%eax),%edx 10dd11: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10dd13: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dd1a: 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 ); } } 10dd1d: c9 leave 10dd1e: c3 ret 10dd1f: 90 nop <== NOT EXECUTED * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 10dd20: 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); 10dd23: 8d 50 04 lea 0x4(%eax),%edx 10dd26: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10dd28: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dd2f: 89 40 08 mov %eax,0x8(%eax) 10dd32: 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 ; 10dd35: 39 c8 cmp %ecx,%eax 10dd37: 75 ea jne 10dd23 <_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 ); } } 10dd39: c9 leave 10dd3a: c3 ret 00111188 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 111188: 55 push %ebp 111189: 89 e5 mov %esp,%ebp 11118b: 83 ec 08 sub $0x8,%esp 11118e: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 111191: 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 && 111194: 8b 4a 30 mov 0x30(%edx),%ecx 111197: 85 c9 test %ecx,%ecx 111199: 74 08 je 1111a3 <_Thread_queue_Process_timeout+0x1b> 11119b: 3b 05 b8 74 12 00 cmp 0x1274b8,%eax 1111a1: 74 19 je 1111bc <_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; 1111a3: 8b 52 3c mov 0x3c(%edx),%edx 1111a6: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 1111a9: 83 ec 08 sub $0x8,%esp 1111ac: 50 push %eax 1111ad: ff 70 44 pushl 0x44(%eax) 1111b0: e8 e7 fe ff ff call 11109c <_Thread_queue_Extract> 1111b5: 83 c4 10 add $0x10,%esp } } 1111b8: c9 leave 1111b9: c3 ret 1111ba: 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 ) { 1111bc: 83 f9 03 cmp $0x3,%ecx 1111bf: 74 f7 je 1111b8 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 1111c1: 8b 4a 3c mov 0x3c(%edx),%ecx 1111c4: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 1111c7: 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 ); } } 1111ce: c9 leave 1111cf: c3 ret 0010dd3c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10dd3c: 55 push %ebp 10dd3d: 89 e5 mov %esp,%ebp 10dd3f: 57 push %edi 10dd40: 56 push %esi 10dd41: 53 push %ebx 10dd42: 83 ec 1c sub $0x1c,%esp 10dd45: 8b 75 08 mov 0x8(%ebp),%esi 10dd48: 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 ) 10dd4b: 85 f6 test %esi,%esi 10dd4d: 74 06 je 10dd55 <_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 ) { 10dd4f: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dd53: 74 0b je 10dd60 <_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 ); } } 10dd55: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10dd58: 5b pop %ebx <== NOT EXECUTED 10dd59: 5e pop %esi <== NOT EXECUTED 10dd5a: 5f pop %edi <== NOT EXECUTED 10dd5b: c9 leave <== NOT EXECUTED 10dd5c: c3 ret <== NOT EXECUTED 10dd5d: 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 ); 10dd60: 9c pushf 10dd61: fa cli 10dd62: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10dd63: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10dd6a: 75 0c jne 10dd78 <_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 ); 10dd6c: 53 push %ebx 10dd6d: 9d popf } } 10dd6e: 8d 65 f4 lea -0xc(%ebp),%esp 10dd71: 5b pop %ebx 10dd72: 5e pop %esi 10dd73: 5f pop %edi 10dd74: c9 leave 10dd75: c3 ret 10dd76: 66 90 xchg %ax,%ax <== NOT EXECUTED 10dd78: 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 ); 10dd7f: 50 push %eax 10dd80: 6a 01 push $0x1 10dd82: 57 push %edi 10dd83: 56 push %esi 10dd84: e8 43 33 00 00 call 1110cc <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10dd89: 83 c4 0c add $0xc,%esp 10dd8c: 8d 45 e4 lea -0x1c(%ebp),%eax 10dd8f: 50 push %eax 10dd90: 57 push %edi 10dd91: 56 push %esi 10dd92: e8 8d fd ff ff call 10db24 <_Thread_queue_Enqueue_priority> 10dd97: 83 c4 10 add $0x10,%esp 10dd9a: eb d0 jmp 10dd6c <_Thread_queue_Requeue+0x30> 0010dd9c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10dd9c: 55 push %ebp 10dd9d: 89 e5 mov %esp,%ebp 10dd9f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10dda2: 8d 45 f4 lea -0xc(%ebp),%eax 10dda5: 50 push %eax 10dda6: ff 75 08 pushl 0x8(%ebp) 10dda9: e8 ca f7 ff ff call 10d578 <_Thread_Get> switch ( location ) { 10ddae: 83 c4 10 add $0x10,%esp 10ddb1: 8b 55 f4 mov -0xc(%ebp),%edx 10ddb4: 85 d2 test %edx,%edx 10ddb6: 75 17 jne 10ddcf <_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 ); 10ddb8: 83 ec 0c sub $0xc,%esp 10ddbb: 50 push %eax 10ddbc: e8 c7 33 00 00 call 111188 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10ddc1: a1 f8 73 12 00 mov 0x1273f8,%eax 10ddc6: 48 dec %eax 10ddc7: a3 f8 73 12 00 mov %eax,0x1273f8 10ddcc: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10ddcf: c9 leave 10ddd0: c3 ret 00119184 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 119184: 55 push %ebp 119185: 89 e5 mov %esp,%ebp 119187: 57 push %edi 119188: 56 push %esi 119189: 53 push %ebx 11918a: 83 ec 4c sub $0x4c,%esp 11918d: 8b 5d 08 mov 0x8(%ebp),%ebx 119190: 8d 45 e0 lea -0x20(%ebp),%eax 119193: 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); 119196: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 119199: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 1191a0: 8d 4d dc lea -0x24(%ebp),%ecx 1191a3: 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; 1191a6: 8d 7d d0 lea -0x30(%ebp),%edi 1191a9: 8d 45 d4 lea -0x2c(%ebp),%eax 1191ac: 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); 1191af: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 1191b2: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 1191b9: 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 ); 1191bc: 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 ); 1191bf: 8d 4b 68 lea 0x68(%ebx),%ecx 1191c2: 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 ); 1191c5: 8d 43 08 lea 0x8(%ebx),%eax 1191c8: 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 ); 1191cb: 8d 53 40 lea 0x40(%ebx),%edx 1191ce: 89 55 c0 mov %edx,-0x40(%ebp) 1191d1: 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; 1191d4: 8d 4d dc lea -0x24(%ebp),%ecx 1191d7: 89 4b 78 mov %ecx,0x78(%ebx) 1191da: 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; 1191dc: a1 a4 22 14 00 mov 0x1422a4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1191e1: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 1191e4: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1191e7: 51 push %ecx 1191e8: 57 push %edi 1191e9: 29 d0 sub %edx,%eax 1191eb: 50 push %eax 1191ec: 56 push %esi 1191ed: e8 a6 3c 00 00 call 11ce98 <_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(); 1191f2: a1 cc 21 14 00 mov 0x1421cc,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1191f7: 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 ) { 1191fa: 83 c4 10 add $0x10,%esp 1191fd: 39 d0 cmp %edx,%eax 1191ff: 77 63 ja 119264 <_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 ) { 119201: 72 7d jb 119280 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 119203: 89 43 74 mov %eax,0x74(%ebx) 119206: 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 ); 119208: 8b 43 78 mov 0x78(%ebx),%eax 11920b: 83 ec 0c sub $0xc,%esp 11920e: 50 push %eax 11920f: e8 84 08 00 00 call 119a98 <_Chain_Get> if ( timer == NULL ) { 119214: 83 c4 10 add $0x10,%esp 119217: 85 c0 test %eax,%eax 119219: 74 35 je 119250 <_Timer_server_Body+0xcc><== NEVER TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11921b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 11921e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 119221: 74 19 je 11923c <_Timer_server_Body+0xb8><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 119223: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 119226: 75 e0 jne 119208 <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 119228: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11922b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 11922e: 50 push %eax <== NOT EXECUTED 11922f: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 119232: e8 f9 3c 00 00 call 11cf30 <_Watchdog_Insert> <== NOT EXECUTED 119237: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11923a: eb cc jmp 119208 <_Timer_server_Body+0x84><== NOT EXECUTED Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11923c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11923f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 119242: 50 push %eax <== NOT EXECUTED 119243: 56 push %esi <== NOT EXECUTED 119244: e8 e7 3c 00 00 call 11cf30 <_Watchdog_Insert> <== NOT EXECUTED 119249: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11924c: eb ba jmp 119208 <_Timer_server_Body+0x84><== NOT EXECUTED 11924e: 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 ); 119250: 9c pushf 119251: fa cli 119252: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 119253: 8b 55 b4 mov -0x4c(%ebp),%edx 119256: 3b 55 dc cmp -0x24(%ebp),%edx 119259: 74 41 je 11929c <_Timer_server_Body+0x118><== NEVER TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 11925b: 50 push %eax <== NOT EXECUTED 11925c: 9d popf <== NOT EXECUTED 11925d: e9 7a ff ff ff jmp 1191dc <_Timer_server_Body+0x58><== NOT EXECUTED 119262: 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 ); 119264: 51 push %ecx 119265: 57 push %edi 119266: 89 c1 mov %eax,%ecx 119268: 29 d1 sub %edx,%ecx 11926a: 51 push %ecx 11926b: ff 75 c4 pushl -0x3c(%ebp) 11926e: 89 45 b8 mov %eax,-0x48(%ebp) 119271: e8 22 3c 00 00 call 11ce98 <_Watchdog_Adjust_to_chain> 119276: 83 c4 10 add $0x10,%esp 119279: 8b 45 b8 mov -0x48(%ebp),%eax 11927c: eb 85 jmp 119203 <_Timer_server_Body+0x7f> 11927e: 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 ); 119280: 51 push %ecx 119281: 29 c2 sub %eax,%edx 119283: 52 push %edx 119284: 6a 01 push $0x1 119286: ff 75 c4 pushl -0x3c(%ebp) 119289: 89 45 b8 mov %eax,-0x48(%ebp) 11928c: e8 8f 3b 00 00 call 11ce20 <_Watchdog_Adjust> 119291: 83 c4 10 add $0x10,%esp 119294: 8b 45 b8 mov -0x48(%ebp),%eax 119297: e9 67 ff ff ff jmp 119203 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 11929c: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 1192a3: 50 push %eax 1192a4: 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 ) ) { 1192a5: 8b 4d b0 mov -0x50(%ebp),%ecx 1192a8: 3b 4d d0 cmp -0x30(%ebp),%ecx 1192ab: 75 23 jne 1192d0 <_Timer_server_Body+0x14c> 1192ad: eb 33 jmp 1192e2 <_Timer_server_Body+0x15e> 1192af: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 1192b0: 8b 10 mov (%eax),%edx the_chain->first = new_first; 1192b2: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 1192b5: 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; 1192b8: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 1192bf: 51 push %ecx 1192c0: 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 ); 1192c1: 83 ec 08 sub $0x8,%esp 1192c4: ff 70 24 pushl 0x24(%eax) 1192c7: ff 70 20 pushl 0x20(%eax) 1192ca: ff 50 1c call *0x1c(%eax) } 1192cd: 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 ); 1192d0: 9c pushf 1192d1: fa cli 1192d2: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1192d3: 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)) 1192d6: 39 45 b0 cmp %eax,-0x50(%ebp) 1192d9: 75 d5 jne 1192b0 <_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 ); 1192db: 51 push %ecx 1192dc: 9d popf 1192dd: e9 f2 fe ff ff jmp 1191d4 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 1192e2: c6 43 7c 00 movb $0x0,0x7c(%ebx) 1192e6: a1 38 21 14 00 mov 0x142138,%eax 1192eb: 40 inc %eax 1192ec: a3 38 21 14 00 mov %eax,0x142138 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 1192f1: 83 ec 08 sub $0x8,%esp 1192f4: 6a 08 push $0x8 1192f6: ff 33 pushl (%ebx) 1192f8: e8 33 33 00 00 call 11c630 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1192fd: 89 d8 mov %ebx,%eax 1192ff: e8 e0 fd ff ff call 1190e4 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 119304: 89 d8 mov %ebx,%eax 119306: e8 29 fe ff ff call 119134 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 11930b: e8 ec 28 00 00 call 11bbfc <_Thread_Enable_dispatch> ts->active = true; 119310: 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 ); 119314: 58 pop %eax 119315: ff 75 bc pushl -0x44(%ebp) 119318: e8 4b 3d 00 00 call 11d068 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11931d: 59 pop %ecx 11931e: ff 75 c0 pushl -0x40(%ebp) 119321: e8 42 3d 00 00 call 11d068 <_Watchdog_Remove> 119326: 83 c4 10 add $0x10,%esp 119329: e9 a6 fe ff ff jmp 1191d4 <_Timer_server_Body+0x50> 001190e4 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 1190e4: 55 push %ebp 1190e5: 89 e5 mov %esp,%ebp 1190e7: 56 push %esi 1190e8: 53 push %ebx 1190e9: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1190eb: 8d 70 08 lea 0x8(%eax),%esi 1190ee: 83 ec 0c sub $0xc,%esp 1190f1: 56 push %esi 1190f2: e8 71 3f 00 00 call 11d068 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 1190f7: 9c pushf 1190f8: fa cli 1190f9: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1190fa: 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; 1190fd: 8d 53 34 lea 0x34(%ebx),%edx 119100: 83 c4 10 add $0x10,%esp 119103: 39 d0 cmp %edx,%eax 119105: 74 21 je 119128 <_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; 119107: 8b 40 10 mov 0x10(%eax),%eax _ISR_Enable( level ); 11910a: 51 push %ecx 11910b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11910c: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11910f: 83 ec 08 sub $0x8,%esp 119112: 56 push %esi 119113: 68 18 22 14 00 push $0x142218 119118: e8 13 3e 00 00 call 11cf30 <_Watchdog_Insert> 11911d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 119120: 8d 65 f8 lea -0x8(%ebp),%esp 119123: 5b pop %ebx 119124: 5e pop %esi 119125: c9 leave 119126: c3 ret 119127: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 119128: 51 push %ecx 119129: 9d popf } } 11912a: 8d 65 f8 lea -0x8(%ebp),%esp 11912d: 5b pop %ebx 11912e: 5e pop %esi 11912f: c9 leave 119130: c3 ret 00119134 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 119134: 55 push %ebp 119135: 89 e5 mov %esp,%ebp 119137: 56 push %esi 119138: 53 push %ebx 119139: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11913b: 8d 70 40 lea 0x40(%eax),%esi 11913e: 83 ec 0c sub $0xc,%esp 119141: 56 push %esi 119142: e8 21 3f 00 00 call 11d068 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 119147: 9c pushf 119148: fa cli 119149: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11914a: 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; 11914d: 8d 53 6c lea 0x6c(%ebx),%edx 119150: 83 c4 10 add $0x10,%esp 119153: 39 d0 cmp %edx,%eax 119155: 74 21 je 119178 <_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; 119157: 8b 40 10 mov 0x10(%eax),%eax _ISR_Enable( level ); 11915a: 51 push %ecx 11915b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11915c: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 11915f: 83 ec 08 sub $0x8,%esp 119162: 56 push %esi 119163: 68 0c 22 14 00 push $0x14220c 119168: e8 c3 3d 00 00 call 11cf30 <_Watchdog_Insert> 11916d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 119170: 8d 65 f8 lea -0x8(%ebp),%esp 119173: 5b pop %ebx 119174: 5e pop %esi 119175: c9 leave 119176: c3 ret 119177: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 119178: 51 push %ecx 119179: 9d popf } } 11917a: 8d 65 f8 lea -0x8(%ebp),%esp 11917d: 5b pop %ebx 11917e: 5e pop %esi 11917f: c9 leave 119180: c3 ret 00119330 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 119330: 55 push %ebp 119331: 89 e5 mov %esp,%ebp 119333: 57 push %edi 119334: 56 push %esi 119335: 53 push %ebx 119336: 83 ec 2c sub $0x2c,%esp 119339: 8b 5d 08 mov 0x8(%ebp),%ebx 11933c: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 11933f: 8b 53 78 mov 0x78(%ebx),%edx 119342: 85 d2 test %edx,%edx 119344: 74 16 je 11935c <_Timer_server_Schedule_operation_method+0x2c><== NEVER TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 119346: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 119349: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 11934c: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 11934f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 119352: 5b pop %ebx <== NOT EXECUTED 119353: 5e pop %esi <== NOT EXECUTED 119354: 5f pop %edi <== NOT EXECUTED 119355: c9 leave <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 119356: e9 19 07 00 00 jmp 119a74 <_Chain_Append> <== NOT EXECUTED 11935b: 90 nop <== NOT EXECUTED 11935c: 8b 15 38 21 14 00 mov 0x142138,%edx 119362: 42 inc %edx 119363: 89 15 38 21 14 00 mov %edx,0x142138 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 119369: 8b 50 38 mov 0x38(%eax),%edx 11936c: 83 fa 01 cmp $0x1,%edx 11936f: 74 77 je 1193e8 <_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 ) { 119371: 83 fa 03 cmp $0x3,%edx 119374: 74 0e je 119384 <_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 ); } } 119376: 8d 65 f4 lea -0xc(%ebp),%esp 119379: 5b pop %ebx 11937a: 5e pop %esi 11937b: 5f pop %edi 11937c: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 11937d: e9 7a 28 00 00 jmp 11bbfc <_Thread_Enable_dispatch> 119382: 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 ); 119384: 9c pushf 119385: fa cli 119386: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119389: 8b 0d cc 21 14 00 mov 0x1421cc,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 11938f: 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)); 119392: 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; 119395: 8d 7b 6c lea 0x6c(%ebx),%edi 119398: 39 fa cmp %edi,%edx 11939a: 74 22 je 1193be <_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; 11939c: 8b 7a 10 mov 0x10(%edx),%edi 11939f: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 1193a2: 39 f1 cmp %esi,%ecx 1193a4: 0f 86 9e 00 00 00 jbe 119448 <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 1193aa: 89 cf mov %ecx,%edi 1193ac: 29 f7 sub %esi,%edi 1193ae: 89 fe mov %edi,%esi if (delta_interval > delta) { 1193b0: 39 7d d4 cmp %edi,-0x2c(%ebp) 1193b3: 0f 87 9b 00 00 00 ja 119454 <_Timer_server_Schedule_operation_method+0x124><== NEVER TAKEN 1193b9: 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; 1193bb: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 1193be: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 1193c1: ff 75 e4 pushl -0x1c(%ebp) 1193c4: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1193c5: 83 ec 08 sub $0x8,%esp 1193c8: 83 c0 10 add $0x10,%eax 1193cb: 50 push %eax 1193cc: 8d 43 68 lea 0x68(%ebx),%eax 1193cf: 50 push %eax 1193d0: e8 5b 3b 00 00 call 11cf30 <_Watchdog_Insert> if ( !ts->active ) { 1193d5: 8a 43 7c mov 0x7c(%ebx),%al 1193d8: 83 c4 10 add $0x10,%esp 1193db: 84 c0 test %al,%al 1193dd: 75 97 jne 119376 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 1193df: 89 d8 mov %ebx,%eax 1193e1: e8 4e fd ff ff call 119134 <_Timer_server_Reset_tod_system_watchdog> 1193e6: eb 8e jmp 119376 <_Timer_server_Schedule_operation_method+0x46> 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 ); 1193e8: 9c pushf 1193e9: fa cli 1193ea: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 1193ed: 8b 0d a4 22 14 00 mov 0x1422a4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 1193f3: 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)); 1193f6: 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; 1193f9: 8d 7b 34 lea 0x34(%ebx),%edi 1193fc: 39 fa cmp %edi,%edx 1193fe: 74 12 je 119412 <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119400: 89 cf mov %ecx,%edi 119402: 29 f7 sub %esi,%edi 119404: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 119406: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 119409: 39 fe cmp %edi,%esi 11940b: 72 37 jb 119444 <_Timer_server_Schedule_operation_method+0x114> 11940d: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 11940f: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119412: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119415: ff 75 e4 pushl -0x1c(%ebp) 119418: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 119419: 83 ec 08 sub $0x8,%esp 11941c: 83 c0 10 add $0x10,%eax 11941f: 50 push %eax 119420: 8d 43 30 lea 0x30(%ebx),%eax 119423: 50 push %eax 119424: e8 07 3b 00 00 call 11cf30 <_Watchdog_Insert> if ( !ts->active ) { 119429: 8a 43 7c mov 0x7c(%ebx),%al 11942c: 83 c4 10 add $0x10,%esp 11942f: 84 c0 test %al,%al 119431: 0f 85 3f ff ff ff jne 119376 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119437: 89 d8 mov %ebx,%eax 119439: e8 a6 fc ff ff call 1190e4 <_Timer_server_Reset_interval_system_watchdog> 11943e: e9 33 ff ff ff jmp 119376 <_Timer_server_Schedule_operation_method+0x46> 119443: 90 nop <== NOT EXECUTED */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 119444: 29 f7 sub %esi,%edi 119446: eb c7 jmp 11940f <_Timer_server_Schedule_operation_method+0xdf> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 119448: 8b 7d d4 mov -0x2c(%ebp),%edi 11944b: 01 f7 add %esi,%edi delta_interval += delta; 11944d: 29 cf sub %ecx,%edi 11944f: e9 67 ff ff ff jmp 1193bb <_Timer_server_Schedule_operation_method+0x8b> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 119454: 8b 7d d4 mov -0x2c(%ebp),%edi 119457: 29 f7 sub %esi,%edi 119459: e9 5d ff ff ff jmp 1193bb <_Timer_server_Schedule_operation_method+0x8b> 0010fb20 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10fb20: 55 push %ebp 10fb21: 89 e5 mov %esp,%ebp 10fb23: 57 push %edi 10fb24: 56 push %esi 10fb25: 53 push %ebx 10fb26: 83 ec 2c sub $0x2c,%esp 10fb29: 8b 45 08 mov 0x8(%ebp),%eax 10fb2c: 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; 10fb2f: 8b 10 mov (%eax),%edx 10fb31: 89 55 e0 mov %edx,-0x20(%ebp) left += lhs->tv_nsec; 10fb34: 8b 78 04 mov 0x4(%eax),%edi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fb37: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10fb3c: 8b 03 mov (%ebx),%eax 10fb3e: f7 e9 imul %ecx 10fb40: 89 45 d0 mov %eax,-0x30(%ebp) 10fb43: 89 55 d4 mov %edx,-0x2c(%ebp) right += rhs->tv_nsec; 10fb46: 8b 5b 04 mov 0x4(%ebx),%ebx 10fb49: 89 de mov %ebx,%esi 10fb4b: c1 fe 1f sar $0x1f,%esi 10fb4e: 01 5d d0 add %ebx,-0x30(%ebp) 10fb51: 11 75 d4 adc %esi,-0x2c(%ebp) if ( right == 0 ) { 10fb54: 8b 55 d4 mov -0x2c(%ebp),%edx 10fb57: 0b 55 d0 or -0x30(%ebp),%edx 10fb5a: 74 7c je 10fbd8 <_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; 10fb5c: 8b 45 e0 mov -0x20(%ebp),%eax 10fb5f: f7 e9 imul %ecx 10fb61: 89 45 e0 mov %eax,-0x20(%ebp) 10fb64: 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; 10fb67: 89 fb mov %edi,%ebx 10fb69: c1 fb 1f sar $0x1f,%ebx 10fb6c: 01 7d e0 add %edi,-0x20(%ebp) 10fb6f: 11 5d e4 adc %ebx,-0x1c(%ebp) 10fb72: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10fb79: b9 a0 86 01 00 mov $0x186a0,%ecx 10fb7e: 8b 45 e0 mov -0x20(%ebp),%eax 10fb81: f7 e1 mul %ecx 10fb83: 89 45 e0 mov %eax,-0x20(%ebp) 10fb86: 01 da add %ebx,%edx 10fb88: 89 55 e4 mov %edx,-0x1c(%ebp) 10fb8b: ff 75 d4 pushl -0x2c(%ebp) 10fb8e: ff 75 d0 pushl -0x30(%ebp) 10fb91: ff 75 e4 pushl -0x1c(%ebp) 10fb94: ff 75 e0 pushl -0x20(%ebp) 10fb97: e8 e0 0c 01 00 call 12087c <__udivdi3> 10fb9c: 83 c4 10 add $0x10,%esp 10fb9f: 89 c3 mov %eax,%ebx 10fba1: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fba3: 6a 00 push $0x0 10fba5: 68 e8 03 00 00 push $0x3e8 10fbaa: 52 push %edx 10fbab: 50 push %eax 10fbac: e8 cb 0c 01 00 call 12087c <__udivdi3> 10fbb1: 83 c4 10 add $0x10,%esp 10fbb4: 8b 55 10 mov 0x10(%ebp),%edx 10fbb7: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fbb9: 6a 00 push $0x0 10fbbb: 68 e8 03 00 00 push $0x3e8 10fbc0: 56 push %esi 10fbc1: 53 push %ebx 10fbc2: e8 c5 0d 01 00 call 12098c <__umoddi3> 10fbc7: 83 c4 10 add $0x10,%esp 10fbca: 8b 55 14 mov 0x14(%ebp),%edx 10fbcd: 89 02 mov %eax,(%edx) } 10fbcf: 8d 65 f4 lea -0xc(%ebp),%esp 10fbd2: 5b pop %ebx 10fbd3: 5e pop %esi 10fbd4: 5f pop %edi 10fbd5: c9 leave 10fbd6: c3 ret 10fbd7: 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; 10fbd8: 8b 45 10 mov 0x10(%ebp),%eax 10fbdb: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fbe1: 8b 55 14 mov 0x14(%ebp),%edx 10fbe4: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fbea: 8d 65 f4 lea -0xc(%ebp),%esp 10fbed: 5b pop %ebx 10fbee: 5e pop %esi 10fbef: 5f pop %edi 10fbf0: c9 leave 10fbf1: c3 ret 00129264 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 129264: 55 push %ebp 129265: 89 e5 mov %esp,%ebp 129267: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 12926a: 85 c0 test %eax,%eax 12926c: 74 1a je 129288 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 12926e: 8b 10 mov (%eax),%edx 129270: 85 d2 test %edx,%edx 129272: 78 14 js 129288 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 129274: 8b 40 04 mov 0x4(%eax),%eax 129277: 85 c0 test %eax,%eax 129279: 78 0d js 129288 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 12927b: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 129280: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 129283: c9 leave 129284: c3 ret 129285: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include #include #include bool _Timespec_Is_valid( 129288: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 12928a: c9 leave 12928b: c3 ret 001113b4 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 1113b4: 55 push %ebp 1113b5: 89 e5 mov %esp,%ebp 1113b7: 56 push %esi 1113b8: 53 push %ebx 1113b9: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 1113bc: 8b 33 mov (%ebx),%esi 1113be: 85 f6 test %esi,%esi 1113c0: 75 07 jne 1113c9 <_Timespec_To_ticks+0x15> 1113c2: 8b 43 04 mov 0x4(%ebx),%eax 1113c5: 85 c0 test %eax,%eax 1113c7: 74 37 je 111400 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 1113c9: e8 da 17 00 00 call 112ba8 1113ce: 89 c1 mov %eax,%ecx 1113d0: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 1113d3: a1 2c 32 12 00 mov 0x12322c,%eax 1113d8: 8d 04 80 lea (%eax,%eax,4),%eax 1113db: 8d 04 80 lea (%eax,%eax,4),%eax 1113de: 8d 34 80 lea (%eax,%eax,4),%esi 1113e1: c1 e6 03 shl $0x3,%esi 1113e4: 8b 43 04 mov 0x4(%ebx),%eax 1113e7: 31 d2 xor %edx,%edx 1113e9: f7 f6 div %esi if (ticks) 1113eb: 01 c8 add %ecx,%eax 1113ed: 74 05 je 1113f4 <_Timespec_To_ticks+0x40> return ticks; return 1; } 1113ef: 5b pop %ebx 1113f0: 5e pop %esi 1113f1: c9 leave 1113f2: c3 ret 1113f3: 90 nop <== NOT EXECUTED ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) 1113f4: b8 01 00 00 00 mov $0x1,%eax return ticks; return 1; } 1113f9: 5b pop %ebx 1113fa: 5e pop %esi 1113fb: c9 leave 1113fc: c3 ret 1113fd: 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) ) 111400: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 111402: 5b pop %ebx 111403: 5e pop %esi 111404: c9 leave 111405: c3 ret 0010e370 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e370: 55 push %ebp 10e371: 89 e5 mov %esp,%ebp 10e373: 57 push %edi 10e374: 56 push %esi 10e375: 53 push %ebx 10e376: 83 ec 1c sub $0x1c,%esp 10e379: 8b 75 08 mov 0x8(%ebp),%esi 10e37c: 8b 7d 10 mov 0x10(%ebp),%edi 10e37f: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e382: 8b 1d 54 76 12 00 mov 0x127654,%ebx 10e388: 81 fb 4c 76 12 00 cmp $0x12764c,%ebx 10e38e: 74 25 je 10e3b5 <_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 ); 10e390: 0f b6 c0 movzbl %al,%eax 10e393: 89 45 e4 mov %eax,-0x1c(%ebp) 10e396: 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 ) 10e398: 8b 43 30 mov 0x30(%ebx),%eax 10e39b: 85 c0 test %eax,%eax 10e39d: 74 0b je 10e3aa <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e39f: 52 push %edx 10e3a0: 57 push %edi 10e3a1: ff 75 e4 pushl -0x1c(%ebp) 10e3a4: 56 push %esi 10e3a5: ff d0 call *%eax 10e3a7: 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 ) { 10e3aa: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e3ad: 81 fb 4c 76 12 00 cmp $0x12764c,%ebx 10e3b3: 75 e3 jne 10e398 <_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 ); } } 10e3b5: 8d 65 f4 lea -0xc(%ebp),%esp 10e3b8: 5b pop %ebx 10e3b9: 5e pop %esi 10e3ba: 5f pop %edi 10e3bb: c9 leave 10e3bc: c3 ret 0010e234 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e234: 55 push %ebp 10e235: 89 e5 mov %esp,%ebp 10e237: 57 push %edi 10e238: 56 push %esi 10e239: 53 push %ebx 10e23a: 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; 10e23d: a1 58 32 12 00 mov 0x123258,%eax 10e242: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e245: 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); 10e24b: c7 05 4c 76 12 00 50 movl $0x127650,0x12764c 10e252: 76 12 00 the_chain->permanent_null = NULL; 10e255: c7 05 50 76 12 00 00 movl $0x0,0x127650 10e25c: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e25f: c7 05 54 76 12 00 4c movl $0x12764c,0x127654 10e266: 76 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e269: c7 05 fc 73 12 00 00 movl $0x127400,0x1273fc 10e270: 74 12 00 the_chain->permanent_null = NULL; 10e273: c7 05 00 74 12 00 00 movl $0x0,0x127400 10e27a: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e27d: c7 05 04 74 12 00 fc movl $0x1273fc,0x127404 10e284: 73 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e287: 85 f6 test %esi,%esi 10e289: 74 64 je 10e2ef <_User_extensions_Handler_initialization+0xbb> extension = (User_extensions_Control *) 10e28b: 89 c2 mov %eax,%edx 10e28d: 8d 04 40 lea (%eax,%eax,2),%eax 10e290: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e293: c1 e1 02 shl $0x2,%ecx 10e296: 83 ec 0c sub $0xc,%esp 10e299: 51 push %ecx 10e29a: 89 4d d8 mov %ecx,-0x28(%ebp) 10e29d: e8 36 04 00 00 call 10e6d8 <_Workspace_Allocate_or_fatal_error> 10e2a2: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e2a4: 31 c0 xor %eax,%eax 10e2a6: 8b 4d d8 mov -0x28(%ebp),%ecx 10e2a9: 89 df mov %ebx,%edi 10e2ab: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e2ad: 83 c4 10 add $0x10,%esp 10e2b0: 8b 45 dc mov -0x24(%ebp),%eax 10e2b3: 85 c0 test %eax,%eax 10e2b5: 74 38 je 10e2ef <_User_extensions_Handler_initialization+0xbb><== ALWAYS TAKEN 10e2b7: 89 75 e4 mov %esi,-0x1c(%ebp) 10e2ba: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e2c1: 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; 10e2c4: 8d 7b 14 lea 0x14(%ebx),%edi 10e2c7: 8b 75 e4 mov -0x1c(%ebp),%esi 10e2ca: b9 08 00 00 00 mov $0x8,%ecx 10e2cf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e2d1: 83 ec 0c sub $0xc,%esp 10e2d4: 53 push %ebx 10e2d5: e8 2e 31 00 00 call 111408 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e2da: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e2dd: ff 45 e0 incl -0x20(%ebp) 10e2e0: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e2e4: 83 c4 10 add $0x10,%esp 10e2e7: 8b 45 e0 mov -0x20(%ebp),%eax 10e2ea: 39 45 dc cmp %eax,-0x24(%ebp) 10e2ed: 77 d5 ja 10e2c4 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e2ef: 8d 65 f4 lea -0xc(%ebp),%esp 10e2f2: 5b pop %ebx 10e2f3: 5e pop %esi 10e2f4: 5f pop %edi 10e2f5: c9 leave 10e2f6: c3 ret 001130a0 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 1130a0: 55 push %ebp 1130a1: 89 e5 mov %esp,%ebp 1130a3: 53 push %ebx 1130a4: 83 ec 10 sub $0x10,%esp 1130a7: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 1130aa: 53 push %ebx 1130ab: e8 04 4f 00 00 call 117fb4 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 1130b0: 83 c4 10 add $0x10,%esp 1130b3: 8b 43 24 mov 0x24(%ebx),%eax 1130b6: 85 c0 test %eax,%eax 1130b8: 74 12 je 1130cc <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 1130ba: 83 c3 08 add $0x8,%ebx 1130bd: 89 5d 08 mov %ebx,0x8(%ebp) } 1130c0: 8b 5d fc mov -0x4(%ebp),%ebx 1130c3: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 1130c4: e9 eb 4e 00 00 jmp 117fb4 <_Chain_Extract> 1130c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 1130cc: 8b 5d fc mov -0x4(%ebp),%ebx 1130cf: c9 leave 1130d0: c3 ret 0010e2f8 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 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; for ( the_node = _User_extensions_List.first ; 10e300: 8b 1d 4c 76 12 00 mov 0x12764c,%ebx 10e306: 81 fb 50 76 12 00 cmp $0x127650,%ebx 10e30c: 74 1c je 10e32a <_User_extensions_Thread_begin+0x32><== 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_begin != NULL ) 10e310: 8b 43 28 mov 0x28(%ebx),%eax 10e313: 85 c0 test %eax,%eax 10e315: 74 09 je 10e320 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e317: 83 ec 0c sub $0xc,%esp 10e31a: 56 push %esi 10e31b: ff d0 call *%eax 10e31d: 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 ) { 10e320: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e322: 81 fb 50 76 12 00 cmp $0x127650,%ebx 10e328: 75 e6 jne 10e310 <_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 ); } } 10e32a: 8d 65 f8 lea -0x8(%ebp),%esp 10e32d: 5b pop %ebx 10e32e: 5e pop %esi 10e32f: c9 leave 10e330: c3 ret 0010e3c0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e3c0: 55 push %ebp 10e3c1: 89 e5 mov %esp,%ebp 10e3c3: 56 push %esi 10e3c4: 53 push %ebx 10e3c5: 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 ; 10e3c8: 8b 1d 4c 76 12 00 mov 0x12764c,%ebx 10e3ce: 81 fb 50 76 12 00 cmp $0x127650,%ebx 10e3d4: 74 26 je 10e3fc <_User_extensions_Thread_create+0x3c><== ALWAYS TAKEN 10e3d6: 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 ) { 10e3d8: 8b 43 14 mov 0x14(%ebx),%eax 10e3db: 85 c0 test %eax,%eax 10e3dd: 74 13 je 10e3f2 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e3df: 83 ec 08 sub $0x8,%esp 10e3e2: 56 push %esi 10e3e3: ff 35 b8 74 12 00 pushl 0x1274b8 10e3e9: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e3eb: 83 c4 10 add $0x10,%esp 10e3ee: 84 c0 test %al,%al 10e3f0: 74 0c je 10e3fe <_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 ) { 10e3f2: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e3f4: 81 fb 50 76 12 00 cmp $0x127650,%ebx 10e3fa: 75 dc jne 10e3d8 <_User_extensions_Thread_create+0x18> 10e3fc: b0 01 mov $0x1,%al return false; } } return true; } 10e3fe: 8d 65 f8 lea -0x8(%ebp),%esp 10e401: 5b pop %ebx 10e402: 5e pop %esi 10e403: c9 leave 10e404: c3 ret 0010e408 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e408: 55 push %ebp 10e409: 89 e5 mov %esp,%ebp 10e40b: 56 push %esi 10e40c: 53 push %ebx 10e40d: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e410: 8b 1d 54 76 12 00 mov 0x127654,%ebx 10e416: 81 fb 4c 76 12 00 cmp $0x12764c,%ebx 10e41c: 74 23 je 10e441 <_User_extensions_Thread_delete+0x39><== ALWAYS TAKEN 10e41e: 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 ) 10e420: 8b 43 20 mov 0x20(%ebx),%eax 10e423: 85 c0 test %eax,%eax 10e425: 74 0f je 10e436 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e427: 83 ec 08 sub $0x8,%esp 10e42a: 56 push %esi 10e42b: ff 35 b8 74 12 00 pushl 0x1274b8 10e431: ff d0 call *%eax 10e433: 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 ) { 10e436: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e439: 81 fb 4c 76 12 00 cmp $0x12764c,%ebx 10e43f: 75 df jne 10e420 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e441: 8d 65 f8 lea -0x8(%ebp),%esp 10e444: 5b pop %ebx 10e445: 5e pop %esi 10e446: c9 leave 10e447: c3 ret 0010e334 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e334: 55 push %ebp 10e335: 89 e5 mov %esp,%ebp 10e337: 56 push %esi 10e338: 53 push %ebx 10e339: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e33c: 8b 1d 54 76 12 00 mov 0x127654,%ebx 10e342: 81 fb 4c 76 12 00 cmp $0x12764c,%ebx 10e348: 74 1d je 10e367 <_User_extensions_Thread_exitted+0x33><== ALWAYS TAKEN 10e34a: 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 ) 10e34c: 8b 43 2c mov 0x2c(%ebx),%eax 10e34f: 85 c0 test %eax,%eax 10e351: 74 09 je 10e35c <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e353: 83 ec 0c sub $0xc,%esp 10e356: 56 push %esi 10e357: ff d0 call *%eax 10e359: 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 ) { 10e35c: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e35f: 81 fb 4c 76 12 00 cmp $0x12764c,%ebx 10e365: 75 e5 jne 10e34c <_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 ); } } 10e367: 8d 65 f8 lea -0x8(%ebp),%esp 10e36a: 5b pop %ebx 10e36b: 5e pop %esi 10e36c: c9 leave 10e36d: c3 ret 0010effc <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10effc: 55 push %ebp 10effd: 89 e5 mov %esp,%ebp 10efff: 56 push %esi 10f000: 53 push %ebx 10f001: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f004: 8b 1d cc 95 12 00 mov 0x1295cc,%ebx 10f00a: 81 fb d0 95 12 00 cmp $0x1295d0,%ebx 10f010: 74 22 je 10f034 <_User_extensions_Thread_restart+0x38><== ALWAYS TAKEN 10f012: 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 ) 10f014: 8b 43 1c mov 0x1c(%ebx),%eax 10f017: 85 c0 test %eax,%eax 10f019: 74 0f je 10f02a <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f01b: 83 ec 08 sub $0x8,%esp 10f01e: 56 push %esi 10f01f: ff 35 38 94 12 00 pushl 0x129438 10f025: ff d0 call *%eax 10f027: 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 ) { 10f02a: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f02c: 81 fb d0 95 12 00 cmp $0x1295d0,%ebx 10f032: 75 e0 jne 10f014 <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f034: 8d 65 f8 lea -0x8(%ebp),%esp 10f037: 5b pop %ebx 10f038: 5e pop %esi 10f039: c9 leave 10f03a: c3 ret 0010e448 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e448: 55 push %ebp 10e449: 89 e5 mov %esp,%ebp 10e44b: 56 push %esi 10e44c: 53 push %ebx 10e44d: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e450: 8b 1d 4c 76 12 00 mov 0x12764c,%ebx 10e456: 81 fb 50 76 12 00 cmp $0x127650,%ebx 10e45c: 74 22 je 10e480 <_User_extensions_Thread_start+0x38><== ALWAYS TAKEN 10e45e: 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 ) 10e460: 8b 43 18 mov 0x18(%ebx),%eax 10e463: 85 c0 test %eax,%eax 10e465: 74 0f je 10e476 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e467: 83 ec 08 sub $0x8,%esp 10e46a: 56 push %esi 10e46b: ff 35 b8 74 12 00 pushl 0x1274b8 10e471: ff d0 call *%eax 10e473: 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 ) { 10e476: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e478: 81 fb 50 76 12 00 cmp $0x127650,%ebx 10e47e: 75 e0 jne 10e460 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e480: 8d 65 f8 lea -0x8(%ebp),%esp 10e483: 5b pop %ebx 10e484: 5e pop %esi 10e485: c9 leave 10e486: c3 ret 0010e488 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e488: 55 push %ebp 10e489: 89 e5 mov %esp,%ebp 10e48b: 57 push %edi 10e48c: 56 push %esi 10e48d: 53 push %ebx 10e48e: 83 ec 0c sub $0xc,%esp 10e491: 8b 7d 08 mov 0x8(%ebp),%edi 10e494: 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 ; 10e497: 8b 1d fc 73 12 00 mov 0x1273fc,%ebx 10e49d: 81 fb 00 74 12 00 cmp $0x127400,%ebx 10e4a3: 74 18 je 10e4bd <_User_extensions_Thread_switch+0x35><== ALWAYS TAKEN 10e4a5: 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 ); 10e4a8: 83 ec 08 sub $0x8,%esp 10e4ab: 56 push %esi 10e4ac: 57 push %edi 10e4ad: 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 ) { 10e4b0: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e4b2: 83 c4 10 add $0x10,%esp 10e4b5: 81 fb 00 74 12 00 cmp $0x127400,%ebx 10e4bb: 75 eb jne 10e4a8 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e4bd: 8d 65 f4 lea -0xc(%ebp),%esp 10e4c0: 5b pop %ebx 10e4c1: 5e pop %esi 10e4c2: 5f pop %edi 10e4c3: c9 leave 10e4c4: c3 ret 0010ff00 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10ff00: 55 push %ebp 10ff01: 89 e5 mov %esp,%ebp 10ff03: 57 push %edi 10ff04: 56 push %esi 10ff05: 53 push %ebx 10ff06: 83 ec 1c sub $0x1c,%esp 10ff09: 8b 75 08 mov 0x8(%ebp),%esi 10ff0c: 8b 4d 0c mov 0xc(%ebp),%ecx 10ff0f: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10ff12: 9c pushf 10ff13: fa cli 10ff14: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ff15: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ff17: 8d 7e 04 lea 0x4(%esi),%edi 10ff1a: 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 ) ) { 10ff1d: 39 fa cmp %edi,%edx 10ff1f: 74 3d je 10ff5e <_Watchdog_Adjust+0x5e> switch ( direction ) { 10ff21: 85 c9 test %ecx,%ecx 10ff23: 75 43 jne 10ff68 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10ff25: 85 db test %ebx,%ebx 10ff27: 74 35 je 10ff5e <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10ff29: 8b 7a 10 mov 0x10(%edx),%edi 10ff2c: 39 fb cmp %edi,%ebx 10ff2e: 73 0f jae 10ff3f <_Watchdog_Adjust+0x3f> <== NEVER TAKEN 10ff30: eb 3e jmp 10ff70 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10ff32: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10ff34: 29 fb sub %edi,%ebx 10ff36: 74 26 je 10ff5e <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10ff38: 8b 7a 10 mov 0x10(%edx),%edi 10ff3b: 39 df cmp %ebx,%edi 10ff3d: 77 31 ja 10ff70 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10ff3f: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10ff46: 50 push %eax 10ff47: 9d popf _Watchdog_Tickle( header ); 10ff48: 83 ec 0c sub $0xc,%esp 10ff4b: 56 push %esi 10ff4c: e8 cb 01 00 00 call 11011c <_Watchdog_Tickle> _ISR_Disable( level ); 10ff51: 9c pushf 10ff52: fa cli 10ff53: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ff54: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 10ff56: 83 c4 10 add $0x10,%esp 10ff59: 39 55 e4 cmp %edx,-0x1c(%ebp) 10ff5c: 75 d6 jne 10ff34 <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10ff5e: 50 push %eax 10ff5f: 9d popf } 10ff60: 8d 65 f4 lea -0xc(%ebp),%esp 10ff63: 5b pop %ebx 10ff64: 5e pop %esi 10ff65: 5f pop %edi 10ff66: c9 leave 10ff67: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10ff68: 49 dec %ecx 10ff69: 75 f3 jne 10ff5e <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10ff6b: 01 5a 10 add %ebx,0x10(%edx) break; 10ff6e: eb ee jmp 10ff5e <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10ff70: 29 df sub %ebx,%edi 10ff72: 89 7a 10 mov %edi,0x10(%edx) break; 10ff75: eb e7 jmp 10ff5e <_Watchdog_Adjust+0x5e> 0011ce98 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11ce98: 55 push %ebp 11ce99: 89 e5 mov %esp,%ebp 11ce9b: 57 push %edi 11ce9c: 56 push %esi 11ce9d: 53 push %ebx 11ce9e: 83 ec 0c sub $0xc,%esp 11cea1: 8b 75 08 mov 0x8(%ebp),%esi 11cea4: 8b 55 0c mov 0xc(%ebp),%edx 11cea7: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11ceaa: 85 d2 test %edx,%edx 11ceac: 74 63 je 11cf11 <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11ceae: 9c pushf 11ceaf: fa cli 11ceb0: 8f 45 ec popl -0x14(%ebp) 11ceb3: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11ceb5: 8d 4e 04 lea 0x4(%esi),%ecx 11ceb8: 89 4d f0 mov %ecx,-0x10(%ebp) 11cebb: 8d 7b 04 lea 0x4(%ebx),%edi 11cebe: 89 55 e8 mov %edx,-0x18(%ebp) 11cec1: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11cec4: 39 45 f0 cmp %eax,-0x10(%ebp) 11cec7: 74 44 je 11cf0d <_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 ) { 11cec9: 8b 50 10 mov 0x10(%eax),%edx 11cecc: 3b 55 e8 cmp -0x18(%ebp),%edx 11cecf: 77 57 ja 11cf28 <_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; 11ced1: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11ced4: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11cedb: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11cedc: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11cede: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11cee1: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11cee4: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11cee6: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11cee8: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11ceeb: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11ceee: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11cef0: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11cef3: ff 75 ec pushl -0x14(%ebp) 11cef6: 9d popf 11cef7: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11cef8: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11cefa: 39 45 f0 cmp %eax,-0x10(%ebp) 11cefd: 74 1d je 11cf1c <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11ceff: 8b 50 10 mov 0x10(%eax),%edx 11cf02: 85 d2 test %edx,%edx 11cf04: 74 d6 je 11cedc <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11cf06: 8b 4d e8 mov -0x18(%ebp),%ecx 11cf09: 85 c9 test %ecx,%ecx 11cf0b: 75 b7 jne 11cec4 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11cf0d: ff 75 ec pushl -0x14(%ebp) 11cf10: 9d popf } 11cf11: 83 c4 0c add $0xc,%esp 11cf14: 5b pop %ebx 11cf15: 5e pop %esi 11cf16: 5f pop %edi 11cf17: c9 leave 11cf18: c3 ret 11cf19: 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; 11cf1c: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11cf1f: 8b 4d e8 mov -0x18(%ebp),%ecx 11cf22: 85 c9 test %ecx,%ecx 11cf24: 75 9e jne 11cec4 <_Watchdog_Adjust_to_chain+0x2c> 11cf26: eb e5 jmp 11cf0d <_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 ) { first->delta_interval -= units; 11cf28: 2b 55 e8 sub -0x18(%ebp),%edx 11cf2b: 89 50 10 mov %edx,0x10(%eax) break; 11cf2e: eb dd jmp 11cf0d <_Watchdog_Adjust_to_chain+0x75> 0010e4c8 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e4c8: 55 push %ebp 10e4c9: 89 e5 mov %esp,%ebp 10e4cb: 57 push %edi 10e4cc: 56 push %esi 10e4cd: 53 push %ebx 10e4ce: 83 ec 04 sub $0x4,%esp 10e4d1: 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; 10e4d4: 8b 3d 94 74 12 00 mov 0x127494,%edi _ISR_Disable( level ); 10e4da: 9c pushf 10e4db: fa cli 10e4dc: 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 ) { 10e4df: 8b 43 08 mov 0x8(%ebx),%eax 10e4e2: 85 c0 test %eax,%eax 10e4e4: 0f 85 9e 00 00 00 jne 10e588 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e4ea: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e4f1: a1 60 75 12 00 mov 0x127560,%eax 10e4f6: 40 inc %eax 10e4f7: a3 60 75 12 00 mov %eax,0x127560 restart: delta_interval = the_watchdog->initial; 10e4fc: 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 ; 10e4ff: 8b 4d 08 mov 0x8(%ebp),%ecx 10e502: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e504: 85 c0 test %eax,%eax 10e506: 74 5d je 10e565 <_Watchdog_Insert+0x9d> 10e508: 8b 32 mov (%edx),%esi 10e50a: 85 f6 test %esi,%esi 10e50c: 74 57 je 10e565 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e50e: 8b 4a 10 mov 0x10(%edx),%ecx 10e511: 39 c8 cmp %ecx,%eax 10e513: 73 22 jae 10e537 <_Watchdog_Insert+0x6f> 10e515: eb 49 jmp 10e560 <_Watchdog_Insert+0x98> 10e517: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e518: 8b 35 b4 74 12 00 mov 0x1274b4,%esi 10e51e: 39 f7 cmp %esi,%edi 10e520: 72 72 jb 10e594 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e522: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10e524: 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 ) ) 10e526: 85 c0 test %eax,%eax 10e528: 74 3b je 10e565 <_Watchdog_Insert+0x9d> 10e52a: 8b 0a mov (%edx),%ecx 10e52c: 85 c9 test %ecx,%ecx 10e52e: 74 35 je 10e565 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e530: 8b 4a 10 mov 0x10(%edx),%ecx 10e533: 39 c1 cmp %eax,%ecx 10e535: 77 29 ja 10e560 <_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 ); 10e537: ff 75 f0 pushl -0x10(%ebp) 10e53a: 9d popf 10e53b: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e53c: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e540: 74 d6 je 10e518 <_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; 10e542: 89 3d b4 74 12 00 mov %edi,0x1274b4 _Watchdog_Sync_count--; 10e548: a1 60 75 12 00 mov 0x127560,%eax 10e54d: 48 dec %eax 10e54e: a3 60 75 12 00 mov %eax,0x127560 _ISR_Enable( level ); 10e553: ff 75 f0 pushl -0x10(%ebp) 10e556: 9d popf } 10e557: 58 pop %eax 10e558: 5b pop %ebx 10e559: 5e pop %esi 10e55a: 5f pop %edi 10e55b: c9 leave 10e55c: c3 ret 10e55d: 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; 10e560: 29 c1 sub %eax,%ecx 10e562: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e565: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e56c: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e56f: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e572: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e575: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e577: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e579: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e57b: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e57e: a1 64 75 12 00 mov 0x127564,%eax 10e583: 89 43 14 mov %eax,0x14(%ebx) 10e586: eb ba jmp 10e542 <_Watchdog_Insert+0x7a> * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10e588: ff 75 f0 pushl -0x10(%ebp) 10e58b: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e58c: 58 pop %eax 10e58d: 5b pop %ebx 10e58e: 5e pop %esi 10e58f: 5f pop %edi 10e590: c9 leave 10e591: c3 ret 10e592: 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; 10e594: 89 3d b4 74 12 00 mov %edi,0x1274b4 goto restart; 10e59a: e9 5d ff ff ff jmp 10e4fc <_Watchdog_Insert+0x34> 0010e600 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e600: 55 push %ebp 10e601: 89 e5 mov %esp,%ebp 10e603: 56 push %esi 10e604: 53 push %ebx 10e605: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e608: 9c pushf 10e609: fa cli 10e60a: 59 pop %ecx previous_state = the_watchdog->state; 10e60b: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e60e: 83 f8 01 cmp $0x1,%eax 10e611: 74 4d je 10e660 <_Watchdog_Remove+0x60> 10e613: 73 0f jae 10e624 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e615: 8b 1d 64 75 12 00 mov 0x127564,%ebx 10e61b: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e61e: 51 push %ecx 10e61f: 9d popf return( previous_state ); } 10e620: 5b pop %ebx 10e621: 5e pop %esi 10e622: c9 leave 10e623: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e624: 83 f8 03 cmp $0x3,%eax 10e627: 77 ec ja 10e615 <_Watchdog_Remove+0x15> <== ALWAYS TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e629: 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 ); 10e630: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e632: 8b 33 mov (%ebx),%esi 10e634: 85 f6 test %esi,%esi 10e636: 74 06 je 10e63e <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e638: 8b 72 10 mov 0x10(%edx),%esi 10e63b: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e63e: 8b 35 60 75 12 00 mov 0x127560,%esi 10e644: 85 f6 test %esi,%esi 10e646: 74 0c je 10e654 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e648: 8b 35 94 74 12 00 mov 0x127494,%esi 10e64e: 89 35 b4 74 12 00 mov %esi,0x1274b4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e654: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e657: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e65a: 89 1e mov %ebx,(%esi) 10e65c: eb b7 jmp 10e615 <_Watchdog_Remove+0x15> 10e65e: 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; 10e660: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e667: eb ac jmp 10e615 <_Watchdog_Remove+0x15> 0010fae4 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10fae4: 55 push %ebp 10fae5: 89 e5 mov %esp,%ebp 10fae7: 57 push %edi 10fae8: 56 push %esi 10fae9: 53 push %ebx 10faea: 83 ec 2c sub $0x2c,%esp 10faed: 8b 55 08 mov 0x8(%ebp),%edx 10faf0: 8b 45 0c mov 0xc(%ebp),%eax printk( 10faf3: 8b 78 24 mov 0x24(%eax),%edi 10faf6: 8b 70 20 mov 0x20(%eax),%esi 10faf9: 8b 58 1c mov 0x1c(%eax),%ebx 10fafc: 8b 48 0c mov 0xc(%eax),%ecx 10faff: 89 4d d4 mov %ecx,-0x2c(%ebp) 10fb02: 8b 48 10 mov 0x10(%eax),%ecx 10fb05: 89 4d e0 mov %ecx,-0x20(%ebp) 10fb08: 85 d2 test %edx,%edx 10fb0a: 74 2c je 10fb38 <_Watchdog_Report+0x54> 10fb0c: b9 63 29 12 00 mov $0x122963,%ecx 10fb11: 83 ec 0c sub $0xc,%esp 10fb14: 57 push %edi 10fb15: 56 push %esi 10fb16: 53 push %ebx 10fb17: 50 push %eax 10fb18: ff 75 d4 pushl -0x2c(%ebp) 10fb1b: ff 75 e0 pushl -0x20(%ebp) 10fb1e: 51 push %ecx 10fb1f: 52 push %edx 10fb20: 68 e6 32 12 00 push $0x1232e6 10fb25: e8 5a 9e ff ff call 109984 10fb2a: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fb2d: 8d 65 f4 lea -0xc(%ebp),%esp 10fb30: 5b pop %ebx 10fb31: 5e pop %esi 10fb32: 5f pop %edi 10fb33: c9 leave 10fb34: c3 ret 10fb35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fb38: b9 45 31 12 00 mov $0x123145,%ecx 10fb3d: 89 ca mov %ecx,%edx 10fb3f: eb d0 jmp 10fb11 <_Watchdog_Report+0x2d> 0010fa74 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10fa74: 55 push %ebp 10fa75: 89 e5 mov %esp,%ebp 10fa77: 57 push %edi 10fa78: 56 push %esi 10fa79: 53 push %ebx 10fa7a: 83 ec 20 sub $0x20,%esp 10fa7d: 8b 7d 08 mov 0x8(%ebp),%edi 10fa80: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10fa83: 9c pushf 10fa84: fa cli 10fa85: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10fa88: 56 push %esi 10fa89: 57 push %edi 10fa8a: 68 b0 32 12 00 push $0x1232b0 10fa8f: e8 f0 9e ff ff call 109984 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fa94: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fa96: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10fa99: 83 c4 10 add $0x10,%esp 10fa9c: 39 f3 cmp %esi,%ebx 10fa9e: 74 31 je 10fad1 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10faa0: 83 ec 08 sub $0x8,%esp 10faa3: 53 push %ebx 10faa4: 6a 00 push $0x0 10faa6: e8 39 00 00 00 call 10fae4 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 10faab: 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 ; 10faad: 83 c4 10 add $0x10,%esp 10fab0: 39 f3 cmp %esi,%ebx 10fab2: 75 ec jne 10faa0 <_Watchdog_Report_chain+0x2c><== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10fab4: 83 ec 08 sub $0x8,%esp 10fab7: 57 push %edi 10fab8: 68 c7 32 12 00 push $0x1232c7 10fabd: e8 c2 9e ff ff call 109984 10fac2: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fac5: ff 75 e4 pushl -0x1c(%ebp) 10fac8: 9d popf } 10fac9: 8d 65 f4 lea -0xc(%ebp),%esp 10facc: 5b pop %ebx 10facd: 5e pop %esi 10face: 5f pop %edi 10facf: c9 leave 10fad0: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10fad1: 83 ec 0c sub $0xc,%esp 10fad4: 68 d6 32 12 00 push $0x1232d6 10fad9: e8 a6 9e ff ff call 109984 10fade: 83 c4 10 add $0x10,%esp 10fae1: eb e2 jmp 10fac5 <_Watchdog_Report_chain+0x51> 0010e66c <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e66c: 55 push %ebp 10e66d: 89 e5 mov %esp,%ebp 10e66f: 57 push %edi 10e670: 56 push %esi 10e671: 53 push %ebx 10e672: 83 ec 1c sub $0x1c,%esp 10e675: 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 ); 10e678: 9c pushf 10e679: fa cli 10e67a: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e67b: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e67d: 8d 47 04 lea 0x4(%edi),%eax 10e680: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10e683: 39 c3 cmp %eax,%ebx 10e685: 74 11 je 10e698 <_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) { 10e687: 8b 43 10 mov 0x10(%ebx),%eax 10e68a: 85 c0 test %eax,%eax 10e68c: 74 34 je 10e6c2 <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e68e: 48 dec %eax 10e68f: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e692: 85 c0 test %eax,%eax 10e694: 74 2c je 10e6c2 <_Watchdog_Tickle+0x56> 10e696: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e698: 56 push %esi 10e699: 9d popf } 10e69a: 8d 65 f4 lea -0xc(%ebp),%esp 10e69d: 5b pop %ebx 10e69e: 5e pop %esi 10e69f: 5f pop %edi 10e6a0: c9 leave 10e6a1: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e6a2: 83 ec 08 sub $0x8,%esp 10e6a5: ff 73 24 pushl 0x24(%ebx) 10e6a8: ff 73 20 pushl 0x20(%ebx) 10e6ab: ff 53 1c call *0x1c(%ebx) 10e6ae: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e6b1: 9c pushf 10e6b2: fa cli 10e6b3: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e6b4: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e6b6: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10e6b9: 74 dd je 10e698 <_Watchdog_Tickle+0x2c> 10e6bb: 8b 43 10 mov 0x10(%ebx),%eax 10e6be: 85 c0 test %eax,%eax 10e6c0: 75 d6 jne 10e698 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e6c2: 83 ec 0c sub $0xc,%esp 10e6c5: 53 push %ebx 10e6c6: e8 35 ff ff ff call 10e600 <_Watchdog_Remove> _ISR_Enable( level ); 10e6cb: 56 push %esi 10e6cc: 9d popf switch( watchdog_state ) { 10e6cd: 83 c4 10 add $0x10,%esp 10e6d0: 83 f8 02 cmp $0x2,%eax 10e6d3: 75 dc jne 10e6b1 <_Watchdog_Tickle+0x45> <== ALWAYS TAKEN 10e6d5: eb cb jmp 10e6a2 <_Watchdog_Tickle+0x36> 0010e738 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e738: 55 push %ebp 10e739: 89 e5 mov %esp,%ebp 10e73b: 57 push %edi 10e73c: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e73d: 8b 1d 20 32 12 00 mov 0x123220,%ebx uintptr_t size = Configuration.work_space_size; 10e743: 8b 15 24 32 12 00 mov 0x123224,%edx if ( Configuration.do_zero_of_workspace ) 10e749: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 10e750: 75 1e jne 10e770 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e752: 6a 04 push $0x4 10e754: 52 push %edx 10e755: 53 push %ebx 10e756: 68 20 74 12 00 push $0x127420 10e75b: e8 14 dd ff ff call 10c474 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e760: 83 c4 10 add $0x10,%esp 10e763: 85 c0 test %eax,%eax 10e765: 74 13 je 10e77a <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e767: 8d 65 f8 lea -0x8(%ebp),%esp 10e76a: 5b pop %ebx 10e76b: 5f pop %edi 10e76c: c9 leave 10e76d: c3 ret 10e76e: 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 ); 10e770: 31 c0 xor %eax,%eax 10e772: 89 df mov %ebx,%edi 10e774: 89 d1 mov %edx,%ecx 10e776: f3 aa rep stos %al,%es:(%edi) 10e778: eb d8 jmp 10e752 <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e77a: 52 push %edx 10e77b: 6a 03 push $0x3 10e77d: 6a 01 push $0x1 10e77f: 6a 00 push $0x0 10e781: e8 12 e0 ff ff call 10c798 <_Internal_error_Occurred> 0011eb70 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11eb70: 55 push %ebp 11eb71: 89 e5 mov %esp,%ebp 11eb73: 83 ec 08 sub $0x8,%esp 11eb76: e8 b2 06 00 00 call 11f22d <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 11eb7b: e8 88 ff ff ff call 11eb08 rtems_shutdown_executive(status); 11eb80: 83 ec 0c sub $0xc,%esp 11eb83: ff 75 08 pushl 0x8(%ebp) 11eb86: e8 fd 00 00 00 call 11ec88 11eb8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11eb8e: eb fe jmp 11eb8e <_exit+0x1e> <== NOT EXECUTED 0013ce84 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 13ce84: 55 push %ebp <== NOT EXECUTED 13ce85: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13ce87: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 13ce8a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 13ce8d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 13ce90: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 13ce93: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 13ce96: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 13ce99: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 13ce9c: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 13ce9d: e9 4a fe ff ff jmp 13ccec <== NOT EXECUTED 001122b0 <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 1122b0: 55 push %ebp <== NOT EXECUTED 1122b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 1122b3: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1122b8: c9 leave <== NOT EXECUTED 1122b9: c3 ret <== NOT EXECUTED 0010fbd4 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 10fbd4: 55 push %ebp <== NOT EXECUTED 10fbd5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10fbd7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 10fbda: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10fbdb: e9 90 ff ff ff jmp 10fb70 <== NOT EXECUTED 0012c018 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 12c018: 55 push %ebp <== NOT EXECUTED 12c019: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c01b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c01e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 12c021: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12c024: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 12c027: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12c02a: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 12c02b: e9 e8 fd ff ff jmp 12be18 <== NOT EXECUTED 0012c234 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 12c234: 55 push %ebp <== NOT EXECUTED 12c235: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c237: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c23a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 12c23d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12c240: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 12c243: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12c246: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 12c247: e9 18 ff ff ff jmp 12c164 <== NOT EXECUTED 0011ec50 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11ec50: 55 push %ebp <== NOT EXECUTED 11ec51: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11ec53: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11ec56: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11ec59: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11ec5c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11ec5f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11ec62: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11ec63: e9 48 00 00 00 jmp 11ecb0 <== NOT EXECUTED 001587a4 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 1587a4: 55 push %ebp <== NOT EXECUTED 1587a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1587a7: 57 push %edi <== NOT EXECUTED 1587a8: 56 push %esi <== NOT EXECUTED 1587a9: 53 push %ebx <== NOT EXECUTED 1587aa: 83 ec 68 sub $0x68,%esp <== NOT EXECUTED 1587ad: 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 ); 1587b0: 52 push %edx <== NOT EXECUTED 1587b1: 89 55 9c mov %edx,-0x64(%ebp) <== NOT EXECUTED 1587b4: e8 6b 34 fb ff call 10bc24 <== NOT EXECUTED 1587b9: 89 c3 mov %eax,%ebx <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 1587bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1587be: 85 c0 test %eax,%eax <== NOT EXECUTED 1587c0: 8b 55 9c mov -0x64(%ebp),%edx <== NOT EXECUTED 1587c3: 0f 85 fb 02 00 00 jne 158ac4 <_rename_r+0x320> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 1587c9: 8a 02 mov (%edx),%al <== NOT EXECUTED 1587cb: 3c 2f cmp $0x2f,%al <== NOT EXECUTED 1587cd: 74 0c je 1587db <_rename_r+0x37> <== NOT EXECUTED 1587cf: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 1587d1: 74 08 je 1587db <_rename_r+0x37> <== NOT EXECUTED 1587d3: 84 c0 test %al,%al <== NOT EXECUTED 1587d5: 0f 85 75 01 00 00 jne 158950 <_rename_r+0x1ac> <== NOT EXECUTED 1587db: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED 1587de: 89 45 a4 mov %eax,-0x5c(%ebp) <== NOT EXECUTED 1587e1: 8b 35 84 92 16 00 mov 0x169284,%esi <== NOT EXECUTED 1587e7: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 1587ea: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 1587ef: 89 c7 mov %eax,%edi <== NOT EXECUTED 1587f1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 1587f3: 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; 1587f7: 8d 7d d0 lea -0x30(%ebp),%edi <== NOT EXECUTED 1587fa: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 1587ff: 8b 75 a4 mov -0x5c(%ebp),%esi <== NOT EXECUTED 158802: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED name = old + old_parent_pathlen; 158804: 8d 1c 1a lea (%edx,%ebx,1),%ebx <== NOT EXECUTED 158807: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 15880a: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 15880f: 89 f1 mov %esi,%ecx <== NOT EXECUTED 158811: 89 df mov %ebx,%edi <== NOT EXECUTED 158813: 31 c0 xor %eax,%eax <== NOT EXECUTED 158815: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 158817: f7 d1 not %ecx <== NOT EXECUTED 158819: 49 dec %ecx <== NOT EXECUTED 15881a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 15881d: 51 push %ecx <== NOT EXECUTED 15881e: 53 push %ebx <== NOT EXECUTED 15881f: e8 c4 33 fb ff call 10bbe8 <== NOT EXECUTED 158824: 01 c3 add %eax,%ebx <== NOT EXECUTED 158826: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 158829: 89 f1 mov %esi,%ecx <== NOT EXECUTED 15882b: 89 df mov %ebx,%edi <== NOT EXECUTED 15882d: 31 c0 xor %eax,%eax <== NOT EXECUTED 15882f: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 158831: 89 ce mov %ecx,%esi <== NOT EXECUTED 158833: f7 d6 not %esi <== NOT EXECUTED 158835: 4e dec %esi <== NOT EXECUTED 158836: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED 15883d: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED 158840: 50 push %eax <== NOT EXECUTED 158841: 6a 00 push $0x0 <== NOT EXECUTED 158843: 56 push %esi <== NOT EXECUTED 158844: 53 push %ebx <== NOT EXECUTED 158845: e8 2a 34 fb ff call 10bc74 <== NOT EXECUTED 15884a: 89 c3 mov %eax,%ebx <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 15884c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 15884f: 85 c0 test %eax,%eax <== NOT EXECUTED 158851: 0f 85 89 01 00 00 jne 1589e0 <_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 ); 158857: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 15885a: 8a 02 mov (%edx),%al <== NOT EXECUTED 15885c: 3c 2f cmp $0x2f,%al <== NOT EXECUTED 15885e: 74 24 je 158884 <_rename_r+0xe0> <== NOT EXECUTED 158860: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 158862: 74 20 je 158884 <_rename_r+0xe0> <== NOT EXECUTED 158864: 84 c0 test %al,%al <== NOT EXECUTED 158866: 74 1c je 158884 <_rename_r+0xe0> <== NOT EXECUTED 158868: 8d 5d a8 lea -0x58(%ebp),%ebx <== NOT EXECUTED 15886b: 8b 35 84 92 16 00 mov 0x169284,%esi <== NOT EXECUTED 158871: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 158874: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 158879: 89 df mov %ebx,%edi <== NOT EXECUTED 15887b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 15887d: 31 d2 xor %edx,%edx <== NOT EXECUTED 15887f: eb 1d jmp 15889e <_rename_r+0xfa> <== NOT EXECUTED 158881: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 158884: 8d 5d a8 lea -0x58(%ebp),%ebx <== NOT EXECUTED 158887: 8b 35 84 92 16 00 mov 0x169284,%esi <== NOT EXECUTED 15888d: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 158890: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 158895: 89 df mov %ebx,%edi <== NOT EXECUTED 158897: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 158899: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 15889e: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 1588a1: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED 1588a4: 85 c0 test %eax,%eax <== NOT EXECUTED 1588a6: 0f 84 c8 01 00 00 je 158a74 <_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 ); 1588ac: 51 push %ecx <== NOT EXECUTED 1588ad: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 1588b0: 51 push %ecx <== NOT EXECUTED 1588b1: 53 push %ebx <== NOT EXECUTED 1588b2: 03 55 10 add 0x10(%ebp),%edx <== NOT EXECUTED 1588b5: 52 push %edx <== NOT EXECUTED 1588b6: ff d0 call *%eax <== NOT EXECUTED 1588b8: 89 c6 mov %eax,%esi <== NOT EXECUTED if ( result != 0 ) { 1588ba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1588bd: 85 c0 test %eax,%eax <== NOT EXECUTED 1588bf: 0f 85 4b 01 00 00 jne 158a10 <_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 ) { 1588c5: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 1588c8: 3b 45 b8 cmp -0x48(%ebp),%eax <== NOT EXECUTED 1588cb: 0f 85 a3 00 00 00 jne 158974 <_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 ) { 1588d1: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED 1588d4: 8b 42 40 mov 0x40(%edx),%eax <== NOT EXECUTED 1588d7: 85 c0 test %eax,%eax <== NOT EXECUTED 1588d9: 0f 84 15 02 00 00 je 158af4 <_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 ); 1588df: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 1588e2: 53 push %ebx <== NOT EXECUTED 1588e3: 8d 4d d0 lea -0x30(%ebp),%ecx <== NOT EXECUTED 1588e6: 51 push %ecx <== NOT EXECUTED 1588e7: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 1588ea: ff d0 call *%eax <== NOT EXECUTED 1588ec: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 1588ee: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 1588f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1588f4: 85 c0 test %eax,%eax <== NOT EXECUTED 1588f6: 74 10 je 158908 <_rename_r+0x164> <== NOT EXECUTED 1588f8: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1588fb: 85 c0 test %eax,%eax <== NOT EXECUTED 1588fd: 74 09 je 158908 <_rename_r+0x164> <== NOT EXECUTED 1588ff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158902: 53 push %ebx <== NOT EXECUTED 158903: ff d0 call *%eax <== NOT EXECUTED 158905: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 158908: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 15890c: 75 26 jne 158934 <_rename_r+0x190> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 15890e: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 158911: 85 c0 test %eax,%eax <== NOT EXECUTED 158913: 74 13 je 158928 <_rename_r+0x184> <== NOT EXECUTED 158915: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158918: 85 c0 test %eax,%eax <== NOT EXECUTED 15891a: 74 0c je 158928 <_rename_r+0x184> <== NOT EXECUTED 15891c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 15891f: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 158922: 52 push %edx <== NOT EXECUTED 158923: ff d0 call *%eax <== NOT EXECUTED 158925: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return result; } 158928: 89 f0 mov %esi,%eax <== NOT EXECUTED 15892a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 15892d: 5b pop %ebx <== NOT EXECUTED 15892e: 5e pop %esi <== NOT EXECUTED 15892f: 5f pop %edi <== NOT EXECUTED 158930: c9 leave <== NOT EXECUTED 158931: c3 ret <== NOT EXECUTED 158932: 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 ); 158934: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 158937: 85 c0 test %eax,%eax <== NOT EXECUTED 158939: 74 d3 je 15890e <_rename_r+0x16a> <== NOT EXECUTED 15893b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 15893e: 85 c0 test %eax,%eax <== NOT EXECUTED 158940: 74 cc je 15890e <_rename_r+0x16a> <== NOT EXECUTED 158942: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158945: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 158948: ff d0 call *%eax <== NOT EXECUTED 15894a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 15894d: eb bf jmp 15890e <_rename_r+0x16a> <== NOT EXECUTED 15894f: 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 ); 158950: 8d 4d bc lea -0x44(%ebp),%ecx <== NOT EXECUTED 158953: 89 4d a4 mov %ecx,-0x5c(%ebp) <== NOT EXECUTED 158956: 8b 35 84 92 16 00 mov 0x169284,%esi <== NOT EXECUTED 15895c: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 15895f: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 158964: 8b 7d a4 mov -0x5c(%ebp),%edi <== NOT EXECUTED 158967: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 158969: c6 45 a3 00 movb $0x0,-0x5d(%ebp) <== NOT EXECUTED 15896d: e9 85 fe ff ff jmp 1587f7 <_rename_r+0x53> <== NOT EXECUTED 158972: 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 ); 158974: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 158977: 85 c0 test %eax,%eax <== NOT EXECUTED 158979: 74 10 je 15898b <_rename_r+0x1e7> <== NOT EXECUTED 15897b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 15897e: 85 c0 test %eax,%eax <== NOT EXECUTED 158980: 74 09 je 15898b <_rename_r+0x1e7> <== NOT EXECUTED 158982: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158985: 53 push %ebx <== NOT EXECUTED 158986: ff d0 call *%eax <== NOT EXECUTED 158988: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 15898b: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 15898f: 74 19 je 1589aa <_rename_r+0x206> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 158991: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 158994: 85 c0 test %eax,%eax <== NOT EXECUTED 158996: 74 12 je 1589aa <_rename_r+0x206> <== NOT EXECUTED 158998: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 15899b: 85 c0 test %eax,%eax <== NOT EXECUTED 15899d: 74 0b je 1589aa <_rename_r+0x206> <== NOT EXECUTED 15899f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1589a2: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 1589a5: ff d0 call *%eax <== NOT EXECUTED 1589a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 1589aa: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1589ad: 85 c0 test %eax,%eax <== NOT EXECUTED 1589af: 74 13 je 1589c4 <_rename_r+0x220> <== NOT EXECUTED 1589b1: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1589b4: 85 c0 test %eax,%eax <== NOT EXECUTED 1589b6: 74 0c je 1589c4 <_rename_r+0x220> <== NOT EXECUTED 1589b8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1589bb: 8d 4d d0 lea -0x30(%ebp),%ecx <== NOT EXECUTED 1589be: 51 push %ecx <== NOT EXECUTED 1589bf: ff d0 call *%eax <== NOT EXECUTED 1589c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 1589c4: e8 63 9e fe ff call 14282c <__errno> <== NOT EXECUTED 1589c9: c7 00 12 00 00 00 movl $0x12,(%eax) <== NOT EXECUTED 1589cf: 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; } 1589d4: 89 f0 mov %esi,%eax <== NOT EXECUTED 1589d6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1589d9: 5b pop %ebx <== NOT EXECUTED 1589da: 5e pop %esi <== NOT EXECUTED 1589db: 5f pop %edi <== NOT EXECUTED 1589dc: c9 leave <== NOT EXECUTED 1589dd: c3 ret <== NOT EXECUTED 1589de: 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 ) 1589e0: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 1589e4: 74 19 je 1589ff <_rename_r+0x25b> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 1589e6: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 1589e9: 85 c0 test %eax,%eax <== NOT EXECUTED 1589eb: 74 12 je 1589ff <_rename_r+0x25b> <== NOT EXECUTED 1589ed: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1589f0: 85 c0 test %eax,%eax <== NOT EXECUTED 1589f2: 74 0b je 1589ff <_rename_r+0x25b> <== NOT EXECUTED 1589f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1589f7: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 1589fa: ff d0 call *%eax <== NOT EXECUTED 1589fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 1589ff: e8 28 9e fe ff call 14282c <__errno> <== NOT EXECUTED 158a04: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 158a06: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 158a0b: e9 18 ff ff ff jmp 158928 <_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 ); 158a10: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 158a13: 85 c0 test %eax,%eax <== NOT EXECUTED 158a15: 74 10 je 158a27 <_rename_r+0x283> <== NOT EXECUTED 158a17: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158a1a: 85 c0 test %eax,%eax <== NOT EXECUTED 158a1c: 74 09 je 158a27 <_rename_r+0x283> <== NOT EXECUTED 158a1e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158a21: 53 push %ebx <== NOT EXECUTED 158a22: ff d0 call *%eax <== NOT EXECUTED 158a24: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 158a27: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 158a2b: 74 19 je 158a46 <_rename_r+0x2a2> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 158a2d: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 158a30: 85 c0 test %eax,%eax <== NOT EXECUTED 158a32: 74 12 je 158a46 <_rename_r+0x2a2> <== NOT EXECUTED 158a34: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158a37: 85 c0 test %eax,%eax <== NOT EXECUTED 158a39: 74 0b je 158a46 <_rename_r+0x2a2> <== NOT EXECUTED 158a3b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158a3e: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 158a41: ff d0 call *%eax <== NOT EXECUTED 158a43: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 158a46: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 158a49: 85 c0 test %eax,%eax <== NOT EXECUTED 158a4b: 74 13 je 158a60 <_rename_r+0x2bc> <== NOT EXECUTED 158a4d: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158a50: 85 c0 test %eax,%eax <== NOT EXECUTED 158a52: 74 0c je 158a60 <_rename_r+0x2bc> <== NOT EXECUTED 158a54: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158a57: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 158a5a: 52 push %edx <== NOT EXECUTED 158a5b: ff d0 call *%eax <== NOT EXECUTED 158a5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 158a60: e8 c7 9d fe ff call 14282c <__errno> <== NOT EXECUTED 158a65: 89 30 mov %esi,(%eax) <== NOT EXECUTED 158a67: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 158a6c: e9 b7 fe ff ff jmp 158928 <_rename_r+0x184> <== NOT EXECUTED 158a71: 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 ) 158a74: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 158a78: 74 19 je 158a93 <_rename_r+0x2ef> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 158a7a: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 158a7d: 85 c0 test %eax,%eax <== NOT EXECUTED 158a7f: 74 12 je 158a93 <_rename_r+0x2ef> <== NOT EXECUTED 158a81: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158a84: 85 c0 test %eax,%eax <== NOT EXECUTED 158a86: 74 0b je 158a93 <_rename_r+0x2ef> <== NOT EXECUTED 158a88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158a8b: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 158a8e: ff d0 call *%eax <== NOT EXECUTED 158a90: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 158a93: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 158a96: 85 c0 test %eax,%eax <== NOT EXECUTED 158a98: 74 13 je 158aad <_rename_r+0x309> <== NOT EXECUTED 158a9a: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158a9d: 85 c0 test %eax,%eax <== NOT EXECUTED 158a9f: 74 0c je 158aad <_rename_r+0x309> <== NOT EXECUTED 158aa1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158aa4: 8d 4d d0 lea -0x30(%ebp),%ecx <== NOT EXECUTED 158aa7: 51 push %ecx <== NOT EXECUTED 158aa8: ff d0 call *%eax <== NOT EXECUTED 158aaa: 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 ); 158aad: e8 7a 9d fe ff call 14282c <__errno> <== NOT EXECUTED 158ab2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 158ab8: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 158abd: e9 66 fe ff ff jmp 158928 <_rename_r+0x184> <== NOT EXECUTED 158ac2: 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, 158ac4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158ac7: 6a 00 push $0x0 <== NOT EXECUTED 158ac9: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED 158acc: 89 45 a4 mov %eax,-0x5c(%ebp) <== NOT EXECUTED 158acf: 50 push %eax <== NOT EXECUTED 158ad0: 6a 02 push $0x2 <== NOT EXECUTED 158ad2: 53 push %ebx <== NOT EXECUTED 158ad3: 52 push %edx <== NOT EXECUTED 158ad4: 89 55 9c mov %edx,-0x64(%ebp) <== NOT EXECUTED 158ad7: e8 6c 32 fb ff call 10bd48 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 158adc: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 158adf: 85 c0 test %eax,%eax <== NOT EXECUTED 158ae1: 8b 55 9c mov -0x64(%ebp),%edx <== NOT EXECUTED 158ae4: 0f 85 1c ff ff ff jne 158a06 <_rename_r+0x262> <== NOT EXECUTED 158aea: c6 45 a3 01 movb $0x1,-0x5d(%ebp) <== NOT EXECUTED 158aee: e9 04 fd ff ff jmp 1587f7 <_rename_r+0x53> <== NOT EXECUTED 158af3: 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 ); 158af4: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 158af7: 85 c0 test %eax,%eax <== NOT EXECUTED 158af9: 74 09 je 158b04 <_rename_r+0x360> <== NOT EXECUTED 158afb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158afe: 53 push %ebx <== NOT EXECUTED 158aff: ff d0 call *%eax <== NOT EXECUTED 158b01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 158b04: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 158b08: 74 19 je 158b23 <_rename_r+0x37f> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 158b0a: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 158b0d: 85 c0 test %eax,%eax <== NOT EXECUTED 158b0f: 74 12 je 158b23 <_rename_r+0x37f> <== NOT EXECUTED 158b11: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158b14: 85 c0 test %eax,%eax <== NOT EXECUTED 158b16: 74 0b je 158b23 <_rename_r+0x37f> <== NOT EXECUTED 158b18: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158b1b: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 158b1e: ff d0 call *%eax <== NOT EXECUTED 158b20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 158b23: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 158b26: 85 c0 test %eax,%eax <== NOT EXECUTED 158b28: 74 83 je 158aad <_rename_r+0x309> <== NOT EXECUTED 158b2a: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158b2d: 85 c0 test %eax,%eax <== NOT EXECUTED 158b2f: 0f 84 78 ff ff ff je 158aad <_rename_r+0x309> <== NOT EXECUTED 158b35: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158b38: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 158b3b: 52 push %edx <== NOT EXECUTED 158b3c: ff d0 call *%eax <== NOT EXECUTED 158b3e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 158b41: e9 67 ff ff ff jmp 158aad <_rename_r+0x309> <== NOT EXECUTED 0010d168 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 10d168: 55 push %ebp <== NOT EXECUTED 10d169: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d16b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10d16e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10d171: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10d174: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10d177: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10d17a: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 10d17b: e9 18 ff ff ff jmp 10d098 <== NOT EXECUTED 00113148 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 113148: 55 push %ebp <== NOT EXECUTED 113149: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11314b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 11314e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 113151: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 113154: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 113155: e9 ae fd ff ff jmp 112f08 <== NOT EXECUTED 0012ac68 : int access( const char *path, int amode ) { 12ac68: 55 push %ebp 12ac69: 89 e5 mov %esp,%ebp 12ac6b: 53 push %ebx 12ac6c: 83 ec 5c sub $0x5c,%esp 12ac6f: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 12ac72: 8d 45 b0 lea -0x50(%ebp),%eax 12ac75: 50 push %eax 12ac76: ff 75 08 pushl 0x8(%ebp) 12ac79: e8 1a 24 fe ff call 10d098 12ac7e: 83 c4 10 add $0x10,%esp 12ac81: 85 c0 test %eax,%eax 12ac83: 75 1f jne 12aca4 return -1; if ( amode & R_OK ) { 12ac85: f6 c3 04 test $0x4,%bl 12ac88: 75 12 jne 12ac9c if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 12ac8a: f6 c3 02 test $0x2,%bl 12ac8d: 75 29 jne 12acb8 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 12ac8f: 83 e3 01 and $0x1,%ebx 12ac92: 75 1c jne 12acb0 if ( !( statbuf.st_mode & S_IEXEC ) ) 12ac94: 31 c0 xor %eax,%eax return -1; } return 0; } 12ac96: 8b 5d fc mov -0x4(%ebp),%ebx 12ac99: c9 leave 12ac9a: c3 ret 12ac9b: 90 nop <== NOT EXECUTED if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 12ac9c: f6 45 bd 01 testb $0x1,-0x43(%ebp) 12aca0: 75 e8 jne 12ac8a 12aca2: 66 90 xchg %ax,%ax if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 12aca4: b8 ff ff ff ff mov $0xffffffff,%eax return -1; } return 0; } 12aca9: 8b 5d fc mov -0x4(%ebp),%ebx 12acac: c9 leave 12acad: c3 ret 12acae: 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 ) ) 12acb0: f6 45 bc 40 testb $0x40,-0x44(%ebp) 12acb4: 75 de jne 12ac94 12acb6: eb ec jmp 12aca4 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 12acb8: 80 7d bc 00 cmpb $0x0,-0x44(%ebp) 12acbc: 78 d1 js 12ac8f 12acbe: eb e4 jmp 12aca4 0010b498 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10b498: 55 push %ebp 10b499: 89 e5 mov %esp,%ebp 10b49b: 57 push %edi 10b49c: 56 push %esi 10b49d: 53 push %ebx 10b49e: 83 ec 1c sub $0x1c,%esp 10b4a1: 8b 5d 08 mov 0x8(%ebp),%ebx 10b4a4: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10b4a7: 85 db test %ebx,%ebx 10b4a9: 0f 84 f1 00 00 00 je 10b5a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10b4af: 8b 53 04 mov 0x4(%ebx),%edx 10b4b2: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10b4b8: 0f 87 e2 00 00 00 ja 10b5a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10b4be: 85 f6 test %esi,%esi 10b4c0: 74 10 je 10b4d2 olddelta->tv_sec = 0; 10b4c2: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10b4c8: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10b4cf: 8b 53 04 mov 0x4(%ebx),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10b4d2: 8b 03 mov (%ebx),%eax 10b4d4: 8d 04 80 lea (%eax,%eax,4),%eax 10b4d7: 8d 04 80 lea (%eax,%eax,4),%eax 10b4da: 8d 04 80 lea (%eax,%eax,4),%eax 10b4dd: 8d 04 80 lea (%eax,%eax,4),%eax 10b4e0: 8d 04 80 lea (%eax,%eax,4),%eax 10b4e3: 8d 04 80 lea (%eax,%eax,4),%eax 10b4e6: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10b4e9: 8d 04 02 lea (%edx,%eax,1),%eax 10b4ec: 3b 05 8c 47 12 00 cmp 0x12478c,%eax 10b4f2: 73 0c jae 10b500 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 10b4f4: 31 c0 xor %eax,%eax return 0; } 10b4f6: 8d 65 f4 lea -0xc(%ebp),%esp 10b4f9: 5b pop %ebx 10b4fa: 5e pop %esi 10b4fb: 5f pop %edi 10b4fc: c9 leave 10b4fd: c3 ret 10b4fe: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b500: a1 98 8a 12 00 mov 0x128a98,%eax 10b505: 40 inc %eax 10b506: a3 98 8a 12 00 mov %eax,0x128a98 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10b50b: 83 ec 0c sub $0xc,%esp 10b50e: 8d 7d e0 lea -0x20(%ebp),%edi 10b511: 57 push %edi 10b512: e8 71 17 00 00 call 10cc88 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10b517: 8b 03 mov (%ebx),%eax 10b519: 01 45 e0 add %eax,-0x20(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10b51c: 8b 43 04 mov 0x4(%ebx),%eax 10b51f: 8d 04 80 lea (%eax,%eax,4),%eax 10b522: 8d 04 80 lea (%eax,%eax,4),%eax 10b525: 8d 04 80 lea (%eax,%eax,4),%eax 10b528: c1 e0 03 shl $0x3,%eax 10b52b: 03 45 e4 add -0x1c(%ebp),%eax 10b52e: 89 45 e4 mov %eax,-0x1c(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10b531: 83 c4 10 add $0x10,%esp 10b534: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b539: 76 18 jbe 10b553 10b53b: 8b 55 e0 mov -0x20(%ebp),%edx 10b53e: 66 90 xchg %ax,%ax ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10b540: 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( 10b545: 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 ) { 10b546: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b54b: 77 f3 ja 10b540 <== ALWAYS TAKEN 10b54d: 89 45 e4 mov %eax,-0x1c(%ebp) 10b550: 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) ) { 10b553: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b558: 77 19 ja 10b573 <== ALWAYS TAKEN 10b55a: 8b 55 e0 mov -0x20(%ebp),%edx 10b55d: 8d 76 00 lea 0x0(%esi),%esi ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10b560: 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( 10b565: 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) ) { 10b566: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b56b: 76 f3 jbe 10b560 10b56d: 89 45 e4 mov %eax,-0x1c(%ebp) 10b570: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10b573: 83 ec 0c sub $0xc,%esp 10b576: 57 push %edi 10b577: e8 98 17 00 00 call 10cd14 <_TOD_Set> _Thread_Enable_dispatch(); 10b57c: e8 5b 29 00 00 call 10dedc <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10b581: 83 c4 10 add $0x10,%esp 10b584: 85 f6 test %esi,%esi 10b586: 0f 84 68 ff ff ff je 10b4f4 <== ALWAYS TAKEN *olddelta = *delta; 10b58c: 8b 03 mov (%ebx),%eax 10b58e: 8b 53 04 mov 0x4(%ebx),%edx 10b591: 89 06 mov %eax,(%esi) 10b593: 89 56 04 mov %edx,0x4(%esi) 10b596: 31 c0 xor %eax,%eax return 0; } 10b598: 8d 65 f4 lea -0xc(%ebp),%esp 10b59b: 5b pop %ebx 10b59c: 5e pop %esi 10b59d: 5f pop %edi 10b59e: c9 leave 10b59f: 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 ); 10b5a0: e8 cf 8a 00 00 call 114074 <__errno> 10b5a5: c7 00 16 00 00 00 movl $0x16,(%eax) 10b5ab: b8 ff ff ff ff mov $0xffffffff,%eax 10b5b0: e9 41 ff ff ff jmp 10b4f6 0010f9bc : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 10f9bc: 55 push %ebp 10f9bd: 89 e5 mov %esp,%ebp 10f9bf: 57 push %edi 10f9c0: 53 push %ebx 10f9c1: 8b 5d 0c mov 0xc(%ebp),%ebx 10f9c4: ff 05 94 72 12 00 incl 0x127294 length = nelem * elsize; 10f9ca: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 10f9ce: 83 ec 0c sub $0xc,%esp 10f9d1: 53 push %ebx 10f9d2: e8 f5 88 ff ff call 1082cc 10f9d7: 89 c2 mov %eax,%edx if ( cptr ) 10f9d9: 83 c4 10 add $0x10,%esp 10f9dc: 85 c0 test %eax,%eax 10f9de: 74 08 je 10f9e8 <== ALWAYS TAKEN memset( cptr, '\0', length ); 10f9e0: 31 c0 xor %eax,%eax 10f9e2: 89 d7 mov %edx,%edi 10f9e4: 89 d9 mov %ebx,%ecx 10f9e6: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 10f9e8: ff 0d 84 72 12 00 decl 0x127284 return cptr; } 10f9ee: 89 d0 mov %edx,%eax 10f9f0: 8d 65 f8 lea -0x8(%ebp),%esp 10f9f3: 5b pop %ebx 10f9f4: 5f pop %edi 10f9f5: c9 leave 10f9f6: c3 ret 0012ad88 : #include int chdir( const char *pathname ) { 12ad88: 55 push %ebp 12ad89: 89 e5 mov %esp,%ebp 12ad8b: 57 push %edi 12ad8c: 56 push %esi 12ad8d: 83 ec 20 sub $0x20,%esp 12ad90: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 12ad93: 85 d2 test %edx,%edx 12ad95: 0f 84 9d 00 00 00 je 12ae38 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 12ad9b: 31 c0 xor %eax,%eax 12ad9d: b9 ff ff ff ff mov $0xffffffff,%ecx 12ada2: 89 d7 mov %edx,%edi 12ada4: f2 ae repnz scas %es:(%edi),%al 12ada6: f7 d1 not %ecx 12ada8: 49 dec %ecx rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 12ada9: 83 ec 0c sub $0xc,%esp 12adac: 6a 01 push $0x1 12adae: 8d 75 e4 lea -0x1c(%ebp),%esi 12adb1: 56 push %esi 12adb2: 6a 01 push $0x1 12adb4: 51 push %ecx 12adb5: 52 push %edx 12adb6: e8 8d 0f fe ff call 10bd48 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 12adbb: 83 c4 20 add $0x20,%esp 12adbe: 85 c0 test %eax,%eax 12adc0: 75 6a jne 12ae2c return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 12adc2: 8b 55 f0 mov -0x10(%ebp),%edx 12adc5: 8b 42 10 mov 0x10(%edx),%eax 12adc8: 85 c0 test %eax,%eax 12adca: 74 45 je 12ae11 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 12adcc: 83 ec 0c sub $0xc,%esp 12adcf: 56 push %esi 12add0: ff d0 call *%eax 12add2: 83 c4 10 add $0x10,%esp 12add5: 48 dec %eax 12add6: 75 78 jne 12ae50 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 12add8: 8b 3d 84 92 16 00 mov 0x169284,%edi 12adde: 8b 47 10 mov 0x10(%edi),%eax 12ade1: 85 c0 test %eax,%eax 12ade3: 74 19 je 12adfe <== ALWAYS TAKEN 12ade5: 8b 40 1c mov 0x1c(%eax),%eax 12ade8: 85 c0 test %eax,%eax 12adea: 74 12 je 12adfe <== ALWAYS TAKEN 12adec: 83 ec 0c sub $0xc,%esp 12adef: 83 c7 04 add $0x4,%edi 12adf2: 57 push %edi 12adf3: ff d0 call *%eax 12adf5: 8b 3d 84 92 16 00 mov 0x169284,%edi 12adfb: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 12adfe: 83 c7 04 add $0x4,%edi 12ae01: b9 05 00 00 00 mov $0x5,%ecx 12ae06: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12ae08: 31 c0 xor %eax,%eax return 0; } 12ae0a: 8d 65 f8 lea -0x8(%ebp),%esp 12ae0d: 5e pop %esi 12ae0e: 5f pop %edi 12ae0f: c9 leave 12ae10: c3 ret /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 12ae11: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12ae14: 85 c0 test %eax,%eax <== NOT EXECUTED 12ae16: 74 09 je 12ae21 <== NOT EXECUTED 12ae18: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ae1b: 56 push %esi <== NOT EXECUTED 12ae1c: ff d0 call *%eax <== NOT EXECUTED 12ae1e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12ae21: e8 06 7a 01 00 call 14282c <__errno> <== NOT EXECUTED 12ae26: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12ae2c: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 12ae31: 8d 65 f8 lea -0x8(%ebp),%esp 12ae34: 5e pop %esi 12ae35: 5f pop %edi 12ae36: c9 leave 12ae37: c3 ret { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 12ae38: e8 ef 79 01 00 call 14282c <__errno> 12ae3d: c7 00 0e 00 00 00 movl $0xe,(%eax) 12ae43: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 12ae48: 8d 65 f8 lea -0x8(%ebp),%esp 12ae4b: 5e pop %esi 12ae4c: 5f pop %edi 12ae4d: c9 leave 12ae4e: c3 ret 12ae4f: 90 nop <== NOT EXECUTED 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 ); 12ae50: 8b 45 f0 mov -0x10(%ebp),%eax 12ae53: 85 c0 test %eax,%eax 12ae55: 74 10 je 12ae67 <== ALWAYS TAKEN 12ae57: 8b 40 1c mov 0x1c(%eax),%eax 12ae5a: 85 c0 test %eax,%eax 12ae5c: 74 09 je 12ae67 <== ALWAYS TAKEN 12ae5e: 83 ec 0c sub $0xc,%esp 12ae61: 56 push %esi 12ae62: ff d0 call *%eax 12ae64: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 12ae67: e8 c0 79 01 00 call 14282c <__errno> 12ae6c: c7 00 14 00 00 00 movl $0x14,(%eax) 12ae72: b8 ff ff ff ff mov $0xffffffff,%eax 12ae77: eb 91 jmp 12ae0a 0010ba8c : int chmod( const char *path, mode_t mode ) { 10ba8c: 55 push %ebp 10ba8d: 89 e5 mov %esp,%ebp 10ba8f: 57 push %edi 10ba90: 56 push %esi 10ba91: 53 push %ebx 10ba92: 83 ec 38 sub $0x38,%esp 10ba95: 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 ); 10ba98: 31 c0 xor %eax,%eax 10ba9a: b9 ff ff ff ff mov $0xffffffff,%ecx 10ba9f: 89 d7 mov %edx,%edi 10baa1: f2 ae repnz scas %es:(%edi),%al 10baa3: f7 d1 not %ecx 10baa5: 49 dec %ecx 10baa6: 6a 01 push $0x1 10baa8: 8d 5d d4 lea -0x2c(%ebp),%ebx 10baab: 53 push %ebx 10baac: 6a 00 push $0x0 10baae: 51 push %ecx 10baaf: 52 push %edx 10bab0: e8 93 02 00 00 call 10bd48 if ( status != 0 ) 10bab5: 83 c4 20 add $0x20,%esp 10bab8: 85 c0 test %eax,%eax 10baba: 75 60 jne 10bb1c return -1; if ( !loc.handlers ){ 10babc: 8b 45 dc mov -0x24(%ebp),%eax 10babf: 85 c0 test %eax,%eax 10bac1: 74 36 je 10baf9 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 10bac3: 8b 40 1c mov 0x1c(%eax),%eax 10bac6: 85 c0 test %eax,%eax 10bac8: 74 62 je 10bb2c <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 10baca: 83 ec 08 sub $0x8,%esp 10bacd: ff 75 0c pushl 0xc(%ebp) 10bad0: 53 push %ebx 10bad1: ff d0 call *%eax 10bad3: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10bad5: 8b 45 e0 mov -0x20(%ebp),%eax 10bad8: 83 c4 10 add $0x10,%esp 10badb: 85 c0 test %eax,%eax 10badd: 74 10 je 10baef <== ALWAYS TAKEN 10badf: 8b 40 1c mov 0x1c(%eax),%eax 10bae2: 85 c0 test %eax,%eax 10bae4: 74 09 je 10baef <== ALWAYS TAKEN 10bae6: 83 ec 0c sub $0xc,%esp 10bae9: 53 push %ebx 10baea: ff d0 call *%eax 10baec: 83 c4 10 add $0x10,%esp return result; } 10baef: 89 f0 mov %esi,%eax 10baf1: 8d 65 f4 lea -0xc(%ebp),%esp 10baf4: 5b pop %ebx 10baf5: 5e pop %esi 10baf6: 5f pop %edi 10baf7: c9 leave 10baf8: 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 ); 10baf9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10bafc: 85 c0 test %eax,%eax <== NOT EXECUTED 10bafe: 74 10 je 10bb10 <== NOT EXECUTED 10bb00: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10bb03: 85 c0 test %eax,%eax <== NOT EXECUTED 10bb05: 74 09 je 10bb10 <== NOT EXECUTED 10bb07: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bb0a: 53 push %ebx <== NOT EXECUTED 10bb0b: ff d0 call *%eax <== NOT EXECUTED 10bb0d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 10bb10: e8 17 6d 03 00 call 14282c <__errno> <== NOT EXECUTED 10bb15: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10bb1b: 90 nop <== NOT EXECUTED 10bb1c: be ff ff ff ff mov $0xffffffff,%esi result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 10bb21: 89 f0 mov %esi,%eax 10bb23: 8d 65 f4 lea -0xc(%ebp),%esp 10bb26: 5b pop %ebx 10bb27: 5e pop %esi 10bb28: 5f pop %edi 10bb29: c9 leave 10bb2a: c3 ret 10bb2b: 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 ); 10bb2c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10bb2f: 85 c0 test %eax,%eax <== NOT EXECUTED 10bb31: 74 10 je 10bb43 <== NOT EXECUTED 10bb33: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10bb36: 85 c0 test %eax,%eax <== NOT EXECUTED 10bb38: 74 09 je 10bb43 <== NOT EXECUTED 10bb3a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bb3d: 53 push %ebx <== NOT EXECUTED 10bb3e: ff d0 call *%eax <== NOT EXECUTED 10bb40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10bb43: e8 e4 6c 03 00 call 14282c <__errno> <== NOT EXECUTED 10bb48: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10bb4e: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10bb53: eb 9a jmp 10baef <== NOT EXECUTED 0012ae7c : int chown( const char *path, uid_t owner, gid_t group ) { 12ae7c: 55 push %ebp 12ae7d: 89 e5 mov %esp,%ebp 12ae7f: 57 push %edi 12ae80: 56 push %esi 12ae81: 53 push %ebx 12ae82: 83 ec 38 sub $0x38,%esp 12ae85: 8b 55 08 mov 0x8(%ebp),%edx 12ae88: 8b 75 0c mov 0xc(%ebp),%esi 12ae8b: 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 ) ) 12ae8e: 31 c0 xor %eax,%eax 12ae90: b9 ff ff ff ff mov $0xffffffff,%ecx 12ae95: 89 d7 mov %edx,%edi 12ae97: f2 ae repnz scas %es:(%edi),%al 12ae99: f7 d1 not %ecx 12ae9b: 49 dec %ecx 12ae9c: 6a 01 push $0x1 12ae9e: 8d 7d d4 lea -0x2c(%ebp),%edi 12aea1: 57 push %edi 12aea2: 6a 00 push $0x0 12aea4: 51 push %ecx 12aea5: 52 push %edx 12aea6: e8 9d 0e fe ff call 10bd48 12aeab: 83 c4 20 add $0x20,%esp 12aeae: 85 c0 test %eax,%eax 12aeb0: 75 5a jne 12af0c <== ALWAYS TAKEN return -1; if ( !loc.ops->chown_h ) { 12aeb2: 8b 55 e0 mov -0x20(%ebp),%edx 12aeb5: 8b 42 18 mov 0x18(%edx),%eax 12aeb8: 85 c0 test %eax,%eax 12aeba: 74 34 je 12aef0 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 12aebc: 52 push %edx 12aebd: 0f b7 db movzwl %bx,%ebx 12aec0: 53 push %ebx 12aec1: 0f b7 f6 movzwl %si,%esi 12aec4: 56 push %esi 12aec5: 57 push %edi 12aec6: ff d0 call *%eax 12aec8: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 12aeca: 8b 45 e0 mov -0x20(%ebp),%eax 12aecd: 83 c4 10 add $0x10,%esp 12aed0: 85 c0 test %eax,%eax 12aed2: 74 10 je 12aee4 <== ALWAYS TAKEN 12aed4: 8b 40 1c mov 0x1c(%eax),%eax 12aed7: 85 c0 test %eax,%eax 12aed9: 74 09 je 12aee4 <== ALWAYS TAKEN 12aedb: 83 ec 0c sub $0xc,%esp 12aede: 57 push %edi 12aedf: ff d0 call *%eax 12aee1: 83 c4 10 add $0x10,%esp return result; } 12aee4: 89 d8 mov %ebx,%eax 12aee6: 8d 65 f4 lea -0xc(%ebp),%esp 12aee9: 5b pop %ebx 12aeea: 5e pop %esi 12aeeb: 5f pop %edi 12aeec: c9 leave 12aeed: c3 ret 12aeee: 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 ); 12aef0: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12aef3: 85 c0 test %eax,%eax <== NOT EXECUTED 12aef5: 74 09 je 12af00 <== NOT EXECUTED 12aef7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12aefa: 57 push %edi <== NOT EXECUTED 12aefb: ff d0 call *%eax <== NOT EXECUTED 12aefd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12af00: e8 27 79 01 00 call 14282c <__errno> <== NOT EXECUTED 12af05: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12af0b: 90 nop <== NOT EXECUTED 12af0c: bb ff ff ff ff mov $0xffffffff,%ebx result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 12af11: 89 d8 mov %ebx,%eax 12af13: 8d 65 f4 lea -0xc(%ebp),%esp 12af16: 5b pop %ebx 12af17: 5e pop %esi 12af18: 5f pop %edi 12af19: c9 leave 12af1a: c3 ret 0012af1c : #include int chroot( const char *pathname ) { 12af1c: 55 push %ebp 12af1d: 89 e5 mov %esp,%ebp 12af1f: 57 push %edi 12af20: 56 push %esi 12af21: 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) { 12af24: 81 3d 84 92 16 00 e0 cmpl $0x16ede0,0x169284 12af2b: ed 16 00 12af2e: 74 6c je 12af9c <== 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); 12af30: 83 ec 0c sub $0xc,%esp 12af33: ff 75 08 pushl 0x8(%ebp) 12af36: e8 4d fe ff ff call 12ad88 if (result) { 12af3b: 83 c4 10 add $0x10,%esp 12af3e: 85 c0 test %eax,%eax 12af40: 75 7e jne 12afc0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 12af42: 83 ec 0c sub $0xc,%esp 12af45: 6a 00 push $0x0 12af47: 8d 75 e4 lea -0x1c(%ebp),%esi 12af4a: 56 push %esi 12af4b: 6a 00 push $0x0 12af4d: 6a 01 push $0x1 12af4f: 68 9c be 15 00 push $0x15be9c 12af54: e8 ef 0d fe ff call 10bd48 12af59: 83 c4 20 add $0x20,%esp 12af5c: 85 c0 test %eax,%eax 12af5e: 75 60 jne 12afc0 <== 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); 12af60: 8b 3d 84 92 16 00 mov 0x169284,%edi 12af66: 8b 47 24 mov 0x24(%edi),%eax 12af69: 85 c0 test %eax,%eax 12af6b: 74 19 je 12af86 <== ALWAYS TAKEN 12af6d: 8b 40 1c mov 0x1c(%eax),%eax 12af70: 85 c0 test %eax,%eax 12af72: 74 12 je 12af86 <== ALWAYS TAKEN 12af74: 83 ec 0c sub $0xc,%esp 12af77: 83 c7 18 add $0x18,%edi 12af7a: 57 push %edi 12af7b: ff d0 call *%eax 12af7d: 8b 3d 84 92 16 00 mov 0x169284,%edi 12af83: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 12af86: 83 c7 18 add $0x18,%edi 12af89: b9 05 00 00 00 mov $0x5,%ecx 12af8e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12af90: 31 c0 xor %eax,%eax return 0; } 12af92: 8d 65 f8 lea -0x8(%ebp),%esp 12af95: 5e pop %esi 12af96: 5f pop %edi 12af97: c9 leave 12af98: c3 ret 12af99: 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*/ 12af9c: e8 5b 15 00 00 call 12c4fc if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 12afa1: 81 3d 84 92 16 00 e0 cmpl $0x16ede0,0x169284 12afa8: ed 16 00 12afab: 75 83 jne 12af30 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 12afad: e8 7a 78 01 00 call 14282c <__errno> <== NOT EXECUTED 12afb2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12afb8: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12afbb: eb d5 jmp 12af92 <== NOT EXECUTED 12afbd: 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 ); 12afc0: e8 67 78 01 00 call 14282c <__errno> <== NOT EXECUTED 12afc5: 89 c6 mov %eax,%esi <== NOT EXECUTED 12afc7: e8 60 78 01 00 call 14282c <__errno> <== NOT EXECUTED 12afcc: 8b 00 mov (%eax),%eax <== NOT EXECUTED 12afce: 89 06 mov %eax,(%esi) <== NOT EXECUTED 12afd0: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12afd5: eb bb jmp 12af92 <== NOT EXECUTED 0010b3b0 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10b3b0: 55 push %ebp 10b3b1: 89 e5 mov %esp,%ebp 10b3b3: 83 ec 08 sub $0x8,%esp 10b3b6: 8b 45 08 mov 0x8(%ebp),%eax 10b3b9: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10b3bc: 85 d2 test %edx,%edx 10b3be: 74 14 je 10b3d4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10b3c0: 83 f8 01 cmp $0x1,%eax 10b3c3: 74 47 je 10b40c _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10b3c5: 83 f8 04 cmp $0x4,%eax 10b3c8: 74 32 je 10b3fc <== ALWAYS TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 10b3ca: 83 f8 02 cmp $0x2,%eax 10b3cd: 74 2d je 10b3fc return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 10b3cf: 83 f8 03 cmp $0x3,%eax 10b3d2: 74 14 je 10b3e8 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b3d4: e8 2f 91 00 00 call 114508 <__errno> 10b3d9: c7 00 16 00 00 00 movl $0x16,(%eax) 10b3df: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10b3e4: c9 leave 10b3e5: c3 ret 10b3e6: 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 ); 10b3e8: e8 1b 91 00 00 call 114508 <__errno> 10b3ed: c7 00 58 00 00 00 movl $0x58,(%eax) 10b3f3: b8 ff ff ff ff mov $0xffffffff,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b3f8: c9 leave 10b3f9: c3 ret 10b3fa: 66 90 xchg %ax,%ax <== NOT EXECUTED } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 10b3fc: 83 ec 0c sub $0xc,%esp 10b3ff: 52 push %edx 10b400: e8 87 1e 00 00 call 10d28c <_TOD_Get_uptime_as_timespec> 10b405: 31 c0 xor %eax,%eax return 0; 10b407: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b40a: c9 leave 10b40b: c3 ret { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 10b40c: 83 ec 0c sub $0xc,%esp 10b40f: 52 push %edx 10b410: e8 1f 1e 00 00 call 10d234 <_TOD_Get> 10b415: 31 c0 xor %eax,%eax return 0; 10b417: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b41a: c9 leave 10b41b: c3 ret 0012ce84 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 12ce84: 55 push %ebp 12ce85: 89 e5 mov %esp,%ebp 12ce87: 83 ec 08 sub $0x8,%esp 12ce8a: 8b 45 08 mov 0x8(%ebp),%eax 12ce8d: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 12ce90: 85 d2 test %edx,%edx 12ce92: 74 0f je 12cea3 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 12ce94: 83 f8 01 cmp $0x1,%eax 12ce97: 74 1f je 12ceb8 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 12ce99: 83 f8 02 cmp $0x2,%eax 12ce9c: 74 42 je 12cee0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 12ce9e: 83 f8 03 cmp $0x3,%eax 12cea1: 74 3d je 12cee0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 12cea3: e8 84 59 01 00 call 14282c <__errno> 12cea8: c7 00 16 00 00 00 movl $0x16,(%eax) 12ceae: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 12ceb3: c9 leave 12ceb4: c3 ret 12ceb5: 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 ) 12ceb8: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 12cebe: 76 e3 jbe 12cea3 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 12cec0: a1 f8 ee 16 00 mov 0x16eef8,%eax 12cec5: 40 inc %eax 12cec6: a3 f8 ee 16 00 mov %eax,0x16eef8 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 12cecb: 83 ec 0c sub $0xc,%esp 12cece: 52 push %edx 12cecf: e8 7c 1a 00 00 call 12e950 <_TOD_Set> _Thread_Enable_dispatch(); 12ced4: e8 a7 55 fe ff call 112480 <_Thread_Enable_dispatch> 12ced9: 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; 12cedb: 83 c4 10 add $0x10,%esp } 12cede: c9 leave 12cedf: 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 ); 12cee0: e8 47 59 01 00 call 14282c <__errno> 12cee5: c7 00 58 00 00 00 movl $0x58,(%eax) 12ceeb: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 12cef0: c9 leave 12cef1: c3 ret 0010f9f8 : #include int close( int fd ) { 10f9f8: 55 push %ebp 10f9f9: 89 e5 mov %esp,%ebp 10f9fb: 56 push %esi 10f9fc: 53 push %ebx 10f9fd: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10fa00: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 10fa06: 73 58 jae 10fa60 iop = rtems_libio_iop(fd); 10fa08: c1 e3 06 shl $0x6,%ebx 10fa0b: 03 1d 60 72 12 00 add 0x127260,%ebx rtems_libio_check_is_open(iop); 10fa11: f6 43 15 01 testb $0x1,0x15(%ebx) 10fa15: 74 49 je 10fa60 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 10fa17: 8b 43 3c mov 0x3c(%ebx),%eax 10fa1a: 8b 40 04 mov 0x4(%eax),%eax 10fa1d: 85 c0 test %eax,%eax 10fa1f: 74 3b je 10fa5c <== ALWAYS TAKEN rc = (*iop->handlers->close_h)( iop ); 10fa21: 83 ec 0c sub $0xc,%esp 10fa24: 53 push %ebx 10fa25: ff d0 call *%eax 10fa27: 89 c6 mov %eax,%esi 10fa29: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 10fa2c: 8b 43 24 mov 0x24(%ebx),%eax 10fa2f: 85 c0 test %eax,%eax 10fa31: 74 13 je 10fa46 <== ALWAYS TAKEN 10fa33: 8b 40 1c mov 0x1c(%eax),%eax 10fa36: 85 c0 test %eax,%eax 10fa38: 74 0c je 10fa46 10fa3a: 83 ec 0c sub $0xc,%esp 10fa3d: 8d 53 18 lea 0x18(%ebx),%edx 10fa40: 52 push %edx 10fa41: ff d0 call *%eax 10fa43: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 10fa46: 83 ec 0c sub $0xc,%esp 10fa49: 53 push %ebx 10fa4a: e8 b1 02 00 00 call 10fd00 return rc; 10fa4f: 83 c4 10 add $0x10,%esp } 10fa52: 89 f0 mov %esi,%eax 10fa54: 8d 65 f8 lea -0x8(%ebp),%esp 10fa57: 5b pop %ebx 10fa58: 5e pop %esi 10fa59: c9 leave 10fa5a: c3 ret 10fa5b: 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 ) 10fa5c: 31 f6 xor %esi,%esi <== NOT EXECUTED 10fa5e: eb cc jmp 10fa2c <== 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); 10fa60: e8 6b 3c 00 00 call 1136d0 <__errno> 10fa65: c7 00 09 00 00 00 movl $0x9,(%eax) 10fa6b: be ff ff ff ff mov $0xffffffff,%esi 10fa70: eb e0 jmp 10fa52 0010ef60 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10ef60: 55 push %ebp 10ef61: 89 e5 mov %esp,%ebp 10ef63: 83 ec 1c sub $0x1c,%esp 10ef66: 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; 10ef69: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10ef6c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10ef6f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10ef76: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10ef7d: 8d 55 ec lea -0x14(%ebp),%edx 10ef80: 52 push %edx 10ef81: ff 70 0c pushl 0xc(%eax) 10ef84: ff 70 08 pushl 0x8(%eax) 10ef87: e8 d4 0f 00 00 call 10ff60 np->major, np->minor, (void *) &args ); if ( status ) { 10ef8c: 83 c4 10 add $0x10,%esp 10ef8f: 85 c0 test %eax,%eax 10ef91: 75 05 jne 10ef98 <== ALWAYS TAKEN return rtems_deviceio_errno(status); } return 0; } 10ef93: c9 leave 10ef94: c3 ret 10ef95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 10ef98: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ef9b: 50 push %eax <== NOT EXECUTED 10ef9c: e8 c7 00 00 00 call 10f068 <== NOT EXECUTED 10efa1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10efa4: c9 leave <== NOT EXECUTED 10efa5: c3 ret <== NOT EXECUTED 0010efb8 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10efb8: 55 push %ebp 10efb9: 89 e5 mov %esp,%ebp 10efbb: 57 push %edi 10efbc: 56 push %esi 10efbd: 53 push %ebx 10efbe: 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; 10efc1: 8b 45 14 mov 0x14(%ebp),%eax 10efc4: 8b 00 mov (%eax),%eax 10efc6: 89 45 e4 mov %eax,-0x1c(%ebp) if (!device_name_table) 10efc9: 85 c0 test %eax,%eax 10efcb: 0f 84 87 00 00 00 je 10f058 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10efd1: 8b 15 d0 09 12 00 mov 0x1209d0,%edx 10efd7: 89 55 e0 mov %edx,-0x20(%ebp) 10efda: 85 d2 test %edx,%edx 10efdc: 74 38 je 10f016 <== 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 ); 10efde: 31 c0 xor %eax,%eax 10efe0: 31 db xor %ebx,%ebx for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10efe2: 8d 04 80 lea (%eax,%eax,4),%eax 10efe5: 8b 55 e4 mov -0x1c(%ebp),%edx 10efe8: 8d 3c 82 lea (%edx,%eax,4),%edi 10efeb: 8b 37 mov (%edi),%esi 10efed: 85 f6 test %esi,%esi 10efef: 74 1d je 10f00e continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10eff1: 50 push %eax 10eff2: ff 75 0c pushl 0xc(%ebp) 10eff5: 56 push %esi 10eff6: ff 75 08 pushl 0x8(%ebp) 10eff9: e8 9e 2d 00 00 call 111d9c 10effe: 83 c4 10 add $0x10,%esp 10f001: 85 c0 test %eax,%eax 10f003: 75 09 jne 10f00e <== ALWAYS TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10f005: 8b 45 0c mov 0xc(%ebp),%eax 10f008: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1) 10f00c: 74 22 je 10f030 <== 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++) { 10f00e: 43 inc %ebx 10f00f: 89 d8 mov %ebx,%eax 10f011: 39 5d e0 cmp %ebx,-0x20(%ebp) 10f014: 77 cc ja 10efe2 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10f016: e8 c9 21 00 00 call 1111e4 <__errno> 10f01b: c7 00 02 00 00 00 movl $0x2,(%eax) 10f021: b8 ff ff ff ff mov $0xffffffff,%eax } 10f026: 8d 65 f4 lea -0xc(%ebp),%esp 10f029: 5b pop %ebx 10f02a: 5e pop %esi 10f02b: 5f pop %edi 10f02c: c9 leave 10f02d: c3 ret 10f02e: 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]; 10f030: 8b 55 14 mov 0x14(%ebp),%edx 10f033: 89 3a mov %edi,(%edx) pathloc->handlers = &devFS_file_handlers; 10f035: c7 42 08 00 29 12 00 movl $0x122900,0x8(%edx) pathloc->ops = &devFS_ops; 10f03c: c7 42 0c a0 28 12 00 movl $0x1228a0,0xc(%edx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10f043: a1 4c 29 12 00 mov 0x12294c,%eax 10f048: 8b 40 28 mov 0x28(%eax),%eax 10f04b: 89 42 10 mov %eax,0x10(%edx) 10f04e: 31 c0 xor %eax,%eax return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 10f050: 8d 65 f4 lea -0xc(%ebp),%esp 10f053: 5b pop %ebx 10f054: 5e pop %esi 10f055: 5f pop %edi 10f056: c9 leave 10f057: 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 ); 10f058: e8 87 21 00 00 call 1111e4 <__errno> <== NOT EXECUTED 10f05d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10f063: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10f066: eb e8 jmp 10f050 <== NOT EXECUTED 00107b8c : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 107b8c: 55 push %ebp 107b8d: 89 e5 mov %esp,%ebp 107b8f: 57 push %edi 107b90: 53 push %ebx 107b91: 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( 107b94: 83 ec 0c sub $0xc,%esp 107b97: a1 d0 09 12 00 mov 0x1209d0,%eax 107b9c: 8d 04 80 lea (%eax,%eax,4),%eax 107b9f: c1 e0 02 shl $0x2,%eax 107ba2: 50 push %eax 107ba3: e8 30 6f 00 00 call 10ead8 <_Workspace_Allocate> 107ba8: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 107baa: 83 c4 10 add $0x10,%esp 107bad: 85 c0 test %eax,%eax 107baf: 74 2b je 107bdc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 107bb1: a1 d0 09 12 00 mov 0x1209d0,%eax 107bb6: 8d 0c 80 lea (%eax,%eax,4),%ecx 107bb9: c1 e1 02 shl $0x2,%ecx 107bbc: 31 c0 xor %eax,%eax 107bbe: 89 d7 mov %edx,%edi 107bc0: 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; 107bc2: c7 43 24 00 29 12 00 movl $0x122900,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 107bc9: c7 43 28 a0 28 12 00 movl $0x1228a0,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 107bd0: 89 53 1c mov %edx,0x1c(%ebx) 107bd3: 31 c0 xor %eax,%eax return 0; } 107bd5: 8d 65 f8 lea -0x8(%ebp),%esp 107bd8: 5b pop %ebx 107bd9: 5f pop %edi 107bda: c9 leave 107bdb: 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 ); 107bdc: e8 03 96 00 00 call 1111e4 <__errno> <== NOT EXECUTED 107be1: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107be7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107bec: eb e7 jmp 107bd5 <== NOT EXECUTED 00107d48 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 107d48: 55 push %ebp 107d49: 89 e5 mov %esp,%ebp 107d4b: 83 ec 1c sub $0x1c,%esp 107d4e: 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; 107d51: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 107d54: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 107d57: 8b 55 0c mov 0xc(%ebp),%edx 107d5a: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 107d5d: 8b 55 10 mov 0x10(%ebp),%edx 107d60: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( 107d63: 8d 55 e8 lea -0x18(%ebp),%edx 107d66: 52 push %edx 107d67: ff 70 0c pushl 0xc(%eax) 107d6a: ff 70 08 pushl 0x8(%eax) 107d6d: e8 82 41 00 00 call 10bef4 np->major, np->minor, (void *) &args ); if ( status ) 107d72: 83 c4 10 add $0x10,%esp 107d75: 85 c0 test %eax,%eax 107d77: 75 07 jne 107d80 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 107d79: 8b 45 f4 mov -0xc(%ebp),%eax } 107d7c: c9 leave 107d7d: c3 ret 107d7e: 66 90 xchg %ax,%ax <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107d80: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d83: 50 push %eax <== NOT EXECUTED 107d84: e8 df 72 00 00 call 10f068 <== NOT EXECUTED 107d89: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 107d8c: c9 leave <== NOT EXECUTED 107d8d: c3 ret <== NOT EXECUTED 00107bf0 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 107bf0: 55 push %ebp 107bf1: 89 e5 mov %esp,%ebp 107bf3: 57 push %edi 107bf4: 56 push %esi 107bf5: 53 push %ebx 107bf6: 83 ec 1c sub $0x1c,%esp 107bf9: 8b 7d 08 mov 0x8(%ebp),%edi 107bfc: 8b 4d 10 mov 0x10(%ebp),%ecx 107bff: 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') && 107c02: 80 3f 64 cmpb $0x64,(%edi) 107c05: 0f 84 dd 00 00 00 je 107ce8 <== 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)) 107c0b: 8b 45 0c mov 0xc(%ebp),%eax 107c0e: 25 00 f0 00 00 and $0xf000,%eax 107c13: 3d 00 60 00 00 cmp $0x6000,%eax 107c18: 74 0b je 107c25 <== ALWAYS TAKEN 107c1a: 3d 00 20 00 00 cmp $0x2000,%eax 107c1f: 0f 85 e3 00 00 00 jne 107d08 <== ALWAYS TAKEN ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 107c25: 89 4d d8 mov %ecx,-0x28(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107c28: 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; 107c2b: 8b 45 18 mov 0x18(%ebp),%eax 107c2e: 8b 30 mov (%eax),%esi if (!device_name_table) 107c30: 85 f6 test %esi,%esi 107c32: 0f 84 f2 00 00 00 je 107d2a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107c38: 8b 15 d0 09 12 00 mov 0x1209d0,%edx 107c3e: 85 d2 test %edx,%edx 107c40: 0f 84 d4 00 00 00 je 107d1a <== 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 ); 107c46: 31 c0 xor %eax,%eax 107c48: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 107c4f: 31 db xor %ebx,%ebx 107c51: 89 7d e4 mov %edi,-0x1c(%ebp) 107c54: 89 d7 mov %edx,%edi 107c56: eb 1a jmp 107c72 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) 107c58: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107c5b: 50 push %eax <== NOT EXECUTED 107c5c: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 107c5f: e8 0c a0 00 00 call 111c70 <== NOT EXECUTED 107c64: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107c67: 85 c0 test %eax,%eax <== NOT EXECUTED 107c69: 74 65 je 107cd0 <== 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++){ 107c6b: 43 inc %ebx <== NOT EXECUTED 107c6c: 89 d8 mov %ebx,%eax <== NOT EXECUTED 107c6e: 39 fb cmp %edi,%ebx <== NOT EXECUTED 107c70: 73 16 jae 107c88 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) 107c72: 8d 04 80 lea (%eax,%eax,4),%eax 107c75: 8b 04 86 mov (%esi,%eax,4),%eax 107c78: 85 c0 test %eax,%eax 107c7a: 75 dc jne 107c58 <== ALWAYS TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107c7c: 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++){ 107c7f: 43 inc %ebx 107c80: 89 d8 mov %ebx,%eax 107c82: 39 fb cmp %edi,%ebx 107c84: 72 ec jb 107c72 107c86: 66 90 xchg %ax,%ax 107c88: 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) 107c8b: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp) 107c8f: 0f 84 85 00 00 00 je 107d1a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 107c95: 9c pushf 107c96: fa cli 107c97: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 107c98: 8b 55 e0 mov -0x20(%ebp),%edx 107c9b: 8d 04 92 lea (%edx,%edx,4),%eax 107c9e: 8d 14 86 lea (%esi,%eax,4),%edx 107ca1: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 107ca3: 31 c0 xor %eax,%eax 107ca5: b9 ff ff ff ff mov $0xffffffff,%ecx 107caa: f2 ae repnz scas %es:(%edi),%al 107cac: f7 d1 not %ecx 107cae: 49 dec %ecx 107caf: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 107cb2: 8b 45 d8 mov -0x28(%ebp),%eax 107cb5: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 107cb8: 8b 45 dc mov -0x24(%ebp),%eax 107cbb: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 107cbe: 8b 45 0c mov 0xc(%ebp),%eax 107cc1: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 107cc4: 53 push %ebx 107cc5: 9d popf 107cc6: 31 c0 xor %eax,%eax return 0; } 107cc8: 8d 65 f4 lea -0xc(%ebp),%esp 107ccb: 5b pop %ebx 107ccc: 5e pop %esi 107ccd: 5f pop %edi 107cce: c9 leave 107ccf: 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 ); 107cd0: e8 0f 95 00 00 call 1111e4 <__errno> <== NOT EXECUTED 107cd5: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 107cdb: 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; } 107ce0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107ce3: 5b pop %ebx <== NOT EXECUTED 107ce4: 5e pop %esi <== NOT EXECUTED 107ce5: 5f pop %edi <== NOT EXECUTED 107ce6: c9 leave <== NOT EXECUTED 107ce7: 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') && 107ce8: 80 7f 01 65 cmpb $0x65,0x1(%edi) 107cec: 0f 85 19 ff ff ff jne 107c0b <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) 107cf2: 80 7f 02 76 cmpb $0x76,0x2(%edi) 107cf6: 0f 85 0f ff ff ff jne 107c0b <== ALWAYS TAKEN 107cfc: 80 7f 03 00 cmpb $0x0,0x3(%edi) 107d00: 0f 85 05 ff ff ff jne 107c0b 107d06: eb be jmp 107cc6 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 ); 107d08: e8 d7 94 00 00 call 1111e4 <__errno> <== NOT EXECUTED 107d0d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107d13: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107d18: eb ae jmp 107cc8 <== 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 ); 107d1a: e8 c5 94 00 00 call 1111e4 <__errno> <== NOT EXECUTED 107d1f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d25: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d28: eb 9e jmp 107cc8 <== 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 ); 107d2a: e8 b5 94 00 00 call 1111e4 <__errno> <== NOT EXECUTED 107d2f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107d35: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d38: eb 8e jmp 107cc8 <== NOT EXECUTED 00107d90 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 107d90: 55 push %ebp 107d91: 89 e5 mov %esp,%ebp 107d93: 83 ec 1c sub $0x1c,%esp 107d96: 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; 107d99: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107d9c: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 107d9f: 8b 40 14 mov 0x14(%eax),%eax 107da2: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 107da5: 8b 45 14 mov 0x14(%ebp),%eax 107da8: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 107dab: 8d 45 ec lea -0x14(%ebp),%eax 107dae: 50 push %eax 107daf: ff 72 0c pushl 0xc(%edx) 107db2: ff 72 08 pushl 0x8(%edx) 107db5: e8 4e 42 00 00 call 10c008 np->major, np->minor, (void *) &args ); if ( status ) 107dba: 83 c4 10 add $0x10,%esp 107dbd: 85 c0 test %eax,%eax 107dbf: 75 03 jne 107dc4 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return 0; } 107dc1: c9 leave 107dc2: c3 ret 107dc3: 90 nop <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107dc4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107dc7: 50 push %eax <== NOT EXECUTED 107dc8: e8 9b 72 00 00 call 10f068 <== NOT EXECUTED 107dcd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 107dd0: c9 leave <== NOT EXECUTED 107dd1: c3 ret <== NOT EXECUTED 00107dd4 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 107dd4: 55 push %ebp <== NOT EXECUTED 107dd5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107dd7: 53 push %ebx <== NOT EXECUTED 107dd8: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 107ddb: 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; 107dde: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 107de1: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 107de4: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 107de7: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 107dea: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 107ded: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 107df0: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107df3: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 107df6: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 107df9: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 107dfc: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 107dff: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 107e02: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 107e09: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 107e0c: 50 push %eax <== NOT EXECUTED 107e0d: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 107e10: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 107e13: e8 3c 42 00 00 call 10c054 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 107e18: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107e1b: 85 c0 test %eax,%eax <== NOT EXECUTED 107e1d: 75 09 jne 107e28 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107e1f: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107e22: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e25: c9 leave <== NOT EXECUTED 107e26: c3 ret <== NOT EXECUTED 107e27: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107e28: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e2b: 50 push %eax <== NOT EXECUTED 107e2c: e8 37 72 00 00 call 10f068 <== NOT EXECUTED 107e31: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107e34: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e37: c9 leave <== NOT EXECUTED 107e38: c3 ret <== NOT EXECUTED 00107e3c : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 107e3c: 55 push %ebp 107e3d: 89 e5 mov %esp,%ebp 107e3f: 53 push %ebx 107e40: 83 ec 04 sub $0x4,%esp 107e43: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 107e46: 8b 45 08 mov 0x8(%ebp),%eax 107e49: 8b 00 mov (%eax),%eax if (!the_dev) 107e4b: 85 c0 test %eax,%eax 107e4d: 74 18 je 107e67 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 107e4f: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 107e52: 8b 58 08 mov 0x8(%eax),%ebx 107e55: 89 5a 18 mov %ebx,0x18(%edx) 107e58: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 107e5b: 8b 40 10 mov 0x10(%eax),%eax 107e5e: 89 42 0c mov %eax,0xc(%edx) 107e61: 31 c0 xor %eax,%eax return 0; } 107e63: 5a pop %edx 107e64: 5b pop %ebx 107e65: c9 leave 107e66: 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 ); 107e67: e8 78 93 00 00 call 1111e4 <__errno> <== NOT EXECUTED 107e6c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107e72: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107e77: eb ea jmp 107e63 <== NOT EXECUTED 00107e7c : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 107e7c: 55 push %ebp 107e7d: 89 e5 mov %esp,%ebp 107e7f: 53 push %ebx 107e80: 83 ec 28 sub $0x28,%esp 107e83: 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; 107e86: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107e89: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107e8c: 8b 48 0c mov 0xc(%eax),%ecx 107e8f: 8b 58 10 mov 0x10(%eax),%ebx 107e92: 89 4d e0 mov %ecx,-0x20(%ebp) 107e95: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107e98: 8b 4d 0c mov 0xc(%ebp),%ecx 107e9b: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107e9e: 8b 4d 10 mov 0x10(%ebp),%ecx 107ea1: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107ea4: 8b 40 14 mov 0x14(%eax),%eax 107ea7: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107eaa: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 107eb1: 8d 45 dc lea -0x24(%ebp),%eax 107eb4: 50 push %eax 107eb5: ff 72 0c pushl 0xc(%edx) 107eb8: ff 72 08 pushl 0x8(%edx) 107ebb: e8 e0 41 00 00 call 10c0a0 np->major, np->minor, (void *) &args ); if ( status ) 107ec0: 83 c4 10 add $0x10,%esp 107ec3: 85 c0 test %eax,%eax 107ec5: 75 09 jne 107ed0 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107ec7: 8b 45 f4 mov -0xc(%ebp),%eax } 107eca: 8b 5d fc mov -0x4(%ebp),%ebx 107ecd: c9 leave 107ece: c3 ret 107ecf: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107ed0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ed3: 50 push %eax <== NOT EXECUTED 107ed4: e8 8f 71 00 00 call 10f068 <== NOT EXECUTED 107ed9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107edc: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107edf: c9 leave <== NOT EXECUTED 107ee0: c3 ret <== NOT EXECUTED 00111570 : */ int device_close( rtems_libio_t *iop ) { 111570: 55 push %ebp 111571: 89 e5 mov %esp,%ebp 111573: 83 ec 1c sub $0x1c,%esp 111576: 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; 111579: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 11157c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 11157f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 111586: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 11158d: 8d 55 ec lea -0x14(%ebp),%edx 111590: 52 push %edx 111591: ff 70 54 pushl 0x54(%eax) 111594: ff 70 50 pushl 0x50(%eax) 111597: e8 a8 13 00 00 call 112944 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 11159c: 83 c4 10 add $0x10,%esp 11159f: 85 c0 test %eax,%eax 1115a1: 75 05 jne 1115a8 <== ALWAYS TAKEN return rtems_deviceio_errno(status); } return 0; } 1115a3: c9 leave 1115a4: c3 ret 1115a5: 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); 1115a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1115ab: 50 push %eax <== NOT EXECUTED 1115ac: e8 eb 18 00 00 call 112e9c <== NOT EXECUTED 1115b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 1115b4: c9 leave <== NOT EXECUTED 1115b5: c3 ret <== NOT EXECUTED 00111458 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 111458: 55 push %ebp 111459: 89 e5 mov %esp,%ebp 11145b: 83 ec 1c sub $0x1c,%esp 11145e: 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; 111461: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 111464: 8b 55 0c mov 0xc(%ebp),%edx 111467: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 11146a: 8b 55 10 mov 0x10(%ebp),%edx 11146d: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 111470: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 111473: 8d 55 e8 lea -0x18(%ebp),%edx 111476: 52 push %edx 111477: ff 70 54 pushl 0x54(%eax) 11147a: ff 70 50 pushl 0x50(%eax) 11147d: e8 0e 15 00 00 call 112990 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111482: 83 c4 10 add $0x10,%esp 111485: 85 c0 test %eax,%eax 111487: 75 07 jne 111490 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 111489: 8b 45 f4 mov -0xc(%ebp),%eax } 11148c: c9 leave 11148d: c3 ret 11148e: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 111490: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111493: 50 push %eax <== NOT EXECUTED 111494: e8 03 1a 00 00 call 112e9c <== NOT EXECUTED 111499: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 11149c: c9 leave <== NOT EXECUTED 11149d: c3 ret <== NOT EXECUTED 001115b8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1115b8: 55 push %ebp 1115b9: 89 e5 mov %esp,%ebp 1115bb: 83 ec 1c sub $0x1c,%esp 1115be: 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; 1115c1: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 1115c4: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 1115c7: 8b 40 14 mov 0x14(%eax),%eax 1115ca: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 1115cd: 8b 45 14 mov 0x14(%ebp),%eax 1115d0: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 1115d3: 8d 45 ec lea -0x14(%ebp),%eax 1115d6: 50 push %eax 1115d7: ff 72 54 pushl 0x54(%edx) 1115da: ff 72 50 pushl 0x50(%edx) 1115dd: e8 fa 13 00 00 call 1129dc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1115e2: 83 c4 10 add $0x10,%esp 1115e5: 85 c0 test %eax,%eax 1115e7: 75 03 jne 1115ec <== ALWAYS TAKEN return rtems_deviceio_errno(status); return 0; } 1115e9: c9 leave 1115ea: c3 ret 1115eb: 90 nop <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1115ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1115ef: 50 push %eax <== NOT EXECUTED 1115f0: e8 a7 18 00 00 call 112e9c <== NOT EXECUTED 1115f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 1115f8: c9 leave <== NOT EXECUTED 1115f9: c3 ret <== NOT EXECUTED 00111508 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 111508: 55 push %ebp <== NOT EXECUTED 111509: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11150b: 53 push %ebx <== NOT EXECUTED 11150c: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 11150f: 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; 111512: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 111515: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 111518: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 11151b: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 11151e: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 111521: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 111524: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 111527: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 11152a: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 11152d: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 111530: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 111533: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 111536: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 11153d: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 111540: 50 push %eax <== NOT EXECUTED 111541: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED 111544: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED 111547: e8 dc 14 00 00 call 112a28 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 11154c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11154f: 85 c0 test %eax,%eax <== NOT EXECUTED 111551: 75 09 jne 11155c <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 111553: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 111556: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 111559: c9 leave <== NOT EXECUTED 11155a: c3 ret <== NOT EXECUTED 11155b: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 11155c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11155f: 50 push %eax <== NOT EXECUTED 111560: e8 37 19 00 00 call 112e9c <== NOT EXECUTED 111565: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 111568: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11156b: c9 leave <== NOT EXECUTED 11156c: c3 ret <== NOT EXECUTED 001114a0 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 1114a0: 55 push %ebp 1114a1: 89 e5 mov %esp,%ebp 1114a3: 53 push %ebx 1114a4: 83 ec 28 sub $0x28,%esp 1114a7: 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; 1114aa: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 1114ad: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 1114b0: 8b 48 0c mov 0xc(%eax),%ecx 1114b3: 8b 58 10 mov 0x10(%eax),%ebx 1114b6: 89 4d e0 mov %ecx,-0x20(%ebp) 1114b9: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 1114bc: 8b 4d 0c mov 0xc(%ebp),%ecx 1114bf: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 1114c2: 8b 4d 10 mov 0x10(%ebp),%ecx 1114c5: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 1114c8: 8b 40 14 mov 0x14(%eax),%eax 1114cb: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 1114ce: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 1114d5: 8d 45 dc lea -0x24(%ebp),%eax 1114d8: 50 push %eax 1114d9: ff 72 54 pushl 0x54(%edx) 1114dc: ff 72 50 pushl 0x50(%edx) 1114df: e8 90 15 00 00 call 112a74 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1114e4: 83 c4 10 add $0x10,%esp 1114e7: 85 c0 test %eax,%eax 1114e9: 75 09 jne 1114f4 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 1114eb: 8b 45 f4 mov -0xc(%ebp),%eax } 1114ee: 8b 5d fc mov -0x4(%ebp),%ebx 1114f1: c9 leave 1114f2: c3 ret 1114f3: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1114f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1114f7: 50 push %eax <== NOT EXECUTED 1114f8: e8 9f 19 00 00 call 112e9c <== NOT EXECUTED 1114fd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 111500: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 111503: c9 leave <== NOT EXECUTED 111504: c3 ret <== NOT EXECUTED 00109c2c : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 109c2c: 55 push %ebp 109c2d: 89 e5 mov %esp,%ebp 109c2f: 53 push %ebx 109c30: 83 ec 04 sub $0x4,%esp 109c33: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 109c35: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx 109c3b: 85 d2 test %edx,%edx 109c3d: 74 4d je 109c8c rtems_interrupt_disable (level); 109c3f: 9c pushf 109c40: fa cli 109c41: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 109c42: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 109c48: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 109c4e: 39 d1 cmp %edx,%ecx 109c50: 74 38 je 109c8a 109c52: 66 90 xchg %ax,%ax tty->rawOutBufState = rob_wait; 109c54: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109c5b: 00 00 00 rtems_interrupt_enable (level); 109c5e: 50 push %eax 109c5f: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 109c60: 50 push %eax 109c61: 6a 00 push $0x0 109c63: 6a 00 push $0x0 109c65: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109c6b: e8 90 19 00 00 call 10b600 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109c70: 83 c4 10 add $0x10,%esp 109c73: 85 c0 test %eax,%eax 109c75: 75 1a jne 109c91 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 109c77: 9c pushf 109c78: fa cli 109c79: 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) { 109c7a: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 109c80: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 109c86: 39 d1 cmp %edx,%ecx 109c88: 75 ca jne 109c54 <== ALWAYS TAKEN RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 109c8a: 50 push %eax 109c8b: 9d popf } } 109c8c: 8b 5d fc mov -0x4(%ebp),%ebx 109c8f: c9 leave 109c90: 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); 109c91: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109c94: 50 push %eax <== NOT EXECUTED 109c95: e8 a2 1f 00 00 call 10bc3c <== NOT EXECUTED 00108d70 : int dup2( int fildes, int fildes2 ) { 108d70: 55 push %ebp 108d71: 89 e5 mov %esp,%ebp 108d73: 57 push %edi 108d74: 56 push %esi 108d75: 53 push %ebx 108d76: 83 ec 64 sub $0x64,%esp 108d79: 8b 75 08 mov 0x8(%ebp),%esi 108d7c: 8b 7d 0c mov 0xc(%ebp),%edi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 108d7f: 8d 5d a0 lea -0x60(%ebp),%ebx 108d82: 53 push %ebx 108d83: 56 push %esi 108d84: e8 bf 05 00 00 call 109348 if ( status == -1 ) 108d89: 83 c4 10 add $0x10,%esp 108d8c: 40 inc %eax 108d8d: 75 0d jne 108d9c <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108d8f: b8 ff ff ff ff mov $0xffffffff,%eax } 108d94: 8d 65 f4 lea -0xc(%ebp),%esp 108d97: 5b pop %ebx 108d98: 5e pop %esi 108d99: 5f pop %edi 108d9a: c9 leave 108d9b: c3 ret /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 108d9c: 83 ec 08 sub $0x8,%esp 108d9f: 53 push %ebx 108da0: 57 push %edi 108da1: e8 a2 05 00 00 call 109348 if ( status == -1 ) 108da6: 83 c4 10 add $0x10,%esp 108da9: 40 inc %eax 108daa: 74 e3 je 108d8f <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108dac: 50 push %eax <== NOT EXECUTED 108dad: 57 push %edi <== NOT EXECUTED 108dae: 6a 00 push $0x0 <== NOT EXECUTED 108db0: 56 push %esi <== NOT EXECUTED 108db1: e8 2e 02 00 00 call 108fe4 <== NOT EXECUTED 108db6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108db9: eb d9 jmp 108d94 <== NOT EXECUTED 001097a0 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 1097a0: 55 push %ebp <== NOT EXECUTED 1097a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1097a3: 53 push %ebx <== NOT EXECUTED 1097a4: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 1097a7: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 1097ab: 74 1b je 1097c8 <== NOT EXECUTED 1097ad: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 1097b0: 8b 1d 08 51 12 00 mov 0x125108,%ebx <== NOT EXECUTED 1097b6: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 1097bb: 74 0b je 1097c8 <== NOT EXECUTED 1097bd: 3c 09 cmp $0x9,%al <== NOT EXECUTED 1097bf: 74 07 je 1097c8 <== NOT EXECUTED 1097c1: 3c 0a cmp $0xa,%al <== NOT EXECUTED 1097c3: 75 13 jne 1097d8 <== NOT EXECUTED 1097c5: 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); 1097c8: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1097cb: e8 94 fe ff ff call 109664 <== NOT EXECUTED } } 1097d0: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1097d3: c9 leave <== NOT EXECUTED 1097d4: c3 ret <== NOT EXECUTED 1097d5: 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] = '^'; 1097d8: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 1097dc: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 1097df: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 1097e2: 50 push %eax <== NOT EXECUTED 1097e3: 52 push %edx <== NOT EXECUTED 1097e4: 6a 02 push $0x2 <== NOT EXECUTED 1097e6: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 1097e9: 50 push %eax <== NOT EXECUTED 1097ea: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1097ed: e8 3e fd ff ff call 109530 <== NOT EXECUTED tty->column += 2; 1097f2: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1097f5: 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')) { 1097f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 1097fc: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1097ff: c9 leave <== NOT EXECUTED 109800: c3 ret <== NOT EXECUTED 0012b4e4 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 12b4e4: 55 push %ebp <== NOT EXECUTED 12b4e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b4e7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 12b4ea: a1 44 e9 16 00 mov 0x16e944,%eax <== NOT EXECUTED 12b4ef: 85 c0 test %eax,%eax <== NOT EXECUTED 12b4f1: 74 0c je 12b4ff <== NOT EXECUTED fclose(group_fp); 12b4f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b4f6: 50 push %eax <== NOT EXECUTED 12b4f7: e8 7c 74 01 00 call 142978 <== NOT EXECUTED 12b4fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12b4ff: c9 leave <== NOT EXECUTED 12b500: c3 ret <== NOT EXECUTED 0012b504 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 12b504: 55 push %ebp <== NOT EXECUTED 12b505: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b507: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 12b50a: a1 44 e8 16 00 mov 0x16e844,%eax <== NOT EXECUTED 12b50f: 85 c0 test %eax,%eax <== NOT EXECUTED 12b511: 74 0c je 12b51f <== NOT EXECUTED fclose(passwd_fp); 12b513: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b516: 50 push %eax <== NOT EXECUTED 12b517: e8 5c 74 01 00 call 142978 <== NOT EXECUTED 12b51c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12b51f: c9 leave <== NOT EXECUTED 12b520: c3 ret <== NOT EXECUTED 00109804 : * 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) { 109804: 55 push %ebp <== NOT EXECUTED 109805: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109807: 57 push %edi <== NOT EXECUTED 109808: 56 push %esi <== NOT EXECUTED 109809: 53 push %ebx <== NOT EXECUTED 10980a: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10980d: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10980f: 89 d7 mov %edx,%edi <== NOT EXECUTED if (tty->ccount == 0) 109811: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED 109814: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109816: 0f 84 84 00 00 00 je 1098a0 <== NOT EXECUTED return; if (lineFlag) { 10981c: 85 d2 test %edx,%edx <== NOT EXECUTED 10981e: 0f 85 84 00 00 00 jne 1098a8 <== NOT EXECUTED 109824: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 109827: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 10982a: eb 1d jmp 109849 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 10982c: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 10982f: 0f 85 37 01 00 00 jne 10996c <== NOT EXECUTED 109835: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 109838: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10983b: 85 d2 test %edx,%edx <== NOT EXECUTED 10983d: 74 61 je 1098a0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 10983f: 8b 4b 20 mov 0x20(%ebx),%ecx <== NOT EXECUTED 109842: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109844: 74 5a je 1098a0 <== NOT EXECUTED 109846: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 109849: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED 10984c: 49 dec %ecx <== NOT EXECUTED 10984d: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 109850: 8a 04 0f mov (%edi,%ecx,1),%al <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 109853: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 109856: 74 e0 je 109838 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 109858: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED 10985b: 85 f6 test %esi,%esi <== NOT EXECUTED 10985d: 75 09 jne 109868 <== NOT EXECUTED 10985f: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 109862: 0f 84 f0 00 00 00 je 109958 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 109868: 3c 09 cmp $0x9,%al <== NOT EXECUTED 10986a: 74 58 je 1098c4 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 10986c: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10986f: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED 109872: a1 08 51 12 00 mov 0x125108,%eax <== NOT EXECUTED 109877: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 10987b: 75 af jne 10982c <== 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); 10987d: 51 push %ecx <== NOT EXECUTED 10987e: 53 push %ebx <== NOT EXECUTED 10987f: 6a 03 push $0x3 <== NOT EXECUTED 109881: 68 36 0c 12 00 push $0x120c36 <== NOT EXECUTED 109886: e8 a5 fc ff ff call 109530 <== NOT EXECUTED if (tty->column) 10988b: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10988e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109891: 85 c0 test %eax,%eax <== NOT EXECUTED 109893: 74 a3 je 109838 <== NOT EXECUTED tty->column--; 109895: 48 dec %eax <== NOT EXECUTED 109896: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 109899: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10989c: 85 d2 test %edx,%edx <== NOT EXECUTED 10989e: 75 9f jne 10983f <== NOT EXECUTED break; } } 1098a0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1098a3: 5b pop %ebx <== NOT EXECUTED 1098a4: 5e pop %esi <== NOT EXECUTED 1098a5: 5f pop %edi <== NOT EXECUTED 1098a6: c9 leave <== NOT EXECUTED 1098a7: 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)) { 1098a8: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 1098ab: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 1098ae: 0f 84 94 00 00 00 je 109948 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 1098b4: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 1098b7: 0f 84 eb 00 00 00 je 1099a8 <== NOT EXECUTED 1098bd: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 1098c0: eb 87 jmp 109849 <== NOT EXECUTED 1098c2: 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; 1098c4: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 1098c7: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1098c9: 74 46 je 109911 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 1098cb: a1 08 51 12 00 mov 0x125108,%eax <== NOT EXECUTED 1098d0: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED 1098d3: 31 c0 xor %eax,%eax <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 1098d5: 81 e2 00 02 00 00 and $0x200,%edx <== NOT EXECUTED 1098db: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 1098de: 89 5d d8 mov %ebx,-0x28(%ebp) <== NOT EXECUTED 1098e1: 8b 5d dc mov -0x24(%ebp),%ebx <== NOT EXECUTED 1098e4: eb 10 jmp 1098f6 <== NOT EXECUTED 1098e6: 66 90 xchg %ax,%ax <== NOT EXECUTED 1098e8: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 1098eb: 85 d2 test %edx,%edx <== NOT EXECUTED 1098ed: 74 03 je 1098f2 <== NOT EXECUTED col += 2; 1098ef: 83 c6 02 add $0x2,%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 1098f2: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 1098f4: 74 18 je 10990e <== NOT EXECUTED c = tty->cbuf[i++]; 1098f6: 8a 14 07 mov (%edi,%eax,1),%dl <== NOT EXECUTED 1098f9: 40 inc %eax <== NOT EXECUTED if (c == '\t') { 1098fa: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 1098fd: 74 41 je 109940 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 1098ff: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 109902: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) <== NOT EXECUTED 109907: 75 df jne 1098e8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 109909: 46 inc %esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 10990a: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 10990c: 75 e8 jne 1098f6 <== NOT EXECUTED 10990e: 8b 5d d8 mov -0x28(%ebp),%ebx <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 109911: 3b 73 28 cmp 0x28(%ebx),%esi <== NOT EXECUTED 109914: 0f 8d 1e ff ff ff jge 109838 <== NOT EXECUTED 10991a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 10991c: 50 push %eax <== NOT EXECUTED 10991d: 53 push %ebx <== NOT EXECUTED 10991e: 6a 01 push $0x1 <== NOT EXECUTED 109920: 68 38 0c 12 00 push $0x120c38 <== NOT EXECUTED 109925: e8 06 fc ff ff call 109530 <== NOT EXECUTED tty->column--; 10992a: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10992d: 48 dec %eax <== NOT EXECUTED 10992e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 109931: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109934: 39 c6 cmp %eax,%esi <== NOT EXECUTED 109936: 7c e4 jl 10991c <== NOT EXECUTED 109938: e9 fb fe ff ff jmp 109838 <== NOT EXECUTED 10993d: 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; 109940: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 109943: 46 inc %esi <== NOT EXECUTED 109944: eb ac jmp 1098f2 <== NOT EXECUTED 109946: 66 90 xchg %ax,%ax <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 109948: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED } } if (!lineFlag) break; } } 10994f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109952: 5b pop %ebx <== NOT EXECUTED 109953: 5e pop %esi <== NOT EXECUTED 109954: 5f pop %edi <== NOT EXECUTED 109955: c9 leave <== NOT EXECUTED 109956: c3 ret <== NOT EXECUTED 109957: 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); 109958: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 10995c: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 10995e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109961: 5b pop %ebx <== NOT EXECUTED 109962: 5e pop %esi <== NOT EXECUTED 109963: 5f pop %edi <== NOT EXECUTED 109964: 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); 109965: e9 36 fe ff ff jmp 1097a0 <== NOT EXECUTED 10996a: 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); 10996c: 57 push %edi <== NOT EXECUTED 10996d: 53 push %ebx <== NOT EXECUTED 10996e: 6a 03 push $0x3 <== NOT EXECUTED 109970: 68 36 0c 12 00 push $0x120c36 <== NOT EXECUTED 109975: e8 b6 fb ff ff call 109530 <== NOT EXECUTED if (tty->column) 10997a: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10997d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109980: 85 c0 test %eax,%eax <== NOT EXECUTED 109982: 74 04 je 109988 <== NOT EXECUTED tty->column--; 109984: 48 dec %eax <== NOT EXECUTED 109985: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 109988: a1 08 51 12 00 mov 0x125108,%eax <== NOT EXECUTED 10998d: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 109991: 0f 84 e6 fe ff ff je 10987d <== NOT EXECUTED 109997: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 10999b: 0f 85 dc fe ff ff jne 10987d <== NOT EXECUTED 1099a1: e9 92 fe ff ff jmp 109838 <== NOT EXECUTED 1099a6: 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; 1099a8: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 1099af: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED 1099b3: 89 da mov %ebx,%edx <== NOT EXECUTED 1099b5: e8 e6 fd ff ff call 1097a0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 1099ba: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 1099be: 0f 84 dc fe ff ff je 1098a0 <== NOT EXECUTED echo ('\n', tty); 1099c4: 89 da mov %ebx,%edx <== NOT EXECUTED 1099c6: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 1099cb: eb 91 jmp 10995e <== NOT EXECUTED 0013cbb8 : #include int fchdir( int fd ) { 13cbb8: 55 push %ebp <== NOT EXECUTED 13cbb9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13cbbb: 57 push %edi <== NOT EXECUTED 13cbbc: 56 push %esi <== NOT EXECUTED 13cbbd: 53 push %ebx <== NOT EXECUTED 13cbbe: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED 13cbc1: 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 ); 13cbc4: 3b 1d 4c 71 16 00 cmp 0x16714c,%ebx <== NOT EXECUTED 13cbca: 0f 83 c8 00 00 00 jae 13cc98 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 13cbd0: c1 e3 06 shl $0x6,%ebx <== NOT EXECUTED 13cbd3: 03 1d 58 ed 16 00 add 0x16ed58,%ebx <== NOT EXECUTED rtems_libio_check_is_open(iop); 13cbd9: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 13cbdc: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 13cbdf: 0f 84 b3 00 00 00 je 13cc98 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 13cbe5: a8 02 test $0x2,%al <== NOT EXECUTED 13cbe7: 0f 84 db 00 00 00 je 13ccc8 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 13cbed: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 13cbf0: 85 c0 test %eax,%eax <== NOT EXECUTED 13cbf2: 0f 84 e2 00 00 00 je 13ccda <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 13cbf8: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED 13cbfb: 85 c0 test %eax,%eax <== NOT EXECUTED 13cbfd: 0f 84 d7 00 00 00 je 13ccda <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 13cc03: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13cc06: 83 c3 18 add $0x18,%ebx <== NOT EXECUTED 13cc09: 53 push %ebx <== NOT EXECUTED 13cc0a: ff d0 call *%eax <== NOT EXECUTED 13cc0c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13cc0f: 48 dec %eax <== NOT EXECUTED 13cc10: 75 72 jne 13cc84 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 13cc12: a1 84 92 16 00 mov 0x169284,%eax <== NOT EXECUTED 13cc17: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 13cc1a: 89 55 b4 mov %edx,-0x4c(%ebp) <== NOT EXECUTED 13cc1d: 8d 70 04 lea 0x4(%eax),%esi <== NOT EXECUTED 13cc20: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13cc25: 89 d7 mov %edx,%edi <== NOT EXECUTED 13cc27: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 13cc29: 8d 78 04 lea 0x4(%eax),%edi <== NOT EXECUTED 13cc2c: b1 05 mov $0x5,%cl <== NOT EXECUTED 13cc2e: 89 de mov %ebx,%esi <== NOT EXECUTED 13cc30: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 13cc32: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13cc35: 6a 00 push $0x0 <== NOT EXECUTED 13cc37: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 13cc3a: 56 push %esi <== NOT EXECUTED 13cc3b: 6a 00 push $0x0 <== NOT EXECUTED 13cc3d: 6a 01 push $0x1 <== NOT EXECUTED 13cc3f: 68 9c be 15 00 push $0x15be9c <== NOT EXECUTED 13cc44: e8 ff f0 fc ff call 10bd48 <== NOT EXECUTED 13cc49: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 13cc4c: 85 c0 test %eax,%eax <== NOT EXECUTED 13cc4e: 75 5c jne 13ccac <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 13cc50: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 13cc53: 85 c0 test %eax,%eax <== NOT EXECUTED 13cc55: 74 13 je 13cc6a <== NOT EXECUTED 13cc57: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 13cc5a: 85 c0 test %eax,%eax <== NOT EXECUTED 13cc5c: 74 0c je 13cc6a <== NOT EXECUTED 13cc5e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13cc61: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 13cc64: 52 push %edx <== NOT EXECUTED 13cc65: ff d0 call *%eax <== NOT EXECUTED 13cc67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_current = loc; 13cc6a: 8b 3d 84 92 16 00 mov 0x169284,%edi <== NOT EXECUTED 13cc70: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 13cc73: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13cc78: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 13cc7a: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; } 13cc7c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 13cc7f: 5b pop %ebx <== NOT EXECUTED 13cc80: 5e pop %esi <== NOT EXECUTED 13cc81: 5f pop %edi <== NOT EXECUTED 13cc82: c9 leave <== NOT EXECUTED 13cc83: 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 ); 13cc84: e8 a3 5b 00 00 call 14282c <__errno> <== NOT EXECUTED 13cc89: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 13cc8f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 13cc94: eb e6 jmp 13cc7c <== NOT EXECUTED 13cc96: 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); 13cc98: e8 8f 5b 00 00 call 14282c <__errno> <== NOT EXECUTED 13cc9d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 13cca3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 13cca8: eb d2 jmp 13cc7c <== NOT EXECUTED 13ccaa: 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; 13ccac: 8b 3d 84 92 16 00 mov 0x169284,%edi <== NOT EXECUTED 13ccb2: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 13ccb5: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13ccba: 8b 75 b4 mov -0x4c(%ebp),%esi <== NOT EXECUTED 13ccbd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 13ccbf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 13ccc4: eb b6 jmp 13cc7c <== NOT EXECUTED 13ccc6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 13ccc8: e8 5f 5b 00 00 call 14282c <__errno> <== NOT EXECUTED 13cccd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 13ccd3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 13ccd8: eb a2 jmp 13cc7c <== 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 ); 13ccda: e8 4d 5b 00 00 call 14282c <__errno> <== NOT EXECUTED 13ccdf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 13cce5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 13ccea: eb 90 jmp 13cc7c <== NOT EXECUTED 0012b1c0 : int fchmod( int fd, mode_t mode ) { 12b1c0: 55 push %ebp <== NOT EXECUTED 12b1c1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b1c3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b1c6: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b1c9: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12b1cc: 3b 05 4c 71 16 00 cmp 0x16714c,%eax <== NOT EXECUTED 12b1d2: 73 34 jae 12b208 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 12b1d4: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 12b1d7: 03 05 58 ed 16 00 add 0x16ed58,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 12b1dd: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 12b1e0: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 12b1e3: 74 23 je 12b208 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12b1e5: 83 e2 04 and $0x4,%edx <== NOT EXECUTED 12b1e8: 74 32 je 12b21c <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 12b1ea: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 12b1ed: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED 12b1f0: 85 d2 test %edx,%edx <== NOT EXECUTED 12b1f2: 74 35 je 12b229 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 12b1f4: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED 12b1f7: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 12b1fa: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 12b1fd: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12b200: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED } 12b203: 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 ); 12b204: ff e0 jmp *%eax <== NOT EXECUTED 12b206: 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); 12b208: e8 1f 76 01 00 call 14282c <__errno> <== NOT EXECUTED 12b20d: 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 ); } 12b213: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b218: c9 leave <== NOT EXECUTED 12b219: c3 ret <== NOT EXECUTED 12b21a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12b21c: e8 0b 76 01 00 call 14282c <__errno> <== NOT EXECUTED 12b221: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12b227: eb ea jmp 12b213 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12b229: e8 fe 75 01 00 call 14282c <__errno> <== NOT EXECUTED 12b22e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12b234: eb dd jmp 12b213 <== NOT EXECUTED 0012b238 : int fchown( int fd, uid_t owner, gid_t group ) { 12b238: 55 push %ebp <== NOT EXECUTED 12b239: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b23b: 53 push %ebx <== NOT EXECUTED 12b23c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12b23f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b242: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12b245: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12b248: 3b 05 4c 71 16 00 cmp 0x16714c,%eax <== NOT EXECUTED 12b24e: 73 38 jae 12b288 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 12b250: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 12b253: 03 05 58 ed 16 00 add 0x16ed58,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 12b259: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 12b25c: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 12b25f: 74 27 je 12b288 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12b261: 83 e2 04 and $0x4,%edx <== NOT EXECUTED 12b264: 74 36 je 12b29c <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 12b266: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED 12b269: 8b 52 18 mov 0x18(%edx),%edx <== NOT EXECUTED 12b26c: 85 d2 test %edx,%edx <== NOT EXECUTED 12b26e: 74 39 je 12b2a9 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 12b270: 0f b7 db movzwl %bx,%ebx <== NOT EXECUTED 12b273: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12b276: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED 12b279: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 12b27c: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 12b27f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12b282: 59 pop %ecx <== NOT EXECUTED 12b283: 5b pop %ebx <== NOT EXECUTED 12b284: 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 ); 12b285: ff e2 jmp *%edx <== NOT EXECUTED 12b287: 90 nop <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 12b288: e8 9f 75 01 00 call 14282c <__errno> <== NOT EXECUTED 12b28d: 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 ); } 12b293: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b298: 5a pop %edx <== NOT EXECUTED 12b299: 5b pop %ebx <== NOT EXECUTED 12b29a: c9 leave <== NOT EXECUTED 12b29b: 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 ); 12b29c: e8 8b 75 01 00 call 14282c <__errno> <== NOT EXECUTED 12b2a1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12b2a7: eb ea jmp 12b293 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12b2a9: e8 7e 75 01 00 call 14282c <__errno> <== NOT EXECUTED 12b2ae: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12b2b4: eb dd jmp 12b293 <== NOT EXECUTED 0013ccec : int fcntl( int fd, int cmd, ... ) { 13ccec: 55 push %ebp 13cced: 89 e5 mov %esp,%ebp 13ccef: 57 push %edi 13ccf0: 56 push %esi 13ccf1: 53 push %ebx 13ccf2: 83 ec 1c sub $0x1c,%esp 13ccf5: 8b 5d 08 mov 0x8(%ebp),%ebx 13ccf8: 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, ...)); 13ccfb: 8d 7d 10 lea 0x10(%ebp),%edi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 13ccfe: 8b 35 4c 71 16 00 mov 0x16714c,%esi 13cd04: 39 f3 cmp %esi,%ebx 13cd06: 0f 83 3c 01 00 00 jae 13ce48 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 13cd0c: a1 58 ed 16 00 mov 0x16ed58,%eax 13cd11: c1 e3 06 shl $0x6,%ebx 13cd14: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 13cd17: 8b 4b 14 mov 0x14(%ebx),%ecx 13cd1a: f6 c5 01 test $0x1,%ch 13cd1d: 0f 84 25 01 00 00 je 13ce48 <== ALWAYS TAKEN /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 13cd23: 83 fa 09 cmp $0x9,%edx 13cd26: 76 14 jbe 13cd3c errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 13cd28: e8 ff 5a 00 00 call 14282c <__errno> 13cd2d: c7 00 16 00 00 00 movl $0x16,(%eax) 13cd33: be ff ff ff ff mov $0xffffffff,%esi 13cd38: eb 1a jmp 13cd54 13cd3a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 13cd3c: ff 24 95 bc 3e 16 00 jmp *0x163ebc(,%edx,4) 13cd43: 90 nop <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 13cd44: e8 e3 5a 00 00 call 14282c <__errno> 13cd49: c7 00 86 00 00 00 movl $0x86,(%eax) 13cd4f: 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; } 13cd54: 89 f0 mov %esi,%eax 13cd56: 8d 65 f4 lea -0xc(%ebp),%esp 13cd59: 5b pop %ebx 13cd5a: 5e pop %esi 13cd5b: 5f pop %edi 13cd5c: c9 leave 13cd5d: c3 ret 13cd5e: 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 ) ); 13cd60: 83 ec 0c sub $0xc,%esp 13cd63: ff 37 pushl (%edi) 13cd65: 89 55 e0 mov %edx,-0x20(%ebp) 13cd68: e8 47 f4 fc ff call 10c1b4 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 13cd6d: 25 01 02 00 00 and $0x201,%eax 13cd72: 8b 4b 14 mov 0x14(%ebx),%ecx 13cd75: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 13cd7b: 09 c8 or %ecx,%eax 13cd7d: 89 43 14 mov %eax,0x14(%ebx) 13cd80: 31 f6 xor %esi,%esi 13cd82: 83 c4 10 add $0x10,%esp 13cd85: 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) { 13cd88: 8b 43 3c mov 0x3c(%ebx),%eax 13cd8b: 8b 40 30 mov 0x30(%eax),%eax 13cd8e: 85 c0 test %eax,%eax 13cd90: 74 c2 je 13cd54 <== ALWAYS TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 13cd92: 83 ec 08 sub $0x8,%esp 13cd95: 53 push %ebx 13cd96: 52 push %edx 13cd97: ff d0 call *%eax 13cd99: 89 c3 mov %eax,%ebx if (err) { 13cd9b: 83 c4 10 add $0x10,%esp 13cd9e: 85 c0 test %eax,%eax 13cda0: 74 b2 je 13cd54 <== NEVER TAKEN errno = err; 13cda2: e8 85 5a 00 00 call 14282c <__errno> <== NOT EXECUTED 13cda7: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 13cda9: 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; } 13cdae: 89 f0 mov %esi,%eax <== NOT EXECUTED 13cdb0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 13cdb3: 5b pop %ebx <== NOT EXECUTED 13cdb4: 5e pop %esi <== NOT EXECUTED 13cdb5: 5f pop %edi <== NOT EXECUTED 13cdb6: c9 leave <== NOT EXECUTED 13cdb7: 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 ); 13cdb8: 83 ec 0c sub $0xc,%esp 13cdbb: 51 push %ecx 13cdbc: 89 55 e0 mov %edx,-0x20(%ebp) 13cdbf: e8 04 f2 fc ff call 10bfc8 13cdc4: 89 c6 mov %eax,%esi 13cdc6: 83 c4 10 add $0x10,%esp 13cdc9: 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) { 13cdcc: 85 f6 test %esi,%esi 13cdce: 79 b8 jns 13cd88 <== NEVER TAKEN 13cdd0: eb 82 jmp 13cd54 <== NOT EXECUTED 13cdd2: 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 ) ) 13cdd4: 8b 07 mov (%edi),%eax 13cdd6: 85 c0 test %eax,%eax 13cdd8: 74 52 je 13ce2c <== ALWAYS TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 13cdda: 80 cd 08 or $0x8,%ch 13cddd: 89 4b 14 mov %ecx,0x14(%ebx) 13cde0: 31 f6 xor %esi,%esi 13cde2: eb a4 jmp 13cd88 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); 13cde4: 89 ce mov %ecx,%esi 13cde6: c1 ee 0b shr $0xb,%esi 13cde9: 83 e6 01 and $0x1,%esi 13cdec: eb 9a jmp 13cd88 13cdee: 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 ); 13cdf0: 8b 3f mov (%edi),%edi if ( fd2 ) 13cdf2: 85 ff test %edi,%edi 13cdf4: 74 6a je 13ce60 <== NEVER TAKEN diop = rtems_libio_iop( fd2 ); 13cdf6: 39 fe cmp %edi,%esi <== NOT EXECUTED 13cdf8: 77 42 ja 13ce3c <== NOT EXECUTED 13cdfa: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 13ce01: 31 ff xor %edi,%edi <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 13ce03: 8b 73 3c mov 0x3c(%ebx),%esi 13ce06: 89 77 3c mov %esi,0x3c(%edi) diop->file_info = iop->file_info; 13ce09: 8b 73 38 mov 0x38(%ebx),%esi 13ce0c: 89 77 38 mov %esi,0x38(%edi) diop->flags = iop->flags; 13ce0f: 89 4f 14 mov %ecx,0x14(%edi) diop->pathinfo = iop->pathinfo; 13ce12: 83 c7 18 add $0x18,%edi 13ce15: 8d 73 18 lea 0x18(%ebx),%esi 13ce18: b9 05 00 00 00 mov $0x5,%ecx 13ce1d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 13ce1f: 8b 75 e4 mov -0x1c(%ebp),%esi 13ce22: 29 c6 sub %eax,%esi 13ce24: c1 fe 06 sar $0x6,%esi 13ce27: eb a3 jmp 13cdcc 13ce29: 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; 13ce2c: 80 e5 f7 and $0xf7,%ch <== NOT EXECUTED 13ce2f: 89 4b 14 mov %ecx,0x14(%ebx) <== NOT EXECUTED 13ce32: 31 f6 xor %esi,%esi <== NOT EXECUTED 13ce34: e9 4f ff ff ff jmp 13cd88 <== NOT EXECUTED 13ce39: 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 ); 13ce3c: c1 e7 06 shl $0x6,%edi <== NOT EXECUTED 13ce3f: 8d 3c 38 lea (%eax,%edi,1),%edi <== NOT EXECUTED 13ce42: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 13ce45: eb bc jmp 13ce03 <== NOT EXECUTED 13ce47: 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); 13ce48: e8 df 59 00 00 call 14282c <__errno> <== NOT EXECUTED 13ce4d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 13ce53: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 13ce58: e9 f7 fe ff ff jmp 13cd54 <== NOT EXECUTED 13ce5d: 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(); 13ce60: 89 55 e0 mov %edx,-0x20(%ebp) 13ce63: e8 c0 f2 fc ff call 10c128 13ce68: 89 c7 mov %eax,%edi if ( diop == 0 ) { 13ce6a: 85 c0 test %eax,%eax 13ce6c: 8b 55 e0 mov -0x20(%ebp),%edx 13ce6f: 0f 84 34 ff ff ff je 13cda9 <== ALWAYS TAKEN 13ce75: 89 45 e4 mov %eax,-0x1c(%ebp) 13ce78: a1 58 ed 16 00 mov 0x16ed58,%eax 13ce7d: 8b 4b 14 mov 0x14(%ebx),%ecx 13ce80: eb 81 jmp 13ce03 0010919c : #include int fdatasync( int fd ) { 10919c: 55 push %ebp 10919d: 89 e5 mov %esp,%ebp 10919f: 83 ec 08 sub $0x8,%esp 1091a2: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1091a5: 3b 05 cc 6a 12 00 cmp 0x126acc,%eax 1091ab: 73 27 jae 1091d4 iop = rtems_libio_iop( fd ); 1091ad: c1 e0 06 shl $0x6,%eax 1091b0: 03 05 e0 ab 12 00 add 0x12abe0,%eax rtems_libio_check_is_open(iop); 1091b6: 8b 50 14 mov 0x14(%eax),%edx 1091b9: f6 c6 01 test $0x1,%dh 1091bc: 74 16 je 1091d4 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1091be: 83 e2 04 and $0x4,%edx 1091c1: 74 25 je 1091e8 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 1091c3: 8b 50 3c mov 0x3c(%eax),%edx 1091c6: 8b 52 2c mov 0x2c(%edx),%edx 1091c9: 85 d2 test %edx,%edx 1091cb: 74 28 je 1091f5 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 1091cd: 89 45 08 mov %eax,0x8(%ebp) } 1091d0: c9 leave */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 1091d1: ff e2 jmp *%edx 1091d3: 90 nop <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 1091d4: e8 c7 cc 00 00 call 115ea0 <__errno> 1091d9: 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 ); } 1091df: b8 ff ff ff ff mov $0xffffffff,%eax 1091e4: c9 leave 1091e5: c3 ret 1091e6: 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 ); 1091e8: e8 b3 cc 00 00 call 115ea0 <__errno> 1091ed: c7 00 16 00 00 00 movl $0x16,(%eax) 1091f3: eb ea jmp 1091df /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1091f5: e8 a6 cc 00 00 call 115ea0 <__errno> 1091fa: c7 00 86 00 00 00 movl $0x86,(%eax) 109200: eb dd jmp 1091df 00111b90 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 111b90: 55 push %ebp 111b91: 89 e5 mov %esp,%ebp 111b93: 57 push %edi 111b94: 56 push %esi 111b95: 53 push %ebx 111b96: 83 ec 30 sub $0x30,%esp 111b99: 8b 75 08 mov 0x8(%ebp),%esi ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 111b9c: 6a 00 push $0x0 111b9e: 6a 00 push $0x0 111ba0: ff 35 30 70 12 00 pushl 0x127030 111ba6: e8 55 9a ff ff call 10b600 111bab: 83 c4 10 add $0x10,%esp 111bae: 85 c0 test %eax,%eax 111bb0: 74 12 je 111bc4 <== ALWAYS TAKEN 111bb2: bf fc ff ff ff mov $0xfffffffc,%edi return 0; out_error: pipe_release(pipep, iop); return err; } 111bb7: 89 f8 mov %edi,%eax 111bb9: 8d 65 f4 lea -0xc(%ebp),%esp 111bbc: 5b pop %ebx 111bbd: 5e pop %esi 111bbe: 5f pop %edi 111bbf: c9 leave 111bc0: c3 ret 111bc1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 111bc4: 8b 1e mov (%esi),%ebx <== NOT EXECUTED if (pipe == NULL) { 111bc6: 85 db test %ebx,%ebx <== NOT EXECUTED 111bc8: 74 7e je 111c48 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 111bca: 57 push %edi <== NOT EXECUTED 111bcb: 6a 00 push $0x0 <== NOT EXECUTED 111bcd: 6a 00 push $0x0 <== NOT EXECUTED 111bcf: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111bd2: e8 29 9a ff ff call 10b600 <== NOT EXECUTED 111bd7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111bda: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 111bdd: 19 ff sbb %edi,%edi <== NOT EXECUTED 111bdf: f7 d7 not %edi <== NOT EXECUTED 111be1: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 111be4: 8b 0e mov (%esi),%ecx <== NOT EXECUTED 111be6: 85 c9 test %ecx,%ecx <== NOT EXECUTED 111be8: 0f 84 b2 02 00 00 je 111ea0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 111bee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111bf1: ff 35 30 70 12 00 pushl 0x127030 <== NOT EXECUTED 111bf7: e8 00 9b ff ff call 10b6fc <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 111bfc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111bff: 85 ff test %edi,%edi <== NOT EXECUTED 111c01: 75 b4 jne 111bb7 <== NOT EXECUTED return err; pipe = *pipep; 111c03: 8b 1e mov (%esi),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 111c05: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 111c08: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 111c0b: 89 d0 mov %edx,%eax <== NOT EXECUTED 111c0d: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 111c10: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 111c13: 0f 84 0f 02 00 00 je 111e28 <== NOT EXECUTED 111c19: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 111c1c: 0f 84 c6 01 00 00 je 111de8 <== NOT EXECUTED 111c22: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 111c25: 0f 84 41 01 00 00 je 111d6c <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 111c2b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111c2e: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111c31: e8 c6 9a ff ff call 10b6fc <== NOT EXECUTED 111c36: 31 ff xor %edi,%edi <== NOT EXECUTED return 0; 111c38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 111c3b: 89 f8 mov %edi,%eax <== NOT EXECUTED 111c3d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111c40: 5b pop %ebx <== NOT EXECUTED 111c41: 5e pop %esi <== NOT EXECUTED 111c42: 5f pop %edi <== NOT EXECUTED 111c43: c9 leave <== NOT EXECUTED 111c44: c3 ret <== NOT EXECUTED 111c45: 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)); 111c48: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111c4b: 6a 34 push $0x34 <== NOT EXECUTED 111c4d: e8 7a 66 ff ff call 1082cc <== NOT EXECUTED 111c52: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 111c55: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (pipe == NULL) 111c57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111c5a: 85 c0 test %eax,%eax <== NOT EXECUTED 111c5c: 0f 84 4a 03 00 00 je 111fac <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 111c62: b9 34 00 00 00 mov $0x34,%ecx <== NOT EXECUTED 111c67: 31 c0 xor %eax,%eax <== NOT EXECUTED 111c69: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 111c6c: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 111c6e: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111c71: c7 40 04 00 02 00 00 movl $0x200,0x4(%eax) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 111c78: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111c7b: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 111c80: e8 47 66 ff ff call 1082cc <== NOT EXECUTED 111c85: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 111c88: 89 02 mov %eax,(%edx) <== NOT EXECUTED if (! pipe->Buffer) 111c8a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111c8d: 85 c0 test %eax,%eax <== NOT EXECUTED 111c8f: 0f 84 21 03 00 00 je 111fb6 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 111c95: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 111c98: 50 push %eax <== NOT EXECUTED 111c99: 6a 00 push $0x0 <== NOT EXECUTED 111c9b: 6a 00 push $0x0 <== NOT EXECUTED 111c9d: 0f be 05 f4 50 12 00 movsbl 0x1250f4,%eax <== NOT EXECUTED 111ca4: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 111ca9: 50 push %eax <== NOT EXECUTED 111caa: e8 3d 09 00 00 call 1125ec <== NOT EXECUTED 111caf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111cb2: 85 c0 test %eax,%eax <== NOT EXECUTED 111cb4: 0f 85 3d 02 00 00 jne 111ef7 <== 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( 111cba: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 111cbd: 50 push %eax <== NOT EXECUTED 111cbe: 6a 00 push $0x0 <== NOT EXECUTED 111cc0: 6a 00 push $0x0 <== NOT EXECUTED 111cc2: 0f be 05 f4 50 12 00 movsbl 0x1250f4,%eax <== NOT EXECUTED 111cc9: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 111cce: 50 push %eax <== NOT EXECUTED 111ccf: e8 18 09 00 00 call 1125ec <== NOT EXECUTED 111cd4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111cd7: 85 c0 test %eax,%eax <== NOT EXECUTED 111cd9: 0f 85 07 02 00 00 jne 111ee6 <== 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( 111cdf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111ce2: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 111ce5: 50 push %eax <== NOT EXECUTED 111ce6: 6a 00 push $0x0 <== NOT EXECUTED 111ce8: 6a 10 push $0x10 <== NOT EXECUTED 111cea: 6a 01 push $0x1 <== NOT EXECUTED 111cec: 0f be 05 f4 50 12 00 movsbl 0x1250f4,%eax <== NOT EXECUTED 111cf3: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 111cf8: 50 push %eax <== NOT EXECUTED 111cf9: e8 8a 96 ff ff call 10b388 <== NOT EXECUTED 111cfe: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 111d01: 85 c0 test %eax,%eax <== NOT EXECUTED 111d03: 0f 85 cc 01 00 00 jne 111ed5 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 111d09: 50 push %eax <== NOT EXECUTED 111d0a: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED 111d0d: 57 push %edi <== NOT EXECUTED 111d0e: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111d11: 68 60 7e 12 00 push $0x127e60 <== NOT EXECUTED 111d16: e8 c5 af ff ff call 10cce0 <_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 111d1b: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 111d22: e8 2d b8 ff ff call 10d554 <_Thread_Enable_dispatch><== NOT EXECUTED 111d27: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 111d2a: 57 push %edi <== NOT EXECUTED 111d2b: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111d2e: 68 60 7e 12 00 push $0x127e60 <== NOT EXECUTED 111d33: e8 a8 af ff ff call 10cce0 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 111d38: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 111d3f: e8 10 b8 ff ff call 10d554 <_Thread_Enable_dispatch><== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 111d44: a0 f4 50 12 00 mov 0x1250f4,%al <== NOT EXECUTED 111d49: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 111d4c: 88 15 f4 50 12 00 mov %dl,0x1250f4 <== NOT EXECUTED 111d52: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111d55: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 111d57: 0f 85 6d fe ff ff jne 111bca <== NOT EXECUTED c = 'a'; 111d5d: c6 05 f4 50 12 00 61 movb $0x61,0x1250f4 <== NOT EXECUTED 111d64: e9 61 fe ff ff jmp 111bca <== NOT EXECUTED 111d69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 111d6c: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 111d6f: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 111d72: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 111d75: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 111d78: 85 c0 test %eax,%eax <== NOT EXECUTED 111d7a: 0f 84 e4 01 00 00 je 111f64 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 111d80: 8b 53 14 mov 0x14(%ebx),%edx <== NOT EXECUTED 111d83: 85 d2 test %edx,%edx <== NOT EXECUTED 111d85: 0f 85 a0 fe ff ff jne 111c2b <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 111d8b: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 111d8e: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED 111d92: 0f 85 93 fe ff ff jne 111c2b <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 111d98: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED 111d9b: eb 20 jmp 111dbd <== NOT EXECUTED 111d9d: 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)) 111da0: 52 push %edx <== NOT EXECUTED 111da1: 6a 00 push $0x0 <== NOT EXECUTED 111da3: 6a 00 push $0x0 <== NOT EXECUTED 111da5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111da8: e8 53 98 ff ff call 10b600 <== NOT EXECUTED 111dad: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111db0: 85 c0 test %eax,%eax <== NOT EXECUTED 111db2: 75 27 jne 111ddb <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 111db4: 39 7b 24 cmp %edi,0x24(%ebx) <== NOT EXECUTED 111db7: 0f 85 6e fe ff ff jne 111c2b <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 111dbd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111dc0: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111dc3: e8 34 99 ff ff call 10b6fc <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 111dc8: 59 pop %ecx <== NOT EXECUTED 111dc9: 58 pop %eax <== NOT EXECUTED 111dca: 6a 00 push $0x0 <== NOT EXECUTED 111dcc: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111dcf: e8 cc 09 00 00 call 1127a0 <== NOT EXECUTED 111dd4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111dd7: 85 c0 test %eax,%eax <== NOT EXECUTED 111dd9: 74 c5 je 111da0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 111ddb: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED 111de0: e9 dc 00 00 00 jmp 111ec1 <== NOT EXECUTED 111de5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 111de8: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 111deb: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 111dee: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 111df1: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 111df4: 85 c0 test %eax,%eax <== NOT EXECUTED 111df6: 0f 84 80 01 00 00 je 111f7c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 111dfc: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 111dff: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111e02: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 111e05: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 111e08: 85 c0 test %eax,%eax <== NOT EXECUTED 111e0a: 0f 85 1b fe ff ff jne 111c2b <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 111e10: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111e13: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111e16: 50 push %eax <== NOT EXECUTED 111e17: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111e1a: e8 1d 09 00 00 call 11273c <== NOT EXECUTED 111e1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111e22: e9 04 fe ff ff jmp 111c2b <== NOT EXECUTED 111e27: 90 nop <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 111e28: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 111e2b: 85 c0 test %eax,%eax <== NOT EXECUTED 111e2d: 75 09 jne 111e38 <== NOT EXECUTED 111e2f: 83 e2 01 and $0x1,%edx <== NOT EXECUTED 111e32: 0f 85 84 00 00 00 jne 111ebc <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 111e38: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 111e3b: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111e3e: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 111e41: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 111e44: 85 c0 test %eax,%eax <== NOT EXECUTED 111e46: 0f 84 48 01 00 00 je 111f94 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 111e4c: 8b 7b 10 mov 0x10(%ebx),%edi <== NOT EXECUTED 111e4f: 85 ff test %edi,%edi <== NOT EXECUTED 111e51: 0f 85 d4 fd ff ff jne 111c2b <== NOT EXECUTED prevCounter = pipe->readerCounter; 111e57: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED 111e5a: eb 21 jmp 111e7d <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 111e5c: 50 push %eax <== NOT EXECUTED 111e5d: 6a 00 push $0x0 <== NOT EXECUTED 111e5f: 6a 00 push $0x0 <== NOT EXECUTED 111e61: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111e64: e8 97 97 ff ff call 10b600 <== NOT EXECUTED 111e69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111e6c: 85 c0 test %eax,%eax <== NOT EXECUTED 111e6e: 0f 85 67 ff ff ff jne 111ddb <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 111e74: 39 7b 20 cmp %edi,0x20(%ebx) <== NOT EXECUTED 111e77: 0f 85 ae fd ff ff jne 111c2b <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 111e7d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111e80: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111e83: e8 74 98 ff ff call 10b6fc <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 111e88: 5a pop %edx <== NOT EXECUTED 111e89: 59 pop %ecx <== NOT EXECUTED 111e8a: 6a 00 push $0x0 <== NOT EXECUTED 111e8c: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111e8f: e8 0c 09 00 00 call 1127a0 <== NOT EXECUTED 111e94: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111e97: 85 c0 test %eax,%eax <== NOT EXECUTED 111e99: 74 c1 je 111e5c <== NOT EXECUTED 111e9b: e9 3b ff ff ff jmp 111ddb <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 111ea0: 85 ff test %edi,%edi <== NOT EXECUTED 111ea2: 75 7c jne 111f20 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 111ea4: 89 1e mov %ebx,(%esi) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 111ea6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111ea9: ff 35 30 70 12 00 pushl 0x127030 <== NOT EXECUTED 111eaf: e8 48 98 ff ff call 10b6fc <== NOT EXECUTED 111eb4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111eb7: e9 47 fd ff ff jmp 111c03 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 111ebc: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 111ec1: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111ec4: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111ec7: 56 push %esi <== NOT EXECUTED 111ec8: e8 af fb ff ff call 111a7c <== NOT EXECUTED return err; 111ecd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111ed0: e9 e2 fc ff ff jmp 111bb7 <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 111ed5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111ed8: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111edb: ff 70 30 pushl 0x30(%eax) <== NOT EXECUTED 111ede: e8 f1 07 00 00 call 1126d4 <== NOT EXECUTED 111ee3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 111ee6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111ee9: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 111eec: ff 72 2c pushl 0x2c(%edx) <== NOT EXECUTED 111eef: e8 e0 07 00 00 call 1126d4 <== NOT EXECUTED 111ef4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 111ef7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111efa: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111efd: ff 30 pushl (%eax) <== NOT EXECUTED 111eff: e8 78 61 ff ff call 10807c <== NOT EXECUTED 111f04: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED 111f09: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 111f0c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111f0f: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 111f12: e8 65 61 ff ff call 10807c <== NOT EXECUTED 111f17: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f1a: e9 cf fc ff ff jmp 111bee <== NOT EXECUTED 111f1f: 90 nop <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 111f20: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111f23: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111f26: e8 a9 07 00 00 call 1126d4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 111f2b: 5a pop %edx <== NOT EXECUTED 111f2c: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111f2f: e8 a0 07 00 00 call 1126d4 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 111f34: 58 pop %eax <== NOT EXECUTED 111f35: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111f38: e8 1f 96 ff ff call 10b55c <== NOT EXECUTED free(pipe->Buffer); 111f3d: 5e pop %esi <== NOT EXECUTED 111f3e: ff 33 pushl (%ebx) <== NOT EXECUTED 111f40: e8 37 61 ff ff call 10807c <== NOT EXECUTED free(pipe); 111f45: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 111f48: e8 2f 61 ff ff call 10807c <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 111f4d: 59 pop %ecx <== NOT EXECUTED 111f4e: ff 35 30 70 12 00 pushl 0x127030 <== NOT EXECUTED 111f54: e8 a3 97 ff ff call 10b6fc <== NOT EXECUTED 111f59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f5c: e9 56 fc ff ff jmp 111bb7 <== NOT EXECUTED 111f61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 111f64: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111f67: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111f6a: 50 push %eax <== NOT EXECUTED 111f6b: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111f6e: e8 c9 07 00 00 call 11273c <== NOT EXECUTED 111f73: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f76: e9 05 fe ff ff jmp 111d80 <== NOT EXECUTED 111f7b: 90 nop <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 111f7c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111f7f: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111f82: 50 push %eax <== NOT EXECUTED 111f83: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111f86: e8 b1 07 00 00 call 11273c <== NOT EXECUTED 111f8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f8e: e9 69 fe ff ff jmp 111dfc <== NOT EXECUTED 111f93: 90 nop <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 111f94: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111f97: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111f9a: 50 push %eax <== NOT EXECUTED 111f9b: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111f9e: e8 99 07 00 00 call 11273c <== NOT EXECUTED 111fa3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111fa6: e9 a1 fe ff ff jmp 111e4c <== NOT EXECUTED 111fab: 90 nop <== NOT EXECUTED static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) 111fac: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 111fb1: e9 38 fc ff ff jmp 111bee <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); if (! pipe->Buffer) 111fb6: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 111fbb: e9 4c ff ff ff jmp 111f0c <== NOT EXECUTED 0012cc1c : 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)) ) { 12cc1c: 55 push %ebp <== NOT EXECUTED 12cc1d: 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; 12cc1f: a1 ac ed 16 00 mov 0x16edac,%eax <== NOT EXECUTED 12cc24: 3d b0 ed 16 00 cmp $0x16edb0,%eax <== NOT EXECUTED 12cc29: 74 1b je 12cc46 <== 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 ) { 12cc2b: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12cc2e: 8b 52 10 mov 0x10(%edx),%edx <== NOT EXECUTED 12cc31: 39 50 18 cmp %edx,0x18(%eax) <== NOT EXECUTED 12cc34: 75 07 jne 12cc3d <== NOT EXECUTED 12cc36: eb 14 jmp 12cc4c <== NOT EXECUTED 12cc38: 39 50 18 cmp %edx,0x18(%eax) <== NOT EXECUTED 12cc3b: 74 0f je 12cc4c <== 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 ) { 12cc3d: 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; 12cc3f: 3d b0 ed 16 00 cmp $0x16edb0,%eax <== NOT EXECUTED 12cc44: 75 f2 jne 12cc38 <== NOT EXECUTED 12cc46: 31 c0 xor %eax,%eax <== NOT EXECUTED return true; } } return false; } 12cc48: c9 leave <== NOT EXECUTED 12cc49: c3 ret <== NOT EXECUTED 12cc4a: 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; 12cc4c: b0 01 mov $0x1,%al <== NOT EXECUTED return true; } } return false; } 12cc4e: c9 leave <== NOT EXECUTED 12cc4f: c3 ret <== NOT EXECUTED 00109204 : long fpathconf( int fd, int name ) { 109204: 55 push %ebp 109205: 89 e5 mov %esp,%ebp 109207: 83 ec 08 sub $0x8,%esp 10920a: 8b 45 08 mov 0x8(%ebp),%eax 10920d: 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); 109210: 3b 05 cc 6a 12 00 cmp 0x126acc,%eax 109216: 0f 83 9c 00 00 00 jae 1092b8 iop = rtems_libio_iop(fd); 10921c: c1 e0 06 shl $0x6,%eax 10921f: 03 05 e0 ab 12 00 add 0x12abe0,%eax rtems_libio_check_is_open(iop); 109225: 8b 48 14 mov 0x14(%eax),%ecx 109228: f6 c5 01 test $0x1,%ch 10922b: 0f 84 87 00 00 00 je 1092b8 <== ALWAYS TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 109231: 83 e1 02 and $0x2,%ecx 109234: 74 08 je 10923e <== ALWAYS TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 109236: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 109239: 83 fa 0b cmp $0xb,%edx 10923c: 76 12 jbe 109250 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10923e: e8 5d cc 00 00 call 115ea0 <__errno> 109243: c7 00 16 00 00 00 movl $0x16,(%eax) 109249: b8 ff ff ff ff mov $0xffffffff,%eax break; } return return_value; } 10924e: c9 leave 10924f: c3 ret * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 109250: ff 24 95 18 42 12 00 jmp *0x124218(,%edx,4) 109257: 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; 109258: 8b 40 5c mov 0x5c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10925b: c9 leave 10925c: c3 ret 10925d: 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; 109260: 8b 40 50 mov 0x50(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109263: c9 leave 109264: c3 ret 109265: 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; 109268: 8b 40 64 mov 0x64(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10926b: c9 leave 10926c: c3 ret 10926d: 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; 109270: 8b 40 58 mov 0x58(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109273: c9 leave 109274: c3 ret 109275: 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; 109278: 8b 40 54 mov 0x54(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10927b: c9 leave 10927c: c3 ret 10927d: 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; 109280: 8b 40 4c mov 0x4c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109283: c9 leave 109284: c3 ret 109285: 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; 109288: 8b 40 48 mov 0x48(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10928b: c9 leave 10928c: c3 ret 10928d: 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; 109290: 8b 40 44 mov 0x44(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109293: c9 leave 109294: c3 ret 109295: 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; 109298: 8b 40 40 mov 0x40(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10929b: c9 leave 10929c: c3 ret 10929d: 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; 1092a0: 8b 40 3c mov 0x3c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1092a3: c9 leave 1092a4: c3 ret 1092a5: 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; 1092a8: 8b 40 38 mov 0x38(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1092ab: c9 leave 1092ac: c3 ret 1092ad: 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; 1092b0: 8b 40 60 mov 0x60(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1092b3: c9 leave 1092b4: c3 ret 1092b5: 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); 1092b8: e8 e3 cb 00 00 call 115ea0 <__errno> 1092bd: c7 00 09 00 00 00 movl $0x9,(%eax) 1092c3: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1092c8: c9 leave 1092c9: c3 ret 0010807c : void free( void *ptr ) { MSBUMP(free_calls, 1); 10807c: 55 push %ebp 10807d: 89 e5 mov %esp,%ebp 10807f: 53 push %ebx 108080: 83 ec 04 sub $0x4,%esp 108083: 8b 5d 08 mov 0x8(%ebp),%ebx 108086: ff 05 8c 72 12 00 incl 0x12728c if ( !ptr ) 10808c: 85 db test %ebx,%ebx 10808e: 74 4b je 1080db /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 108090: 83 3d c0 75 12 00 03 cmpl $0x3,0x1275c0 108097: 74 47 je 1080e0 <== NEVER TAKEN #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 108099: a1 28 56 12 00 mov 0x125628,%eax 10809e: 85 c0 test %eax,%eax 1080a0: 74 0a je 1080ac <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 1080a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1080a5: 53 push %ebx <== NOT EXECUTED 1080a6: ff 50 08 call *0x8(%eax) <== NOT EXECUTED 1080a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1080ac: 83 ec 08 sub $0x8,%esp 1080af: 53 push %ebx 1080b0: ff 35 58 31 12 00 pushl 0x123158 1080b6: e8 25 4f 00 00 call 10cfe0 <_Protected_heap_Free> 1080bb: 83 c4 10 add $0x10,%esp 1080be: 84 c0 test %al,%al 1080c0: 75 19 jne 1080db <== 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 1080c2: 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", 1080c7: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 1080ca: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 1080cd: 53 push %ebx <== NOT EXECUTED 1080ce: 68 fc 0b 12 00 push $0x120bfc <== NOT EXECUTED 1080d3: e8 cc 0c 00 00 call 108da4 <== NOT EXECUTED 1080d8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1080db: 8b 5d fc mov -0x4(%ebp),%ebx 1080de: c9 leave 1080df: c3 ret /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1080e0: e8 b7 00 00 00 call 10819c 1080e5: 84 c0 test %al,%al 1080e7: 75 b0 jne 108099 <== NEVER TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1080e9: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1080ec: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1080ef: 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); 1080f0: e9 e7 00 00 00 jmp 1081dc <== NOT EXECUTED 0012c408 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 12c408: 55 push %ebp <== NOT EXECUTED 12c409: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c40b: 53 push %ebx <== NOT EXECUTED 12c40c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12c40f: 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 12c412: 81 fb e0 ed 16 00 cmp $0x16ede0,%ebx <== NOT EXECUTED 12c418: 74 42 je 12c45c <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 12c41a: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 12c41d: 85 c0 test %eax,%eax <== NOT EXECUTED 12c41f: 74 13 je 12c434 <== NOT EXECUTED 12c421: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c424: 85 c0 test %eax,%eax <== NOT EXECUTED 12c426: 74 0c je 12c434 <== NOT EXECUTED 12c428: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c42b: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 12c42e: 52 push %edx <== NOT EXECUTED 12c42f: ff d0 call *%eax <== NOT EXECUTED 12c431: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 12c434: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 12c437: 85 c0 test %eax,%eax <== NOT EXECUTED 12c439: 74 13 je 12c44e <== NOT EXECUTED 12c43b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c43e: 85 c0 test %eax,%eax <== NOT EXECUTED 12c440: 74 0c je 12c44e <== NOT EXECUTED 12c442: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c445: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 12c448: 52 push %edx <== NOT EXECUTED 12c449: ff d0 call *%eax <== NOT EXECUTED 12c44b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 12c44e: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 12c451: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12c454: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 12c455: e9 a2 f9 fd ff jmp 10bdfc <== NOT EXECUTED 12c45a: 66 90 xchg %ax,%ax <== NOT EXECUTED } } 12c45c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12c45f: c9 leave <== NOT EXECUTED 12c460: c3 ret <== NOT EXECUTED 0011e910 : int fstat( int fd, struct stat *sbuf ) { 11e910: 55 push %ebp 11e911: 89 e5 mov %esp,%ebp 11e913: 57 push %edi 11e914: 53 push %ebx 11e915: 8b 55 08 mov 0x8(%ebp),%edx 11e918: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11e91b: 85 db test %ebx,%ebx 11e91d: 74 66 je 11e985 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11e91f: 3b 15 4c 31 12 00 cmp 0x12314c,%edx 11e925: 73 3d jae 11e964 11e927: c1 e2 06 shl $0x6,%edx 11e92a: 03 15 60 72 12 00 add 0x127260,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11e930: f6 42 15 01 testb $0x1,0x15(%edx) 11e934: 74 2e je 11e964 <== ALWAYS TAKEN if ( !iop->handlers ) 11e936: 8b 42 3c mov 0x3c(%edx),%eax 11e939: 85 c0 test %eax,%eax 11e93b: 74 27 je 11e964 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 11e93d: 8b 40 18 mov 0x18(%eax),%eax 11e940: 85 c0 test %eax,%eax 11e942: 74 34 je 11e978 <== ALWAYS TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11e944: b9 48 00 00 00 mov $0x48,%ecx 11e949: 31 c0 xor %eax,%eax 11e94b: 89 df mov %ebx,%edi 11e94d: f3 aa rep stos %al,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11e94f: 8b 42 3c mov 0x3c(%edx),%eax 11e952: 89 5d 0c mov %ebx,0xc(%ebp) 11e955: 83 c2 18 add $0x18,%edx 11e958: 89 55 08 mov %edx,0x8(%ebp) 11e95b: 8b 40 18 mov 0x18(%eax),%eax } 11e95e: 5b pop %ebx 11e95f: 5f pop %edi 11e960: 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 ); 11e961: ff e0 jmp *%eax 11e963: 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 ); 11e964: e8 67 4d ff ff call 1136d0 <__errno> 11e969: 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 ); } 11e96f: b8 ff ff ff ff mov $0xffffffff,%eax 11e974: 5b pop %ebx 11e975: 5f pop %edi 11e976: c9 leave 11e977: 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 ); 11e978: e8 53 4d ff ff call 1136d0 <__errno> <== NOT EXECUTED 11e97d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11e983: eb ea jmp 11e96f <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 11e985: e8 46 4d ff ff call 1136d0 <__errno> 11e98a: c7 00 0e 00 00 00 movl $0xe,(%eax) 11e990: eb dd jmp 11e96f 0012b354 : #include int fsync( int fd ) { 12b354: 55 push %ebp 12b355: 89 e5 mov %esp,%ebp 12b357: 83 ec 08 sub $0x8,%esp 12b35a: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12b35d: 3b 05 4c 71 16 00 cmp 0x16714c,%eax 12b363: 73 2b jae 12b390 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 12b365: c1 e0 06 shl $0x6,%eax 12b368: 03 05 58 ed 16 00 add 0x16ed58,%eax rtems_libio_check_is_open(iop); 12b36e: 8b 50 14 mov 0x14(%eax),%edx 12b371: f6 c6 01 test $0x1,%dh 12b374: 74 1a je 12b390 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12b376: 83 e2 04 and $0x4,%edx 12b379: 74 29 je 12b3a4 /* * Now process the fsync(). */ if ( !iop->handlers ) 12b37b: 8b 50 3c mov 0x3c(%eax),%edx 12b37e: 85 d2 test %edx,%edx 12b380: 74 0e je 12b390 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 12b382: 8b 52 28 mov 0x28(%edx),%edx 12b385: 85 d2 test %edx,%edx 12b387: 74 28 je 12b3b1 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 12b389: 89 45 08 mov %eax,0x8(%ebp) } 12b38c: 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 ); 12b38d: ff e2 jmp *%edx 12b38f: 90 nop <== NOT EXECUTED /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 12b390: e8 97 74 01 00 call 14282c <__errno> <== NOT EXECUTED 12b395: 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 ); } 12b39b: b8 ff ff ff ff mov $0xffffffff,%eax 12b3a0: c9 leave 12b3a1: c3 ret 12b3a2: 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 ); 12b3a4: e8 83 74 01 00 call 14282c <__errno> 12b3a9: c7 00 16 00 00 00 movl $0x16,(%eax) 12b3af: eb ea jmp 12b39b if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12b3b1: e8 76 74 01 00 call 14282c <__errno> 12b3b6: c7 00 86 00 00 00 movl $0x86,(%eax) 12b3bc: eb dd jmp 12b39b 0010fa88 : int ftruncate( int fd, off_t length ) { 10fa88: 55 push %ebp 10fa89: 89 e5 mov %esp,%ebp 10fa8b: 57 push %edi 10fa8c: 56 push %esi 10fa8d: 53 push %ebx 10fa8e: 83 ec 3c sub $0x3c,%esp 10fa91: 8b 5d 08 mov 0x8(%ebp),%ebx 10fa94: 8b 45 0c mov 0xc(%ebp),%eax 10fa97: 8b 55 10 mov 0x10(%ebp),%edx 10fa9a: 89 45 c0 mov %eax,-0x40(%ebp) 10fa9d: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10faa0: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 10faa6: 73 5c jae 10fb04 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 10faa8: c1 e3 06 shl $0x6,%ebx 10faab: 03 1d 60 72 12 00 add 0x127260,%ebx rtems_libio_check_is_open(iop); 10fab1: f6 43 15 01 testb $0x1,0x15(%ebx) 10fab5: 74 4d je 10fb04 <== ALWAYS TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10fab7: 8d 45 d4 lea -0x2c(%ebp),%eax 10faba: 8d 73 18 lea 0x18(%ebx),%esi 10fabd: b9 05 00 00 00 mov $0x5,%ecx 10fac2: 89 c7 mov %eax,%edi 10fac4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 10fac6: 8b 55 e0 mov -0x20(%ebp),%edx 10fac9: 8b 52 10 mov 0x10(%edx),%edx 10facc: 85 d2 test %edx,%edx 10face: 74 5c je 10fb2c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10fad0: 83 ec 0c sub $0xc,%esp 10fad3: 50 push %eax 10fad4: ff d2 call *%edx 10fad6: 83 c4 10 add $0x10,%esp 10fad9: 48 dec %eax 10fada: 74 62 je 10fb3e rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10fadc: f6 43 14 04 testb $0x4,0x14(%ebx) 10fae0: 74 36 je 10fb18 <== ALWAYS TAKEN if ( !iop->handlers->ftruncate_h ) 10fae2: 8b 43 3c mov 0x3c(%ebx),%eax 10fae5: 8b 40 20 mov 0x20(%eax),%eax 10fae8: 85 c0 test %eax,%eax 10faea: 74 40 je 10fb2c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 10faec: 52 push %edx 10faed: ff 75 c4 pushl -0x3c(%ebp) 10faf0: ff 75 c0 pushl -0x40(%ebp) 10faf3: 53 push %ebx 10faf4: ff d0 call *%eax 10faf6: 83 c4 10 add $0x10,%esp } 10faf9: 8d 65 f4 lea -0xc(%ebp),%esp 10fafc: 5b pop %ebx 10fafd: 5e pop %esi 10fafe: 5f pop %edi 10faff: c9 leave 10fb00: c3 ret 10fb01: 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); 10fb04: e8 c7 3b 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10fb09: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10fb0f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10fb14: eb e3 jmp 10faf9 <== NOT EXECUTED 10fb16: 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 ); 10fb18: e8 b3 3b 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10fb1d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10fb23: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10fb28: eb cf jmp 10faf9 <== NOT EXECUTED 10fb2a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10fb2c: e8 9f 3b 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10fb31: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10fb37: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10fb3c: eb bb jmp 10faf9 <== 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 ); 10fb3e: e8 8d 3b 00 00 call 1136d0 <__errno> 10fb43: c7 00 15 00 00 00 movl $0x15,(%eax) 10fb49: b8 ff ff ff ff mov $0xffffffff,%eax 10fb4e: eb a9 jmp 10faf9 001586d4 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 1586d4: 55 push %ebp 1586d5: 89 e5 mov %esp,%ebp 1586d7: 57 push %edi 1586d8: 56 push %esi 1586d9: 53 push %ebx 1586da: 83 ec 2c sub $0x2c,%esp 1586dd: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 1586e0: 3b 1d 4c 71 16 00 cmp 0x16714c,%ebx 1586e6: 72 48 jb 158730 <== NEVER TAKEN 1586e8: 31 db xor %ebx,%ebx <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 1586ea: 8d 45 d4 lea -0x2c(%ebp),%eax 1586ed: 8d 73 18 lea 0x18(%ebx),%esi 1586f0: b9 05 00 00 00 mov $0x5,%ecx 1586f5: 89 c7 mov %eax,%edi 1586f7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 1586f9: 8b 55 e0 mov -0x20(%ebp),%edx 1586fc: 8b 52 10 mov 0x10(%edx),%edx 1586ff: 85 d2 test %edx,%edx 158701: 74 4d je 158750 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 158703: 83 ec 0c sub $0xc,%esp 158706: 50 push %eax 158707: ff d2 call *%edx 158709: 83 c4 10 add $0x10,%esp 15870c: 48 dec %eax 15870d: 75 2d jne 15873c /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 15870f: 8b 43 3c mov 0x3c(%ebx),%eax 158712: 8b 40 08 mov 0x8(%eax),%eax 158715: 85 c0 test %eax,%eax 158717: 74 37 je 158750 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 158719: 52 push %edx 15871a: ff 75 10 pushl 0x10(%ebp) 15871d: ff 75 0c pushl 0xc(%ebp) 158720: 53 push %ebx 158721: ff d0 call *%eax 158723: 83 c4 10 add $0x10,%esp } 158726: 8d 65 f4 lea -0xc(%ebp),%esp 158729: 5b pop %ebx 15872a: 5e pop %esi 15872b: 5f pop %edi 15872c: c9 leave 15872d: c3 ret 15872e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 158730: c1 e3 06 shl $0x6,%ebx 158733: 03 1d 58 ed 16 00 add 0x16ed58,%ebx 158739: eb af jmp 1586ea 15873b: 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 ); 15873c: e8 eb a0 fe ff call 14282c <__errno> 158741: c7 00 14 00 00 00 movl $0x14,(%eax) 158747: b8 ff ff ff ff mov $0xffffffff,%eax 15874c: eb d8 jmp 158726 15874e: 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 ); 158750: e8 d7 a0 fe ff call 14282c <__errno> <== NOT EXECUTED 158755: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 15875b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 158760: eb c4 jmp 158726 <== NOT EXECUTED 0012b4a8 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 12b4a8: 55 push %ebp <== NOT EXECUTED 12b4a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b4ab: a1 84 92 16 00 mov 0x169284,%eax <== NOT EXECUTED 12b4b0: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED return _POSIX_types_Gid; } 12b4b3: c9 leave <== NOT EXECUTED 12b4b4: c3 ret <== NOT EXECUTED 0012ba58 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 12ba58: 55 push %ebp 12ba59: 89 e5 mov %esp,%ebp 12ba5b: 57 push %edi 12ba5c: 56 push %esi 12ba5d: 53 push %ebx 12ba5e: 83 ec 1c sub $0x1c,%esp 12ba61: 89 c3 mov %eax,%ebx 12ba63: 89 55 e4 mov %edx,-0x1c(%ebp) 12ba66: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 12ba68: e8 af fe ff ff call 12b91c if ((fp = fopen("/etc/group", "r")) == NULL) { 12ba6d: 83 ec 08 sub $0x8,%esp 12ba70: 68 6d c0 15 00 push $0x15c06d 12ba75: 68 d7 8e 15 00 push $0x158ed7 12ba7a: e8 11 77 01 00 call 143190 12ba7f: 89 c7 mov %eax,%edi 12ba81: 83 c4 10 add $0x10,%esp 12ba84: 85 c0 test %eax,%eax 12ba86: 75 22 jne 12baaa <== NEVER TAKEN 12ba88: e9 8b 00 00 00 jmp 12bb18 <== NOT EXECUTED 12ba8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 12ba90: 83 ec 08 sub $0x8,%esp 12ba93: 53 push %ebx 12ba94: ff 36 pushl (%esi) 12ba96: e8 a1 c4 01 00 call 147f3c 12ba9b: 83 c4 10 add $0x10,%esp 12ba9e: 85 c0 test %eax,%eax 12baa0: 0f 94 c0 sete %al 12baa3: 0f b6 c0 movzbl %al,%eax } else { match = (grp->gr_gid == gid); } if (match) { 12baa6: 85 c0 test %eax,%eax 12baa8: 75 2e jne 12bad8 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 12baaa: 83 ec 0c sub $0xc,%esp 12baad: ff 75 0c pushl 0xc(%ebp) 12bab0: 8b 4d 08 mov 0x8(%ebp),%ecx 12bab3: 89 f2 mov %esi,%edx 12bab5: 89 f8 mov %edi,%eax 12bab7: e8 d4 fb ff ff call 12b690 12babc: 83 c4 10 add $0x10,%esp 12babf: 85 c0 test %eax,%eax 12bac1: 74 31 je 12baf4 <== ALWAYS TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 12bac3: 85 db test %ebx,%ebx 12bac5: 75 c9 jne 12ba90 <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 12bac7: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 12bacb: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 12bace: 0f 94 c0 sete %al <== NOT EXECUTED 12bad1: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 12bad4: 85 c0 test %eax,%eax <== NOT EXECUTED 12bad6: 74 d2 je 12baaa <== NOT EXECUTED fclose(fp); 12bad8: 83 ec 0c sub $0xc,%esp 12badb: 57 push %edi 12badc: e8 97 6e 01 00 call 142978 *result = grp; 12bae1: 8b 45 10 mov 0x10(%ebp),%eax 12bae4: 89 30 mov %esi,(%eax) 12bae6: 31 c0 xor %eax,%eax return 0; 12bae8: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 12baeb: 8d 65 f4 lea -0xc(%ebp),%esp 12baee: 5b pop %ebx 12baef: 5e pop %esi 12baf0: 5f pop %edi 12baf1: c9 leave 12baf2: c3 ret 12baf3: 90 nop <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 12baf4: e8 33 6d 01 00 call 14282c <__errno> <== NOT EXECUTED 12baf9: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 12baff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bb02: 57 push %edi <== NOT EXECUTED 12bb03: e8 70 6e 01 00 call 142978 <== NOT EXECUTED 12bb08: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 12bb0d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 12bb10: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bb13: 5b pop %ebx <== NOT EXECUTED 12bb14: 5e pop %esi <== NOT EXECUTED 12bb15: 5f pop %edi <== NOT EXECUTED 12bb16: c9 leave <== NOT EXECUTED 12bb17: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 12bb18: e8 0f 6d 01 00 call 14282c <__errno> <== NOT EXECUTED 12bb1d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12bb23: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 12bb26: eb c3 jmp 12baeb <== NOT EXECUTED 0012b7a8 : return NULL; return p; } struct group *getgrent(void) { 12b7a8: 55 push %ebp <== NOT EXECUTED 12b7a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b7ab: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 12b7ae: a1 44 e9 16 00 mov 0x16e944,%eax <== NOT EXECUTED 12b7b3: 85 c0 test %eax,%eax <== NOT EXECUTED 12b7b5: 75 05 jne 12b7bc <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 12b7b7: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 12b7b9: c9 leave <== NOT EXECUTED 12b7ba: c3 ret <== NOT EXECUTED 12b7bb: 90 nop <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 12b7bc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b7bf: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12b7c4: b9 60 e9 16 00 mov $0x16e960,%ecx <== NOT EXECUTED 12b7c9: ba 28 ea 16 00 mov $0x16ea28,%edx <== NOT EXECUTED 12b7ce: e8 bd fe ff ff call 12b690 <== NOT EXECUTED 12b7d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b7d6: 85 c0 test %eax,%eax <== NOT EXECUTED 12b7d8: 74 dd je 12b7b7 <== NOT EXECUTED 12b7da: b8 28 ea 16 00 mov $0x16ea28,%eax <== NOT EXECUTED return NULL; return &grent; } 12b7df: c9 leave <== NOT EXECUTED 12b7e0: c3 ret <== NOT EXECUTED 0012bb54 : } struct group *getgrgid( gid_t gid ) { 12bb54: 55 push %ebp <== NOT EXECUTED 12bb55: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bb57: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 12bb5a: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12bb5d: 50 push %eax <== NOT EXECUTED 12bb5e: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12bb63: 68 60 e9 16 00 push $0x16e960 <== NOT EXECUTED 12bb68: 68 28 ea 16 00 push $0x16ea28 <== NOT EXECUTED 12bb6d: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 12bb71: 50 push %eax <== NOT EXECUTED 12bb72: e8 b1 ff ff ff call 12bb28 <== NOT EXECUTED 12bb77: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12bb7a: 85 c0 test %eax,%eax <== NOT EXECUTED 12bb7c: 75 06 jne 12bb84 <== NOT EXECUTED return NULL; return p; 12bb7e: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 12bb81: c9 leave <== NOT EXECUTED 12bb82: c3 ret <== NOT EXECUTED 12bb83: 90 nop <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 12bb84: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12bb86: c9 leave <== NOT EXECUTED 12bb87: c3 ret <== NOT EXECUTED 0012bb28 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 12bb28: 55 push %ebp <== NOT EXECUTED 12bb29: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bb2b: 53 push %ebx <== NOT EXECUTED 12bb2c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12bb2f: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12bb32: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 12bb35: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 12bb39: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 12bb3c: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12bb3f: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 12bb42: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 12bb45: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12bb48: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12bb4a: 5b pop %ebx <== NOT EXECUTED 12bb4b: 5b pop %ebx <== NOT EXECUTED 12bb4c: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 12bb4d: e9 06 ff ff ff jmp 12ba58 <== NOT EXECUTED 0012bbb4 : } struct group *getgrnam( const char *name ) { 12bbb4: 55 push %ebp 12bbb5: 89 e5 mov %esp,%ebp 12bbb7: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 12bbba: 8d 45 f4 lea -0xc(%ebp),%eax 12bbbd: 50 push %eax 12bbbe: 68 c8 00 00 00 push $0xc8 12bbc3: 68 60 e9 16 00 push $0x16e960 12bbc8: 68 28 ea 16 00 push $0x16ea28 12bbcd: ff 75 08 pushl 0x8(%ebp) 12bbd0: e8 b3 ff ff ff call 12bb88 12bbd5: 83 c4 20 add $0x20,%esp 12bbd8: 85 c0 test %eax,%eax 12bbda: 75 08 jne 12bbe4 <== ALWAYS TAKEN return NULL; return p; 12bbdc: 8b 45 f4 mov -0xc(%ebp),%eax } 12bbdf: c9 leave 12bbe0: c3 ret 12bbe1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 12bbe4: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12bbe6: c9 leave <== NOT EXECUTED 12bbe7: c3 ret <== NOT EXECUTED 0010b190 : int getitimer( int which, struct itimerval *value ) { 10b190: 55 push %ebp 10b191: 89 e5 mov %esp,%ebp 10b193: 83 ec 08 sub $0x8,%esp if ( !value ) 10b196: 8b 45 0c mov 0xc(%ebp),%eax 10b199: 85 c0 test %eax,%eax 10b19b: 74 2f je 10b1cc rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b19d: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b1a1: 76 15 jbe 10b1b8 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b1a3: e8 34 8c 00 00 call 113ddc <__errno> 10b1a8: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b1ae: b8 ff ff ff ff mov $0xffffffff,%eax 10b1b3: c9 leave 10b1b4: c3 ret 10b1b5: 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 ); 10b1b8: e8 1f 8c 00 00 call 113ddc <__errno> 10b1bd: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1c3: b8 ff ff ff ff mov $0xffffffff,%eax 10b1c8: c9 leave 10b1c9: c3 ret 10b1ca: 66 90 xchg %ax,%ax <== NOT EXECUTED int which, struct itimerval *value ) { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b1cc: e8 0b 8c 00 00 call 113ddc <__errno> 10b1d1: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b1d7: eb d5 jmp 10b1ae 0012bc24 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 12bc24: 55 push %ebp 12bc25: 89 e5 mov %esp,%ebp 12bc27: 57 push %edi 12bc28: 56 push %esi 12bc29: 53 push %ebx 12bc2a: 83 ec 1c sub $0x1c,%esp 12bc2d: 89 c3 mov %eax,%ebx 12bc2f: 89 55 e4 mov %edx,-0x1c(%ebp) 12bc32: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 12bc34: e8 e3 fc ff ff call 12b91c if ((fp = fopen("/etc/passwd", "r")) == NULL) { 12bc39: 83 ec 08 sub $0x8,%esp 12bc3c: 68 6d c0 15 00 push $0x15c06d 12bc41: 68 cb 8e 15 00 push $0x158ecb 12bc46: e8 45 75 01 00 call 143190 12bc4b: 89 c7 mov %eax,%edi 12bc4d: 83 c4 10 add $0x10,%esp 12bc50: 85 c0 test %eax,%eax 12bc52: 75 22 jne 12bc76 <== NEVER TAKEN 12bc54: e9 8b 00 00 00 jmp 12bce4 <== NOT EXECUTED 12bc59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 12bc5c: 83 ec 08 sub $0x8,%esp 12bc5f: 53 push %ebx 12bc60: ff 36 pushl (%esi) 12bc62: e8 d5 c2 01 00 call 147f3c 12bc67: 83 c4 10 add $0x10,%esp 12bc6a: 85 c0 test %eax,%eax 12bc6c: 0f 94 c0 sete %al 12bc6f: 0f b6 c0 movzbl %al,%eax } else { match = (pwd->pw_uid == uid); } if (match) { 12bc72: 85 c0 test %eax,%eax 12bc74: 75 2e jne 12bca4 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 12bc76: 83 ec 0c sub $0xc,%esp 12bc79: ff 75 0c pushl 0xc(%ebp) 12bc7c: 8b 4d 08 mov 0x8(%ebp),%ecx 12bc7f: 89 f2 mov %esi,%edx 12bc81: 89 f8 mov %edi,%eax 12bc83: e8 5c fb ff ff call 12b7e4 12bc88: 83 c4 10 add $0x10,%esp 12bc8b: 85 c0 test %eax,%eax 12bc8d: 74 31 je 12bcc0 <== ALWAYS TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 12bc8f: 85 db test %ebx,%ebx 12bc91: 75 c9 jne 12bc5c <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 12bc93: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 12bc97: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 12bc9a: 0f 94 c0 sete %al <== NOT EXECUTED 12bc9d: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 12bca0: 85 c0 test %eax,%eax <== NOT EXECUTED 12bca2: 74 d2 je 12bc76 <== NOT EXECUTED fclose(fp); 12bca4: 83 ec 0c sub $0xc,%esp 12bca7: 57 push %edi 12bca8: e8 cb 6c 01 00 call 142978 *result = pwd; 12bcad: 8b 45 10 mov 0x10(%ebp),%eax 12bcb0: 89 30 mov %esi,(%eax) 12bcb2: 31 c0 xor %eax,%eax return 0; 12bcb4: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 12bcb7: 8d 65 f4 lea -0xc(%ebp),%esp 12bcba: 5b pop %ebx 12bcbb: 5e pop %esi 12bcbc: 5f pop %edi 12bcbd: c9 leave 12bcbe: c3 ret 12bcbf: 90 nop <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 12bcc0: e8 67 6b 01 00 call 14282c <__errno> <== NOT EXECUTED 12bcc5: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 12bccb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bcce: 57 push %edi <== NOT EXECUTED 12bccf: e8 a4 6c 01 00 call 142978 <== NOT EXECUTED 12bcd4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 12bcd9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 12bcdc: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bcdf: 5b pop %ebx <== NOT EXECUTED 12bce0: 5e pop %esi <== NOT EXECUTED 12bce1: 5f pop %edi <== NOT EXECUTED 12bce2: c9 leave <== NOT EXECUTED 12bce3: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 12bce4: e8 43 6b 01 00 call 14282c <__errno> <== NOT EXECUTED 12bce9: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12bcef: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 12bcf2: eb c3 jmp 12bcb7 <== NOT EXECUTED 0012b8e0 : return NULL; return p; } struct passwd *getpwent(void) { 12b8e0: 55 push %ebp <== NOT EXECUTED 12b8e1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b8e3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 12b8e6: a1 44 e8 16 00 mov 0x16e844,%eax <== NOT EXECUTED 12b8eb: 85 c0 test %eax,%eax <== NOT EXECUTED 12b8ed: 75 05 jne 12b8f4 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 12b8ef: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 12b8f1: c9 leave <== NOT EXECUTED 12b8f2: c3 ret <== NOT EXECUTED 12b8f3: 90 nop <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 12b8f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b8f7: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12b8fc: b9 60 e8 16 00 mov $0x16e860,%ecx <== NOT EXECUTED 12b901: ba 28 e9 16 00 mov $0x16e928,%edx <== NOT EXECUTED 12b906: e8 d9 fe ff ff call 12b7e4 <== NOT EXECUTED 12b90b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b90e: 85 c0 test %eax,%eax <== NOT EXECUTED 12b910: 74 dd je 12b8ef <== NOT EXECUTED 12b912: b8 28 e9 16 00 mov $0x16e928,%eax <== NOT EXECUTED return NULL; return &pwent; } 12b917: c9 leave <== NOT EXECUTED 12b918: c3 ret <== NOT EXECUTED 0012bd80 : } struct passwd *getpwnam( const char *name ) { 12bd80: 55 push %ebp 12bd81: 89 e5 mov %esp,%ebp 12bd83: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 12bd86: 8d 45 f4 lea -0xc(%ebp),%eax 12bd89: 50 push %eax 12bd8a: 68 c8 00 00 00 push $0xc8 12bd8f: 68 60 e8 16 00 push $0x16e860 12bd94: 68 28 e9 16 00 push $0x16e928 12bd99: ff 75 08 pushl 0x8(%ebp) 12bd9c: e8 b3 ff ff ff call 12bd54 12bda1: 83 c4 20 add $0x20,%esp 12bda4: 85 c0 test %eax,%eax 12bda6: 75 08 jne 12bdb0 <== ALWAYS TAKEN return NULL; return p; 12bda8: 8b 45 f4 mov -0xc(%ebp),%eax } 12bdab: c9 leave 12bdac: c3 ret 12bdad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 12bdb0: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12bdb2: c9 leave <== NOT EXECUTED 12bdb3: c3 ret <== NOT EXECUTED 0012bd20 : } struct passwd *getpwuid( uid_t uid ) { 12bd20: 55 push %ebp <== NOT EXECUTED 12bd21: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bd23: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 12bd26: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12bd29: 50 push %eax <== NOT EXECUTED 12bd2a: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12bd2f: 68 60 e8 16 00 push $0x16e860 <== NOT EXECUTED 12bd34: 68 28 e9 16 00 push $0x16e928 <== NOT EXECUTED 12bd39: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 12bd3d: 50 push %eax <== NOT EXECUTED 12bd3e: e8 b1 ff ff ff call 12bcf4 <== NOT EXECUTED 12bd43: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12bd46: 85 c0 test %eax,%eax <== NOT EXECUTED 12bd48: 75 06 jne 12bd50 <== NOT EXECUTED return NULL; return p; 12bd4a: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 12bd4d: c9 leave <== NOT EXECUTED 12bd4e: c3 ret <== NOT EXECUTED 12bd4f: 90 nop <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 12bd50: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12bd52: c9 leave <== NOT EXECUTED 12bd53: c3 ret <== NOT EXECUTED 0012bcf4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 12bcf4: 55 push %ebp <== NOT EXECUTED 12bcf5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bcf7: 53 push %ebx <== NOT EXECUTED 12bcf8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12bcfb: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12bcfe: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 12bd01: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 12bd05: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 12bd08: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12bd0b: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 12bd0e: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 12bd11: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12bd14: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12bd16: 5b pop %ebx <== NOT EXECUTED 12bd17: 5b pop %ebx <== NOT EXECUTED 12bd18: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 12bd19: e9 06 ff ff ff jmp 12bc24 <== NOT EXECUTED 0010fb70 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 10fb70: 55 push %ebp 10fb71: 89 e5 mov %esp,%ebp 10fb73: 56 push %esi 10fb74: 53 push %ebx 10fb75: 83 ec 20 sub $0x20,%esp 10fb78: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10fb7b: 85 db test %ebx,%ebx 10fb7d: 74 42 je 10fbc1 <== ALWAYS TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10fb7f: 9c pushf 10fb80: fa cli 10fb81: 5e pop %esi _TOD_Get( &now ); 10fb82: 83 ec 0c sub $0xc,%esp 10fb85: 8d 45 f0 lea -0x10(%ebp),%eax 10fb88: 50 push %eax 10fb89: e8 d2 0f 00 00 call 110b60 <_TOD_Get> _ISR_Enable(level); 10fb8e: 56 push %esi 10fb8f: 9d popf useconds = (suseconds_t)now.tv_nsec; 10fb90: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10fb93: 8b 45 f0 mov -0x10(%ebp),%eax 10fb96: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 10fb98: be d3 4d 62 10 mov $0x10624dd3,%esi 10fb9d: 89 c8 mov %ecx,%eax 10fb9f: f7 ee imul %esi 10fba1: 89 45 e0 mov %eax,-0x20(%ebp) 10fba4: 89 55 e4 mov %edx,-0x1c(%ebp) 10fba7: 8b 75 e4 mov -0x1c(%ebp),%esi 10fbaa: c1 fe 06 sar $0x6,%esi 10fbad: 89 c8 mov %ecx,%eax 10fbaf: 99 cltd 10fbb0: 29 d6 sub %edx,%esi 10fbb2: 89 73 04 mov %esi,0x4(%ebx) 10fbb5: 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; 10fbb7: 83 c4 10 add $0x10,%esp } 10fbba: 8d 65 f8 lea -0x8(%ebp),%esp 10fbbd: 5b pop %ebx 10fbbe: 5e pop %esi 10fbbf: c9 leave 10fbc0: c3 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 10fbc1: e8 0a 3b 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10fbc6: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10fbcc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 10fbd1: eb e7 jmp 10fbba <== NOT EXECUTED 0010bf00 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 10bf00: 55 push %ebp <== NOT EXECUTED 10bf01: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10bf03: a1 84 92 16 00 mov 0x169284,%eax <== NOT EXECUTED 10bf08: 66 8b 40 32 mov 0x32(%eax),%ax <== NOT EXECUTED return _POSIX_types_Uid; } 10bf0c: c9 leave <== NOT EXECUTED 10bf0d: c3 ret <== NOT EXECUTED 00117884 : rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 117884: 55 push %ebp 117885: 89 e5 mov %esp,%ebp 117887: 57 push %edi 117888: 56 push %esi 117889: 53 push %ebx 11788a: 83 ec 1c sub $0x1c,%esp 11788d: 8b 5d 08 mov 0x8(%ebp),%ebx switch( whence ) { 117890: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 117894: 76 1e jbe 1178b4 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 ); 117896: e8 a1 0f 00 00 call 11883c <__errno> 11789b: c7 00 16 00 00 00 movl $0x16,(%eax) 1178a1: b8 ff ff ff ff mov $0xffffffff,%eax 1178a6: ba ff ff ff ff mov $0xffffffff,%edx break; } return 0; } 1178ab: 8d 65 f4 lea -0xc(%ebp),%esp 1178ae: 5b pop %ebx 1178af: 5e pop %esi 1178b0: 5f pop %edi 1178b1: c9 leave 1178b2: c3 ret 1178b3: 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)) * 1178b4: 6a 00 push $0x0 1178b6: 68 10 01 00 00 push $0x110 1178bb: ff 73 10 pushl 0x10(%ebx) 1178be: ff 73 0c pushl 0xc(%ebx) 1178c1: e8 36 bf 00 00 call 1237fc <__divdi3> 1178c6: 83 c4 10 add $0x10,%esp 1178c9: 69 f2 10 01 00 00 imul $0x110,%edx,%esi 1178cf: b9 10 01 00 00 mov $0x110,%ecx 1178d4: f7 e1 mul %ecx 1178d6: 89 45 e0 mov %eax,-0x20(%ebp) 1178d9: 01 f2 add %esi,%edx 1178db: 89 55 e4 mov %edx,-0x1c(%ebp) 1178de: 8b 45 e0 mov -0x20(%ebp),%eax 1178e1: 8b 55 e4 mov -0x1c(%ebp),%edx 1178e4: 89 43 0c mov %eax,0xc(%ebx) 1178e7: 89 53 10 mov %edx,0x10(%ebx) 1178ea: 31 c0 xor %eax,%eax 1178ec: 31 d2 xor %edx,%edx rtems_set_errno_and_return_minus_one( EINVAL ); break; } return 0; } 1178ee: 8d 65 f4 lea -0xc(%ebp),%esp 1178f1: 5b pop %ebx 1178f2: 5e pop %esi 1178f3: 5f pop %edi 1178f4: c9 leave 1178f5: c3 ret 0011779c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 11779c: 55 push %ebp 11779d: 89 e5 mov %esp,%ebp 11779f: 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; 1177a2: 8b 50 38 mov 0x38(%eax),%edx 1177a5: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 1177a9: 74 09 je 1177b4 <== NEVER TAKEN 1177ab: 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; } 1177b0: c9 leave <== NOT EXECUTED 1177b1: c3 ret <== NOT EXECUTED 1177b2: 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; 1177b4: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 1177bb: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 1177c2: 31 c0 xor %eax,%eax return 0; } 1177c4: c9 leave 1177c5: c3 ret 001179d4 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1179d4: 55 push %ebp 1179d5: 89 e5 mov %esp,%ebp 1179d7: 57 push %edi 1179d8: 56 push %esi 1179d9: 53 push %ebx 1179da: 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; 1179e0: 8b 55 08 mov 0x8(%ebp),%edx 1179e3: 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)); 1179e6: 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; 1179e9: 83 c0 54 add $0x54,%eax 1179ec: 89 85 cc fe ff ff mov %eax,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 1179f2: 39 c3 cmp %eax,%ebx 1179f4: 0f 84 2a 01 00 00 je 117b24 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 1179fa: 8b 45 08 mov 0x8(%ebp),%eax 1179fd: 8b 40 0c mov 0xc(%eax),%eax 117a00: 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); 117a06: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx 117a0b: 8b 45 10 mov 0x10(%ebp),%eax 117a0e: f7 e2 mul %edx 117a10: c1 ea 08 shr $0x8,%edx 117a13: 89 d0 mov %edx,%eax 117a15: c1 e0 04 shl $0x4,%eax 117a18: c1 e2 08 shl $0x8,%edx 117a1b: 8d 14 10 lea (%eax,%edx,1),%edx 117a1e: 03 95 d0 fe ff ff add -0x130(%ebp),%edx 117a24: 89 95 d4 fe ff ff mov %edx,-0x12c(%ebp) /* The directory was not empty so try to move to the desired entry in chain*/ for ( 117a2a: 85 d2 test %edx,%edx 117a2c: 0f 8e f2 00 00 00 jle 117b24 <== ALWAYS TAKEN 117a32: 31 d2 xor %edx,%edx 117a34: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 117a3b: 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 ); 117a3e: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax 117a44: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) 117a4a: eb 20 jmp 117a6c ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 117a4c: 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( 117a4e: 81 c2 10 01 00 00 add $0x110,%edx /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 117a54: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 117a5a: 0f 8d b4 00 00 00 jge 117b14 <== 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 ) ){ 117a60: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 117a66: 0f 84 a8 00 00 00 je 117b14 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 117a6c: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 117a72: 7f d8 jg 117a4c /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 117a74: 89 95 dc fe ff ff mov %edx,-0x124(%ebp) 117a7a: 89 d0 mov %edx,%eax 117a7c: c1 f8 1f sar $0x1f,%eax 117a7f: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 117a85: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 117a8c: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 117a8e: 8b 43 38 mov 0x38(%ebx),%eax 117a91: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 117a97: 8d 73 0c lea 0xc(%ebx),%esi 117a9a: 31 c0 xor %eax,%eax 117a9c: b9 ff ff ff ff mov $0xffffffff,%ecx 117aa1: 89 f7 mov %esi,%edi 117aa3: f2 ae repnz scas %es:(%edi),%al 117aa5: f7 d1 not %ecx 117aa7: 49 dec %ecx 117aa8: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 117aaf: 83 ec 08 sub $0x8,%esp 117ab2: 56 push %esi 117ab3: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax 117ab9: 50 push %eax 117aba: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp) 117ac0: e8 ff 17 00 00 call 1192c4 memcpy( 117ac5: 8b 45 0c mov 0xc(%ebp),%eax 117ac8: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 117ace: b9 44 00 00 00 mov $0x44,%ecx 117ad3: 89 c7 mov %eax,%edi 117ad5: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 117adb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 117add: 8b 45 08 mov 0x8(%ebp),%eax 117ae0: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax) 117ae7: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 117aeb: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp) 117af2: 01 00 00 117af5: 83 c4 10 add $0x10,%esp 117af8: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx } the_node = the_node->next; 117afe: 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( 117b00: 81 c2 10 01 00 00 add $0x110,%edx /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 117b06: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 117b0c: 0f 8c 4e ff ff ff jl 117a60 <== ALWAYS TAKEN 117b12: 66 90 xchg %ax,%ax the_node = the_node->next; } /* Success */ return bytes_transferred; } 117b14: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 117b1a: 8d 65 f4 lea -0xc(%ebp),%esp 117b1d: 5b pop %ebx 117b1e: 5e pop %esi 117b1f: 5f pop %edi 117b20: c9 leave 117b21: c3 ret 117b22: 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 ( 117b24: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 117b2b: 00 00 00 the_node = the_node->next; } /* Success */ return bytes_transferred; } 117b2e: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 117b34: 8d 65 f4 lea -0xc(%ebp),%esp 117b37: 5b pop %ebx 117b38: 5e pop %esi 117b39: 5f pop %edi 117b3a: c9 leave 117b3b: c3 ret 001178f8 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1178f8: 55 push %ebp 1178f9: 89 e5 mov %esp,%ebp 1178fb: 56 push %esi 1178fc: 53 push %ebx 1178fd: 83 ec 10 sub $0x10,%esp 117900: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 117903: 8b 1e mov (%esi),%ebx 117905: 8d 43 54 lea 0x54(%ebx),%eax 117908: 39 43 50 cmp %eax,0x50(%ebx) 11790b: 0f 85 8f 00 00 00 jne 1179a0 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 117911: 8b 46 10 mov 0x10(%esi),%eax 117914: 3b 58 1c cmp 0x1c(%eax),%ebx 117917: 0f 84 97 00 00 00 je 1179b4 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 11791d: 8b 43 5c mov 0x5c(%ebx),%eax 117920: 85 c0 test %eax,%eax 117922: 0f 85 8c 00 00 00 jne 1179b4 <== ALWAYS TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 117928: 8b 4b 08 mov 0x8(%ebx),%ecx 11792b: 85 c9 test %ecx,%ecx 11792d: 74 13 je 117942 11792f: 83 ec 0c sub $0xc,%esp 117932: 53 push %ebx 117933: e8 c4 5e ff ff call 10d7fc <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 117938: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 11793f: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 117942: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 117946: 83 ec 08 sub $0x8,%esp 117949: 6a 00 push $0x0 11794b: 8d 45 f0 lea -0x10(%ebp),%eax 11794e: 50 push %eax 11794f: e8 38 1b ff ff call 10948c 117954: 8b 45 f0 mov -0x10(%ebp),%eax 117957: 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) ) { 11795a: 89 1c 24 mov %ebx,(%esp) 11795d: e8 1e ce ff ff call 114780 117962: 83 c4 10 add $0x10,%esp 117965: 85 c0 test %eax,%eax 117967: 75 2b jne 117994 117969: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 11796e: 75 24 jne 117994 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 117970: a1 58 a6 12 00 mov 0x12a658,%eax 117975: 8b 50 04 mov 0x4(%eax),%edx 117978: 3b 16 cmp (%esi),%edx 11797a: 74 4c je 1179c8 <== ALWAYS TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); 11797c: 83 ec 0c sub $0xc,%esp 11797f: 53 push %ebx 117980: e8 8b 1a ff ff call 109410 117985: 31 c0 xor %eax,%eax 117987: 83 c4 10 add $0x10,%esp } return 0; } 11798a: 8d 65 f8 lea -0x8(%ebp),%esp 11798d: 5b pop %ebx 11798e: 5e pop %esi 11798f: c9 leave 117990: c3 ret 117991: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 117994: 31 c0 xor %eax,%eax } return 0; } 117996: 8d 65 f8 lea -0x8(%ebp),%esp 117999: 5b pop %ebx 11799a: 5e pop %esi 11799b: c9 leave 11799c: c3 ret 11799d: 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 ); 1179a0: e8 97 0e 00 00 call 11883c <__errno> 1179a5: c7 00 5a 00 00 00 movl $0x5a,(%eax) 1179ab: b8 ff ff ff ff mov $0xffffffff,%eax 1179b0: eb e4 jmp 117996 1179b2: 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 ); 1179b4: e8 83 0e 00 00 call 11883c <__errno> 1179b9: c7 00 10 00 00 00 movl $0x10,(%eax) 1179bf: b8 ff ff ff ff mov $0xffffffff,%eax 1179c4: eb d0 jmp 117996 1179c6: 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; 1179c8: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 1179cf: eb ab jmp 11797c <== NOT EXECUTED 0012b91c : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 12b91c: 55 push %ebp 12b91d: 89 e5 mov %esp,%ebp 12b91f: 53 push %ebx 12b920: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 12b923: 80 3d 40 e8 16 00 00 cmpb $0x0,0x16e840 12b92a: 74 08 je 12b934 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 12b92c: 8b 5d fc mov -0x4(%ebp),%ebx 12b92f: c9 leave 12b930: c3 ret 12b931: 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; 12b934: c6 05 40 e8 16 00 01 movb $0x1,0x16e840 mkdir("/etc", 0777); 12b93b: 83 ec 08 sub $0x8,%esp 12b93e: 68 ff 01 00 00 push $0x1ff 12b943: 68 b5 8e 15 00 push $0x158eb5 12b948: e8 53 0b fe ff call 10c4a0 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 12b94d: 59 pop %ecx 12b94e: 5b pop %ebx 12b94f: 68 6d c0 15 00 push $0x15c06d 12b954: 68 cb 8e 15 00 push $0x158ecb 12b959: e8 32 78 01 00 call 143190 12b95e: 83 c4 10 add $0x10,%esp 12b961: 85 c0 test %eax,%eax 12b963: 74 77 je 12b9dc <== NEVER TAKEN fclose(fp); 12b965: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b968: 50 push %eax <== NOT EXECUTED 12b969: e8 0a 70 01 00 call 142978 <== NOT EXECUTED 12b96e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 12b971: 83 ec 08 sub $0x8,%esp 12b974: 68 6d c0 15 00 push $0x15c06d 12b979: 68 d7 8e 15 00 push $0x158ed7 12b97e: e8 0d 78 01 00 call 143190 12b983: 83 c4 10 add $0x10,%esp 12b986: 85 c0 test %eax,%eax 12b988: 74 12 je 12b99c <== NEVER TAKEN fclose(fp); 12b98a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b98d: 50 push %eax <== NOT EXECUTED 12b98e: e8 e5 6f 01 00 call 142978 <== NOT EXECUTED 12b993: 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); } } 12b996: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12b999: c9 leave <== NOT EXECUTED 12b99a: c3 ret <== NOT EXECUTED 12b99b: 90 nop <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 12b99c: 83 ec 08 sub $0x8,%esp 12b99f: 68 f0 bb 15 00 push $0x15bbf0 12b9a4: 68 d7 8e 15 00 push $0x158ed7 12b9a9: e8 e2 77 01 00 call 143190 12b9ae: 89 c3 mov %eax,%ebx 12b9b0: 83 c4 10 add $0x10,%esp 12b9b3: 85 c0 test %eax,%eax 12b9b5: 0f 84 71 ff ff ff je 12b92c <== ALWAYS TAKEN fprintf( fp, "root:x:0:root\n" 12b9bb: 50 push %eax 12b9bc: 6a 2a push $0x2a 12b9be: 6a 01 push $0x1 12b9c0: 68 50 01 16 00 push $0x160150 12b9c5: e8 42 8a 01 00 call 14440c "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 12b9ca: 89 1c 24 mov %ebx,(%esp) 12b9cd: e8 a6 6f 01 00 call 142978 12b9d2: 83 c4 10 add $0x10,%esp 12b9d5: e9 52 ff ff ff jmp 12b92c 12b9da: 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) { 12b9dc: 83 ec 08 sub $0x8,%esp 12b9df: 68 f0 bb 15 00 push $0x15bbf0 12b9e4: 68 cb 8e 15 00 push $0x158ecb 12b9e9: e8 a2 77 01 00 call 143190 12b9ee: 89 c3 mov %eax,%ebx 12b9f0: 83 c4 10 add $0x10,%esp 12b9f3: 85 c0 test %eax,%eax 12b9f5: 0f 84 76 ff ff ff je 12b971 <== ALWAYS TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 12b9fb: 50 push %eax 12b9fc: 6a 66 push $0x66 12b9fe: 6a 01 push $0x1 12ba00: 68 e8 00 16 00 push $0x1600e8 12ba05: e8 02 8a 01 00 call 14440c "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 12ba0a: 89 1c 24 mov %ebx,(%esp) 12ba0d: e8 66 6f 01 00 call 142978 12ba12: 83 c4 10 add $0x10,%esp 12ba15: e9 57 ff ff ff jmp 12b971 0010b784 : int ioctl( int fd, ioctl_command_t command, ... ) { 10b784: 55 push %ebp 10b785: 89 e5 mov %esp,%ebp 10b787: 83 ec 08 sub $0x8,%esp 10b78a: 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 ); 10b78d: 3b 05 2c 8a 12 00 cmp 0x128a2c,%eax 10b793: 73 2f jae 10b7c4 iop = rtems_libio_iop( fd ); 10b795: c1 e0 06 shl $0x6,%eax 10b798: 03 05 80 cc 12 00 add 0x12cc80,%eax rtems_libio_check_is_open(iop); 10b79e: f6 40 15 01 testb $0x1,0x15(%eax) 10b7a2: 74 20 je 10b7c4 <== ALWAYS TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10b7a4: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10b7a7: 8b 50 3c mov 0x3c(%eax),%edx 10b7aa: 85 d2 test %edx,%edx 10b7ac: 74 16 je 10b7c4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 10b7ae: 8b 52 10 mov 0x10(%edx),%edx 10b7b1: 85 d2 test %edx,%edx 10b7b3: 74 21 je 10b7d6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10b7b5: 83 ec 04 sub $0x4,%esp 10b7b8: 51 push %ecx 10b7b9: ff 75 0c pushl 0xc(%ebp) 10b7bc: 50 push %eax 10b7bd: ff d2 call *%edx return rc; 10b7bf: 83 c4 10 add $0x10,%esp } 10b7c2: c9 leave 10b7c3: c3 ret /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 10b7c4: e8 93 d2 00 00 call 118a5c <__errno> 10b7c9: c7 00 09 00 00 00 movl $0x9,(%eax) 10b7cf: 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; } 10b7d4: c9 leave 10b7d5: 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 ); 10b7d6: e8 81 d2 00 00 call 118a5c <__errno> <== NOT EXECUTED 10b7db: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b7e1: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b7e6: c9 leave <== NOT EXECUTED 10b7e7: c3 ret <== NOT EXECUTED 001099d0 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 1099d0: 55 push %ebp <== NOT EXECUTED 1099d1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1099d3: 56 push %esi <== NOT EXECUTED 1099d4: 53 push %ebx <== NOT EXECUTED 1099d5: 89 d6 mov %edx,%esi <== NOT EXECUTED 1099d7: 88 c3 mov %al,%bl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 1099d9: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 1099dc: a8 20 test $0x20,%al <== NOT EXECUTED 1099de: 74 03 je 1099e3 <== NOT EXECUTED c &= 0x7f; 1099e0: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 1099e3: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 1099e6: 74 18 je 109a00 <== NOT EXECUTED c = tolower (c); 1099e8: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED 1099eb: 8b 15 08 51 12 00 mov 0x125108,%edx <== NOT EXECUTED 1099f1: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx <== NOT EXECUTED 1099f6: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 1099f9: 4a dec %edx <== NOT EXECUTED 1099fa: 0f 84 98 00 00 00 je 109a98 <== NOT EXECUTED if (c == '\r') { 109a00: 80 fb 0d cmp $0xd,%bl <== NOT EXECUTED 109a03: 74 33 je 109a38 <== 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)) { 109a05: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 109a08: 0f 84 82 00 00 00 je 109a90 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 109a0e: 84 db test %bl,%bl <== NOT EXECUTED 109a10: 75 3a jne 109a4c <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 109a12: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 109a15: 8b 15 08 50 12 00 mov 0x125008,%edx <== NOT EXECUTED 109a1b: 4a dec %edx <== NOT EXECUTED 109a1c: 39 d0 cmp %edx,%eax <== NOT EXECUTED 109a1e: 7d 1c jge 109a3c <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 109a20: f6 46 3c 08 testb $0x8,0x3c(%esi) <== NOT EXECUTED 109a24: 75 7a jne 109aa0 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 109a26: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 109a29: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 109a2c: 40 inc %eax <== NOT EXECUTED 109a2d: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 109a30: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 109a32: 5b pop %ebx <== NOT EXECUTED 109a33: 5e pop %esi <== NOT EXECUTED 109a34: c9 leave <== NOT EXECUTED 109a35: c3 ret <== NOT EXECUTED 109a36: 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) 109a38: 84 c0 test %al,%al <== NOT EXECUTED 109a3a: 79 08 jns 109a44 <== 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; 109a3c: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 109a3e: 5b pop %ebx <== NOT EXECUTED 109a3f: 5e pop %esi <== NOT EXECUTED 109a40: c9 leave <== NOT EXECUTED 109a41: c3 ret <== NOT EXECUTED 109a42: 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) 109a44: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 109a47: 74 03 je 109a4c <== NOT EXECUTED 109a49: b3 0a mov $0xa,%bl <== NOT EXECUTED 109a4b: 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)) { 109a4c: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED 109a4f: a8 02 test $0x2,%al <== NOT EXECUTED 109a51: 74 bf je 109a12 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 109a53: 38 5e 43 cmp %bl,0x43(%esi) <== NOT EXECUTED 109a56: 0f 84 a0 00 00 00 je 109afc <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 109a5c: 38 5e 44 cmp %bl,0x44(%esi) <== NOT EXECUTED 109a5f: 74 5f je 109ac0 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 109a61: 38 5e 45 cmp %bl,0x45(%esi) <== NOT EXECUTED 109a64: 74 20 je 109a86 <== NOT EXECUTED return 1; } else if (c == '\n') { 109a66: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 109a69: 74 69 je 109ad4 <== 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]) 109a6b: 38 5e 4c cmp %bl,0x4c(%esi) <== NOT EXECUTED 109a6e: 74 05 je 109a75 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 109a70: 38 5e 51 cmp %bl,0x51(%esi) <== NOT EXECUTED 109a73: 75 9d jne 109a12 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 109a75: a8 08 test $0x8,%al <== NOT EXECUTED 109a77: 75 3b jne 109ab4 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 109a79: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 109a7c: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 109a7f: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 109a82: 40 inc %eax <== NOT EXECUTED 109a83: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 109a86: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 109a8b: eb a5 jmp 109a32 <== NOT EXECUTED 109a8d: 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)) { 109a90: a8 40 test $0x40,%al <== NOT EXECUTED 109a92: 74 b8 je 109a4c <== NOT EXECUTED 109a94: b3 0d mov $0xd,%bl <== NOT EXECUTED 109a96: eb b4 jmp 109a4c <== 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); 109a98: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED 109a9b: e9 60 ff ff ff jmp 109a00 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 109aa0: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 109aa3: 89 f2 mov %esi,%edx <== NOT EXECUTED 109aa5: e8 f6 fc ff ff call 1097a0 <== NOT EXECUTED 109aaa: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 109aad: e9 74 ff ff ff jmp 109a26 <== NOT EXECUTED 109ab2: 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); 109ab4: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 109ab7: 89 f2 mov %esi,%edx <== NOT EXECUTED 109ab9: e8 e2 fc ff ff call 1097a0 <== NOT EXECUTED 109abe: eb b9 jmp 109a79 <== 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); 109ac0: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 109ac5: 89 f0 mov %esi,%eax <== NOT EXECUTED 109ac7: e8 38 fd ff ff call 109804 <== NOT EXECUTED 109acc: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 109ace: e9 5f ff ff ff jmp 109a32 <== NOT EXECUTED 109ad3: 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)) 109ad4: a8 48 test $0x48,%al <== NOT EXECUTED 109ad6: 74 0c je 109ae4 <== NOT EXECUTED echo (c, tty); 109ad8: 89 f2 mov %esi,%edx <== NOT EXECUTED 109ada: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 109adf: e8 bc fc ff ff call 1097a0 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 109ae4: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 109ae7: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 109aea: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 109aee: 40 inc %eax <== NOT EXECUTED 109aef: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 109af2: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 109af7: e9 36 ff ff ff jmp 109a32 <== 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); 109afc: 31 d2 xor %edx,%edx <== NOT EXECUTED 109afe: 89 f0 mov %esi,%eax <== NOT EXECUTED 109b00: e8 ff fc ff ff call 109804 <== NOT EXECUTED 109b05: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 109b07: e9 26 ff ff ff jmp 109a32 <== NOT EXECUTED 0011315c : int killinfo( pid_t pid, int sig, const union sigval *value ) { 11315c: 55 push %ebp 11315d: 89 e5 mov %esp,%ebp 11315f: 57 push %edi 113160: 56 push %esi 113161: 53 push %ebx 113162: 83 ec 3c sub $0x3c,%esp 113165: 8b 75 0c mov 0xc(%ebp),%esi 113168: 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() ) 11316b: e8 34 f1 ff ff call 1122a4 113170: 3b 45 08 cmp 0x8(%ebp),%eax 113173: 0f 85 2f 02 00 00 jne 1133a8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 113179: 85 f6 test %esi,%esi 11317b: 0f 84 3c 02 00 00 je 1133bd <== ALWAYS TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 113181: 8d 4e ff lea -0x1(%esi),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 113184: 83 f9 1f cmp $0x1f,%ecx 113187: 0f 87 30 02 00 00 ja 1133bd <== ALWAYS TAKEN 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 ) 11318d: 8d 04 76 lea (%esi,%esi,2),%eax 113190: 83 3c 85 e8 79 12 00 cmpl $0x1,0x1279e8(,%eax,4) 113197: 01 113198: 0f 84 cf 00 00 00 je 11326d /* * 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 ) ) 11319e: 83 fe 08 cmp $0x8,%esi 1131a1: 0f 84 d1 00 00 00 je 113278 1131a7: 83 fe 04 cmp $0x4,%esi 1131aa: 0f 84 c8 00 00 00 je 113278 1131b0: 83 fe 0b cmp $0xb,%esi 1131b3: 0f 84 bf 00 00 00 je 113278 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1131b9: bb 01 00 00 00 mov $0x1,%ebx 1131be: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 1131c0: 89 75 dc mov %esi,-0x24(%ebp) siginfo->si_code = SI_USER; 1131c3: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 1131ca: 85 ff test %edi,%edi 1131cc: 0f 84 ca 01 00 00 je 11339c siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 1131d2: 8b 07 mov (%edi),%eax 1131d4: 89 45 e4 mov %eax,-0x1c(%ebp) 1131d7: a1 f8 73 12 00 mov 0x1273f8,%eax 1131dc: 40 inc %eax 1131dd: a3 f8 73 12 00 mov %eax,0x1273f8 /* * 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; 1131e2: 8b 0d b8 74 12 00 mov 0x1274b8,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1131e8: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax 1131ee: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 1131f4: f7 d0 not %eax 1131f6: 85 c3 test %eax,%ebx 1131f8: 75 34 jne 11322e /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 1131fa: a1 80 7b 12 00 mov 0x127b80,%eax 1131ff: 3d 84 7b 12 00 cmp $0x127b84,%eax 113204: 75 1b jne 113221 113206: e9 89 00 00 00 jmp 113294 11320b: 90 nop <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 11320c: 8b 92 cc 00 00 00 mov 0xcc(%edx),%edx 113212: f7 d2 not %edx 113214: 85 d3 test %edx,%ebx 113216: 75 16 jne 11322e 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 ) { 113218: 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 ; 11321a: 3d 84 7b 12 00 cmp $0x127b84,%eax 11321f: 74 73 je 113294 <== NEVER TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 113221: 89 c1 mov %eax,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 113223: 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) 113229: 85 58 30 test %ebx,0x30(%eax) 11322c: 74 de je 11320c * 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; 11322e: 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 ) ) { 113232: 50 push %eax 113233: 8d 45 dc lea -0x24(%ebp),%eax 113236: 50 push %eax 113237: 56 push %esi 113238: 51 push %ecx 113239: e8 1e 02 00 00 call 11345c <_POSIX_signals_Unblock_thread> 11323e: 83 c4 10 add $0x10,%esp 113241: 84 c0 test %al,%al 113243: 0f 85 47 01 00 00 jne 113390 <== ALWAYS TAKEN /* * 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 ); 113249: 83 ec 0c sub $0xc,%esp 11324c: 53 push %ebx 11324d: e8 e6 01 00 00 call 113438 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 113252: 8d 1c 76 lea (%esi,%esi,2),%ebx 113255: c1 e3 02 shl $0x2,%ebx 113258: 83 c4 10 add $0x10,%esp 11325b: 83 bb e0 79 12 00 02 cmpl $0x2,0x1279e0(%ebx) 113262: 0f 84 ec 00 00 00 je 113354 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 113268: e8 e7 a2 ff ff call 10d554 <_Thread_Enable_dispatch> 11326d: 31 c0 xor %eax,%eax return 0; } 11326f: 8d 65 f4 lea -0xc(%ebp),%esp 113272: 5b pop %ebx 113273: 5e pop %esi 113274: 5f pop %edi 113275: c9 leave 113276: c3 ret 113277: 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 ); 113278: e8 c3 03 00 00 call 113640 11327d: 83 ec 08 sub $0x8,%esp 113280: 56 push %esi 113281: 50 push %eax 113282: e8 f1 02 00 00 call 113578 113287: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 11328a: 8d 65 f4 lea -0xc(%ebp),%esp 11328d: 5b pop %ebx 11328e: 5e pop %esi 11328f: 5f pop %edi 113290: c9 leave 113291: c3 ret 113292: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 113294: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 11329b: 40 inc %eax 11329c: 89 45 d4 mov %eax,-0x2c(%ebp) 11329f: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 1132a6: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) 1132ad: 89 5d cc mov %ebx,-0x34(%ebp) 1132b0: 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 ] ) 1132b3: 8b 55 d0 mov -0x30(%ebp),%edx 1132b6: 8b 04 95 cc 73 12 00 mov 0x1273cc(,%edx,4),%eax 1132bd: 85 c0 test %eax,%eax 1132bf: 74 6c je 11332d continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 1132c1: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 1132c4: 0f b7 70 10 movzwl 0x10(%eax),%esi object_table = the_info->local_table; 1132c8: 8b 78 1c mov 0x1c(%eax),%edi for ( index = 1 ; index <= maximum ; index++ ) { 1132cb: 85 f6 test %esi,%esi 1132cd: 74 5e je 11332d 1132cf: b8 01 00 00 00 mov $0x1,%eax the_thread = (Thread_Control *) object_table[ index ]; 1132d4: 8b 14 87 mov (%edi,%eax,4),%edx if ( !the_thread ) 1132d7: 85 d2 test %edx,%edx 1132d9: 74 4d je 113328 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 1132db: 8b 4a 14 mov 0x14(%edx),%ecx 1132de: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1132e1: 77 45 ja 113328 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1132e3: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx 1132e9: 8b 9b cc 00 00 00 mov 0xcc(%ebx),%ebx 1132ef: f7 d3 not %ebx 1132f1: 85 5d cc test %ebx,-0x34(%ebp) 1132f4: 74 32 je 113328 * * 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 ) { 1132f6: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1132f9: 72 25 jb 113320 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 1132fb: 8b 5d c8 mov -0x38(%ebp),%ebx 1132fe: 8b 5b 10 mov 0x10(%ebx),%ebx 113301: 89 5d c4 mov %ebx,-0x3c(%ebp) 113304: 85 db test %ebx,%ebx 113306: 74 20 je 113328 <== ALWAYS TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 113308: 8b 5a 10 mov 0x10(%edx),%ebx 11330b: 85 db test %ebx,%ebx 11330d: 74 11 je 113320 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 11330f: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp) 113316: 75 10 jne 113328 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 113318: 81 e3 00 00 00 10 and $0x10000000,%ebx 11331e: 74 08 je 113328 113320: 89 4d d4 mov %ecx,-0x2c(%ebp) 113323: 89 55 c8 mov %edx,-0x38(%ebp) 113326: 66 90 xchg %ax,%ax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 113328: 40 inc %eax 113329: 39 c6 cmp %eax,%esi 11332b: 73 a7 jae 1132d4 * + 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++) { 11332d: ff 45 d0 incl -0x30(%ebp) 113330: 83 7d d0 05 cmpl $0x5,-0x30(%ebp) 113334: 0f 85 79 ff ff ff jne 1132b3 11333a: 8b 5d cc mov -0x34(%ebp),%ebx 11333d: 8b 75 c0 mov -0x40(%ebp),%esi } } } } if ( interested ) { 113340: 8b 55 c8 mov -0x38(%ebp),%edx 113343: 85 d2 test %edx,%edx 113345: 0f 84 fe fe ff ff je 113249 11334b: 8b 4d c8 mov -0x38(%ebp),%ecx 11334e: e9 db fe ff ff jmp 11322e 113353: 90 nop <== NOT EXECUTED */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 113354: 83 ec 0c sub $0xc,%esp 113357: 68 60 7b 12 00 push $0x127b60 11335c: e8 db 8b ff ff call 10bf3c <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 113361: 83 c4 10 add $0x10,%esp 113364: 85 c0 test %eax,%eax 113366: 74 6a je 1133d2 <== ALWAYS TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 113368: 8d 78 08 lea 0x8(%eax),%edi 11336b: 8d 75 dc lea -0x24(%ebp),%esi 11336e: b9 03 00 00 00 mov $0x3,%ecx 113373: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 113375: 83 ec 08 sub $0x8,%esp 113378: 50 push %eax 113379: 81 c3 00 7c 12 00 add $0x127c00,%ebx 11337f: 53 push %ebx 113380: e8 93 8b ff ff call 10bf18 <_Chain_Append> 113385: 83 c4 10 add $0x10,%esp 113388: e9 db fe ff ff jmp 113268 11338d: 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(); 113390: e8 bf a1 ff ff call 10d554 <_Thread_Enable_dispatch> 113395: 31 c0 xor %eax,%eax return 0; 113397: e9 ee fe ff ff jmp 11328a */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 11339c: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1133a3: e9 2f fe ff ff jmp 1131d7 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 1133a8: e8 23 03 00 00 call 1136d0 <__errno> 1133ad: c7 00 03 00 00 00 movl $0x3,(%eax) 1133b3: b8 ff ff ff ff mov $0xffffffff,%eax 1133b8: e9 cd fe ff ff jmp 11328a */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 1133bd: e8 0e 03 00 00 call 1136d0 <__errno> 1133c2: c7 00 16 00 00 00 movl $0x16,(%eax) 1133c8: b8 ff ff ff ff mov $0xffffffff,%eax 1133cd: e9 b8 fe ff ff jmp 11328a 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(); 1133d2: e8 7d a1 ff ff call 10d554 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 1133d7: e8 f4 02 00 00 call 1136d0 <__errno> 1133dc: c7 00 0b 00 00 00 movl $0xb,(%eax) 1133e2: 83 c8 ff or $0xffffffff,%eax 1133e5: e9 a0 fe ff ff jmp 11328a 0011eb08 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11eb08: 55 push %ebp 11eb09: 89 e5 mov %esp,%ebp 11eb0b: 53 push %ebx 11eb0c: 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())) 11eb0f: 83 3d c0 75 12 00 03 cmpl $0x3,0x1275c0 11eb16: 74 08 je 11eb20 */ fclose (stdin); fclose (stdout); fclose (stderr); } 11eb18: 8b 5d fc mov -0x4(%ebp),%ebx 11eb1b: c9 leave 11eb1c: c3 ret 11eb1d: 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) { 11eb20: 8b 1d a0 18 12 00 mov 0x1218a0,%ebx 11eb26: 39 1d 20 51 12 00 cmp %ebx,0x125120 11eb2c: 74 12 je 11eb40 _wrapup_reent(_global_impure_ptr); 11eb2e: 83 ec 0c sub $0xc,%esp 11eb31: 53 push %ebx 11eb32: e8 f5 04 00 00 call 11f02c <_wrapup_reent> /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; 11eb37: 89 1d 20 51 12 00 mov %ebx,0x125120 11eb3d: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11eb40: 83 ec 0c sub $0xc,%esp 11eb43: ff 73 04 pushl 0x4(%ebx) 11eb46: e8 d1 4c ff ff call 11381c fclose (stdout); 11eb4b: 5a pop %edx 11eb4c: a1 20 51 12 00 mov 0x125120,%eax 11eb51: ff 70 08 pushl 0x8(%eax) 11eb54: e8 c3 4c ff ff call 11381c fclose (stderr); 11eb59: 58 pop %eax 11eb5a: a1 20 51 12 00 mov 0x125120,%eax 11eb5f: ff 70 0c pushl 0xc(%eax) 11eb62: e8 b5 4c ff ff call 11381c 11eb67: 83 c4 10 add $0x10,%esp } 11eb6a: 8b 5d fc mov -0x4(%ebp),%ebx 11eb6d: c9 leave 11eb6e: c3 ret 0012be18 : int link( const char *existing, const char *new ) { 12be18: 55 push %ebp 12be19: 89 e5 mov %esp,%ebp 12be1b: 57 push %edi 12be1c: 56 push %esi 12be1d: 53 push %ebx 12be1e: 83 ec 48 sub $0x48,%esp 12be21: 8b 55 08 mov 0x8(%ebp),%edx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 12be24: 31 c0 xor %eax,%eax 12be26: b9 ff ff ff ff mov $0xffffffff,%ecx 12be2b: 89 d7 mov %edx,%edi 12be2d: f2 ae repnz scas %es:(%edi),%al 12be2f: f7 d1 not %ecx 12be31: 49 dec %ecx 12be32: 6a 01 push $0x1 12be34: 8d 45 d0 lea -0x30(%ebp),%eax 12be37: 50 push %eax 12be38: 6a 00 push $0x0 12be3a: 51 push %ecx 12be3b: 52 push %edx 12be3c: e8 07 ff fd ff call 10bd48 0, &existing_loc, true ); if ( result != 0 ) 12be41: 83 c4 20 add $0x20,%esp 12be44: 85 c0 test %eax,%eax 12be46: 0f 85 e0 00 00 00 jne 12bf2c /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 12be4c: 8b 55 0c mov 0xc(%ebp),%edx 12be4f: 8a 02 mov (%edx),%al 12be51: 3c 2f cmp $0x2f,%al 12be53: 74 0c je 12be61 12be55: 3c 5c cmp $0x5c,%al 12be57: 74 08 je 12be61 <== ALWAYS TAKEN 12be59: 84 c0 test %al,%al 12be5b: 0f 85 db 00 00 00 jne 12bf3c <== NEVER TAKEN 12be61: 8d 5d bc lea -0x44(%ebp),%ebx 12be64: 8b 35 84 92 16 00 mov 0x169284,%esi 12be6a: 83 c6 18 add $0x18,%esi 12be6d: b9 05 00 00 00 mov $0x5,%ecx 12be72: 89 df mov %ebx,%edi 12be74: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12be76: ba 01 00 00 00 mov $0x1,%edx if ( !parent_loc.ops->evalformake_h ) { 12be7b: 8b 45 c8 mov -0x38(%ebp),%eax 12be7e: 8b 40 04 mov 0x4(%eax),%eax 12be81: 85 c0 test %eax,%eax 12be83: 74 7f je 12bf04 <== 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 ); 12be85: 51 push %ecx 12be86: 8d 4d e4 lea -0x1c(%ebp),%ecx 12be89: 51 push %ecx 12be8a: 53 push %ebx 12be8b: 03 55 0c add 0xc(%ebp),%edx 12be8e: 52 push %edx 12be8f: ff d0 call *%eax 12be91: 89 c6 mov %eax,%esi if ( result != 0 ) { 12be93: 83 c4 10 add $0x10,%esp 12be96: 85 c0 test %eax,%eax 12be98: 0f 85 06 01 00 00 jne 12bfa4 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 12be9e: 8b 45 cc mov -0x34(%ebp),%eax 12bea1: 3b 45 e0 cmp -0x20(%ebp),%eax 12bea4: 0f 85 ae 00 00 00 jne 12bf58 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 12beaa: 8b 55 c8 mov -0x38(%ebp),%edx 12bead: 8b 42 08 mov 0x8(%edx),%eax 12beb0: 85 c0 test %eax,%eax 12beb2: 0f 84 17 01 00 00 je 12bfcf <== 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 ); 12beb8: 52 push %edx 12beb9: ff 75 e4 pushl -0x1c(%ebp) 12bebc: 53 push %ebx 12bebd: 8d 55 d0 lea -0x30(%ebp),%edx 12bec0: 52 push %edx 12bec1: ff d0 call *%eax 12bec3: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &existing_loc ); 12bec5: 8b 45 dc mov -0x24(%ebp),%eax 12bec8: 83 c4 10 add $0x10,%esp 12becb: 85 c0 test %eax,%eax 12becd: 74 13 je 12bee2 <== ALWAYS TAKEN 12becf: 8b 40 1c mov 0x1c(%eax),%eax 12bed2: 85 c0 test %eax,%eax 12bed4: 74 0c je 12bee2 <== ALWAYS TAKEN 12bed6: 83 ec 0c sub $0xc,%esp 12bed9: 8d 55 d0 lea -0x30(%ebp),%edx 12bedc: 52 push %edx 12bedd: ff d0 call *%eax 12bedf: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 12bee2: 8b 45 c8 mov -0x38(%ebp),%eax 12bee5: 85 c0 test %eax,%eax 12bee7: 74 10 je 12bef9 <== ALWAYS TAKEN 12bee9: 8b 40 1c mov 0x1c(%eax),%eax 12beec: 85 c0 test %eax,%eax 12beee: 74 09 je 12bef9 <== ALWAYS TAKEN 12bef0: 83 ec 0c sub $0xc,%esp 12bef3: 53 push %ebx 12bef4: ff d0 call *%eax 12bef6: 83 c4 10 add $0x10,%esp return result; } 12bef9: 89 f0 mov %esi,%eax 12befb: 8d 65 f4 lea -0xc(%ebp),%esp 12befe: 5b pop %ebx 12beff: 5e pop %esi 12bf00: 5f pop %edi 12bf01: c9 leave 12bf02: c3 ret 12bf03: 90 nop <== NOT EXECUTED */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 12bf04: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 12bf07: 85 c0 test %eax,%eax <== NOT EXECUTED 12bf09: 74 13 je 12bf1e <== NOT EXECUTED 12bf0b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12bf0e: 85 c0 test %eax,%eax <== NOT EXECUTED 12bf10: 74 0c je 12bf1e <== NOT EXECUTED 12bf12: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bf15: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 12bf18: 52 push %edx <== NOT EXECUTED 12bf19: ff d0 call *%eax <== NOT EXECUTED 12bf1b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12bf1e: e8 09 69 01 00 call 14282c <__errno> <== NOT EXECUTED 12bf23: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12bf29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12bf2c: be ff ff ff ff mov $0xffffffff,%esi rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 12bf31: 89 f0 mov %esi,%eax 12bf33: 8d 65 f4 lea -0xc(%ebp),%esp 12bf36: 5b pop %ebx 12bf37: 5e pop %esi 12bf38: 5f pop %edi 12bf39: c9 leave 12bf3a: c3 ret 12bf3b: 90 nop <== NOT EXECUTED /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 12bf3c: 8d 5d bc lea -0x44(%ebp),%ebx 12bf3f: 8b 35 84 92 16 00 mov 0x169284,%esi 12bf45: 83 c6 04 add $0x4,%esi 12bf48: b9 05 00 00 00 mov $0x5,%ecx 12bf4d: 89 df mov %ebx,%edi 12bf4f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12bf51: 31 d2 xor %edx,%edx 12bf53: e9 23 ff ff ff jmp 12be7b * 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 ); 12bf58: 8b 45 dc mov -0x24(%ebp),%eax 12bf5b: 85 c0 test %eax,%eax 12bf5d: 74 13 je 12bf72 <== ALWAYS TAKEN 12bf5f: 8b 40 1c mov 0x1c(%eax),%eax 12bf62: 85 c0 test %eax,%eax 12bf64: 74 0c je 12bf72 <== ALWAYS TAKEN 12bf66: 83 ec 0c sub $0xc,%esp 12bf69: 8d 55 d0 lea -0x30(%ebp),%edx 12bf6c: 52 push %edx 12bf6d: ff d0 call *%eax 12bf6f: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 12bf72: 8b 45 c8 mov -0x38(%ebp),%eax 12bf75: 85 c0 test %eax,%eax 12bf77: 74 10 je 12bf89 <== ALWAYS TAKEN 12bf79: 8b 40 1c mov 0x1c(%eax),%eax 12bf7c: 85 c0 test %eax,%eax 12bf7e: 74 09 je 12bf89 <== ALWAYS TAKEN 12bf80: 83 ec 0c sub $0xc,%esp 12bf83: 53 push %ebx 12bf84: ff d0 call *%eax 12bf86: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 12bf89: e8 9e 68 01 00 call 14282c <__errno> 12bf8e: c7 00 12 00 00 00 movl $0x12,(%eax) 12bf94: be ff ff ff ff mov $0xffffffff,%esi rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 12bf99: 89 f0 mov %esi,%eax 12bf9b: 8d 65 f4 lea -0xc(%ebp),%esp 12bf9e: 5b pop %ebx 12bf9f: 5e pop %esi 12bfa0: 5f pop %edi 12bfa1: c9 leave 12bfa2: c3 ret 12bfa3: 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 ); 12bfa4: 8b 45 dc mov -0x24(%ebp),%eax 12bfa7: 85 c0 test %eax,%eax 12bfa9: 74 13 je 12bfbe <== ALWAYS TAKEN 12bfab: 8b 40 1c mov 0x1c(%eax),%eax 12bfae: 85 c0 test %eax,%eax 12bfb0: 74 0c je 12bfbe <== ALWAYS TAKEN 12bfb2: 83 ec 0c sub $0xc,%esp 12bfb5: 8d 55 d0 lea -0x30(%ebp),%edx 12bfb8: 52 push %edx 12bfb9: ff d0 call *%eax 12bfbb: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 12bfbe: e8 69 68 01 00 call 14282c <__errno> 12bfc3: 89 30 mov %esi,(%eax) 12bfc5: be ff ff ff ff mov $0xffffffff,%esi 12bfca: e9 2a ff ff ff jmp 12bef9 rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 12bfcf: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 12bfd2: 85 c0 test %eax,%eax <== NOT EXECUTED 12bfd4: 74 16 je 12bfec <== NOT EXECUTED 12bfd6: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12bfd9: 85 c0 test %eax,%eax <== NOT EXECUTED 12bfdb: 74 0f je 12bfec <== NOT EXECUTED 12bfdd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bfe0: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 12bfe3: 52 push %edx <== NOT EXECUTED 12bfe4: ff d0 call *%eax <== NOT EXECUTED 12bfe6: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 12bfe9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 12bfec: 85 d2 test %edx,%edx <== NOT EXECUTED 12bfee: 74 10 je 12c000 <== NOT EXECUTED 12bff0: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12bff3: 85 c0 test %eax,%eax <== NOT EXECUTED 12bff5: 74 09 je 12c000 <== NOT EXECUTED 12bff7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bffa: 53 push %ebx <== NOT EXECUTED 12bffb: ff d0 call *%eax <== NOT EXECUTED 12bffd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12c000: e8 27 68 01 00 call 14282c <__errno> <== NOT EXECUTED 12c005: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12c00b: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 12c010: e9 e4 fe ff ff jmp 12bef9 <== NOT EXECUTED 0011e9c0 : off_t lseek( int fd, off_t offset, int whence ) { 11e9c0: 55 push %ebp 11e9c1: 89 e5 mov %esp,%ebp 11e9c3: 57 push %edi 11e9c4: 56 push %esi 11e9c5: 53 push %ebx 11e9c6: 83 ec 2c sub $0x2c,%esp 11e9c9: 8b 5d 08 mov 0x8(%ebp),%ebx 11e9cc: 8b 75 0c mov 0xc(%ebp),%esi 11e9cf: 8b 7d 10 mov 0x10(%ebp),%edi 11e9d2: 8b 45 14 mov 0x14(%ebp),%eax rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11e9d5: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 11e9db: 0f 83 b7 00 00 00 jae 11ea98 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 11e9e1: c1 e3 06 shl $0x6,%ebx 11e9e4: 03 1d 60 72 12 00 add 0x127260,%ebx rtems_libio_check_is_open(iop); 11e9ea: f6 43 15 01 testb $0x1,0x15(%ebx) 11e9ee: 0f 84 a4 00 00 00 je 11ea98 <== ALWAYS TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11e9f4: 8b 53 3c mov 0x3c(%ebx),%edx 11e9f7: 89 55 d4 mov %edx,-0x2c(%ebp) 11e9fa: 8b 52 14 mov 0x14(%edx),%edx 11e9fd: 85 d2 test %edx,%edx 11e9ff: 0f 84 aa 00 00 00 je 11eaaf <== ALWAYS TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; 11ea05: 8b 53 0c mov 0xc(%ebx),%edx 11ea08: 8b 4b 10 mov 0x10(%ebx),%ecx 11ea0b: 89 55 e0 mov %edx,-0x20(%ebp) 11ea0e: 89 4d e4 mov %ecx,-0x1c(%ebp) switch ( whence ) { 11ea11: 83 f8 01 cmp $0x1,%eax 11ea14: 74 6e je 11ea84 11ea16: 83 f8 02 cmp $0x2,%eax 11ea19: 74 35 je 11ea50 11ea1b: 85 c0 test %eax,%eax 11ea1d: 75 45 jne 11ea64 case SEEK_SET: iop->offset = offset; 11ea1f: 89 73 0c mov %esi,0xc(%ebx) 11ea22: 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 ); 11ea25: 50 push %eax 11ea26: 57 push %edi 11ea27: 56 push %esi 11ea28: 53 push %ebx 11ea29: 8b 4d d4 mov -0x2c(%ebp),%ecx 11ea2c: ff 51 14 call *0x14(%ecx) if ( status == (off_t) -1 ) 11ea2f: 83 c4 10 add $0x10,%esp 11ea32: 89 c1 mov %eax,%ecx 11ea34: 21 d1 and %edx,%ecx 11ea36: 41 inc %ecx 11ea37: 75 0c jne 11ea45 iop->offset = old_offset; 11ea39: 8b 75 e0 mov -0x20(%ebp),%esi 11ea3c: 8b 7d e4 mov -0x1c(%ebp),%edi 11ea3f: 89 73 0c mov %esi,0xc(%ebx) 11ea42: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11ea45: 8d 65 f4 lea -0xc(%ebp),%esp 11ea48: 5b pop %ebx 11ea49: 5e pop %esi 11ea4a: 5f pop %edi 11ea4b: c9 leave 11ea4c: c3 ret 11ea4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 11ea50: 89 f2 mov %esi,%edx 11ea52: 89 f9 mov %edi,%ecx 11ea54: 03 53 04 add 0x4(%ebx),%edx 11ea57: 13 4b 08 adc 0x8(%ebx),%ecx 11ea5a: 89 53 0c mov %edx,0xc(%ebx) 11ea5d: 89 4b 10 mov %ecx,0x10(%ebx) break; 11ea60: eb c3 jmp 11ea25 11ea62: 66 90 xchg %ax,%ax <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); 11ea64: e8 67 4c ff ff call 1136d0 <__errno> 11ea69: c7 00 16 00 00 00 movl $0x16,(%eax) 11ea6f: b8 ff ff ff ff mov $0xffffffff,%eax 11ea74: ba ff ff ff ff mov $0xffffffff,%edx /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11ea79: 8d 65 f4 lea -0xc(%ebp),%esp 11ea7c: 5b pop %ebx 11ea7d: 5e pop %esi 11ea7e: 5f pop %edi 11ea7f: c9 leave 11ea80: c3 ret 11ea81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 11ea84: 8b 55 e0 mov -0x20(%ebp),%edx 11ea87: 8b 4d e4 mov -0x1c(%ebp),%ecx 11ea8a: 01 f2 add %esi,%edx 11ea8c: 11 f9 adc %edi,%ecx 11ea8e: 89 53 0c mov %edx,0xc(%ebx) 11ea91: 89 4b 10 mov %ecx,0x10(%ebx) break; 11ea94: eb 8f jmp 11ea25 11ea96: 66 90 xchg %ax,%ax <== NOT EXECUTED off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 11ea98: e8 33 4c ff ff call 1136d0 <__errno> <== NOT EXECUTED 11ea9d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11eaa3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11eaa8: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 11eaad: eb 96 jmp 11ea45 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11eaaf: e8 1c 4c ff ff call 1136d0 <__errno> <== NOT EXECUTED 11eab4: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11eaba: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11eabf: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 11eac4: e9 7c ff ff ff jmp 11ea45 <== NOT EXECUTED 0012c164 : int _STAT_NAME( const char *path, struct stat *buf ) { 12c164: 55 push %ebp <== NOT EXECUTED 12c165: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c167: 57 push %edi <== NOT EXECUTED 12c168: 56 push %esi <== NOT EXECUTED 12c169: 53 push %ebx <== NOT EXECUTED 12c16a: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12c16d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12c170: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 12c173: 85 f6 test %esi,%esi <== NOT EXECUTED 12c175: 0f 84 9d 00 00 00 je 12c218 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 12c17b: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 12c180: 89 d7 mov %edx,%edi <== NOT EXECUTED 12c182: 31 c0 xor %eax,%eax <== NOT EXECUTED 12c184: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 12c186: f7 d1 not %ecx <== NOT EXECUTED 12c188: 49 dec %ecx <== NOT EXECUTED 12c189: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c18c: 6a 00 push $0x0 <== NOT EXECUTED 12c18e: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 12c191: 53 push %ebx <== NOT EXECUTED 12c192: 6a 00 push $0x0 <== NOT EXECUTED 12c194: 51 push %ecx <== NOT EXECUTED 12c195: 52 push %edx <== NOT EXECUTED 12c196: e8 ad fb fd ff call 10bd48 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 12c19b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12c19e: 85 c0 test %eax,%eax <== NOT EXECUTED 12c1a0: 75 66 jne 12c208 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 12c1a2: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 12c1a5: 8b 42 18 mov 0x18(%edx),%eax <== NOT EXECUTED 12c1a8: 85 c0 test %eax,%eax <== NOT EXECUTED 12c1aa: 74 39 je 12c1e5 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 12c1ac: b9 48 00 00 00 mov $0x48,%ecx <== NOT EXECUTED 12c1b1: 89 f7 mov %esi,%edi <== NOT EXECUTED 12c1b3: 31 c0 xor %eax,%eax <== NOT EXECUTED 12c1b5: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 12c1b7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c1ba: 56 push %esi <== NOT EXECUTED 12c1bb: 53 push %ebx <== NOT EXECUTED 12c1bc: ff 52 18 call *0x18(%edx) <== NOT EXECUTED 12c1bf: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 12c1c1: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12c1c4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c1c7: 85 c0 test %eax,%eax <== NOT EXECUTED 12c1c9: 74 10 je 12c1db <== NOT EXECUTED 12c1cb: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c1ce: 85 c0 test %eax,%eax <== NOT EXECUTED 12c1d0: 74 09 je 12c1db <== NOT EXECUTED 12c1d2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c1d5: 53 push %ebx <== NOT EXECUTED 12c1d6: ff d0 call *%eax <== NOT EXECUTED 12c1d8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return status; } 12c1db: 89 f0 mov %esi,%eax <== NOT EXECUTED 12c1dd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c1e0: 5b pop %ebx <== NOT EXECUTED 12c1e1: 5e pop %esi <== NOT EXECUTED 12c1e2: 5f pop %edi <== NOT EXECUTED 12c1e3: c9 leave <== NOT EXECUTED 12c1e4: c3 ret <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 12c1e5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12c1e8: 85 c0 test %eax,%eax <== NOT EXECUTED 12c1ea: 74 10 je 12c1fc <== NOT EXECUTED 12c1ec: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c1ef: 85 c0 test %eax,%eax <== NOT EXECUTED 12c1f1: 74 09 je 12c1fc <== NOT EXECUTED 12c1f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c1f6: 53 push %ebx <== NOT EXECUTED 12c1f7: ff d0 call *%eax <== NOT EXECUTED 12c1f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12c1fc: e8 2b 66 01 00 call 14282c <__errno> <== NOT EXECUTED 12c201: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12c207: 90 nop <== NOT EXECUTED 12c208: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 12c20d: 89 f0 mov %esi,%eax <== NOT EXECUTED 12c20f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c212: 5b pop %ebx <== NOT EXECUTED 12c213: 5e pop %esi <== NOT EXECUTED 12c214: 5f pop %edi <== NOT EXECUTED 12c215: c9 leave <== NOT EXECUTED 12c216: c3 ret <== NOT EXECUTED 12c217: 90 nop <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 12c218: e8 0f 66 01 00 call 14282c <__errno> <== NOT EXECUTED 12c21d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 12c223: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 12c228: 89 f0 mov %esi,%eax <== NOT EXECUTED 12c22a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c22d: 5b pop %ebx <== NOT EXECUTED 12c22e: 5e pop %esi <== NOT EXECUTED 12c22f: 5f pop %edi <== NOT EXECUTED 12c230: c9 leave <== NOT EXECUTED 12c231: c3 ret <== NOT EXECUTED 001082cc : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 1082cc: 55 push %ebp 1082cd: 89 e5 mov %esp,%ebp 1082cf: 57 push %edi 1082d0: 56 push %esi 1082d1: 53 push %ebx 1082d2: 83 ec 0c sub $0xc,%esp 1082d5: 8b 75 08 mov 0x8(%ebp),%esi 1082d8: ff 05 84 72 12 00 incl 0x127284 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 1082de: e8 11 ff ff ff call 1081f4 /* * Validate the parameters */ if ( !size ) 1082e3: 85 f6 test %esi,%esi 1082e5: 74 65 je 10834c <== 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()) && 1082e7: 83 3d c0 75 12 00 03 cmpl $0x3,0x1275c0 1082ee: 74 50 je 108340 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 1082f0: 6a 00 push $0x0 1082f2: 6a 00 push $0x0 1082f4: 56 push %esi 1082f5: ff 35 58 31 12 00 pushl 0x123158 1082fb: e8 a8 4c 00 00 call 10cfa8 <_Protected_heap_Allocate_aligned_with_boundary> 108300: 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 ) { 108302: 83 c4 10 add $0x10,%esp 108305: 85 c0 test %eax,%eax 108307: 74 5b je 108364 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 108309: 89 c7 mov %eax,%edi } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 10830b: a1 30 56 12 00 mov 0x125630,%eax 108310: 85 c0 test %eax,%eax 108312: 74 0a je 10831e <== NEVER TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 108314: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108317: 56 push %esi <== NOT EXECUTED 108318: 57 push %edi <== NOT EXECUTED 108319: ff 10 call *(%eax) <== NOT EXECUTED 10831b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 10831e: a1 28 56 12 00 mov 0x125628,%eax 108323: 85 c0 test %eax,%eax 108325: 74 31 je 108358 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 108327: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10832a: 57 push %edi <== NOT EXECUTED 10832b: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 10832e: 89 fb mov %edi,%ebx <== NOT EXECUTED 108330: 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; } 108333: 89 d8 mov %ebx,%eax 108335: 8d 65 f4 lea -0xc(%ebp),%esp 108338: 5b pop %ebx 108339: 5e pop %esi 10833a: 5f pop %edi 10833b: c9 leave 10833c: c3 ret 10833d: 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()) && 108340: e8 57 fe ff ff call 10819c 108345: 84 c0 test %al,%al 108347: 75 a7 jne 1082f0 <== NEVER TAKEN 108349: 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); 10834c: 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; } 10834e: 89 d8 mov %ebx,%eax <== NOT EXECUTED 108350: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108353: 5b pop %ebx <== NOT EXECUTED 108354: 5e pop %esi <== NOT EXECUTED 108355: 5f pop %edi <== NOT EXECUTED 108356: c9 leave <== NOT EXECUTED 108357: c3 ret <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 108358: 89 fb mov %edi,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 10835a: 89 d8 mov %ebx,%eax 10835c: 8d 65 f4 lea -0xc(%ebp),%esp 10835f: 5b pop %ebx 108360: 5e pop %esi 108361: 5f pop %edi 108362: c9 leave 108363: c3 ret */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 108364: a1 2c 56 12 00 mov 0x12562c,%eax 108369: 85 c0 test %eax,%eax 10836b: 74 10 je 10837d <== NEVER TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 10836d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108370: 56 push %esi <== NOT EXECUTED 108371: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 108374: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 108376: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108379: 85 c0 test %eax,%eax <== NOT EXECUTED 10837b: 75 8e jne 10830b <== NOT EXECUTED errno = ENOMEM; 10837d: e8 4e b3 00 00 call 1136d0 <__errno> 108382: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 108388: eb a9 jmp 108333 001081dc : } void malloc_deferred_free( void *pointer ) { 1081dc: 55 push %ebp <== NOT EXECUTED 1081dd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1081df: 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 ); 1081e2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1081e5: 68 6c 72 12 00 push $0x12726c <== NOT EXECUTED 1081ea: e8 29 3d 00 00 call 10bf18 <_Chain_Append> <== NOT EXECUTED 1081ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 1081f2: c9 leave <== NOT EXECUTED 1081f3: c3 ret <== NOT EXECUTED 001081f4 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 1081f4: 55 push %ebp 1081f5: 89 e5 mov %esp,%ebp 1081f7: 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) 1081fa: eb 0c jmp 108208 free(to_be_freed); 1081fc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1081ff: 50 push %eax <== NOT EXECUTED 108200: e8 77 fe ff ff call 10807c <== NOT EXECUTED 108205: 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 ); 108208: 83 ec 0c sub $0xc,%esp 10820b: 68 6c 72 12 00 push $0x12726c 108210: e8 27 3d 00 00 call 10bf3c <_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) 108215: 83 c4 10 add $0x10,%esp 108218: 85 c0 test %eax,%eax 10821a: 75 e0 jne 1081fc <== ALWAYS TAKEN free(to_be_freed); } 10821c: c9 leave 10821d: c3 ret 0012c24c : */ int malloc_info( Heap_Information_block *the_info ) { 12c24c: 55 push %ebp 12c24d: 89 e5 mov %esp,%ebp 12c24f: 83 ec 08 sub $0x8,%esp 12c252: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_info ) 12c255: 85 c0 test %eax,%eax 12c257: 74 17 je 12c270 return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 12c259: 83 ec 08 sub $0x8,%esp 12c25c: 50 push %eax 12c25d: ff 35 58 71 16 00 pushl 0x167158 12c263: e8 4c 2c 00 00 call 12eeb4 <_Protected_heap_Get_information> 12c268: 31 c0 xor %eax,%eax return 0; 12c26a: 83 c4 10 add $0x10,%esp } 12c26d: c9 leave 12c26e: c3 ret 12c26f: 90 nop <== NOT EXECUTED int malloc_info( Heap_Information_block *the_info ) { if ( !the_info ) 12c270: b8 ff ff ff ff mov $0xffffffff,%eax return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); return 0; } 12c275: c9 leave 12c276: c3 ret 0010819c : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 10819c: 55 push %ebp 10819d: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 10819f: a1 f8 73 12 00 mov 0x1273f8,%eax 1081a4: 85 c0 test %eax,%eax 1081a6: 75 0c jne 1081b4 <== ALWAYS TAKEN return false; if ( _ISR_Nest_level > 0 ) 1081a8: a1 94 74 12 00 mov 0x127494,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 1081ad: 85 c0 test %eax,%eax 1081af: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 1081b2: c9 leave 1081b3: c3 ret rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 1081b4: 31 c0 xor %eax,%eax <== NOT EXECUTED if ( _ISR_Nest_level > 0 ) return false; return true; } 1081b6: c9 leave <== NOT EXECUTED 1081b7: c3 ret <== NOT EXECUTED 00116628 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 116628: 55 push %ebp 116629: 89 e5 mov %esp,%ebp 11662b: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 11662e: ff 35 b0 c5 12 00 pushl 0x12c5b0 116634: 6a 01 push $0x1 116636: e8 85 2b ff ff call 1091c0 if ( memory ) 11663b: 83 c4 10 add $0x10,%esp 11663e: 85 c0 test %eax,%eax 116640: 74 06 je 116648 <== ALWAYS TAKEN memfile_blocks_allocated++; 116642: ff 05 70 c7 12 00 incl 0x12c770 return memory; } 116648: c9 leave 116649: c3 ret 00116a9c : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 116a9c: 55 push %ebp 116a9d: 89 e5 mov %esp,%ebp 116a9f: 53 push %ebx 116aa0: 83 ec 10 sub $0x10,%esp 116aa3: 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) ) { 116aa6: 53 push %ebx 116aa7: e8 d4 dc ff ff call 114780 116aac: 83 c4 10 add $0x10,%esp 116aaf: 85 c0 test %eax,%eax 116ab1: 75 2f jne 116ae2 116ab3: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 116ab8: 75 28 jne 116ae2 <== ALWAYS TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 116aba: a1 58 a6 12 00 mov 0x12a658,%eax 116abf: 39 58 04 cmp %ebx,0x4(%eax) 116ac2: 74 28 je 116aec <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 116ac4: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 116ac8: 74 0c je 116ad6 <== ALWAYS TAKEN IMFS_memfile_remove( the_jnode ); 116aca: 83 ec 0c sub $0xc,%esp 116acd: 53 push %ebx 116ace: e8 21 fe ff ff call 1168f4 116ad3: 83 c4 10 add $0x10,%esp free( the_jnode ); 116ad6: 83 ec 0c sub $0xc,%esp 116ad9: 53 push %ebx 116ada: e8 31 29 ff ff call 109410 116adf: 83 c4 10 add $0x10,%esp } return 0; } 116ae2: 31 c0 xor %eax,%eax 116ae4: 8b 5d fc mov -0x4(%ebp),%ebx 116ae7: c9 leave 116ae8: c3 ret 116ae9: 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; 116aec: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 116af3: eb cf jmp 116ac4 <== NOT EXECUTED 0011682c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 11682c: 55 push %ebp 11682d: 89 e5 mov %esp,%ebp 11682f: 57 push %edi 116830: 56 push %esi 116831: 53 push %ebx 116832: 83 ec 0c sub $0xc,%esp 116835: 8b 7d 0c mov 0xc(%ebp),%edi /* * Perform internal consistency checks */ assert( block_table ); 116838: 8b 45 08 mov 0x8(%ebp),%eax 11683b: 85 c0 test %eax,%eax 11683d: 74 4e je 11688d <== ALWAYS TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 11683f: 8b 45 08 mov 0x8(%ebp),%eax 116842: 8b 30 mov (%eax),%esi for ( i=0 ; i<== ALWAYS TAKEN 116848: 31 db xor %ebx,%ebx 11684a: 66 90 xchg %ax,%ax if ( b[i] ) { 11684c: 8b 04 9e mov (%esi,%ebx,4),%eax 11684f: 85 c0 test %eax,%eax 116851: 74 13 je 116866 memfile_free_block( b[i] ); 116853: 83 ec 0c sub $0xc,%esp 116856: 50 push %eax 116857: e8 b0 fd ff ff call 11660c b[i] = 0; 11685c: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4) 116863: 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 11686b: 8b 45 08 mov 0x8(%ebp),%eax 11686e: 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 ); 116870: 83 ec 0c sub $0xc,%esp 116873: 56 push %esi 116874: e8 93 fd ff ff call 11660c *block_table = 0; 116879: 8b 45 08 mov 0x8(%ebp),%eax 11687c: c7 00 00 00 00 00 movl $0x0,(%eax) 116882: 83 c4 10 add $0x10,%esp } 116885: 8d 65 f4 lea -0xc(%ebp),%esp 116888: 5b pop %ebx 116889: 5e pop %esi 11688a: 5f pop %edi 11688b: c9 leave 11688c: c3 ret /* * Perform internal consistency checks */ assert( block_table ); 11688d: 68 f6 67 12 00 push $0x1267f6 <== NOT EXECUTED 116892: 68 28 69 12 00 push $0x126928 <== NOT EXECUTED 116897: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 11689c: 68 18 68 12 00 push $0x126818 <== NOT EXECUTED 1168a1: e8 da 27 ff ff call 109080 <__assert_func> <== NOT EXECUTED 00116d50 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 116d50: 55 push %ebp 116d51: 89 e5 mov %esp,%ebp 116d53: 53 push %ebx 116d54: 83 ec 14 sub $0x14,%esp 116d57: 8b 4d 08 mov 0x8(%ebp),%ecx 116d5a: 8b 45 0c mov 0xc(%ebp),%eax 116d5d: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 116d60: 8b 59 38 mov 0x38(%ecx),%ebx * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 116d63: 39 53 54 cmp %edx,0x54(%ebx) 116d66: 7f 19 jg 116d81 <== ALWAYS TAKEN 116d68: 7d 12 jge 116d7c <== NEVER TAKEN return IMFS_memfile_extend( the_jnode, length ); 116d6a: 51 push %ecx <== NOT EXECUTED 116d6b: 52 push %edx <== NOT EXECUTED 116d6c: 50 push %eax <== NOT EXECUTED 116d6d: 53 push %ebx <== NOT EXECUTED 116d6e: e8 79 fe ff ff call 116bec <== NOT EXECUTED 116d73: 83 c4 10 add $0x10,%esp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 116d76: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 116d79: c9 leave <== NOT EXECUTED 116d7a: c3 ret <== NOT EXECUTED 116d7b: 90 nop <== NOT EXECUTED * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 116d7c: 39 43 50 cmp %eax,0x50(%ebx) 116d7f: 72 e9 jb 116d6a <== 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; 116d81: 89 43 50 mov %eax,0x50(%ebx) 116d84: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 116d87: 89 41 04 mov %eax,0x4(%ecx) 116d8a: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 116d8d: 83 ec 08 sub $0x8,%esp 116d90: 6a 00 push $0x0 116d92: 8d 45 f0 lea -0x10(%ebp),%eax 116d95: 50 push %eax 116d96: e8 f1 26 ff ff call 10948c 116d9b: 8b 45 f0 mov -0x10(%ebp),%eax 116d9e: 89 43 40 mov %eax,0x40(%ebx) 116da1: 31 c0 xor %eax,%eax return 0; 116da3: 83 c4 10 add $0x10,%esp } 116da6: 8b 5d fc mov -0x4(%ebp),%ebx 116da9: c9 leave 116daa: c3 ret 00116dac : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 116dac: 55 push %ebp 116dad: 89 e5 mov %esp,%ebp 116daf: 57 push %edi 116db0: 56 push %esi 116db1: 53 push %ebx 116db2: 83 ec 0c sub $0xc,%esp 116db5: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 116db8: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 116dbb: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 116dbf: 74 2f je 116df0 <== 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 )) 116dc1: 57 push %edi 116dc2: ff 73 10 pushl 0x10(%ebx) 116dc5: ff 73 0c pushl 0xc(%ebx) 116dc8: 56 push %esi 116dc9: e8 1e fe ff ff call 116bec 116dce: 83 c4 10 add $0x10,%esp 116dd1: 85 c0 test %eax,%eax 116dd3: 75 4d jne 116e22 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 116dd5: 8b 46 50 mov 0x50(%esi),%eax 116dd8: 8b 56 54 mov 0x54(%esi),%edx 116ddb: 89 43 04 mov %eax,0x4(%ebx) 116dde: 89 53 08 mov %edx,0x8(%ebx) 116de1: 8b 43 0c mov 0xc(%ebx),%eax 116de4: 8b 53 10 mov 0x10(%ebx),%edx } return iop->offset; } 116de7: 8d 65 f4 lea -0xc(%ebp),%esp 116dea: 5b pop %ebx 116deb: 5e pop %esi 116dec: 5f pop %edi 116ded: c9 leave 116dee: c3 ret 116def: 90 nop <== 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) 116df0: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED 116df3: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED 116df6: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED 116df9: 8b 56 54 mov 0x54(%esi),%edx <== NOT EXECUTED 116dfc: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 116dfe: 7f 14 jg 116e14 <== NOT EXECUTED 116e00: 7d 0e jge 116e10 <== NOT EXECUTED 116e02: 89 f8 mov %edi,%eax <== NOT EXECUTED 116e04: 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; } 116e06: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116e09: 5b pop %ebx <== NOT EXECUTED 116e0a: 5e pop %esi <== NOT EXECUTED 116e0b: 5f pop %edi <== NOT EXECUTED 116e0c: c9 leave <== NOT EXECUTED 116e0d: c3 ret <== NOT EXECUTED 116e0e: 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) 116e10: 39 c7 cmp %eax,%edi <== NOT EXECUTED 116e12: 76 ee jbe 116e02 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 116e14: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED 116e17: 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; } 116e1a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116e1d: 5b pop %ebx <== NOT EXECUTED 116e1e: 5e pop %esi <== NOT EXECUTED 116e1f: 5f pop %edi <== NOT EXECUTED 116e20: c9 leave <== NOT EXECUTED 116e21: 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 ); 116e22: e8 15 1a 00 00 call 11883c <__errno> <== NOT EXECUTED 116e27: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 116e2d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 116e32: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 116e37: eb ae jmp 116de7 <== NOT EXECUTED 001170c8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1170c8: 55 push %ebp 1170c9: 89 e5 mov %esp,%ebp 1170cb: 56 push %esi 1170cc: 53 push %ebx 1170cd: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1170d0: 8b 73 38 mov 0x38(%ebx),%esi /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 1170d3: 8b 43 14 mov 0x14(%ebx),%eax 1170d6: a9 04 02 00 00 test $0x204,%eax 1170db: 74 06 je 1170e3 && (the_jnode->type == IMFS_LINEAR_FILE)) { 1170dd: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 1170e1: 74 2d je 117110 <== 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) 1170e3: 8b 56 50 mov 0x50(%esi),%edx 1170e6: 8b 4e 54 mov 0x54(%esi),%ecx && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 1170e9: f6 c4 02 test $0x2,%ah 1170ec: 75 12 jne 117100 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 1170ee: 89 53 04 mov %edx,0x4(%ebx) 1170f1: 89 4b 08 mov %ecx,0x8(%ebx) 1170f4: 31 c0 xor %eax,%eax return 0; } 1170f6: 8d 65 f8 lea -0x8(%ebp),%esp 1170f9: 5b pop %ebx 1170fa: 5e pop %esi 1170fb: c9 leave 1170fc: c3 ret 1170fd: 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; 117100: 89 53 0c mov %edx,0xc(%ebx) 117103: 89 4b 10 mov %ecx,0x10(%ebx) 117106: 8b 56 50 mov 0x50(%esi),%edx 117109: 8b 4e 54 mov 0x54(%esi),%ecx 11710c: eb e0 jmp 1170ee 11710e: 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; 117110: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 117113: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 117116: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED the_jnode->info.file.size = 0; 11711d: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED 117124: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 11712b: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 117132: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 117139: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED if ((count != 0) 117140: 85 c0 test %eax,%eax <== NOT EXECUTED 117142: 75 09 jne 11714d <== NOT EXECUTED 117144: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 117147: 31 d2 xor %edx,%edx <== NOT EXECUTED 117149: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 11714b: eb 9c jmp 1170e9 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 11714d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 117150: 50 push %eax <== NOT EXECUTED 117151: 52 push %edx <== NOT EXECUTED 117152: 6a 00 push $0x0 <== NOT EXECUTED 117154: 6a 00 push $0x0 <== NOT EXECUTED 117156: 56 push %esi <== NOT EXECUTED 117157: e8 e0 fc ff ff call 116e3c <== 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) 11715c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 11715f: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 117162: 74 92 je 1170f6 <== NOT EXECUTED 117164: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 117167: e9 77 ff ff ff jmp 1170e3 <== NOT EXECUTED 00116af8 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 116af8: 55 push %ebp 116af9: 89 e5 mov %esp,%ebp 116afb: 53 push %ebx 116afc: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 116aff: 8b 45 0c mov 0xc(%ebp),%eax 116b02: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 116b04: 8b 4b 08 mov 0x8(%ebx),%ecx 116b07: 85 c9 test %ecx,%ecx 116b09: 74 13 je 116b1e <== ALWAYS TAKEN 116b0b: 83 ec 0c sub $0xc,%esp 116b0e: 53 push %ebx 116b0f: e8 e8 6c ff ff call 10d7fc <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 116b14: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 116b1b: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 116b1e: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 116b22: 83 ec 08 sub $0x8,%esp 116b25: 6a 00 push $0x0 116b27: 8d 45 f0 lea -0x10(%ebp),%eax 116b2a: 50 push %eax 116b2b: e8 5c 29 ff ff call 10948c 116b30: 8b 45 f0 mov -0x10(%ebp),%eax 116b33: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 116b36: 89 1c 24 mov %ebx,(%esp) 116b39: e8 5e ff ff ff call 116a9c } 116b3e: 8b 5d fc mov -0x4(%ebp),%ebx 116b41: c9 leave 116b42: c3 ret 001083a8 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1083a8: 55 push %ebp 1083a9: 89 e5 mov %esp,%ebp 1083ab: 57 push %edi 1083ac: 56 push %esi 1083ad: 53 push %ebx 1083ae: 83 ec 3c sub $0x3c,%esp 1083b1: 8b 55 0c mov 0xc(%ebp),%edx 1083b4: 8b 4d 10 mov 0x10(%ebp),%ecx 1083b7: 8b 5d 14 mov 0x14(%ebp),%ebx 1083ba: 89 4d c0 mov %ecx,-0x40(%ebp) 1083bd: 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) ) ) 1083c0: f6 c6 f0 test $0xf0,%dh 1083c3: 0f 84 cb 00 00 00 je 108494 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1083c9: 8b 5d 08 mov 0x8(%ebp),%ebx 1083cc: 8a 03 mov (%ebx),%al 1083ce: 3c 2f cmp $0x2f,%al 1083d0: 74 08 je 1083da 1083d2: 3c 5c cmp $0x5c,%al 1083d4: 74 04 je 1083da <== ALWAYS TAKEN 1083d6: 84 c0 test %al,%al 1083d8: 75 7e jne 108458 <== NEVER TAKEN 1083da: 8d 5d d0 lea -0x30(%ebp),%ebx 1083dd: 8b 35 18 50 12 00 mov 0x125018,%esi 1083e3: 83 c6 18 add $0x18,%esi 1083e6: b9 05 00 00 00 mov $0x5,%ecx 1083eb: 89 df mov %ebx,%edi 1083ed: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1083ef: b1 01 mov $0x1,%cl if ( !temp_loc.ops->evalformake_h ) { 1083f1: 8b 45 dc mov -0x24(%ebp),%eax 1083f4: 8b 40 04 mov 0x4(%eax),%eax 1083f7: 85 c0 test %eax,%eax 1083f9: 74 7c je 108477 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 1083fb: 56 push %esi 1083fc: 8d 75 e4 lea -0x1c(%ebp),%esi 1083ff: 56 push %esi 108400: 53 push %ebx 108401: 03 4d 08 add 0x8(%ebp),%ecx 108404: 51 push %ecx 108405: 89 55 bc mov %edx,-0x44(%ebp) 108408: ff d0 call *%eax &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 10840a: 83 c4 10 add $0x10,%esp 10840d: 85 c0 test %eax,%eax 10840f: 8b 55 bc mov -0x44(%ebp),%edx 108412: 75 6e jne 108482 return -1; if ( !temp_loc.ops->mknod_h ) { 108414: 8b 4d dc mov -0x24(%ebp),%ecx 108417: 8b 41 14 mov 0x14(%ecx),%eax 10841a: 85 c0 test %eax,%eax 10841c: 0f 84 84 00 00 00 je 1084a6 <== 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 ); 108422: 83 ec 0c sub $0xc,%esp 108425: 53 push %ebx 108426: ff 75 c4 pushl -0x3c(%ebp) 108429: ff 75 c0 pushl -0x40(%ebp) 10842c: 52 push %edx 10842d: ff 75 e4 pushl -0x1c(%ebp) 108430: ff d0 call *%eax 108432: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &temp_loc ); 108434: 8b 45 dc mov -0x24(%ebp),%eax 108437: 83 c4 20 add $0x20,%esp 10843a: 85 c0 test %eax,%eax 10843c: 74 10 je 10844e <== ALWAYS TAKEN 10843e: 8b 40 1c mov 0x1c(%eax),%eax 108441: 85 c0 test %eax,%eax 108443: 74 09 je 10844e 108445: 83 ec 0c sub $0xc,%esp 108448: 53 push %ebx 108449: ff d0 call *%eax 10844b: 83 c4 10 add $0x10,%esp return result; } 10844e: 89 f0 mov %esi,%eax 108450: 8d 65 f4 lea -0xc(%ebp),%esp 108453: 5b pop %ebx 108454: 5e pop %esi 108455: 5f pop %edi 108456: c9 leave 108457: 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 ); 108458: 8d 5d d0 lea -0x30(%ebp),%ebx 10845b: 8b 35 18 50 12 00 mov 0x125018,%esi 108461: 83 c6 04 add $0x4,%esi 108464: b9 05 00 00 00 mov $0x5,%ecx 108469: 89 df mov %ebx,%edi 10846b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !temp_loc.ops->evalformake_h ) { 10846d: 8b 45 dc mov -0x24(%ebp),%eax 108470: 8b 40 04 mov 0x4(%eax),%eax 108473: 85 c0 test %eax,%eax 108475: 75 84 jne 1083fb <== 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 ); 108477: e8 54 b2 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10847c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108482: 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; } 108487: 89 f0 mov %esi,%eax 108489: 8d 65 f4 lea -0xc(%ebp),%esp 10848c: 5b pop %ebx 10848d: 5e pop %esi 10848e: 5f pop %edi 10848f: c9 leave 108490: c3 ret 108491: 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 ); 108494: e8 37 b2 00 00 call 1136d0 <__errno> <== NOT EXECUTED 108499: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10849f: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1084a4: eb a8 jmp 10844e <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 1084a6: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 1084a9: 85 c0 test %eax,%eax <== NOT EXECUTED 1084ab: 74 ca je 108477 <== NOT EXECUTED 1084ad: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1084b0: 53 push %ebx <== NOT EXECUTED 1084b1: ff d0 call *%eax <== NOT EXECUTED 1084b3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1084b6: eb bf jmp 108477 <== NOT EXECUTED 001084e0 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 1084e0: 55 push %ebp 1084e1: 89 e5 mov %esp,%ebp 1084e3: 57 push %edi 1084e4: 56 push %esi 1084e5: 53 push %ebx 1084e6: 83 ec 3c sub $0x3c,%esp 1084e9: 8b 75 14 mov 0x14(%ebp),%esi /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1084ec: 8b 5d 0c mov 0xc(%ebp),%ebx 1084ef: 85 db test %ebx,%ebx 1084f1: 0f 84 1d 02 00 00 je 108714 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 1084f7: 83 7d 10 01 cmpl $0x1,0x10(%ebp) 1084fb: 0f 87 13 02 00 00 ja 108714 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 108501: 8b 45 0c mov 0xc(%ebp),%eax 108504: 8b 48 24 mov 0x24(%eax),%ecx 108507: 85 c9 test %ecx,%ecx 108509: 0f 84 32 02 00 00 je 108741 <== ALWAYS TAKEN /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 10850f: 85 f6 test %esi,%esi 108511: 0f 84 a9 01 00 00 je 1086c0 <== NEVER TAKEN size += strlen( device ) + 1; 108517: 31 c0 xor %eax,%eax <== NOT EXECUTED 108519: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 10851e: 89 f7 mov %esi,%edi <== NOT EXECUTED 108520: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 108522: f7 d1 not %ecx <== NOT EXECUTED 108524: 83 c1 6c add $0x6c,%ecx <== NOT EXECUTED temp_mt_entry = malloc( size ); 108527: 83 ec 0c sub $0xc,%esp 10852a: 51 push %ecx 10852b: e8 9c fd ff ff call 1082cc 108530: 89 c3 mov %eax,%ebx 108532: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !temp_mt_entry ) { 108535: 83 c4 10 add $0x10,%esp 108538: 85 c0 test %eax,%eax 10853a: 0f 84 3b 02 00 00 je 10877b <== ALWAYS TAKEN errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 108540: 89 43 2c mov %eax,0x2c(%ebx) temp_mt_entry->options = options; 108543: 8b 55 10 mov 0x10(%ebp),%edx 108546: 89 50 30 mov %edx,0x30(%eax) if ( device ) { 108549: 85 f6 test %esi,%esi 10854b: 0f 84 63 01 00 00 je 1086b4 <== NEVER TAKEN temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 108551: 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 = 108554: 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 ); 108557: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10855a: 56 push %esi <== NOT EXECUTED 10855b: 50 push %eax <== NOT EXECUTED 10855c: e8 8f bc 00 00 call 1141f0 <== NOT EXECUTED 108561: 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 ) { 108564: 8b 55 18 mov 0x18(%ebp),%edx 108567: 85 d2 test %edx,%edx 108569: 0f 84 0d 01 00 00 je 10867c if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 10856f: 31 c0 xor %eax,%eax 108571: b9 ff ff ff ff mov $0xffffffff,%ecx 108576: 8b 7d 18 mov 0x18(%ebp),%edi 108579: f2 ae repnz scas %es:(%edi),%al 10857b: f7 d1 not %ecx 10857d: 49 dec %ecx * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 10857e: 83 ec 0c sub $0xc,%esp 108581: 6a 01 push $0x1 108583: 8d 75 d4 lea -0x2c(%ebp),%esi 108586: 56 push %esi 108587: 6a 07 push $0x7 108589: 51 push %ecx 10858a: ff 75 18 pushl 0x18(%ebp) 10858d: e8 36 fa ff ff call 107fc8 108592: 83 c4 20 add $0x20,%esp 108595: 40 inc %eax 108596: 0f 84 b7 01 00 00 je 108753 <== ALWAYS TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 10859c: 8b 45 e0 mov -0x20(%ebp),%eax 10859f: 8b 40 10 mov 0x10(%eax),%eax 1085a2: 85 c0 test %eax,%eax 1085a4: 0f 84 c1 01 00 00 je 10876b <== ALWAYS TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1085aa: 83 ec 0c sub $0xc,%esp 1085ad: 56 push %esi 1085ae: ff d0 call *%eax 1085b0: 83 c4 10 add $0x10,%esp 1085b3: 48 dec %eax 1085b4: 0f 85 77 01 00 00 jne 108731 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 1085ba: a1 ac 72 12 00 mov 0x1272ac,%eax 1085bf: 3d b0 72 12 00 cmp $0x1272b0,%eax 1085c4: 0f 84 5f 01 00 00 je 108729 <== 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 ) 1085ca: 8b 55 d4 mov -0x2c(%ebp),%edx 1085cd: 39 50 1c cmp %edx,0x1c(%eax) 1085d0: 75 07 jne 1085d9 <== NEVER TAKEN 1085d2: eb 78 jmp 10864c <== NOT EXECUTED 1085d4: 39 50 1c cmp %edx,0x1c(%eax) 1085d7: 74 73 je 10864c * 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 ) { 1085d9: 8b 00 mov (%eax),%eax /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 1085db: 3d b0 72 12 00 cmp $0x1272b0,%eax 1085e0: 75 f2 jne 1085d4 * 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; 1085e2: 89 53 08 mov %edx,0x8(%ebx) temp_mt_entry->mt_point_node.handlers = loc.handlers; 1085e5: 8b 45 dc mov -0x24(%ebp),%eax 1085e8: 89 43 10 mov %eax,0x10(%ebx) temp_mt_entry->mt_point_node.ops = loc.ops; 1085eb: 8b 45 e0 mov -0x20(%ebp),%eax 1085ee: 89 43 14 mov %eax,0x14(%ebx) temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 1085f1: 8b 55 e4 mov -0x1c(%ebp),%edx 1085f4: 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 ){ 1085f7: 8b 40 20 mov 0x20(%eax),%eax 1085fa: 85 c0 test %eax,%eax 1085fc: 0f 84 69 01 00 00 je 10876b <== ALWAYS TAKEN errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 108602: 83 ec 0c sub $0xc,%esp 108605: 53 push %ebx 108606: ff d0 call *%eax 108608: 83 c4 10 add $0x10,%esp 10860b: 85 c0 test %eax,%eax 10860d: 75 48 jne 108657 <== 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 ) ) { 10860f: 83 ec 0c sub $0xc,%esp 108612: 53 push %ebx 108613: 8b 55 0c mov 0xc(%ebp),%edx 108616: ff 52 24 call *0x24(%edx) 108619: 83 c4 10 add $0x10,%esp 10861c: 85 c0 test %eax,%eax 10861e: 0f 85 a8 00 00 00 jne 1086cc <== 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 ); 108624: 83 ec 08 sub $0x8,%esp 108627: 53 push %ebx 108628: 68 ac 72 12 00 push $0x1272ac 10862d: e8 e6 38 00 00 call 10bf18 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 108632: 83 c4 10 add $0x10,%esp 108635: 8b 45 08 mov 0x8(%ebp),%eax 108638: 85 c0 test %eax,%eax 10863a: 74 05 je 108641 <== ALWAYS TAKEN *mt_entry = temp_mt_entry; 10863c: 8b 45 08 mov 0x8(%ebp),%eax 10863f: 89 18 mov %ebx,(%eax) 108641: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108643: 8d 65 f4 lea -0xc(%ebp),%esp 108646: 5b pop %ebx 108647: 5e pop %esi 108648: 5f pop %edi 108649: c9 leave 10864a: c3 ret 10864b: 90 nop <== NOT EXECUTED /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 10864c: e8 7f b0 00 00 call 1136d0 <__errno> 108651: c7 00 10 00 00 00 movl $0x10,(%eax) return 0; cleanup_and_bail: free( temp_mt_entry ); 108657: 83 ec 0c sub $0xc,%esp 10865a: 53 push %ebx 10865b: e8 1c fa ff ff call 10807c 108660: 83 c4 10 add $0x10,%esp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 108663: 8b 46 0c mov 0xc(%esi),%eax 108666: 85 c0 test %eax,%eax 108668: 0f 85 8a 00 00 00 jne 1086f8 <== NEVER TAKEN 10866e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; } 108673: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108676: 5b pop %ebx <== NOT EXECUTED 108677: 5e pop %esi <== NOT EXECUTED 108678: 5f pop %edi <== NOT EXECUTED 108679: c9 leave <== NOT EXECUTED 10867a: c3 ret <== NOT EXECUTED 10867b: 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; 10867c: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = NULL; 108683: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = NULL; 10868a: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) temp_mt_entry->mt_point_node.node_access = NULL; 108691: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) temp_mt_entry->mt_point_node.handlers = NULL; 108698: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) temp_mt_entry->mt_point_node.ops = NULL; 10869f: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) temp_mt_entry->mt_point_node.mt_entry = NULL; 1086a6: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) 1086ad: 31 f6 xor %esi,%esi 1086af: e9 5b ff ff ff jmp 10860f 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; 1086b4: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) 1086bb: e9 a4 fe ff ff jmp 108564 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 1086c0: b9 6c 00 00 00 mov $0x6c,%ecx 1086c5: e9 5d fe ff ff jmp 108527 1086ca: 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 ) { 1086cc: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1086cf: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 1086d2: 85 c0 test %eax,%eax <== NOT EXECUTED 1086d4: 74 09 je 1086df <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 1086d6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1086d9: 53 push %ebx <== NOT EXECUTED 1086da: ff d0 call *%eax <== NOT EXECUTED 1086dc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 1086df: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1086e2: 53 push %ebx <== NOT EXECUTED 1086e3: e8 94 f9 ff ff call 10807c <== NOT EXECUTED if ( loc_to_free ) 1086e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1086eb: 85 f6 test %esi,%esi <== NOT EXECUTED 1086ed: 0f 84 7b ff ff ff je 10866e <== NOT EXECUTED 1086f3: e9 6b ff ff ff jmp 108663 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 1086f8: 8b 40 1c mov 0x1c(%eax),%eax 1086fb: 85 c0 test %eax,%eax 1086fd: 0f 84 6b ff ff ff je 10866e <== ALWAYS TAKEN 108703: 83 ec 0c sub $0xc,%esp 108706: 56 push %esi 108707: ff d0 call *%eax 108709: 83 c8 ff or $0xffffffff,%eax 10870c: 83 c4 10 add $0x10,%esp 10870f: e9 2f ff ff ff jmp 108643 * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 108714: e8 b7 af 00 00 call 1136d0 <__errno> 108719: c7 00 16 00 00 00 movl $0x16,(%eax) 10871f: b8 ff ff ff ff mov $0xffffffff,%eax return -1; 108724: e9 1a ff ff ff jmp 108643 cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 108729: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10872c: e9 b1 fe ff ff jmp 1085e2 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 108731: e8 9a af 00 00 call 1136d0 <__errno> 108736: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 10873c: e9 16 ff ff ff jmp 108657 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 108741: e8 8a af 00 00 call 1136d0 <__errno> <== NOT EXECUTED 108746: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10874c: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 108753: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108756: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 108759: e8 1e f9 ff ff call 10807c <== NOT EXECUTED 10875e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108763: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108766: e9 d8 fe ff ff jmp 108643 <== 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; 10876b: e8 60 af 00 00 call 1136d0 <__errno> <== NOT EXECUTED 108770: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 108776: e9 dc fe ff ff jmp 108657 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 10877b: e8 50 af 00 00 call 1136d0 <__errno> <== NOT EXECUTED 108780: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108786: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 108789: e9 b5 fe ff ff jmp 108643 <== NOT EXECUTED 0010f9f8 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 10f9f8: 55 push %ebp 10f9f9: 89 e5 mov %esp,%ebp 10f9fb: 57 push %edi 10f9fc: 56 push %esi 10f9fd: 83 ec 14 sub $0x14,%esp 10fa00: 8b 75 0c mov 0xc(%ebp),%esi 10fa03: 8d 45 f4 lea -0xc(%ebp),%eax 10fa06: 50 push %eax 10fa07: ff 75 08 pushl 0x8(%ebp) 10fa0a: 68 00 07 13 00 push $0x130700 10fa0f: e8 94 31 00 00 call 112ba8 <_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 ) { 10fa14: 83 c4 10 add $0x10,%esp 10fa17: 8b 4d f4 mov -0xc(%ebp),%ecx 10fa1a: 85 c9 test %ecx,%ecx 10fa1c: 74 1a je 10fa38 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fa1e: e8 f5 9c 00 00 call 119718 <__errno> 10fa23: c7 00 09 00 00 00 movl $0x9,(%eax) 10fa29: b8 ff ff ff ff mov $0xffffffff,%eax 10fa2e: 66 90 xchg %ax,%ax } 10fa30: 8d 65 f8 lea -0x8(%ebp),%esp 10fa33: 5e pop %esi 10fa34: 5f pop %edi 10fa35: c9 leave 10fa36: c3 ret 10fa37: 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; 10fa38: 8b 40 10 mov 0x10(%eax),%eax if ( notification ) { 10fa3b: 85 f6 test %esi,%esi 10fa3d: 74 39 je 10fa78 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 10fa3f: 8b 50 7c mov 0x7c(%eax),%edx 10fa42: 85 d2 test %edx,%edx 10fa44: 75 46 jne 10fa8c CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; the_message_queue->notify_argument = the_argument; 10fa46: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10fa4d: 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; 10fa50: 8d b8 90 00 00 00 lea 0x90(%eax),%edi 10fa56: b9 05 00 00 00 mov $0x5,%ecx 10fa5b: 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; 10fa5d: c7 40 7c a4 fa 10 00 movl $0x10faa4,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10fa64: 89 80 80 00 00 00 mov %eax,0x80(%eax) _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 10fa6a: e8 fd 39 00 00 call 11346c <_Thread_Enable_dispatch> 10fa6f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fa71: 8d 65 f8 lea -0x8(%ebp),%esp 10fa74: 5e pop %esi 10fa75: 5f pop %edi 10fa76: c9 leave 10fa77: 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; 10fa78: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10fa7f: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10fa86: 00 00 00 10fa89: eb df jmp 10fa6a 10fa8b: 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(); 10fa8c: e8 db 39 00 00 call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 10fa91: e8 82 9c 00 00 call 119718 <__errno> 10fa96: c7 00 10 00 00 00 movl $0x10,(%eax) 10fa9c: b8 ff ff ff ff mov $0xffffffff,%eax 10faa1: eb 8d jmp 10fa30 0010fadc : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10fadc: 55 push %ebp 10fadd: 89 e5 mov %esp,%ebp 10fadf: 57 push %edi 10fae0: 56 push %esi 10fae1: 53 push %ebx 10fae2: 83 ec 2c sub $0x2c,%esp 10fae5: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10fae8: a1 98 01 13 00 mov 0x130198,%eax 10faed: 40 inc %eax 10faee: a3 98 01 13 00 mov %eax,0x130198 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10faf3: 89 f0 mov %esi,%eax 10faf5: 25 00 02 00 00 and $0x200,%eax 10fafa: 89 45 d4 mov %eax,-0x2c(%ebp) 10fafd: 0f 85 c9 00 00 00 jne 10fbcc 10fb03: 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 *) 10fb0a: 83 ec 0c sub $0xc,%esp 10fb0d: 68 00 07 13 00 push $0x130700 10fb12: e8 e1 2b 00 00 call 1126f8 <_Objects_Allocate> 10fb17: 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 ) { 10fb19: 83 c4 10 add $0x10,%esp 10fb1c: 85 c0 test %eax,%eax 10fb1e: 0f 84 b4 00 00 00 je 10fbd8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 10fb24: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10fb27: 83 ec 08 sub $0x8,%esp 10fb2a: 8d 45 e4 lea -0x1c(%ebp),%eax 10fb2d: 50 push %eax 10fb2e: ff 75 08 pushl 0x8(%ebp) 10fb31: e8 66 65 00 00 call 11609c <_POSIX_Message_queue_Name_to_id> 10fb36: 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 ) { 10fb38: 83 c4 10 add $0x10,%esp 10fb3b: 85 c0 test %eax,%eax 10fb3d: 75 59 jne 10fb98 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10fb3f: 81 e6 00 0a 00 00 and $0xa00,%esi 10fb45: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10fb4b: 0f 84 a7 00 00 00 je 10fbf8 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 10fb51: 50 push %eax 10fb52: 8d 45 dc lea -0x24(%ebp),%eax 10fb55: 50 push %eax 10fb56: ff 75 e4 pushl -0x1c(%ebp) 10fb59: 68 60 05 13 00 push $0x130560 10fb5e: e8 45 30 00 00 call 112ba8 <_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 ); 10fb63: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 10fb66: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10fb69: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10fb6c: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10fb70: a1 1c 07 13 00 mov 0x13071c,%eax 10fb75: 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; 10fb78: 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(); 10fb7f: e8 e8 38 00 00 call 11346c <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10fb84: e8 e3 38 00 00 call 11346c <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10fb89: 8b 43 08 mov 0x8(%ebx),%eax 10fb8c: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fb8f: 8d 65 f4 lea -0xc(%ebp),%esp 10fb92: 5b pop %ebx 10fb93: 5e pop %esi 10fb94: 5f pop %edi 10fb95: c9 leave 10fb96: c3 ret 10fb97: 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) ) ) { 10fb98: 83 f8 02 cmp $0x2,%eax 10fb9b: 0f 84 87 00 00 00 je 10fc28 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 ); 10fba1: 83 ec 08 sub $0x8,%esp 10fba4: 53 push %ebx 10fba5: 68 00 07 13 00 push $0x130700 10fbaa: e8 c9 2e 00 00 call 112a78 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10fbaf: e8 b8 38 00 00 call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10fbb4: e8 5f 9b 00 00 call 119718 <__errno> 10fbb9: 89 38 mov %edi,(%eax) 10fbbb: b8 ff ff ff ff mov $0xffffffff,%eax 10fbc0: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fbc3: 8d 65 f4 lea -0xc(%ebp),%esp 10fbc6: 5b pop %ebx 10fbc7: 5e pop %esi 10fbc8: 5f pop %edi 10fbc9: c9 leave 10fbca: c3 ret 10fbcb: 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 * ); 10fbcc: 8b 45 14 mov 0x14(%ebp),%eax 10fbcf: 89 45 d0 mov %eax,-0x30(%ebp) 10fbd2: e9 33 ff ff ff jmp 10fb0a 10fbd7: 90 nop <== NOT EXECUTED va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 10fbd8: e8 8f 38 00 00 call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10fbdd: e8 36 9b 00 00 call 119718 <__errno> 10fbe2: c7 00 17 00 00 00 movl $0x17,(%eax) 10fbe8: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fbed: 8d 65 f4 lea -0xc(%ebp),%esp 10fbf0: 5b pop %ebx 10fbf1: 5e pop %esi 10fbf2: 5f pop %edi 10fbf3: c9 leave 10fbf4: c3 ret 10fbf5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10fbf8: 83 ec 08 sub $0x8,%esp 10fbfb: 53 push %ebx 10fbfc: 68 00 07 13 00 push $0x130700 10fc01: e8 72 2e 00 00 call 112a78 <_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(); 10fc06: e8 61 38 00 00 call 11346c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10fc0b: e8 08 9b 00 00 call 119718 <__errno> 10fc10: c7 00 11 00 00 00 movl $0x11,(%eax) 10fc16: b8 ff ff ff ff mov $0xffffffff,%eax 10fc1b: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fc1e: 8d 65 f4 lea -0xc(%ebp),%esp 10fc21: 5b pop %ebx 10fc22: 5e pop %esi 10fc23: 5f pop %edi 10fc24: c9 leave 10fc25: c3 ret 10fc26: 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) ) ) { 10fc28: 8b 55 d4 mov -0x2c(%ebp),%edx 10fc2b: 85 d2 test %edx,%edx 10fc2d: 0f 84 6e ff ff ff je 10fba1 /* * 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( 10fc33: 8d 45 e0 lea -0x20(%ebp),%eax 10fc36: 50 push %eax 10fc37: ff 75 d0 pushl -0x30(%ebp) 10fc3a: 6a 01 push $0x1 10fc3c: ff 75 08 pushl 0x8(%ebp) 10fc3f: e8 c4 62 00 00 call 115f08 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10fc44: 83 c4 10 add $0x10,%esp 10fc47: 40 inc %eax 10fc48: 74 26 je 10fc70 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10fc4a: 8b 45 e0 mov -0x20(%ebp),%eax 10fc4d: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10fc50: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10fc54: a1 1c 07 13 00 mov 0x13071c,%eax 10fc59: 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; 10fc5c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10fc63: e8 04 38 00 00 call 11346c <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10fc68: 8b 43 08 mov 0x8(%ebx),%eax 10fc6b: e9 1f ff ff ff jmp 10fb8f 10fc70: 83 ec 08 sub $0x8,%esp 10fc73: 53 push %ebx 10fc74: 68 00 07 13 00 push $0x130700 10fc79: e8 fa 2d 00 00 call 112a78 <_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(); 10fc7e: e8 e9 37 00 00 call 11346c <_Thread_Enable_dispatch> 10fc83: b8 ff ff ff ff mov $0xffffffff,%eax return (mqd_t) -1; 10fc88: 83 c4 10 add $0x10,%esp 10fc8b: e9 ff fe ff ff jmp 10fb8f 0010fef0 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 10fef0: 55 push %ebp 10fef1: 89 e5 mov %esp,%ebp 10fef3: 56 push %esi 10fef4: 53 push %ebx 10fef5: 83 ec 10 sub $0x10,%esp 10fef8: 8b 75 0c mov 0xc(%ebp),%esi 10fefb: 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 ) 10fefe: 85 f6 test %esi,%esi 10ff00: 74 60 je 10ff62 10ff02: 51 push %ecx 10ff03: 8d 45 f4 lea -0xc(%ebp),%eax 10ff06: 50 push %eax 10ff07: ff 75 08 pushl 0x8(%ebp) 10ff0a: 68 00 07 13 00 push $0x130700 10ff0f: e8 94 2c 00 00 call 112ba8 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10ff14: 83 c4 10 add $0x10,%esp 10ff17: 8b 55 f4 mov -0xc(%ebp),%edx 10ff1a: 85 d2 test %edx,%edx 10ff1c: 75 32 jne 10ff50 case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 10ff1e: 8b 50 10 mov 0x10(%eax),%edx /* * Return the old values. */ if ( omqstat ) { 10ff21: 85 db test %ebx,%ebx 10ff23: 74 17 je 10ff3c omqstat->mq_flags = the_mq_fd->oflag; 10ff25: 8b 48 14 mov 0x14(%eax),%ecx 10ff28: 89 0b mov %ecx,(%ebx) omqstat->mq_msgsize = the_core_mq->maximum_message_size; 10ff2a: 8b 4a 68 mov 0x68(%edx),%ecx 10ff2d: 89 4b 08 mov %ecx,0x8(%ebx) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 10ff30: 8b 4a 60 mov 0x60(%edx),%ecx 10ff33: 89 4b 04 mov %ecx,0x4(%ebx) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 10ff36: 8b 52 64 mov 0x64(%edx),%edx 10ff39: 89 53 0c mov %edx,0xc(%ebx) } the_mq_fd->oflag = mqstat->mq_flags; 10ff3c: 8b 16 mov (%esi),%edx 10ff3e: 89 50 14 mov %edx,0x14(%eax) _Thread_Enable_dispatch(); 10ff41: e8 26 35 00 00 call 11346c <_Thread_Enable_dispatch> 10ff46: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10ff48: 8d 65 f8 lea -0x8(%ebp),%esp 10ff4b: 5b pop %ebx 10ff4c: 5e pop %esi 10ff4d: c9 leave 10ff4e: c3 ret 10ff4f: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10ff50: e8 c3 97 00 00 call 119718 <__errno> 10ff55: c7 00 09 00 00 00 movl $0x9,(%eax) 10ff5b: b8 ff ff ff ff mov $0xffffffff,%eax 10ff60: eb e6 jmp 10ff48 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 ); 10ff62: e8 b1 97 00 00 call 119718 <__errno> 10ff67: c7 00 16 00 00 00 movl $0x16,(%eax) 10ff6d: b8 ff ff ff ff mov $0xffffffff,%eax 10ff72: eb d4 jmp 10ff48 001290f0 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 1290f0: 55 push %ebp 1290f1: 89 e5 mov %esp,%ebp 1290f3: 56 push %esi 1290f4: 53 push %ebx 1290f5: 8b 5d 08 mov 0x8(%ebp),%ebx 1290f8: 8b 75 0c mov 0xc(%ebp),%esi Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 1290fb: 83 ec 0c sub $0xc,%esp 1290fe: 53 push %ebx 1290ff: e8 60 01 00 00 call 129264 <_Timespec_Is_valid> 129104: 83 c4 10 add $0x10,%esp 129107: 84 c0 test %al,%al 129109: 0f 84 e1 00 00 00 je 1291f0 * 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 ) 12910f: 8b 13 mov (%ebx),%edx 129111: 85 d2 test %edx,%edx 129113: 0f 88 d7 00 00 00 js 1291f0 <== ALWAYS TAKEN 129119: 8b 43 04 mov 0x4(%ebx),%eax 12911c: 85 c0 test %eax,%eax 12911e: 0f 88 cc 00 00 00 js 1291f0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 129124: 83 ec 0c sub $0xc,%esp 129127: 53 push %ebx 129128: e8 fb fb fe ff call 118d28 <_Timespec_To_ticks> 12912d: 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 ) { 12912f: 83 c4 10 add $0x10,%esp 129132: 85 c0 test %eax,%eax 129134: 75 36 jne 12916c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 129136: a1 b8 51 13 00 mov 0x1351b8,%eax 12913b: 40 inc %eax 12913c: a3 b8 51 13 00 mov %eax,0x1351b8 _Thread_Disable_dispatch(); _Thread_Yield_processor(); 129141: e8 7e 9d fe ff call 112ec4 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 129146: e8 49 91 fe ff call 112294 <_Thread_Enable_dispatch> if ( rmtp ) { 12914b: 85 f6 test %esi,%esi 12914d: 0f 84 93 00 00 00 je 1291e6 rmtp->tv_sec = 0; 129153: c7 06 00 00 00 00 movl $0x0,(%esi) rmtp->tv_nsec = 0; 129159: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 129160: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 129162: 8d 65 f8 lea -0x8(%ebp),%esp 129165: 5b pop %ebx 129166: 5e pop %esi 129167: c9 leave 129168: c3 ret 129169: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12916c: a1 b8 51 13 00 mov 0x1351b8,%eax 129171: 40 inc %eax 129172: a3 b8 51 13 00 mov %eax,0x1351b8 /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 129177: 83 ec 08 sub $0x8,%esp 12917a: 68 08 00 00 10 push $0x10000008 12917f: ff 35 78 52 13 00 pushl 0x135278 129185: e8 22 9a fe ff call 112bac <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 12918a: 8b 15 78 52 13 00 mov 0x135278,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 129190: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 129193: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 12919a: c7 42 64 fc 20 11 00 movl $0x1120fc,0x64(%edx) the_watchdog->id = id; 1291a1: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 1291a4: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1291ab: 89 5a 54 mov %ebx,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1291ae: 58 pop %eax 1291af: 59 pop %ecx 1291b0: 83 c2 48 add $0x48,%edx 1291b3: 52 push %edx 1291b4: 68 98 52 13 00 push $0x135298 1291b9: e8 e6 a0 fe ff call 1132a4 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 1291be: e8 d1 90 fe ff call 112294 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 1291c3: 83 c4 10 add $0x10,%esp 1291c6: 85 f6 test %esi,%esi 1291c8: 74 1c je 1291e6 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 1291ca: a1 78 52 13 00 mov 0x135278,%eax _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 1291cf: 03 58 5c add 0x5c(%eax),%ebx 1291d2: 2b 58 60 sub 0x60(%eax),%ebx _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 1291d5: 83 ec 08 sub $0x8,%esp 1291d8: 56 push %esi 1291d9: 53 push %ebx 1291da: e8 3d 00 00 00 call 12921c <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 1291df: 83 c4 10 add $0x10,%esp 1291e2: 85 db test %ebx,%ebx 1291e4: 75 1f jne 129205 rtems_set_errno_and_return_minus_one( EINTR ); 1291e6: 31 c0 xor %eax,%eax #endif } return 0; } 1291e8: 8d 65 f8 lea -0x8(%ebp),%esp 1291eb: 5b pop %ebx 1291ec: 5e pop %esi 1291ed: c9 leave 1291ee: c3 ret 1291ef: 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 ); 1291f0: e8 0b 2b ff ff call 11bd00 <__errno> 1291f5: c7 00 16 00 00 00 movl $0x16,(%eax) 1291fb: b8 ff ff ff ff mov $0xffffffff,%eax 129200: e9 5d ff ff ff jmp 129162 #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 ); 129205: e8 f6 2a ff ff call 11bd00 <__errno> 12920a: c7 00 04 00 00 00 movl $0x4,(%eax) 129210: b8 ff ff ff ff mov $0xffffffff,%eax 129215: e9 48 ff ff ff jmp 129162 00108864 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 108864: 55 push %ebp 108865: 89 e5 mov %esp,%ebp 108867: 57 push %edi 108868: 56 push %esi 108869: 53 push %ebx 10886a: 83 ec 0c sub $0xc,%esp struct _reent *ptr; if (_Thread_libc_reent == 0) 10886d: a1 84 74 12 00 mov 0x127484,%eax 108872: 85 c0 test %eax,%eax 108874: 0f 84 52 02 00 00 je 108acc 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)); 10887a: 83 ec 0c sub $0xc,%esp 10887d: 68 24 04 00 00 push $0x424 108882: e8 7d 5e 00 00 call 10e704 <_Workspace_Allocate> 108887: 89 c2 mov %eax,%edx #endif if (ptr) { 108889: 83 c4 10 add $0x10,%esp 10888c: 85 c0 test %eax,%eax 10888e: 0f 84 2c 02 00 00 je 108ac0 _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 108894: c7 00 00 00 00 00 movl $0x0,(%eax) 10889a: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx 1088a0: 89 58 04 mov %ebx,0x4(%eax) 1088a3: 8d 80 54 03 00 00 lea 0x354(%eax),%eax 1088a9: 89 42 08 mov %eax,0x8(%edx) 1088ac: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax 1088b2: 89 42 0c mov %eax,0xc(%edx) 1088b5: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 1088bc: 8d 72 14 lea 0x14(%edx),%esi 1088bf: 31 c0 xor %eax,%eax 1088c1: b9 19 00 00 00 mov $0x19,%ecx 1088c6: 89 f7 mov %esi,%edi 1088c8: f3 aa rep stos %al,%es:(%edi) 1088ca: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 1088d1: c7 42 34 ca 09 12 00 movl $0x1209ca,0x34(%edx) 1088d8: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) 1088df: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx) 1088e6: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx) 1088ed: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx) 1088f4: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx) 1088fb: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx) 108902: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) 108909: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) 108910: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) 108917: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) 10891e: c6 42 60 00 movb $0x0,0x60(%edx) 108922: 8d 72 7c lea 0x7c(%edx),%esi 108925: b1 24 mov $0x24,%cl 108927: 89 f7 mov %esi,%edi 108929: f3 aa rep stos %al,%es:(%edi) 10892b: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx) 108932: 00 00 00 108935: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx) 10893c: 00 00 00 10893f: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx) 108946: 00 00 00 108949: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx) 108950: 0e 33 108952: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx) 108959: cd ab 10895b: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx) 108962: 34 12 108964: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx) 10896b: 6d e6 10896d: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx) 108974: ec de 108976: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx) 10897d: 05 00 10897f: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx) 108986: 0b 00 108988: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx) 10898f: 00 00 00 108992: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx) 108999: 00 00 00 10899c: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx) 1089a3: 00 00 00 1089a6: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx) 1089ad: 00 00 00 1089b0: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx) 1089b7: 00 00 00 1089ba: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx) 1089c1: 00 00 00 1089c4: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx) 1089cb: 00 00 00 1089ce: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx) 1089d5: 00 00 00 1089d8: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx) 1089df: 00 00 00 1089e2: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx) 1089e9: 00 00 00 1089ec: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx) 1089f3: 00 00 00 1089f6: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx) 1089fd: 00 00 00 108a00: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx) 108a07: 00 00 00 108a0a: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx) 108a11: 00 00 00 108a14: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx) 108a1b: 00 00 00 108a1e: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx) 108a25: 00 00 00 108a28: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx) 108a2f: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx) 108a36: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx) 108a3d: 00 00 00 108a40: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx) 108a47: 00 00 00 108a4a: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx) 108a51: 00 00 00 108a54: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx) 108a5b: 00 00 00 108a5e: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx) 108a65: 00 00 00 108a68: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx) 108a6f: 00 00 00 108a72: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx) 108a79: 00 00 00 108a7c: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx) 108a83: 00 00 00 108a86: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx) 108a8d: 00 00 00 108a90: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx) 108a97: 00 00 00 108a9a: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx) 108aa1: 00 00 00 108aa4: 66 b9 38 01 mov $0x138,%cx 108aa8: 89 df mov %ebx,%edi 108aaa: f3 aa rep stos %al,%es:(%edi) creating_task->libc_reent = ptr; 108aac: 8b 45 0c mov 0xc(%ebp),%eax 108aaf: 89 90 f0 00 00 00 mov %edx,0xf0(%eax) 108ab5: b0 01 mov $0x1,%al return TRUE; } return FALSE; } 108ab7: 8d 65 f4 lea -0xc(%ebp),%esp 108aba: 5b pop %ebx 108abb: 5e pop %esi 108abc: 5f pop %edi 108abd: c9 leave 108abe: c3 ret 108abf: 90 nop <== NOT EXECUTED * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { 108ac0: 31 c0 xor %eax,%eax creating_task->libc_reent = ptr; return TRUE; } return FALSE; } 108ac2: 8d 65 f4 lea -0xc(%ebp),%esp 108ac5: 5b pop %ebx 108ac6: 5e pop %esi 108ac7: 5f pop %edi 108ac8: c9 leave 108ac9: c3 ret 108aca: 66 90 xchg %ax,%ax <== NOT EXECUTED { struct _reent *ptr; if (_Thread_libc_reent == 0) { _REENT = _global_impure_ptr; 108acc: a1 a0 18 12 00 mov 0x1218a0,%eax 108ad1: a3 20 51 12 00 mov %eax,0x125120 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 108ad6: c7 05 84 74 12 00 20 movl $0x125120,0x127484 108add: 51 12 00 108ae0: e9 95 fd ff ff jmp 10887a 00108798 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 108798: 55 push %ebp 108799: 89 e5 mov %esp,%ebp 10879b: 57 push %edi 10879c: 56 push %esi 10879d: 53 push %ebx 10879e: 83 ec 0c sub $0xc,%esp 1087a1: 8b 7d 08 mov 0x8(%ebp),%edi 1087a4: 8b 5d 0c mov 0xc(%ebp),%ebx /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 1087a7: 39 df cmp %ebx,%edi 1087a9: 74 55 je 108800 ptr = _REENT; } else { ptr = deleted_task->libc_reent; 1087ab: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi } if (ptr && ptr != _global_impure_ptr) { 1087b1: 85 f6 test %esi,%esi 1087b3: 74 21 je 1087d6 <== ALWAYS TAKEN 1087b5: 3b 35 a0 18 12 00 cmp 0x1218a0,%esi 1087bb: 74 19 je 1087d6 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 1087bd: 83 ec 08 sub $0x8,%esp 1087c0: 68 08 88 10 00 push $0x108808 1087c5: 56 push %esi 1087c6: e8 b5 b6 00 00 call 113e80 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 1087cb: 89 34 24 mov %esi,(%esp) 1087ce: e8 4d 5f 00 00 call 10e720 <_Workspace_Free> 1087d3: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 1087d6: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 1087dd: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 1087e0: 39 df cmp %ebx,%edi 1087e2: 74 08 je 1087ec _REENT = 0; } } 1087e4: 8d 65 f4 lea -0xc(%ebp),%esp 1087e7: 5b pop %ebx 1087e8: 5e pop %esi 1087e9: 5f pop %edi 1087ea: c9 leave 1087eb: c3 ret /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 1087ec: c7 05 20 51 12 00 00 movl $0x0,0x125120 1087f3: 00 00 00 } } 1087f6: 8d 65 f4 lea -0xc(%ebp),%esp 1087f9: 5b pop %ebx 1087fa: 5e pop %esi 1087fb: 5f pop %edi 1087fc: c9 leave 1087fd: c3 ret 1087fe: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 108800: 8b 35 20 51 12 00 mov 0x125120,%esi 108806: eb a9 jmp 1087b1 00108808 : */ int newlib_free_buffers( FILE *fp ) { 108808: 55 push %ebp 108809: 89 e5 mov %esp,%ebp 10880b: 53 push %ebx 10880c: 83 ec 10 sub $0x10,%esp 10880f: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 108812: 53 push %ebx 108813: e8 70 b2 00 00 call 113a88 108818: 83 c4 10 add $0x10,%esp 10881b: 83 f8 02 cmp $0x2,%eax 10881e: 76 14 jbe 108834 <== NEVER TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 108820: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108823: 53 push %ebx <== NOT EXECUTED 108824: e8 f3 af 00 00 call 11381c <== NOT EXECUTED 108829: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10882c: 31 c0 xor %eax,%eax 10882e: 8b 5d fc mov -0x4(%ebp),%ebx 108831: c9 leave 108832: c3 ret 108833: 90 nop <== NOT EXECUTED { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 108834: 80 7b 0c 00 cmpb $0x0,0xc(%ebx) 108838: 79 f2 jns 10882c <== NEVER TAKEN free( fp->_bf._base ); 10883a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10883d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108840: e8 37 f8 ff ff call 10807c <== NOT EXECUTED fp->_flags &= ~__SMBF; 108845: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 10884b: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 108851: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 108858: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; default: fclose(fp); } return 0; } 10885b: 31 c0 xor %eax,%eax <== NOT EXECUTED 10885d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108860: c9 leave <== NOT EXECUTED 108861: c3 ret <== NOT EXECUTED 00108780 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 108780: 55 push %ebp 108781: 89 e5 mov %esp,%ebp 108783: 53 push %ebx 108784: 83 ec 04 sub $0x4,%esp 108787: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 10878a: 80 3d 98 96 12 00 00 cmpb $0x0,0x129698 108791: 74 09 je 10879c NULL_major = major; } return RTEMS_SUCCESSFUL; } 108793: 31 c0 xor %eax,%eax 108795: 8b 5d fc mov -0x4(%ebp),%ebx 108798: c9 leave 108799: c3 ret 10879a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 10879c: c6 05 98 96 12 00 01 movb $0x1,0x129698 status = rtems_io_register_name( 1087a3: 50 push %eax 1087a4: 6a 00 push $0x0 1087a6: 53 push %ebx 1087a7: 68 93 24 12 00 push $0x122493 1087ac: e8 1f 01 00 00 call 1088d0 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 1087b1: 83 c4 10 add $0x10,%esp 1087b4: 85 c0 test %eax,%eax 1087b6: 75 0d jne 1087c5 <== ALWAYS TAKEN rtems_fatal_error_occurred(status); NULL_major = major; 1087b8: 89 1d 00 9a 12 00 mov %ebx,0x129a00 } return RTEMS_SUCCESSFUL; } 1087be: 31 c0 xor %eax,%eax 1087c0: 8b 5d fc mov -0x4(%ebp),%ebx 1087c3: c9 leave 1087c4: c3 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 1087c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087c8: 50 push %eax <== NOT EXECUTED 1087c9: e8 96 42 00 00 call 10ca64 <== NOT EXECUTED 00108764 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 108764: 55 push %ebp 108765: 89 e5 mov %esp,%ebp 108767: 8b 45 10 mov 0x10(%ebp),%eax rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 10876a: 85 c0 test %eax,%eax 10876c: 74 06 je 108774 <== NEVER TAKEN rw_args->bytes_moved = rw_args->count; 10876e: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED 108771: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED return NULL_SUCCESSFUL; } 108774: 31 c0 xor %eax,%eax 108776: c9 leave 108777: c3 ret 00108b48 : int open( const char *pathname, int flags, ... ) { 108b48: 55 push %ebp 108b49: 89 e5 mov %esp,%ebp 108b4b: 57 push %edi 108b4c: 56 push %esi 108b4d: 53 push %ebx 108b4e: 83 ec 4c sub $0x4c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 108b51: 8b 45 0c mov 0xc(%ebp),%eax 108b54: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 108b55: 89 c6 mov %eax,%esi 108b57: 83 e6 01 and $0x1,%esi 108b5a: f7 de neg %esi 108b5c: 83 e6 04 and $0x4,%esi eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 108b5f: a8 02 test $0x2,%al 108b61: 74 03 je 108b66 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 108b63: 83 ce 02 or $0x2,%esi va_start(ap, flags); mode = va_arg( ap, int ); 108b66: 8b 45 10 mov 0x10(%ebp),%eax 108b69: 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(); 108b6c: e8 e7 71 00 00 call 10fd58 108b71: 89 c3 mov %eax,%ebx if ( iop == 0 ) { 108b73: 85 c0 test %eax,%eax 108b75: 0f 84 bd 00 00 00 je 108c38 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 108b7b: b9 ff ff ff ff mov $0xffffffff,%ecx 108b80: 8b 7d 08 mov 0x8(%ebp),%edi 108b83: 31 c0 xor %eax,%eax 108b85: f2 ae repnz scas %es:(%edi),%al 108b87: f7 d1 not %ecx 108b89: 49 dec %ecx /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 108b8a: 83 ec 0c sub $0xc,%esp 108b8d: 6a 01 push $0x1 108b8f: 8d 45 d4 lea -0x2c(%ebp),%eax 108b92: 89 45 b4 mov %eax,-0x4c(%ebp) 108b95: 50 push %eax 108b96: 56 push %esi 108b97: 51 push %ecx 108b98: ff 75 08 pushl 0x8(%ebp) 108b9b: e8 28 f4 ff ff call 107fc8 108ba0: 89 c6 mov %eax,%esi pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 108ba2: 83 c4 20 add $0x20,%esp 108ba5: 83 f8 ff cmp $0xffffffff,%eax 108ba8: 0f 84 f2 00 00 00 je 108ca0 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 108bae: 8b 45 0c mov 0xc(%ebp),%eax 108bb1: 25 00 0a 00 00 and $0xa00,%eax 108bb6: 3d 00 0a 00 00 cmp $0xa00,%eax 108bbb: 0f 84 8b 00 00 00 je 108c4c /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 108bc1: 8b 45 dc mov -0x24(%ebp),%eax 108bc4: 89 43 3c mov %eax,0x3c(%ebx) iop->file_info = loc.node_access; 108bc7: 8b 45 d4 mov -0x2c(%ebp),%eax 108bca: 89 43 38 mov %eax,0x38(%ebx) iop->flags |= rtems_libio_fcntl_flags( flags ); 108bcd: 8b 73 14 mov 0x14(%ebx),%esi 108bd0: 83 ec 0c sub $0xc,%esp 108bd3: ff 75 0c pushl 0xc(%ebp) 108bd6: e8 09 72 00 00 call 10fde4 108bdb: 09 f0 or %esi,%eax 108bdd: 89 43 14 mov %eax,0x14(%ebx) iop->pathinfo = loc; 108be0: 8d 7b 18 lea 0x18(%ebx),%edi 108be3: b9 05 00 00 00 mov $0x5,%ecx 108be8: 8b 75 b4 mov -0x4c(%ebp),%esi 108beb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !iop->handlers || !iop->handlers->open_h ) { 108bed: 8b 43 3c mov 0x3c(%ebx),%eax 108bf0: 83 c4 10 add $0x10,%esp 108bf3: 85 c0 test %eax,%eax 108bf5: 0f 84 99 00 00 00 je 108c94 <== ALWAYS TAKEN 108bfb: 8b 00 mov (%eax),%eax 108bfd: 85 c0 test %eax,%eax 108bff: 0f 84 8f 00 00 00 je 108c94 <== ALWAYS TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 108c05: ff 75 c4 pushl -0x3c(%ebp) 108c08: ff 75 0c pushl 0xc(%ebp) 108c0b: ff 75 08 pushl 0x8(%ebp) 108c0e: 53 push %ebx 108c0f: ff d0 call *%eax if ( rc ) { 108c11: 83 c4 10 add $0x10,%esp 108c14: 85 c0 test %eax,%eax 108c16: 75 6c jne 108c84 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 108c18: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 108c1f: 0f 85 93 00 00 00 jne 108cb8 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 108c25: 89 d8 mov %ebx,%eax 108c27: 2b 05 60 72 12 00 sub 0x127260,%eax 108c2d: c1 f8 06 sar $0x6,%eax } 108c30: 8d 65 f4 lea -0xc(%ebp),%esp 108c33: 5b pop %ebx 108c34: 5e pop %esi 108c35: 5f pop %edi 108c36: c9 leave 108c37: c3 ret * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { 108c38: 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 ); 108c3d: e8 8e aa 00 00 call 1136d0 <__errno> 108c42: 89 30 mov %esi,(%eax) 108c44: b8 ff ff ff ff mov $0xffffffff,%eax 108c49: eb e5 jmp 108c30 108c4b: 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)) { 108c4c: 8d 7d d4 lea -0x2c(%ebp),%edi 108c4f: be 11 00 00 00 mov $0x11,%esi done: va_end(ap); if ( rc ) { if ( iop ) 108c54: 85 db test %ebx,%ebx 108c56: 74 0c je 108c64 <== ALWAYS TAKEN rtems_libio_free( iop ); 108c58: 83 ec 0c sub $0xc,%esp 108c5b: 53 push %ebx 108c5c: e8 9f 70 00 00 call 10fd00 108c61: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 108c64: 85 ff test %edi,%edi 108c66: 74 d5 je 108c3d rtems_filesystem_freenode( loc_to_free ); 108c68: 8b 47 0c mov 0xc(%edi),%eax 108c6b: 85 c0 test %eax,%eax 108c6d: 74 ce je 108c3d <== ALWAYS TAKEN 108c6f: 8b 40 1c mov 0x1c(%eax),%eax 108c72: 85 c0 test %eax,%eax 108c74: 74 c7 je 108c3d <== ALWAYS TAKEN 108c76: 83 ec 0c sub $0xc,%esp 108c79: 57 push %edi 108c7a: ff d0 call *%eax 108c7c: 83 c4 10 add $0x10,%esp 108c7f: eb bc jmp 108c3d 108c81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 108c84: e8 47 aa 00 00 call 1136d0 <__errno> 108c89: 8b 30 mov (%eax),%esi 108c8b: 8d 7d d4 lea -0x2c(%ebp),%edi */ done: va_end(ap); if ( rc ) { 108c8e: 85 f6 test %esi,%esi 108c90: 74 93 je 108c25 <== ALWAYS TAKEN 108c92: eb c0 jmp 108c54 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 108c94: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED 108c97: be 86 00 00 00 mov $0x86,%esi <== NOT EXECUTED 108c9c: eb b6 jmp 108c54 <== NOT EXECUTED 108c9e: 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 ) { 108ca0: e8 2b aa 00 00 call 1136d0 <__errno> 108ca5: 83 38 02 cmpl $0x2,(%eax) 108ca8: 74 5e je 108d08 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 108caa: e8 21 aa 00 00 call 1136d0 <__errno> 108caf: 8b 30 mov (%eax),%esi 108cb1: 31 ff xor %edi,%edi goto done; 108cb3: eb d9 jmp 108c8e 108cb5: 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 ); 108cb8: 52 push %edx 108cb9: 6a 00 push $0x0 108cbb: 6a 00 push $0x0 108cbd: 89 d8 mov %ebx,%eax 108cbf: 2b 05 60 72 12 00 sub 0x127260,%eax 108cc5: c1 f8 06 sar $0x6,%eax 108cc8: 50 push %eax 108cc9: e8 ba 6d 00 00 call 10fa88 108cce: 89 c6 mov %eax,%esi if ( rc ) { 108cd0: 83 c4 10 add $0x10,%esp 108cd3: 85 c0 test %eax,%eax 108cd5: 0f 84 4a ff ff ff je 108c25 <== NEVER TAKEN if(errno) rc = errno; 108cdb: e8 f0 a9 00 00 call 1136d0 <__errno> <== NOT EXECUTED 108ce0: 8b 00 mov (%eax),%eax <== NOT EXECUTED 108ce2: 85 c0 test %eax,%eax <== NOT EXECUTED 108ce4: 0f 85 8b 00 00 00 jne 108d75 <== NOT EXECUTED close( iop - rtems_libio_iops ); 108cea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108ced: 2b 1d 60 72 12 00 sub 0x127260,%ebx <== NOT EXECUTED 108cf3: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED 108cf6: 53 push %ebx <== NOT EXECUTED 108cf7: e8 fc 6c 00 00 call 10f9f8 <== NOT EXECUTED 108cfc: 31 ff xor %edi,%edi <== NOT EXECUTED 108cfe: 31 db xor %ebx,%ebx <== NOT EXECUTED 108d00: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108d03: eb 89 jmp 108c8e <== NOT EXECUTED 108d05: 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) ) { 108d08: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 108d0f: 75 0f jne 108d20 108d11: 31 ff xor %edi,%edi 108d13: be 02 00 00 00 mov $0x2,%esi 108d18: e9 37 ff ff ff jmp 108c54 108d1d: 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 ); 108d20: 6a 00 push $0x0 108d22: 6a 00 push $0x0 108d24: 8b 45 c4 mov -0x3c(%ebp),%eax 108d27: 80 cc 80 or $0x80,%ah 108d2a: 50 push %eax 108d2b: ff 75 08 pushl 0x8(%ebp) 108d2e: e8 75 f6 ff ff call 1083a8 if ( rc ) { 108d33: 83 c4 10 add $0x10,%esp 108d36: 85 c0 test %eax,%eax 108d38: 0f 85 6c ff ff ff jne 108caa <== 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 ); 108d3e: 89 f1 mov %esi,%ecx 108d40: 8b 7d 08 mov 0x8(%ebp),%edi 108d43: 31 c0 xor %eax,%eax 108d45: f2 ae repnz scas %es:(%edi),%al 108d47: f7 d1 not %ecx 108d49: 49 dec %ecx 108d4a: 83 ec 0c sub $0xc,%esp 108d4d: 6a 01 push $0x1 108d4f: 8d 45 d4 lea -0x2c(%ebp),%eax 108d52: 50 push %eax 108d53: 6a 00 push $0x0 108d55: 51 push %ecx 108d56: ff 75 08 pushl 0x8(%ebp) 108d59: e8 6a f2 ff ff call 107fc8 if ( status != 0 ) { /* The file did not exist */ 108d5e: 83 c4 20 add $0x20,%esp 108d61: 85 c0 test %eax,%eax 108d63: 0f 84 58 fe ff ff je 108bc1 <== NEVER TAKEN 108d69: 31 ff xor %edi,%edi <== NOT EXECUTED 108d6b: be 0d 00 00 00 mov $0xd,%esi <== NOT EXECUTED 108d70: e9 df fe ff ff jmp 108c54 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 108d75: e8 56 a9 00 00 call 1136d0 <__errno> <== NOT EXECUTED 108d7a: 8b 30 mov (%eax),%esi <== NOT EXECUTED 108d7c: e9 69 ff ff ff jmp 108cea <== NOT EXECUTED 00108ae8 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 108ae8: 55 push %ebp 108ae9: 89 e5 mov %esp,%ebp 108aeb: 83 ec 0c sub $0xc,%esp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 108aee: 6a 00 push $0x0 108af0: 6a 00 push $0x0 108af2: 68 d0 f3 11 00 push $0x11f3d0 108af7: e8 4c 00 00 00 call 108b48 108afc: 83 c4 10 add $0x10,%esp 108aff: 40 inc %eax 108b00: 74 2a je 108b2c /* * 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) 108b02: 52 push %edx 108b03: 6a 00 push $0x0 108b05: 6a 01 push $0x1 108b07: 68 d0 f3 11 00 push $0x11f3d0 108b0c: e8 37 00 00 00 call 108b48 108b11: 83 c4 10 add $0x10,%esp 108b14: 40 inc %eax 108b15: 74 24 je 108b3b <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 108b17: 50 push %eax 108b18: 6a 00 push $0x0 108b1a: 6a 01 push $0x1 108b1c: 68 d0 f3 11 00 push $0x11f3d0 108b21: e8 22 00 00 00 call 108b48 108b26: 83 c4 10 add $0x10,%esp 108b29: 40 inc %eax 108b2a: 74 02 je 108b2e <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 108b2c: c9 leave 108b2d: 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 */ 108b2e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108b31: 68 32 44 54 55 push $0x55544432 <== NOT EXECUTED 108b36: e8 01 31 00 00 call 10bc3c <== 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 */ 108b3b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108b3e: 68 31 44 54 55 push $0x55544431 <== NOT EXECUTED 108b43: e8 f4 30 00 00 call 10bc3c <== NOT EXECUTED 00109664 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 109664: 55 push %ebp 109665: 89 e5 mov %esp,%ebp 109667: 56 push %esi 109668: 53 push %ebx 109669: 83 ec 10 sub $0x10,%esp 10966c: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 10966f: 8b 4a 34 mov 0x34(%edx),%ecx 109672: f6 c1 01 test $0x1,%cl 109675: 74 31 je 1096a8 <== ALWAYS TAKEN switch (c) { 109677: 3c 09 cmp $0x9,%al 109679: 0f 84 b1 00 00 00 je 109730 10967f: 76 3f jbe 1096c0 <== ALWAYS TAKEN 109681: 3c 0a cmp $0xa,%al 109683: 74 4f je 1096d4 109685: 3c 0d cmp $0xd,%al 109687: 74 7f je 109708 <== ALWAYS TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 109689: 83 e1 02 and $0x2,%ecx 10968c: 0f 85 c6 00 00 00 jne 109758 <== ALWAYS TAKEN 109692: 8b 0d 08 51 12 00 mov 0x125108,%ecx c = toupper(c); if (!iscntrl(c)) 109698: 0f b6 c0 movzbl %al,%eax 10969b: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) 1096a0: 75 06 jne 1096a8 <== ALWAYS TAKEN tty->column++; 1096a2: ff 42 28 incl 0x28(%edx) 1096a5: 8d 76 00 lea 0x0(%esi),%esi break; } } rtems_termios_puts (&c, 1, tty); 1096a8: 50 push %eax 1096a9: 52 push %edx 1096aa: 6a 01 push $0x1 1096ac: 8d 45 f4 lea -0xc(%ebp),%eax 1096af: 50 push %eax 1096b0: e8 7b fe ff ff call 109530 1096b5: 83 c4 10 add $0x10,%esp } 1096b8: 8d 65 f8 lea -0x8(%ebp),%esp 1096bb: 5b pop %ebx 1096bc: 5e pop %esi 1096bd: c9 leave 1096be: c3 ret 1096bf: 90 nop <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 1096c0: 3c 08 cmp $0x8,%al <== NOT EXECUTED 1096c2: 75 c5 jne 109689 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 1096c4: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 1096c7: 85 c0 test %eax,%eax <== NOT EXECUTED 1096c9: 7e dd jle 1096a8 <== NOT EXECUTED tty->column--; 1096cb: 48 dec %eax <== NOT EXECUTED 1096cc: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED 1096cf: eb d7 jmp 1096a8 <== NOT EXECUTED 1096d1: 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) 1096d4: f6 c1 20 test $0x20,%cl 1096d7: 74 07 je 1096e0 <== NEVER TAKEN tty->column = 0; 1096d9: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 1096e0: 83 e1 04 and $0x4,%ecx 1096e3: 74 c3 je 1096a8 <== ALWAYS TAKEN rtems_termios_puts ("\r", 1, tty); 1096e5: 56 push %esi 1096e6: 52 push %edx 1096e7: 6a 01 push $0x1 1096e9: 68 34 0c 12 00 push $0x120c34 1096ee: 89 55 f0 mov %edx,-0x10(%ebp) 1096f1: e8 3a fe ff ff call 109530 tty->column = 0; 1096f6: 8b 55 f0 mov -0x10(%ebp),%edx 1096f9: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) 109700: 83 c4 10 add $0x10,%esp 109703: eb a3 jmp 1096a8 109705: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 109708: f6 c1 10 test $0x10,%cl <== NOT EXECUTED 10970b: 74 07 je 109714 <== NOT EXECUTED 10970d: 8b 5a 28 mov 0x28(%edx),%ebx <== NOT EXECUTED 109710: 85 db test %ebx,%ebx <== NOT EXECUTED 109712: 74 a4 je 1096b8 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 109714: f6 c1 08 test $0x8,%cl <== NOT EXECUTED 109717: 74 09 je 109722 <== NOT EXECUTED c = '\n'; 109719: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 10971d: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED 109720: 74 86 je 1096a8 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 109722: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED break; 109729: e9 7a ff ff ff jmp 1096a8 <== NOT EXECUTED 10972e: 66 90 xchg %ax,%ax <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 109730: 8b 5a 28 mov 0x28(%edx),%ebx 109733: 89 de mov %ebx,%esi 109735: 83 e6 07 and $0x7,%esi 109738: b8 08 00 00 00 mov $0x8,%eax 10973d: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 10973f: 81 e1 00 18 00 00 and $0x1800,%ecx 109745: 81 f9 00 18 00 00 cmp $0x1800,%ecx 10974b: 74 37 je 109784 <== NEVER TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 10974d: 01 d8 add %ebx,%eax <== NOT EXECUTED 10974f: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED break; 109752: e9 51 ff ff ff jmp 1096a8 <== NOT EXECUTED 109757: 90 nop <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 109758: 8b 0d 08 51 12 00 mov 0x125108,%ecx <== NOT EXECUTED 10975e: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109761: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED 109766: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED 109769: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED 10976c: 74 0e je 10977c <== NOT EXECUTED 10976e: 89 c3 mov %eax,%ebx <== NOT EXECUTED 109770: 88 d8 mov %bl,%al <== NOT EXECUTED 109772: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED 109775: e9 1e ff ff ff jmp 109698 <== NOT EXECUTED 10977a: 66 90 xchg %ax,%ax <== NOT EXECUTED 10977c: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED 10977f: eb ef jmp 109770 <== NOT EXECUTED 109781: 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; 109784: 8d 1c 18 lea (%eax,%ebx,1),%ebx 109787: 89 5a 28 mov %ebx,0x28(%edx) rtems_termios_puts ( " ", i, tty); 10978a: 51 push %ecx 10978b: 52 push %edx 10978c: 50 push %eax 10978d: 68 dc 08 12 00 push $0x1208dc 109792: e8 99 fd ff ff call 109530 return; 109797: 83 c4 10 add $0x10,%esp 10979a: e9 19 ff ff ff jmp 1096b8 0010a4dc : long pathconf( const char *path, int name ) { 10a4dc: 55 push %ebp 10a4dd: 89 e5 mov %esp,%ebp 10a4df: 56 push %esi 10a4e0: 53 push %ebx int status; int fd; fd = open( path, O_RDONLY ); 10a4e1: 83 ec 08 sub $0x8,%esp 10a4e4: 6a 00 push $0x0 10a4e6: ff 75 08 pushl 0x8(%ebp) 10a4e9: e8 92 fd ff ff call 10a280 10a4ee: 89 c3 mov %eax,%ebx if ( fd == -1 ) 10a4f0: 83 c4 10 add $0x10,%esp 10a4f3: 83 f8 ff cmp $0xffffffff,%eax 10a4f6: 74 24 je 10a51c return -1; status = fpathconf( fd, name ); 10a4f8: 83 ec 08 sub $0x8,%esp 10a4fb: ff 75 0c pushl 0xc(%ebp) 10a4fe: 50 push %eax 10a4ff: e8 00 ed ff ff call 109204 10a504: 89 c6 mov %eax,%esi (void) close( fd ); 10a506: 89 1c 24 mov %ebx,(%esp) 10a509: e8 d2 e7 ff ff call 108ce0 return status; 10a50e: 83 c4 10 add $0x10,%esp } 10a511: 89 f0 mov %esi,%eax 10a513: 8d 65 f8 lea -0x8(%ebp),%esp 10a516: 5b pop %ebx 10a517: 5e pop %esi 10a518: c9 leave 10a519: c3 ret 10a51a: 66 90 xchg %ax,%ax <== NOT EXECUTED { int status; int fd; fd = open( path, O_RDONLY ); if ( fd == -1 ) 10a51c: be ff ff ff ff mov $0xffffffff,%esi status = fpathconf( fd, name ); (void) close( fd ); return status; } 10a521: 89 f0 mov %esi,%eax 10a523: 8d 65 f8 lea -0x8(%ebp),%esp 10a526: 5b pop %ebx 10a527: 5e pop %esi 10a528: c9 leave 10a529: c3 ret 00112d24 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 112d24: 55 push %ebp 112d25: 89 e5 mov %esp,%ebp 112d27: 57 push %edi 112d28: 56 push %esi 112d29: 53 push %ebx 112d2a: 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) 112d2d: 6a 01 push $0x1 112d2f: 8d 5d c4 lea -0x3c(%ebp),%ebx 112d32: 53 push %ebx 112d33: 6a 07 push $0x7 112d35: 6a 03 push $0x3 112d37: 68 d7 14 12 00 push $0x1214d7 112d3c: e8 87 52 ff ff call 107fc8 112d41: 83 c4 20 add $0x20,%esp 112d44: 85 c0 test %eax,%eax 112d46: 0f 85 e0 00 00 00 jne 112e2c <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 112d4c: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 112d4f: 85 c0 test %eax,%eax <== NOT EXECUTED 112d51: 74 10 je 112d63 <== NOT EXECUTED 112d53: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 112d56: 85 c0 test %eax,%eax <== NOT EXECUTED 112d58: 74 09 je 112d63 <== NOT EXECUTED 112d5a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112d5d: 53 push %ebx <== NOT EXECUTED 112d5e: ff d0 call *%eax <== NOT EXECUTED 112d60: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 112d63: 8d 5d d9 lea -0x27(%ebp),%ebx 112d66: be dc 14 12 00 mov $0x1214dc,%esi 112d6b: b9 0a 00 00 00 mov $0xa,%ecx 112d70: 89 df mov %ebx,%edi 112d72: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 112d74: 0f b7 05 38 70 12 00 movzwl 0x127038,%eax 112d7b: 8d 50 01 lea 0x1(%eax),%edx 112d7e: 66 89 15 38 70 12 00 mov %dx,0x127038 112d85: 51 push %ecx 112d86: 50 push %eax 112d87: 68 e7 14 12 00 push $0x1214e7 112d8c: 8d 45 e3 lea -0x1d(%ebp),%eax 112d8f: 50 push %eax 112d90: e8 7b 12 00 00 call 114010 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 112d95: 58 pop %eax 112d96: 5a pop %edx 112d97: 68 80 01 00 00 push $0x180 112d9c: 53 push %ebx 112d9d: e8 4a 01 00 00 call 112eec 112da2: 83 c4 10 add $0x10,%esp 112da5: 85 c0 test %eax,%eax 112da7: 75 6f jne 112e18 <== 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); 112da9: 83 ec 08 sub $0x8,%esp 112dac: 68 00 40 00 00 push $0x4000 112db1: 53 push %ebx 112db2: e8 91 5d ff ff call 108b48 112db7: 8b 55 08 mov 0x8(%ebp),%edx 112dba: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 112dbc: 83 c4 10 add $0x10,%esp 112dbf: 85 c0 test %eax,%eax 112dc1: 0f 88 a1 00 00 00 js 112e68 <== 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]); 112dc7: 3b 05 4c 31 12 00 cmp 0x12314c,%eax <== NOT EXECUTED 112dcd: 0f 82 85 00 00 00 jb 112e58 <== NOT EXECUTED 112dd3: 31 c0 xor %eax,%eax <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 112dd5: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 112dd9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112ddc: 6a 01 push $0x1 <== NOT EXECUTED 112dde: 53 push %ebx <== NOT EXECUTED 112ddf: e8 64 5d ff ff call 108b48 <== NOT EXECUTED 112de4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 112de7: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED if (filsdes[1] < 0) { 112dea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112ded: 85 c0 test %eax,%eax <== NOT EXECUTED 112def: 0f 88 8b 00 00 00 js 112e80 <== NOT EXECUTED 112df5: 31 f6 xor %esi,%esi <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 112df7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112dfa: 53 push %ebx <== NOT EXECUTED 112dfb: e8 08 01 00 00 call 112f08 <== NOT EXECUTED 112e00: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 112e03: e8 c8 08 00 00 call 1136d0 <__errno> 112e08: 89 30 mov %esi,(%eax) } 112e0a: b8 ff ff ff ff mov $0xffffffff,%eax 112e0f: 8d 65 f4 lea -0xc(%ebp),%esp 112e12: 5b pop %ebx 112e13: 5e pop %esi 112e14: 5f pop %edi 112e15: c9 leave 112e16: c3 ret 112e17: 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){ 112e18: e8 b3 08 00 00 call 1136d0 <__errno> <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 112e1d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 112e22: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112e25: 5b pop %ebx <== NOT EXECUTED 112e26: 5e pop %esi <== NOT EXECUTED 112e27: 5f pop %edi <== NOT EXECUTED 112e28: c9 leave <== NOT EXECUTED 112e29: c3 ret <== NOT EXECUTED 112e2a: 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) 112e2c: e8 9f 08 00 00 call 1136d0 <__errno> 112e31: 83 38 02 cmpl $0x2,(%eax) 112e34: 75 e7 jne 112e1d <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 112e36: 83 ec 08 sub $0x8,%esp 112e39: 68 ff 03 00 00 push $0x3ff 112e3e: 68 d7 14 12 00 push $0x1214d7 112e43: e8 44 55 ff ff call 10838c 112e48: 83 c4 10 add $0x10,%esp 112e4b: 85 c0 test %eax,%eax 112e4d: 0f 84 10 ff ff ff je 112d63 <== NEVER TAKEN 112e53: eb c8 jmp 112e1d <== NOT EXECUTED 112e55: 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]); 112e58: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 112e5b: 03 05 60 72 12 00 add 0x127260,%eax <== NOT EXECUTED 112e61: e9 6f ff ff ff jmp 112dd5 <== NOT EXECUTED 112e66: 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; 112e68: e8 63 08 00 00 call 1136d0 <__errno> 112e6d: 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); 112e6f: 83 ec 0c sub $0xc,%esp 112e72: 53 push %ebx 112e73: e8 90 00 00 00 call 112f08 112e78: 83 c4 10 add $0x10,%esp 112e7b: eb 86 jmp 112e03 112e7d: 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; 112e80: e8 4b 08 00 00 call 1136d0 <__errno> <== NOT EXECUTED 112e85: 8b 30 mov (%eax),%esi <== NOT EXECUTED close(filsdes[0]); 112e87: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112e8a: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 112e8d: ff 30 pushl (%eax) <== NOT EXECUTED 112e8f: e8 64 cb ff ff call 10f9f8 <== NOT EXECUTED 112e94: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112e97: e9 5b ff ff ff jmp 112df7 <== NOT EXECUTED 0011165c : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 11165c: 55 push %ebp <== NOT EXECUTED 11165d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11165f: 56 push %esi <== NOT EXECUTED 111660: 53 push %ebx <== NOT EXECUTED 111661: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 111664: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED if (cmd == FIONREAD) { 111667: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED 11166e: 74 0c je 11167c <== NOT EXECUTED 111670: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 111675: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 111678: 5b pop %ebx <== NOT EXECUTED 111679: 5e pop %esi <== NOT EXECUTED 11167a: c9 leave <== NOT EXECUTED 11167b: c3 ret <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 11167c: 85 db test %ebx,%ebx <== NOT EXECUTED 11167e: 75 07 jne 111687 <== NOT EXECUTED 111680: b8 f2 ff ff ff mov $0xfffffff2,%eax <== NOT EXECUTED 111685: eb ee jmp 111675 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 111687: 52 push %edx <== NOT EXECUTED 111688: 6a 00 push $0x0 <== NOT EXECUTED 11168a: 6a 00 push $0x0 <== NOT EXECUTED 11168c: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 11168f: e8 6c 9f ff ff call 10b600 <== NOT EXECUTED 111694: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111697: 85 c0 test %eax,%eax <== NOT EXECUTED 111699: 74 07 je 1116a2 <== NOT EXECUTED 11169b: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 1116a0: eb d3 jmp 111675 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 1116a2: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED 1116a5: 89 03 mov %eax,(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 1116a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1116aa: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 1116ad: e8 4a a0 ff ff call 10b6fc <== NOT EXECUTED 1116b2: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 1116b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1116b7: eb bc jmp 111675 <== NOT EXECUTED 001115fc : pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 1115fc: 55 push %ebp <== NOT EXECUTED 1115fd: 89 e5 mov %esp,%ebp <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 1115ff: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED 111604: c9 leave <== NOT EXECUTED 111605: c3 ret <== NOT EXECUTED 001116bc : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 1116bc: 55 push %ebp <== NOT EXECUTED 1116bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1116bf: 57 push %edi <== NOT EXECUTED 1116c0: 56 push %esi <== NOT EXECUTED 1116c1: 53 push %ebx <== NOT EXECUTED 1116c2: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED 1116c5: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 1116c8: 6a 00 push $0x0 <== NOT EXECUTED 1116ca: 6a 00 push $0x0 <== NOT EXECUTED 1116cc: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 1116cf: e8 2c 9f ff ff call 10b600 <== NOT EXECUTED 1116d4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1116d7: 85 c0 test %eax,%eax <== NOT EXECUTED 1116d9: 0f 85 b1 00 00 00 jne 111790 <== NOT EXECUTED return -EINTR; while (read < count) { 1116df: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 1116e2: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1116e4: 0f 84 82 01 00 00 je 11186c <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 1116ea: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 1116f1: 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)) { 1116f8: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 1116fb: 85 d2 test %edx,%edx <== NOT EXECUTED 1116fd: 0f 85 a1 00 00 00 jne 1117a4 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 111703: 8b 53 14 mov 0x14(%ebx),%edx <== NOT EXECUTED 111706: 85 d2 test %edx,%edx <== NOT EXECUTED 111708: 0f 84 06 01 00 00 je 111814 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 11170e: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 111711: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 111715: 0f 85 01 01 00 00 jne 11181c <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 11171b: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 11171e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111721: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111724: e8 d3 9f ff ff call 10b6fc <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 111729: 5f pop %edi <== NOT EXECUTED 11172a: 58 pop %eax <== NOT EXECUTED 11172b: 6a 00 push $0x0 <== NOT EXECUTED 11172d: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111730: e8 6b 10 00 00 call 1127a0 <== NOT EXECUTED 111735: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 111738: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 11173b: 19 f6 sbb %esi,%esi <== NOT EXECUTED 11173d: f7 d6 not %esi <== NOT EXECUTED 11173f: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 111742: 6a 00 push $0x0 <== NOT EXECUTED 111744: 6a 00 push $0x0 <== NOT EXECUTED 111746: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111749: e8 b2 9e ff ff call 10b600 <== NOT EXECUTED 11174e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111751: 85 c0 test %eax,%eax <== NOT EXECUTED 111753: 0f 85 cf 00 00 00 jne 111828 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 111759: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED if (ret != 0) 11175c: 85 f6 test %esi,%esi <== NOT EXECUTED 11175e: 74 98 je 1116f8 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 111760: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111763: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111766: e8 91 9f ff ff call 10b6fc <== NOT EXECUTED 11176b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: if (read > 0) 11176e: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 111771: 85 c9 test %ecx,%ecx <== NOT EXECUTED 111773: 7e 0b jle 111780 <== NOT EXECUTED return read; return ret; } 111775: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111778: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11177b: 5b pop %ebx <== NOT EXECUTED 11177c: 5e pop %esi <== NOT EXECUTED 11177d: 5f pop %edi <== NOT EXECUTED 11177e: c9 leave <== NOT EXECUTED 11177f: c3 ret <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 111780: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return read; return ret; } 111783: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111786: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111789: 5b pop %ebx <== NOT EXECUTED 11178a: 5e pop %esi <== NOT EXECUTED 11178b: 5f pop %edi <== NOT EXECUTED 11178c: c9 leave <== NOT EXECUTED 11178d: c3 ret <== NOT EXECUTED 11178e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 111790: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 111797: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 11179a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11179d: 5b pop %ebx <== NOT EXECUTED 11179e: 5e pop %esi <== NOT EXECUTED 11179f: 5f pop %edi <== NOT EXECUTED 1117a0: c9 leave <== NOT EXECUTED 1117a1: c3 ret <== NOT EXECUTED 1117a2: 66 90 xchg %ax,%ax <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 1117a4: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 1117a7: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED 1117aa: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 1117ad: 39 c2 cmp %eax,%edx <== NOT EXECUTED 1117af: 76 03 jbe 1117b4 <== NOT EXECUTED 1117b1: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 1117b4: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED 1117b7: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 1117ba: 29 f0 sub %esi,%eax <== NOT EXECUTED if (chunk > chunk1) { 1117bc: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED 1117bf: 7f 71 jg 111832 <== 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); 1117c1: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1117c4: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED 1117c7: 03 33 add (%ebx),%esi <== NOT EXECUTED 1117c9: 89 c7 mov %eax,%edi <== NOT EXECUTED 1117cb: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 1117ce: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Start += chunk; 1117d0: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 1117d3: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED pipe->Start %= pipe->Size; 1117d6: 31 d2 xor %edx,%edx <== NOT EXECUTED 1117d8: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED 1117db: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED pipe->Length -= chunk; 1117de: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 1117e1: 2b 45 cc sub -0x34(%ebp),%eax <== NOT EXECUTED 1117e4: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 1117e7: 85 c0 test %eax,%eax <== NOT EXECUTED 1117e9: 75 07 jne 1117f2 <== NOT EXECUTED pipe->Start = 0; 1117eb: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED if (pipe->waitingWriters > 0) 1117f2: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED 1117f5: 85 f6 test %esi,%esi <== NOT EXECUTED 1117f7: 75 5f jne 111858 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; 1117f9: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 1117fc: 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) { 1117ff: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111802: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 111805: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 111808: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 11180b: 0f 82 e7 fe ff ff jb 1116f8 <== NOT EXECUTED 111811: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 111814: 31 f6 xor %esi,%esi <== NOT EXECUTED 111816: e9 45 ff ff ff jmp 111760 <== NOT EXECUTED 11181b: 90 nop <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 11181c: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 111821: e9 3a ff ff ff jmp 111760 <== NOT EXECUTED 111826: 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)) { 111828: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 11182d: e9 3c ff ff ff jmp 11176e <== 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); 111832: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 111835: 03 55 d0 add -0x30(%ebp),%edx <== NOT EXECUTED 111838: 03 33 add (%ebx),%esi <== NOT EXECUTED 11183a: 89 d7 mov %edx,%edi <== NOT EXECUTED 11183c: 89 c1 mov %eax,%ecx <== NOT EXECUTED 11183e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 111840: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 111843: 01 c2 add %eax,%edx <== NOT EXECUTED 111845: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED 111848: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 11184b: 29 c1 sub %eax,%ecx <== NOT EXECUTED 11184d: 8b 33 mov (%ebx),%esi <== NOT EXECUTED 11184f: 89 d7 mov %edx,%edi <== NOT EXECUTED 111851: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 111853: e9 78 ff ff ff jmp 1117d0 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 111858: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11185b: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 11185e: 50 push %eax <== NOT EXECUTED 11185f: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111862: e8 d5 0e 00 00 call 11273c <== NOT EXECUTED 111867: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11186a: eb 8d jmp 1117f9 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 11186c: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 111873: 31 f6 xor %esi,%esi <== NOT EXECUTED 111875: e9 e6 fe ff ff jmp 111760 <== NOT EXECUTED 00111a7c : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 111a7c: 55 push %ebp <== NOT EXECUTED 111a7d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 111a7f: 57 push %edi <== NOT EXECUTED 111a80: 56 push %esi <== NOT EXECUTED 111a81: 53 push %ebx <== NOT EXECUTED 111a82: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED 111a85: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED pipe_control_t *pipe = *pipep; 111a88: 8b 1f mov (%edi),%ebx <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 111a8a: 6a 00 push $0x0 <== NOT EXECUTED 111a8c: 6a 00 push $0x0 <== NOT EXECUTED 111a8e: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111a91: e8 6a 9b ff ff call 10b600 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 111a96: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111a99: 85 c0 test %eax,%eax <== NOT EXECUTED 111a9b: 0f 85 e3 00 00 00 jne 111b84 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 111aa1: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 111aa4: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 111aa7: 89 c6 mov %eax,%esi <== NOT EXECUTED 111aa9: 83 e6 06 and $0x6,%esi <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 111aac: a8 02 test $0x2,%al <== NOT EXECUTED 111aae: 74 03 je 111ab3 <== NOT EXECUTED pipe->Readers --; 111ab0: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 111ab3: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED 111ab9: 75 69 jne 111b24 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 111abb: 51 push %ecx <== NOT EXECUTED 111abc: 6a 00 push $0x0 <== NOT EXECUTED 111abe: 6a 00 push $0x0 <== NOT EXECUTED 111ac0: ff 35 30 70 12 00 pushl 0x127030 <== NOT EXECUTED 111ac6: e8 35 9b ff ff call 10b600 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 111acb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111ace: 85 c0 test %eax,%eax <== NOT EXECUTED 111ad0: 0f 85 ae 00 00 00 jne 111b84 <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 111ad6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111ad9: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111adc: e8 1b 9c ff ff call 10b6fc <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 111ae1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111ae4: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED 111ae7: 85 d2 test %edx,%edx <== NOT EXECUTED 111ae9: 74 41 je 111b2c <== 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) 111aeb: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111aee: 85 c0 test %eax,%eax <== NOT EXECUTED 111af0: 75 17 jne 111b09 <== NOT EXECUTED 111af2: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 111af5: 74 12 je 111b09 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 111af7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111afa: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111afd: 50 push %eax <== NOT EXECUTED 111afe: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111b01: e8 36 0c 00 00 call 11273c <== NOT EXECUTED 111b06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 111b09: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111b0c: ff 35 30 70 12 00 pushl 0x127030 <== NOT EXECUTED 111b12: e8 e5 9b ff ff call 10b6fc <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 111b17: 31 c0 xor %eax,%eax <== NOT EXECUTED 111b19: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111b1c: 5b pop %ebx <== NOT EXECUTED 111b1d: 5e pop %esi <== NOT EXECUTED 111b1e: 5f pop %edi <== NOT EXECUTED 111b1f: c9 leave <== NOT EXECUTED 111b20: c3 ret <== NOT EXECUTED 111b21: 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 --; 111b24: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED 111b27: eb 92 jmp 111abb <== NOT EXECUTED 111b29: 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) { 111b2c: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111b2f: 85 c0 test %eax,%eax <== NOT EXECUTED 111b31: 74 19 je 111b4c <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 111b33: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED 111b36: 74 d1 je 111b09 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 111b38: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111b3b: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111b3e: 50 push %eax <== NOT EXECUTED 111b3f: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111b42: e8 f5 0b 00 00 call 11273c <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 111b47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111b4a: eb bd jmp 111b09 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 111b4c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111b4f: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111b52: e8 7d 0b 00 00 call 1126d4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 111b57: 5e pop %esi <== NOT EXECUTED 111b58: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111b5b: e8 74 0b 00 00 call 1126d4 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 111b60: 59 pop %ecx <== NOT EXECUTED 111b61: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111b64: e8 f3 99 ff ff call 10b55c <== NOT EXECUTED free(pipe->Buffer); 111b69: 5a pop %edx <== NOT EXECUTED 111b6a: ff 33 pushl (%ebx) <== NOT EXECUTED 111b6c: e8 0b 65 ff ff call 10807c <== NOT EXECUTED free(pipe); 111b71: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 111b74: e8 03 65 ff ff call 10807c <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 111b79: 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) { 111b7f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111b82: eb 85 jmp 111b09 <== 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); 111b84: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111b87: 50 push %eax <== NOT EXECUTED 111b88: e8 af a0 ff ff call 10bc3c <== NOT EXECUTED 0011187c : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 11187c: 55 push %ebp <== NOT EXECUTED 11187d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11187f: 57 push %edi <== NOT EXECUTED 111880: 56 push %esi <== NOT EXECUTED 111881: 53 push %ebx <== NOT EXECUTED 111882: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 111885: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 111888: 85 ff test %edi,%edi <== NOT EXECUTED 11188a: 75 0c jne 111898 <== NOT EXECUTED 11188c: 31 db xor %ebx,%ebx <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 11188e: 89 d8 mov %ebx,%eax <== NOT EXECUTED 111890: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111893: 5b pop %ebx <== NOT EXECUTED 111894: 5e pop %esi <== NOT EXECUTED 111895: 5f pop %edi <== NOT EXECUTED 111896: c9 leave <== NOT EXECUTED 111897: c3 ret <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 111898: 56 push %esi <== NOT EXECUTED 111899: 6a 00 push $0x0 <== NOT EXECUTED 11189b: 6a 00 push $0x0 <== NOT EXECUTED 11189d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1118a0: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED 1118a3: e8 58 9d ff ff call 10b600 <== NOT EXECUTED 1118a8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1118ab: 85 c0 test %eax,%eax <== NOT EXECUTED 1118ad: 0f 85 1d 01 00 00 jne 1119d0 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 1118b3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1118b6: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 1118b9: 85 db test %ebx,%ebx <== NOT EXECUTED 1118bb: 0f 84 50 01 00 00 je 111a11 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 1118c1: 8b 48 04 mov 0x4(%eax),%ecx <== NOT EXECUTED 1118c4: 39 4d 10 cmp %ecx,0x10(%ebp) <== NOT EXECUTED 1118c7: 0f 87 3a 01 00 00 ja 111a07 <== NOT EXECUTED 1118cd: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 1118d0: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 1118d7: 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); 1118d9: 89 5d d4 mov %ebx,-0x2c(%ebp) <== NOT EXECUTED 1118dc: 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) { 1118df: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 1118e2: 89 ca mov %ecx,%edx <== NOT EXECUTED 1118e4: 29 c2 sub %eax,%edx <== NOT EXECUTED 1118e6: 39 fa cmp %edi,%edx <== NOT EXECUTED 1118e8: 73 6f jae 111959 <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 1118ea: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 1118ed: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 1118f1: 0f 85 47 01 00 00 jne 111a3e <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 1118f7: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 1118fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1118fd: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111900: e8 f7 9d ff ff call 10b6fc <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 111905: 5a pop %edx <== NOT EXECUTED 111906: 59 pop %ecx <== NOT EXECUTED 111907: 6a 00 push $0x0 <== NOT EXECUTED 111909: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 11190c: e8 8f 0e 00 00 call 1127a0 <== NOT EXECUTED 111911: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 111914: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 111917: 19 f6 sbb %esi,%esi <== NOT EXECUTED 111919: f7 d6 not %esi <== NOT EXECUTED 11191b: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 11191e: 6a 00 push $0x0 <== NOT EXECUTED 111920: 6a 00 push $0x0 <== NOT EXECUTED 111922: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111925: e8 d6 9c ff ff call 10b600 <== NOT EXECUTED 11192a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11192d: 85 c0 test %eax,%eax <== NOT EXECUTED 11192f: 0f 85 ff 00 00 00 jne 111a34 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 111935: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED if (ret != 0) 111938: 85 f6 test %esi,%esi <== NOT EXECUTED 11193a: 0f 85 ef 00 00 00 jne 111a2f <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 111940: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 111943: 85 c0 test %eax,%eax <== NOT EXECUTED 111945: 0f 84 8f 00 00 00 je 1119da <== NOT EXECUTED 11194b: 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) { 11194e: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 111951: 89 ca mov %ecx,%edx <== NOT EXECUTED 111953: 29 c2 sub %eax,%edx <== NOT EXECUTED 111955: 39 fa cmp %edi,%edx <== NOT EXECUTED 111957: 72 91 jb 1118ea <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 111959: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 11195c: 2b 75 d0 sub -0x30(%ebp),%esi <== NOT EXECUTED 11195f: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 111962: 39 f2 cmp %esi,%edx <== NOT EXECUTED 111964: 76 03 jbe 111969 <== NOT EXECUTED 111966: 89 75 cc mov %esi,-0x34(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 111969: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED 11196c: 31 d2 xor %edx,%edx <== NOT EXECUTED 11196e: f7 f1 div %ecx <== NOT EXECUTED 111970: 89 c8 mov %ecx,%eax <== NOT EXECUTED 111972: 29 d0 sub %edx,%eax <== NOT EXECUTED if (chunk > chunk1) { 111974: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED 111977: 0f 8e cb 00 00 00 jle 111a48 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 11197d: 03 13 add (%ebx),%edx <== NOT EXECUTED 11197f: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 111982: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED 111985: 89 d7 mov %edx,%edi <== NOT EXECUTED 111987: 89 c1 mov %eax,%ecx <== NOT EXECUTED 111989: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 11198b: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 11198d: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 111990: 29 c1 sub %eax,%ecx <== NOT EXECUTED 111992: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED 111995: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 111998: 01 c6 add %eax,%esi <== NOT EXECUTED 11199a: 89 d7 mov %edx,%edi <== NOT EXECUTED 11199c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 11199e: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 1119a1: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED if (pipe->waitingReaders > 0) 1119a4: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED 1119a8: 0f 85 ae 00 00 00 jne 111a5c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 1119ae: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 1119b1: 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) { 1119b4: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 1119b7: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 1119ba: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED 1119bd: 0f 86 af 00 00 00 jbe 111a72 <== NOT EXECUTED 1119c3: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED 1119c6: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 1119cb: e9 0f ff ff ff jmp 1118df <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 1119d0: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED 1119d5: e9 b4 fe ff ff jmp 11188e <== NOT EXECUTED 1119da: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 1119dd: 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); 1119e2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1119e5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1119e8: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED 1119eb: e8 0c 9d ff ff call 10b6fc <== NOT EXECUTED 1119f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 1119f3: 83 fe e0 cmp $0xffffffe0,%esi <== NOT EXECUTED 1119f6: 74 22 je 111a1a <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) 1119f8: 85 db test %ebx,%ebx <== NOT EXECUTED 1119fa: 0f 8f 8e fe ff ff jg 11188e <== NOT EXECUTED 111a00: 89 f3 mov %esi,%ebx <== NOT EXECUTED 111a02: e9 87 fe ff ff jmp 11188e <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 111a07: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 111a0c: e9 bf fe ff ff jmp 1118d0 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 111a11: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 111a16: 31 db xor %ebx,%ebx <== NOT EXECUTED 111a18: eb c8 jmp 1119e2 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); 111a1a: e8 85 08 00 00 call 1122a4 <== NOT EXECUTED 111a1f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111a22: 6a 0d push $0xd <== NOT EXECUTED 111a24: 50 push %eax <== NOT EXECUTED 111a25: e8 96 09 00 00 call 1123c0 <== NOT EXECUTED 111a2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111a2d: eb c9 jmp 1119f8 <== NOT EXECUTED 111a2f: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED 111a32: eb ae jmp 1119e2 <== NOT EXECUTED 111a34: 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)) { 111a37: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 111a3c: eb ba jmp 1119f8 <== NOT EXECUTED 111a3e: 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)) { 111a41: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 111a46: eb 9a jmp 1119e2 <== 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); 111a48: 03 13 add (%ebx),%edx <== NOT EXECUTED 111a4a: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 111a4d: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED 111a50: 89 d7 mov %edx,%edi <== NOT EXECUTED 111a52: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 111a55: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 111a57: e9 42 ff ff ff jmp 11199e <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 111a5c: 56 push %esi <== NOT EXECUTED 111a5d: 56 push %esi <== NOT EXECUTED 111a5e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111a61: 50 push %eax <== NOT EXECUTED 111a62: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111a65: e8 d2 0c 00 00 call 11273c <== NOT EXECUTED 111a6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111a6d: e9 3c ff ff ff jmp 1119ae <== NOT EXECUTED 111a72: 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) { 111a74: 31 f6 xor %esi,%esi <== NOT EXECUTED 111a76: e9 67 ff ff ff jmp 1119e2 <== NOT EXECUTED 0010b784 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10b784: 55 push %ebp 10b785: 89 e5 mov %esp,%ebp 10b787: 53 push %ebx 10b788: 83 ec 04 sub $0x4,%esp 10b78b: 8b 45 0c mov 0xc(%ebp),%eax /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10b78e: ff 05 c8 de 12 00 incl 0x12dec8 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10b794: 8d 50 ff lea -0x1(%eax),%edx 10b797: 85 c2 test %eax,%edx 10b799: 75 05 jne 10b7a0 <== ALWAYS TAKEN 10b79b: 83 f8 03 cmp $0x3,%eax 10b79e: 77 0c ja 10b7ac /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10b7a0: b8 16 00 00 00 mov $0x16,%eax 10b7a5: 5a pop %edx 10b7a6: 5b pop %ebx 10b7a7: c9 leave 10b7a8: c3 ret 10b7a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10b7ac: 59 pop %ecx 10b7ad: 5b pop %ebx 10b7ae: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10b7af: e9 20 01 00 00 jmp 10b8d4 0010fcf0 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 10fcf0: 55 push %ebp 10fcf1: 89 e5 mov %esp,%ebp 10fcf3: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10fcf6: 85 c0 test %eax,%eax 10fcf8: 74 12 je 10fd0c 10fcfa: 8b 10 mov (%eax),%edx 10fcfc: 85 d2 test %edx,%edx 10fcfe: 74 0c je 10fd0c return EINVAL; attr->is_initialized = false; 10fd00: c7 00 00 00 00 00 movl $0x0,(%eax) 10fd06: 31 c0 xor %eax,%eax return 0; } 10fd08: c9 leave 10fd09: c3 ret 10fd0a: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 10fd0c: b8 16 00 00 00 mov $0x16,%eax } 10fd11: c9 leave 10fd12: c3 ret 0010fd64 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 10fd64: 55 push %ebp 10fd65: 89 e5 mov %esp,%ebp 10fd67: 57 push %edi 10fd68: 56 push %esi 10fd69: 8b 75 08 mov 0x8(%ebp),%esi 10fd6c: 8b 45 0c mov 0xc(%ebp),%eax if ( !attr || !attr->is_initialized || !param ) 10fd6f: 85 f6 test %esi,%esi 10fd71: 74 1d je 10fd90 10fd73: 8b 16 mov (%esi),%edx 10fd75: 85 d2 test %edx,%edx 10fd77: 74 17 je 10fd90 10fd79: 85 c0 test %eax,%eax 10fd7b: 74 13 je 10fd90 return EINVAL; *param = attr->schedparam; 10fd7d: 83 c6 18 add $0x18,%esi 10fd80: b9 07 00 00 00 mov $0x7,%ecx 10fd85: 89 c7 mov %eax,%edi 10fd87: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10fd89: 31 c0 xor %eax,%eax return 0; } 10fd8b: 5e pop %esi 10fd8c: 5f pop %edi 10fd8d: c9 leave 10fd8e: c3 ret 10fd8f: 90 nop <== NOT EXECUTED { if ( !attr || !attr->is_initialized || !param ) return EINVAL; *param = attr->schedparam; return 0; 10fd90: b8 16 00 00 00 mov $0x16,%eax } 10fd95: 5e pop %esi 10fd96: 5f pop %edi 10fd97: c9 leave 10fd98: c3 ret 001107cc : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 1107cc: 55 push %ebp 1107cd: 89 e5 mov %esp,%ebp 1107cf: 8b 45 08 mov 0x8(%ebp),%eax 1107d2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 1107d5: 85 c0 test %eax,%eax 1107d7: 74 0b je 1107e4 1107d9: 8b 08 mov (%eax),%ecx 1107db: 85 c9 test %ecx,%ecx 1107dd: 74 05 je 1107e4 return EINVAL; switch ( clock_allowed ) { 1107df: 83 fa 01 cmp $0x1,%edx 1107e2: 76 08 jbe 1107ec case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; return 0; 1107e4: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 1107e9: c9 leave 1107ea: c3 ret 1107eb: 90 nop <== NOT EXECUTED return EINVAL; switch ( clock_allowed ) { case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 1107ec: 89 50 34 mov %edx,0x34(%eax) 1107ef: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 1107f1: c9 leave 1107f2: c3 ret 0010fe64 : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 10fe64: 55 push %ebp 10fe65: 89 e5 mov %esp,%ebp 10fe67: 8b 45 08 mov 0x8(%ebp),%eax 10fe6a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10fe6d: 85 c0 test %eax,%eax 10fe6f: 74 0b je 10fe7c 10fe71: 8b 08 mov (%eax),%ecx 10fe73: 85 c9 test %ecx,%ecx 10fe75: 74 05 je 10fe7c return EINVAL; switch ( detachstate ) { 10fe77: 83 fa 01 cmp $0x1,%edx 10fe7a: 76 08 jbe 10fe84 case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; return 0; 10fe7c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10fe81: c9 leave 10fe82: c3 ret 10fe83: 90 nop <== NOT EXECUTED return EINVAL; switch ( detachstate ) { case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 10fe84: 89 50 38 mov %edx,0x38(%eax) 10fe87: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10fe89: c9 leave 10fe8a: c3 ret 0011145c : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 11145c: 55 push %ebp 11145d: 89 e5 mov %esp,%ebp 11145f: 8b 45 08 mov 0x8(%ebp),%eax 111462: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111465: 85 c0 test %eax,%eax 111467: 74 1f je 111488 111469: 8b 08 mov (%eax),%ecx 11146b: 85 c9 test %ecx,%ecx 11146d: 74 19 je 111488 return EINVAL; switch ( inheritsched ) { 11146f: 8d 4a ff lea -0x1(%edx),%ecx 111472: 83 f9 01 cmp $0x1,%ecx 111475: 76 09 jbe 111480 111477: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 11147c: c9 leave 11147d: c3 ret 11147e: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 111480: 89 50 10 mov %edx,0x10(%eax) 111483: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 111485: c9 leave 111486: c3 ret 111487: 90 nop <== NOT EXECUTED switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; return 0; 111488: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 11148d: c9 leave 11148e: c3 ret 0010fec0 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 10fec0: 55 push %ebp 10fec1: 89 e5 mov %esp,%ebp 10fec3: 57 push %edi 10fec4: 56 push %esi 10fec5: 8b 7d 08 mov 0x8(%ebp),%edi 10fec8: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 10fecb: 85 ff test %edi,%edi 10fecd: 74 1d je 10feec 10fecf: 8b 07 mov (%edi),%eax 10fed1: 85 c0 test %eax,%eax 10fed3: 74 17 je 10feec 10fed5: 85 f6 test %esi,%esi 10fed7: 74 13 je 10feec return EINVAL; attr->schedparam = *param; 10fed9: 83 c7 18 add $0x18,%edi 10fedc: b9 07 00 00 00 mov $0x7,%ecx 10fee1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10fee3: 31 c0 xor %eax,%eax return 0; } 10fee5: 5e pop %esi 10fee6: 5f pop %edi 10fee7: c9 leave 10fee8: c3 ret 10fee9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { if ( !attr || !attr->is_initialized || !param ) return EINVAL; attr->schedparam = *param; return 0; 10feec: b8 16 00 00 00 mov $0x16,%eax } 10fef1: 5e pop %esi 10fef2: 5f pop %edi 10fef3: c9 leave 10fef4: c3 ret 0010fef8 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10fef8: 55 push %ebp 10fef9: 89 e5 mov %esp,%ebp 10fefb: 8b 45 08 mov 0x8(%ebp),%eax 10fefe: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10ff01: 85 c0 test %eax,%eax 10ff03: 74 23 je 10ff28 10ff05: 8b 08 mov (%eax),%ecx 10ff07: 85 c9 test %ecx,%ecx 10ff09: 74 1d je 10ff28 return EINVAL; switch ( policy ) { 10ff0b: 85 d2 test %edx,%edx 10ff0d: 78 0a js 10ff19 10ff0f: 83 fa 02 cmp $0x2,%edx 10ff12: 7e 0c jle 10ff20 10ff14: 83 fa 04 cmp $0x4,%edx 10ff17: 74 07 je 10ff20 <== NEVER TAKEN 10ff19: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 10ff1e: c9 leave 10ff1f: c3 ret switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10ff20: 89 50 14 mov %edx,0x14(%eax) 10ff23: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 10ff25: c9 leave 10ff26: c3 ret 10ff27: 90 nop <== NOT EXECUTED case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; 10ff28: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10ff2d: c9 leave 10ff2e: c3 ret 0010ff30 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 10ff30: 55 push %ebp 10ff31: 89 e5 mov %esp,%ebp 10ff33: 8b 45 08 mov 0x8(%ebp),%eax 10ff36: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10ff39: 85 c0 test %eax,%eax 10ff3b: 74 1a je 10ff57 10ff3d: 8b 08 mov (%eax),%ecx 10ff3f: 85 c9 test %ecx,%ecx 10ff41: 74 14 je 10ff57 return EINVAL; switch ( contentionscope ) { 10ff43: 85 d2 test %edx,%edx 10ff45: 75 0d jne 10ff54 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 10ff47: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10ff4e: 31 c0 xor %eax,%eax return ENOTSUP; default: return EINVAL; } } 10ff50: c9 leave 10ff51: c3 ret 10ff52: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 10ff54: 4a dec %edx 10ff55: 74 09 je 10ff60 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; 10ff57: b8 16 00 00 00 mov $0x16,%eax return ENOTSUP; default: return EINVAL; } } 10ff5c: c9 leave 10ff5d: c3 ret 10ff5e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 10ff60: b8 86 00 00 00 mov $0x86,%eax return ENOTSUP; default: return EINVAL; } } 10ff65: c9 leave 10ff66: c3 ret 0010ff68 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 10ff68: 55 push %ebp 10ff69: 89 e5 mov %esp,%ebp 10ff6b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10ff6e: 85 c0 test %eax,%eax 10ff70: 74 12 je 10ff84 10ff72: 8b 10 mov (%eax),%edx 10ff74: 85 d2 test %edx,%edx 10ff76: 74 0c je 10ff84 return EINVAL; attr->stackaddr = stackaddr; 10ff78: 8b 55 0c mov 0xc(%ebp),%edx 10ff7b: 89 50 04 mov %edx,0x4(%eax) 10ff7e: 31 c0 xor %eax,%eax return 0; } 10ff80: c9 leave 10ff81: c3 ret 10ff82: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->stackaddr = stackaddr; return 0; 10ff84: b8 16 00 00 00 mov $0x16,%eax } 10ff89: c9 leave 10ff8a: c3 ret 00111490 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 111490: 55 push %ebp 111491: 89 e5 mov %esp,%ebp 111493: 8b 45 08 mov 0x8(%ebp),%eax 111496: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111499: 85 c0 test %eax,%eax 11149b: 74 23 je 1114c0 11149d: 8b 08 mov (%eax),%ecx 11149f: 85 c9 test %ecx,%ecx 1114a1: 74 1d je 1114c0 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 1114a3: 8b 0d 38 45 12 00 mov 0x124538,%ecx 1114a9: d1 e1 shl %ecx 1114ab: 39 d1 cmp %edx,%ecx 1114ad: 77 09 ja 1114b8 attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 1114af: 89 50 08 mov %edx,0x8(%eax) 1114b2: 31 c0 xor %eax,%eax return 0; } 1114b4: c9 leave 1114b5: c3 ret 1114b6: 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; 1114b8: 89 48 08 mov %ecx,0x8(%eax) 1114bb: 31 c0 xor %eax,%eax else attr->stacksize = stacksize; return 0; } 1114bd: c9 leave 1114be: c3 ret 1114bf: 90 nop <== NOT EXECUTED return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 1114c0: b8 16 00 00 00 mov $0x16,%eax return 0; } 1114c5: c9 leave 1114c6: c3 ret 0010b840 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 10b840: 55 push %ebp 10b841: 89 e5 mov %esp,%ebp 10b843: 83 ec 28 sub $0x28,%esp 10b846: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b849: 85 c0 test %eax,%eax 10b84b: 74 2f je 10b87c RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b84d: 51 push %ecx 10b84e: 8d 55 f4 lea -0xc(%ebp),%edx 10b851: 52 push %edx 10b852: ff 30 pushl (%eax) 10b854: 68 20 90 12 00 push $0x129020 10b859: e8 9e 25 00 00 call 10ddfc <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10b85e: 83 c4 10 add $0x10,%esp 10b861: 8b 55 f4 mov -0xc(%ebp),%edx 10b864: 85 d2 test %edx,%edx 10b866: 75 14 jne 10b87c case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 10b868: 8b 48 58 mov 0x58(%eax),%ecx 10b86b: 85 c9 test %ecx,%ecx 10b86d: 74 15 je 10b884 _Thread_Enable_dispatch(); 10b86f: e8 fc 2d 00 00 call 10e670 <_Thread_Enable_dispatch> 10b874: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b879: c9 leave 10b87a: c3 ret 10b87b: 90 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); return 0; 10b87c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b881: c9 leave 10b882: c3 ret 10b883: 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 ); 10b884: 83 ec 08 sub $0x8,%esp 10b887: 50 push %eax 10b888: 68 20 90 12 00 push $0x129020 10b88d: 89 45 e4 mov %eax,-0x1c(%ebp) 10b890: e8 33 21 00 00 call 10d9c8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 10b895: 58 pop %eax 10b896: 5a pop %edx 10b897: 8b 45 e4 mov -0x1c(%ebp),%eax 10b89a: 50 push %eax 10b89b: 68 20 90 12 00 push $0x129020 10b8a0: e8 27 24 00 00 call 10dccc <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10b8a5: e8 c6 2d 00 00 call 10e670 <_Thread_Enable_dispatch> 10b8aa: 31 c0 xor %eax,%eax return 0; 10b8ac: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b8af: c9 leave 10b8b0: c3 ret 0010b8b4 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10b8b4: 55 push %ebp 10b8b5: 89 e5 mov %esp,%ebp 10b8b7: 57 push %edi 10b8b8: 56 push %esi 10b8b9: 53 push %ebx 10b8ba: 83 ec 2c sub $0x2c,%esp 10b8bd: 8b 5d 08 mov 0x8(%ebp),%ebx 10b8c0: 8b 7d 0c mov 0xc(%ebp),%edi 10b8c3: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10b8c6: 85 db test %ebx,%ebx 10b8c8: 0f 84 82 00 00 00 je 10b950 return EINVAL; if ( count == 0 ) 10b8ce: 85 f6 test %esi,%esi 10b8d0: 74 7e je 10b950 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10b8d2: 85 ff test %edi,%edi 10b8d4: 0f 84 92 00 00 00 je 10b96c } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10b8da: 8b 17 mov (%edi),%edx 10b8dc: 85 d2 test %edx,%edx 10b8de: 74 70 je 10b950 return EINVAL; switch ( the_attr->process_shared ) { 10b8e0: 8b 47 04 mov 0x4(%edi),%eax 10b8e3: 85 c0 test %eax,%eax 10b8e5: 75 69 jne 10b950 <== ALWAYS TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10b8e7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10b8ee: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b8f1: a1 d8 8b 12 00 mov 0x128bd8,%eax 10b8f6: 40 inc %eax 10b8f7: a3 d8 8b 12 00 mov %eax,0x128bd8 * 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 *) 10b8fc: 83 ec 0c sub $0xc,%esp 10b8ff: 68 20 90 12 00 push $0x129020 10b904: e8 43 20 00 00 call 10d94c <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10b909: 83 c4 10 add $0x10,%esp 10b90c: 85 c0 test %eax,%eax 10b90e: 74 50 je 10b960 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10b910: 83 ec 08 sub $0x8,%esp 10b913: 8d 55 e0 lea -0x20(%ebp),%edx 10b916: 52 push %edx 10b917: 8d 50 10 lea 0x10(%eax),%edx 10b91a: 52 push %edx 10b91b: 89 45 d4 mov %eax,-0x2c(%ebp) 10b91e: e8 a1 16 00 00 call 10cfc4 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b923: 8b 45 d4 mov -0x2c(%ebp),%eax 10b926: 8b 50 08 mov 0x8(%eax),%edx 10b929: 0f b7 f2 movzwl %dx,%esi 10b92c: 8b 0d 3c 90 12 00 mov 0x12903c,%ecx 10b932: 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; 10b935: 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; 10b93c: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10b93e: e8 2d 2d 00 00 call 10e670 <_Thread_Enable_dispatch> 10b943: 31 c0 xor %eax,%eax return 0; 10b945: 83 c4 10 add $0x10,%esp } 10b948: 8d 65 f4 lea -0xc(%ebp),%esp 10b94b: 5b pop %ebx 10b94c: 5e pop %esi 10b94d: 5f pop %edi 10b94e: c9 leave 10b94f: c3 ret /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; 10b950: b8 16 00 00 00 mov $0x16,%eax } 10b955: 8d 65 f4 lea -0xc(%ebp),%esp 10b958: 5b pop %ebx 10b959: 5e pop %esi 10b95a: 5f pop %edi 10b95b: c9 leave 10b95c: c3 ret 10b95d: 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(); 10b960: e8 0b 2d 00 00 call 10e670 <_Thread_Enable_dispatch> 10b965: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10b96a: eb e9 jmp 10b955 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10b96c: 83 ec 0c sub $0xc,%esp 10b96f: 8d 7d d8 lea -0x28(%ebp),%edi 10b972: 57 push %edi 10b973: e8 80 fe ff ff call 10b7f8 10b978: 83 c4 10 add $0x10,%esp 10b97b: e9 5a ff ff ff jmp 10b8da 0010b980 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10b980: 55 push %ebp 10b981: 89 e5 mov %esp,%ebp 10b983: 83 ec 18 sub $0x18,%esp 10b986: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b989: 85 c0 test %eax,%eax 10b98b: 74 4f je 10b9dc RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b98d: 51 push %ecx 10b98e: 8d 55 f4 lea -0xc(%ebp),%edx 10b991: 52 push %edx 10b992: ff 30 pushl (%eax) 10b994: 68 20 90 12 00 push $0x129020 10b999: e8 5e 24 00 00 call 10ddfc <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10b99e: 83 c4 10 add $0x10,%esp 10b9a1: 8b 55 f4 mov -0xc(%ebp),%edx 10b9a4: 85 d2 test %edx,%edx 10b9a6: 75 34 jne 10b9dc case OBJECTS_LOCAL: _CORE_barrier_Wait( 10b9a8: 83 ec 0c sub $0xc,%esp 10b9ab: 6a 00 push $0x0 10b9ad: 6a 00 push $0x0 10b9af: 6a 01 push $0x1 10b9b1: ff 70 08 pushl 0x8(%eax) 10b9b4: 83 c0 10 add $0x10,%eax 10b9b7: 50 push %eax 10b9b8: e8 3b 16 00 00 call 10cff8 <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10b9bd: 83 c4 20 add $0x20,%esp 10b9c0: e8 ab 2c 00 00 call 10e670 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10b9c5: 83 ec 0c sub $0xc,%esp 10b9c8: a1 98 8c 12 00 mov 0x128c98,%eax 10b9cd: ff 70 34 pushl 0x34(%eax) 10b9d0: e8 27 58 00 00 call 1111fc <_POSIX_Barrier_Translate_core_barrier_return_code> 10b9d5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b9d8: c9 leave 10b9d9: c3 ret 10b9da: 66 90 xchg %ax,%ax <== NOT EXECUTED true, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 10b9dc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b9e1: c9 leave 10b9e2: c3 ret 0010b7b0 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10b7b0: 55 push %ebp 10b7b1: 89 e5 mov %esp,%ebp 10b7b3: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10b7b6: 85 c0 test %eax,%eax 10b7b8: 74 12 je 10b7cc 10b7ba: 8b 10 mov (%eax),%edx 10b7bc: 85 d2 test %edx,%edx 10b7be: 74 0c je 10b7cc return EINVAL; attr->is_initialized = false; 10b7c0: c7 00 00 00 00 00 movl $0x0,(%eax) 10b7c6: 31 c0 xor %eax,%eax return 0; } 10b7c8: c9 leave 10b7c9: c3 ret 10b7ca: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10b7cc: b8 16 00 00 00 mov $0x16,%eax } 10b7d1: c9 leave 10b7d2: c3 ret 0010b7f8 : */ int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { 10b7f8: 55 push %ebp 10b7f9: 89 e5 mov %esp,%ebp 10b7fb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b7fe: 85 c0 test %eax,%eax 10b800: 74 12 je 10b814 return EINVAL; attr->is_initialized = true; 10b802: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10b808: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10b80f: 31 c0 xor %eax,%eax return 0; } 10b811: c9 leave 10b812: c3 ret 10b813: 90 nop <== NOT EXECUTED int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { if ( !attr ) 10b814: b0 16 mov $0x16,%al return EINVAL; attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10b816: c9 leave 10b817: c3 ret 0010b818 : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 10b818: 55 push %ebp 10b819: 89 e5 mov %esp,%ebp 10b81b: 8b 45 08 mov 0x8(%ebp),%eax 10b81e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b821: 85 c0 test %eax,%eax 10b823: 74 0b je 10b830 return EINVAL; if ( !attr->is_initialized ) 10b825: 8b 08 mov (%eax),%ecx 10b827: 85 c9 test %ecx,%ecx 10b829: 74 05 je 10b830 return EINVAL; switch ( pshared ) { 10b82b: 83 fa 01 cmp $0x1,%edx 10b82e: 76 08 jbe 10b838 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10b830: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b835: c9 leave 10b836: c3 ret 10b837: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b838: 89 50 04 mov %edx,0x4(%eax) 10b83b: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10b83d: c9 leave 10b83e: c3 ret 0010b090 : */ int pthread_cancel( pthread_t thread ) { 10b090: 55 push %ebp 10b091: 89 e5 mov %esp,%ebp 10b093: 83 ec 18 sub $0x18,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 10b096: a1 d4 88 12 00 mov 0x1288d4,%eax 10b09b: 85 c0 test %eax,%eax 10b09d: 74 09 je 10b0a8 10b09f: b8 47 00 00 00 mov $0x47,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b0a4: c9 leave 10b0a5: c3 ret 10b0a6: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10b0a8: 51 push %ecx 10b0a9: 8d 45 f4 lea -0xc(%ebp),%eax 10b0ac: 50 push %eax 10b0ad: ff 75 08 pushl 0x8(%ebp) 10b0b0: 68 00 8b 12 00 push $0x128b00 10b0b5: e8 72 20 00 00 call 10d12c <_Objects_Get> if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b0ba: 83 c4 10 add $0x10,%esp 10b0bd: 8b 55 f4 mov -0xc(%ebp),%edx 10b0c0: 85 d2 test %edx,%edx 10b0c2: 75 20 jne 10b0e4 case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 10b0c4: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 10b0ca: c7 82 dc 00 00 00 01 movl $0x1,0xdc(%edx) 10b0d1: 00 00 00 /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 10b0d4: 83 ec 0c sub $0xc,%esp 10b0d7: 50 push %eax 10b0d8: e8 8f 51 00 00 call 11026c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b0dd: 31 c0 xor %eax,%eax return 0; 10b0df: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b0e2: c9 leave 10b0e3: c3 ret if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b0e4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b0e9: c9 leave 10b0ea: c3 ret 0010af10 : */ void pthread_cleanup_pop( int execute ) { 10af10: 55 push %ebp 10af11: 89 e5 mov %esp,%ebp 10af13: 57 push %edi 10af14: 56 push %esi 10af15: 53 push %ebx 10af16: 83 ec 1c sub $0x1c,%esp 10af19: 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 ]; 10af1c: a1 b8 74 12 00 mov 0x1274b8,%eax 10af21: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10af27: 8b 15 f8 73 12 00 mov 0x1273f8,%edx 10af2d: 42 inc %edx 10af2e: 89 15 f8 73 12 00 mov %edx,0x1273f8 * 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 ); 10af34: 9c pushf 10af35: fa cli 10af36: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10af37: 8d 90 e4 00 00 00 lea 0xe4(%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; 10af3d: 39 90 e0 00 00 00 cmp %edx,0xe0(%eax) 10af43: 74 4f je 10af94 _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 10af45: 8b 42 04 mov 0x4(%edx),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10af48: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10af4a: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10af4d: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10af50: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10af52: 56 push %esi 10af53: 9d popf tmp_handler = *handler; 10af54: 8d 7d d8 lea -0x28(%ebp),%edi 10af57: b9 04 00 00 00 mov $0x4,%ecx 10af5c: 89 c6 mov %eax,%esi 10af5e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10af60: 8b 75 e0 mov -0x20(%ebp),%esi 10af63: 8b 7d e4 mov -0x1c(%ebp),%edi _Workspace_Free( handler ); 10af66: 83 ec 0c sub $0xc,%esp 10af69: 50 push %eax 10af6a: e8 85 38 00 00 call 10e7f4 <_Workspace_Free> _Thread_Enable_dispatch(); 10af6f: e8 b4 26 00 00 call 10d628 <_Thread_Enable_dispatch> if ( execute ) 10af74: 83 c4 10 add $0x10,%esp 10af77: 85 db test %ebx,%ebx 10af79: 75 09 jne 10af84 (*tmp_handler.routine)( tmp_handler.arg ); } 10af7b: 8d 65 f4 lea -0xc(%ebp),%esp 10af7e: 5b pop %ebx 10af7f: 5e pop %esi 10af80: 5f pop %edi 10af81: c9 leave 10af82: c3 ret 10af83: 90 nop <== NOT EXECUTED _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10af84: 89 7d 08 mov %edi,0x8(%ebp) 10af87: 89 f0 mov %esi,%eax } 10af89: 8d 65 f4 lea -0xc(%ebp),%esp 10af8c: 5b pop %ebx 10af8d: 5e pop %esi 10af8e: 5f pop %edi 10af8f: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10af90: ff e0 jmp *%eax 10af92: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10af94: e8 8f 26 00 00 call 10d628 <_Thread_Enable_dispatch> _ISR_Enable( level ); 10af99: 56 push %esi 10af9a: 9d popf _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); } 10af9b: 8d 65 f4 lea -0xc(%ebp),%esp 10af9e: 5b pop %ebx 10af9f: 5e pop %esi 10afa0: 5f pop %edi 10afa1: c9 leave 10afa2: c3 ret 0010b2bc : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10b2bc: 55 push %ebp 10b2bd: 89 e5 mov %esp,%ebp 10b2bf: 56 push %esi 10b2c0: 53 push %ebx 10b2c1: 8b 5d 08 mov 0x8(%ebp),%ebx 10b2c4: 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 ) 10b2c7: 85 db test %ebx,%ebx 10b2c9: 74 4d je 10b318 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b2cb: a1 18 90 12 00 mov 0x129018,%eax 10b2d0: 40 inc %eax 10b2d1: a3 18 90 12 00 mov %eax,0x129018 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10b2d6: 83 ec 0c sub $0xc,%esp 10b2d9: 6a 10 push $0x10 10b2db: e8 40 40 00 00 call 10f320 <_Workspace_Allocate> if ( handler ) { 10b2e0: 83 c4 10 add $0x10,%esp 10b2e3: 85 c0 test %eax,%eax 10b2e5: 74 25 je 10b30c <== ALWAYS TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10b2e7: 8b 15 d8 90 12 00 mov 0x1290d8,%edx 10b2ed: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 10b2f3: 81 c2 e0 00 00 00 add $0xe0,%edx handler->routine = routine; 10b2f9: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10b2fc: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10b2ff: 83 ec 08 sub $0x8,%esp 10b302: 50 push %eax 10b303: 52 push %edx 10b304: e8 9b 17 00 00 call 10caa4 <_Chain_Append> 10b309: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10b30c: 8d 65 f8 lea -0x8(%ebp),%esp 10b30f: 5b pop %ebx 10b310: 5e pop %esi 10b311: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10b312: e9 c9 2d 00 00 jmp 10e0e0 <_Thread_Enable_dispatch> 10b317: 90 nop <== NOT EXECUTED } 10b318: 8d 65 f8 lea -0x8(%ebp),%esp 10b31b: 5b pop %ebx 10b31c: 5e pop %esi 10b31d: c9 leave 10b31e: c3 ret 0010bfa8 : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10bfa8: 55 push %ebp 10bfa9: 89 e5 mov %esp,%ebp 10bfab: 53 push %ebx 10bfac: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10bfaf: 8d 45 f4 lea -0xc(%ebp),%eax 10bfb2: 50 push %eax 10bfb3: ff 75 08 pushl 0x8(%ebp) 10bfb6: e8 65 00 00 00 call 10c020 <_POSIX_Condition_variables_Get> 10bfbb: 89 c3 mov %eax,%ebx switch ( location ) { 10bfbd: 83 c4 10 add $0x10,%esp 10bfc0: 8b 4d f4 mov -0xc(%ebp),%ecx 10bfc3: 85 c9 test %ecx,%ecx 10bfc5: 75 25 jne 10bfec case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10bfc7: 83 ec 0c sub $0xc,%esp 10bfca: 8d 40 18 lea 0x18(%eax),%eax 10bfcd: 50 push %eax 10bfce: e8 65 3b 00 00 call 10fb38 <_Thread_queue_First> 10bfd3: 83 c4 10 add $0x10,%esp 10bfd6: 85 c0 test %eax,%eax 10bfd8: 74 1e je 10bff8 _Thread_Enable_dispatch(); 10bfda: e8 ed 33 00 00 call 10f3cc <_Thread_Enable_dispatch> 10bfdf: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bfe4: 8b 5d fc mov -0x4(%ebp),%ebx 10bfe7: c9 leave 10bfe8: c3 ret 10bfe9: 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 ) { 10bfec: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bff1: 8b 5d fc mov -0x4(%ebp),%ebx 10bff4: c9 leave 10bff5: c3 ret 10bff6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( 10bff8: 83 ec 08 sub $0x8,%esp 10bffb: 53 push %ebx 10bffc: 68 a0 a1 12 00 push $0x12a1a0 10c001: e8 1e 27 00 00 call 10e724 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10c006: 58 pop %eax 10c007: 5a pop %edx 10c008: 53 push %ebx 10c009: 68 a0 a1 12 00 push $0x12a1a0 10c00e: e8 15 2a 00 00 call 10ea28 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10c013: e8 b4 33 00 00 call 10f3cc <_Thread_Enable_dispatch> 10c018: 31 c0 xor %eax,%eax return 0; 10c01a: 83 c4 10 add $0x10,%esp 10c01d: eb d2 jmp 10bff1 0010c074 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10c074: 55 push %ebp 10c075: 89 e5 mov %esp,%ebp 10c077: 53 push %ebx 10c078: 83 ec 14 sub $0x14,%esp 10c07b: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c07e: 85 db test %ebx,%ebx 10c080: 0f 84 86 00 00 00 je 10c10c /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10c086: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10c08a: 74 06 je 10c092 <== ALWAYS TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10c08c: 8b 03 mov (%ebx),%eax 10c08e: 85 c0 test %eax,%eax 10c090: 75 0a jne 10c09c *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 10c092: b8 16 00 00 00 mov $0x16,%eax } 10c097: 8b 5d fc mov -0x4(%ebp),%ebx 10c09a: c9 leave 10c09b: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c09c: a1 b8 9c 12 00 mov 0x129cb8,%eax 10c0a1: 40 inc %eax 10c0a2: a3 b8 9c 12 00 mov %eax,0x129cb8 */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 10c0a7: 83 ec 0c sub $0xc,%esp 10c0aa: 68 a0 a1 12 00 push $0x12a1a0 10c0af: e8 f4 25 00 00 call 10e6a8 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10c0b4: 83 c4 10 add $0x10,%esp 10c0b7: 85 c0 test %eax,%eax 10c0b9: 74 5d je 10c118 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 10c0bb: 8b 53 04 mov 0x4(%ebx),%edx 10c0be: 89 50 10 mov %edx,0x10(%eax) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c0c1: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10c0c8: 6a 74 push $0x74 10c0ca: 68 00 08 00 00 push $0x800 10c0cf: 6a 00 push $0x0 10c0d1: 8d 50 18 lea 0x18(%eax),%edx 10c0d4: 52 push %edx 10c0d5: 89 45 f4 mov %eax,-0xc(%ebp) 10c0d8: e8 db 3a 00 00 call 10fbb8 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c0dd: 8b 45 f4 mov -0xc(%ebp),%eax 10c0e0: 8b 50 08 mov 0x8(%eax),%edx 10c0e3: 0f b7 da movzwl %dx,%ebx 10c0e6: 8b 0d bc a1 12 00 mov 0x12a1bc,%ecx 10c0ec: 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; 10c0ef: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10c0f6: 8b 45 08 mov 0x8(%ebp),%eax 10c0f9: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c0fb: e8 cc 32 00 00 call 10f3cc <_Thread_Enable_dispatch> 10c100: 31 c0 xor %eax,%eax return 0; 10c102: 83 c4 10 add $0x10,%esp } 10c105: 8b 5d fc mov -0x4(%ebp),%ebx 10c108: c9 leave 10c109: c3 ret 10c10a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c10c: bb 6c 33 12 00 mov $0x12336c,%ebx 10c111: e9 70 ff ff ff jmp 10c086 10c116: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 10c118: e8 af 32 00 00 call 10f3cc <_Thread_Enable_dispatch> 10c11d: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10c122: e9 70 ff ff ff jmp 10c097 0010bf0c : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10bf0c: 55 push %ebp 10bf0d: 89 e5 mov %esp,%ebp 10bf0f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10bf12: 85 c0 test %eax,%eax 10bf14: 74 12 je 10bf28 10bf16: 8b 10 mov (%eax),%edx 10bf18: 85 d2 test %edx,%edx 10bf1a: 74 0c je 10bf28 <== ALWAYS TAKEN return EINVAL; attr->is_initialized = false; 10bf1c: c7 00 00 00 00 00 movl $0x0,(%eax) 10bf22: 31 c0 xor %eax,%eax return 0; } 10bf24: c9 leave 10bf25: c3 ret 10bf26: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10bf28: b8 16 00 00 00 mov $0x16,%eax } 10bf2d: c9 leave 10bf2e: c3 ret 0010bf30 : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 10bf30: 55 push %ebp 10bf31: 89 e5 mov %esp,%ebp 10bf33: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10bf36: 85 c0 test %eax,%eax 10bf38: 74 0e je 10bf48 return EINVAL; *pshared = attr->process_shared; 10bf3a: 8b 50 04 mov 0x4(%eax),%edx 10bf3d: 8b 45 0c mov 0xc(%ebp),%eax 10bf40: 89 10 mov %edx,(%eax) 10bf42: 31 c0 xor %eax,%eax return 0; } 10bf44: c9 leave 10bf45: c3 ret 10bf46: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { if ( !attr ) 10bf48: b0 16 mov $0x16,%al return EINVAL; *pshared = attr->process_shared; return 0; } 10bf4a: c9 leave 10bf4b: c3 ret 0010bf4c : */ int pthread_condattr_init( pthread_condattr_t *attr ) { 10bf4c: 55 push %ebp 10bf4d: 89 e5 mov %esp,%ebp 10bf4f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10bf52: 85 c0 test %eax,%eax 10bf54: 74 16 je 10bf6c return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; 10bf56: 8b 15 6c 33 12 00 mov 0x12336c,%edx 10bf5c: 8b 0d 70 33 12 00 mov 0x123370,%ecx 10bf62: 89 10 mov %edx,(%eax) 10bf64: 89 48 04 mov %ecx,0x4(%eax) 10bf67: 31 c0 xor %eax,%eax return 0; } 10bf69: c9 leave 10bf6a: c3 ret 10bf6b: 90 nop <== NOT EXECUTED int pthread_condattr_init( pthread_condattr_t *attr ) { if ( !attr ) 10bf6c: b0 16 mov $0x16,%al return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; return 0; } 10bf6e: c9 leave 10bf6f: c3 ret 0010bf70 : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10bf70: 55 push %ebp 10bf71: 89 e5 mov %esp,%ebp 10bf73: 8b 45 08 mov 0x8(%ebp),%eax 10bf76: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10bf79: 85 c0 test %eax,%eax 10bf7b: 74 05 je 10bf82 return EINVAL; switch ( pshared ) { 10bf7d: 83 fa 01 cmp $0x1,%edx 10bf80: 76 0a jbe 10bf8c case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10bf82: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10bf87: c9 leave 10bf88: c3 ret 10bf89: 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; 10bf8c: 89 50 04 mov %edx,0x4(%eax) 10bf8f: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10bf91: c9 leave 10bf92: c3 ret 0010b624 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10b624: 55 push %ebp 10b625: 89 e5 mov %esp,%ebp 10b627: 57 push %edi 10b628: 56 push %esi 10b629: 53 push %ebx 10b62a: 83 ec 5c sub $0x5c,%esp 10b62d: 8b 5d 0c mov 0xc(%ebp),%ebx int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b630: 8b 7d 10 mov 0x10(%ebp),%edi 10b633: 85 ff test %edi,%edi 10b635: 0f 84 81 01 00 00 je 10b7bc return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b63b: 85 db test %ebx,%ebx 10b63d: 74 65 je 10b6a4 if ( !the_attr->is_initialized ) 10b63f: 8b 33 mov (%ebx),%esi 10b641: 85 f6 test %esi,%esi 10b643: 74 1f je 10b664 <== ALWAYS TAKEN * 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) ) 10b645: 8b 4b 04 mov 0x4(%ebx),%ecx 10b648: 85 c9 test %ecx,%ecx 10b64a: 74 0b je 10b657 10b64c: 8b 43 08 mov 0x8(%ebx),%eax 10b64f: 3b 05 38 45 12 00 cmp 0x124538,%eax 10b655: 72 0d jb 10b664 <== ALWAYS TAKEN * 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 ) { 10b657: 8b 43 10 mov 0x10(%ebx),%eax 10b65a: 83 f8 01 cmp $0x1,%eax 10b65d: 74 4d je 10b6ac 10b65f: 83 f8 02 cmp $0x2,%eax 10b662: 74 10 je 10b674 * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 10b664: ba 16 00 00 00 mov $0x16,%edx } 10b669: 89 d0 mov %edx,%eax 10b66b: 8d 65 f4 lea -0xc(%ebp),%esp 10b66e: 5b pop %ebx 10b66f: 5e pop %esi 10b670: 5f pop %edi 10b671: c9 leave 10b672: c3 ret 10b673: 90 nop <== NOT EXECUTED schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10b674: 8b 43 14 mov 0x14(%ebx),%eax 10b677: 89 45 b0 mov %eax,-0x50(%ebp) schedparam = the_attr->schedparam; 10b67a: 8d 4d c4 lea -0x3c(%ebp),%ecx 10b67d: 89 4d b4 mov %ecx,-0x4c(%ebp) 10b680: 8d 73 18 lea 0x18(%ebx),%esi 10b683: b9 07 00 00 00 mov $0x7,%ecx 10b688: 8b 7d b4 mov -0x4c(%ebp),%edi 10b68b: 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 ) 10b68d: 8b 53 0c mov 0xc(%ebx),%edx 10b690: 85 d2 test %edx,%edx 10b692: 74 49 je 10b6dd <== NEVER TAKEN 10b694: ba 86 00 00 00 mov $0x86,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10b699: 89 d0 mov %edx,%eax 10b69b: 8d 65 f4 lea -0xc(%ebp),%esp 10b69e: 5b pop %ebx 10b69f: 5e pop %esi 10b6a0: 5f pop %edi 10b6a1: c9 leave 10b6a2: c3 ret 10b6a3: 90 nop <== NOT EXECUTED int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b6a4: bb e0 1d 12 00 mov $0x121de0,%ebx 10b6a9: eb 94 jmp 10b63f 10b6ab: 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 ]; 10b6ac: a1 b8 87 12 00 mov 0x1287b8,%eax 10b6b1: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10b6b7: 8b 86 80 00 00 00 mov 0x80(%esi),%eax 10b6bd: 89 45 b0 mov %eax,-0x50(%ebp) schedparam = api->schedparam; 10b6c0: 8d 4d c4 lea -0x3c(%ebp),%ecx 10b6c3: 89 4d b4 mov %ecx,-0x4c(%ebp) 10b6c6: 81 c6 84 00 00 00 add $0x84,%esi 10b6cc: b9 07 00 00 00 mov $0x7,%ecx 10b6d1: 8b 7d b4 mov -0x4c(%ebp),%edi 10b6d4: 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 ) 10b6d6: 8b 53 0c mov 0xc(%ebx),%edx 10b6d9: 85 d2 test %edx,%edx 10b6db: 75 b7 jne 10b694 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10b6dd: 83 ec 0c sub $0xc,%esp 10b6e0: ff 75 c4 pushl -0x3c(%ebp) 10b6e3: e8 44 5c 00 00 call 11132c <_POSIX_Priority_Is_valid> 10b6e8: 83 c4 10 add $0x10,%esp 10b6eb: 84 c0 test %al,%al 10b6ed: 0f 84 71 ff ff ff je 10b664 <== ALWAYS TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10b6f3: 8b 7d c4 mov -0x3c(%ebp),%edi RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10b6f6: 0f b6 35 3c 45 12 00 movzbl 0x12453c,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10b6fd: 8d 45 e0 lea -0x20(%ebp),%eax 10b700: 50 push %eax 10b701: 8d 45 e4 lea -0x1c(%ebp),%eax 10b704: 50 push %eax 10b705: ff 75 b4 pushl -0x4c(%ebp) 10b708: ff 75 b0 pushl -0x50(%ebp) 10b70b: e8 38 5c 00 00 call 111348 <_POSIX_Thread_Translate_sched_param> 10b710: 89 c2 mov %eax,%edx schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10b712: 83 c4 10 add $0x10,%esp 10b715: 85 c0 test %eax,%eax 10b717: 0f 85 4c ff ff ff jne 10b669 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b71d: 83 ec 0c sub $0xc,%esp 10b720: ff 35 b0 87 12 00 pushl 0x1287b0 10b726: 89 45 a4 mov %eax,-0x5c(%ebp) 10b729: e8 6e 17 00 00 call 10ce9c <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10b72e: c7 04 24 c0 89 12 00 movl $0x1289c0,(%esp) 10b735: e8 f2 20 00 00 call 10d82c <_Objects_Allocate> 10b73a: 89 45 ac mov %eax,-0x54(%ebp) * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 10b73d: 83 c4 10 add $0x10,%esp 10b740: 85 c0 test %eax,%eax 10b742: 8b 55 a4 mov -0x5c(%ebp),%edx 10b745: 0f 84 06 01 00 00 je 10b851 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10b74b: 8b 4b 08 mov 0x8(%ebx),%ecx 10b74e: 50 push %eax 10b74f: 6a 00 push $0x0 10b751: 6a 00 push $0x0 10b753: ff 75 e0 pushl -0x20(%ebp) 10b756: ff 75 e4 pushl -0x1c(%ebp) 10b759: 6a 01 push $0x1 10b75b: 81 e6 ff 00 00 00 and $0xff,%esi 10b761: 29 fe sub %edi,%esi 10b763: 56 push %esi 10b764: 6a 01 push $0x1 10b766: a1 38 45 12 00 mov 0x124538,%eax 10b76b: d1 e0 shl %eax 10b76d: 39 c8 cmp %ecx,%eax 10b76f: 73 02 jae 10b773 10b771: 89 c8 mov %ecx,%eax 10b773: 50 push %eax 10b774: ff 73 04 pushl 0x4(%ebx) 10b777: ff 75 ac pushl -0x54(%ebp) 10b77a: 68 c0 89 12 00 push $0x1289c0 10b77f: 89 55 a4 mov %edx,-0x5c(%ebp) 10b782: e8 91 2e 00 00 call 10e618 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10b787: 83 c4 30 add $0x30,%esp 10b78a: 84 c0 test %al,%al 10b78c: 8b 55 a4 mov -0x5c(%ebp),%edx 10b78f: 75 35 jne 10b7c6 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10b791: 83 ec 08 sub $0x8,%esp 10b794: ff 75 ac pushl -0x54(%ebp) 10b797: 68 c0 89 12 00 push $0x1289c0 10b79c: e8 0b 24 00 00 call 10dbac <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b7a1: 59 pop %ecx 10b7a2: ff 35 b0 87 12 00 pushl 0x1287b0 10b7a8: e8 37 17 00 00 call 10cee4 <_API_Mutex_Unlock> 10b7ad: ba 0b 00 00 00 mov $0xb,%edx return EAGAIN; 10b7b2: 83 c4 10 add $0x10,%esp 10b7b5: e9 af fe ff ff jmp 10b669 10b7ba: 66 90 xchg %ax,%ax <== NOT EXECUTED int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b7bc: ba 0e 00 00 00 mov $0xe,%edx 10b7c1: e9 a3 fe ff ff jmp 10b669 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b7c6: 8b 45 ac mov -0x54(%ebp),%eax 10b7c9: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b7cf: 89 45 a8 mov %eax,-0x58(%ebp) api->Attributes = *the_attr; 10b7d2: b9 0f 00 00 00 mov $0xf,%ecx 10b7d7: 89 c7 mov %eax,%edi 10b7d9: 89 de mov %ebx,%esi 10b7db: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10b7dd: 8b 43 38 mov 0x38(%ebx),%eax 10b7e0: 8b 4d a8 mov -0x58(%ebp),%ecx 10b7e3: 89 41 3c mov %eax,0x3c(%ecx) api->schedpolicy = schedpolicy; 10b7e6: 8b 45 b0 mov -0x50(%ebp),%eax 10b7e9: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = schedparam; 10b7ef: 89 cf mov %ecx,%edi 10b7f1: 81 c7 84 00 00 00 add $0x84,%edi 10b7f7: b9 07 00 00 00 mov $0x7,%ecx 10b7fc: 8b 75 b4 mov -0x4c(%ebp),%esi 10b7ff: 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; 10b801: 8b 4d ac mov -0x54(%ebp),%ecx 10b804: c6 41 74 01 movb $0x1,0x74(%ecx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10b808: 83 ec 0c sub $0xc,%esp 10b80b: 6a 00 push $0x0 10b80d: ff 75 14 pushl 0x14(%ebp) 10b810: ff 75 10 pushl 0x10(%ebp) 10b813: 6a 01 push $0x1 10b815: 51 push %ecx 10b816: 89 55 a4 mov %edx,-0x5c(%ebp) 10b819: e8 96 38 00 00 call 10f0b4 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10b81e: 83 c4 20 add $0x20,%esp 10b821: 83 7d b0 04 cmpl $0x4,-0x50(%ebp) 10b825: 8b 55 a4 mov -0x5c(%ebp),%edx 10b828: 74 42 je 10b86c } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10b82a: 8b 45 ac mov -0x54(%ebp),%eax 10b82d: 8b 48 08 mov 0x8(%eax),%ecx 10b830: 8b 45 08 mov 0x8(%ebp),%eax 10b833: 89 08 mov %ecx,(%eax) _RTEMS_Unlock_allocator(); 10b835: 83 ec 0c sub $0xc,%esp 10b838: ff 35 b0 87 12 00 pushl 0x1287b0 10b83e: 89 55 a4 mov %edx,-0x5c(%ebp) 10b841: e8 9e 16 00 00 call 10cee4 <_API_Mutex_Unlock> return 0; 10b846: 83 c4 10 add $0x10,%esp 10b849: 8b 55 a4 mov -0x5c(%ebp),%edx 10b84c: e9 18 fe ff ff jmp 10b669 * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b851: 83 ec 0c sub $0xc,%esp 10b854: ff 35 b0 87 12 00 pushl 0x1287b0 10b85a: e8 85 16 00 00 call 10cee4 <_API_Mutex_Unlock> 10b85f: ba 0b 00 00 00 mov $0xb,%edx return EAGAIN; 10b864: 83 c4 10 add $0x10,%esp 10b867: e9 fd fd ff ff jmp 10b669 return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10b86c: 83 ec 0c sub $0xc,%esp 10b86f: 8b 45 a8 mov -0x58(%ebp),%eax 10b872: 05 8c 00 00 00 add $0x8c,%eax 10b877: 50 push %eax 10b878: e8 27 3a 00 00 call 10f2a4 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b87d: 8b 4d a8 mov -0x58(%ebp),%ecx 10b880: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b886: 58 pop %eax 10b887: 5a pop %edx 10b888: 89 c8 mov %ecx,%eax 10b88a: 05 a4 00 00 00 add $0xa4,%eax 10b88f: 50 push %eax 10b890: 68 d8 87 12 00 push $0x1287d8 10b895: e8 2e 3d 00 00 call 10f5c8 <_Watchdog_Insert> 10b89a: 83 c4 10 add $0x10,%esp 10b89d: 8b 55 a4 mov -0x5c(%ebp),%edx 10b8a0: eb 88 jmp 10b82a 0010b740 : #include int pthread_detach( pthread_t thread ) { 10b740: 55 push %ebp 10b741: 89 e5 mov %esp,%ebp 10b743: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10b746: 8d 45 f4 lea -0xc(%ebp),%eax 10b749: 50 push %eax 10b74a: ff 75 08 pushl 0x8(%ebp) 10b74d: 68 60 96 12 00 push $0x129660 10b752: e8 a1 22 00 00 call 10d9f8 <_Objects_Get> register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b757: 83 c4 10 add $0x10,%esp 10b75a: 8b 55 f4 mov -0xc(%ebp),%edx 10b75d: 85 d2 test %edx,%edx 10b75f: 75 17 jne 10b778 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 10b761: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b767: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) _Thread_Enable_dispatch(); 10b76e: e8 f9 2a 00 00 call 10e26c <_Thread_Enable_dispatch> 10b773: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b775: c9 leave 10b776: c3 ret 10b777: 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 ) { 10b778: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b77d: c9 leave 10b77e: c3 ret 001125d0 : } void pthread_exit( void *value_ptr ) { 1125d0: 55 push %ebp 1125d1: 89 e5 mov %esp,%ebp 1125d3: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 1125d6: ff 75 08 pushl 0x8(%ebp) 1125d9: ff 35 b8 74 12 00 pushl 0x1274b8 1125df: e8 88 ff ff ff call 11256c <_POSIX_Thread_Exit> 1125e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1125e7: c9 leave <== NOT EXECUTED 1125e8: c3 ret <== NOT EXECUTED 0010d86c : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10d86c: 55 push %ebp 10d86d: 89 e5 mov %esp,%ebp 10d86f: 57 push %edi 10d870: 56 push %esi 10d871: 53 push %ebx 10d872: 83 ec 1c sub $0x1c,%esp 10d875: 8b 7d 0c mov 0xc(%ebp),%edi 10d878: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10d87b: 85 ff test %edi,%edi 10d87d: 74 69 je 10d8e8 10d87f: 85 db test %ebx,%ebx 10d881: 74 65 je 10d8e8 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10d883: 51 push %ecx 10d884: 8d 45 e4 lea -0x1c(%ebp),%eax 10d887: 50 push %eax 10d888: ff 75 08 pushl 0x8(%ebp) 10d88b: 68 20 b7 12 00 push $0x12b720 10d890: e8 a3 23 00 00 call 10fc38 <_Objects_Get> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10d895: 83 c4 10 add $0x10,%esp 10d898: 8b 55 e4 mov -0x1c(%ebp),%edx 10d89b: 85 d2 test %edx,%edx 10d89d: 75 39 jne 10d8d8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10d89f: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10d8a5: 8b 96 80 00 00 00 mov 0x80(%esi),%edx 10d8ab: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10d8ad: 81 c6 84 00 00 00 add $0x84,%esi 10d8b3: b9 07 00 00 00 mov $0x7,%ecx 10d8b8: 89 df mov %ebx,%edi 10d8ba: f3 a5 rep movsl %ds:(%esi),%es:(%edi) param->sched_priority = 10d8bc: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx 10d8c3: 2b 50 14 sub 0x14(%eax),%edx 10d8c6: 89 13 mov %edx,(%ebx) _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10d8c8: e8 df 2b 00 00 call 1104ac <_Thread_Enable_dispatch> 10d8cd: 31 c0 xor %eax,%eax break; } return ESRCH; } 10d8cf: 8d 65 f4 lea -0xc(%ebp),%esp 10d8d2: 5b pop %ebx 10d8d3: 5e pop %esi 10d8d4: 5f pop %edi 10d8d5: c9 leave 10d8d6: c3 ret 10d8d7: 90 nop <== NOT EXECUTED if ( !policy || !param ) return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10d8d8: b8 03 00 00 00 mov $0x3,%eax break; } return ESRCH; } 10d8dd: 8d 65 f4 lea -0xc(%ebp),%esp 10d8e0: 5b pop %ebx 10d8e1: 5e pop %esi 10d8e2: 5f pop %edi 10d8e3: c9 leave 10d8e4: c3 ret 10d8e5: 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; 10d8e8: b8 16 00 00 00 mov $0x16,%eax break; } return ESRCH; } 10d8ed: 8d 65 f4 lea -0xc(%ebp),%esp 10d8f0: 5b pop %ebx 10d8f1: 5e pop %esi 10d8f2: 5f pop %edi 10d8f3: c9 leave 10d8f4: c3 ret 0010b61c : */ void *pthread_getspecific( pthread_key_t key ) { 10b61c: 55 push %ebp 10b61d: 89 e5 mov %esp,%ebp 10b61f: 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 *) 10b622: 8d 45 f4 lea -0xc(%ebp),%eax 10b625: 50 push %eax 10b626: ff 75 08 pushl 0x8(%ebp) 10b629: 68 00 89 12 00 push $0x128900 10b62e: e8 e5 24 00 00 call 10db18 <_Objects_Get> uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10b633: 83 c4 10 add $0x10,%esp 10b636: 8b 55 f4 mov -0xc(%ebp),%edx 10b639: 85 d2 test %edx,%edx 10b63b: 75 2b jne 10b668 case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 10b63d: 8b 15 18 85 12 00 mov 0x128518,%edx 10b643: 8b 4a 08 mov 0x8(%edx),%ecx index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 10b646: 89 ca mov %ecx,%edx 10b648: c1 ea 18 shr $0x18,%edx 10b64b: 83 e2 07 and $0x7,%edx 10b64e: 0f b7 c9 movzwl %cx,%ecx 10b651: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax 10b655: 8b 04 88 mov (%eax,%ecx,4),%eax _Thread_Enable_dispatch(); 10b658: 89 45 e4 mov %eax,-0x1c(%ebp) 10b65b: e8 2c 2d 00 00 call 10e38c <_Thread_Enable_dispatch> 10b660: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return NULL; } 10b663: c9 leave 10b664: c3 ret 10b665: 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 ) { 10b668: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return NULL; } 10b66a: c9 leave 10b66b: c3 ret 001103ec : int pthread_join( pthread_t thread, void **value_ptr ) { 1103ec: 55 push %ebp 1103ed: 89 e5 mov %esp,%ebp 1103ef: 53 push %ebx 1103f0: 83 ec 18 sub $0x18,%esp 1103f3: 8b 5d 0c mov 0xc(%ebp),%ebx 1103f6: 8d 45 f4 lea -0xc(%ebp),%eax 1103f9: 50 push %eax 1103fa: ff 75 08 pushl 0x8(%ebp) 1103fd: 68 e0 0c 13 00 push $0x130ce0 110402: e8 45 23 00 00 call 11274c <_Objects_Get> POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 110407: 83 c4 10 add $0x10,%esp 11040a: 8b 55 f4 mov -0xc(%ebp),%edx 11040d: 85 d2 test %edx,%edx 11040f: 74 0b je 11041c 110411: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 110416: 8b 5d fc mov -0x4(%ebp),%ebx 110419: c9 leave 11041a: c3 ret 11041b: 90 nop <== NOT EXECUTED the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11041c: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 110422: 8b 4a 3c mov 0x3c(%edx),%ecx 110425: 85 c9 test %ecx,%ecx 110427: 74 43 je 11046c RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 110429: 8b 0d d8 0a 13 00 mov 0x130ad8,%ecx _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 11042f: 39 c8 cmp %ecx,%eax 110431: 74 49 je 11047c /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 110433: 8d 45 f0 lea -0x10(%ebp),%eax 110436: 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; 110439: c7 42 70 01 00 00 00 movl $0x1,0x70(%edx) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 110440: 50 push %eax 110441: 68 08 38 11 00 push $0x113808 110446: 6a 00 push $0x0 110448: 83 c2 40 add $0x40,%edx 11044b: 52 push %edx 11044c: e8 a7 30 00 00 call 1134f8 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 110451: e8 6a 2b 00 00 call 112fc0 <_Thread_Enable_dispatch> if ( value_ptr ) 110456: 83 c4 10 add $0x10,%esp 110459: 85 db test %ebx,%ebx 11045b: 74 05 je 110462 *value_ptr = return_pointer; 11045d: 8b 45 f0 mov -0x10(%ebp),%eax 110460: 89 03 mov %eax,(%ebx) 110462: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 110464: 8b 5d fc mov -0x4(%ebp),%ebx 110467: c9 leave 110468: c3 ret 110469: 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(); 11046c: e8 4f 2b 00 00 call 112fc0 <_Thread_Enable_dispatch> 110471: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 110476: 8b 5d fc mov -0x4(%ebp),%ebx 110479: c9 leave 11047a: c3 ret 11047b: 90 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); 11047c: e8 3f 2b 00 00 call 112fc0 <_Thread_Enable_dispatch> 110481: b8 2d 00 00 00 mov $0x2d,%eax return EDEADLK; 110486: eb 8e jmp 110416 0010b4a0 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 10b4a0: 55 push %ebp 10b4a1: 89 e5 mov %esp,%ebp 10b4a3: 57 push %edi 10b4a4: 56 push %esi 10b4a5: 53 push %ebx 10b4a6: 83 ec 28 sub $0x28,%esp 10b4a9: a1 58 84 12 00 mov 0x128458,%eax 10b4ae: 40 inc %eax 10b4af: a3 58 84 12 00 mov %eax,0x128458 * 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 ); 10b4b4: 68 00 89 12 00 push $0x128900 10b4b9: e8 aa 21 00 00 call 10d668 <_Objects_Allocate> 10b4be: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 10b4c0: 83 c4 10 add $0x10,%esp 10b4c3: 85 c0 test %eax,%eax 10b4c5: 0f 84 81 00 00 00 je 10b54c _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 10b4cb: 8b 45 0c mov 0xc(%ebp),%eax 10b4ce: 89 46 10 mov %eax,0x10(%esi) 10b4d1: 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 ] ) { 10b4d6: 8b 04 9d 2c 84 12 00 mov 0x12842c(,%ebx,4),%eax 10b4dd: 85 c0 test %eax,%eax 10b4df: 74 5f je 10b540 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 10b4e1: 8b 40 04 mov 0x4(%eax),%eax 10b4e4: 0f b7 40 10 movzwl 0x10(%eax),%eax 10b4e8: 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 ); 10b4ef: 83 ec 0c sub $0xc,%esp 10b4f2: 51 push %ecx 10b4f3: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b4f6: e8 49 41 00 00 call 10f644 <_Workspace_Allocate> if ( !table ) { 10b4fb: 83 c4 10 add $0x10,%esp 10b4fe: 85 c0 test %eax,%eax 10b500: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b503: 74 5b je 10b560 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 10b505: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4) memset( table, '\0', bytes_to_allocate ); 10b509: 89 c7 mov %eax,%edi 10b50b: 31 c0 xor %eax,%eax 10b50d: 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++ ) { 10b50f: 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; 10b510: 83 fb 05 cmp $0x5,%ebx 10b513: 75 c1 jne 10b4d6 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b515: 8b 46 08 mov 0x8(%esi),%eax 10b518: 0f b7 c8 movzwl %ax,%ecx 10b51b: 8b 15 1c 89 12 00 mov 0x12891c,%edx 10b521: 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; 10b524: 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; 10b52b: 8b 55 08 mov 0x8(%ebp),%edx 10b52e: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10b530: e8 57 2e 00 00 call 10e38c <_Thread_Enable_dispatch> 10b535: 31 c0 xor %eax,%eax return 0; } 10b537: 8d 65 f4 lea -0xc(%ebp),%esp 10b53a: 5b pop %ebx 10b53b: 5e pop %esi 10b53c: 5f pop %edi 10b53d: c9 leave 10b53e: c3 ret 10b53f: 90 nop <== NOT EXECUTED } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 10b540: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4) 10b547: 00 10b548: eb c5 jmp 10b50f 10b54a: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 10b54c: e8 3b 2e 00 00 call 10e38c <_Thread_Enable_dispatch> 10b551: b8 0b 00 00 00 mov $0xb,%eax *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10b556: 8d 65 f4 lea -0xc(%ebp),%esp 10b559: 5b pop %ebx 10b55a: 5e pop %esi 10b55b: 5f pop %edi 10b55c: c9 leave 10b55d: c3 ret 10b55e: 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; 10b560: 89 df mov %ebx,%edi 10b562: 4f dec %edi 10b563: 74 1a je 10b57f 10b565: 8d 5c 9e 10 lea 0x10(%esi,%ebx,4),%ebx 10b569: 8d 76 00 lea 0x0(%esi),%esi the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 10b56c: 83 ec 0c sub $0xc,%esp 10b56f: ff 33 pushl (%ebx) 10b571: e8 ea 40 00 00 call 10f660 <_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-- ) 10b576: 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; 10b579: 83 c4 10 add $0x10,%esp 10b57c: 4f dec %edi 10b57d: 75 ed jne 10b56c */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10b57f: 83 ec 08 sub $0x8,%esp 10b582: 56 push %esi 10b583: 68 00 89 12 00 push $0x128900 10b588: e8 5b 24 00 00 call 10d9e8 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10b58d: e8 fa 2d 00 00 call 10e38c <_Thread_Enable_dispatch> 10b592: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10b597: 83 c4 10 add $0x10,%esp 10b59a: eb 9b jmp 10b537 00113578 : int pthread_kill( pthread_t thread, int sig ) { 113578: 55 push %ebp 113579: 89 e5 mov %esp,%ebp 11357b: 57 push %edi 11357c: 56 push %esi 11357d: 53 push %ebx 11357e: 83 ec 1c sub $0x1c,%esp 113581: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 113584: 85 db test %ebx,%ebx 113586: 0f 84 8c 00 00 00 je 113618 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 11358c: 8d 7b ff lea -0x1(%ebx),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 11358f: 83 ff 1f cmp $0x1f,%edi 113592: 0f 87 80 00 00 00 ja 113618 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 113598: 51 push %ecx 113599: 8d 45 e4 lea -0x1c(%ebp),%eax 11359c: 50 push %eax 11359d: ff 75 08 pushl 0x8(%ebp) 1135a0: 68 c0 76 12 00 push $0x1276c0 1135a5: e8 36 97 ff ff call 10cce0 <_Objects_Get> 1135aa: 89 c6 mov %eax,%esi rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 1135ac: 83 c4 10 add $0x10,%esp 1135af: 8b 55 e4 mov -0x1c(%ebp),%edx 1135b2: 85 d2 test %edx,%edx 1135b4: 75 76 jne 11362c case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1135b6: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1135bc: 8d 04 5b lea (%ebx,%ebx,2),%eax 1135bf: 83 3c 85 e8 79 12 00 cmpl $0x1,0x1279e8(,%eax,4) 1135c6: 01 1135c7: 74 31 je 1135fa return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 1135c9: b8 01 00 00 00 mov $0x1,%eax 1135ce: 89 f9 mov %edi,%ecx 1135d0: d3 e0 shl %cl,%eax 1135d2: 09 82 d0 00 00 00 or %eax,0xd0(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 1135d8: 50 push %eax 1135d9: 6a 00 push $0x0 1135db: 53 push %ebx 1135dc: 56 push %esi 1135dd: e8 7a fe ff ff call 11345c <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; 1135e2: c6 46 74 01 movb $0x1,0x74(%esi) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1135e6: a1 94 74 12 00 mov 0x127494,%eax 1135eb: 83 c4 10 add $0x10,%esp 1135ee: 85 c0 test %eax,%eax 1135f0: 74 08 je 1135fa 1135f2: 3b 35 b8 74 12 00 cmp 0x1274b8,%esi 1135f8: 74 12 je 11360c _ISR_Signals_to_thread_executing = true; } _Thread_Enable_dispatch(); 1135fa: e8 55 9f ff ff call 10d554 <_Thread_Enable_dispatch> 1135ff: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 113601: 8d 65 f4 lea -0xc(%ebp),%esp 113604: 5b pop %ebx 113605: 5e pop %esi 113606: 5f pop %edi 113607: c9 leave 113608: c3 ret 113609: 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; 11360c: c6 05 68 75 12 00 01 movb $0x1,0x127568 113613: eb e5 jmp 1135fa 113615: 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 ); 113618: e8 b3 00 00 00 call 1136d0 <__errno> 11361d: c7 00 16 00 00 00 movl $0x16,(%eax) 113623: b8 ff ff ff ff mov $0xffffffff,%eax 113628: eb d7 jmp 113601 11362a: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 11362c: e8 9f 00 00 00 call 1136d0 <__errno> 113631: c7 00 03 00 00 00 movl $0x3,(%eax) 113637: b8 ff ff ff ff mov $0xffffffff,%eax 11363c: eb c3 jmp 113601 0010d04c : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 10d04c: 55 push %ebp 10d04d: 89 e5 mov %esp,%ebp 10d04f: 83 ec 30 sub $0x30,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d052: 8d 45 f4 lea -0xc(%ebp),%eax 10d055: 50 push %eax 10d056: ff 75 08 pushl 0x8(%ebp) 10d059: e8 ba 00 00 00 call 10d118 <_POSIX_Mutex_Get> switch ( location ) { 10d05e: 83 c4 10 add $0x10,%esp 10d061: 8b 55 f4 mov -0xc(%ebp),%edx 10d064: 85 d2 test %edx,%edx 10d066: 74 08 je 10d070 10d068: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d06d: c9 leave 10d06e: c3 ret 10d06f: 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 ) ) { 10d070: 8b 48 64 mov 0x64(%eax),%ecx 10d073: 85 c9 test %ecx,%ecx 10d075: 75 0d jne 10d084 _Thread_Enable_dispatch(); 10d077: e8 30 34 00 00 call 1104ac <_Thread_Enable_dispatch> 10d07c: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d081: c9 leave 10d082: c3 ret 10d083: 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 ); 10d084: 83 ec 08 sub $0x8,%esp 10d087: 50 push %eax 10d088: 68 60 b8 12 00 push $0x12b860 10d08d: 89 45 e4 mov %eax,-0x1c(%ebp) 10d090: e8 6f 27 00 00 call 10f804 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 10d095: 83 c4 0c add $0xc,%esp 10d098: 6a 16 push $0x16 10d09a: 6a 00 push $0x0 10d09c: 8b 45 e4 mov -0x1c(%ebp),%eax 10d09f: 8d 50 14 lea 0x14(%eax),%edx 10d0a2: 52 push %edx 10d0a3: e8 80 1e 00 00 call 10ef28 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 10d0a8: 58 pop %eax 10d0a9: 5a pop %edx 10d0aa: 8b 45 e4 mov -0x1c(%ebp),%eax 10d0ad: 50 push %eax 10d0ae: 68 60 b8 12 00 push $0x12b860 10d0b3: e8 50 2a 00 00 call 10fb08 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 10d0b8: e8 ef 33 00 00 call 1104ac <_Thread_Enable_dispatch> 10d0bd: 31 c0 xor %eax,%eax return 0; 10d0bf: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d0c2: c9 leave 10d0c3: c3 ret 0010d16c : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 10d16c: 55 push %ebp 10d16d: 89 e5 mov %esp,%ebp 10d16f: 53 push %ebx 10d170: 83 ec 14 sub $0x14,%esp 10d173: 8b 5d 0c mov 0xc(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 10d176: 85 db test %ebx,%ebx 10d178: 74 19 je 10d193 return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d17a: 83 ec 08 sub $0x8,%esp 10d17d: 8d 45 f4 lea -0xc(%ebp),%eax 10d180: 50 push %eax 10d181: ff 75 08 pushl 0x8(%ebp) 10d184: e8 8f ff ff ff call 10d118 <_POSIX_Mutex_Get> switch ( location ) { 10d189: 83 c4 10 add $0x10,%esp 10d18c: 8b 55 f4 mov -0xc(%ebp),%edx 10d18f: 85 d2 test %edx,%edx 10d191: 74 0d je 10d1a0 case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; 10d193: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d198: 8b 5d fc mov -0x4(%ebp),%ebx 10d19b: c9 leave 10d19c: c3 ret 10d19d: 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( 10d1a0: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx 10d1a7: 2b 50 60 sub 0x60(%eax),%edx 10d1aa: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10d1ac: e8 fb 32 00 00 call 1104ac <_Thread_Enable_dispatch> 10d1b1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d1b3: 8b 5d fc mov -0x4(%ebp),%ebx 10d1b6: c9 leave 10d1b7: c3 ret 0010d1b8 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10d1b8: 55 push %ebp 10d1b9: 89 e5 mov %esp,%ebp 10d1bb: 57 push %edi 10d1bc: 56 push %esi 10d1bd: 53 push %ebx 10d1be: 83 ec 1c sub $0x1c,%esp 10d1c1: 8b 75 08 mov 0x8(%ebp),%esi 10d1c4: 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; 10d1c7: 85 db test %ebx,%ebx 10d1c9: 0f 84 09 01 00 00 je 10d2d8 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10d1cf: 85 f6 test %esi,%esi 10d1d1: 0f 84 e5 00 00 00 je 10d2bc } } } #endif if ( !the_attr->is_initialized ) 10d1d7: 8b 13 mov (%ebx),%edx 10d1d9: 85 d2 test %edx,%edx 10d1db: 0f 84 db 00 00 00 je 10d2bc return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d1e1: 8b 43 04 mov 0x4(%ebx),%eax 10d1e4: 83 f8 01 cmp $0x1,%eax 10d1e7: 0f 84 f7 00 00 00 je 10d2e4 return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 10d1ed: 85 c0 test %eax,%eax 10d1ef: 0f 85 c7 00 00 00 jne 10d2bc return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d1f5: 8b 43 0c mov 0xc(%ebx),%eax 10d1f8: 83 f8 01 cmp $0x1,%eax 10d1fb: 0f 84 e7 00 00 00 je 10d2e8 10d201: 83 f8 02 cmp $0x2,%eax 10d204: 0f 84 c2 00 00 00 je 10d2cc 10d20a: 85 c0 test %eax,%eax 10d20c: 0f 85 aa 00 00 00 jne 10d2bc 10d212: 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 ) ) 10d219: 83 ec 0c sub $0xc,%esp 10d21c: ff 73 08 pushl 0x8(%ebx) 10d21f: e8 2c 03 00 00 call 10d550 <_POSIX_Priority_Is_valid> 10d224: 83 c4 10 add $0x10,%esp 10d227: 84 c0 test %al,%al 10d229: 0f 84 8d 00 00 00 je 10d2bc #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 10d22f: 83 7b 10 03 cmpl $0x3,0x10(%ebx) 10d233: 0f 87 83 00 00 00 ja 10d2bc 10d239: a1 58 b4 12 00 mov 0x12b458,%eax 10d23e: 40 inc %eax 10d23f: a3 58 b4 12 00 mov %eax,0x12b458 * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 10d244: 83 ec 0c sub $0xc,%esp 10d247: 68 60 b8 12 00 push $0x12b860 10d24c: e8 37 25 00 00 call 10f788 <_Objects_Allocate> 10d251: 89 c7 mov %eax,%edi */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10d253: 83 c4 10 add $0x10,%esp 10d256: 85 c0 test %eax,%eax 10d258: 0f 84 96 00 00 00 je 10d2f4 _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 10d25e: 8b 43 04 mov 0x4(%ebx),%eax 10d261: 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; 10d264: 31 c0 xor %eax,%eax 10d266: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10d26a: 0f 94 c0 sete %al 10d26d: 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; 10d270: c6 47 58 01 movb $0x1,0x58(%edi) the_mutex_attr->priority_ceiling = 10d274: 0f b6 05 5c 72 12 00 movzbl 0x12725c,%eax 10d27b: 2b 43 08 sub 0x8(%ebx),%eax 10d27e: 89 47 60 mov %eax,0x60(%edi) _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10d281: 8b 45 e4 mov -0x1c(%ebp),%eax 10d284: 89 47 5c mov %eax,0x5c(%edi) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10d287: 50 push %eax 10d288: 6a 01 push $0x1 10d28a: 8d 47 54 lea 0x54(%edi),%eax 10d28d: 50 push %eax 10d28e: 8d 47 14 lea 0x14(%edi),%eax 10d291: 50 push %eax 10d292: e8 9d 1c 00 00 call 10ef34 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d297: 8b 47 08 mov 0x8(%edi),%eax 10d29a: 0f b7 c8 movzwl %ax,%ecx 10d29d: 8b 15 7c b8 12 00 mov 0x12b87c,%edx 10d2a3: 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; 10d2a6: 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; 10d2ad: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10d2af: e8 f8 31 00 00 call 1104ac <_Thread_Enable_dispatch> 10d2b4: 31 c0 xor %eax,%eax return 0; 10d2b6: 83 c4 10 add $0x10,%esp 10d2b9: eb 06 jmp 10d2c1 10d2bb: 90 nop <== NOT EXECUTED 10d2bc: b8 16 00 00 00 mov $0x16,%eax } 10d2c1: 8d 65 f4 lea -0xc(%ebp),%esp 10d2c4: 5b pop %ebx 10d2c5: 5e pop %esi 10d2c6: 5f pop %edi 10d2c7: c9 leave 10d2c8: c3 ret 10d2c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d2cc: 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; 10d2d3: e9 41 ff ff ff jmp 10d219 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; 10d2d8: bb e0 b8 12 00 mov $0x12b8e0,%ebx 10d2dd: e9 ed fe ff ff jmp 10d1cf 10d2e2: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d2e4: b0 58 mov $0x58,%al 10d2e6: eb d9 jmp 10d2c1 return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d2e8: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 10d2ef: e9 25 ff ff ff jmp 10d219 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 10d2f4: e8 b3 31 00 00 call 1104ac <_Thread_Enable_dispatch> 10d2f9: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10d2fe: eb c1 jmp 10d2c1 0010d378 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10d378: 55 push %ebp 10d379: 89 e5 mov %esp,%ebp 10d37b: 57 push %edi 10d37c: 56 push %esi 10d37d: 53 push %ebx 10d37e: 83 ec 2c sub $0x2c,%esp 10d381: 8b 7d 08 mov 0x8(%ebp),%edi 10d384: 8b 75 0c mov 0xc(%ebp),%esi 10d387: 8b 5d 10 mov 0x10(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 10d38a: 85 db test %ebx,%ebx 10d38c: 74 10 je 10d39e return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10d38e: 83 ec 0c sub $0xc,%esp 10d391: 56 push %esi 10d392: e8 b9 01 00 00 call 10d550 <_POSIX_Priority_Is_valid> 10d397: 83 c4 10 add $0x10,%esp 10d39a: 84 c0 test %al,%al 10d39c: 75 0e jne 10d3ac the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); return 0; 10d39e: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d3a3: 8d 65 f4 lea -0xc(%ebp),%esp 10d3a6: 5b pop %ebx 10d3a7: 5e pop %esi 10d3a8: 5f pop %edi 10d3a9: c9 leave 10d3aa: c3 ret 10d3ab: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d3ac: a0 5c 72 12 00 mov 0x12725c,%al 10d3b1: 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 ); 10d3b4: 83 ec 0c sub $0xc,%esp 10d3b7: 57 push %edi 10d3b8: e8 43 ff ff ff call 10d300 * 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 ); 10d3bd: 58 pop %eax 10d3be: 5a pop %edx 10d3bf: 8d 45 e4 lea -0x1c(%ebp),%eax 10d3c2: 50 push %eax 10d3c3: 57 push %edi 10d3c4: e8 4f fd ff ff call 10d118 <_POSIX_Mutex_Get> switch ( location ) { 10d3c9: 83 c4 10 add $0x10,%esp 10d3cc: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d3cf: 85 c9 test %ecx,%ecx 10d3d1: 75 cb jne 10d39e case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 10d3d3: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx 10d3da: 2b 50 60 sub 0x60(%eax),%edx 10d3dd: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 10d3df: 0f b6 55 d7 movzbl -0x29(%ebp),%edx 10d3e3: 29 f2 sub %esi,%edx 10d3e5: 89 50 60 mov %edx,0x60(%eax) /* * We are required to unlock the mutex before we return. */ _CORE_mutex_Surrender( 10d3e8: 52 push %edx 10d3e9: 6a 00 push $0x0 10d3eb: ff 70 08 pushl 0x8(%eax) 10d3ee: 83 c0 14 add $0x14,%eax 10d3f1: 50 push %eax 10d3f2: e8 d5 1c 00 00 call 10f0cc <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d3f7: e8 b0 30 00 00 call 1104ac <_Thread_Enable_dispatch> 10d3fc: 31 c0 xor %eax,%eax return 0; 10d3fe: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d401: 8d 65 f4 lea -0xc(%ebp),%esp 10d404: 5b pop %ebx 10d405: 5e pop %esi 10d406: 5f pop %edi 10d407: c9 leave 10d408: c3 ret 0010d40c : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10d40c: 55 push %ebp 10d40d: 89 e5 mov %esp,%ebp 10d40f: 53 push %ebx 10d410: 83 ec 1c sub $0x1c,%esp 10d413: 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 ); 10d416: 8d 45 f4 lea -0xc(%ebp),%eax 10d419: 50 push %eax 10d41a: ff 75 0c pushl 0xc(%ebp) 10d41d: e8 a6 00 00 00 call 10d4c8 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10d422: 83 c4 10 add $0x10,%esp 10d425: 83 f8 03 cmp $0x3,%eax 10d428: 74 16 je 10d440 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10d42a: 50 push %eax 10d42b: ff 75 f4 pushl -0xc(%ebp) 10d42e: 6a 00 push $0x0 10d430: 53 push %ebx 10d431: e8 de fe ff ff call 10d314 <_POSIX_Mutex_Lock_support> 10d436: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10d439: 8b 5d fc mov -0x4(%ebp),%ebx 10d43c: c9 leave 10d43d: c3 ret 10d43e: 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 ); 10d440: 52 push %edx 10d441: ff 75 f4 pushl -0xc(%ebp) 10d444: 6a 01 push $0x1 10d446: 53 push %ebx 10d447: e8 c8 fe ff ff call 10d314 <_POSIX_Mutex_Lock_support> 10d44c: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10d44f: 8b 5d fc mov -0x4(%ebp),%ebx 10d452: c9 leave 10d453: c3 ret 0010d478 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 10d478: 55 push %ebp 10d479: 89 e5 mov %esp,%ebp 10d47b: 53 push %ebx 10d47c: 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 ); 10d47f: 8d 45 f4 lea -0xc(%ebp),%eax 10d482: 50 push %eax 10d483: ff 75 08 pushl 0x8(%ebp) 10d486: e8 8d fc ff ff call 10d118 <_POSIX_Mutex_Get> switch ( location ) { 10d48b: 83 c4 10 add $0x10,%esp 10d48e: 8b 4d f4 mov -0xc(%ebp),%ecx 10d491: 85 c9 test %ecx,%ecx 10d493: 75 27 jne 10d4bc case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 10d495: 52 push %edx 10d496: 6a 00 push $0x0 10d498: ff 70 08 pushl 0x8(%eax) 10d49b: 83 c0 14 add $0x14,%eax 10d49e: 50 push %eax 10d49f: e8 28 1c 00 00 call 10f0cc <_CORE_mutex_Surrender> 10d4a4: 89 c3 mov %eax,%ebx &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d4a6: e8 01 30 00 00 call 1104ac <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 10d4ab: 89 1c 24 mov %ebx,(%esp) 10d4ae: e8 a1 ff ff ff call 10d454 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d4b3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d4b6: 8b 5d fc mov -0x4(%ebp),%ebx 10d4b9: c9 leave 10d4ba: c3 ret 10d4bb: 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 ) { 10d4bc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d4c1: 8b 5d fc mov -0x4(%ebp),%ebx 10d4c4: c9 leave 10d4c5: c3 ret 0010cef8 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10cef8: 55 push %ebp 10cef9: 89 e5 mov %esp,%ebp 10cefb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10cefe: 85 c0 test %eax,%eax 10cf00: 74 12 je 10cf14 10cf02: 8b 10 mov (%eax),%edx 10cf04: 85 d2 test %edx,%edx 10cf06: 74 0c je 10cf14 return EINVAL; attr->is_initialized = false; 10cf08: c7 00 00 00 00 00 movl $0x0,(%eax) 10cf0e: 31 c0 xor %eax,%eax return 0; } 10cf10: c9 leave 10cf11: c3 ret 10cf12: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 10cf14: b8 16 00 00 00 mov $0x16,%eax } 10cf19: c9 leave 10cf1a: c3 ret 0010b140 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 10b140: 55 push %ebp 10b141: 89 e5 mov %esp,%ebp 10b143: 8b 45 08 mov 0x8(%ebp),%eax 10b146: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b149: 85 c0 test %eax,%eax 10b14b: 74 13 je 10b160 return EINVAL; if ( !attr->is_initialized ) 10b14d: 8b 08 mov (%eax),%ecx 10b14f: 85 c9 test %ecx,%ecx 10b151: 74 0d je 10b160 return EINVAL; if ( !type ) 10b153: 85 d2 test %edx,%edx 10b155: 74 09 je 10b160 <== ALWAYS TAKEN return EINVAL; *type = attr->type; 10b157: 8b 40 10 mov 0x10(%eax),%eax 10b15a: 89 02 mov %eax,(%edx) 10b15c: 31 c0 xor %eax,%eax return 0; } 10b15e: c9 leave 10b15f: c3 ret if ( !type ) return EINVAL; *type = attr->type; return 0; 10b160: b8 16 00 00 00 mov $0x16,%eax } 10b165: c9 leave 10b166: c3 ret 0010cfbc : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10cfbc: 55 push %ebp 10cfbd: 89 e5 mov %esp,%ebp 10cfbf: 56 push %esi 10cfc0: 53 push %ebx 10cfc1: 8b 5d 08 mov 0x8(%ebp),%ebx 10cfc4: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized ) 10cfc7: 85 db test %ebx,%ebx 10cfc9: 74 06 je 10cfd1 10cfcb: 8b 03 mov (%ebx),%eax 10cfcd: 85 c0 test %eax,%eax 10cfcf: 75 0f jne 10cfe0 if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; return 0; 10cfd1: b8 16 00 00 00 mov $0x16,%eax } 10cfd6: 8d 65 f8 lea -0x8(%ebp),%esp 10cfd9: 5b pop %ebx 10cfda: 5e pop %esi 10cfdb: c9 leave 10cfdc: c3 ret 10cfdd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10cfe0: 83 ec 0c sub $0xc,%esp 10cfe3: 56 push %esi 10cfe4: e8 67 05 00 00 call 10d550 <_POSIX_Priority_Is_valid> 10cfe9: 83 c4 10 add $0x10,%esp 10cfec: 84 c0 test %al,%al 10cfee: 74 e1 je 10cfd1 return EINVAL; attr->prio_ceiling = prioceiling; 10cff0: 89 73 08 mov %esi,0x8(%ebx) 10cff3: 31 c0 xor %eax,%eax return 0; } 10cff5: 8d 65 f8 lea -0x8(%ebp),%esp 10cff8: 5b pop %ebx 10cff9: 5e pop %esi 10cffa: c9 leave 10cffb: c3 ret 0010cffc : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 10cffc: 55 push %ebp 10cffd: 89 e5 mov %esp,%ebp 10cfff: 8b 45 08 mov 0x8(%ebp),%eax 10d002: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10d005: 85 c0 test %eax,%eax 10d007: 74 0b je 10d014 10d009: 8b 08 mov (%eax),%ecx 10d00b: 85 c9 test %ecx,%ecx 10d00d: 74 05 je 10d014 return EINVAL; switch ( protocol ) { 10d00f: 83 fa 02 cmp $0x2,%edx 10d012: 76 08 jbe 10d01c case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; return 0; 10d014: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10d019: c9 leave 10d01a: c3 ret 10d01b: 90 nop <== NOT EXECUTED switch ( protocol ) { case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 10d01c: 89 50 0c mov %edx,0xc(%eax) 10d01f: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10d021: c9 leave 10d022: c3 ret 0010d024 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10d024: 55 push %ebp 10d025: 89 e5 mov %esp,%ebp 10d027: 8b 45 08 mov 0x8(%ebp),%eax 10d02a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10d02d: 85 c0 test %eax,%eax 10d02f: 74 0b je 10d03c 10d031: 8b 08 mov (%eax),%ecx 10d033: 85 c9 test %ecx,%ecx 10d035: 74 05 je 10d03c return EINVAL; switch ( pshared ) { 10d037: 83 fa 01 cmp $0x1,%edx 10d03a: 76 08 jbe 10d044 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10d03c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10d041: c9 leave 10d042: c3 ret 10d043: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10d044: 89 50 04 mov %edx,0x4(%eax) 10d047: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10d049: c9 leave 10d04a: c3 ret 0010b190 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10b190: 55 push %ebp 10b191: 89 e5 mov %esp,%ebp 10b193: 8b 45 08 mov 0x8(%ebp),%eax 10b196: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b199: 85 c0 test %eax,%eax 10b19b: 74 0b je 10b1a8 10b19d: 8b 08 mov (%eax),%ecx 10b19f: 85 c9 test %ecx,%ecx 10b1a1: 74 05 je 10b1a8 <== ALWAYS TAKEN return EINVAL; switch ( type ) { 10b1a3: 83 fa 03 cmp $0x3,%edx 10b1a6: 76 08 jbe 10b1b0 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; 10b1a8: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b1ad: c9 leave 10b1ae: c3 ret 10b1af: 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; 10b1b0: 89 50 10 mov %edx,0x10(%eax) 10b1b3: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10b1b5: c9 leave 10b1b6: c3 ret 0010bce0 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10bce0: 55 push %ebp 10bce1: 89 e5 mov %esp,%ebp 10bce3: 57 push %edi 10bce4: 56 push %esi 10bce5: 53 push %ebx 10bce6: 83 ec 1c sub $0x1c,%esp 10bce9: 8b 5d 08 mov 0x8(%ebp),%ebx 10bcec: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10bcef: 85 db test %ebx,%ebx 10bcf1: 74 51 je 10bd44 10bcf3: 85 f6 test %esi,%esi 10bcf5: 74 4d je 10bd44 return EINVAL; if ( !once_control->init_executed ) { 10bcf7: 8b 7b 04 mov 0x4(%ebx),%edi 10bcfa: 85 ff test %edi,%edi 10bcfc: 74 0a je 10bd08 10bcfe: 31 c0 xor %eax,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10bd00: 8d 65 f4 lea -0xc(%ebp),%esp 10bd03: 5b pop %ebx 10bd04: 5e pop %esi 10bd05: 5f pop %edi 10bd06: c9 leave 10bd07: 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); 10bd08: 51 push %ecx 10bd09: 8d 7d e4 lea -0x1c(%ebp),%edi 10bd0c: 57 push %edi 10bd0d: 68 00 01 00 00 push $0x100 10bd12: 68 00 01 00 00 push $0x100 10bd17: e8 e0 0b 00 00 call 10c8fc if ( !once_control->init_executed ) { 10bd1c: 83 c4 10 add $0x10,%esp 10bd1f: 8b 53 04 mov 0x4(%ebx),%edx 10bd22: 85 d2 test %edx,%edx 10bd24: 74 2e je 10bd54 <== NEVER TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10bd26: 50 push %eax 10bd27: 57 push %edi 10bd28: 68 00 01 00 00 push $0x100 10bd2d: ff 75 e4 pushl -0x1c(%ebp) 10bd30: e8 c7 0b 00 00 call 10c8fc 10bd35: 31 c0 xor %eax,%eax 10bd37: 83 c4 10 add $0x10,%esp } return 0; } 10bd3a: 8d 65 f4 lea -0xc(%ebp),%esp 10bd3d: 5b pop %ebx 10bd3e: 5e pop %esi 10bd3f: 5f pop %edi 10bd40: c9 leave 10bd41: c3 ret 10bd42: 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); 10bd44: b8 16 00 00 00 mov $0x16,%eax } return 0; } 10bd49: 8d 65 f4 lea -0xc(%ebp),%esp 10bd4c: 5b pop %ebx 10bd4d: 5e pop %esi 10bd4e: 5f pop %edi 10bd4f: c9 leave 10bd50: c3 ret 10bd51: 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; 10bd54: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10bd5a: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10bd61: ff d6 call *%esi 10bd63: eb c1 jmp 10bd26 0010c17c : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10c17c: 55 push %ebp 10c17d: 89 e5 mov %esp,%ebp 10c17f: 53 push %ebx 10c180: 83 ec 14 sub $0x14,%esp 10c183: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10c186: 85 c0 test %eax,%eax 10c188: 74 42 je 10c1cc RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c18a: 53 push %ebx 10c18b: 8d 55 f4 lea -0xc(%ebp),%edx 10c18e: 52 push %edx 10c18f: ff 30 pushl (%eax) 10c191: 68 c0 a3 12 00 push $0x12a3c0 10c196: e8 65 2b 00 00 call 10ed00 <_Objects_Get> 10c19b: 89 c3 mov %eax,%ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c19d: 83 c4 10 add $0x10,%esp 10c1a0: 8b 4d f4 mov -0xc(%ebp),%ecx 10c1a3: 85 c9 test %ecx,%ecx 10c1a5: 75 25 jne 10c1cc 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 ) { 10c1a7: 83 ec 0c sub $0xc,%esp 10c1aa: 8d 40 10 lea 0x10(%eax),%eax 10c1ad: 50 push %eax 10c1ae: e8 19 3c 00 00 call 10fdcc <_Thread_queue_First> 10c1b3: 83 c4 10 add $0x10,%esp 10c1b6: 85 c0 test %eax,%eax 10c1b8: 74 1e je 10c1d8 _Thread_Enable_dispatch(); 10c1ba: e8 b5 33 00 00 call 10f574 <_Thread_Enable_dispatch> 10c1bf: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c1c4: 8b 5d fc mov -0x4(%ebp),%ebx 10c1c7: c9 leave 10c1c8: c3 ret 10c1c9: 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; 10c1cc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c1d1: 8b 5d fc mov -0x4(%ebp),%ebx 10c1d4: c9 leave 10c1d5: c3 ret 10c1d6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10c1d8: 83 ec 08 sub $0x8,%esp 10c1db: 53 push %ebx 10c1dc: 68 c0 a3 12 00 push $0x12a3c0 10c1e1: e8 e6 26 00 00 call 10e8cc <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10c1e6: 58 pop %eax 10c1e7: 5a pop %edx 10c1e8: 53 push %ebx 10c1e9: 68 c0 a3 12 00 push $0x12a3c0 10c1ee: e8 dd 29 00 00 call 10ebd0 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10c1f3: e8 7c 33 00 00 call 10f574 <_Thread_Enable_dispatch> 10c1f8: 31 c0 xor %eax,%eax return 0; 10c1fa: 83 c4 10 add $0x10,%esp 10c1fd: eb d2 jmp 10c1d1 0010c200 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10c200: 55 push %ebp 10c201: 89 e5 mov %esp,%ebp 10c203: 56 push %esi 10c204: 53 push %ebx 10c205: 83 ec 20 sub $0x20,%esp 10c208: 8b 5d 08 mov 0x8(%ebp),%ebx 10c20b: 8b 75 0c mov 0xc(%ebp),%esi const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10c20e: 85 db test %ebx,%ebx 10c210: 74 15 je 10c227 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10c212: 85 f6 test %esi,%esi 10c214: 0f 84 86 00 00 00 je 10c2a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10c21a: 8b 16 mov (%esi),%edx 10c21c: 85 d2 test %edx,%edx 10c21e: 74 07 je 10c227 <== ALWAYS TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10c220: 8b 46 04 mov 0x4(%esi),%eax 10c223: 85 c0 test %eax,%eax 10c225: 74 0d je 10c234 <== NEVER TAKEN ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 10c227: b8 16 00 00 00 mov $0x16,%eax } 10c22c: 8d 65 f8 lea -0x8(%ebp),%esp 10c22f: 5b pop %ebx 10c230: 5e pop %esi 10c231: c9 leave 10c232: c3 ret 10c233: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c234: a1 38 a1 12 00 mov 0x12a138,%eax 10c239: 40 inc %eax 10c23a: a3 38 a1 12 00 mov %eax,0x12a138 * 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 *) 10c23f: 83 ec 0c sub $0xc,%esp 10c242: 68 c0 a3 12 00 push $0x12a3c0 10c247: e8 04 26 00 00 call 10e850 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10c24c: 83 c4 10 add $0x10,%esp 10c24f: 85 c0 test %eax,%eax 10c251: 74 41 je 10c294 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10c253: 83 ec 08 sub $0x8,%esp 10c256: 8d 55 f4 lea -0xc(%ebp),%edx 10c259: 52 push %edx 10c25a: 8d 50 10 lea 0x10(%eax),%edx 10c25d: 52 push %edx 10c25e: 89 45 e4 mov %eax,-0x1c(%ebp) 10c261: e8 06 1e 00 00 call 10e06c <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c266: 8b 45 e4 mov -0x1c(%ebp),%eax 10c269: 8b 50 08 mov 0x8(%eax),%edx 10c26c: 0f b7 f2 movzwl %dx,%esi 10c26f: 8b 0d dc a3 12 00 mov 0x12a3dc,%ecx 10c275: 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; 10c278: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10c27f: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10c281: e8 ee 32 00 00 call 10f574 <_Thread_Enable_dispatch> 10c286: 31 c0 xor %eax,%eax return 0; 10c288: 83 c4 10 add $0x10,%esp } 10c28b: 8d 65 f8 lea -0x8(%ebp),%esp 10c28e: 5b pop %ebx 10c28f: 5e pop %esi 10c290: c9 leave 10c291: c3 ret 10c292: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 10c294: e8 db 32 00 00 call 10f574 <_Thread_Enable_dispatch> 10c299: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10c29e: eb 8c jmp 10c22c * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10c2a0: 83 ec 0c sub $0xc,%esp 10c2a3: 8d 75 ec lea -0x14(%ebp),%esi 10c2a6: 56 push %esi 10c2a7: e8 74 09 00 00 call 10cc20 10c2ac: 83 c4 10 add $0x10,%esp 10c2af: e9 66 ff ff ff jmp 10c21a 0010c2b4 : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 10c2b4: 55 push %ebp 10c2b5: 89 e5 mov %esp,%ebp 10c2b7: 53 push %ebx 10c2b8: 83 ec 14 sub $0x14,%esp 10c2bb: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c2be: 85 db test %ebx,%ebx 10c2c0: 74 1b je 10c2dd RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c2c2: 51 push %ecx 10c2c3: 8d 45 f4 lea -0xc(%ebp),%eax 10c2c6: 50 push %eax 10c2c7: ff 33 pushl (%ebx) 10c2c9: 68 c0 a3 12 00 push $0x12a3c0 10c2ce: e8 2d 2a 00 00 call 10ed00 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c2d3: 83 c4 10 add $0x10,%esp 10c2d6: 8b 55 f4 mov -0xc(%ebp),%edx 10c2d9: 85 d2 test %edx,%edx 10c2db: 74 0b je 10c2e8 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c2dd: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c2e2: 8b 5d fc mov -0x4(%ebp),%ebx 10c2e5: c9 leave 10c2e6: c3 ret 10c2e7: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c2e8: 83 ec 0c sub $0xc,%esp 10c2eb: 6a 00 push $0x0 10c2ed: 6a 00 push $0x0 10c2ef: 6a 01 push $0x1 10c2f1: ff 33 pushl (%ebx) 10c2f3: 83 c0 10 add $0x10,%eax 10c2f6: 50 push %eax 10c2f7: e8 a4 1d 00 00 call 10e0a0 <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c2fc: 83 c4 20 add $0x20,%esp 10c2ff: e8 70 32 00 00 call 10f574 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c304: 83 ec 0c sub $0xc,%esp 10c307: a1 f8 a1 12 00 mov 0x12a1f8,%eax 10c30c: ff 70 34 pushl 0x34(%eax) 10c30f: e8 70 01 00 00 call 10c484 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c314: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c317: 8b 5d fc mov -0x4(%ebp),%ebx 10c31a: c9 leave 10c31b: c3 ret 0010c31c : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c31c: 55 push %ebp 10c31d: 89 e5 mov %esp,%ebp 10c31f: 56 push %esi 10c320: 53 push %ebx 10c321: 83 ec 20 sub $0x20,%esp 10c324: 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 ) 10c327: 85 db test %ebx,%ebx 10c329: 74 7d je 10c3a8 * * 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 ); 10c32b: 83 ec 08 sub $0x8,%esp 10c32e: 8d 45 f0 lea -0x10(%ebp),%eax 10c331: 50 push %eax 10c332: ff 75 0c pushl 0xc(%ebp) 10c335: e8 42 5f 00 00 call 11227c <_POSIX_Absolute_timeout_to_ticks> 10c33a: 89 c6 mov %eax,%esi 10c33c: 83 c4 0c add $0xc,%esp 10c33f: 8d 45 f4 lea -0xc(%ebp),%eax 10c342: 50 push %eax 10c343: ff 33 pushl (%ebx) 10c345: 68 c0 a3 12 00 push $0x12a3c0 10c34a: e8 b1 29 00 00 call 10ed00 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c34f: 83 c4 10 add $0x10,%esp 10c352: 8b 55 f4 mov -0xc(%ebp),%edx 10c355: 85 d2 test %edx,%edx 10c357: 75 4f jne 10c3a8 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, 10c359: 83 fe 03 cmp $0x3,%esi 10c35c: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c35f: 83 ec 0c sub $0xc,%esp 10c362: 6a 00 push $0x0 10c364: ff 75 f0 pushl -0x10(%ebp) 10c367: 0f b6 ca movzbl %dl,%ecx 10c36a: 51 push %ecx 10c36b: ff 33 pushl (%ebx) 10c36d: 83 c0 10 add $0x10,%eax 10c370: 50 push %eax 10c371: 88 55 e4 mov %dl,-0x1c(%ebp) 10c374: e8 27 1d 00 00 call 10e0a0 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c379: 83 c4 20 add $0x20,%esp 10c37c: e8 f3 31 00 00 call 10f574 <_Thread_Enable_dispatch> if ( !do_wait ) { 10c381: 8a 55 e4 mov -0x1c(%ebp),%dl 10c384: 84 d2 test %dl,%dl 10c386: 75 3c jne 10c3c4 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10c388: a1 f8 a1 12 00 mov 0x12a1f8,%eax 10c38d: 8b 40 34 mov 0x34(%eax),%eax 10c390: 83 f8 02 cmp $0x2,%eax 10c393: 74 1f je 10c3b4 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c395: 83 ec 0c sub $0xc,%esp 10c398: 50 push %eax 10c399: e8 e6 00 00 00 call 10c484 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c39e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c3a1: 8d 65 f8 lea -0x8(%ebp),%esp 10c3a4: 5b pop %ebx 10c3a5: 5e pop %esi 10c3a6: c9 leave 10c3a7: c3 ret break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c3a8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c3ad: 8d 65 f8 lea -0x8(%ebp),%esp 10c3b0: 5b pop %ebx 10c3b1: 5e pop %esi 10c3b2: c9 leave 10c3b3: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 10c3b4: 85 f6 test %esi,%esi 10c3b6: 74 f0 je 10c3a8 <== ALWAYS TAKEN 10c3b8: 83 fe 02 cmp $0x2,%esi 10c3bb: 77 d8 ja 10c395 <== ALWAYS TAKEN 10c3bd: b0 74 mov $0x74,%al 10c3bf: eb ec jmp 10c3ad 10c3c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c3c4: a1 f8 a1 12 00 mov 0x12a1f8,%eax 10c3c9: 8b 40 34 mov 0x34(%eax),%eax 10c3cc: eb c7 jmp 10c395 0010c3d0 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c3d0: 55 push %ebp 10c3d1: 89 e5 mov %esp,%ebp 10c3d3: 56 push %esi 10c3d4: 53 push %ebx 10c3d5: 83 ec 20 sub $0x20,%esp 10c3d8: 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 ) 10c3db: 85 db test %ebx,%ebx 10c3dd: 74 7d je 10c45c * * 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 ); 10c3df: 83 ec 08 sub $0x8,%esp 10c3e2: 8d 45 f0 lea -0x10(%ebp),%eax 10c3e5: 50 push %eax 10c3e6: ff 75 0c pushl 0xc(%ebp) 10c3e9: e8 8e 5e 00 00 call 11227c <_POSIX_Absolute_timeout_to_ticks> 10c3ee: 89 c6 mov %eax,%esi 10c3f0: 83 c4 0c add $0xc,%esp 10c3f3: 8d 45 f4 lea -0xc(%ebp),%eax 10c3f6: 50 push %eax 10c3f7: ff 33 pushl (%ebx) 10c3f9: 68 c0 a3 12 00 push $0x12a3c0 10c3fe: e8 fd 28 00 00 call 10ed00 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c403: 83 c4 10 add $0x10,%esp 10c406: 8b 55 f4 mov -0xc(%ebp),%edx 10c409: 85 d2 test %edx,%edx 10c40b: 75 4f jne 10c45c (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, 10c40d: 83 fe 03 cmp $0x3,%esi 10c410: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c413: 83 ec 0c sub $0xc,%esp 10c416: 6a 00 push $0x0 10c418: ff 75 f0 pushl -0x10(%ebp) 10c41b: 0f b6 ca movzbl %dl,%ecx 10c41e: 51 push %ecx 10c41f: ff 33 pushl (%ebx) 10c421: 83 c0 10 add $0x10,%eax 10c424: 50 push %eax 10c425: 88 55 e4 mov %dl,-0x1c(%ebp) 10c428: e8 3b 1d 00 00 call 10e168 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c42d: 83 c4 20 add $0x20,%esp 10c430: e8 3f 31 00 00 call 10f574 <_Thread_Enable_dispatch> if ( !do_wait && 10c435: 8a 55 e4 mov -0x1c(%ebp),%dl 10c438: 84 d2 test %dl,%dl 10c43a: 75 3c jne 10c478 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10c43c: a1 f8 a1 12 00 mov 0x12a1f8,%eax 10c441: 8b 40 34 mov 0x34(%eax),%eax ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10c444: 83 f8 02 cmp $0x2,%eax 10c447: 74 1f je 10c468 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c449: 83 ec 0c sub $0xc,%esp 10c44c: 50 push %eax 10c44d: e8 32 00 00 00 call 10c484 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c452: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c455: 8d 65 f8 lea -0x8(%ebp),%esp 10c458: 5b pop %ebx 10c459: 5e pop %esi 10c45a: c9 leave 10c45b: c3 ret case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c45c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c461: 8d 65 f8 lea -0x8(%ebp),%esp 10c464: 5b pop %ebx 10c465: 5e pop %esi 10c466: c9 leave 10c467: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10c468: 85 f6 test %esi,%esi 10c46a: 74 f0 je 10c45c <== ALWAYS TAKEN 10c46c: 83 fe 02 cmp $0x2,%esi 10c46f: 77 d8 ja 10c449 <== ALWAYS TAKEN 10c471: b0 74 mov $0x74,%al 10c473: eb ec jmp 10c461 10c475: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c478: a1 f8 a1 12 00 mov 0x12a1f8,%eax 10c47d: 8b 40 34 mov 0x34(%eax),%eax 10c480: eb c7 jmp 10c449 0010c494 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 10c494: 55 push %ebp 10c495: 89 e5 mov %esp,%ebp 10c497: 53 push %ebx 10c498: 83 ec 14 sub $0x14,%esp 10c49b: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c49e: 85 db test %ebx,%ebx 10c4a0: 74 1b je 10c4bd 10c4a2: 51 push %ecx 10c4a3: 8d 45 f4 lea -0xc(%ebp),%eax 10c4a6: 50 push %eax 10c4a7: ff 33 pushl (%ebx) 10c4a9: 68 c0 a3 12 00 push $0x12a3c0 10c4ae: e8 4d 28 00 00 call 10ed00 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c4b3: 83 c4 10 add $0x10,%esp 10c4b6: 8b 55 f4 mov -0xc(%ebp),%edx 10c4b9: 85 d2 test %edx,%edx 10c4bb: 74 0b je 10c4c8 NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c4bd: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c4c2: 8b 5d fc mov -0x4(%ebp),%ebx 10c4c5: c9 leave 10c4c6: c3 ret 10c4c7: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c4c8: 83 ec 0c sub $0xc,%esp 10c4cb: 6a 00 push $0x0 10c4cd: 6a 00 push $0x0 10c4cf: 6a 00 push $0x0 10c4d1: ff 33 pushl (%ebx) 10c4d3: 83 c0 10 add $0x10,%eax 10c4d6: 50 push %eax 10c4d7: e8 c4 1b 00 00 call 10e0a0 <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 10c4dc: 83 c4 20 add $0x20,%esp 10c4df: e8 90 30 00 00 call 10f574 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c4e4: 83 ec 0c sub $0xc,%esp 10c4e7: a1 f8 a1 12 00 mov 0x12a1f8,%eax 10c4ec: ff 70 34 pushl 0x34(%eax) 10c4ef: e8 90 ff ff ff call 10c484 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c4f4: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c4f7: 8b 5d fc mov -0x4(%ebp),%ebx 10c4fa: c9 leave 10c4fb: c3 ret 0010c4fc : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 10c4fc: 55 push %ebp 10c4fd: 89 e5 mov %esp,%ebp 10c4ff: 53 push %ebx 10c500: 83 ec 14 sub $0x14,%esp 10c503: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c506: 85 db test %ebx,%ebx 10c508: 74 1b je 10c525 10c50a: 51 push %ecx 10c50b: 8d 45 f4 lea -0xc(%ebp),%eax 10c50e: 50 push %eax 10c50f: ff 33 pushl (%ebx) 10c511: 68 c0 a3 12 00 push $0x12a3c0 10c516: e8 e5 27 00 00 call 10ed00 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c51b: 83 c4 10 add $0x10,%esp 10c51e: 8b 55 f4 mov -0xc(%ebp),%edx 10c521: 85 d2 test %edx,%edx 10c523: 74 0b je 10c530 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c525: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c52a: 8b 5d fc mov -0x4(%ebp),%ebx 10c52d: c9 leave 10c52e: c3 ret 10c52f: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c530: 83 ec 0c sub $0xc,%esp 10c533: 6a 00 push $0x0 10c535: 6a 00 push $0x0 10c537: 6a 00 push $0x0 10c539: ff 33 pushl (%ebx) 10c53b: 83 c0 10 add $0x10,%eax 10c53e: 50 push %eax 10c53f: e8 24 1c 00 00 call 10e168 <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 10c544: 83 c4 20 add $0x20,%esp 10c547: e8 28 30 00 00 call 10f574 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c54c: 83 ec 0c sub $0xc,%esp 10c54f: a1 f8 a1 12 00 mov 0x12a1f8,%eax 10c554: ff 70 34 pushl 0x34(%eax) 10c557: e8 28 ff ff ff call 10c484 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c55c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c55f: 8b 5d fc mov -0x4(%ebp),%ebx 10c562: c9 leave 10c563: c3 ret 0010c564 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 10c564: 55 push %ebp 10c565: 89 e5 mov %esp,%ebp 10c567: 53 push %ebx 10c568: 83 ec 14 sub $0x14,%esp 10c56b: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 10c56e: 85 c0 test %eax,%eax 10c570: 74 1b je 10c58d 10c572: 51 push %ecx 10c573: 8d 55 f4 lea -0xc(%ebp),%edx 10c576: 52 push %edx 10c577: ff 30 pushl (%eax) 10c579: 68 c0 a3 12 00 push $0x12a3c0 10c57e: e8 7d 27 00 00 call 10ed00 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c583: 83 c4 10 add $0x10,%esp 10c586: 8b 55 f4 mov -0xc(%ebp),%edx 10c589: 85 d2 test %edx,%edx 10c58b: 74 0b je 10c598 case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c58d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c592: 8b 5d fc mov -0x4(%ebp),%ebx 10c595: c9 leave 10c596: c3 ret 10c597: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 10c598: 83 ec 0c sub $0xc,%esp 10c59b: 83 c0 10 add $0x10,%eax 10c59e: 50 push %eax 10c59f: e8 50 1c 00 00 call 10e1f4 <_CORE_RWLock_Release> 10c5a4: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10c5a6: e8 c9 2f 00 00 call 10f574 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c5ab: 89 1c 24 mov %ebx,(%esp) 10c5ae: e8 d1 fe ff ff call 10c484 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c5b3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c5b6: 8b 5d fc mov -0x4(%ebp),%ebx 10c5b9: c9 leave 10c5ba: c3 ret 0010c5bc : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 10c5bc: 55 push %ebp 10c5bd: 89 e5 mov %esp,%ebp 10c5bf: 53 push %ebx 10c5c0: 83 ec 14 sub $0x14,%esp 10c5c3: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c5c6: 85 db test %ebx,%ebx 10c5c8: 74 1b je 10c5e5 10c5ca: 51 push %ecx 10c5cb: 8d 45 f4 lea -0xc(%ebp),%eax 10c5ce: 50 push %eax 10c5cf: ff 33 pushl (%ebx) 10c5d1: 68 c0 a3 12 00 push $0x12a3c0 10c5d6: e8 25 27 00 00 call 10ed00 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c5db: 83 c4 10 add $0x10,%esp 10c5de: 8b 55 f4 mov -0xc(%ebp),%edx 10c5e1: 85 d2 test %edx,%edx 10c5e3: 74 0b je 10c5f0 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c5e5: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c5ea: 8b 5d fc mov -0x4(%ebp),%ebx 10c5ed: c9 leave 10c5ee: c3 ret 10c5ef: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c5f0: 83 ec 0c sub $0xc,%esp 10c5f3: 6a 00 push $0x0 10c5f5: 6a 00 push $0x0 10c5f7: 6a 01 push $0x1 10c5f9: ff 33 pushl (%ebx) 10c5fb: 83 c0 10 add $0x10,%eax 10c5fe: 50 push %eax 10c5ff: e8 64 1b 00 00 call 10e168 <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c604: 83 c4 20 add $0x20,%esp 10c607: e8 68 2f 00 00 call 10f574 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c60c: 83 ec 0c sub $0xc,%esp 10c60f: a1 f8 a1 12 00 mov 0x12a1f8,%eax 10c614: ff 70 34 pushl 0x34(%eax) 10c617: e8 68 fe ff ff call 10c484 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c61c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c61f: 8b 5d fc mov -0x4(%ebp),%ebx 10c622: c9 leave 10c623: c3 ret 0010cbd8 : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10cbd8: 55 push %ebp 10cbd9: 89 e5 mov %esp,%ebp 10cbdb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10cbde: 85 c0 test %eax,%eax 10cbe0: 74 12 je 10cbf4 10cbe2: 8b 10 mov (%eax),%edx 10cbe4: 85 d2 test %edx,%edx 10cbe6: 74 0c je 10cbf4 return EINVAL; attr->is_initialized = false; 10cbe8: c7 00 00 00 00 00 movl $0x0,(%eax) 10cbee: 31 c0 xor %eax,%eax return 0; } 10cbf0: c9 leave 10cbf1: c3 ret 10cbf2: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10cbf4: b8 16 00 00 00 mov $0x16,%eax } 10cbf9: c9 leave 10cbfa: c3 ret 0010cc20 : */ int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { 10cc20: 55 push %ebp 10cc21: 89 e5 mov %esp,%ebp 10cc23: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10cc26: 85 c0 test %eax,%eax 10cc28: 74 12 je 10cc3c return EINVAL; attr->is_initialized = true; 10cc2a: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10cc30: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10cc37: 31 c0 xor %eax,%eax return 0; } 10cc39: c9 leave 10cc3a: c3 ret 10cc3b: 90 nop <== NOT EXECUTED int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { if ( !attr ) 10cc3c: b0 16 mov $0x16,%al return EINVAL; attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10cc3e: c9 leave 10cc3f: c3 ret 0010cc40 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10cc40: 55 push %ebp 10cc41: 89 e5 mov %esp,%ebp 10cc43: 8b 45 08 mov 0x8(%ebp),%eax 10cc46: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10cc49: 85 c0 test %eax,%eax 10cc4b: 74 0b je 10cc58 return EINVAL; if ( !attr->is_initialized ) 10cc4d: 8b 08 mov (%eax),%ecx 10cc4f: 85 c9 test %ecx,%ecx 10cc51: 74 05 je 10cc58 return EINVAL; switch ( pshared ) { 10cc53: 83 fa 01 cmp $0x1,%edx 10cc56: 76 08 jbe 10cc60 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10cc58: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10cc5d: c9 leave 10cc5e: c3 ret 10cc5f: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10cc60: 89 50 04 mov %edx,0x4(%eax) 10cc63: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10cc65: c9 leave 10cc66: c3 ret 0010b170 : int pthread_setcancelstate( int state, int *oldstate ) { 10b170: 55 push %ebp 10b171: 89 e5 mov %esp,%ebp 10b173: 53 push %ebx 10b174: 83 ec 04 sub $0x4,%esp 10b177: 8b 4d 08 mov 0x8(%ebp),%ecx 10b17a: 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() ) 10b17d: a1 d4 88 12 00 mov 0x1288d4,%eax 10b182: 85 c0 test %eax,%eax 10b184: 75 16 jne 10b19c return EPROTO; if ( !oldstate ) 10b186: 85 d2 test %edx,%edx 10b188: 74 05 je 10b18f return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 10b18a: 83 f9 01 cmp $0x1,%ecx 10b18d: 76 19 jbe 10b1a8 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b18f: b8 16 00 00 00 mov $0x16,%eax } 10b194: 8b 5d fc mov -0x4(%ebp),%ebx 10b197: c9 leave 10b198: c3 ret 10b199: 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() ) 10b19c: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b1a1: 8b 5d fc mov -0x4(%ebp),%ebx 10b1a4: c9 leave 10b1a5: c3 ret 10b1a6: 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 ]; 10b1a8: a1 f8 88 12 00 mov 0x1288f8,%eax 10b1ad: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b1b3: 8b 1d 38 88 12 00 mov 0x128838,%ebx 10b1b9: 43 inc %ebx 10b1ba: 89 1d 38 88 12 00 mov %ebx,0x128838 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10b1c0: 8b 98 d4 00 00 00 mov 0xd4(%eax),%ebx 10b1c6: 89 1a mov %ebx,(%edx) thread_support->cancelability_state = state; 10b1c8: 89 88 d4 00 00 00 mov %ecx,0xd4(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b1ce: 83 ec 0c sub $0xc,%esp 10b1d1: ff 35 f8 88 12 00 pushl 0x1288f8 10b1d7: e8 90 50 00 00 call 11026c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b1dc: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b1de: 83 c4 10 add $0x10,%esp } 10b1e1: 8b 5d fc mov -0x4(%ebp),%ebx 10b1e4: c9 leave 10b1e5: c3 ret 0010b1e8 : int pthread_setcanceltype( int type, int *oldtype ) { 10b1e8: 55 push %ebp 10b1e9: 89 e5 mov %esp,%ebp 10b1eb: 53 push %ebx 10b1ec: 83 ec 04 sub $0x4,%esp 10b1ef: 8b 4d 08 mov 0x8(%ebp),%ecx 10b1f2: 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() ) 10b1f5: a1 d4 88 12 00 mov 0x1288d4,%eax 10b1fa: 85 c0 test %eax,%eax 10b1fc: 75 16 jne 10b214 return EPROTO; if ( !oldtype ) 10b1fe: 85 d2 test %edx,%edx 10b200: 74 05 je 10b207 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 10b202: 83 f9 01 cmp $0x1,%ecx 10b205: 76 19 jbe 10b220 _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b207: b8 16 00 00 00 mov $0x16,%eax } 10b20c: 8b 5d fc mov -0x4(%ebp),%ebx 10b20f: c9 leave 10b210: c3 ret 10b211: 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() ) 10b214: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b219: 8b 5d fc mov -0x4(%ebp),%ebx 10b21c: c9 leave 10b21d: c3 ret 10b21e: 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 ]; 10b220: a1 f8 88 12 00 mov 0x1288f8,%eax 10b225: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b22b: 8b 1d 38 88 12 00 mov 0x128838,%ebx 10b231: 43 inc %ebx 10b232: 89 1d 38 88 12 00 mov %ebx,0x128838 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10b238: 8b 98 d8 00 00 00 mov 0xd8(%eax),%ebx 10b23e: 89 1a mov %ebx,(%edx) thread_support->cancelability_type = type; 10b240: 89 88 d8 00 00 00 mov %ecx,0xd8(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b246: 83 ec 0c sub $0xc,%esp 10b249: ff 35 f8 88 12 00 pushl 0x1288f8 10b24f: e8 18 50 00 00 call 11026c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b254: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b256: 83 c4 10 add $0x10,%esp } 10b259: 8b 5d fc mov -0x4(%ebp),%ebx 10b25c: c9 leave 10b25d: c3 ret 0010dcb0 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10dcb0: 55 push %ebp 10dcb1: 89 e5 mov %esp,%ebp 10dcb3: 57 push %edi 10dcb4: 56 push %esi 10dcb5: 53 push %ebx 10dcb6: 83 ec 2c sub $0x2c,%esp 10dcb9: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10dcbc: 85 f6 test %esi,%esi 10dcbe: 0f 84 cc 00 00 00 je 10dd90 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10dcc4: 8d 45 e0 lea -0x20(%ebp),%eax 10dcc7: 50 push %eax 10dcc8: 8d 45 e4 lea -0x1c(%ebp),%eax 10dccb: 50 push %eax 10dccc: 56 push %esi 10dccd: ff 75 0c pushl 0xc(%ebp) 10dcd0: e8 7f 55 00 00 call 113254 <_POSIX_Thread_Translate_sched_param> 10dcd5: 89 c3 mov %eax,%ebx policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10dcd7: 83 c4 10 add $0x10,%esp 10dcda: 85 c0 test %eax,%eax 10dcdc: 74 0a je 10dce8 case OBJECTS_ERROR: break; } return ESRCH; } 10dcde: 89 d8 mov %ebx,%eax 10dce0: 8d 65 f4 lea -0xc(%ebp),%esp 10dce3: 5b pop %ebx 10dce4: 5e pop %esi 10dce5: 5f pop %edi 10dce6: c9 leave 10dce7: c3 ret 10dce8: 50 push %eax 10dce9: 8d 45 dc lea -0x24(%ebp),%eax 10dcec: 50 push %eax 10dced: ff 75 08 pushl 0x8(%ebp) 10dcf0: 68 20 b7 12 00 push $0x12b720 10dcf5: e8 3e 1f 00 00 call 10fc38 <_Objects_Get> 10dcfa: 89 c2 mov %eax,%edx /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10dcfc: 83 c4 10 add $0x10,%esp 10dcff: 8b 7d dc mov -0x24(%ebp),%edi 10dd02: 85 ff test %edi,%edi 10dd04: 0f 85 96 00 00 00 jne 10dda0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10dd0a: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10dd10: 89 45 d4 mov %eax,-0x2c(%ebp) if ( api->schedpolicy == SCHED_SPORADIC ) 10dd13: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax) 10dd1a: 0f 84 c8 00 00 00 je 10dde8 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 10dd20: 8b 45 0c mov 0xc(%ebp),%eax 10dd23: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dd26: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = *param; 10dd2c: 89 cf mov %ecx,%edi 10dd2e: 81 c7 84 00 00 00 add $0x84,%edi 10dd34: b9 07 00 00 00 mov $0x7,%ecx 10dd39: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10dd3b: 8b 45 e4 mov -0x1c(%ebp),%eax 10dd3e: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10dd41: 8b 45 e0 mov -0x20(%ebp),%eax 10dd44: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10dd4a: 8b 75 0c mov 0xc(%ebp),%esi 10dd4d: 85 f6 test %esi,%esi 10dd4f: 78 2e js 10dd7f <== ALWAYS TAKEN 10dd51: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10dd55: 7f 55 jg 10ddac case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10dd57: a1 24 b4 12 00 mov 0x12b424,%eax 10dd5c: 89 42 78 mov %eax,0x78(%edx) 10dd5f: 0f b6 05 5c 72 12 00 movzbl 0x12725c,%eax 10dd66: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dd69: 2b 81 84 00 00 00 sub 0x84(%ecx),%eax the_thread->real_priority = 10dd6f: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10dd72: 51 push %ecx 10dd73: 6a 01 push $0x1 10dd75: 50 push %eax 10dd76: 52 push %edx 10dd77: e8 48 22 00 00 call 10ffc4 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 10dd7c: 83 c4 10 add $0x10,%esp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 10dd7f: e8 28 27 00 00 call 1104ac <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10dd84: 89 d8 mov %ebx,%eax 10dd86: 8d 65 f4 lea -0xc(%ebp),%esp 10dd89: 5b pop %ebx 10dd8a: 5e pop %esi 10dd8b: 5f pop %edi 10dd8c: c9 leave 10dd8d: c3 ret 10dd8e: 66 90 xchg %ax,%ax <== NOT EXECUTED int rc; /* * Check all the parameters */ if ( !param ) 10dd90: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return ESRCH; } 10dd95: 89 d8 mov %ebx,%eax 10dd97: 8d 65 f4 lea -0xc(%ebp),%esp 10dd9a: 5b pop %ebx 10dd9b: 5e pop %esi 10dd9c: 5f pop %edi 10dd9d: c9 leave 10dd9e: c3 ret 10dd9f: 90 nop <== NOT EXECUTED /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10dda0: b3 03 mov $0x3,%bl case OBJECTS_ERROR: break; } return ESRCH; } 10dda2: 89 d8 mov %ebx,%eax 10dda4: 8d 65 f4 lea -0xc(%ebp),%esp 10dda7: 5b pop %ebx 10dda8: 5e pop %esi 10dda9: 5f pop %edi 10ddaa: c9 leave 10ddab: c3 ret api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 10ddac: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10ddb0: 75 cd jne 10dd7f <== ALWAYS TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10ddb2: 8b 4d d4 mov -0x2c(%ebp),%ecx 10ddb5: 8b 81 84 00 00 00 mov 0x84(%ecx),%eax 10ddbb: 89 81 a0 00 00 00 mov %eax,0xa0(%ecx) _Watchdog_Remove( &api->Sporadic_timer ); 10ddc1: 83 ec 0c sub $0xc,%esp 10ddc4: 89 c8 mov %ecx,%eax 10ddc6: 05 a4 00 00 00 add $0xa4,%eax 10ddcb: 50 push %eax 10ddcc: 89 55 d0 mov %edx,-0x30(%ebp) 10ddcf: e8 d8 38 00 00 call 1116ac <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10ddd4: 58 pop %eax 10ddd5: 5a pop %edx 10ddd6: 8b 55 d0 mov -0x30(%ebp),%edx 10ddd9: 52 push %edx 10ddda: 6a 00 push $0x0 10dddc: e8 3b fe ff ff call 10dc1c <_POSIX_Threads_Sporadic_budget_TSR> 10dde1: 83 c4 10 add $0x10,%esp 10dde4: eb 99 jmp 10dd7f 10dde6: 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 ); 10dde8: 83 ec 0c sub $0xc,%esp 10ddeb: 05 a4 00 00 00 add $0xa4,%eax 10ddf0: 50 push %eax 10ddf1: 89 55 d0 mov %edx,-0x30(%ebp) 10ddf4: e8 b3 38 00 00 call 1116ac <_Watchdog_Remove> 10ddf9: 83 c4 10 add $0x10,%esp 10ddfc: 8b 55 d0 mov -0x30(%ebp),%edx 10ddff: e9 1c ff ff ff jmp 10dd20 00111680 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 111680: 55 push %ebp 111681: 89 e5 mov %esp,%ebp 111683: 57 push %edi 111684: 56 push %esi 111685: 53 push %ebx 111686: 83 ec 0c sub $0xc,%esp 111689: 8b 4d 08 mov 0x8(%ebp),%ecx 11168c: 8b 55 0c mov 0xc(%ebp),%edx 11168f: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 111692: 85 d2 test %edx,%edx 111694: 0f 84 9a 00 00 00 je 111734 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 11169a: 8b 35 38 94 12 00 mov 0x129438,%esi 1116a0: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax if ( oset ) 1116a6: 85 db test %ebx,%ebx 1116a8: 74 0c je 1116b6 *oset = api->signals_blocked; 1116aa: 8b b8 cc 00 00 00 mov 0xcc(%eax),%edi 1116b0: 89 3b mov %edi,(%ebx) if ( !set ) 1116b2: 85 d2 test %edx,%edx 1116b4: 74 42 je 1116f8 return 0; switch ( how ) { 1116b6: 83 f9 01 cmp $0x1,%ecx 1116b9: 74 6d je 111728 1116bb: 83 f9 02 cmp $0x2,%ecx 1116be: 74 44 je 111704 1116c0: 85 c9 test %ecx,%ecx 1116c2: 75 4c jne 111710 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 1116c4: 8b 12 mov (%edx),%edx 1116c6: 89 90 cc 00 00 00 mov %edx,0xcc(%eax) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 1116cc: 8b 15 68 9b 12 00 mov 0x129b68,%edx 1116d2: 0b 90 d0 00 00 00 or 0xd0(%eax),%edx /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 1116d8: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 1116de: f7 d0 not %eax 1116e0: 85 c2 test %eax,%edx 1116e2: 74 14 je 1116f8 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 1116e4: c6 46 74 01 movb $0x1,0x74(%esi) _Thread_Dispatch(); 1116e8: e8 63 cc ff ff call 10e350 <_Thread_Dispatch> 1116ed: 31 c0 xor %eax,%eax } return 0; } 1116ef: 83 c4 0c add $0xc,%esp 1116f2: 5b pop %ebx 1116f3: 5e pop %esi 1116f4: 5f pop %edi 1116f5: c9 leave 1116f6: c3 ret 1116f7: 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(); 1116f8: 31 c0 xor %eax,%eax } return 0; } 1116fa: 83 c4 0c add $0xc,%esp 1116fd: 5b pop %ebx 1116fe: 5e pop %esi 1116ff: 5f pop %edi 111700: c9 leave 111701: c3 ret 111702: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 111704: 8b 12 mov (%edx),%edx 111706: f7 d2 not %edx 111708: 21 90 cc 00 00 00 and %edx,0xcc(%eax) break; 11170e: eb bc jmp 1116cc case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 111710: e8 f3 2d 00 00 call 114508 <__errno> 111715: c7 00 16 00 00 00 movl $0x16,(%eax) 11171b: b8 ff ff ff ff mov $0xffffffff,%eax _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 111720: 83 c4 0c add $0xc,%esp 111723: 5b pop %ebx 111724: 5e pop %esi 111725: 5f pop %edi 111726: c9 leave 111727: c3 ret if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 111728: 8b 12 mov (%edx),%edx 11172a: 09 90 cc 00 00 00 or %edx,0xcc(%eax) break; 111730: eb 9a jmp 1116cc 111732: 66 90 xchg %ax,%ax <== NOT EXECUTED sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 111734: 85 db test %ebx,%ebx 111736: 74 d8 je 111710 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111738: 8b 35 38 94 12 00 mov 0x129438,%esi 11173e: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax 111744: e9 61 ff ff ff jmp 1116aa 0010b660 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 10b660: 55 push %ebp 10b661: 89 e5 mov %esp,%ebp 10b663: 83 ec 28 sub $0x28,%esp 10b666: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 10b669: 85 c0 test %eax,%eax 10b66b: 74 2f je 10b69c RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b66d: 52 push %edx 10b66e: 8d 55 f4 lea -0xc(%ebp),%edx 10b671: 52 push %edx 10b672: ff 30 pushl (%eax) 10b674: 68 60 89 12 00 push $0x128960 10b679: e8 ae 20 00 00 call 10d72c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b67e: 83 c4 10 add $0x10,%esp 10b681: 8b 4d f4 mov -0xc(%ebp),%ecx 10b684: 85 c9 test %ecx,%ecx 10b686: 75 14 jne 10b69c */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 10b688: 8b 50 18 mov 0x18(%eax),%edx case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 10b68b: 85 d2 test %edx,%edx 10b68d: 74 15 je 10b6a4 _Thread_Enable_dispatch(); 10b68f: e8 0c 29 00 00 call 10dfa0 <_Thread_Enable_dispatch> 10b694: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b699: c9 leave 10b69a: c3 ret 10b69b: 90 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); return 0; 10b69c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b6a1: c9 leave 10b6a2: c3 ret 10b6a3: 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 ); 10b6a4: 83 ec 08 sub $0x8,%esp 10b6a7: 50 push %eax 10b6a8: 68 60 89 12 00 push $0x128960 10b6ad: 89 45 e4 mov %eax,-0x1c(%ebp) 10b6b0: e8 43 1c 00 00 call 10d2f8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10b6b5: 58 pop %eax 10b6b6: 5a pop %edx 10b6b7: 8b 45 e4 mov -0x1c(%ebp),%eax 10b6ba: 50 push %eax 10b6bb: 68 60 89 12 00 push $0x128960 10b6c0: e8 37 1f 00 00 call 10d5fc <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 10b6c5: e8 d6 28 00 00 call 10dfa0 <_Thread_Enable_dispatch> 10b6ca: 31 c0 xor %eax,%eax return 0; 10b6cc: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b6cf: c9 leave 10b6d0: c3 ret 0010b760 : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 10b760: 55 push %ebp 10b761: 89 e5 mov %esp,%ebp 10b763: 53 push %ebx 10b764: 83 ec 14 sub $0x14,%esp 10b767: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b76a: 85 c0 test %eax,%eax 10b76c: 74 1b je 10b789 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b76e: 53 push %ebx 10b76f: 8d 55 f4 lea -0xc(%ebp),%edx 10b772: 52 push %edx 10b773: ff 30 pushl (%eax) 10b775: 68 60 89 12 00 push $0x128960 10b77a: e8 ad 1f 00 00 call 10d72c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b77f: 83 c4 10 add $0x10,%esp 10b782: 8b 4d f4 mov -0xc(%ebp),%ecx 10b785: 85 c9 test %ecx,%ecx 10b787: 74 0b je 10b794 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b789: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b78e: 8b 5d fc mov -0x4(%ebp),%ebx 10b791: c9 leave 10b792: c3 ret 10b793: 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 ); 10b794: 52 push %edx 10b795: 6a 00 push $0x0 10b797: 6a 01 push $0x1 10b799: 83 c0 10 add $0x10,%eax 10b79c: 50 push %eax 10b79d: e8 e2 15 00 00 call 10cd84 <_CORE_spinlock_Wait> 10b7a2: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b7a4: e8 f7 27 00 00 call 10dfa0 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b7a9: 89 1c 24 mov %ebx,(%esp) 10b7ac: e8 0b 00 00 00 call 10b7bc <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b7b1: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b7b4: 8b 5d fc mov -0x4(%ebp),%ebx 10b7b7: c9 leave 10b7b8: c3 ret 0010b7cc : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 10b7cc: 55 push %ebp 10b7cd: 89 e5 mov %esp,%ebp 10b7cf: 53 push %ebx 10b7d0: 83 ec 14 sub $0x14,%esp 10b7d3: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b7d6: 85 c0 test %eax,%eax 10b7d8: 74 1b je 10b7f5 10b7da: 53 push %ebx 10b7db: 8d 55 f4 lea -0xc(%ebp),%edx 10b7de: 52 push %edx 10b7df: ff 30 pushl (%eax) 10b7e1: 68 60 89 12 00 push $0x128960 10b7e6: e8 41 1f 00 00 call 10d72c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b7eb: 83 c4 10 add $0x10,%esp 10b7ee: 8b 4d f4 mov -0xc(%ebp),%ecx 10b7f1: 85 c9 test %ecx,%ecx 10b7f3: 74 0b je 10b800 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b7f5: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7fa: 8b 5d fc mov -0x4(%ebp),%ebx 10b7fd: c9 leave 10b7fe: c3 ret 10b7ff: 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 ); 10b800: 52 push %edx 10b801: 6a 00 push $0x0 10b803: 6a 00 push $0x0 10b805: 83 c0 10 add $0x10,%eax 10b808: 50 push %eax 10b809: e8 76 15 00 00 call 10cd84 <_CORE_spinlock_Wait> 10b80e: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b810: e8 8b 27 00 00 call 10dfa0 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b815: 89 1c 24 mov %ebx,(%esp) 10b818: e8 9f ff ff ff call 10b7bc <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b81d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b820: 8b 5d fc mov -0x4(%ebp),%ebx 10b823: c9 leave 10b824: c3 ret 0010b828 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 10b828: 55 push %ebp 10b829: 89 e5 mov %esp,%ebp 10b82b: 53 push %ebx 10b82c: 83 ec 14 sub $0x14,%esp 10b82f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b832: 85 c0 test %eax,%eax 10b834: 74 1b je 10b851 10b836: 51 push %ecx 10b837: 8d 55 f4 lea -0xc(%ebp),%edx 10b83a: 52 push %edx 10b83b: ff 30 pushl (%eax) 10b83d: 68 60 89 12 00 push $0x128960 10b842: e8 e5 1e 00 00 call 10d72c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b847: 83 c4 10 add $0x10,%esp 10b84a: 8b 55 f4 mov -0xc(%ebp),%edx 10b84d: 85 d2 test %edx,%edx 10b84f: 74 0b je 10b85c case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b851: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b856: 8b 5d fc mov -0x4(%ebp),%ebx 10b859: c9 leave 10b85a: c3 ret 10b85b: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 10b85c: 83 ec 0c sub $0xc,%esp 10b85f: 83 c0 10 add $0x10,%eax 10b862: 50 push %eax 10b863: e8 cc 14 00 00 call 10cd34 <_CORE_spinlock_Release> 10b868: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b86a: e8 31 27 00 00 call 10dfa0 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b86f: 89 1c 24 mov %ebx,(%esp) 10b872: e8 45 ff ff ff call 10b7bc <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b877: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b87a: 8b 5d fc mov -0x4(%ebp),%ebx 10b87d: c9 leave 10b87e: c3 ret 0010bad4 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10bad4: 55 push %ebp 10bad5: 89 e5 mov %esp,%ebp 10bad7: 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() ) 10bada: a1 b4 90 12 00 mov 0x1290b4,%eax 10badf: 85 c0 test %eax,%eax 10bae1: 75 44 jne 10bb27 <== ALWAYS TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10bae3: a1 d8 90 12 00 mov 0x1290d8,%eax 10bae8: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10baee: 8b 15 18 90 12 00 mov 0x129018,%edx 10baf4: 42 inc %edx 10baf5: 89 15 18 90 12 00 mov %edx,0x129018 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10bafb: 8b 90 d4 00 00 00 mov 0xd4(%eax),%edx 10bb01: 85 d2 test %edx,%edx 10bb03: 75 27 jne 10bb2c <== ALWAYS TAKEN thread_support->cancelation_requested ) 10bb05: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax 10bb0b: 85 c0 test %eax,%eax 10bb0d: 74 1d je 10bb2c cancel = true; _Thread_Enable_dispatch(); 10bb0f: e8 cc 25 00 00 call 10e0e0 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10bb14: 83 ec 08 sub $0x8,%esp 10bb17: 6a ff push $0xffffffff 10bb19: ff 35 d8 90 12 00 pushl 0x1290d8 10bb1f: e8 14 55 00 00 call 111038 <_POSIX_Thread_Exit> 10bb24: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10bb27: c9 leave <== NOT EXECUTED 10bb28: c3 ret <== NOT EXECUTED 10bb29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10bb2c: c9 leave _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10bb2d: e9 ae 25 00 00 jmp 10e0e0 <_Thread_Enable_dispatch> 00108eac : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 108eac: 55 push %ebp 108ead: 89 e5 mov %esp,%ebp 108eaf: 53 push %ebx 108eb0: 83 ec 04 sub $0x4,%esp 108eb3: 8b 5d 08 mov 0x8(%ebp),%ebx const char *p = s; for (p=s ; *p ; p++ ) 108eb6: 8a 03 mov (%ebx),%al 108eb8: 84 c0 test %al,%al 108eba: 74 17 je 108ed3 <== ALWAYS TAKEN BSP_output_char(*p); 108ebc: 83 ec 0c sub $0xc,%esp 108ebf: 0f be c0 movsbl %al,%eax 108ec2: 50 push %eax 108ec3: ff 15 44 32 12 00 call *0x123244 */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 108ec9: 43 inc %ebx 108eca: 8a 03 mov (%ebx),%al 108ecc: 83 c4 10 add $0x10,%esp 108ecf: 84 c0 test %al,%al 108ed1: 75 e9 jne 108ebc BSP_output_char(*p); BSP_output_char('\n'); 108ed3: c7 45 08 0a 00 00 00 movl $0xa,0x8(%ebp) 108eda: a1 44 32 12 00 mov 0x123244,%eax } 108edf: 8b 5d fc mov -0x4(%ebp),%ebx 108ee2: c9 leave { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 108ee3: ff e0 jmp *%eax 0011eb90 : ssize_t read( int fd, void *buffer, size_t count ) { 11eb90: 55 push %ebp 11eb91: 89 e5 mov %esp,%ebp 11eb93: 53 push %ebx 11eb94: 83 ec 04 sub $0x4,%esp 11eb97: 8b 5d 08 mov 0x8(%ebp),%ebx 11eb9a: 8b 45 0c mov 0xc(%ebp),%eax 11eb9d: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11eba0: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 11eba6: 73 50 jae 11ebf8 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 11eba8: c1 e3 06 shl $0x6,%ebx 11ebab: 03 1d 60 72 12 00 add 0x127260,%ebx rtems_libio_check_is_open( iop ); 11ebb1: 8b 4b 14 mov 0x14(%ebx),%ecx 11ebb4: f6 c5 01 test $0x1,%ch 11ebb7: 74 3f je 11ebf8 rtems_libio_check_buffer( buffer ); 11ebb9: 85 c0 test %eax,%eax 11ebbb: 74 4f je 11ec0c <== ALWAYS TAKEN rtems_libio_check_count( count ); 11ebbd: 85 d2 test %edx,%edx 11ebbf: 74 2f je 11ebf0 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11ebc1: 83 e1 02 and $0x2,%ecx 11ebc4: 74 46 je 11ec0c <== ALWAYS TAKEN /* * Now process the read(). */ if ( !iop->handlers->read_h ) 11ebc6: 8b 4b 3c mov 0x3c(%ebx),%ecx 11ebc9: 8b 49 08 mov 0x8(%ecx),%ecx 11ebcc: 85 c9 test %ecx,%ecx 11ebce: 74 4e je 11ec1e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 11ebd0: 83 ec 04 sub $0x4,%esp 11ebd3: 52 push %edx 11ebd4: 50 push %eax 11ebd5: 53 push %ebx 11ebd6: ff d1 call *%ecx if ( rc > 0 ) 11ebd8: 83 c4 10 add $0x10,%esp 11ebdb: 85 c0 test %eax,%eax 11ebdd: 7e 0b jle 11ebea iop->offset += rc; 11ebdf: 89 c1 mov %eax,%ecx 11ebe1: c1 f9 1f sar $0x1f,%ecx 11ebe4: 01 43 0c add %eax,0xc(%ebx) 11ebe7: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11ebea: 8b 5d fc mov -0x4(%ebp),%ebx 11ebed: c9 leave 11ebee: c3 ret 11ebef: 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 ); 11ebf0: 31 c0 xor %eax,%eax <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 11ebf2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11ebf5: c9 leave <== NOT EXECUTED 11ebf6: c3 ret <== NOT EXECUTED 11ebf7: 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 ); 11ebf8: e8 d3 4a ff ff call 1136d0 <__errno> 11ebfd: c7 00 09 00 00 00 movl $0x9,(%eax) 11ec03: b8 ff ff ff ff mov $0xffffffff,%eax 11ec08: eb e0 jmp 11ebea 11ec0a: 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 ); 11ec0c: e8 bf 4a ff ff call 1136d0 <__errno> <== NOT EXECUTED 11ec11: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11ec17: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ec1c: eb cc jmp 11ebea <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11ec1e: e8 ad 4a ff ff call 1136d0 <__errno> <== NOT EXECUTED 11ec23: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11ec29: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ec2e: eb ba jmp 11ebea <== NOT EXECUTED 0012c604 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 12c604: 55 push %ebp 12c605: 89 e5 mov %esp,%ebp 12c607: 57 push %edi 12c608: 56 push %esi 12c609: 53 push %ebx 12c60a: 83 ec 2c sub $0x2c,%esp 12c60d: 8b 55 08 mov 0x8(%ebp),%edx 12c610: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 12c613: 85 db test %ebx,%ebx 12c615: 0f 84 ad 00 00 00 je 12c6c8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 12c61b: 31 c0 xor %eax,%eax 12c61d: b9 ff ff ff ff mov $0xffffffff,%ecx 12c622: 89 d7 mov %edx,%edi 12c624: f2 ae repnz scas %es:(%edi),%al 12c626: f7 d1 not %ecx 12c628: 49 dec %ecx 12c629: 83 ec 0c sub $0xc,%esp 12c62c: 6a 00 push $0x0 12c62e: 8d 75 d4 lea -0x2c(%ebp),%esi 12c631: 56 push %esi 12c632: 6a 00 push $0x0 12c634: 51 push %ecx 12c635: 52 push %edx 12c636: e8 0d f7 fd ff call 10bd48 0, &loc, false ); if ( result != 0 ) 12c63b: 83 c4 20 add $0x20,%esp 12c63e: 85 c0 test %eax,%eax 12c640: 75 76 jne 12c6b8 <== ALWAYS TAKEN return -1; if ( !loc.ops->node_type_h ){ 12c642: 8b 55 e0 mov -0x20(%ebp),%edx 12c645: 8b 42 10 mov 0x10(%edx),%eax 12c648: 85 c0 test %eax,%eax 12c64a: 74 4e je 12c69a <== 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 ){ 12c64c: 83 ec 0c sub $0xc,%esp 12c64f: 56 push %esi 12c650: ff d0 call *%eax 12c652: 83 c4 10 add $0x10,%esp 12c655: 83 f8 04 cmp $0x4,%eax 12c658: 0f 85 86 00 00 00 jne 12c6e4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 12c65e: 8b 55 e0 mov -0x20(%ebp),%edx 12c661: 8b 42 3c mov 0x3c(%edx),%eax 12c664: 85 c0 test %eax,%eax 12c666: 0f 84 a1 00 00 00 je 12c70d <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 12c66c: 52 push %edx 12c66d: ff 75 10 pushl 0x10(%ebp) 12c670: 53 push %ebx 12c671: 56 push %esi 12c672: ff d0 call *%eax 12c674: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 12c676: 8b 45 e0 mov -0x20(%ebp),%eax 12c679: 83 c4 10 add $0x10,%esp 12c67c: 85 c0 test %eax,%eax 12c67e: 74 10 je 12c690 <== ALWAYS TAKEN 12c680: 8b 40 1c mov 0x1c(%eax),%eax 12c683: 85 c0 test %eax,%eax 12c685: 74 09 je 12c690 <== ALWAYS TAKEN 12c687: 83 ec 0c sub $0xc,%esp 12c68a: 56 push %esi 12c68b: ff d0 call *%eax 12c68d: 83 c4 10 add $0x10,%esp return result; } 12c690: 89 d8 mov %ebx,%eax 12c692: 8d 65 f4 lea -0xc(%ebp),%esp 12c695: 5b pop %ebx 12c696: 5e pop %esi 12c697: 5f pop %edi 12c698: c9 leave 12c699: c3 ret 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 12c69a: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12c69d: 85 c0 test %eax,%eax <== NOT EXECUTED 12c69f: 74 09 je 12c6aa <== NOT EXECUTED 12c6a1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c6a4: 56 push %esi <== NOT EXECUTED 12c6a5: ff d0 call *%eax <== NOT EXECUTED 12c6a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12c6aa: e8 7d 61 01 00 call 14282c <__errno> <== NOT EXECUTED 12c6af: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12c6b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12c6b8: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 12c6bd: 89 d8 mov %ebx,%eax <== NOT EXECUTED 12c6bf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c6c2: 5b pop %ebx <== NOT EXECUTED 12c6c3: 5e pop %esi <== NOT EXECUTED 12c6c4: 5f pop %edi <== NOT EXECUTED 12c6c5: c9 leave <== NOT EXECUTED 12c6c6: c3 ret <== NOT EXECUTED 12c6c7: 90 nop <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 12c6c8: e8 5f 61 01 00 call 14282c <__errno> <== NOT EXECUTED 12c6cd: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 12c6d3: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 12c6d8: 89 d8 mov %ebx,%eax <== NOT EXECUTED 12c6da: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c6dd: 5b pop %ebx <== NOT EXECUTED 12c6de: 5e pop %esi <== NOT EXECUTED 12c6df: 5f pop %edi <== NOT EXECUTED 12c6e0: c9 leave <== NOT EXECUTED 12c6e1: c3 ret <== NOT EXECUTED 12c6e2: 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 ); 12c6e4: 8b 45 e0 mov -0x20(%ebp),%eax 12c6e7: 85 c0 test %eax,%eax 12c6e9: 74 10 je 12c6fb <== ALWAYS TAKEN 12c6eb: 8b 40 1c mov 0x1c(%eax),%eax 12c6ee: 85 c0 test %eax,%eax 12c6f0: 74 09 je 12c6fb <== ALWAYS TAKEN 12c6f2: 83 ec 0c sub $0xc,%esp 12c6f5: 56 push %esi 12c6f6: ff d0 call *%eax 12c6f8: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); 12c6fb: e8 2c 61 01 00 call 14282c <__errno> 12c700: c7 00 16 00 00 00 movl $0x16,(%eax) 12c706: bb ff ff ff ff mov $0xffffffff,%ebx 12c70b: eb 83 jmp 12c690 } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 12c70d: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12c710: 85 c0 test %eax,%eax <== NOT EXECUTED 12c712: 74 09 je 12c71d <== NOT EXECUTED 12c714: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c717: 56 push %esi <== NOT EXECUTED 12c718: ff d0 call *%eax <== NOT EXECUTED 12c71a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12c71d: e8 0a 61 01 00 call 14282c <__errno> <== NOT EXECUTED 12c722: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12c728: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 12c72d: e9 5e ff ff ff jmp 12c690 <== NOT EXECUTED 00109e4c : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 109e4c: 55 push %ebp 109e4d: 89 e5 mov %esp,%ebp 109e4f: 57 push %edi 109e50: 56 push %esi 109e51: 53 push %ebx 109e52: 83 ec 1c sub $0x1c,%esp 109e55: 8b 75 08 mov 0x8(%ebp),%esi 109e58: 8b 5d 0c mov 0xc(%ebp),%ebx int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 109e5b: 3b 35 cc 71 12 00 cmp 0x1271cc,%esi 109e61: 0f 83 03 01 00 00 jae 109f6a <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 109e67: c1 e6 06 shl $0x6,%esi 109e6a: 03 35 e0 ba 12 00 add 0x12bae0,%esi rtems_libio_check_is_open( iop ); 109e70: 8b 46 14 mov 0x14(%esi),%eax 109e73: f6 c4 01 test $0x1,%ah 109e76: 0f 84 ee 00 00 00 je 109f6a <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 109e7c: a8 02 test $0x2,%al 109e7e: 0f 84 b4 00 00 00 je 109f38 <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 109e84: 85 db test %ebx,%ebx 109e86: 0f 84 ac 00 00 00 je 109f38 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 109e8c: 8b 7d 10 mov 0x10(%ebp),%edi 109e8f: 85 ff test %edi,%edi 109e91: 0f 8e a1 00 00 00 jle 109f38 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 109e97: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 109e9e: 0f 8f 94 00 00 00 jg 109f38 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 109ea4: 8b 46 3c mov 0x3c(%esi),%eax 109ea7: 8b 40 08 mov 0x8(%eax),%eax 109eaa: 89 45 e0 mov %eax,-0x20(%ebp) 109ead: 85 c0 test %eax,%eax 109eaf: 0f 84 c9 00 00 00 je 109f7e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 109eb5: c6 45 e4 01 movb $0x1,-0x1c(%ebp) 109eb9: 31 c0 xor %eax,%eax 109ebb: 31 d2 xor %edx,%edx 109ebd: eb 03 jmp 109ec2 109ebf: 90 nop <== 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++ ) { 109ec0: 89 fa mov %edi,%edx ssize_t old; if ( !iov[v].iov_base ) 109ec2: 8b 0c c3 mov (%ebx,%eax,8),%ecx 109ec5: 85 c9 test %ecx,%ecx 109ec7: 74 6f je 109f38 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109ec9: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx 109ecd: 8d 3c 0a lea (%edx,%ecx,1),%edi if ( total < old ) 109ed0: 39 d7 cmp %edx,%edi 109ed2: 7c 64 jl 109f38 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 109ed4: 85 c9 test %ecx,%ecx 109ed6: 74 04 je 109edc 109ed8: c6 45 e4 00 movb $0x0,-0x1c(%ebp) * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109edc: 40 inc %eax 109edd: 39 45 10 cmp %eax,0x10(%ebp) 109ee0: 7f de jg 109ec0 /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 109ee2: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp) 109ee6: 75 70 jne 109f58 109ee8: 31 ff xor %edi,%edi 109eea: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 109ef1: 8b 45 e0 mov -0x20(%ebp),%eax 109ef4: eb 24 jmp 109f1a 109ef6: 66 90 xchg %ax,%ax <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 109ef8: 74 0e je 109f08 <== ALWAYS TAKEN iop->offset += bytes; 109efa: 89 c1 mov %eax,%ecx 109efc: c1 f9 1f sar $0x1f,%ecx 109eff: 01 46 0c add %eax,0xc(%esi) 109f02: 11 4e 10 adc %ecx,0x10(%esi) total += bytes; 109f05: 01 45 e4 add %eax,-0x1c(%ebp) } if (bytes != iov[ v ].iov_len) 109f08: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax 109f0c: 75 3c jne 109f4a <== ALWAYS TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109f0e: 47 inc %edi 109f0f: 39 7d 10 cmp %edi,0x10(%ebp) 109f12: 7e 36 jle 109f4a 109f14: 8b 46 3c mov 0x3c(%esi),%eax 109f17: 8b 40 08 mov 0x8(%eax),%eax bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 109f1a: 52 push %edx 109f1b: ff 74 fb 04 pushl 0x4(%ebx,%edi,8) 109f1f: ff 34 fb pushl (%ebx,%edi,8) 109f22: 56 push %esi 109f23: ff d0 call *%eax if ( bytes < 0 ) 109f25: 83 c4 10 add $0x10,%esp 109f28: 83 f8 00 cmp $0x0,%eax 109f2b: 7d cb jge 109ef8 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109f2d: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109f34: eb 14 jmp 109f4a <== NOT EXECUTED 109f36: 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 ); 109f38: e8 e3 ba 00 00 call 115a20 <__errno> 109f3d: c7 00 16 00 00 00 movl $0x16,(%eax) 109f43: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109f4a: 8b 45 e4 mov -0x1c(%ebp),%eax 109f4d: 8d 65 f4 lea -0xc(%ebp),%esp 109f50: 5b pop %ebx 109f51: 5e pop %esi 109f52: 5f pop %edi 109f53: c9 leave 109f54: c3 ret 109f55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 109f58: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109f5f: 8b 45 e4 mov -0x1c(%ebp),%eax 109f62: 8d 65 f4 lea -0xc(%ebp),%esp 109f65: 5b pop %ebx 109f66: 5e pop %esi 109f67: 5f pop %edi 109f68: c9 leave 109f69: 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 ); 109f6a: e8 b1 ba 00 00 call 115a20 <__errno> <== NOT EXECUTED 109f6f: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 109f75: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109f7c: eb cc jmp 109f4a <== 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 ); 109f7e: e8 9d ba 00 00 call 115a20 <__errno> <== NOT EXECUTED 109f83: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109f89: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109f90: eb b8 jmp 109f4a <== NOT EXECUTED 0011ecb0 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 11ecb0: 55 push %ebp 11ecb1: 89 e5 mov %esp,%ebp 11ecb3: 57 push %edi 11ecb4: 56 push %esi 11ecb5: 53 push %ebx 11ecb6: 83 ec 2c sub $0x2c,%esp 11ecb9: 8b 5d 08 mov 0x8(%ebp),%ebx 11ecbc: 8b 75 0c mov 0xc(%ebp),%esi 11ecbf: ff 05 90 72 12 00 incl 0x127290 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11ecc5: 83 3d c0 75 12 00 03 cmpl $0x3,0x1275c0 11eccc: 74 72 je 11ed40 <== NEVER TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11ecce: 85 db test %ebx,%ebx 11ecd0: 74 5e je 11ed30 return malloc( size ); if ( !size ) { 11ecd2: 85 f6 test %esi,%esi 11ecd4: 74 3a je 11ed10 <== ALWAYS TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11ecd6: 52 push %edx 11ecd7: 8d 45 e4 lea -0x1c(%ebp),%eax 11ecda: 50 push %eax 11ecdb: 53 push %ebx 11ecdc: ff 35 58 31 12 00 pushl 0x123158 11ece2: e8 59 01 00 00 call 11ee40 <_Protected_heap_Get_block_size> 11ece7: 83 c4 10 add $0x10,%esp 11ecea: 84 c0 test %al,%al 11ecec: 74 32 je 11ed20 #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 ) ) { 11ecee: 50 push %eax 11ecef: 56 push %esi 11ecf0: 53 push %ebx 11ecf1: ff 35 58 31 12 00 pushl 0x123158 11ecf7: e8 7c 01 00 00 call 11ee78 <_Protected_heap_Resize_block> 11ecfc: 83 c4 10 add $0x10,%esp 11ecff: 84 c0 test %al,%al 11ed01: 74 5d je 11ed60 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 11ed03: 89 d8 mov %ebx,%eax 11ed05: 8d 65 f4 lea -0xc(%ebp),%esp 11ed08: 5b pop %ebx 11ed09: 5e pop %esi 11ed0a: 5f pop %edi 11ed0b: c9 leave 11ed0c: c3 ret 11ed0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 11ed10: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11ed13: 53 push %ebx <== NOT EXECUTED 11ed14: e8 63 93 fe ff call 10807c <== NOT EXECUTED 11ed19: 31 db xor %ebx,%ebx <== NOT EXECUTED return (void *) 0; 11ed1b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11ed1e: eb e3 jmp 11ed03 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 11ed20: e8 ab 49 ff ff call 1136d0 <__errno> 11ed25: c7 00 16 00 00 00 movl $0x16,(%eax) 11ed2b: 31 db xor %ebx,%ebx return (void *) 0; 11ed2d: eb d4 jmp 11ed03 11ed2f: 90 nop <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 11ed30: 83 ec 0c sub $0xc,%esp 11ed33: 56 push %esi 11ed34: e8 93 95 fe ff call 1082cc 11ed39: 89 c3 mov %eax,%ebx 11ed3b: 83 c4 10 add $0x10,%esp 11ed3e: eb c3 jmp 11ed03 /* * 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) 11ed40: a1 f8 73 12 00 mov 0x1273f8,%eax 11ed45: 85 c0 test %eax,%eax 11ed47: 74 04 je 11ed4d <== NEVER TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 11ed49: 31 db xor %ebx,%ebx 11ed4b: eb b6 jmp 11ed03 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 11ed4d: a1 94 74 12 00 mov 0x127494,%eax 11ed52: 85 c0 test %eax,%eax 11ed54: 0f 84 74 ff ff ff je 11ecce <== NEVER TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 11ed5a: 31 db xor %ebx,%ebx <== NOT EXECUTED 11ed5c: eb a5 jmp 11ed03 <== NOT EXECUTED 11ed5e: 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 ); 11ed60: 83 ec 0c sub $0xc,%esp 11ed63: 56 push %esi 11ed64: e8 63 95 fe ff call 1082cc MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11ed69: ff 0d 84 72 12 00 decl 0x127284 if ( !new_area ) { 11ed6f: 83 c4 10 add $0x10,%esp 11ed72: 85 c0 test %eax,%eax 11ed74: 74 d3 je 11ed49 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11ed76: 8b 55 e4 mov -0x1c(%ebp),%edx 11ed79: 89 f1 mov %esi,%ecx 11ed7b: 39 d6 cmp %edx,%esi 11ed7d: 76 02 jbe 11ed81 <== ALWAYS TAKEN 11ed7f: 89 d1 mov %edx,%ecx 11ed81: 89 c7 mov %eax,%edi 11ed83: 89 de mov %ebx,%esi 11ed85: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11ed87: 83 ec 0c sub $0xc,%esp 11ed8a: 53 push %ebx 11ed8b: 89 45 d4 mov %eax,-0x2c(%ebp) 11ed8e: e8 e9 92 fe ff call 10807c 11ed93: 8b 45 d4 mov -0x2c(%ebp),%eax 11ed96: 89 c3 mov %eax,%ebx return new_area; 11ed98: 83 c4 10 add $0x10,%esp 11ed9b: e9 63 ff ff ff jmp 11ed03 0012c734 : #include int rmdir( const char *pathname ) { 12c734: 55 push %ebp 12c735: 89 e5 mov %esp,%ebp 12c737: 57 push %edi 12c738: 56 push %esi 12c739: 53 push %ebx 12c73a: 83 ec 58 sub $0x58,%esp 12c73d: 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 ); 12c740: 52 push %edx 12c741: 89 55 ac mov %edx,-0x54(%ebp) 12c744: e8 db f4 fd ff call 10bc24 12c749: 89 c3 mov %eax,%ebx if ( parentpathlen == 0 ) 12c74b: 83 c4 10 add $0x10,%esp 12c74e: 85 c0 test %eax,%eax 12c750: 8b 55 ac mov -0x54(%ebp),%edx 12c753: 0f 85 7f 01 00 00 jne 12c8d8 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 12c759: 8a 02 mov (%edx),%al 12c75b: 3c 2f cmp $0x2f,%al 12c75d: 74 0c je 12c76b <== NEVER TAKEN 12c75f: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 12c761: 74 08 je 12c76b <== NOT EXECUTED 12c763: 84 c0 test %al,%al <== NOT EXECUTED 12c765: 0f 85 ed 00 00 00 jne 12c858 <== NOT EXECUTED 12c76b: 8d 45 d4 lea -0x2c(%ebp),%eax 12c76e: 89 45 b4 mov %eax,-0x4c(%ebp) 12c771: 8b 35 84 92 16 00 mov 0x169284,%esi 12c777: 83 c6 18 add $0x18,%esi 12c77a: b9 05 00 00 00 mov $0x5,%ecx 12c77f: 89 c7 mov %eax,%edi 12c781: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12c783: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 12c787: 8d 7d c0 lea -0x40(%ebp),%edi 12c78a: b9 05 00 00 00 mov $0x5,%ecx 12c78f: 8b 75 b4 mov -0x4c(%ebp),%esi 12c792: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 12c794: 8d 1c 1a lea (%edx,%ebx,1),%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 12c797: be ff ff ff ff mov $0xffffffff,%esi 12c79c: 89 f1 mov %esi,%ecx 12c79e: 89 df mov %ebx,%edi 12c7a0: 31 c0 xor %eax,%eax 12c7a2: f2 ae repnz scas %es:(%edi),%al 12c7a4: f7 d1 not %ecx 12c7a6: 49 dec %ecx 12c7a7: 83 ec 08 sub $0x8,%esp 12c7aa: 51 push %ecx 12c7ab: 53 push %ebx 12c7ac: e8 37 f4 fd ff call 10bbe8 12c7b1: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 12c7b3: 89 f1 mov %esi,%ecx 12c7b5: 89 df mov %ebx,%edi 12c7b7: 31 c0 xor %eax,%eax 12c7b9: f2 ae repnz scas %es:(%edi),%al 12c7bb: f7 d1 not %ecx 12c7bd: 49 dec %ecx 12c7be: c7 04 24 00 00 00 00 movl $0x0,(%esp) 12c7c5: 8d 75 c0 lea -0x40(%ebp),%esi 12c7c8: 56 push %esi 12c7c9: 6a 00 push $0x0 12c7cb: 51 push %ecx 12c7cc: 53 push %ebx 12c7cd: e8 a2 f4 fd ff call 10bc74 0, &loc, false ); if ( result != 0 ) { 12c7d2: 83 c4 20 add $0x20,%esp 12c7d5: 85 c0 test %eax,%eax 12c7d7: 0f 85 e7 00 00 00 jne 12c8c4 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 12c7dd: 8b 55 cc mov -0x34(%ebp),%edx 12c7e0: 8b 42 10 mov 0x10(%edx),%eax 12c7e3: 85 c0 test %eax,%eax 12c7e5: 0f 84 65 01 00 00 je 12c950 <== 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 ){ 12c7eb: 83 ec 0c sub $0xc,%esp 12c7ee: 56 push %esi 12c7ef: ff d0 call *%eax 12c7f1: 83 c4 10 add $0x10,%esp 12c7f4: 48 dec %eax 12c7f5: 0f 85 81 00 00 00 jne 12c87c /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 12c7fb: 8b 45 c8 mov -0x38(%ebp),%eax 12c7fe: 8b 40 34 mov 0x34(%eax),%eax 12c801: 85 c0 test %eax,%eax 12c803: 0f 84 fb 00 00 00 je 12c904 <== ALWAYS TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 12c809: 83 ec 08 sub $0x8,%esp 12c80c: 56 push %esi 12c80d: ff 75 b4 pushl -0x4c(%ebp) 12c810: ff d0 call *%eax 12c812: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 12c814: 8b 45 cc mov -0x34(%ebp),%eax 12c817: 83 c4 10 add $0x10,%esp 12c81a: 85 c0 test %eax,%eax 12c81c: 74 10 je 12c82e <== ALWAYS TAKEN 12c81e: 8b 40 1c mov 0x1c(%eax),%eax 12c821: 85 c0 test %eax,%eax 12c823: 74 09 je 12c82e <== ALWAYS TAKEN 12c825: 83 ec 0c sub $0xc,%esp 12c828: 56 push %esi 12c829: ff d0 call *%eax 12c82b: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 12c82e: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 12c832: 74 19 je 12c84d rtems_filesystem_freenode( &parentloc ); 12c834: 8b 45 e0 mov -0x20(%ebp),%eax 12c837: 85 c0 test %eax,%eax 12c839: 74 12 je 12c84d <== ALWAYS TAKEN 12c83b: 8b 40 1c mov 0x1c(%eax),%eax 12c83e: 85 c0 test %eax,%eax 12c840: 74 0b je 12c84d <== ALWAYS TAKEN 12c842: 83 ec 0c sub $0xc,%esp 12c845: ff 75 b4 pushl -0x4c(%ebp) 12c848: ff d0 call *%eax 12c84a: 83 c4 10 add $0x10,%esp return result; } 12c84d: 89 d8 mov %ebx,%eax 12c84f: 8d 65 f4 lea -0xc(%ebp),%esp 12c852: 5b pop %ebx 12c853: 5e pop %esi 12c854: 5f pop %edi 12c855: c9 leave 12c856: c3 ret 12c857: 90 nop <== NOT EXECUTED */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 12c858: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED 12c85b: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED 12c85e: 8b 35 84 92 16 00 mov 0x169284,%esi <== NOT EXECUTED 12c864: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 12c867: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 12c86c: 89 c7 mov %eax,%edi <== NOT EXECUTED 12c86e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 12c870: c6 45 b3 00 movb $0x0,-0x4d(%ebp) <== NOT EXECUTED 12c874: e9 0e ff ff ff jmp 12c787 <== NOT EXECUTED 12c879: 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 ); 12c87c: 8b 45 cc mov -0x34(%ebp),%eax 12c87f: 85 c0 test %eax,%eax 12c881: 74 10 je 12c893 <== ALWAYS TAKEN 12c883: 8b 40 1c mov 0x1c(%eax),%eax 12c886: 85 c0 test %eax,%eax 12c888: 74 09 je 12c893 <== ALWAYS TAKEN 12c88a: 83 ec 0c sub $0xc,%esp 12c88d: 56 push %esi 12c88e: ff d0 call *%eax 12c890: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 12c893: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 12c897: 74 19 je 12c8b2 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 12c899: 8b 45 e0 mov -0x20(%ebp),%eax 12c89c: 85 c0 test %eax,%eax 12c89e: 74 12 je 12c8b2 <== ALWAYS TAKEN 12c8a0: 8b 40 1c mov 0x1c(%eax),%eax 12c8a3: 85 c0 test %eax,%eax 12c8a5: 74 0b je 12c8b2 <== ALWAYS TAKEN 12c8a7: 83 ec 0c sub $0xc,%esp 12c8aa: ff 75 b4 pushl -0x4c(%ebp) 12c8ad: ff d0 call *%eax 12c8af: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 12c8b2: e8 75 5f 01 00 call 14282c <__errno> 12c8b7: c7 00 14 00 00 00 movl $0x14,(%eax) 12c8bd: bb ff ff ff ff mov $0xffffffff,%ebx 12c8c2: eb 89 jmp 12c84d 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 ) 12c8c4: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 12c8c8: 0f 85 8b 00 00 00 jne 12c959 <== ALWAYS TAKEN result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 12c8ce: bb ff ff ff ff mov $0xffffffff,%ebx 12c8d3: e9 75 ff ff ff jmp 12c84d parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 12c8d8: 83 ec 0c sub $0xc,%esp 12c8db: 6a 00 push $0x0 12c8dd: 8d 45 d4 lea -0x2c(%ebp),%eax 12c8e0: 89 45 b4 mov %eax,-0x4c(%ebp) 12c8e3: 50 push %eax 12c8e4: 6a 02 push $0x2 12c8e6: 53 push %ebx 12c8e7: 52 push %edx 12c8e8: 89 55 ac mov %edx,-0x54(%ebp) 12c8eb: e8 58 f4 fd ff call 10bd48 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 12c8f0: 83 c4 20 add $0x20,%esp 12c8f3: 85 c0 test %eax,%eax 12c8f5: 8b 55 ac mov -0x54(%ebp),%edx 12c8f8: 75 d4 jne 12c8ce <== ALWAYS TAKEN 12c8fa: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 12c8fe: e9 84 fe ff ff jmp 12c787 12c903: 90 nop <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 12c904: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 12c907: 85 c0 test %eax,%eax <== NOT EXECUTED 12c909: 74 10 je 12c91b <== NOT EXECUTED 12c90b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c90e: 85 c0 test %eax,%eax <== NOT EXECUTED 12c910: 74 09 je 12c91b <== NOT EXECUTED 12c912: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c915: 56 push %esi <== NOT EXECUTED 12c916: ff d0 call *%eax <== NOT EXECUTED 12c918: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 12c91b: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED 12c91f: 74 19 je 12c93a <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 12c921: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12c924: 85 c0 test %eax,%eax <== NOT EXECUTED 12c926: 74 12 je 12c93a <== NOT EXECUTED 12c928: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c92b: 85 c0 test %eax,%eax <== NOT EXECUTED 12c92d: 74 0b je 12c93a <== NOT EXECUTED 12c92f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c932: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 12c935: ff d0 call *%eax <== NOT EXECUTED 12c937: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12c93a: e8 ed 5e 01 00 call 14282c <__errno> <== NOT EXECUTED 12c93f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12c945: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 12c94a: e9 fe fe ff ff jmp 12c84d <== NOT EXECUTED 12c94f: 90 nop <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 12c950: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12c953: 85 c0 test %eax,%eax <== NOT EXECUTED 12c955: 75 bb jne 12c912 <== NOT EXECUTED 12c957: eb c2 jmp 12c91b <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 12c959: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12c95c: 85 c0 test %eax,%eax <== NOT EXECUTED 12c95e: 0f 84 6a ff ff ff je 12c8ce <== NOT EXECUTED 12c964: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c967: 85 c0 test %eax,%eax <== NOT EXECUTED 12c969: 0f 84 5f ff ff ff je 12c8ce <== NOT EXECUTED 12c96f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c972: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 12c975: ff d0 call *%eax <== NOT EXECUTED 12c977: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 12c97a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c97d: e9 cb fe ff ff jmp 12c84d <== NOT EXECUTED 001121dc : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 1121dc: 55 push %ebp 1121dd: 89 e5 mov %esp,%ebp 1121df: 57 push %edi 1121e0: 56 push %esi 1121e1: 53 push %ebx 1121e2: 83 ec 1c sub $0x1c,%esp 1121e5: 8b 7d 0c mov 0xc(%ebp),%edi 1121e8: 31 f6 xor %esi,%esi 1121ea: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1121f1: bb 01 00 00 00 mov $0x1,%ebx 1121f6: eb 08 jmp 112200 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 1121f8: d1 e3 shl %ebx 1121fa: 46 inc %esi 1121fb: 83 fe 20 cmp $0x20,%esi 1121fe: 74 1e je 11221e if (b & remote_value) 112200: 85 fb test %edi,%ebx 112202: 74 f4 je 1121f8 local_value |= rtems_assoc_local_by_remote(ap, b); 112204: 83 ec 08 sub $0x8,%esp 112207: 53 push %ebx 112208: ff 75 08 pushl 0x8(%ebp) 11220b: e8 1c 00 00 00 call 11222c 112210: 09 45 e4 or %eax,-0x1c(%ebp) 112213: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 112216: d1 e3 shl %ebx 112218: 46 inc %esi 112219: 83 fe 20 cmp $0x20,%esi 11221c: 75 e2 jne 112200 <== NEVER TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 11221e: 8b 45 e4 mov -0x1c(%ebp),%eax 112221: 8d 65 f4 lea -0xc(%ebp),%esp 112224: 5b pop %ebx 112225: 5e pop %esi 112226: 5f pop %edi 112227: c9 leave 112228: c3 ret 00119110 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 119110: 55 push %ebp <== NOT EXECUTED 119111: 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; } 119113: b8 c0 d3 12 00 mov $0x12d3c0,%eax <== NOT EXECUTED 119118: c9 leave <== NOT EXECUTED 119119: c3 ret <== NOT EXECUTED 00115c88 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 115c88: 55 push %ebp 115c89: 89 e5 mov %esp,%ebp 115c8b: 53 push %ebx 115c8c: 83 ec 0c sub $0xc,%esp 115c8f: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 115c92: 53 push %ebx 115c93: ff 75 08 pushl 0x8(%ebp) 115c96: e8 1d 00 00 00 call 115cb8 if (nap) 115c9b: 83 c4 10 add $0x10,%esp 115c9e: 85 c0 test %eax,%eax 115ca0: 74 0a je 115cac <== ALWAYS TAKEN return nap->name; 115ca2: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 115ca4: 8b 5d fc mov -0x4(%ebp),%ebx 115ca7: c9 leave 115ca8: c3 ret 115ca9: 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); 115cac: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } 115caf: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 115cb2: 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); 115cb3: e9 58 34 00 00 jmp 119110 <== NOT EXECUTED 00113660 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 113660: 55 push %ebp 113661: 89 e5 mov %esp,%ebp 113663: 57 push %edi 113664: 56 push %esi 113665: 53 push %ebx 113666: 8b 45 08 mov 0x8(%ebp),%eax 113669: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 11366c: 8b 30 mov (%eax),%esi 11366e: 85 f6 test %esi,%esi 113670: 74 3e je 1136b0 <== ALWAYS TAKEN 113672: bf cd 14 12 00 mov $0x1214cd,%edi 113677: b9 0a 00 00 00 mov $0xa,%ecx 11367c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 11367e: 74 18 je 113698 <== ALWAYS TAKEN 113680: 31 c9 xor %ecx,%ecx 113682: eb 09 jmp 11368d default_ap = ap++; for ( ; ap->name; ap++) 113684: 83 c0 0c add $0xc,%eax 113687: 8b 18 mov (%eax),%ebx 113689: 85 db test %ebx,%ebx 11368b: 74 1b je 1136a8 if (ap->local_value == local_value) 11368d: 39 50 04 cmp %edx,0x4(%eax) 113690: 75 f2 jne 113684 return ap; return default_ap; } 113692: 5b pop %ebx 113693: 5e pop %esi 113694: 5f pop %edi 113695: c9 leave 113696: c3 ret 113697: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 113698: 8d 58 0c lea 0xc(%eax),%ebx <== NOT EXECUTED for ( ; ap->name; ap++) 11369b: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED 11369e: 85 f6 test %esi,%esi <== NOT EXECUTED 1136a0: 74 f0 je 113692 <== NOT EXECUTED 1136a2: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1136a4: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1136a6: eb e5 jmp 11368d <== NOT EXECUTED 1136a8: 89 c8 mov %ecx,%eax if (ap->local_value == local_value) return ap; return default_ap; } 1136aa: 5b pop %ebx 1136ab: 5e pop %esi 1136ac: 5f pop %edi 1136ad: c9 leave 1136ae: c3 ret 1136af: 90 nop <== NOT EXECUTED uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 1136b0: 31 c0 xor %eax,%eax <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 1136b2: 5b pop %ebx <== NOT EXECUTED 1136b3: 5e pop %esi <== NOT EXECUTED 1136b4: 5f pop %edi <== NOT EXECUTED 1136b5: c9 leave <== NOT EXECUTED 1136b6: c3 ret <== NOT EXECUTED 0011224c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 11224c: 55 push %ebp 11224d: 89 e5 mov %esp,%ebp 11224f: 57 push %edi 112250: 56 push %esi 112251: 53 push %ebx 112252: 8b 45 08 mov 0x8(%ebp),%eax 112255: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 112258: 8b 30 mov (%eax),%esi 11225a: 85 f6 test %esi,%esi 11225c: 74 3e je 11229c <== ALWAYS TAKEN 11225e: bf cd 14 12 00 mov $0x1214cd,%edi 112263: b9 0a 00 00 00 mov $0xa,%ecx 112268: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 11226a: 74 18 je 112284 <== ALWAYS TAKEN 11226c: 31 c9 xor %ecx,%ecx 11226e: eb 09 jmp 112279 default_ap = ap++; for ( ; ap->name; ap++) 112270: 83 c0 0c add $0xc,%eax 112273: 8b 18 mov (%eax),%ebx 112275: 85 db test %ebx,%ebx 112277: 74 1b je 112294 if (ap->remote_value == remote_value) 112279: 39 50 08 cmp %edx,0x8(%eax) 11227c: 75 f2 jne 112270 return ap; return default_ap; } 11227e: 5b pop %ebx 11227f: 5e pop %esi 112280: 5f pop %edi 112281: c9 leave 112282: c3 ret 112283: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 112284: 8d 58 0c lea 0xc(%eax),%ebx <== NOT EXECUTED for ( ; ap->name; ap++) 112287: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED 11228a: 85 f6 test %esi,%esi <== NOT EXECUTED 11228c: 74 f0 je 11227e <== NOT EXECUTED 11228e: 89 c1 mov %eax,%ecx <== NOT EXECUTED 112290: 89 d8 mov %ebx,%eax <== NOT EXECUTED 112292: eb e5 jmp 112279 <== NOT EXECUTED 112294: 89 c8 mov %ecx,%eax if (ap->remote_value == remote_value) return ap; return default_ap; } 112296: 5b pop %ebx 112297: 5e pop %esi 112298: 5f pop %edi 112299: c9 leave 11229a: c3 ret 11229b: 90 nop <== NOT EXECUTED uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 11229c: 31 c0 xor %eax,%eax <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 11229e: 5b pop %ebx <== NOT EXECUTED 11229f: 5e pop %esi <== NOT EXECUTED 1122a0: 5f pop %edi <== NOT EXECUTED 1122a1: c9 leave <== NOT EXECUTED 1122a2: c3 ret <== NOT EXECUTED 00112ecc : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 112ecc: 55 push %ebp <== NOT EXECUTED 112ecd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 112ecf: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 112ed2: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 112ed5: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 112ed8: e8 83 07 00 00 call 113660 <== NOT EXECUTED if (nap) 112edd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112ee0: 85 c0 test %eax,%eax <== NOT EXECUTED 112ee2: 74 03 je 112ee7 <== NOT EXECUTED return nap->remote_value; 112ee4: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED return 0; } 112ee7: c9 leave <== NOT EXECUTED 112ee8: c3 ret <== NOT EXECUTED 001125ec : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 1125ec: 55 push %ebp 1125ed: 89 e5 mov %esp,%ebp 1125ef: 57 push %edi 1125f0: 56 push %esi 1125f1: 53 push %ebx 1125f2: 83 ec 2c sub $0x2c,%esp 1125f5: 8b 5d 08 mov 0x8(%ebp),%ebx 1125f8: 8b 7d 0c mov 0xc(%ebp),%edi 1125fb: 8b 45 10 mov 0x10(%ebp),%eax 1125fe: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 112601: 85 db test %ebx,%ebx 112603: 0f 84 87 00 00 00 je 112690 return RTEMS_INVALID_NAME; if ( !id ) 112609: 85 f6 test %esi,%esi 11260b: 0f 84 bb 00 00 00 je 1126cc <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 112611: f7 c7 10 00 00 00 test $0x10,%edi 112617: 0f 84 83 00 00 00 je 1126a0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 11261d: 85 c0 test %eax,%eax 11261f: 0f 84 87 00 00 00 je 1126ac if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 112625: 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; 11262c: 89 45 e4 mov %eax,-0x1c(%ebp) 11262f: a1 f8 73 12 00 mov 0x1273f8,%eax 112634: 40 inc %eax 112635: a3 f8 73 12 00 mov %eax,0x1273f8 * 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 ); 11263a: 83 ec 0c sub $0xc,%esp 11263d: 68 60 7e 12 00 push $0x127e60 112642: e8 e9 a1 ff ff call 10c830 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 112647: 83 c4 10 add $0x10,%esp 11264a: 85 c0 test %eax,%eax 11264c: 74 6a je 1126b8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 11264e: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 112651: 83 ec 08 sub $0x8,%esp 112654: 8d 55 e0 lea -0x20(%ebp),%edx 112657: 52 push %edx 112658: 8d 50 14 lea 0x14(%eax),%edx 11265b: 52 push %edx 11265c: 89 45 d4 mov %eax,-0x2c(%ebp) 11265f: e8 5c 04 00 00 call 112ac0 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 112664: 8b 45 d4 mov -0x2c(%ebp),%eax 112667: 8b 50 08 mov 0x8(%eax),%edx 11266a: 0f b7 fa movzwl %dx,%edi 11266d: 8b 0d 7c 7e 12 00 mov 0x127e7c,%ecx 112673: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 112676: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 112679: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 11267b: e8 d4 ae ff ff call 10d554 <_Thread_Enable_dispatch> 112680: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 112682: 83 c4 10 add $0x10,%esp } 112685: 8d 65 f4 lea -0xc(%ebp),%esp 112688: 5b pop %ebx 112689: 5e pop %esi 11268a: 5f pop %edi 11268b: c9 leave 11268c: c3 ret 11268d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 112690: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112695: 8d 65 f4 lea -0xc(%ebp),%esp 112698: 5b pop %ebx 112699: 5e pop %esi 11269a: 5f pop %edi 11269b: c9 leave 11269c: c3 ret 11269d: 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; 1126a0: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 1126a7: eb 83 jmp 11262c 1126a9: 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 ) 1126ac: b0 0a mov $0xa,%al *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1126ae: 8d 65 f4 lea -0xc(%ebp),%esp 1126b1: 5b pop %ebx 1126b2: 5e pop %esi 1126b3: 5f pop %edi 1126b4: c9 leave 1126b5: c3 ret 1126b6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 1126b8: e8 97 ae ff ff call 10d554 <_Thread_Enable_dispatch> 1126bd: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1126c2: 8d 65 f4 lea -0xc(%ebp),%esp 1126c5: 5b pop %ebx 1126c6: 5e pop %esi 1126c7: 5f pop %edi 1126c8: c9 leave 1126c9: c3 ret 1126ca: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 1126cc: b8 09 00 00 00 mov $0x9,%eax 1126d1: eb b2 jmp 112685 001126d4 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 1126d4: 55 push %ebp 1126d5: 89 e5 mov %esp,%ebp 1126d7: 53 push %ebx 1126d8: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 1126db: 8d 45 f4 lea -0xc(%ebp),%eax 1126de: 50 push %eax 1126df: ff 75 08 pushl 0x8(%ebp) 1126e2: 68 60 7e 12 00 push $0x127e60 1126e7: e8 f4 a5 ff ff call 10cce0 <_Objects_Get> 1126ec: 89 c3 mov %eax,%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1126ee: 83 c4 10 add $0x10,%esp 1126f1: 8b 4d f4 mov -0xc(%ebp),%ecx 1126f4: 85 c9 test %ecx,%ecx 1126f6: 75 38 jne 112730 case OBJECTS_LOCAL: _CORE_barrier_Flush( 1126f8: 52 push %edx 1126f9: 6a 02 push $0x2 1126fb: 6a 00 push $0x0 1126fd: 8d 40 14 lea 0x14(%eax),%eax 112700: 50 push %eax 112701: e8 ba b5 ff ff call 10dcc0 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 112706: 59 pop %ecx 112707: 58 pop %eax 112708: 53 push %ebx 112709: 68 60 7e 12 00 push $0x127e60 11270e: e8 99 a1 ff ff call 10c8ac <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 112713: 58 pop %eax 112714: 5a pop %edx 112715: 53 push %ebx 112716: 68 60 7e 12 00 push $0x127e60 11271b: e8 90 a4 ff ff call 10cbb0 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 112720: e8 2f ae ff ff call 10d554 <_Thread_Enable_dispatch> 112725: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 112727: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11272a: 8b 5d fc mov -0x4(%ebp),%ebx 11272d: c9 leave 11272e: c3 ret 11272f: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 112730: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112735: 8b 5d fc mov -0x4(%ebp),%ebx 112738: c9 leave 112739: c3 ret 001127a0 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 1127a0: 55 push %ebp 1127a1: 89 e5 mov %esp,%ebp 1127a3: 53 push %ebx 1127a4: 83 ec 18 sub $0x18,%esp 1127a7: 8b 5d 08 mov 0x8(%ebp),%ebx 1127aa: 8d 45 f4 lea -0xc(%ebp),%eax 1127ad: 50 push %eax 1127ae: 53 push %ebx 1127af: 68 60 7e 12 00 push $0x127e60 1127b4: e8 27 a5 ff ff call 10cce0 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1127b9: 83 c4 10 add $0x10,%esp 1127bc: 8b 55 f4 mov -0xc(%ebp),%edx 1127bf: 85 d2 test %edx,%edx 1127c1: 75 35 jne 1127f8 case OBJECTS_LOCAL: _CORE_barrier_Wait( 1127c3: 83 ec 0c sub $0xc,%esp 1127c6: 6a 00 push $0x0 1127c8: ff 75 0c pushl 0xc(%ebp) 1127cb: 6a 01 push $0x1 1127cd: 53 push %ebx 1127ce: 83 c0 14 add $0x14,%eax 1127d1: 50 push %eax 1127d2: e8 4d 03 00 00 call 112b24 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 1127d7: 83 c4 20 add $0x20,%esp 1127da: e8 75 ad ff ff call 10d554 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 1127df: 83 ec 0c sub $0xc,%esp 1127e2: a1 b8 74 12 00 mov 0x1274b8,%eax 1127e7: ff 70 34 pushl 0x34(%eax) 1127ea: e8 61 0e 00 00 call 113650 <_Barrier_Translate_core_barrier_return_code> 1127ef: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1127f2: 8b 5d fc mov -0x4(%ebp),%ebx 1127f5: c9 leave 1127f6: c3 ret 1127f7: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1127f8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1127fd: 8b 5d fc mov -0x4(%ebp),%ebx 112800: c9 leave 112801: c3 ret 00108098 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 108098: 55 push %ebp 108099: 89 e5 mov %esp,%ebp 10809b: 57 push %edi 10809c: 56 push %esi 10809d: 53 push %ebx 10809e: 83 ec 1c sub $0x1c,%esp 1080a1: 8b 45 08 mov 0x8(%ebp),%eax 1080a4: 8b 5d 0c mov 0xc(%ebp),%ebx 1080a7: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 1080aa: 85 c0 test %eax,%eax 1080ac: 75 0e jne 1080bc int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !length ) 1080c0: 85 f6 test %esi,%esi 1080c2: 74 ea je 1080ae return NULL; value[0] = '\0'; 1080c4: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 1080c7: 83 ec 0c sub $0xc,%esp 1080ca: 50 push %eax 1080cb: e8 48 00 00 00 call 108118 if ( !p ) 1080d0: 83 c4 10 add $0x10,%esp 1080d3: 85 c0 test %eax,%eax 1080d5: 74 d7 je 1080ae int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== ALWAYS TAKEN 1080dd: 4e dec %esi 1080de: 89 75 e4 mov %esi,-0x1c(%ebp) 1080e1: 74 cd je 1080b0 <== ALWAYS TAKEN 1080e3: 31 f6 xor %esi,%esi 1080e5: 31 d2 xor %edx,%edx 1080e7: 31 ff xor %edi,%edi 1080e9: eb 24 jmp 10810f 1080eb: 90 nop <== NOT EXECUTED if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 1080ec: f7 c7 01 00 00 00 test $0x1,%edi 1080f2: 75 05 jne 1080f9 1080f4: 80 f9 20 cmp $0x20,%cl 1080f7: 74 b7 je 1080b0 break; value[i++] = *p++; 1080f9: 88 0c 33 mov %cl,(%ebx,%esi,1) 1080fc: 42 inc %edx 1080fd: 89 d6 mov %edx,%esi value[i] = '\0'; 1080ff: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 10810a: 3b 55 e4 cmp -0x1c(%ebp),%edx 10810d: 73 a1 jae 1080b0 <== ALWAYS TAKEN if ( *p == '\"' ) { 10810f: 80 f9 22 cmp $0x22,%cl 108112: 75 d8 jne 1080ec quotes++; 108114: 47 inc %edi 108115: eb e2 jmp 1080f9 00108118 : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 108118: 55 push %ebp 108119: 89 e5 mov %esp,%ebp 10811b: 83 ec 08 sub $0x8,%esp 10811e: 8b 45 08 mov 0x8(%ebp),%eax const char *p; if ( !name ) 108121: 85 c0 test %eax,%eax 108123: 75 07 jne 10812c if ( !bsp_boot_cmdline ) return NULL; p = strstr(bsp_boot_cmdline, name); /* printf( "raw: %p (%s)\n", p, p ); */ return p; 108125: 31 c0 xor %eax,%eax } 108127: c9 leave 108128: c3 ret 108129: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const char *p; if ( !name ) return NULL; if ( !bsp_boot_cmdline ) 10812c: 8b 15 b8 70 12 00 mov 0x1270b8,%edx 108132: 85 d2 test %edx,%edx 108134: 74 ef je 108125 return NULL; p = strstr(bsp_boot_cmdline, name); 108136: 83 ec 08 sub $0x8,%esp 108139: 50 push %eax 10813a: 52 push %edx 10813b: e8 e0 cb 00 00 call 114d20 108140: 83 c4 10 add $0x10,%esp /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 108143: c9 leave 108144: c3 ret 00108148 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 108148: 55 push %ebp 108149: 89 e5 mov %esp,%ebp 10814b: 57 push %edi 10814c: 53 push %ebx 10814d: 8b 7d 08 mov 0x8(%ebp),%edi 108150: 8b 5d 0c mov 0xc(%ebp),%ebx const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 108153: 50 push %eax 108154: ff 75 10 pushl 0x10(%ebp) 108157: 53 push %ebx 108158: 57 push %edi 108159: e8 3a ff ff ff call 108098 10815e: 89 c2 mov %eax,%edx if ( !p ) 108160: 83 c4 10 add $0x10,%esp 108163: 85 c0 test %eax,%eax 108165: 75 0d jne 108174 *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 108167: 31 db xor %ebx,%ebx } 108169: 89 d8 mov %ebx,%eax 10816b: 8d 65 f8 lea -0x8(%ebp),%esp 10816e: 5b pop %ebx 10816f: 5f pop %edi 108170: c9 leave 108171: c3 ret 108172: 66 90 xchg %ax,%ax <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 108174: 31 c0 xor %eax,%eax 108176: b9 ff ff ff ff mov $0xffffffff,%ecx 10817b: f2 ae repnz scas %es:(%edi),%al 10817d: f7 d1 not %ecx 10817f: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax if ( *rhs != '=' ) 108183: 80 38 3d cmpb $0x3d,(%eax) 108186: 75 df jne 108167 <== ALWAYS TAKEN return NULL; rhs++; 108188: 8d 48 01 lea 0x1(%eax),%ecx if ( *rhs == '\"' ) 10818b: 8a 50 01 mov 0x1(%eax),%dl 10818e: 80 fa 22 cmp $0x22,%dl 108191: 74 2d je 1081c0 rhs++; for ( d=value ; *rhs ; ) 108193: 84 d2 test %dl,%dl 108195: 74 31 je 1081c8 108197: 89 d8 mov %ebx,%eax 108199: 8d 76 00 lea 0x0(%esi),%esi *d++ = *rhs++; 10819c: 88 10 mov %dl,(%eax) 10819e: 40 inc %eax 10819f: 41 inc %ecx return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1081a0: 8a 11 mov (%ecx),%dl 1081a2: 84 d2 test %dl,%dl 1081a4: 75 f6 jne 10819c *d++ = *rhs++; if ( *(d-1) == '\"' ) 1081a6: 8d 50 ff lea -0x1(%eax),%edx 1081a9: 80 78 ff 22 cmpb $0x22,-0x1(%eax) 1081ad: 74 02 je 1081b1 1081af: 89 c2 mov %eax,%edx d--; *d = '\0'; 1081b1: c6 02 00 movb $0x0,(%edx) return value; } 1081b4: 89 d8 mov %ebx,%eax 1081b6: 8d 65 f8 lea -0x8(%ebp),%esp 1081b9: 5b pop %ebx 1081ba: 5f pop %edi 1081bb: c9 leave 1081bc: c3 ret 1081bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 1081c0: 8d 48 02 lea 0x2(%eax),%ecx 1081c3: 8a 50 02 mov 0x2(%eax),%dl 1081c6: eb cb jmp 108193 for ( d=value ; *rhs ; ) 1081c8: 89 d8 mov %ebx,%eax 1081ca: eb da jmp 1081a6 0010f5a8 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 10f5a8: 55 push %ebp 10f5a9: 89 e5 mov %esp,%ebp 10f5ab: 53 push %ebx 10f5ac: 83 ec 04 sub $0x4,%esp 10f5af: 8b 45 08 mov 0x8(%ebp),%eax 10f5b2: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 10f5b5: 85 db test %ebx,%ebx 10f5b7: 74 3b je 10f5f4 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 10f5b9: 85 c0 test %eax,%eax 10f5bb: 74 2b je 10f5e8 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 10f5bd: 83 f8 01 cmp $0x1,%eax 10f5c0: 74 3e je 10f600 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 10f5c2: 83 f8 02 cmp $0x2,%eax 10f5c5: 74 45 je 10f60c *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 10f5c7: 83 f8 03 cmp $0x3,%eax 10f5ca: 74 4c je 10f618 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 10f5cc: 83 f8 04 cmp $0x4,%eax 10f5cf: 74 0b je 10f5dc 10f5d1: b8 0a 00 00 00 mov $0xa,%eax return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 10f5d6: 5a pop %edx 10f5d7: 5b pop %ebx 10f5d8: c9 leave 10f5d9: c3 ret 10f5da: 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 ); 10f5dc: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 10f5df: 59 pop %ecx 10f5e0: 5b pop %ebx 10f5e1: 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 ); 10f5e2: e9 49 01 00 00 jmp 10f730 10f5e7: 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 ); 10f5e8: 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; } 10f5eb: 58 pop %eax 10f5ec: 5b pop %ebx 10f5ed: 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 ); 10f5ee: e9 7d 00 00 00 jmp 10f670 10f5f3: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) 10f5f4: 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; } 10f5f9: 5a pop %edx 10f5fa: 5b pop %ebx 10f5fb: c9 leave 10f5fc: c3 ret 10f5fd: 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); 10f600: 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; } 10f603: 5b pop %ebx 10f604: 5b pop %ebx 10f605: 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); 10f606: e9 19 00 00 00 jmp 10f624 10f60b: 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(); 10f60c: e8 53 00 00 00 call 10f664 10f611: 89 03 mov %eax,(%ebx) 10f613: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f615: eb bf jmp 10f5d6 10f617: 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(); 10f618: e8 33 00 00 00 call 10f650 10f61d: 89 03 mov %eax,(%ebx) 10f61f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f621: eb b3 jmp 10f5d6 0010bf34 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10bf34: 55 push %ebp 10bf35: 89 e5 mov %esp,%ebp 10bf37: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10bf3a: 85 c0 test %eax,%eax 10bf3c: 74 1e je 10bf5c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10bf3e: 80 3d 4c 22 13 00 00 cmpb $0x0,0x13224c 10bf45: 74 0d je 10bf54 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10bf47: 8b 15 cc 22 13 00 mov 0x1322cc,%edx 10bf4d: 89 10 mov %edx,(%eax) 10bf4f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10bf51: c9 leave 10bf52: c3 ret 10bf53: 90 nop <== NOT EXECUTED ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10bf54: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10bf59: c9 leave 10bf5a: c3 ret 10bf5b: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) 10bf5c: b0 09 mov $0x9,%al if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10bf5e: c9 leave 10bf5f: c3 ret 0010bf80 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 10bf80: 55 push %ebp 10bf81: 89 e5 mov %esp,%ebp 10bf83: 56 push %esi 10bf84: 53 push %ebx 10bf85: 83 ec 50 sub $0x50,%esp 10bf88: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10bf8b: 85 db test %ebx,%ebx 10bf8d: 0f 84 a1 00 00 00 je 10c034 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10bf93: 80 3d 4c 22 13 00 00 cmpb $0x0,0x13224c 10bf9a: 75 0c jne 10bfa8 10bf9c: 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; } 10bfa1: 8d 65 f8 lea -0x8(%ebp),%esp 10bfa4: 5b pop %ebx 10bfa5: 5e pop %esi 10bfa6: c9 leave 10bfa7: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10bfa8: 9c pushf 10bfa9: fa cli 10bfaa: 5e pop %esi _TOD_Get( &now ); 10bfab: 83 ec 0c sub $0xc,%esp 10bfae: 8d 45 e8 lea -0x18(%ebp),%eax 10bfb1: 50 push %eax 10bfb2: e8 31 19 00 00 call 10d8e8 <_TOD_Get> _ISR_Enable(level); 10bfb7: 56 push %esi 10bfb8: 9d popf useconds = (suseconds_t)now.tv_nsec; 10bfb9: 8b 4d ec mov -0x14(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10bfbc: 8b 45 e8 mov -0x18(%ebp),%eax 10bfbf: 89 45 f0 mov %eax,-0x10(%ebp) time->tv_usec = useconds; 10bfc2: be d3 4d 62 10 mov $0x10624dd3,%esi 10bfc7: 89 c8 mov %ecx,%eax 10bfc9: f7 ee imul %esi 10bfcb: 89 45 b0 mov %eax,-0x50(%ebp) 10bfce: 89 55 b4 mov %edx,-0x4c(%ebp) 10bfd1: 8b 75 b4 mov -0x4c(%ebp),%esi 10bfd4: c1 fe 06 sar $0x6,%esi 10bfd7: 89 c8 mov %ecx,%eax 10bfd9: 99 cltd 10bfda: 29 d6 sub %edx,%esi 10bfdc: 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 ); 10bfdf: 58 pop %eax 10bfe0: 5a pop %edx 10bfe1: 8d 45 c4 lea -0x3c(%ebp),%eax 10bfe4: 50 push %eax 10bfe5: 8d 45 f0 lea -0x10(%ebp),%eax 10bfe8: 50 push %eax 10bfe9: e8 82 96 00 00 call 115670 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 10bfee: 8b 45 d8 mov -0x28(%ebp),%eax 10bff1: 05 6c 07 00 00 add $0x76c,%eax 10bff6: 89 03 mov %eax,(%ebx) tmbuf->month = time.tm_mon + 1; 10bff8: 8b 45 d4 mov -0x2c(%ebp),%eax 10bffb: 40 inc %eax 10bffc: 89 43 04 mov %eax,0x4(%ebx) tmbuf->day = time.tm_mday; 10bfff: 8b 45 d0 mov -0x30(%ebp),%eax 10c002: 89 43 08 mov %eax,0x8(%ebx) tmbuf->hour = time.tm_hour; 10c005: 8b 45 cc mov -0x34(%ebp),%eax 10c008: 89 43 0c mov %eax,0xc(%ebx) tmbuf->minute = time.tm_min; 10c00b: 8b 45 c8 mov -0x38(%ebp),%eax 10c00e: 89 43 10 mov %eax,0x10(%ebx) tmbuf->second = time.tm_sec; 10c011: 8b 45 c4 mov -0x3c(%ebp),%eax 10c014: 89 43 14 mov %eax,0x14(%ebx) tmbuf->ticks = now.tv_usec / 10c017: 8b 45 f4 mov -0xc(%ebp),%eax 10c01a: 31 d2 xor %edx,%edx 10c01c: f7 35 2c 62 12 00 divl 0x12622c 10c022: 89 43 18 mov %eax,0x18(%ebx) 10c025: 31 c0 xor %eax,%eax rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 10c027: 83 c4 10 add $0x10,%esp } 10c02a: 8d 65 f8 lea -0x8(%ebp),%esp 10c02d: 5b pop %ebx 10c02e: 5e pop %esi 10c02f: c9 leave 10c030: c3 ret 10c031: 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 ) 10c034: b8 09 00 00 00 mov $0x9,%eax 10c039: e9 63 ff ff ff jmp 10bfa1 0010f730 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 10f730: 55 push %ebp 10f731: 89 e5 mov %esp,%ebp 10f733: 56 push %esi 10f734: 53 push %ebx 10f735: 83 ec 20 sub $0x20,%esp 10f738: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 10f73b: 85 db test %ebx,%ebx 10f73d: 74 59 je 10f798 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10f73f: 80 3d 0c ef 16 00 00 cmpb $0x0,0x16ef0c 10f746: 75 0c jne 10f754 10f748: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 10f74d: 8d 65 f8 lea -0x8(%ebp),%esp 10f750: 5b pop %ebx 10f751: 5e pop %esi 10f752: c9 leave 10f753: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10f754: 9c pushf 10f755: fa cli 10f756: 5e pop %esi _TOD_Get( &now ); 10f757: 83 ec 0c sub $0xc,%esp 10f75a: 8d 45 f0 lea -0x10(%ebp),%eax 10f75d: 50 push %eax 10f75e: e8 39 19 00 00 call 11109c <_TOD_Get> _ISR_Enable(level); 10f763: 56 push %esi 10f764: 9d popf useconds = (suseconds_t)now.tv_nsec; 10f765: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10f768: 8b 45 f0 mov -0x10(%ebp),%eax 10f76b: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 10f76d: be d3 4d 62 10 mov $0x10624dd3,%esi 10f772: 89 c8 mov %ecx,%eax 10f774: f7 ee imul %esi 10f776: 89 45 e0 mov %eax,-0x20(%ebp) 10f779: 89 55 e4 mov %edx,-0x1c(%ebp) 10f77c: 8b 75 e4 mov -0x1c(%ebp),%esi 10f77f: c1 fe 06 sar $0x6,%esi 10f782: 89 c8 mov %ecx,%eax 10f784: 99 cltd 10f785: 29 d6 sub %edx,%esi 10f787: 89 73 04 mov %esi,0x4(%ebx) 10f78a: 31 c0 xor %eax,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 10f78c: 83 c4 10 add $0x10,%esp } 10f78f: 8d 65 f8 lea -0x8(%ebp),%esp 10f792: 5b pop %ebx 10f793: 5e pop %esi 10f794: c9 leave 10f795: c3 ret 10f796: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 10f798: b8 09 00 00 00 mov $0x9,%eax 10f79d: eb ae jmp 10f74d 0012d934 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 12d934: 55 push %ebp 12d935: 89 e5 mov %esp,%ebp 12d937: 83 ec 08 sub $0x8,%esp 12d93a: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 12d93d: 85 c0 test %eax,%eax 12d93f: 74 13 je 12d954 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 12d941: 83 ec 0c sub $0xc,%esp 12d944: 50 push %eax 12d945: e8 e2 0f 00 00 call 12e92c <_TOD_Get_uptime_as_timespec> 12d94a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12d94c: 83 c4 10 add $0x10,%esp } 12d94f: c9 leave 12d950: c3 ret 12d951: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 12d954: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 12d956: c9 leave 12d957: c3 ret 0010c058 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c058: 55 push %ebp 10c059: 89 e5 mov %esp,%ebp 10c05b: 53 push %ebx 10c05c: 83 ec 14 sub $0x14,%esp 10c05f: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c062: 85 db test %ebx,%ebx 10c064: 74 66 je 10c0cc return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c066: 83 ec 0c sub $0xc,%esp 10c069: 53 push %ebx 10c06a: e8 39 01 00 00 call 10c1a8 <_TOD_Validate> 10c06f: 83 c4 10 add $0x10,%esp 10c072: 84 c0 test %al,%al 10c074: 75 0a jne 10c080 10c076: b8 14 00 00 00 mov $0x14,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c07b: 8b 5d fc mov -0x4(%ebp),%ebx 10c07e: c9 leave 10c07f: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c080: 83 ec 0c sub $0xc,%esp 10c083: 53 push %ebx 10c084: e8 93 00 00 00 call 10c11c <_TOD_To_seconds> 10c089: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c08c: 8b 43 18 mov 0x18(%ebx),%eax 10c08f: 0f af 05 2c 62 12 00 imul 0x12622c,%eax 10c096: 8d 04 80 lea (%eax,%eax,4),%eax 10c099: 8d 04 80 lea (%eax,%eax,4),%eax 10c09c: 8d 04 80 lea (%eax,%eax,4),%eax 10c09f: c1 e0 03 shl $0x3,%eax 10c0a2: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c0a5: a1 38 22 13 00 mov 0x132238,%eax 10c0aa: 40 inc %eax 10c0ab: a3 38 22 13 00 mov %eax,0x132238 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c0b0: 8d 45 f0 lea -0x10(%ebp),%eax 10c0b3: 89 04 24 mov %eax,(%esp) 10c0b6: e8 11 19 00 00 call 10d9cc <_TOD_Set> _Thread_Enable_dispatch(); 10c0bb: e8 20 2c 00 00 call 10ece0 <_Thread_Enable_dispatch> 10c0c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c0c2: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10c0c5: 8b 5d fc mov -0x4(%ebp),%ebx 10c0c8: c9 leave 10c0c9: c3 ret 10c0ca: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 10c0cc: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c0d1: 8b 5d fc mov -0x4(%ebp),%ebx 10c0d4: c9 leave 10c0d5: c3 ret 0010af10 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10af10: 55 push %ebp 10af11: 89 e5 mov %esp,%ebp 10af13: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10af16: 85 c0 test %eax,%eax 10af18: 74 0a je 10af24 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10af1a: a3 c4 75 12 00 mov %eax,0x1275c4 10af1f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10af21: c9 leave 10af22: c3 ret 10af23: 90 nop <== NOT EXECUTED */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) 10af24: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10af26: c9 leave 10af27: c3 ret 0010af28 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10af28: 55 push %ebp 10af29: 89 e5 mov %esp,%ebp 10af2b: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10af2e: e8 c5 14 00 00 call 10c3f8 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10af33: 83 ec 0c sub $0xc,%esp 10af36: 68 d8 74 12 00 push $0x1274d8 10af3b: e8 2c 37 00 00 call 10e66c <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10af40: e8 a7 31 00 00 call 10e0ec <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10af45: a0 c8 74 12 00 mov 0x1274c8,%al if ( _Thread_Is_context_switch_necessary() && 10af4a: 83 c4 10 add $0x10,%esp 10af4d: 84 c0 test %al,%al 10af4f: 74 09 je 10af5a * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10af51: a1 f8 73 12 00 mov 0x1273f8,%eax 10af56: 85 c0 test %eax,%eax 10af58: 74 06 je 10af60 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10af5a: 31 c0 xor %eax,%eax 10af5c: c9 leave 10af5d: c3 ret 10af5e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10af60: e8 93 24 00 00 call 10d3f8 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10af65: 31 c0 xor %eax,%eax 10af67: c9 leave 10af68: c3 ret 001087cc : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1087cc: 55 push %ebp 1087cd: 89 e5 mov %esp,%ebp 1087cf: 57 push %edi 1087d0: 56 push %esi 1087d1: 53 push %ebx 1087d2: 83 ec 6c sub $0x6c,%esp 1087d5: 8b 7d 08 mov 0x8(%ebp),%edi Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1087d8: 8b 45 0c mov 0xc(%ebp),%eax 1087db: 85 c0 test %eax,%eax 1087dd: 0f 84 5f 01 00 00 je 108942 <== 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 ); 1087e3: 83 ec 0c sub $0xc,%esp 1087e6: 8d 45 d8 lea -0x28(%ebp),%eax 1087e9: 50 push %eax 1087ea: e8 51 51 00 00 call 10d940 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1087ef: 83 c4 0c add $0xc,%esp 1087f2: 8d 55 d0 lea -0x30(%ebp),%edx 1087f5: 52 push %edx 1087f6: 8d 4d d8 lea -0x28(%ebp),%ecx 1087f9: 51 push %ecx 1087fa: 68 4c 28 13 00 push $0x13284c 1087ff: e8 f0 73 00 00 call 10fbf4 <_Timespec_Subtract> } } } #endif (*print)( 108804: 5b pop %ebx 108805: 5e pop %esi 108806: 68 34 2f 12 00 push $0x122f34 10880b: 57 push %edi 10880c: ff 55 0c call *0xc(%ebp) 10880f: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp) 108816: 83 c4 10 add $0x10,%esp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 108819: 8b 5d a4 mov -0x5c(%ebp),%ebx 10881c: 8b 04 9d 0c 22 13 00 mov 0x13220c(,%ebx,4),%eax 108823: 85 c0 test %eax,%eax 108825: 0f 84 ed 00 00 00 je 108918 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10882b: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10882e: 85 f6 test %esi,%esi 108830: 0f 84 e2 00 00 00 je 108918 <== ALWAYS TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 108836: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10883b: 0f 84 d7 00 00 00 je 108918 108841: 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 ); 108846: 89 5d 94 mov %ebx,-0x6c(%ebp) 108849: eb 4b jmp 108896 10884b: 90 nop <== NOT EXECUTED }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 10884c: 8d 5d e0 lea -0x20(%ebp),%ebx 10884f: 53 push %ebx 108850: 8d 45 e4 lea -0x1c(%ebp),%eax 108853: 50 push %eax 108854: 8d 55 d0 lea -0x30(%ebp),%edx 108857: 52 push %edx 108858: 8d 4d c8 lea -0x38(%ebp),%ecx 10885b: 51 push %ecx 10885c: e8 bf 72 00 00 call 10fb20 <_Timespec_Divide> /* * Print the information */ (*print)( context, 108861: 58 pop %eax 108862: 5a pop %edx 108863: ff 75 e0 pushl -0x20(%ebp) 108866: ff 75 e4 pushl -0x1c(%ebp) 108869: ba d3 4d 62 10 mov $0x10624dd3,%edx 10886e: 8b 45 cc mov -0x34(%ebp),%eax 108871: f7 e2 mul %edx 108873: c1 ea 06 shr $0x6,%edx 108876: 52 push %edx 108877: ff 75 c8 pushl -0x38(%ebp) 10887a: 68 a7 31 12 00 push $0x1231a7 10887f: 57 push %edi 108880: ff 55 0c call *0xc(%ebp) 108883: 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++ ) { 108886: ff 45 94 incl -0x6c(%ebp) 108889: 0f b7 46 10 movzwl 0x10(%esi),%eax 10888d: 3b 45 94 cmp -0x6c(%ebp),%eax 108890: 0f 82 82 00 00 00 jb 108918 the_thread = (Thread_Control *)information->local_table[ i ]; 108896: 8b 46 1c mov 0x1c(%esi),%eax 108899: 8b 4d 94 mov -0x6c(%ebp),%ecx 10889c: 8b 14 88 mov (%eax,%ecx,4),%edx if ( !the_thread ) 10889f: 85 d2 test %edx,%edx 1088a1: 74 e3 je 108886 <== ALWAYS TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1088a3: 51 push %ecx 1088a4: 8d 5d b3 lea -0x4d(%ebp),%ebx 1088a7: 53 push %ebx 1088a8: 6a 0d push $0xd 1088aa: ff 72 08 pushl 0x8(%edx) 1088ad: 89 55 a0 mov %edx,-0x60(%ebp) 1088b0: e8 83 3d 00 00 call 10c638 (*print)( 1088b5: 53 push %ebx 1088b6: 8b 55 a0 mov -0x60(%ebp),%edx 1088b9: ff 72 08 pushl 0x8(%edx) 1088bc: 68 94 31 12 00 push $0x123194 1088c1: 57 push %edi 1088c2: 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; 1088c5: 8b 55 a0 mov -0x60(%ebp),%edx 1088c8: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx 1088ce: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx 1088d4: 89 4d c8 mov %ecx,-0x38(%ebp) 1088d7: 89 5d cc mov %ebx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1088da: 83 c4 20 add $0x20,%esp 1088dd: a1 f8 22 13 00 mov 0x1322f8,%eax 1088e2: 8b 40 08 mov 0x8(%eax),%eax 1088e5: 3b 42 08 cmp 0x8(%edx),%eax 1088e8: 0f 85 5e ff ff ff jne 10884c Timestamp_Control used; _Timestamp_Subtract( 1088ee: 52 push %edx 1088ef: 8d 5d c0 lea -0x40(%ebp),%ebx 1088f2: 53 push %ebx 1088f3: 8d 45 d8 lea -0x28(%ebp),%eax 1088f6: 50 push %eax 1088f7: 68 00 23 13 00 push $0x132300 1088fc: e8 f3 72 00 00 call 10fbf4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 108901: 59 pop %ecx 108902: 58 pop %eax 108903: 53 push %ebx 108904: 8d 4d c8 lea -0x38(%ebp),%ecx 108907: 51 push %ecx 108908: e8 d7 71 00 00 call 10fae4 <_Timespec_Add_to> 10890d: 83 c4 10 add $0x10,%esp 108910: e9 37 ff ff ff jmp 10884c 108915: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 108918: ff 45 a4 incl -0x5c(%ebp) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 10891b: 83 7d a4 05 cmpl $0x5,-0x5c(%ebp) 10891f: 0f 85 f4 fe ff ff jne 108819 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 108925: ba d3 4d 62 10 mov $0x10624dd3,%edx 10892a: 8b 45 d4 mov -0x2c(%ebp),%eax 10892d: f7 e2 mul %edx 10892f: c1 ea 06 shr $0x6,%edx 108932: 52 push %edx 108933: ff 75 d0 pushl -0x30(%ebp) 108936: 68 a8 30 12 00 push $0x1230a8 10893b: 57 push %edi 10893c: ff 55 0c call *0xc(%ebp) 10893f: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 108942: 8d 65 f4 lea -0xc(%ebp),%esp 108945: 5b pop %ebx 108946: 5e pop %esi 108947: 5f pop %edi 108948: c9 leave 108949: c3 ret 00112e9c : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 112e9c: 55 push %ebp <== NOT EXECUTED 112e9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 112e9f: 53 push %ebx <== NOT EXECUTED 112ea0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 112ea3: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 112ea6: 68 60 15 12 00 push $0x121560 <== NOT EXECUTED 112eab: e8 1c 00 00 00 call 112ecc <== NOT EXECUTED 112eb0: 89 c3 mov %eax,%ebx <== NOT EXECUTED 112eb2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112eb5: 85 c0 test %eax,%eax <== NOT EXECUTED 112eb7: 74 07 je 112ec0 <== NOT EXECUTED { errno = rc; 112eb9: e8 12 08 00 00 call 1136d0 <__errno> <== NOT EXECUTED 112ebe: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; } return -1; } 112ec0: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 112ec5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 112ec8: c9 leave <== NOT EXECUTED 112ec9: c3 ret <== NOT EXECUTED 0010cd08 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 10cd08: 55 push %ebp <== NOT EXECUTED 10cd09: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cd0b: 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( 10cd0e: 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); 10cd11: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10cd14: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10cd17: e8 34 fe ff ff call 10cb50 <== NOT EXECUTED va_end(arglist); return chars_written; } 10cd1c: c9 leave <== NOT EXECUTED 10cd1d: c3 ret <== NOT EXECUTED 0010b0f0 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b0f0: 55 push %ebp 10b0f1: 89 e5 mov %esp,%ebp 10b0f3: 53 push %ebx 10b0f4: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b0f7: 8d 45 f4 lea -0xc(%ebp),%eax 10b0fa: 50 push %eax 10b0fb: ff 75 08 pushl 0x8(%ebp) 10b0fe: e8 75 24 00 00 call 10d578 <_Thread_Get> switch ( location ) { 10b103: 83 c4 10 add $0x10,%esp 10b106: 8b 55 f4 mov -0xc(%ebp),%edx 10b109: 85 d2 test %edx,%edx 10b10b: 75 2b jne 10b138 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b10d: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b113: 9c pushf 10b114: fa cli 10b115: 59 pop %ecx *the_event_set |= the_new_events; 10b116: 8b 5d 0c mov 0xc(%ebp),%ebx 10b119: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b11b: 51 push %ecx 10b11c: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b11d: 83 ec 0c sub $0xc,%esp 10b120: 50 push %eax 10b121: e8 1e 00 00 00 call 10b144 <_Event_Surrender> _Thread_Enable_dispatch(); 10b126: e8 29 24 00 00 call 10d554 <_Thread_Enable_dispatch> 10b12b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b12d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b130: 8b 5d fc mov -0x4(%ebp),%ebx 10b133: c9 leave 10b134: c3 ret 10b135: 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 ) { 10b138: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b13d: 8b 5d fc mov -0x4(%ebp),%ebx 10b140: c9 leave 10b141: c3 ret 001107d8 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 1107d8: 55 push %ebp 1107d9: 89 e5 mov %esp,%ebp 1107db: 57 push %edi 1107dc: 56 push %esi 1107dd: 53 push %ebx 1107de: 83 ec 1c sub $0x1c,%esp 1107e1: 8b 75 0c mov 0xc(%ebp),%esi 1107e4: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 1107e7: 85 db test %ebx,%ebx 1107e9: 0f 84 85 00 00 00 je 110874 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 1107ef: 8b 45 08 mov 0x8(%ebp),%eax 1107f2: 85 c0 test %eax,%eax 1107f4: 75 0e jne 110804 1107f6: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1107fb: 8d 65 f4 lea -0xc(%ebp),%esp 1107fe: 5b pop %ebx 1107ff: 5e pop %esi 110800: 5f pop %edi 110801: c9 leave 110802: c3 ret 110803: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110804: a1 b8 51 13 00 mov 0x1351b8,%eax 110809: 40 inc %eax 11080a: a3 b8 51 13 00 mov %eax,0x1351b8 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 11080f: 83 ec 0c sub $0xc,%esp 110812: 68 40 54 13 00 push $0x135440 110817: e8 e4 0c 00 00 call 111500 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 11081c: 83 c4 10 add $0x10,%esp 11081f: 85 c0 test %eax,%eax 110821: 74 45 je 110868 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 110823: 8d 78 24 lea 0x24(%eax),%edi 110826: b9 08 00 00 00 mov $0x8,%ecx 11082b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 11082d: 83 ec 0c sub $0xc,%esp 110830: 8d 50 10 lea 0x10(%eax),%edx 110833: 52 push %edx 110834: 89 45 e4 mov %eax,-0x1c(%ebp) 110837: e8 64 27 00 00 call 112fa0 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11083c: 8b 45 e4 mov -0x1c(%ebp),%eax 11083f: 8b 50 08 mov 0x8(%eax),%edx 110842: 0f b7 f2 movzwl %dx,%esi 110845: 8b 0d 5c 54 13 00 mov 0x13545c,%ecx 11084b: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11084e: 8b 4d 08 mov 0x8(%ebp),%ecx 110851: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 110854: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 110856: e8 39 1a 00 00 call 112294 <_Thread_Enable_dispatch> 11085b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11085d: 83 c4 10 add $0x10,%esp } 110860: 8d 65 f4 lea -0xc(%ebp),%esp 110863: 5b pop %ebx 110864: 5e pop %esi 110865: 5f pop %edi 110866: c9 leave 110867: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 110868: e8 27 1a 00 00 call 112294 <_Thread_Enable_dispatch> 11086d: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 110872: eb 87 jmp 1107fb rtems_id *id ) { Extension_Control *the_extension; if ( !id ) 110874: b8 09 00 00 00 mov $0x9,%eax 110879: eb 80 jmp 1107fb 0011087c : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 11087c: 55 push %ebp 11087d: 89 e5 mov %esp,%ebp 11087f: 53 push %ebx 110880: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 110883: 8d 45 f4 lea -0xc(%ebp),%eax 110886: 50 push %eax 110887: ff 75 08 pushl 0x8(%ebp) 11088a: 68 40 54 13 00 push $0x135440 11088f: e8 1c 11 00 00 call 1119b0 <_Objects_Get> 110894: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110896: 83 c4 10 add $0x10,%esp 110899: 8b 55 f4 mov -0xc(%ebp),%edx 11089c: 85 d2 test %edx,%edx 11089e: 75 38 jne 1108d8 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 1108a0: 83 ec 0c sub $0xc,%esp 1108a3: 8d 40 10 lea 0x10(%eax),%eax 1108a6: 50 push %eax 1108a7: e8 f4 27 00 00 call 1130a0 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 1108ac: 59 pop %ecx 1108ad: 58 pop %eax 1108ae: 53 push %ebx 1108af: 68 40 54 13 00 push $0x135440 1108b4: e8 c3 0c 00 00 call 11157c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 1108b9: 58 pop %eax 1108ba: 5a pop %edx 1108bb: 53 push %ebx 1108bc: 68 40 54 13 00 push $0x135440 1108c1: e8 ba 0f 00 00 call 111880 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 1108c6: e8 c9 19 00 00 call 112294 <_Thread_Enable_dispatch> 1108cb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1108cd: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1108d0: 8b 5d fc mov -0x4(%ebp),%ebx 1108d3: c9 leave 1108d4: c3 ret 1108d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 1108d8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1108dd: 8b 5d fc mov -0x4(%ebp),%ebx 1108e0: c9 leave 1108e1: c3 ret 00107ea4 : } int rtems_filesystem_dirname( const char *pathname ) { 107ea4: 55 push %ebp 107ea5: 89 e5 mov %esp,%ebp 107ea7: 57 push %edi 107ea8: 8b 55 08 mov 0x8(%ebp),%edx int len = strlen( pathname ); 107eab: 31 c0 xor %eax,%eax 107ead: b9 ff ff ff ff mov $0xffffffff,%ecx 107eb2: 89 d7 mov %edx,%edi 107eb4: f2 ae repnz scas %es:(%edi),%al 107eb6: f7 d1 not %ecx 107eb8: 8d 79 ff lea -0x1(%ecx),%edi 107ebb: 89 f8 mov %edi,%eax while ( len ) { 107ebd: 85 ff test %edi,%edi 107ebf: 74 2e je 107eef <== ALWAYS TAKEN len--; 107ec1: 8d 41 fe lea -0x2(%ecx),%eax if ( rtems_filesystem_is_separator( pathname[len] ) ) 107ec4: 8a 0c 02 mov (%edx,%eax,1),%cl 107ec7: 80 f9 2f cmp $0x2f,%cl 107eca: 74 23 je 107eef <== ALWAYS TAKEN 107ecc: 80 f9 5c cmp $0x5c,%cl 107ecf: 74 1e je 107eef <== ALWAYS TAKEN 107ed1: 84 c9 test %cl,%cl 107ed3: 74 1a je 107eef <== ALWAYS TAKEN 107ed5: 01 fa add %edi,%edx 107ed7: 90 nop const char *pathname ) { int len = strlen( pathname ); while ( len ) { 107ed8: 85 c0 test %eax,%eax 107eda: 74 13 je 107eef len--; 107edc: 48 dec %eax if ( rtems_filesystem_is_separator( pathname[len] ) ) 107edd: 8a 4a fe mov -0x2(%edx),%cl 107ee0: 80 f9 2f cmp $0x2f,%cl 107ee3: 74 0a je 107eef 107ee5: 80 f9 5c cmp $0x5c,%cl 107ee8: 74 05 je 107eef <== ALWAYS TAKEN 107eea: 4a dec %edx 107eeb: 84 c9 test %cl,%cl 107eed: 75 e9 jne 107ed8 <== NEVER TAKEN break; } return len; } 107eef: 5f pop %edi 107ef0: c9 leave 107ef1: c3 ret 00107fc8 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107fc8: 55 push %ebp 107fc9: 89 e5 mov %esp,%ebp 107fcb: 57 push %edi 107fcc: 56 push %esi 107fcd: 53 push %ebx 107fce: 83 ec 1c sub $0x1c,%esp 107fd1: 8b 55 08 mov 0x8(%ebp),%edx 107fd4: 8b 45 0c mov 0xc(%ebp),%eax 107fd7: 89 45 e4 mov %eax,-0x1c(%ebp) 107fda: 8b 45 10 mov 0x10(%ebp),%eax 107fdd: 89 45 e0 mov %eax,-0x20(%ebp) 107fe0: 8b 45 14 mov 0x14(%ebp),%eax 107fe3: 8b 5d 18 mov 0x18(%ebp),%ebx /* * Verify Input parameters. */ if ( !pathname ) 107fe6: 85 d2 test %edx,%edx 107fe8: 0f 84 80 00 00 00 je 10806e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 107fee: 85 c0 test %eax,%eax 107ff0: 74 64 je 108056 <== ALWAYS TAKEN /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 107ff2: 8a 0a mov (%edx),%cl 107ff4: 80 f9 2f cmp $0x2f,%cl 107ff7: 74 09 je 108002 107ff9: 80 f9 5c cmp $0x5c,%cl 107ffc: 74 04 je 108002 <== ALWAYS TAKEN 107ffe: 84 c9 test %cl,%cl 108000: 75 3e jne 108040 <== NEVER TAKEN 108002: 8b 35 18 50 12 00 mov 0x125018,%esi 108008: 83 c6 18 add $0x18,%esi 10800b: b9 05 00 00 00 mov $0x5,%ecx 108010: 89 c7 mov %eax,%edi 108012: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 108014: b1 01 mov $0x1,%cl 108016: 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], 10801b: 89 5d 18 mov %ebx,0x18(%ebp) 10801e: 89 45 14 mov %eax,0x14(%ebp) 108021: 8b 45 e0 mov -0x20(%ebp),%eax 108024: 89 45 10 mov %eax,0x10(%ebp) 108027: 8b 45 e4 mov -0x1c(%ebp),%eax 10802a: 29 f0 sub %esi,%eax 10802c: 89 45 0c mov %eax,0xc(%ebp) 10802f: 01 ca add %ecx,%edx 108031: 89 55 08 mov %edx,0x8(%ebp) pathnamelen - i, flags, pathloc, follow_link ); } 108034: 83 c4 1c add $0x1c,%esp 108037: 5b pop %ebx 108038: 5e pop %esi 108039: 5f pop %edi 10803a: 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], 10803b: e9 b4 fe ff ff jmp 107ef4 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 108040: 8b 35 18 50 12 00 mov 0x125018,%esi 108046: 83 c6 04 add $0x4,%esi 108049: b9 05 00 00 00 mov $0x5,%ecx 10804e: 89 c7 mov %eax,%edi 108050: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 108052: 31 f6 xor %esi,%esi 108054: eb c5 jmp 10801b if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 108056: e8 75 b6 00 00 call 1136d0 <__errno> <== NOT EXECUTED 10805b: 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 ); } 108061: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108066: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED 108069: 5b pop %ebx <== NOT EXECUTED 10806a: 5e pop %esi <== NOT EXECUTED 10806b: 5f pop %edi <== NOT EXECUTED 10806c: c9 leave <== NOT EXECUTED 10806d: c3 ret <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 10806e: e8 5d b6 00 00 call 1136d0 <__errno> <== NOT EXECUTED 108073: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 108079: eb e6 jmp 108061 <== NOT EXECUTED 00107ef4 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107ef4: 55 push %ebp 107ef5: 89 e5 mov %esp,%ebp 107ef7: 57 push %edi 107ef8: 56 push %esi 107ef9: 53 push %ebx 107efa: 83 ec 1c sub $0x1c,%esp 107efd: 8b 45 08 mov 0x8(%ebp),%eax 107f00: 8b 4d 0c mov 0xc(%ebp),%ecx 107f03: 8b 7d 10 mov 0x10(%ebp),%edi 107f06: 8b 5d 14 mov 0x14(%ebp),%ebx 107f09: 8b 55 18 mov 0x18(%ebp),%edx 107f0c: 89 55 e4 mov %edx,-0x1c(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 107f0f: 85 c0 test %eax,%eax 107f11: 0f 84 8c 00 00 00 je 107fa3 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 107f17: 85 db test %ebx,%ebx 107f19: 0f 84 96 00 00 00 je 107fb5 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 107f1f: 8b 53 0c mov 0xc(%ebx),%edx 107f22: 8b 12 mov (%edx),%edx 107f24: 85 d2 test %edx,%edx 107f26: 74 69 je 107f91 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 107f28: 53 push %ebx 107f29: 57 push %edi 107f2a: 51 push %ecx 107f2b: 50 push %eax 107f2c: ff d2 call *%edx 107f2e: 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 ) { 107f30: 83 c4 10 add $0x10,%esp 107f33: 85 c0 test %eax,%eax 107f35: 75 25 jne 107f5c 107f37: 8b 45 e4 mov -0x1c(%ebp),%eax 107f3a: 85 c0 test %eax,%eax 107f3c: 74 1e je 107f5c if ( !pathloc->ops->node_type_h ){ 107f3e: 8b 53 0c mov 0xc(%ebx),%edx 107f41: 8b 42 10 mov 0x10(%edx),%eax 107f44: 85 c0 test %eax,%eax 107f46: 74 39 je 107f81 <== ALWAYS TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 107f48: 83 ec 0c sub $0xc,%esp 107f4b: 53 push %ebx 107f4c: ff d0 call *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 107f4e: 83 e8 03 sub $0x3,%eax 107f51: 83 c4 10 add $0x10,%esp 107f54: 83 f8 01 cmp $0x1,%eax 107f57: 76 0f jbe 107f68 107f59: 8d 76 00 lea 0x0(%esi),%esi result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 107f5c: 89 f0 mov %esi,%eax 107f5e: 8d 65 f4 lea -0xc(%ebp),%esp 107f61: 5b pop %ebx 107f62: 5e pop %esi 107f63: 5f pop %edi 107f64: c9 leave 107f65: c3 ret 107f66: 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 ){ 107f68: 8b 53 0c mov 0xc(%ebx),%edx 107f6b: 8b 42 34 mov 0x34(%edx),%eax 107f6e: 85 c0 test %eax,%eax 107f70: 74 0f je 107f81 <== 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 ); 107f72: 89 7d 0c mov %edi,0xc(%ebp) 107f75: 89 5d 08 mov %ebx,0x8(%ebp) } } return result; } 107f78: 8d 65 f4 lea -0xc(%ebp),%esp 107f7b: 5b pop %ebx 107f7c: 5e pop %esi 107f7d: 5f pop %edi 107f7e: 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 ); 107f7f: 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 ); 107f81: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 107f84: 85 c0 test %eax,%eax <== NOT EXECUTED 107f86: 74 09 je 107f91 <== NOT EXECUTED 107f88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107f8b: 53 push %ebx <== NOT EXECUTED 107f8c: ff d0 call *%eax <== NOT EXECUTED 107f8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 107f91: e8 3a b7 00 00 call 1136d0 <__errno> <== NOT EXECUTED 107f96: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107f9c: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 107fa1: eb b9 jmp 107f5c <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 107fa3: e8 28 b7 00 00 call 1136d0 <__errno> <== NOT EXECUTED 107fa8: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107fae: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 107fb3: eb a7 jmp 107f5c <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 107fb5: e8 16 b7 00 00 call 1136d0 <__errno> <== NOT EXECUTED 107fba: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 107fc0: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 107fc5: eb 95 jmp 107f5c <== NOT EXECUTED 00107d68 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 107d68: 55 push %ebp 107d69: 89 e5 mov %esp,%ebp 107d6b: 57 push %edi 107d6c: 56 push %esi 107d6d: 53 push %ebx 107d6e: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 107d71: a1 18 50 12 00 mov 0x125018,%eax 107d76: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) init_fs_mount_table(); 107d7d: e8 36 07 00 00 call 1084b8 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 107d82: a1 ac f2 11 00 mov 0x11f2ac,%eax 107d87: 85 c0 test %eax,%eax 107d89: 0f 84 b2 00 00 00 je 107e41 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 107d8f: a1 54 31 12 00 mov 0x123154,%eax status = mount( 107d94: 83 ec 0c sub $0xc,%esp 107d97: ff 70 0c pushl 0xc(%eax) 107d9a: ff 70 08 pushl 0x8(%eax) 107d9d: ff 70 04 pushl 0x4(%eax) 107da0: ff 30 pushl (%eax) 107da2: 8d 45 e4 lea -0x1c(%ebp),%eax 107da5: 50 push %eax 107da6: e8 35 07 00 00 call 1084e0 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 107dab: 83 c4 20 add $0x20,%esp 107dae: 40 inc %eax 107daf: 0f 84 a6 00 00 00 je 107e5b <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 107db5: 8b 3d 18 50 12 00 mov 0x125018,%edi 107dbb: 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; 107dc1: 83 c7 18 add $0x18,%edi 107dc4: 8b 75 e4 mov -0x1c(%ebp),%esi 107dc7: 83 c6 1c add $0x1c,%esi 107dca: b9 05 00 00 00 mov $0x5,%ecx 107dcf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107dd1: 83 ec 0c sub $0xc,%esp 107dd4: 6a 00 push $0x0 107dd6: 8d 5d d0 lea -0x30(%ebp),%ebx 107dd9: 53 push %ebx 107dda: 6a 00 push $0x0 107ddc: 6a 01 push $0x1 107dde: 68 f3 0b 12 00 push $0x120bf3 107de3: e8 e0 01 00 00 call 107fc8 rtems_filesystem_root = loc; 107de8: 8b 3d 18 50 12 00 mov 0x125018,%edi 107dee: 83 c7 18 add $0x18,%edi 107df1: b9 05 00 00 00 mov $0x5,%ecx 107df6: 89 de mov %ebx,%esi 107df8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107dfa: 83 c4 14 add $0x14,%esp 107dfd: 6a 00 push $0x0 107dff: 53 push %ebx 107e00: 6a 00 push $0x0 107e02: 6a 01 push $0x1 107e04: 68 f3 0b 12 00 push $0x120bf3 107e09: e8 ba 01 00 00 call 107fc8 rtems_filesystem_current = loc; 107e0e: 8b 3d 18 50 12 00 mov 0x125018,%edi 107e14: 83 c7 04 add $0x4,%edi 107e17: b9 05 00 00 00 mov $0x5,%ecx 107e1c: 89 de mov %ebx,%esi 107e1e: 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); 107e20: 83 c4 18 add $0x18,%esp 107e23: 68 ff 01 00 00 push $0x1ff 107e28: 68 f5 0b 12 00 push $0x120bf5 107e2d: e8 5a 05 00 00 call 10838c if ( status != 0 ) 107e32: 83 c4 10 add $0x10,%esp 107e35: 85 c0 test %eax,%eax 107e37: 75 15 jne 107e4e <== 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. */ } 107e39: 8d 65 f4 lea -0xc(%ebp),%esp 107e3c: 5b pop %ebx 107e3d: 5e pop %esi 107e3e: 5f pop %edi 107e3f: c9 leave 107e40: c3 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 107e41: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e44: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 107e49: e8 ee 3d 00 00 call 10bc3c <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 107e4e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e51: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 107e56: e8 e1 3d 00 00 call 10bc3c <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 107e5b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e5e: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 107e63: e8 d4 3d 00 00 call 10bc3c <== NOT EXECUTED 0012cc08 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 12cc08: 55 push %ebp <== NOT EXECUTED 12cc09: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12cc0b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12cc0e: 8b 10 mov (%eax),%edx <== NOT EXECUTED 12cc10: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12cc13: 3b 10 cmp (%eax),%edx <== NOT EXECUTED 12cc15: 0f 94 c0 sete %al <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 12cc18: c9 leave <== NOT EXECUTED 12cc19: c3 ret <== NOT EXECUTED 00107e68 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 107e68: 55 push %ebp 107e69: 89 e5 mov %esp,%ebp 107e6b: 53 push %ebx 107e6c: 8b 4d 08 mov 0x8(%ebp),%ecx 107e6f: 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 ) ) 107e72: 8a 11 mov (%ecx),%dl 107e74: 84 d2 test %dl,%dl 107e76: 74 27 je 107e9f <== ALWAYS TAKEN 107e78: 85 db test %ebx,%ebx 107e7a: 74 23 je 107e9f <== ALWAYS TAKEN 107e7c: 31 c0 xor %eax,%eax 107e7e: 66 90 xchg %ax,%ax 107e80: 80 fa 2f cmp $0x2f,%dl 107e83: 74 0b je 107e90 107e85: 80 fa 5c cmp $0x5c,%dl 107e88: 74 06 je 107e90 <== ALWAYS TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 107e8a: 5b pop %ebx 107e8b: c9 leave 107e8c: c3 ret 107e8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) { pathname++; pathnamelen--; stripped++; 107e90: 40 inc %eax { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 107e91: 8a 14 01 mov (%ecx,%eax,1),%dl 107e94: 84 d2 test %dl,%dl 107e96: 74 f2 je 107e8a <== ALWAYS TAKEN 107e98: 39 c3 cmp %eax,%ebx 107e9a: 75 e4 jne 107e80 <== NEVER TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 107e9c: 5b pop %ebx <== NOT EXECUTED 107e9d: c9 leave <== NOT EXECUTED 107e9e: c3 ret <== NOT EXECUTED { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 107e9f: 31 c0 xor %eax,%eax <== NOT EXECUTED 107ea1: eb e7 jmp 107e8a <== NOT EXECUTED 00112944 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112944: 55 push %ebp 112945: 89 e5 mov %esp,%ebp 112947: 56 push %esi 112948: 53 push %ebx 112949: 8b 45 08 mov 0x8(%ebp),%eax 11294c: 8b 4d 0c mov 0xc(%ebp),%ecx 11294f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112952: 39 05 40 7e 12 00 cmp %eax,0x127e40 112958: 76 22 jbe 11297c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 11295a: 8d 34 40 lea (%eax,%eax,2),%esi 11295d: 8b 15 44 7e 12 00 mov 0x127e44,%edx 112963: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112967: 85 d2 test %edx,%edx 112969: 74 1d je 112988 11296b: 89 5d 10 mov %ebx,0x10(%ebp) 11296e: 89 4d 0c mov %ecx,0xc(%ebp) 112971: 89 45 08 mov %eax,0x8(%ebp) } 112974: 5b pop %ebx 112975: 5e pop %esi 112976: 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; 112977: ff e2 jmp *%edx 112979: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11297c: 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; } 112981: 5b pop %ebx 112982: 5e pop %esi 112983: c9 leave 112984: c3 ret 112985: 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; 112988: 31 c0 xor %eax,%eax } 11298a: 5b pop %ebx 11298b: 5e pop %esi 11298c: c9 leave 11298d: c3 ret 00112990 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112990: 55 push %ebp 112991: 89 e5 mov %esp,%ebp 112993: 56 push %esi 112994: 53 push %ebx 112995: 8b 45 08 mov 0x8(%ebp),%eax 112998: 8b 4d 0c mov 0xc(%ebp),%ecx 11299b: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11299e: 39 05 40 7e 12 00 cmp %eax,0x127e40 1129a4: 76 22 jbe 1129c8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 1129a6: 8d 34 40 lea (%eax,%eax,2),%esi 1129a9: 8b 15 44 7e 12 00 mov 0x127e44,%edx 1129af: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1129b3: 85 d2 test %edx,%edx 1129b5: 74 1d je 1129d4 1129b7: 89 5d 10 mov %ebx,0x10(%ebp) 1129ba: 89 4d 0c mov %ecx,0xc(%ebp) 1129bd: 89 45 08 mov %eax,0x8(%ebp) } 1129c0: 5b pop %ebx 1129c1: 5e pop %esi 1129c2: 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; 1129c3: ff e2 jmp *%edx 1129c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1129c8: 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; } 1129cd: 5b pop %ebx 1129ce: 5e pop %esi 1129cf: c9 leave 1129d0: c3 ret 1129d1: 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; 1129d4: 31 c0 xor %eax,%eax } 1129d6: 5b pop %ebx 1129d7: 5e pop %esi 1129d8: c9 leave 1129d9: c3 ret 0011090c : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 11090c: 55 push %ebp 11090d: 89 e5 mov %esp,%ebp 11090f: 56 push %esi 110910: 53 push %ebx 110911: 8b 45 08 mov 0x8(%ebp),%eax 110914: 8b 4d 0c mov 0xc(%ebp),%ecx 110917: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11091a: 39 05 40 7e 12 00 cmp %eax,0x127e40 110920: 76 1e jbe 110940 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 110922: 8d 34 40 lea (%eax,%eax,2),%esi 110925: 8b 15 44 7e 12 00 mov 0x127e44,%edx 11092b: 8b 14 f2 mov (%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11092e: 85 d2 test %edx,%edx 110930: 74 1a je 11094c 110932: 89 5d 10 mov %ebx,0x10(%ebp) 110935: 89 4d 0c mov %ecx,0xc(%ebp) 110938: 89 45 08 mov %eax,0x8(%ebp) } 11093b: 5b pop %ebx 11093c: 5e pop %esi 11093d: 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; 11093e: ff e2 jmp *%edx void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 110940: 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; } 110945: 5b pop %ebx 110946: 5e pop %esi 110947: c9 leave 110948: c3 ret 110949: 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; 11094c: 31 c0 xor %eax,%eax } 11094e: 5b pop %ebx 11094f: 5e pop %esi 110950: c9 leave 110951: c3 ret 00107bfc : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 107bfc: 55 push %ebp <== NOT EXECUTED 107bfd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107bff: 57 push %edi <== NOT EXECUTED 107c00: 56 push %esi <== NOT EXECUTED 107c01: 53 push %ebx <== NOT EXECUTED 107c02: 83 ec 48 sub $0x48,%esp <== NOT EXECUTED 107c05: 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 ); 107c08: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 107c0d: 89 f7 mov %esi,%edi <== NOT EXECUTED 107c0f: 31 c0 xor %eax,%eax <== NOT EXECUTED 107c11: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 107c13: f7 d1 not %ecx <== NOT EXECUTED 107c15: 49 dec %ecx <== NOT EXECUTED 107c16: 6a 01 push $0x1 <== NOT EXECUTED 107c18: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 107c1b: 53 push %ebx <== NOT EXECUTED 107c1c: 6a 00 push $0x0 <== NOT EXECUTED 107c1e: 51 push %ecx <== NOT EXECUTED 107c1f: 56 push %esi <== NOT EXECUTED 107c20: e8 a3 03 00 00 call 107fc8 <== NOT EXECUTED 107c25: 89 c7 mov %eax,%edi <== NOT EXECUTED the_jnode = loc.node_access; 107c27: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 107c2a: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 107c2d: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED 107c30: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107c33: 85 c0 test %eax,%eax <== NOT EXECUTED 107c35: 74 41 je 107c78 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 107c37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107c3a: 53 push %ebx <== NOT EXECUTED 107c3b: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 107c3e: ff d0 call *%eax <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 107c40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107c43: 85 ff test %edi,%edi <== NOT EXECUTED 107c45: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 107c48: 74 56 je 107ca0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 107c4a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 107c4d: 85 c0 test %eax,%eax <== NOT EXECUTED 107c4f: 0f 84 93 00 00 00 je 107ce8 <== NOT EXECUTED 107c55: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 107c58: 85 c0 test %eax,%eax <== NOT EXECUTED 107c5a: 0f 84 88 00 00 00 je 107ce8 <== NOT EXECUTED 107c60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107c63: 53 push %ebx <== NOT EXECUTED 107c64: ff d0 call *%eax <== NOT EXECUTED 107c66: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 107c6b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 107c6e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107c71: 5b pop %ebx <== NOT EXECUTED 107c72: 5e pop %esi <== NOT EXECUTED 107c73: 5f pop %edi <== NOT EXECUTED 107c74: c9 leave <== NOT EXECUTED 107c75: c3 ret <== NOT EXECUTED 107c76: 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 ); 107c78: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 107c7b: 85 c0 test %eax,%eax <== NOT EXECUTED 107c7d: 74 09 je 107c88 <== NOT EXECUTED 107c7f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107c82: 53 push %ebx <== NOT EXECUTED 107c83: ff d0 call *%eax <== NOT EXECUTED 107c85: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 107c88: e8 43 ba 00 00 call 1136d0 <__errno> <== NOT EXECUTED 107c8d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107c93: 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; } 107c98: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107c9b: 5b pop %ebx <== NOT EXECUTED 107c9c: 5e pop %esi <== NOT EXECUTED 107c9d: 5f pop %edi <== NOT EXECUTED 107c9e: c9 leave <== NOT EXECUTED 107c9f: 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 ) { 107ca0: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 107ca3: 75 a5 jne 107c4a <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 107ca5: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107ca8: 89 31 mov %esi,(%ecx) <== NOT EXECUTED device_info->device_name_length = strlen( name ); 107caa: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 107caf: 89 f7 mov %esi,%edi <== NOT EXECUTED 107cb1: 31 c0 xor %eax,%eax <== NOT EXECUTED 107cb3: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 107cb5: f7 d1 not %ecx <== NOT EXECUTED 107cb7: 49 dec %ecx <== NOT EXECUTED 107cb8: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 107cbb: 89 48 04 mov %ecx,0x4(%eax) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 107cbe: 8b 42 50 mov 0x50(%edx),%eax <== NOT EXECUTED 107cc1: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107cc4: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 107cc7: 8b 42 54 mov 0x54(%edx),%eax <== NOT EXECUTED 107cca: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 107ccd: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 107cd0: 85 c0 test %eax,%eax <== NOT EXECUTED 107cd2: 74 21 je 107cf5 <== NOT EXECUTED 107cd4: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 107cd7: 85 c0 test %eax,%eax <== NOT EXECUTED 107cd9: 74 1a je 107cf5 <== NOT EXECUTED 107cdb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107cde: 53 push %ebx <== NOT EXECUTED 107cdf: ff d0 call *%eax <== NOT EXECUTED 107ce1: 31 c0 xor %eax,%eax <== NOT EXECUTED 107ce3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ce6: eb 86 jmp 107c6e <== NOT EXECUTED 107ce8: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 107ced: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107cf0: 5b pop %ebx <== NOT EXECUTED 107cf1: 5e pop %esi <== NOT EXECUTED 107cf2: 5f pop %edi <== NOT EXECUTED 107cf3: c9 leave <== NOT EXECUTED 107cf4: 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 ); 107cf5: 31 c0 xor %eax,%eax <== NOT EXECUTED 107cf7: e9 72 ff ff ff jmp 107c6e <== NOT EXECUTED 001129dc : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1129dc: 55 push %ebp 1129dd: 89 e5 mov %esp,%ebp 1129df: 56 push %esi 1129e0: 53 push %ebx 1129e1: 8b 45 08 mov 0x8(%ebp),%eax 1129e4: 8b 4d 0c mov 0xc(%ebp),%ecx 1129e7: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1129ea: 39 05 40 7e 12 00 cmp %eax,0x127e40 1129f0: 76 22 jbe 112a14 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 1129f2: 8d 34 40 lea (%eax,%eax,2),%esi 1129f5: 8b 15 44 7e 12 00 mov 0x127e44,%edx 1129fb: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1129ff: 85 d2 test %edx,%edx 112a01: 74 1d je 112a20 112a03: 89 5d 10 mov %ebx,0x10(%ebp) 112a06: 89 4d 0c mov %ecx,0xc(%ebp) 112a09: 89 45 08 mov %eax,0x8(%ebp) } 112a0c: 5b pop %ebx 112a0d: 5e pop %esi 112a0e: 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; 112a0f: ff e2 jmp *%edx 112a11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112a14: 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; } 112a19: 5b pop %ebx 112a1a: 5e pop %esi 112a1b: c9 leave 112a1c: c3 ret 112a1d: 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; 112a20: 31 c0 xor %eax,%eax } 112a22: 5b pop %ebx 112a23: 5e pop %esi 112a24: c9 leave 112a25: c3 ret 00112a28 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112a28: 55 push %ebp 112a29: 89 e5 mov %esp,%ebp 112a2b: 56 push %esi 112a2c: 53 push %ebx 112a2d: 8b 45 08 mov 0x8(%ebp),%eax 112a30: 8b 4d 0c mov 0xc(%ebp),%ecx 112a33: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112a36: 39 05 40 7e 12 00 cmp %eax,0x127e40 112a3c: 76 22 jbe 112a60 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 112a3e: 8d 34 40 lea (%eax,%eax,2),%esi 112a41: 8b 15 44 7e 12 00 mov 0x127e44,%edx 112a47: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112a4b: 85 d2 test %edx,%edx 112a4d: 74 1d je 112a6c 112a4f: 89 5d 10 mov %ebx,0x10(%ebp) 112a52: 89 4d 0c mov %ecx,0xc(%ebp) 112a55: 89 45 08 mov %eax,0x8(%ebp) } 112a58: 5b pop %ebx 112a59: 5e pop %esi 112a5a: 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; 112a5b: ff e2 jmp *%edx 112a5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112a60: 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; } 112a65: 5b pop %ebx 112a66: 5e pop %esi 112a67: c9 leave 112a68: c3 ret 112a69: 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; 112a6c: 31 c0 xor %eax,%eax } 112a6e: 5b pop %ebx 112a6f: 5e pop %esi 112a70: c9 leave 112a71: c3 ret 0010d434 : 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 ) { 10d434: 55 push %ebp 10d435: 89 e5 mov %esp,%ebp 10d437: 57 push %edi 10d438: 56 push %esi 10d439: 53 push %ebx 10d43a: 83 ec 0c sub $0xc,%esp 10d43d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d440: 8b 75 0c mov 0xc(%ebp),%esi 10d443: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10d446: a1 e0 d5 12 00 mov 0x12d5e0,%eax if ( rtems_interrupt_is_in_progress() ) 10d44b: 8b 0d d4 cb 12 00 mov 0x12cbd4,%ecx 10d451: 85 c9 test %ecx,%ecx 10d453: 0f 85 ab 00 00 00 jne 10d504 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10d459: 85 d2 test %edx,%edx 10d45b: 0f 84 e3 00 00 00 je 10d544 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10d461: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10d463: 85 f6 test %esi,%esi 10d465: 0f 84 d9 00 00 00 je 10d544 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d46b: 8b 3e mov (%esi),%edi 10d46d: 85 ff test %edi,%edi 10d46f: 0f 84 c3 00 00 00 je 10d538 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d475: 39 d8 cmp %ebx,%eax 10d477: 76 7b jbe 10d4f4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d479: a1 38 cb 12 00 mov 0x12cb38,%eax 10d47e: 40 inc %eax 10d47f: a3 38 cb 12 00 mov %eax,0x12cb38 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10d484: 85 db test %ebx,%ebx 10d486: 0f 85 88 00 00 00 jne 10d514 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10d48c: 8b 0d e0 d5 12 00 mov 0x12d5e0,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10d492: 85 c9 test %ecx,%ecx 10d494: 0f 84 b7 00 00 00 je 10d551 <== ALWAYS TAKEN 10d49a: 8b 3d e4 d5 12 00 mov 0x12d5e4,%edi 10d4a0: 89 f8 mov %edi,%eax 10d4a2: eb 08 jmp 10d4ac 10d4a4: 43 inc %ebx 10d4a5: 83 c0 18 add $0x18,%eax 10d4a8: 39 d9 cmp %ebx,%ecx 10d4aa: 76 0b jbe 10d4b7 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d4ac: 83 38 00 cmpl $0x0,(%eax) 10d4af: 75 f3 jne 10d4a4 10d4b1: 83 78 04 00 cmpl $0x0,0x4(%eax) 10d4b5: 75 ed jne 10d4a4 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d4b7: 89 1a mov %ebx,(%edx) if ( m != n ) 10d4b9: 39 d9 cmp %ebx,%ecx 10d4bb: 0f 84 97 00 00 00 je 10d558 10d4c1: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d4c4: 8d 04 c7 lea (%edi,%eax,8),%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10d4c7: b9 06 00 00 00 mov $0x6,%ecx 10d4cc: 89 c7 mov %eax,%edi 10d4ce: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10d4d0: e8 2f 1a 00 00 call 10ef04 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10d4d5: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10d4dc: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10d4e3: 89 5d 08 mov %ebx,0x8(%ebp) } 10d4e6: 83 c4 0c add $0xc,%esp 10d4e9: 5b pop %ebx 10d4ea: 5e pop %esi 10d4eb: 5f pop %edi 10d4ec: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d4ed: e9 b6 83 00 00 jmp 1158a8 10d4f2: 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 ) 10d4f4: 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 ); } 10d4f9: 83 c4 0c add $0xc,%esp 10d4fc: 5b pop %ebx 10d4fd: 5e pop %esi 10d4fe: 5f pop %edi 10d4ff: c9 leave 10d500: c3 ret 10d501: 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() ) 10d504: 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 ); } 10d509: 83 c4 0c add $0xc,%esp 10d50c: 5b pop %ebx 10d50d: 5e pop %esi 10d50e: 5f pop %edi 10d50f: c9 leave 10d510: c3 ret 10d511: 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; 10d514: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d517: c1 e0 03 shl $0x3,%eax 10d51a: 03 05 e4 d5 12 00 add 0x12d5e4,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d520: 8b 38 mov (%eax),%edi 10d522: 85 ff test %edi,%edi 10d524: 74 3e je 10d564 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(); 10d526: e8 d9 19 00 00 call 10ef04 <_Thread_Enable_dispatch> 10d52b: 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 ); } 10d530: 83 c4 0c add $0xc,%esp 10d533: 5b pop %ebx 10d534: 5e pop %esi 10d535: 5f pop %edi 10d536: c9 leave 10d537: 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; 10d538: 8b 4e 04 mov 0x4(%esi),%ecx 10d53b: 85 c9 test %ecx,%ecx 10d53d: 0f 85 32 ff ff ff jne 10d475 10d543: 90 nop _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d544: b8 09 00 00 00 mov $0x9,%eax } 10d549: 83 c4 0c add $0xc,%esp 10d54c: 5b pop %ebx 10d54d: 5e pop %esi 10d54e: 5f pop %edi 10d54f: c9 leave 10d550: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d551: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d557: 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(); 10d558: e8 a7 19 00 00 call 10ef04 <_Thread_Enable_dispatch> 10d55d: b8 05 00 00 00 mov $0x5,%eax return sc; 10d562: eb 95 jmp 10d4f9 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d564: 8b 48 04 mov 0x4(%eax),%ecx 10d567: 85 c9 test %ecx,%ecx 10d569: 75 bb jne 10d526 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d56b: 89 1a mov %ebx,(%edx) 10d56d: e9 55 ff ff ff jmp 10d4c7 0010d574 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d574: 55 push %ebp 10d575: 89 e5 mov %esp,%ebp 10d577: 57 push %edi 10d578: 83 ec 04 sub $0x4,%esp 10d57b: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d57e: 8b 15 d4 cb 12 00 mov 0x12cbd4,%edx 10d584: 85 d2 test %edx,%edx 10d586: 75 44 jne 10d5cc return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d588: 39 05 e0 d5 12 00 cmp %eax,0x12d5e0 10d58e: 77 0c ja 10d59c 10d590: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d595: 5a pop %edx 10d596: 5f pop %edi 10d597: c9 leave 10d598: c3 ret 10d599: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d59c: 8b 15 38 cb 12 00 mov 0x12cb38,%edx 10d5a2: 42 inc %edx 10d5a3: 89 15 38 cb 12 00 mov %edx,0x12cb38 if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d5a9: 8d 14 40 lea (%eax,%eax,2),%edx 10d5ac: c1 e2 03 shl $0x3,%edx 10d5af: 03 15 e4 d5 12 00 add 0x12d5e4,%edx 10d5b5: b9 18 00 00 00 mov $0x18,%ecx 10d5ba: 31 c0 xor %eax,%eax 10d5bc: 89 d7 mov %edx,%edi 10d5be: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d5c0: e8 3f 19 00 00 call 10ef04 <_Thread_Enable_dispatch> 10d5c5: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d5c7: 5a pop %edx 10d5c8: 5f pop %edi 10d5c9: c9 leave 10d5ca: c3 ret 10d5cb: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 10d5cc: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d5d1: 5a pop %edx 10d5d2: 5f pop %edi 10d5d3: c9 leave 10d5d4: c3 ret 00112a74 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112a74: 55 push %ebp 112a75: 89 e5 mov %esp,%ebp 112a77: 56 push %esi 112a78: 53 push %ebx 112a79: 8b 45 08 mov 0x8(%ebp),%eax 112a7c: 8b 4d 0c mov 0xc(%ebp),%ecx 112a7f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112a82: 39 05 40 7e 12 00 cmp %eax,0x127e40 112a88: 76 22 jbe 112aac return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 112a8a: 8d 34 40 lea (%eax,%eax,2),%esi 112a8d: 8b 15 44 7e 12 00 mov 0x127e44,%edx 112a93: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112a97: 85 d2 test %edx,%edx 112a99: 74 1d je 112ab8 112a9b: 89 5d 10 mov %ebx,0x10(%ebp) 112a9e: 89 4d 0c mov %ecx,0xc(%ebp) 112aa1: 89 45 08 mov %eax,0x8(%ebp) } 112aa4: 5b pop %ebx 112aa5: 5e pop %esi 112aa6: 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; 112aa7: ff e2 jmp *%edx 112aa9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112aac: 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; } 112ab1: 5b pop %ebx 112ab2: 5e pop %esi 112ab3: c9 leave 112ab4: c3 ret 112ab5: 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; 112ab8: 31 c0 xor %eax,%eax } 112aba: 5b pop %ebx 112abb: 5e pop %esi 112abc: c9 leave 112abd: c3 ret 0010de70 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10de70: 55 push %ebp 10de71: 89 e5 mov %esp,%ebp 10de73: 57 push %edi 10de74: 56 push %esi 10de75: 53 push %ebx 10de76: 83 ec 1c sub $0x1c,%esp 10de79: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10de7c: 85 ff test %edi,%edi 10de7e: 74 4d je 10decd <== ALWAYS TAKEN 10de80: 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 ] ) 10de87: 8b 55 e4 mov -0x1c(%ebp),%edx 10de8a: 8b 04 95 0c 22 13 00 mov 0x13220c(,%edx,4),%eax 10de91: 85 c0 test %eax,%eax 10de93: 74 2f je 10dec4 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10de95: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10de98: 85 f6 test %esi,%esi 10de9a: 74 28 je 10dec4 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10de9c: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10dea1: 74 21 je 10dec4 10dea3: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10dea8: 8b 46 1c mov 0x1c(%esi),%eax 10deab: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10deae: 85 c0 test %eax,%eax 10deb0: 74 09 je 10debb <== ALWAYS TAKEN continue; (*routine)(the_thread); 10deb2: 83 ec 0c sub $0xc,%esp 10deb5: 50 push %eax 10deb6: ff d7 call *%edi 10deb8: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10debb: 43 inc %ebx 10debc: 0f b7 46 10 movzwl 0x10(%esi),%eax 10dec0: 39 d8 cmp %ebx,%eax 10dec2: 73 e4 jae 10dea8 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10dec4: ff 45 e4 incl -0x1c(%ebp) 10dec7: 83 7d e4 05 cmpl $0x5,-0x1c(%ebp) 10decb: 75 ba jne 10de87 (*routine)(the_thread); } } } 10decd: 8d 65 f4 lea -0xc(%ebp),%esp 10ded0: 5b pop %ebx 10ded1: 5e pop %esi 10ded2: 5f pop %edi 10ded3: c9 leave 10ded4: c3 ret 0010fd58 : * 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 ) { 10fd58: 55 push %ebp 10fd59: 89 e5 mov %esp,%ebp 10fd5b: 57 push %edi 10fd5c: 53 push %ebx 10fd5d: 83 ec 14 sub $0x14,%esp rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fd60: 6a 00 push $0x0 10fd62: 6a 00 push $0x0 10fd64: ff 35 68 72 12 00 pushl 0x127268 10fd6a: e8 91 b8 ff ff call 10b600 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 10fd6f: a1 64 72 12 00 mov 0x127264,%eax 10fd74: 83 c4 10 add $0x10,%esp 10fd77: 85 c0 test %eax,%eax 10fd79: 75 19 jne 10fd94 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; 10fd7b: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fd7d: 83 ec 0c sub $0xc,%esp 10fd80: ff 35 68 72 12 00 pushl 0x127268 10fd86: e8 71 b9 ff ff call 10b6fc iop = 0; done: rtems_libio_unlock(); return iop; } 10fd8b: 89 d8 mov %ebx,%eax 10fd8d: 8d 65 f8 lea -0x8(%ebp),%esp 10fd90: 5b pop %ebx 10fd91: 5f pop %edi 10fd92: c9 leave 10fd93: c3 ret rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( 10fd94: 83 ec 0c sub $0xc,%esp 10fd97: 8d 55 f4 lea -0xc(%ebp),%edx 10fd9a: 52 push %edx 10fd9b: 6a 00 push $0x0 10fd9d: 6a 54 push $0x54 10fd9f: 6a 01 push $0x1 10fda1: 2b 05 60 72 12 00 sub 0x127260,%eax 10fda7: c1 f8 06 sar $0x6,%eax 10fdaa: 0d 00 49 42 4c or $0x4c424900,%eax 10fdaf: 50 push %eax 10fdb0: e8 d3 b5 ff ff call 10b388 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 10fdb5: 83 c4 20 add $0x20,%esp 10fdb8: 85 c0 test %eax,%eax 10fdba: 75 bf jne 10fd7b <== ALWAYS TAKEN goto failed; iop = rtems_libio_iop_freelist; 10fdbc: 8b 1d 64 72 12 00 mov 0x127264,%ebx next = iop->data1; 10fdc2: 8b 53 34 mov 0x34(%ebx),%edx (void) memset( iop, 0, sizeof(rtems_libio_t) ); 10fdc5: b9 40 00 00 00 mov $0x40,%ecx 10fdca: 89 df mov %ebx,%edi 10fdcc: f3 aa rep stos %al,%es:(%edi) iop->flags = LIBIO_FLAGS_OPEN; 10fdce: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx) iop->sem = sema; 10fdd5: 8b 45 f4 mov -0xc(%ebp),%eax 10fdd8: 89 43 2c mov %eax,0x2c(%ebx) rtems_libio_iop_freelist = next; 10fddb: 89 15 64 72 12 00 mov %edx,0x127264 goto done; 10fde1: eb 9a jmp 10fd7d 0010fd00 : */ void rtems_libio_free( rtems_libio_t *iop ) { 10fd00: 55 push %ebp 10fd01: 89 e5 mov %esp,%ebp 10fd03: 53 push %ebx 10fd04: 83 ec 08 sub $0x8,%esp 10fd07: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fd0a: 6a 00 push $0x0 10fd0c: 6a 00 push $0x0 10fd0e: ff 35 68 72 12 00 pushl 0x127268 10fd14: e8 e7 b8 ff ff call 10b600 rtems_libio_lock(); if (iop->sem) 10fd19: 8b 43 2c mov 0x2c(%ebx),%eax 10fd1c: 83 c4 10 add $0x10,%esp 10fd1f: 85 c0 test %eax,%eax 10fd21: 74 0c je 10fd2f <== ALWAYS TAKEN rtems_semaphore_delete(iop->sem); 10fd23: 83 ec 0c sub $0xc,%esp 10fd26: 50 push %eax 10fd27: e8 30 b8 ff ff call 10b55c 10fd2c: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10fd2f: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10fd36: a1 64 72 12 00 mov 0x127264,%eax 10fd3b: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10fd3e: 89 1d 64 72 12 00 mov %ebx,0x127264 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fd44: a1 68 72 12 00 mov 0x127268,%eax 10fd49: 89 45 08 mov %eax,0x8(%ebp) rtems_libio_unlock(); } 10fd4c: 8b 5d fc mov -0x4(%ebp),%ebx 10fd4f: c9 leave 10fd50: e9 a7 b9 ff ff jmp 10b6fc 001080f8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 1080f8: 55 push %ebp 1080f9: 89 e5 mov %esp,%ebp 1080fb: 53 push %ebx 1080fc: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1080ff: a1 4c 31 12 00 mov 0x12314c,%eax 108104: 85 c0 test %eax,%eax 108106: 74 4d je 108155 <== ALWAYS TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 108108: 83 ec 08 sub $0x8,%esp 10810b: 6a 40 push $0x40 10810d: 50 push %eax 10810e: e8 a9 78 00 00 call 10f9bc 108113: 89 c2 mov %eax,%edx 108115: a3 60 72 12 00 mov %eax,0x127260 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 10811a: 83 c4 10 add $0x10,%esp 10811d: 85 c0 test %eax,%eax 10811f: 74 71 je 108192 <== ALWAYS TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 108121: a3 64 72 12 00 mov %eax,0x127264 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 108126: 8b 1d 4c 31 12 00 mov 0x12314c,%ebx 10812c: 83 fb 01 cmp $0x1,%ebx 10812f: 76 1d jbe 10814e <== ALWAYS TAKEN 108131: 8d 50 40 lea 0x40(%eax),%edx 108134: b9 01 00 00 00 mov $0x1,%ecx 108139: 8d 76 00 lea 0x0(%esi),%esi iop->data1 = iop + 1; 10813c: 89 52 f4 mov %edx,-0xc(%edx) 10813f: 83 c2 40 add $0x40,%edx 108142: 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++) 108143: 39 d9 cmp %ebx,%ecx 108145: 75 f5 jne 10813c 108147: c1 e1 06 shl $0x6,%ecx 10814a: 8d 54 01 c0 lea -0x40(%ecx,%eax,1),%edx iop->data1 = iop + 1; iop->data1 = NULL; 10814e: 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( 108155: 83 ec 0c sub $0xc,%esp 108158: 68 68 72 12 00 push $0x127268 10815d: 6a 00 push $0x0 10815f: 6a 54 push $0x54 108161: 6a 01 push $0x1 108163: 68 4f 49 42 4c push $0x4c42494f 108168: e8 1b 32 00 00 call 10b388 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 10816d: 83 c4 20 add $0x20,%esp 108170: 85 c0 test %eax,%eax 108172: 75 15 jne 108189 <== ALWAYS TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 108174: a1 48 31 12 00 mov 0x123148,%eax 108179: 85 c0 test %eax,%eax 10817b: 74 07 je 108184 <== ALWAYS TAKEN (* rtems_fs_init_helper)(); } 10817d: 8b 5d fc mov -0x4(%ebp),%ebx 108180: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 108181: ff e0 jmp *%eax 108183: 90 nop <== NOT EXECUTED } 108184: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108187: c9 leave <== NOT EXECUTED 108188: 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 ); 108189: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10818c: 50 push %eax <== NOT EXECUTED 10818d: e8 aa 3a 00 00 call 10bc3c <== 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); 108192: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108195: 6a 1a push $0x1a <== NOT EXECUTED 108197: e8 a0 3a 00 00 call 10bc3c <== NOT EXECUTED 0010fc38 : */ int rtems_libio_is_file_open( void *node_access ) { 10fc38: 55 push %ebp 10fc39: 89 e5 mov %esp,%ebp 10fc3b: 53 push %ebx 10fc3c: 83 ec 08 sub $0x8,%esp 10fc3f: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fc42: 6a 00 push $0x0 10fc44: 6a 00 push $0x0 10fc46: ff 35 68 72 12 00 pushl 0x127268 10fc4c: e8 af b9 ff ff call 10b600 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fc51: a1 60 72 12 00 mov 0x127260,%eax 10fc56: 8b 0d 4c 31 12 00 mov 0x12314c,%ecx 10fc5c: 83 c4 10 add $0x10,%esp 10fc5f: 85 c9 test %ecx,%ecx 10fc61: 74 18 je 10fc7b <== ALWAYS TAKEN 10fc63: 31 d2 xor %edx,%edx 10fc65: eb 04 jmp 10fc6b 10fc67: 90 nop <== NOT EXECUTED 10fc68: 83 c0 40 add $0x40,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10fc6b: f6 40 15 01 testb $0x1,0x15(%eax) 10fc6f: 74 05 je 10fc76 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 10fc71: 39 58 18 cmp %ebx,0x18(%eax) 10fc74: 74 1e je 10fc94 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fc76: 42 inc %edx 10fc77: 39 ca cmp %ecx,%edx 10fc79: 72 ed jb 10fc68 10fc7b: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fc7d: 83 ec 0c sub $0xc,%esp 10fc80: ff 35 68 72 12 00 pushl 0x127268 10fc86: e8 71 ba ff ff call 10b6fc } rtems_libio_unlock(); return result; } 10fc8b: 89 d8 mov %ebx,%eax 10fc8d: 8b 5d fc mov -0x4(%ebp),%ebx 10fc90: c9 leave 10fc91: c3 ret 10fc92: 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++){ 10fc94: bb 01 00 00 00 mov $0x1,%ebx 10fc99: eb e2 jmp 10fc7d 0010fc9c : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 10fc9c: 55 push %ebp 10fc9d: 89 e5 mov %esp,%ebp 10fc9f: 53 push %ebx 10fca0: 83 ec 08 sub $0x8,%esp 10fca3: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fca6: 6a 00 push $0x0 10fca8: 6a 00 push $0x0 10fcaa: ff 35 68 72 12 00 pushl 0x127268 10fcb0: e8 4b b9 ff ff call 10b600 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fcb5: a1 60 72 12 00 mov 0x127260,%eax 10fcba: 8b 0d 4c 31 12 00 mov 0x12314c,%ecx 10fcc0: 83 c4 10 add $0x10,%esp 10fcc3: 85 c9 test %ecx,%ecx 10fcc5: 74 18 je 10fcdf <== ALWAYS TAKEN 10fcc7: 31 d2 xor %edx,%edx 10fcc9: eb 04 jmp 10fccf 10fccb: 90 nop <== NOT EXECUTED 10fccc: 83 c0 40 add $0x40,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10fccf: f6 40 15 01 testb $0x1,0x15(%eax) 10fcd3: 74 05 je 10fcda /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 10fcd5: 39 58 28 cmp %ebx,0x28(%eax) 10fcd8: 74 1e je 10fcf8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fcda: 42 inc %edx 10fcdb: 39 ca cmp %ecx,%edx 10fcdd: 72 ed jb 10fccc 10fcdf: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fce1: 83 ec 0c sub $0xc,%esp 10fce4: ff 35 68 72 12 00 pushl 0x127268 10fcea: e8 0d ba ff ff call 10b6fc } rtems_libio_unlock(); return result; } 10fcef: 89 d8 mov %ebx,%eax 10fcf1: 8b 5d fc mov -0x4(%ebp),%ebx 10fcf4: c9 leave 10fcf5: c3 ret 10fcf6: 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++){ 10fcf8: bb 01 00 00 00 mov $0x1,%ebx 10fcfd: eb e2 jmp 10fce1 0012c4fc : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 12c4fc: 55 push %ebp 12c4fd: 89 e5 mov %esp,%ebp 12c4ff: 57 push %edi 12c500: 56 push %esi 12c501: 53 push %ebx 12c502: 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); 12c505: 8d 45 e4 lea -0x1c(%ebp),%eax 12c508: 50 push %eax 12c509: 6a 00 push $0x0 12c50b: 6a 00 push $0x0 12c50d: e8 16 1a 00 00 call 12df28 if (sc != RTEMS_SUCCESSFUL) return sc; 12c512: 83 c4 10 add $0x10,%esp 12c515: 85 c0 test %eax,%eax 12c517: 0f 85 89 00 00 00 jne 12c5a6 <== ALWAYS TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 12c51d: 8b 1d 84 92 16 00 mov 0x169284,%ebx 12c523: 81 fb e0 ed 16 00 cmp $0x16ede0,%ebx 12c529: 0f 84 81 00 00 00 je 12c5b0 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 12c52f: be e0 ed 16 00 mov $0x16ede0,%esi 12c534: b9 12 00 00 00 mov $0x12,%ecx 12c539: 89 df mov %ebx,%edi 12c53b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 12c53d: 8b 45 e4 mov -0x1c(%ebp),%eax 12c540: 89 03 mov %eax,(%ebx) /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 12c542: 8d 7b 18 lea 0x18(%ebx),%edi 12c545: 8b 35 ac ed 16 00 mov 0x16edac,%esi 12c54b: 83 c6 1c add $0x1c,%esi 12c54e: b1 05 mov $0x5,%cl 12c550: 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); 12c552: 83 ec 0c sub $0xc,%esp 12c555: 6a 00 push $0x0 12c557: 8d 5d d0 lea -0x30(%ebp),%ebx 12c55a: 53 push %ebx 12c55b: 6a 00 push $0x0 12c55d: 6a 01 push $0x1 12c55f: 68 c6 5a 16 00 push $0x165ac6 12c564: e8 df f7 fd ff call 10bd48 rtems_filesystem_root = loc; 12c569: 8b 3d 84 92 16 00 mov 0x169284,%edi 12c56f: 83 c7 18 add $0x18,%edi 12c572: b9 05 00 00 00 mov $0x5,%ecx 12c577: 89 de mov %ebx,%esi 12c579: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 12c57b: 83 c4 14 add $0x14,%esp 12c57e: 6a 00 push $0x0 12c580: 53 push %ebx 12c581: 6a 00 push $0x0 12c583: 6a 01 push $0x1 12c585: 68 c6 5a 16 00 push $0x165ac6 12c58a: e8 b9 f7 fd ff call 10bd48 rtems_filesystem_current = loc; 12c58f: 8b 3d 84 92 16 00 mov 0x169284,%edi 12c595: 83 c7 04 add $0x4,%edi 12c598: b9 05 00 00 00 mov $0x5,%ecx 12c59d: 89 de mov %ebx,%esi 12c59f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12c5a1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12c5a3: 83 c4 20 add $0x20,%esp } 12c5a6: 8d 65 f4 lea -0xc(%ebp),%esp 12c5a9: 5b pop %ebx 12c5aa: 5e pop %esi 12c5ab: 5f pop %edi 12c5ac: c9 leave 12c5ad: c3 ret 12c5ae: 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)); 12c5b0: 83 ec 0c sub $0xc,%esp 12c5b3: 6a 48 push $0x48 12c5b5: e8 7e fd fd ff call 10c338 12c5ba: 89 c3 mov %eax,%ebx if (!tmp) 12c5bc: 83 c4 10 add $0x10,%esp 12c5bf: 85 c0 test %eax,%eax 12c5c1: 74 25 je 12c5e8 <== 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); 12c5c3: 51 push %ecx 12c5c4: 68 08 c4 12 00 push $0x12c408 12c5c9: 68 84 92 16 00 push $0x169284 12c5ce: 6a 00 push $0x0 12c5d0: e8 37 1d 00 00 call 12e30c if (sc != RTEMS_SUCCESSFUL) { 12c5d5: 83 c4 10 add $0x10,%esp 12c5d8: 85 c0 test %eax,%eax 12c5da: 75 14 jne 12c5f0 <== ALWAYS TAKEN * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 12c5dc: 89 1d 84 92 16 00 mov %ebx,0x169284 12c5e2: e9 48 ff ff ff jmp 12c52f 12c5e7: 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) 12c5e8: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED 12c5ed: eb b7 jmp 12c5a6 <== NOT EXECUTED 12c5ef: 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); 12c5f0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c5f3: 53 push %ebx <== NOT EXECUTED 12c5f4: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED 12c5f7: e8 00 f8 fd ff call 10bdfc <== NOT EXECUTED return sc; 12c5fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c5ff: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 12c602: eb a2 jmp 12c5a6 <== NOT EXECUTED 0012c464 : * 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) { 12c464: 55 push %ebp <== NOT EXECUTED 12c465: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c467: 53 push %ebx <== NOT EXECUTED 12c468: 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); 12c46b: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 12c46e: 50 push %eax <== NOT EXECUTED 12c46f: 6a 00 push $0x0 <== NOT EXECUTED 12c471: 6a 00 push $0x0 <== NOT EXECUTED 12c473: e8 b0 1a 00 00 call 12df28 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 12c478: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c47b: 85 c0 test %eax,%eax <== NOT EXECUTED 12c47d: 75 30 jne 12c4af <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 12c47f: 8b 1d 84 92 16 00 mov 0x169284,%ebx <== NOT EXECUTED 12c485: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 12c487: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED 12c48a: 74 28 je 12c4b4 <== 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, 12c48c: 52 push %edx <== NOT EXECUTED 12c48d: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12c490: 50 push %eax <== NOT EXECUTED 12c491: 68 84 92 16 00 push $0x169284 <== NOT EXECUTED 12c496: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12c499: e8 be 1f 00 00 call 12e45c <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 12c49e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c4a1: 85 c0 test %eax,%eax <== NOT EXECUTED 12c4a3: 74 33 je 12c4d8 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 12c4a5: c7 05 84 92 16 00 e0 movl $0x16ede0,0x169284 <== NOT EXECUTED 12c4ac: ed 16 00 return sc; } 12c4af: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12c4b2: c9 leave <== NOT EXECUTED 12c4b3: 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); 12c4b4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c4b7: 68 84 92 16 00 push $0x169284 <== NOT EXECUTED 12c4bc: 6a 00 push $0x0 <== NOT EXECUTED 12c4be: e8 0d 1f 00 00 call 12e3d0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 12c4c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c4c6: 85 c0 test %eax,%eax <== NOT EXECUTED 12c4c8: 75 e5 jne 12c4af <== NOT EXECUTED free_user_env(tmp); 12c4ca: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c4cd: 53 push %ebx <== NOT EXECUTED 12c4ce: e8 35 ff ff ff call 12c408 <== NOT EXECUTED 12c4d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c4d6: eb b4 jmp 12c48c <== 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); 12c4d8: 50 push %eax <== NOT EXECUTED 12c4d9: 68 08 c4 12 00 push $0x12c408 <== NOT EXECUTED 12c4de: 68 84 92 16 00 push $0x169284 <== NOT EXECUTED 12c4e3: 6a 00 push $0x0 <== NOT EXECUTED 12c4e5: e8 22 1e 00 00 call 12e30c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12c4ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c4ed: 85 c0 test %eax,%eax <== NOT EXECUTED 12c4ef: 75 b4 jne 12c4a5 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 12c4f1: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 12c4f4: 89 15 84 92 16 00 mov %edx,0x169284 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 12c4fa: eb b3 jmp 12c4af <== NOT EXECUTED 0010fbf8 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10fbf8: 55 push %ebp 10fbf9: 89 e5 mov %esp,%ebp 10fbfb: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10fbfe: 89 d0 mov %edx,%eax 10fc00: 83 e0 06 and $0x6,%eax 10fc03: 83 f8 06 cmp $0x6,%eax 10fc06: 74 2c je 10fc34 <== ALWAYS TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10fc08: f6 c2 02 test $0x2,%dl 10fc0b: 75 23 jne 10fc30 <== NEVER TAKEN 10fc0d: 89 d0 mov %edx,%eax <== NOT EXECUTED 10fc0f: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED 10fc12: 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 ) { 10fc15: f6 c2 01 test $0x1,%dl 10fc18: 74 03 je 10fc1d fcntl_flags |= O_NONBLOCK; 10fc1a: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10fc1d: f6 c6 02 test $0x2,%dh 10fc20: 74 03 je 10fc25 fcntl_flags |= O_APPEND; 10fc22: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10fc25: 80 e6 04 and $0x4,%dh 10fc28: 74 03 je 10fc2d fcntl_flags |= O_CREAT; 10fc2a: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10fc2d: c9 leave 10fc2e: c3 ret 10fc2f: 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) { 10fc30: 31 c0 xor %eax,%eax 10fc32: eb e1 jmp 10fc15 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10fc34: b0 02 mov $0x2,%al <== NOT EXECUTED 10fc36: eb dd jmp 10fc15 <== NOT EXECUTED 0010c3f8 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 10c3f8: 55 push %ebp <== NOT EXECUTED 10c3f9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10c3fb: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 10c3fe: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 10c401: 50 push %eax <== NOT EXECUTED 10c402: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10c405: ff 35 58 71 16 00 pushl 0x167158 <== NOT EXECUTED 10c40b: e8 80 5a 00 00 call 111e90 <_Protected_heap_Get_block_size><== NOT EXECUTED 10c410: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c413: 84 c0 test %al,%al <== NOT EXECUTED 10c415: 74 11 je 10c428 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 10c417: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED 10c41a: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c41c: 01 05 a4 ed 16 00 add %eax,0x16eda4 <== NOT EXECUTED 10c422: 11 15 a8 ed 16 00 adc %edx,0x16eda8 <== NOT EXECUTED } } 10c428: c9 leave <== NOT EXECUTED 10c429: c3 ret <== NOT EXECUTED 0010c42c : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 10c42c: 55 push %ebp <== NOT EXECUTED 10c42d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10c42f: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED 10c432: 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 ) 10c435: 85 c0 test %eax,%eax <== NOT EXECUTED 10c437: 74 4a je 10c483 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 10c439: 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); 10c440: 52 push %edx <== NOT EXECUTED 10c441: 8d 55 f4 lea -0xc(%ebp),%edx <== NOT EXECUTED 10c444: 52 push %edx <== NOT EXECUTED 10c445: 50 push %eax <== NOT EXECUTED 10c446: ff 35 58 71 16 00 pushl 0x167158 <== NOT EXECUTED 10c44c: e8 3f 5a 00 00 call 111e90 <_Protected_heap_Get_block_size><== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 10c451: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED 10c454: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c456: 03 05 9c ed 16 00 add 0x16ed9c,%eax <== NOT EXECUTED 10c45c: 13 15 a0 ed 16 00 adc 0x16eda0,%edx <== NOT EXECUTED 10c462: a3 9c ed 16 00 mov %eax,0x16ed9c <== NOT EXECUTED 10c467: 89 15 a0 ed 16 00 mov %edx,0x16eda0 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 10c46d: 2b 05 a4 ed 16 00 sub 0x16eda4,%eax <== NOT EXECUTED if (current_depth > s->max_depth) 10c473: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c476: 3b 05 98 ed 16 00 cmp 0x16ed98,%eax <== NOT EXECUTED 10c47c: 76 05 jbe 10c483 <== NOT EXECUTED s->max_depth = current_depth; 10c47e: a3 98 ed 16 00 mov %eax,0x16ed98 <== NOT EXECUTED } 10c483: c9 leave <== NOT EXECUTED 10c484: c3 ret <== NOT EXECUTED 0010c488 : #include #include static void rtems_malloc_statistics_initialize( void ) { 10c488: 55 push %ebp <== NOT EXECUTED 10c489: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10c48b: 57 push %edi <== NOT EXECUTED /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 10c48c: ba 80 ed 16 00 mov $0x16ed80,%edx <== NOT EXECUTED 10c491: b9 2c 00 00 00 mov $0x2c,%ecx <== NOT EXECUTED 10c496: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c498: 89 d7 mov %edx,%edi <== NOT EXECUTED 10c49a: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED } 10c49c: 5f pop %edi <== NOT EXECUTED 10c49d: c9 leave <== NOT EXECUTED 10c49e: c3 ret <== NOT EXECUTED 00114964 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 114964: 55 push %ebp 114965: 89 e5 mov %esp,%ebp 114967: 53 push %ebx 114968: 83 ec 14 sub $0x14,%esp 11496b: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 11496e: 85 db test %ebx,%ebx 114970: 74 5b je 1149cd return EINVAL; *pointer = NULL; 114972: 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()) && 114978: 83 3d 00 cd 12 00 03 cmpl $0x3,0x12cd00 11497f: 74 43 je 1149c4 <== NEVER TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 114981: e8 8a 4c ff ff call 109610 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 114986: 6a 00 push $0x0 114988: ff 75 0c pushl 0xc(%ebp) 11498b: ff 75 10 pushl 0x10(%ebp) 11498e: ff 35 98 87 12 00 pushl 0x128798 114994: e8 3f 9f ff ff call 10e8d8 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 114999: 83 c4 10 add $0x10,%esp 11499c: 85 c0 test %eax,%eax 11499e: 74 38 je 1149d8 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 1149a0: 8b 15 a8 ac 12 00 mov 0x12aca8,%edx 1149a6: 85 d2 test %edx,%edx 1149a8: 74 10 je 1149ba <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 1149aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1149ad: 53 push %ebx <== NOT EXECUTED 1149ae: 89 45 f4 mov %eax,-0xc(%ebp) <== NOT EXECUTED 1149b1: ff 52 04 call *0x4(%edx) <== NOT EXECUTED 1149b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1149b7: 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; 1149ba: 89 03 mov %eax,(%ebx) 1149bc: 31 c0 xor %eax,%eax return 0; } 1149be: 8b 5d fc mov -0x4(%ebp),%ebx 1149c1: c9 leave 1149c2: c3 ret 1149c3: 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()) && 1149c4: e8 ef 4b ff ff call 1095b8 1149c9: 84 c0 test %al,%al 1149cb: 75 b4 jne 114981 <== NEVER TAKEN if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 1149cd: b8 16 00 00 00 mov $0x16,%eax } 1149d2: 8b 5d fc mov -0x4(%ebp),%ebx 1149d5: c9 leave 1149d6: c3 ret 1149d7: 90 nop <== NOT EXECUTED return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 1149d8: b0 0c mov $0xc,%al 1149da: eb e2 jmp 1149be 001165d0 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 1165d0: 55 push %ebp 1165d1: 89 e5 mov %esp,%ebp 1165d3: 57 push %edi 1165d4: 56 push %esi 1165d5: 53 push %ebx 1165d6: 83 ec 1c sub $0x1c,%esp 1165d9: 8b 7d 08 mov 0x8(%ebp),%edi 1165dc: 8b 5d 0c mov 0xc(%ebp),%ebx 1165df: 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 ) 1165e2: 85 db test %ebx,%ebx 1165e4: 74 62 je 116648 return RTEMS_INVALID_ADDRESS; if ( !count ) 1165e6: 85 f6 test %esi,%esi 1165e8: 74 5e je 116648 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 1165ea: 51 push %ecx 1165eb: 8d 45 e4 lea -0x1c(%ebp),%eax 1165ee: 50 push %eax 1165ef: 57 push %edi 1165f0: 68 00 2b 14 00 push $0x142b00 1165f5: e8 1e 4d 00 00 call 11b318 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1165fa: 83 c4 10 add $0x10,%esp 1165fd: 8b 55 e4 mov -0x1c(%ebp),%edx 116600: 85 d2 test %edx,%edx 116602: 74 10 je 116614 116604: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116609: 8d 65 f4 lea -0xc(%ebp),%esp 11660c: 5b pop %ebx 11660d: 5e pop %esi 11660e: 5f pop %edi 11660f: c9 leave 116610: c3 ret 116611: 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( 116614: 83 ec 08 sub $0x8,%esp 116617: 56 push %esi 116618: 6a 00 push $0x0 11661a: 57 push %edi 11661b: ff 75 10 pushl 0x10(%ebp) 11661e: 53 push %ebx 11661f: 83 c0 14 add $0x14,%eax 116622: 50 push %eax 116623: e8 d4 34 00 00 call 119afc <_CORE_message_queue_Broadcast> 116628: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 11662a: 83 c4 20 add $0x20,%esp 11662d: e8 ca 55 00 00 call 11bbfc <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 116632: 83 ec 0c sub $0xc,%esp 116635: 53 push %ebx 116636: e8 69 03 00 00 call 1169a4 <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 11663b: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11663e: 8d 65 f4 lea -0xc(%ebp),%esp 116641: 5b pop %ebx 116642: 5e pop %esi 116643: 5f pop %edi 116644: c9 leave 116645: c3 ret 116646: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif count ); _Thread_Enable_dispatch(); return 116648: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11664d: 8d 65 f4 lea -0xc(%ebp),%esp 116650: 5b pop %ebx 116651: 5e pop %esi 116652: 5f pop %edi 116653: c9 leave 116654: c3 ret 00113a88 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 113a88: 55 push %ebp 113a89: 89 e5 mov %esp,%ebp 113a8b: 57 push %edi 113a8c: 56 push %esi 113a8d: 53 push %ebx 113a8e: 83 ec 2c sub $0x2c,%esp 113a91: 8b 5d 08 mov 0x8(%ebp),%ebx 113a94: 8b 75 0c mov 0xc(%ebp),%esi 113a97: 8b 4d 10 mov 0x10(%ebp),%ecx 113a9a: 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 ) ) 113a9d: 85 db test %ebx,%ebx 113a9f: 74 2f je 113ad0 return RTEMS_INVALID_NAME; if ( !id ) 113aa1: 85 ff test %edi,%edi 113aa3: 0f 84 a3 00 00 00 je 113b4c if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113aa9: 85 f6 test %esi,%esi 113aab: 74 13 je 113ac0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 113aad: 85 c9 test %ecx,%ecx 113aaf: 75 2f jne 113ae0 113ab1: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113ab6: 8d 65 f4 lea -0xc(%ebp),%esp 113ab9: 5b pop %ebx 113aba: 5e pop %esi 113abb: 5f pop %edi 113abc: c9 leave 113abd: c3 ret 113abe: 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 ) 113ac0: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113ac5: 8d 65 f4 lea -0xc(%ebp),%esp 113ac8: 5b pop %ebx 113ac9: 5e pop %esi 113aca: 5f pop %edi 113acb: c9 leave 113acc: c3 ret 113acd: 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 ) ) 113ad0: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113ad5: 8d 65 f4 lea -0xc(%ebp),%esp 113ad8: 5b pop %ebx 113ad9: 5e pop %esi 113ada: 5f pop %edi 113adb: c9 leave 113adc: c3 ret 113add: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 113ae0: a1 98 0f 13 00 mov 0x130f98,%eax 113ae5: 40 inc %eax 113ae6: a3 98 0f 13 00 mov %eax,0x130f98 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113aeb: 89 4d d4 mov %ecx,-0x2c(%ebp) 113aee: e8 71 59 00 00 call 119464 <_Message_queue_Allocate> 113af3: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113af5: 85 c0 test %eax,%eax 113af7: 8b 4d d4 mov -0x2c(%ebp),%ecx 113afa: 74 7c je 113b78 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113afc: 8b 45 14 mov 0x14(%ebp),%eax 113aff: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 113b02: a8 04 test $0x4,%al 113b04: 0f 95 c0 setne %al 113b07: 0f b6 c0 movzbl %al,%eax 113b0a: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 113b0d: 51 push %ecx 113b0e: 56 push %esi 113b0f: 8d 45 e4 lea -0x1c(%ebp),%eax 113b12: 50 push %eax 113b13: 8d 42 14 lea 0x14(%edx),%eax 113b16: 50 push %eax 113b17: 89 55 d4 mov %edx,-0x2c(%ebp) 113b1a: e8 f1 10 00 00 call 114c10 <_CORE_message_queue_Initialize> 113b1f: 83 c4 10 add $0x10,%esp 113b22: 84 c0 test %al,%al 113b24: 8b 55 d4 mov -0x2c(%ebp),%edx 113b27: 75 2f jne 113b58 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113b29: 83 ec 08 sub $0x8,%esp 113b2c: 52 push %edx 113b2d: 68 60 19 13 00 push $0x131960 113b32: e8 15 1f 00 00 call 115a4c <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 113b37: e8 34 29 00 00 call 116470 <_Thread_Enable_dispatch> 113b3c: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 113b41: 83 c4 10 add $0x10,%esp 113b44: e9 6d ff ff ff jmp 113ab6 113b49: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 113b4c: b8 09 00 00 00 mov $0x9,%eax 113b51: e9 60 ff ff ff jmp 113ab6 113b56: 66 90 xchg %ax,%ax <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113b58: 8b 42 08 mov 0x8(%edx),%eax 113b5b: 0f b7 f0 movzwl %ax,%esi 113b5e: 8b 0d 7c 19 13 00 mov 0x13197c,%ecx 113b64: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113b67: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 113b6a: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 113b6c: e8 ff 28 00 00 call 116470 <_Thread_Enable_dispatch> 113b71: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 113b73: e9 3e ff ff ff jmp 113ab6 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113b78: e8 f3 28 00 00 call 116470 <_Thread_Enable_dispatch> 113b7d: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 113b82: e9 2f ff ff ff jmp 113ab6 00117abc : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 117abc: 55 push %ebp 117abd: 89 e5 mov %esp,%ebp 117abf: 53 push %ebx 117ac0: 83 ec 18 sub $0x18,%esp 117ac3: 8d 45 f4 lea -0xc(%ebp),%eax 117ac6: 50 push %eax 117ac7: ff 75 08 pushl 0x8(%ebp) 117aca: 68 e0 5b 13 00 push $0x135be0 117acf: e8 dc 9e ff ff call 1119b0 <_Objects_Get> 117ad4: 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 ) { 117ad6: 83 c4 10 add $0x10,%esp 117ad9: 8b 4d f4 mov -0xc(%ebp),%ecx 117adc: 85 c9 test %ecx,%ecx 117ade: 75 3c jne 117b1c case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 117ae0: 83 ec 08 sub $0x8,%esp 117ae3: 50 push %eax 117ae4: 68 e0 5b 13 00 push $0x135be0 117ae9: e8 8e 9a ff ff call 11157c <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 117aee: 83 c4 0c add $0xc,%esp 117af1: 6a 05 push $0x5 117af3: 6a 00 push $0x0 117af5: 8d 43 14 lea 0x14(%ebx),%eax 117af8: 50 push %eax 117af9: e8 0e 05 00 00 call 11800c <_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 ); 117afe: 58 pop %eax 117aff: 5a pop %edx 117b00: 53 push %ebx 117b01: 68 e0 5b 13 00 push $0x135be0 117b06: e8 75 9d ff ff call 111880 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 117b0b: e8 84 a7 ff ff call 112294 <_Thread_Enable_dispatch> 117b10: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117b12: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117b15: 8b 5d fc mov -0x4(%ebp),%ebx 117b18: c9 leave 117b19: c3 ret 117b1a: 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 ) { 117b1c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117b21: 8b 5d fc mov -0x4(%ebp),%ebx 117b24: c9 leave 117b25: c3 ret 001167c4 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 1167c4: 55 push %ebp 1167c5: 89 e5 mov %esp,%ebp 1167c7: 53 push %ebx 1167c8: 83 ec 14 sub $0x14,%esp 1167cb: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1167ce: 85 db test %ebx,%ebx 1167d0: 74 46 je 116818 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 1167d2: 51 push %ecx 1167d3: 8d 45 f4 lea -0xc(%ebp),%eax 1167d6: 50 push %eax 1167d7: ff 75 08 pushl 0x8(%ebp) 1167da: 68 00 2b 14 00 push $0x142b00 1167df: e8 34 4b 00 00 call 11b318 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1167e4: 83 c4 10 add $0x10,%esp 1167e7: 8b 55 f4 mov -0xc(%ebp),%edx 1167ea: 85 d2 test %edx,%edx 1167ec: 74 0a je 1167f8 1167ee: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1167f3: 8b 5d fc mov -0x4(%ebp),%ebx 1167f6: c9 leave 1167f7: 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 ); 1167f8: 83 ec 0c sub $0xc,%esp 1167fb: 83 c0 14 add $0x14,%eax 1167fe: 50 push %eax 1167ff: e8 b8 33 00 00 call 119bbc <_CORE_message_queue_Flush> 116804: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116806: e8 f1 53 00 00 call 11bbfc <_Thread_Enable_dispatch> 11680b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11680d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116810: 8b 5d fc mov -0x4(%ebp),%ebx 116813: c9 leave 116814: c3 ret 116815: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116818: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11681d: 8b 5d fc mov -0x4(%ebp),%ebx 116820: c9 leave 116821: c3 ret 00116824 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116824: 55 push %ebp 116825: 89 e5 mov %esp,%ebp 116827: 53 push %ebx 116828: 83 ec 14 sub $0x14,%esp 11682b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11682e: 85 db test %ebx,%ebx 116830: 74 3a je 11686c 116832: 51 push %ecx 116833: 8d 45 f4 lea -0xc(%ebp),%eax 116836: 50 push %eax 116837: ff 75 08 pushl 0x8(%ebp) 11683a: 68 00 2b 14 00 push $0x142b00 11683f: e8 d4 4a 00 00 call 11b318 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116844: 83 c4 10 add $0x10,%esp 116847: 8b 55 f4 mov -0xc(%ebp),%edx 11684a: 85 d2 test %edx,%edx 11684c: 74 0a je 116858 11684e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116853: 8b 5d fc mov -0x4(%ebp),%ebx 116856: c9 leave 116857: 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; 116858: 8b 40 5c mov 0x5c(%eax),%eax 11685b: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 11685d: e8 9a 53 00 00 call 11bbfc <_Thread_Enable_dispatch> 116862: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116864: 8b 5d fc mov -0x4(%ebp),%ebx 116867: c9 leave 116868: c3 ret 116869: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11686c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116871: 8b 5d fc mov -0x4(%ebp),%ebx 116874: c9 leave 116875: c3 ret 00113bac : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 113bac: 55 push %ebp 113bad: 89 e5 mov %esp,%ebp 113baf: 56 push %esi 113bb0: 53 push %ebx 113bb1: 83 ec 10 sub $0x10,%esp 113bb4: 8b 5d 0c mov 0xc(%ebp),%ebx 113bb7: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113bba: 85 db test %ebx,%ebx 113bbc: 74 6e je 113c2c return RTEMS_INVALID_ADDRESS; if ( !size ) 113bbe: 85 f6 test %esi,%esi 113bc0: 74 6a je 113c2c RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 113bc2: 51 push %ecx 113bc3: 8d 45 f4 lea -0xc(%ebp),%eax 113bc6: 50 push %eax 113bc7: ff 75 08 pushl 0x8(%ebp) 113bca: 68 60 19 13 00 push $0x131960 113bcf: e8 a8 1f 00 00 call 115b7c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113bd4: 83 c4 10 add $0x10,%esp 113bd7: 8b 55 f4 mov -0xc(%ebp),%edx 113bda: 85 d2 test %edx,%edx 113bdc: 75 42 jne 113c20 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 113bde: 83 ec 08 sub $0x8,%esp 113be1: ff 75 18 pushl 0x18(%ebp) 113be4: 8b 55 14 mov 0x14(%ebp),%edx 113be7: 83 e2 01 and $0x1,%edx 113bea: 83 f2 01 xor $0x1,%edx 113bed: 52 push %edx 113bee: 56 push %esi 113bef: 53 push %ebx 113bf0: ff 70 08 pushl 0x8(%eax) 113bf3: 83 c0 14 add $0x14,%eax 113bf6: 50 push %eax 113bf7: e8 d4 10 00 00 call 114cd0 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113bfc: 83 c4 20 add $0x20,%esp 113bff: e8 6c 28 00 00 call 116470 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 113c04: 83 ec 0c sub $0xc,%esp 113c07: a1 58 10 13 00 mov 0x131058,%eax 113c0c: ff 70 34 pushl 0x34(%eax) 113c0f: e8 a0 00 00 00 call 113cb4 <_Message_queue_Translate_core_message_queue_return_code> 113c14: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113c17: 8d 65 f8 lea -0x8(%ebp),%esp 113c1a: 5b pop %ebx 113c1b: 5e pop %esi 113c1c: c9 leave 113c1d: c3 ret 113c1e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113c20: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113c25: 8d 65 f8 lea -0x8(%ebp),%esp 113c28: 5b pop %ebx 113c29: 5e pop %esi 113c2a: c9 leave 113c2b: c3 ret size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 113c2c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113c31: 8d 65 f8 lea -0x8(%ebp),%esp 113c34: 5b pop %ebx 113c35: 5e pop %esi 113c36: c9 leave 113c37: c3 ret 0010b2fc : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b2fc: 55 push %ebp 10b2fd: 89 e5 mov %esp,%ebp 10b2ff: 56 push %esi 10b300: 53 push %ebx 10b301: 83 ec 10 sub $0x10,%esp 10b304: 8b 75 08 mov 0x8(%ebp),%esi 10b307: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b30a: 85 db test %ebx,%ebx 10b30c: 74 5e je 10b36c RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 10b30e: 51 push %ecx 10b30f: 8d 45 f4 lea -0xc(%ebp),%eax 10b312: 50 push %eax 10b313: 56 push %esi 10b314: 68 c0 7d 12 00 push $0x127dc0 10b319: e8 c2 19 00 00 call 10cce0 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 10b31e: 83 c4 10 add $0x10,%esp 10b321: 8b 55 f4 mov -0xc(%ebp),%edx 10b324: 85 d2 test %edx,%edx 10b326: 74 0c je 10b334 10b328: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b32d: 8d 65 f8 lea -0x8(%ebp),%esp 10b330: 5b pop %ebx 10b331: 5e pop %esi 10b332: c9 leave 10b333: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b334: 6a 00 push $0x0 10b336: 6a 00 push $0x0 10b338: 68 ff ff ff 7f push $0x7fffffff 10b33d: 6a 00 push $0x0 10b33f: 56 push %esi 10b340: ff 75 10 pushl 0x10(%ebp) 10b343: 53 push %ebx 10b344: 83 c0 14 add $0x14,%eax 10b347: 50 push %eax 10b348: e8 13 0c 00 00 call 10bf60 <_CORE_message_queue_Submit> 10b34d: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b34f: 83 c4 20 add $0x20,%esp 10b352: e8 fd 21 00 00 call 10d554 <_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); 10b357: 83 ec 0c sub $0xc,%esp 10b35a: 53 push %ebx 10b35b: e8 18 00 00 00 call 10b378 <_Message_queue_Translate_core_message_queue_return_code> 10b360: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b363: 8d 65 f8 lea -0x8(%ebp),%esp 10b366: 5b pop %ebx 10b367: 5e pop %esi 10b368: c9 leave 10b369: c3 ret 10b36a: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b36c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b371: 8d 65 f8 lea -0x8(%ebp),%esp 10b374: 5b pop %ebx 10b375: 5e pop %esi 10b376: c9 leave 10b377: c3 ret 001169b4 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1169b4: 55 push %ebp 1169b5: 89 e5 mov %esp,%ebp 1169b7: 56 push %esi 1169b8: 53 push %ebx 1169b9: 83 ec 10 sub $0x10,%esp 1169bc: 8b 75 08 mov 0x8(%ebp),%esi 1169bf: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1169c2: 85 db test %ebx,%ebx 1169c4: 74 5e je 116a24 1169c6: 51 push %ecx 1169c7: 8d 45 f4 lea -0xc(%ebp),%eax 1169ca: 50 push %eax 1169cb: 56 push %esi 1169cc: 68 00 2b 14 00 push $0x142b00 1169d1: e8 42 49 00 00 call 11b318 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1169d6: 83 c4 10 add $0x10,%esp 1169d9: 8b 55 f4 mov -0xc(%ebp),%edx 1169dc: 85 d2 test %edx,%edx 1169de: 74 0c je 1169ec 1169e0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169e5: 8d 65 f8 lea -0x8(%ebp),%esp 1169e8: 5b pop %ebx 1169e9: 5e pop %esi 1169ea: c9 leave 1169eb: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1169ec: 6a 00 push $0x0 1169ee: 6a 00 push $0x0 1169f0: 68 00 00 00 80 push $0x80000000 1169f5: 6a 00 push $0x0 1169f7: 56 push %esi 1169f8: ff 75 10 pushl 0x10(%ebp) 1169fb: 53 push %ebx 1169fc: 83 c0 14 add $0x14,%eax 1169ff: 50 push %eax 116a00: e8 0b 34 00 00 call 119e10 <_CORE_message_queue_Submit> 116a05: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 116a07: 83 c4 20 add $0x20,%esp 116a0a: e8 ed 51 00 00 call 11bbfc <_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); 116a0f: 83 ec 0c sub $0xc,%esp 116a12: 53 push %ebx 116a13: e8 8c ff ff ff call 1169a4 <_Message_queue_Translate_core_message_queue_return_code> 116a18: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a1b: 8d 65 f8 lea -0x8(%ebp),%esp 116a1e: 5b pop %ebx 116a1f: 5e pop %esi 116a20: c9 leave 116a21: c3 ret 116a22: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 116a24: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a29: 8d 65 f8 lea -0x8(%ebp),%esp 116a2c: 5b pop %ebx 116a2d: 5e pop %esi 116a2e: c9 leave 116a2f: c3 ret 0010b86c : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10b86c: 55 push %ebp 10b86d: 89 e5 mov %esp,%ebp 10b86f: 83 ec 08 sub $0x8,%esp 10b872: 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 ) 10b875: 83 f8 01 cmp $0x1,%eax 10b878: 74 36 je 10b8b0 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10b87a: 83 f8 02 cmp $0x2,%eax 10b87d: 74 29 je 10b8a8 api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 10b87f: 83 f8 03 cmp $0x3,%eax 10b882: 74 08 je 10b88c 10b884: b8 97 1f 12 00 mov $0x121f97,%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"; } 10b889: c9 leave 10b88a: c3 ret 10b88b: 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 ) 10b88c: b8 c0 6e 12 00 mov $0x126ec0,%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 ); 10b891: 83 ec 08 sub $0x8,%esp 10b894: ff 75 0c pushl 0xc(%ebp) 10b897: 50 push %eax 10b898: e8 7f 48 00 00 call 11011c if ( class_assoc ) 10b89d: 83 c4 10 add $0x10,%esp 10b8a0: 85 c0 test %eax,%eax 10b8a2: 74 14 je 10b8b8 return class_assoc->name; 10b8a4: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b8a6: c9 leave 10b8a7: 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 ) 10b8a8: b8 40 6e 12 00 mov $0x126e40,%eax 10b8ad: eb e2 jmp 10b891 10b8af: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10b8b0: b8 20 6e 12 00 mov $0x126e20,%eax 10b8b5: eb da jmp 10b891 10b8b7: 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 ) 10b8b8: b8 9f 1f 12 00 mov $0x121f9f,%eax return class_assoc->name; return "BAD CLASS"; } 10b8bd: c9 leave 10b8be: c3 ret 0010b8c0 : }; const char *rtems_object_get_api_name( int api ) { 10b8c0: 55 push %ebp 10b8c1: 89 e5 mov %esp,%ebp 10b8c3: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10b8c6: ff 75 08 pushl 0x8(%ebp) 10b8c9: 68 60 6f 12 00 push $0x126f60 10b8ce: e8 49 48 00 00 call 11011c if ( api_assoc ) 10b8d3: 83 c4 10 add $0x10,%esp 10b8d6: 85 c0 test %eax,%eax 10b8d8: 74 06 je 10b8e0 return api_assoc->name; 10b8da: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b8dc: c9 leave 10b8dd: c3 ret 10b8de: 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 ) 10b8e0: b8 9f 1f 12 00 mov $0x121f9f,%eax return api_assoc->name; return "BAD CLASS"; } 10b8e5: c9 leave 10b8e6: c3 ret 0010ce48 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10ce48: 55 push %ebp 10ce49: 89 e5 mov %esp,%ebp 10ce4b: 57 push %edi 10ce4c: 56 push %esi 10ce4d: 53 push %ebx 10ce4e: 83 ec 0c sub $0xc,%esp 10ce51: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10ce54: 85 db test %ebx,%ebx 10ce56: 74 5c je 10ceb4 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10ce58: 83 ec 08 sub $0x8,%esp 10ce5b: ff 75 0c pushl 0xc(%ebp) 10ce5e: ff 75 08 pushl 0x8(%ebp) 10ce61: e8 a2 1a 00 00 call 10e908 <_Objects_Get_information> if ( !obj_info ) 10ce66: 83 c4 10 add $0x10,%esp 10ce69: 85 c0 test %eax,%eax 10ce6b: 74 57 je 10cec4 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10ce6d: 8b 50 08 mov 0x8(%eax),%edx 10ce70: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10ce72: 8b 50 0c mov 0xc(%eax),%edx 10ce75: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10ce78: 8a 50 12 mov 0x12(%eax),%dl 10ce7b: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10ce7e: 0f b7 70 10 movzwl 0x10(%eax),%esi 10ce82: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10ce85: 85 f6 test %esi,%esi 10ce87: 74 3f je 10cec8 <== ALWAYS TAKEN 10ce89: 8b 78 1c mov 0x1c(%eax),%edi 10ce8c: b9 01 00 00 00 mov $0x1,%ecx 10ce91: b8 01 00 00 00 mov $0x1,%eax 10ce96: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10ce98: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10ce9c: 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++ ) 10ce9f: 40 inc %eax 10cea0: 89 c1 mov %eax,%ecx 10cea2: 39 c6 cmp %eax,%esi 10cea4: 73 f2 jae 10ce98 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cea6: 89 53 10 mov %edx,0x10(%ebx) 10cea9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10ceab: 8d 65 f4 lea -0xc(%ebp),%esp 10ceae: 5b pop %ebx 10ceaf: 5e pop %esi 10ceb0: 5f pop %edi 10ceb1: c9 leave 10ceb2: c3 ret 10ceb3: 90 nop <== NOT EXECUTED int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10ceb4: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10ceb9: 8d 65 f4 lea -0xc(%ebp),%esp 10cebc: 5b pop %ebx 10cebd: 5e pop %esi 10cebe: 5f pop %edi 10cebf: c9 leave 10cec0: c3 ret 10cec1: 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 ) 10cec4: b0 0a mov $0xa,%al 10cec6: eb e3 jmp 10ceab 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++ ) 10cec8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ceca: eb da jmp 10cea6 <== NOT EXECUTED 0010fd10 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10fd10: 55 push %ebp 10fd11: 89 e5 mov %esp,%ebp 10fd13: 53 push %ebx 10fd14: 83 ec 14 sub $0x14,%esp 10fd17: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10fd1a: 85 db test %ebx,%ebx 10fd1c: 74 26 je 10fd44 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10fd1e: 83 ec 08 sub $0x8,%esp 10fd21: 8d 45 f4 lea -0xc(%ebp),%eax 10fd24: 50 push %eax 10fd25: ff 75 08 pushl 0x8(%ebp) 10fd28: e8 eb 1c 00 00 call 111a18 <_Objects_Id_to_name> *name = name_u.name_u32; 10fd2d: 8b 55 f4 mov -0xc(%ebp),%edx 10fd30: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10fd32: 8b 04 85 4c c0 12 00 mov 0x12c04c(,%eax,4),%eax 10fd39: 83 c4 10 add $0x10,%esp } 10fd3c: 8b 5d fc mov -0x4(%ebp),%ebx 10fd3f: c9 leave 10fd40: c3 ret 10fd41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10fd44: 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 ]; } 10fd49: 8b 5d fc mov -0x4(%ebp),%ebx 10fd4c: c9 leave 10fd4d: c3 ret 0010b8f4 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10b8f4: 55 push %ebp 10b8f5: 89 e5 mov %esp,%ebp 10b8f7: 57 push %edi 10b8f8: 56 push %esi 10b8f9: 53 push %ebx 10b8fa: 83 ec 1c sub $0x1c,%esp 10b8fd: 8b 75 08 mov 0x8(%ebp),%esi 10b900: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b903: 85 ff test %edi,%edi 10b905: 74 61 je 10b968 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b907: 85 f6 test %esi,%esi 10b909: 74 35 je 10b940 information = _Objects_Get_information_id( tmpId ); 10b90b: 83 ec 0c sub $0xc,%esp 10b90e: 56 push %esi 10b90f: e8 80 18 00 00 call 10d194 <_Objects_Get_information_id> 10b914: 89 c3 mov %eax,%ebx if ( !information ) 10b916: 83 c4 10 add $0x10,%esp 10b919: 85 c0 test %eax,%eax 10b91b: 74 16 je 10b933 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10b91d: 50 push %eax 10b91e: 8d 45 e4 lea -0x1c(%ebp),%eax 10b921: 50 push %eax 10b922: 56 push %esi 10b923: 53 push %ebx 10b924: e8 0f 1a 00 00 call 10d338 <_Objects_Get> switch ( location ) { 10b929: 83 c4 10 add $0x10,%esp 10b92c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b92f: 85 c9 test %ecx,%ecx 10b931: 74 19 je 10b94c case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b933: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b938: 8d 65 f4 lea -0xc(%ebp),%esp 10b93b: 5b pop %ebx 10b93c: 5e pop %esi 10b93d: 5f pop %edi 10b93e: c9 leave 10b93f: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b940: a1 f8 93 12 00 mov 0x1293f8,%eax 10b945: 8b 70 08 mov 0x8(%eax),%esi 10b948: eb c1 jmp 10b90b 10b94a: 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 ); 10b94c: 52 push %edx 10b94d: 57 push %edi 10b94e: 50 push %eax 10b94f: 53 push %ebx 10b950: e8 df 1b 00 00 call 10d534 <_Objects_Set_name> _Thread_Enable_dispatch(); 10b955: e8 26 23 00 00 call 10dc80 <_Thread_Enable_dispatch> 10b95a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b95c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b95f: 8d 65 f4 lea -0xc(%ebp),%esp 10b962: 5b pop %ebx 10b963: 5e pop %esi 10b964: 5f pop %edi 10b965: c9 leave 10b966: c3 ret 10b967: 90 nop <== NOT EXECUTED Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b968: b8 09 00 00 00 mov $0x9,%eax 10b96d: eb c9 jmp 10b938 0010ccf0 : void rtems_panic( const char *printf_format, ... ) { 10ccf0: 55 push %ebp <== NOT EXECUTED 10ccf1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ccf3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED /* * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) */ void rtems_panic( 10ccf6: 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); 10ccf9: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10ccfc: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED 10cd01: e8 4a fe ff ff call 10cb50 <== NOT EXECUTED va_end(arglist); } 10cd06: c9 leave <== NOT EXECUTED 10cd07: c3 ret <== NOT EXECUTED 00116a30 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 116a30: 55 push %ebp 116a31: 89 e5 mov %esp,%ebp 116a33: 57 push %edi 116a34: 56 push %esi 116a35: 53 push %ebx 116a36: 83 ec 1c sub $0x1c,%esp 116a39: 8b 5d 08 mov 0x8(%ebp),%ebx 116a3c: 8b 75 0c mov 0xc(%ebp),%esi 116a3f: 8b 55 10 mov 0x10(%ebp),%edx 116a42: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116a45: 85 db test %ebx,%ebx 116a47: 74 47 je 116a90 return RTEMS_INVALID_NAME; if ( !starting_address ) 116a49: 85 f6 test %esi,%esi 116a4b: 74 23 je 116a70 return RTEMS_INVALID_ADDRESS; if ( !id ) 116a4d: 8b 45 1c mov 0x1c(%ebp),%eax 116a50: 85 c0 test %eax,%eax 116a52: 74 1c je 116a70 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 116a54: 85 d2 test %edx,%edx 116a56: 74 28 je 116a80 116a58: 85 ff test %edi,%edi 116a5a: 74 24 je 116a80 116a5c: 39 fa cmp %edi,%edx 116a5e: 72 20 jb 116a80 116a60: f7 c7 03 00 00 00 test $0x3,%edi 116a66: 75 18 jne 116a80 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 116a68: f7 c6 03 00 00 00 test $0x3,%esi 116a6e: 74 30 je 116aa0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 116a70: b8 09 00 00 00 mov $0x9,%eax } 116a75: 8d 65 f4 lea -0xc(%ebp),%esp 116a78: 5b pop %ebx 116a79: 5e pop %esi 116a7a: 5f pop %edi 116a7b: c9 leave 116a7c: c3 ret 116a7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 116a80: b8 08 00 00 00 mov $0x8,%eax } 116a85: 8d 65 f4 lea -0xc(%ebp),%esp 116a88: 5b pop %ebx 116a89: 5e pop %esi 116a8a: 5f pop %edi 116a8b: c9 leave 116a8c: c3 ret 116a8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116a90: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116a95: 8d 65 f4 lea -0xc(%ebp),%esp 116a98: 5b pop %ebx 116a99: 5e pop %esi 116a9a: 5f pop %edi 116a9b: c9 leave 116a9c: c3 ret 116a9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116aa0: a1 38 21 14 00 mov 0x142138,%eax 116aa5: 40 inc %eax 116aa6: a3 38 21 14 00 mov %eax,0x142138 * 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 ); 116aab: 83 ec 0c sub $0xc,%esp 116aae: 68 c0 1f 14 00 push $0x141fc0 116ab3: 89 55 e0 mov %edx,-0x20(%ebp) 116ab6: e8 71 43 00 00 call 11ae2c <_Objects_Allocate> 116abb: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 116abe: 83 c4 10 add $0x10,%esp 116ac1: 85 c0 test %eax,%eax 116ac3: 8b 55 e0 mov -0x20(%ebp),%edx 116ac6: 74 58 je 116b20 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 116ac8: 8b 45 e4 mov -0x1c(%ebp),%eax 116acb: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 116ace: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 116ad1: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 116ad4: 8b 4d 18 mov 0x18(%ebp),%ecx 116ad7: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 116ada: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 116ae1: 57 push %edi 116ae2: 89 d0 mov %edx,%eax 116ae4: 31 d2 xor %edx,%edx 116ae6: f7 f7 div %edi 116ae8: 50 push %eax 116ae9: 56 push %esi 116aea: 8b 45 e4 mov -0x1c(%ebp),%eax 116aed: 83 c0 24 add $0x24,%eax 116af0: 50 push %eax 116af1: e8 c6 2f 00 00 call 119abc <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116af6: 8b 7d e4 mov -0x1c(%ebp),%edi 116af9: 8b 47 08 mov 0x8(%edi),%eax 116afc: 0f b7 f0 movzwl %ax,%esi 116aff: 8b 15 dc 1f 14 00 mov 0x141fdc,%edx 116b05: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116b08: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 116b0b: 8b 55 1c mov 0x1c(%ebp),%edx 116b0e: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 116b10: e8 e7 50 00 00 call 11bbfc <_Thread_Enable_dispatch> 116b15: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116b17: 83 c4 10 add $0x10,%esp 116b1a: e9 66 ff ff ff jmp 116a85 116b1f: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 116b20: e8 d7 50 00 00 call 11bbfc <_Thread_Enable_dispatch> 116b25: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 116b2a: e9 56 ff ff ff jmp 116a85 00116b30 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 116b30: 55 push %ebp 116b31: 89 e5 mov %esp,%ebp 116b33: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 116b36: 8d 45 f4 lea -0xc(%ebp),%eax 116b39: 50 push %eax 116b3a: ff 75 08 pushl 0x8(%ebp) 116b3d: 68 c0 1f 14 00 push $0x141fc0 116b42: e8 d1 47 00 00 call 11b318 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 116b47: 83 c4 10 add $0x10,%esp 116b4a: 8b 55 f4 mov -0xc(%ebp),%edx 116b4d: 85 d2 test %edx,%edx 116b4f: 74 07 je 116b58 116b51: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116b56: c9 leave 116b57: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 116b58: 8b 48 20 mov 0x20(%eax),%ecx 116b5b: 85 c9 test %ecx,%ecx 116b5d: 74 0d je 116b6c #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116b5f: e8 98 50 00 00 call 11bbfc <_Thread_Enable_dispatch> 116b64: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116b69: c9 leave 116b6a: c3 ret 116b6b: 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 ); 116b6c: 83 ec 08 sub $0x8,%esp 116b6f: 50 push %eax 116b70: 68 c0 1f 14 00 push $0x141fc0 116b75: 89 45 e4 mov %eax,-0x1c(%ebp) 116b78: e8 2b 43 00 00 call 11aea8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 116b7d: 58 pop %eax 116b7e: 5a pop %edx 116b7f: 8b 45 e4 mov -0x1c(%ebp),%eax 116b82: 50 push %eax 116b83: 68 c0 1f 14 00 push $0x141fc0 116b88: e8 1f 46 00 00 call 11b1ac <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 116b8d: e8 6a 50 00 00 call 11bbfc <_Thread_Enable_dispatch> 116b92: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116b94: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116b97: c9 leave 116b98: c3 ret 00116b9c : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 116b9c: 55 push %ebp 116b9d: 89 e5 mov %esp,%ebp 116b9f: 56 push %esi 116ba0: 53 push %ebx 116ba1: 83 ec 20 sub $0x20,%esp 116ba4: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116ba7: 85 db test %ebx,%ebx 116ba9: 74 59 je 116c04 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 116bab: 52 push %edx 116bac: 8d 45 f4 lea -0xc(%ebp),%eax 116baf: 50 push %eax 116bb0: ff 75 08 pushl 0x8(%ebp) 116bb3: 68 c0 1f 14 00 push $0x141fc0 116bb8: e8 5b 47 00 00 call 11b318 <_Objects_Get> 116bbd: 89 c6 mov %eax,%esi return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 116bbf: 83 c4 10 add $0x10,%esp 116bc2: 8b 45 f4 mov -0xc(%ebp),%eax 116bc5: 85 c0 test %eax,%eax 116bc7: 75 2f jne 116bf8 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116bc9: 83 ec 0c sub $0xc,%esp 116bcc: 8d 46 24 lea 0x24(%esi),%eax 116bcf: 50 push %eax 116bd0: e8 c3 2e 00 00 call 119a98 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 116bd5: 83 c4 10 add $0x10,%esp 116bd8: 85 c0 test %eax,%eax 116bda: 74 34 je 116c10 the_partition->number_of_used_blocks += 1; 116bdc: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 116bdf: 89 45 e4 mov %eax,-0x1c(%ebp) 116be2: e8 15 50 00 00 call 11bbfc <_Thread_Enable_dispatch> *buffer = the_buffer; 116be7: 8b 45 e4 mov -0x1c(%ebp),%eax 116bea: 89 03 mov %eax,(%ebx) 116bec: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116bee: 8d 65 f8 lea -0x8(%ebp),%esp 116bf1: 5b pop %ebx 116bf2: 5e pop %esi 116bf3: c9 leave 116bf4: c3 ret 116bf5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 116bf8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116bfd: 8d 65 f8 lea -0x8(%ebp),%esp 116c00: 5b pop %ebx 116c01: 5e pop %esi 116c02: c9 leave 116c03: c3 ret { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116c04: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116c09: 8d 65 f8 lea -0x8(%ebp),%esp 116c0c: 5b pop %ebx 116c0d: 5e pop %esi 116c0e: c9 leave 116c0f: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116c10: e8 e7 4f 00 00 call 11bbfc <_Thread_Enable_dispatch> 116c15: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 116c1a: eb e1 jmp 116bfd 00116c40 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116c40: 55 push %ebp 116c41: 89 e5 mov %esp,%ebp 116c43: 56 push %esi 116c44: 53 push %ebx 116c45: 83 ec 14 sub $0x14,%esp 116c48: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 116c4b: 8d 45 f4 lea -0xc(%ebp),%eax 116c4e: 50 push %eax 116c4f: ff 75 08 pushl 0x8(%ebp) 116c52: 68 c0 1f 14 00 push $0x141fc0 116c57: e8 bc 46 00 00 call 11b318 <_Objects_Get> 116c5c: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 116c5e: 83 c4 10 add $0x10,%esp 116c61: 8b 45 f4 mov -0xc(%ebp),%eax 116c64: 85 c0 test %eax,%eax 116c66: 74 0c je 116c74 116c68: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116c6d: 8d 65 f8 lea -0x8(%ebp),%esp 116c70: 5b pop %ebx 116c71: 5e pop %esi 116c72: c9 leave 116c73: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116c74: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 116c77: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116c7a: 39 c6 cmp %eax,%esi 116c7c: 72 3a jb 116cb8 116c7e: 8d 14 10 lea (%eax,%edx,1),%edx 116c81: 39 d6 cmp %edx,%esi 116c83: 77 33 ja 116cb8 <== ALWAYS TAKEN return ( 116c85: 89 f2 mov %esi,%edx 116c87: 29 c2 sub %eax,%edx 116c89: 89 d0 mov %edx,%eax 116c8b: 31 d2 xor %edx,%edx 116c8d: f7 73 18 divl 0x18(%ebx) 116c90: 85 d2 test %edx,%edx 116c92: 75 24 jne 116cb8 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116c94: 83 ec 08 sub $0x8,%esp 116c97: 56 push %esi 116c98: 8d 43 24 lea 0x24(%ebx),%eax 116c9b: 50 push %eax 116c9c: e8 d3 2d 00 00 call 119a74 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 116ca1: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116ca4: e8 53 4f 00 00 call 11bbfc <_Thread_Enable_dispatch> 116ca9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116cab: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cae: 8d 65 f8 lea -0x8(%ebp),%esp 116cb1: 5b pop %ebx 116cb2: 5e pop %esi 116cb3: c9 leave 116cb4: c3 ret 116cb5: 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(); 116cb8: e8 3f 4f 00 00 call 11bbfc <_Thread_Enable_dispatch> 116cbd: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cc2: 8d 65 f8 lea -0x8(%ebp),%esp 116cc5: 5b pop %ebx 116cc6: 5e pop %esi 116cc7: c9 leave 116cc8: c3 ret 00111608 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 111608: 55 push %ebp 111609: 89 e5 mov %esp,%ebp 11160b: 83 ec 08 sub $0x8,%esp if (!rtems_pipe_configured) 11160e: 80 3d 24 56 12 00 00 cmpb $0x0,0x125624 111615: 74 09 je 111620 <== NEVER TAKEN return; if (rtems_pipe_semaphore) 111617: a1 30 70 12 00 mov 0x127030,%eax <== NOT EXECUTED 11161c: 85 c0 test %eax,%eax <== NOT EXECUTED 11161e: 74 04 je 111624 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 111620: c9 leave 111621: c3 ret 111622: 66 90 xchg %ax,%ax <== NOT EXECUTED if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 111624: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111627: 68 30 70 12 00 push $0x127030 <== NOT EXECUTED 11162c: 6a 00 push $0x0 <== NOT EXECUTED 11162e: 6a 54 push $0x54 <== NOT EXECUTED 111630: 6a 01 push $0x1 <== NOT EXECUTED 111632: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED 111637: e8 4c 9d ff ff call 10b388 <== 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) 11163c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 11163f: 85 c0 test %eax,%eax <== NOT EXECUTED 111641: 75 0d jne 111650 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 111643: e8 bc 98 ff ff call 10af04 <== NOT EXECUTED rtems_pipe_no = now; 111648: 66 a3 38 70 12 00 mov %ax,0x127038 <== NOT EXECUTED } 11164e: c9 leave <== NOT EXECUTED 11164f: 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); 111650: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111653: 50 push %eax <== NOT EXECUTED 111654: e8 e3 a5 ff ff call 10bc3c <== NOT EXECUTED 00116068 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 116068: 55 push %ebp 116069: 89 e5 mov %esp,%ebp 11606b: 57 push %edi 11606c: 56 push %esi 11606d: 53 push %ebx 11606e: 83 ec 1c sub $0x1c,%esp 116071: 8b 5d 08 mov 0x8(%ebp),%ebx 116074: 8b 55 0c mov 0xc(%ebp),%edx 116077: 8b 7d 10 mov 0x10(%ebp),%edi 11607a: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 11607d: 85 db test %ebx,%ebx 11607f: 74 1b je 11609c return RTEMS_INVALID_NAME; if ( !id ) 116081: 85 f6 test %esi,%esi 116083: 74 08 je 11608d return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 116085: 89 f8 mov %edi,%eax 116087: 09 d0 or %edx,%eax 116089: a8 03 test $0x3,%al 11608b: 74 1f je 1160ac (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 11608d: b8 09 00 00 00 mov $0x9,%eax } 116092: 8d 65 f4 lea -0xc(%ebp),%esp 116095: 5b pop %ebx 116096: 5e pop %esi 116097: 5f pop %edi 116098: c9 leave 116099: c3 ret 11609a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 11609c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1160a1: 8d 65 f4 lea -0xc(%ebp),%esp 1160a4: 5b pop %ebx 1160a5: 5e pop %esi 1160a6: 5f pop %edi 1160a7: c9 leave 1160a8: c3 ret 1160a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1160ac: a1 38 21 14 00 mov 0x142138,%eax 1160b1: 40 inc %eax 1160b2: a3 38 21 14 00 mov %eax,0x142138 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 1160b7: 83 ec 0c sub $0xc,%esp 1160ba: 68 80 1f 14 00 push $0x141f80 1160bf: 89 55 e4 mov %edx,-0x1c(%ebp) 1160c2: e8 65 4d 00 00 call 11ae2c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 1160c7: 83 c4 10 add $0x10,%esp 1160ca: 85 c0 test %eax,%eax 1160cc: 8b 55 e4 mov -0x1c(%ebp),%edx 1160cf: 74 33 je 116104 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 1160d1: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 1160d4: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 1160d7: 8b 55 14 mov 0x14(%ebp),%edx 1160da: 4a dec %edx 1160db: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1160de: 8b 50 08 mov 0x8(%eax),%edx 1160e1: 0f b7 fa movzwl %dx,%edi 1160e4: 8b 0d 9c 1f 14 00 mov 0x141f9c,%ecx 1160ea: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1160ed: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 1160f0: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 1160f2: e8 05 5b 00 00 call 11bbfc <_Thread_Enable_dispatch> 1160f7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1160f9: 8d 65 f4 lea -0xc(%ebp),%esp 1160fc: 5b pop %ebx 1160fd: 5e pop %esi 1160fe: 5f pop %edi 1160ff: c9 leave 116100: c3 ret 116101: 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(); 116104: e8 f3 5a 00 00 call 11bbfc <_Thread_Enable_dispatch> 116109: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 11610e: eb 82 jmp 116092 00116110 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 116110: 55 push %ebp 116111: 89 e5 mov %esp,%ebp 116113: 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 *) 116116: 8d 45 f4 lea -0xc(%ebp),%eax 116119: 50 push %eax 11611a: ff 75 08 pushl 0x8(%ebp) 11611d: 68 80 1f 14 00 push $0x141f80 116122: e8 f1 51 00 00 call 11b318 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 116127: 83 c4 10 add $0x10,%esp 11612a: 8b 4d f4 mov -0xc(%ebp),%ecx 11612d: 85 c9 test %ecx,%ecx 11612f: 75 2f jne 116160 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 116131: 83 ec 08 sub $0x8,%esp 116134: 50 push %eax 116135: 68 80 1f 14 00 push $0x141f80 11613a: 89 45 e4 mov %eax,-0x1c(%ebp) 11613d: e8 66 4d 00 00 call 11aea8 <_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 ); 116142: 58 pop %eax 116143: 5a pop %edx 116144: 8b 45 e4 mov -0x1c(%ebp),%eax 116147: 50 push %eax 116148: 68 80 1f 14 00 push $0x141f80 11614d: e8 5a 50 00 00 call 11b1ac <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 116152: e8 a5 5a 00 00 call 11bbfc <_Thread_Enable_dispatch> 116157: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116159: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11615c: c9 leave 11615d: c3 ret 11615e: 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 ) { 116160: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116165: c9 leave 116166: c3 ret 00116168 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 116168: 55 push %ebp 116169: 89 e5 mov %esp,%ebp 11616b: 56 push %esi 11616c: 53 push %ebx 11616d: 83 ec 10 sub $0x10,%esp 116170: 8b 75 0c mov 0xc(%ebp),%esi 116173: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 116176: 85 db test %ebx,%ebx 116178: 74 4e je 1161c8 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 11617a: 51 push %ecx 11617b: 8d 45 f4 lea -0xc(%ebp),%eax 11617e: 50 push %eax 11617f: ff 75 08 pushl 0x8(%ebp) 116182: 68 80 1f 14 00 push $0x141f80 116187: e8 8c 51 00 00 call 11b318 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 11618c: 83 c4 10 add $0x10,%esp 11618f: 8b 55 f4 mov -0xc(%ebp),%edx 116192: 85 d2 test %edx,%edx 116194: 74 0e je 1161a4 116196: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11619b: 8d 65 f8 lea -0x8(%ebp),%esp 11619e: 5b pop %ebx 11619f: 5e pop %esi 1161a0: c9 leave 1161a1: c3 ret 1161a2: 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 ); 1161a4: 89 f2 mov %esi,%edx 1161a6: 2b 50 14 sub 0x14(%eax),%edx if ( ending > the_port->length ) 1161a9: 3b 50 18 cmp 0x18(%eax),%edx 1161ac: 77 16 ja 1161c4 *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 1161ae: 03 50 10 add 0x10(%eax),%edx 1161b1: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 1161b3: e8 44 5a 00 00 call 11bbfc <_Thread_Enable_dispatch> 1161b8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161ba: 8d 65 f8 lea -0x8(%ebp),%esp 1161bd: 5b pop %ebx 1161be: 5e pop %esi 1161bf: c9 leave 1161c0: c3 ret 1161c1: 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; 1161c4: 89 33 mov %esi,(%ebx) 1161c6: eb eb jmp 1161b3 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 1161c8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161cd: 8d 65 f8 lea -0x8(%ebp),%esp 1161d0: 5b pop %ebx 1161d1: 5e pop %esi 1161d2: c9 leave 1161d3: c3 ret 001161f8 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 1161f8: 55 push %ebp 1161f9: 89 e5 mov %esp,%ebp 1161fb: 56 push %esi 1161fc: 53 push %ebx 1161fd: 83 ec 10 sub $0x10,%esp 116200: 8b 75 0c mov 0xc(%ebp),%esi 116203: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 116206: 85 db test %ebx,%ebx 116208: 74 4e je 116258 11620a: 51 push %ecx 11620b: 8d 45 f4 lea -0xc(%ebp),%eax 11620e: 50 push %eax 11620f: ff 75 08 pushl 0x8(%ebp) 116212: 68 80 1f 14 00 push $0x141f80 116217: e8 fc 50 00 00 call 11b318 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 11621c: 83 c4 10 add $0x10,%esp 11621f: 8b 55 f4 mov -0xc(%ebp),%edx 116222: 85 d2 test %edx,%edx 116224: 74 0e je 116234 116226: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11622b: 8d 65 f8 lea -0x8(%ebp),%esp 11622e: 5b pop %ebx 11622f: 5e pop %esi 116230: c9 leave 116231: c3 ret 116232: 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 ); 116234: 89 f2 mov %esi,%edx 116236: 2b 50 10 sub 0x10(%eax),%edx if ( ending > the_port->length ) 116239: 3b 50 18 cmp 0x18(%eax),%edx 11623c: 77 16 ja 116254 *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 11623e: 03 50 14 add 0x14(%eax),%edx 116241: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 116243: e8 b4 59 00 00 call 11bbfc <_Thread_Enable_dispatch> 116248: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11624a: 8d 65 f8 lea -0x8(%ebp),%esp 11624d: 5b pop %ebx 11624e: 5e pop %esi 11624f: c9 leave 116250: c3 ret 116251: 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; 116254: 89 33 mov %esi,(%ebx) 116256: eb eb jmp 116243 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 116258: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11625d: 8d 65 f8 lea -0x8(%ebp),%esp 116260: 5b pop %ebx 116261: 5e pop %esi 116262: c9 leave 116263: c3 ret 00116ccc : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 116ccc: 55 push %ebp 116ccd: 89 e5 mov %esp,%ebp 116ccf: 53 push %ebx 116cd0: 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 *) 116cd3: 8d 45 f4 lea -0xc(%ebp),%eax 116cd6: 50 push %eax 116cd7: ff 75 08 pushl 0x8(%ebp) 116cda: 68 00 20 14 00 push $0x142000 116cdf: e8 34 46 00 00 call 11b318 <_Objects_Get> 116ce4: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 116ce6: 83 c4 10 add $0x10,%esp 116ce9: 8b 45 f4 mov -0xc(%ebp),%eax 116cec: 85 c0 test %eax,%eax 116cee: 74 0c je 116cfc 116cf0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cf5: 8b 5d fc mov -0x4(%ebp),%ebx 116cf8: c9 leave 116cf9: c3 ret 116cfa: 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 ) ) { 116cfc: 8b 43 40 mov 0x40(%ebx),%eax 116cff: 3b 05 f8 21 14 00 cmp 0x1421f8,%eax 116d05: 74 11 je 116d18 _Thread_Enable_dispatch(); 116d07: e8 f0 4e 00 00 call 11bbfc <_Thread_Enable_dispatch> 116d0c: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116d11: 8b 5d fc mov -0x4(%ebp),%ebx 116d14: c9 leave 116d15: c3 ret 116d16: 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 ); 116d18: 83 ec 0c sub $0xc,%esp 116d1b: 8d 43 10 lea 0x10(%ebx),%eax 116d1e: 50 push %eax 116d1f: e8 44 63 00 00 call 11d068 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116d24: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 116d2b: e8 cc 4e 00 00 call 11bbfc <_Thread_Enable_dispatch> 116d30: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116d32: 83 c4 10 add $0x10,%esp 116d35: eb be jmp 116cf5 0010c288 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c288: 55 push %ebp 10c289: 89 e5 mov %esp,%ebp 10c28b: 57 push %edi 10c28c: 56 push %esi 10c28d: 53 push %ebx 10c28e: 83 ec 1c sub $0x1c,%esp 10c291: 8b 5d 08 mov 0x8(%ebp),%ebx 10c294: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c297: 85 db test %ebx,%ebx 10c299: 0f 84 a9 00 00 00 je 10c348 return RTEMS_INVALID_NAME; if ( !id ) 10c29f: 85 f6 test %esi,%esi 10c2a1: 0f 84 c5 00 00 00 je 10c36c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c2a7: a1 f8 a3 12 00 mov 0x12a3f8,%eax 10c2ac: 40 inc %eax 10c2ad: a3 f8 a3 12 00 mov %eax,0x12a3f8 * 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 *) 10c2b2: 83 ec 0c sub $0xc,%esp 10c2b5: 68 00 a3 12 00 push $0x12a300 10c2ba: e8 51 1e 00 00 call 10e110 <_Objects_Allocate> 10c2bf: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c2c1: 83 c4 10 add $0x10,%esp 10c2c4: 85 c0 test %eax,%eax 10c2c6: 0f 84 8c 00 00 00 je 10c358 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c2cc: a1 b8 a4 12 00 mov 0x12a4b8,%eax 10c2d1: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c2d4: 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; 10c2db: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c2e2: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c2e9: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c2f0: 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 ); 10c2f7: 8d 42 54 lea 0x54(%edx),%eax 10c2fa: 89 45 e4 mov %eax,-0x1c(%ebp) 10c2fd: b9 38 00 00 00 mov $0x38,%ecx 10c302: 31 c0 xor %eax,%eax 10c304: 8b 7d e4 mov -0x1c(%ebp),%edi 10c307: f3 aa rep stos %al,%es:(%edi) 10c309: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c310: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c317: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c31e: 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; 10c325: 8b 42 08 mov 0x8(%edx),%eax 10c328: 0f b7 f8 movzwl %ax,%edi 10c32b: 8b 0d 1c a3 12 00 mov 0x12a31c,%ecx 10c331: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c334: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c337: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c339: e8 da 2b 00 00 call 10ef18 <_Thread_Enable_dispatch> 10c33e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10c340: 8d 65 f4 lea -0xc(%ebp),%esp 10c343: 5b pop %ebx 10c344: 5e pop %esi 10c345: 5f pop %edi 10c346: c9 leave 10c347: c3 ret rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c348: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c34d: 8d 65 f4 lea -0xc(%ebp),%esp 10c350: 5b pop %ebx 10c351: 5e pop %esi 10c352: 5f pop %edi 10c353: c9 leave 10c354: c3 ret 10c355: 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(); 10c358: e8 bb 2b 00 00 call 10ef18 <_Thread_Enable_dispatch> 10c35d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c362: 8d 65 f4 lea -0xc(%ebp),%esp 10c365: 5b pop %ebx 10c366: 5e pop %esi 10c367: 5f pop %edi 10c368: c9 leave 10c369: c3 ret 10c36a: 66 90 xchg %ax,%ax <== NOT EXECUTED Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10c36c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c371: 8d 65 f4 lea -0xc(%ebp),%esp 10c374: 5b pop %ebx 10c375: 5e pop %esi 10c376: 5f pop %edi 10c377: c9 leave 10c378: c3 ret 0013d720 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 13d720: 55 push %ebp 13d721: 89 e5 mov %esp,%ebp 13d723: 53 push %ebx 13d724: 83 ec 24 sub $0x24,%esp 13d727: 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 ) 13d72a: 85 db test %ebx,%ebx 13d72c: 0f 84 92 00 00 00 je 13d7c4 13d732: 50 push %eax 13d733: 8d 45 f4 lea -0xc(%ebp),%eax 13d736: 50 push %eax 13d737: ff 75 08 pushl 0x8(%ebp) 13d73a: 68 80 fb 16 00 push $0x16fb80 13d73f: e8 18 44 fd ff call 111b5c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13d744: 83 c4 10 add $0x10,%esp 13d747: 8b 4d f4 mov -0xc(%ebp),%ecx 13d74a: 85 c9 test %ecx,%ecx 13d74c: 74 0a je 13d758 13d74e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d753: 8b 5d fc mov -0x4(%ebp),%ebx 13d756: c9 leave 13d757: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 13d758: 8b 50 40 mov 0x40(%eax),%edx 13d75b: 8b 52 08 mov 0x8(%edx),%edx 13d75e: 89 13 mov %edx,(%ebx) status->state = the_period->state; 13d760: 8b 50 38 mov 0x38(%eax),%edx 13d763: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 13d766: 85 d2 test %edx,%edx 13d768: 75 2a jne 13d794 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 13d76a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 13d771: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 13d778: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 13d77f: 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(); 13d786: e8 f5 4c fd ff call 112480 <_Thread_Enable_dispatch> 13d78b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d78d: 8b 5d fc mov -0x4(%ebp),%ebx 13d790: c9 leave 13d791: c3 ret 13d792: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 13d794: 52 push %edx 13d795: 8d 55 ec lea -0x14(%ebp),%edx 13d798: 52 push %edx 13d799: 8d 55 e4 lea -0x1c(%ebp),%edx 13d79c: 52 push %edx 13d79d: 50 push %eax 13d79e: e8 b1 00 00 00 call 13d854 <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 13d7a3: 83 c4 10 add $0x10,%esp 13d7a6: 84 c0 test %al,%al 13d7a8: 74 26 je 13d7d0 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 13d7aa: 8b 45 e4 mov -0x1c(%ebp),%eax 13d7ad: 8b 55 e8 mov -0x18(%ebp),%edx 13d7b0: 89 43 08 mov %eax,0x8(%ebx) 13d7b3: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 13d7b6: 8b 45 ec mov -0x14(%ebp),%eax 13d7b9: 8b 55 f0 mov -0x10(%ebp),%edx 13d7bc: 89 43 10 mov %eax,0x10(%ebx) 13d7bf: 89 53 14 mov %edx,0x14(%ebx) 13d7c2: eb c2 jmp 13d786 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 13d7c4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d7c9: 8b 5d fc mov -0x4(%ebp),%ebx 13d7cc: c9 leave 13d7cd: c3 ret 13d7ce: 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(); 13d7d0: e8 ab 4c fd ff call 112480 <_Thread_Enable_dispatch> 13d7d5: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 13d7da: e9 74 ff ff ff jmp 13d753 0013d9dc : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 13d9dc: 55 push %ebp 13d9dd: 89 e5 mov %esp,%ebp 13d9df: 57 push %edi 13d9e0: 56 push %esi 13d9e1: 53 push %ebx 13d9e2: 83 ec 30 sub $0x30,%esp 13d9e5: 8b 5d 08 mov 0x8(%ebp),%ebx 13d9e8: 8b 75 0c mov 0xc(%ebp),%esi 13d9eb: 8d 45 e4 lea -0x1c(%ebp),%eax 13d9ee: 50 push %eax 13d9ef: 53 push %ebx 13d9f0: 68 80 fb 16 00 push $0x16fb80 13d9f5: e8 62 41 fd ff call 111b5c <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13d9fa: 83 c4 10 add $0x10,%esp 13d9fd: 8b 7d e4 mov -0x1c(%ebp),%edi 13da00: 85 ff test %edi,%edi 13da02: 74 10 je 13da14 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 13da04: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13da09: 8d 65 f4 lea -0xc(%ebp),%esp 13da0c: 5b pop %ebx 13da0d: 5e pop %esi 13da0e: 5f pop %edi 13da0f: c9 leave 13da10: c3 ret 13da11: 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 ) ) { 13da14: 8b 50 40 mov 0x40(%eax),%edx 13da17: 3b 15 b8 ef 16 00 cmp 0x16efb8,%edx 13da1d: 74 15 je 13da34 _Thread_Enable_dispatch(); 13da1f: e8 5c 4a fd ff call 112480 <_Thread_Enable_dispatch> 13da24: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13da29: 8d 65 f4 lea -0xc(%ebp),%esp 13da2c: 5b pop %ebx 13da2d: 5e pop %esi 13da2e: 5f pop %edi 13da2f: c9 leave 13da30: c3 ret 13da31: 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 ) { 13da34: 85 f6 test %esi,%esi 13da36: 0f 84 b0 00 00 00 je 13daec } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 13da3c: 9c pushf 13da3d: fa cli 13da3e: 5f pop %edi switch ( the_period->state ) { 13da3f: 8b 50 38 mov 0x38(%eax),%edx 13da42: 83 fa 02 cmp $0x2,%edx 13da45: 0f 84 bd 00 00 00 je 13db08 13da4b: 83 fa 04 cmp $0x4,%edx 13da4e: 74 5c je 13daac 13da50: 85 d2 test %edx,%edx 13da52: 75 b0 jne 13da04 <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 13da54: 57 push %edi 13da55: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13da56: 83 ec 0c sub $0xc,%esp 13da59: 50 push %eax 13da5a: 89 45 d4 mov %eax,-0x2c(%ebp) 13da5d: e8 7e fd ff ff call 13d7e0 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 13da62: 8b 45 d4 mov -0x2c(%ebp),%eax 13da65: 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; 13da6c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 13da73: c7 40 2c 8c db 13 00 movl $0x13db8c,0x2c(%eax) the_watchdog->id = id; 13da7a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 13da7d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 13da84: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13da87: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13da8a: 5a pop %edx 13da8b: 59 pop %ecx 13da8c: 83 c0 10 add $0x10,%eax 13da8f: 50 push %eax 13da90: 68 d8 ef 16 00 push $0x16efd8 13da95: e8 5a 59 fd ff call 1133f4 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13da9a: e8 e1 49 fd ff call 112480 <_Thread_Enable_dispatch> 13da9f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13daa1: 83 c4 10 add $0x10,%esp 13daa4: e9 60 ff ff ff jmp 13da09 13daa9: 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 ); 13daac: 83 ec 0c sub $0xc,%esp 13daaf: 50 push %eax 13dab0: 89 45 d4 mov %eax,-0x2c(%ebp) 13dab3: e8 34 fe ff ff call 13d8ec <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 13dab8: 57 push %edi 13dab9: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 13daba: 8b 45 d4 mov -0x2c(%ebp),%eax 13dabd: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 13dac4: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13dac7: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13daca: 59 pop %ecx 13dacb: 5b pop %ebx 13dacc: 83 c0 10 add $0x10,%eax 13dacf: 50 push %eax 13dad0: 68 d8 ef 16 00 push $0x16efd8 13dad5: e8 1a 59 fd ff call 1133f4 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13dada: e8 a1 49 fd ff call 112480 <_Thread_Enable_dispatch> 13dadf: b8 06 00 00 00 mov $0x6,%eax return RTEMS_TIMEOUT; 13dae4: 83 c4 10 add $0x10,%esp 13dae7: e9 1d ff ff ff jmp 13da09 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 13daec: 8b 40 38 mov 0x38(%eax),%eax 13daef: 83 f8 04 cmp $0x4,%eax 13daf2: 76 74 jbe 13db68 <== NEVER TAKEN 13daf4: 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(); 13daf6: 89 45 d4 mov %eax,-0x2c(%ebp) 13daf9: e8 82 49 fd ff call 112480 <_Thread_Enable_dispatch> return( return_value ); 13dafe: 8b 45 d4 mov -0x2c(%ebp),%eax 13db01: e9 03 ff ff ff jmp 13da09 13db06: 66 90 xchg %ax,%ax <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 13db08: 83 ec 0c sub $0xc,%esp 13db0b: 50 push %eax 13db0c: 89 45 d4 mov %eax,-0x2c(%ebp) 13db0f: e8 d8 fd ff ff call 13d8ec <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 13db14: 8b 45 d4 mov -0x2c(%ebp),%eax 13db17: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 13db1e: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 13db21: 57 push %edi 13db22: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 13db23: 8b 15 b8 ef 16 00 mov 0x16efb8,%edx 13db29: 8b 48 08 mov 0x8(%eax),%ecx 13db2c: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13db2f: 5e pop %esi 13db30: 5f pop %edi 13db31: 68 00 40 00 00 push $0x4000 13db36: 52 push %edx 13db37: 89 45 d4 mov %eax,-0x2c(%ebp) 13db3a: e8 2d 52 fd ff call 112d6c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 13db3f: 9c pushf 13db40: fa cli 13db41: 59 pop %ecx local_state = the_period->state; 13db42: 8b 45 d4 mov -0x2c(%ebp),%eax 13db45: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 13db48: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 13db4f: 51 push %ecx 13db50: 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 ) 13db51: 83 c4 10 add $0x10,%esp 13db54: 83 fa 03 cmp $0x3,%edx 13db57: 74 18 je 13db71 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 13db59: e8 22 49 fd ff call 112480 <_Thread_Enable_dispatch> 13db5e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13db60: e9 a4 fe ff ff jmp 13da09 13db65: 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 ) { 13db68: 8b 04 85 e4 3e 16 00 mov 0x163ee4(,%eax,4),%eax 13db6f: eb 85 jmp 13daf6 /* * 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 ); 13db71: 83 ec 08 sub $0x8,%esp 13db74: 68 00 40 00 00 push $0x4000 13db79: ff 35 b8 ef 16 00 pushl 0x16efb8 13db7f: e8 54 45 fd ff call 1120d8 <_Thread_Clear_state> 13db84: 83 c4 10 add $0x10,%esp 13db87: eb d0 jmp 13db59 0012db9c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 12db9c: 55 push %ebp 12db9d: 89 e5 mov %esp,%ebp 12db9f: 57 push %edi 12dba0: 56 push %esi 12dba1: 53 push %ebx 12dba2: 83 ec 7c sub $0x7c,%esp 12dba5: 8b 7d 08 mov 0x8(%ebp),%edi 12dba8: 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 ) 12dbab: 85 f6 test %esi,%esi 12dbad: 0f 84 bd 00 00 00 je 12dc70 <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 12dbb3: 83 ec 08 sub $0x8,%esp 12dbb6: 68 a8 04 16 00 push $0x1604a8 12dbbb: 57 push %edi 12dbbc: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 12dbbe: 59 pop %ecx 12dbbf: 5b pop %ebx 12dbc0: 68 e0 04 16 00 push $0x1604e0 12dbc5: 57 push %edi 12dbc6: ff d6 call *%esi (*print)( context, "--- Wall times are in seconds ---\n" ); 12dbc8: 58 pop %eax 12dbc9: 5a pop %edx 12dbca: 68 04 05 16 00 push $0x160504 12dbcf: 57 push %edi 12dbd0: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 12dbd2: 59 pop %ecx 12dbd3: 5b pop %ebx 12dbd4: 68 28 05 16 00 push $0x160528 12dbd9: 57 push %edi 12dbda: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 12dbdc: 58 pop %eax 12dbdd: 5a pop %edx 12dbde: 68 74 05 16 00 push $0x160574 12dbe3: 57 push %edi 12dbe4: 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 ; 12dbe6: 8b 1d 88 fb 16 00 mov 0x16fb88,%ebx 12dbec: 83 c4 10 add $0x10,%esp 12dbef: 3b 1d 8c fb 16 00 cmp 0x16fb8c,%ebx 12dbf5: 77 79 ja 12dc70 <== 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); 12dbf7: 89 75 84 mov %esi,-0x7c(%ebp) 12dbfa: eb 09 jmp 12dc05 * 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++ ) { 12dbfc: 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 ; 12dbfd: 39 1d 8c fb 16 00 cmp %ebx,0x16fb8c 12dc03: 72 6b jb 12dc70 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 12dc05: 83 ec 08 sub $0x8,%esp 12dc08: 8d 45 88 lea -0x78(%ebp),%eax 12dc0b: 50 push %eax 12dc0c: 53 push %ebx 12dc0d: e8 62 fa 00 00 call 13d674 if ( status != RTEMS_SUCCESSFUL ) 12dc12: 83 c4 10 add $0x10,%esp 12dc15: 85 c0 test %eax,%eax 12dc17: 75 e3 jne 12dbfc continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 12dc19: 83 ec 08 sub $0x8,%esp 12dc1c: 8d 55 c0 lea -0x40(%ebp),%edx 12dc1f: 52 push %edx 12dc20: 53 push %ebx 12dc21: e8 fa fa 00 00 call 13d720 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 12dc26: 83 c4 0c add $0xc,%esp 12dc29: 8d 45 e3 lea -0x1d(%ebp),%eax 12dc2c: 50 push %eax 12dc2d: 6a 05 push $0x5 12dc2f: ff 75 c0 pushl -0x40(%ebp) 12dc32: e8 d9 21 fe ff call 10fe10 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 12dc37: 59 pop %ecx 12dc38: 5e pop %esi 12dc39: ff 75 8c pushl -0x74(%ebp) 12dc3c: ff 75 88 pushl -0x78(%ebp) 12dc3f: 8d 55 e3 lea -0x1d(%ebp),%edx 12dc42: 52 push %edx 12dc43: 53 push %ebx 12dc44: 68 c6 04 16 00 push $0x1604c6 12dc49: 57 push %edi 12dc4a: ff 55 84 call *-0x7c(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 12dc4d: 8b 45 88 mov -0x78(%ebp),%eax 12dc50: 83 c4 20 add $0x20,%esp 12dc53: 85 c0 test %eax,%eax 12dc55: 75 21 jne 12dc78 (*print)( context, "\n" ); 12dc57: 83 ec 08 sub $0x8,%esp 12dc5a: 68 a1 22 16 00 push $0x1622a1 12dc5f: 57 push %edi 12dc60: ff 55 84 call *-0x7c(%ebp) continue; 12dc63: 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++ ) { 12dc66: 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 ; 12dc67: 39 1d 8c fb 16 00 cmp %ebx,0x16fb8c 12dc6d: 73 96 jae 12dc05 <== NEVER TAKEN 12dc6f: 90 nop <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 12dc70: 8d 65 f4 lea -0xc(%ebp),%esp 12dc73: 5b pop %ebx 12dc74: 5e pop %esi 12dc75: 5f pop %edi 12dc76: c9 leave 12dc77: 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 ); 12dc78: 52 push %edx 12dc79: 8d 55 d8 lea -0x28(%ebp),%edx 12dc7c: 52 push %edx 12dc7d: 50 push %eax 12dc7e: 8d 45 a0 lea -0x60(%ebp),%eax 12dc81: 50 push %eax 12dc82: e8 0d 17 00 00 call 12f394 <_Timespec_Divide_by_integer> (*print)( context, 12dc87: 8b 4d dc mov -0x24(%ebp),%ecx 12dc8a: be d3 4d 62 10 mov $0x10624dd3,%esi 12dc8f: 89 c8 mov %ecx,%eax 12dc91: f7 ee imul %esi 12dc93: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dc99: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dc9f: c1 f8 06 sar $0x6,%eax 12dca2: c1 f9 1f sar $0x1f,%ecx 12dca5: 29 c8 sub %ecx,%eax 12dca7: 50 push %eax 12dca8: ff 75 d8 pushl -0x28(%ebp) 12dcab: 8b 4d 9c mov -0x64(%ebp),%ecx 12dcae: 89 c8 mov %ecx,%eax 12dcb0: f7 ee imul %esi 12dcb2: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dcb8: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dcbe: c1 f8 06 sar $0x6,%eax 12dcc1: c1 f9 1f sar $0x1f,%ecx 12dcc4: 29 c8 sub %ecx,%eax 12dcc6: 50 push %eax 12dcc7: ff 75 98 pushl -0x68(%ebp) 12dcca: 8b 4d 94 mov -0x6c(%ebp),%ecx 12dccd: 89 c8 mov %ecx,%eax 12dccf: f7 ee imul %esi 12dcd1: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12dcd7: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dcdd: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dce3: c1 f8 06 sar $0x6,%eax 12dce6: c1 f9 1f sar $0x1f,%ecx 12dce9: 29 c8 sub %ecx,%eax 12dceb: 50 push %eax 12dcec: ff 75 90 pushl -0x70(%ebp) 12dcef: 68 c0 05 16 00 push $0x1605c0 12dcf4: 57 push %edi 12dcf5: 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); 12dcf8: 83 c4 2c add $0x2c,%esp 12dcfb: 8d 55 d8 lea -0x28(%ebp),%edx 12dcfe: 52 push %edx 12dcff: ff 75 88 pushl -0x78(%ebp) 12dd02: 8d 45 b8 lea -0x48(%ebp),%eax 12dd05: 50 push %eax 12dd06: e8 89 16 00 00 call 12f394 <_Timespec_Divide_by_integer> (*print)( context, 12dd0b: 8b 4d dc mov -0x24(%ebp),%ecx 12dd0e: 89 c8 mov %ecx,%eax 12dd10: f7 ee imul %esi 12dd12: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd18: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dd1e: c1 f8 06 sar $0x6,%eax 12dd21: c1 f9 1f sar $0x1f,%ecx 12dd24: 29 c8 sub %ecx,%eax 12dd26: 50 push %eax 12dd27: ff 75 d8 pushl -0x28(%ebp) 12dd2a: 8b 4d b4 mov -0x4c(%ebp),%ecx 12dd2d: 89 c8 mov %ecx,%eax 12dd2f: f7 ee imul %esi 12dd31: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd37: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dd3d: c1 f8 06 sar $0x6,%eax 12dd40: c1 f9 1f sar $0x1f,%ecx 12dd43: 29 c8 sub %ecx,%eax 12dd45: 50 push %eax 12dd46: ff 75 b0 pushl -0x50(%ebp) 12dd49: 8b 4d ac mov -0x54(%ebp),%ecx 12dd4c: 89 c8 mov %ecx,%eax 12dd4e: f7 ee imul %esi 12dd50: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12dd56: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd5c: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi 12dd62: c1 fe 06 sar $0x6,%esi 12dd65: 89 c8 mov %ecx,%eax 12dd67: 99 cltd 12dd68: 29 d6 sub %edx,%esi 12dd6a: 56 push %esi 12dd6b: ff 75 a8 pushl -0x58(%ebp) 12dd6e: 68 e0 05 16 00 push $0x1605e0 12dd73: 57 push %edi 12dd74: ff 55 84 call *-0x7c(%ebp) 12dd77: 83 c4 30 add $0x30,%esp 12dd7a: e9 7d fe ff ff jmp 12dbfc 0012dd98 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 12dd98: 55 push %ebp 12dd99: 89 e5 mov %esp,%ebp 12dd9b: 53 push %ebx 12dd9c: 83 ec 04 sub $0x4,%esp 12dd9f: a1 f8 ee 16 00 mov 0x16eef8,%eax 12dda4: 40 inc %eax 12dda5: a3 f8 ee 16 00 mov %eax,0x16eef8 /* * 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 ; 12ddaa: 8b 1d 88 fb 16 00 mov 0x16fb88,%ebx 12ddb0: 3b 1d 8c fb 16 00 cmp 0x16fb8c,%ebx 12ddb6: 77 15 ja 12ddcd <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 12ddb8: 83 ec 0c sub $0xc,%esp 12ddbb: 53 push %ebx 12ddbc: e8 17 00 00 00 call 12ddd8 * 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++ ) { 12ddc1: 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 ; 12ddc2: 83 c4 10 add $0x10,%esp 12ddc5: 39 1d 8c fb 16 00 cmp %ebx,0x16fb8c 12ddcb: 73 eb jae 12ddb8 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 12ddcd: 8b 5d fc mov -0x4(%ebp),%ebx 12ddd0: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 12ddd1: e9 aa 46 fe ff jmp 112480 <_Thread_Enable_dispatch> 0012ddd8 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 12ddd8: 55 push %ebp 12ddd9: 89 e5 mov %esp,%ebp 12dddb: 57 push %edi 12dddc: 53 push %ebx 12dddd: 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 *) 12dde0: 8d 45 f4 lea -0xc(%ebp),%eax 12dde3: 50 push %eax 12dde4: ff 75 08 pushl 0x8(%ebp) 12dde7: 68 80 fb 16 00 push $0x16fb80 12ddec: e8 6b 3d fe ff call 111b5c <_Objects_Get> 12ddf1: 89 c2 mov %eax,%edx Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 12ddf3: 83 c4 10 add $0x10,%esp 12ddf6: 8b 45 f4 mov -0xc(%ebp),%eax 12ddf9: 85 c0 test %eax,%eax 12ddfb: 75 3b jne 12de38 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 12ddfd: 8d 5a 54 lea 0x54(%edx),%ebx 12de00: b9 38 00 00 00 mov $0x38,%ecx 12de05: 31 c0 xor %eax,%eax 12de07: 89 df mov %ebx,%edi 12de09: f3 aa rep stos %al,%es:(%edi) 12de0b: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 12de12: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 12de19: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 12de20: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 12de27: e8 54 46 fe ff call 112480 <_Thread_Enable_dispatch> 12de2c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12de2e: 8d 65 f8 lea -0x8(%ebp),%esp 12de31: 5b pop %ebx 12de32: 5f pop %edi 12de33: c9 leave 12de34: c3 ret 12de35: 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 ) { 12de38: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12de3d: 8d 65 f8 lea -0x8(%ebp),%esp 12de40: 5b pop %ebx 12de41: 5f pop %edi 12de42: c9 leave 12de43: c3 ret 00117470 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117470: 55 push %ebp 117471: 89 e5 mov %esp,%ebp 117473: 57 push %edi 117474: 56 push %esi 117475: 53 push %ebx 117476: 83 ec 1c sub $0x1c,%esp 117479: 8b 75 08 mov 0x8(%ebp),%esi 11747c: 8b 5d 0c mov 0xc(%ebp),%ebx 11747f: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117482: 85 f6 test %esi,%esi 117484: 0f 84 92 00 00 00 je 11751c return RTEMS_INVALID_NAME; if ( !starting_address ) 11748a: 85 db test %ebx,%ebx 11748c: 74 09 je 117497 return RTEMS_INVALID_ADDRESS; if ( !id ) 11748e: 85 ff test %edi,%edi 117490: 74 05 je 117497 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 117492: f6 c3 03 test $0x3,%bl 117495: 74 0d je 1174a4 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 117497: b8 09 00 00 00 mov $0x9,%eax } 11749c: 8d 65 f4 lea -0xc(%ebp),%esp 11749f: 5b pop %ebx 1174a0: 5e pop %esi 1174a1: 5f pop %edi 1174a2: c9 leave 1174a3: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 1174a4: 83 ec 0c sub $0xc,%esp 1174a7: ff 35 f0 21 14 00 pushl 0x1421f0 1174ad: e8 4a 25 00 00 call 1199fc <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 1174b2: c7 04 24 40 20 14 00 movl $0x142040,(%esp) 1174b9: e8 6e 39 00 00 call 11ae2c <_Objects_Allocate> 1174be: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 1174c0: 83 c4 10 add $0x10,%esp 1174c3: 85 c0 test %eax,%eax 1174c5: 74 65 je 11752c return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 1174c7: ff 75 14 pushl 0x14(%ebp) 1174ca: ff 75 10 pushl 0x10(%ebp) 1174cd: 53 push %ebx 1174ce: 8d 40 68 lea 0x68(%eax),%eax 1174d1: 50 push %eax 1174d2: 89 55 e4 mov %edx,-0x1c(%ebp) 1174d5: e8 36 34 00 00 call 11a910 <_Heap_Initialize> 1174da: 8b 55 e4 mov -0x1c(%ebp),%edx 1174dd: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 1174e0: 83 c4 10 add $0x10,%esp 1174e3: 85 c0 test %eax,%eax 1174e5: 75 4d jne 117534 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1174e7: 83 ec 08 sub $0x8,%esp 1174ea: 52 push %edx 1174eb: 68 40 20 14 00 push $0x142040 1174f0: e8 b7 3c 00 00 call 11b1ac <_Objects_Free> 1174f5: b8 08 00 00 00 mov $0x8,%eax 1174fa: 83 c4 10 add $0x10,%esp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 1174fd: 83 ec 0c sub $0xc,%esp 117500: ff 35 f0 21 14 00 pushl 0x1421f0 117506: 89 45 e4 mov %eax,-0x1c(%ebp) 117509: e8 36 25 00 00 call 119a44 <_API_Mutex_Unlock> return return_status; 11750e: 83 c4 10 add $0x10,%esp 117511: 8b 45 e4 mov -0x1c(%ebp),%eax } 117514: 8d 65 f4 lea -0xc(%ebp),%esp 117517: 5b pop %ebx 117518: 5e pop %esi 117519: 5f pop %edi 11751a: c9 leave 11751b: c3 ret ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 11751c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117521: 8d 65 f4 lea -0xc(%ebp),%esp 117524: 5b pop %ebx 117525: 5e pop %esi 117526: 5f pop %edi 117527: c9 leave 117528: c3 ret 117529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 11752c: b8 05 00 00 00 mov $0x5,%eax 117531: eb ca jmp 1174fd 117533: 90 nop <== NOT EXECUTED return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117534: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 117537: 8b 45 10 mov 0x10(%ebp),%eax 11753a: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 11753d: 8b 45 14 mov 0x14(%ebp),%eax 117540: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 117543: 8b 45 18 mov 0x18(%ebp),%eax 117546: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 117549: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 117550: 6a 06 push $0x6 117552: 6a 40 push $0x40 117554: 8b 45 18 mov 0x18(%ebp),%eax 117557: c1 e8 02 shr $0x2,%eax 11755a: 83 e0 01 and $0x1,%eax 11755d: 50 push %eax 11755e: 8d 42 10 lea 0x10(%edx),%eax 117561: 50 push %eax 117562: 89 55 e4 mov %edx,-0x1c(%ebp) 117565: e8 56 4e 00 00 call 11c3c0 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11756a: 8b 55 e4 mov -0x1c(%ebp),%edx 11756d: 8b 42 08 mov 0x8(%edx),%eax 117570: 0f b7 d8 movzwl %ax,%ebx 117573: 8b 0d 5c 20 14 00 mov 0x14205c,%ecx 117579: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11757c: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 11757f: 89 07 mov %eax,(%edi) 117581: 31 c0 xor %eax,%eax 117583: 83 c4 10 add $0x10,%esp 117586: e9 72 ff ff ff jmp 1174fd 0011758c : */ rtems_status_code rtems_region_delete( rtems_id id ) { 11758c: 55 push %ebp 11758d: 89 e5 mov %esp,%ebp 11758f: 53 push %ebx 117590: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117593: ff 35 f0 21 14 00 pushl 0x1421f0 117599: e8 5e 24 00 00 call 1199fc <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 11759e: 83 c4 0c add $0xc,%esp 1175a1: 8d 45 f4 lea -0xc(%ebp),%eax 1175a4: 50 push %eax 1175a5: ff 75 08 pushl 0x8(%ebp) 1175a8: 68 40 20 14 00 push $0x142040 1175ad: e8 2a 3d 00 00 call 11b2dc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 1175b2: 83 c4 10 add $0x10,%esp 1175b5: 8b 5d f4 mov -0xc(%ebp),%ebx 1175b8: 85 db test %ebx,%ebx 1175ba: 74 1c je 1175d8 1175bc: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1175c1: 83 ec 0c sub $0xc,%esp 1175c4: ff 35 f0 21 14 00 pushl 0x1421f0 1175ca: e8 75 24 00 00 call 119a44 <_API_Mutex_Unlock> return return_status; } 1175cf: 89 d8 mov %ebx,%eax 1175d1: 8b 5d fc mov -0x4(%ebp),%ebx 1175d4: c9 leave 1175d5: c3 ret 1175d6: 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 ) 1175d8: 8b 48 64 mov 0x64(%eax),%ecx 1175db: 85 c9 test %ecx,%ecx 1175dd: 74 09 je 1175e8 1175df: bb 0c 00 00 00 mov $0xc,%ebx 1175e4: eb db jmp 1175c1 1175e6: 66 90 xchg %ax,%ax <== NOT EXECUTED return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 1175e8: 83 ec 08 sub $0x8,%esp 1175eb: 50 push %eax 1175ec: 68 40 20 14 00 push $0x142040 1175f1: 89 45 e4 mov %eax,-0x1c(%ebp) 1175f4: e8 af 38 00 00 call 11aea8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1175f9: 58 pop %eax 1175fa: 5a pop %edx 1175fb: 8b 45 e4 mov -0x1c(%ebp),%eax 1175fe: 50 push %eax 1175ff: 68 40 20 14 00 push $0x142040 117604: e8 a3 3b 00 00 call 11b1ac <_Objects_Free> 117609: 31 db xor %ebx,%ebx 11760b: 83 c4 10 add $0x10,%esp 11760e: eb b1 jmp 1175c1 00117610 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 117610: 55 push %ebp 117611: 89 e5 mov %esp,%ebp 117613: 56 push %esi 117614: 53 push %ebx 117615: 83 ec 10 sub $0x10,%esp 117618: 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 ) 11761b: 85 db test %ebx,%ebx 11761d: 74 71 je 117690 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 11761f: 83 ec 0c sub $0xc,%esp 117622: ff 35 f0 21 14 00 pushl 0x1421f0 117628: e8 cf 23 00 00 call 1199fc <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 11762d: 83 c4 0c add $0xc,%esp 117630: 8d 45 f0 lea -0x10(%ebp),%eax 117633: 50 push %eax 117634: ff 75 08 pushl 0x8(%ebp) 117637: 68 40 20 14 00 push $0x142040 11763c: e8 9b 3c 00 00 call 11b2dc <_Objects_Get_no_protection> 117641: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 117643: 83 c4 10 add $0x10,%esp 117646: 8b 45 f0 mov -0x10(%ebp),%eax 117649: 85 c0 test %eax,%eax 11764b: 74 1f je 11766c 11764d: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117652: 83 ec 0c sub $0xc,%esp 117655: ff 35 f0 21 14 00 pushl 0x1421f0 11765b: e8 e4 23 00 00 call 119a44 <_API_Mutex_Unlock> return return_status; 117660: 83 c4 10 add $0x10,%esp } 117663: 89 d8 mov %ebx,%eax 117665: 8d 65 f8 lea -0x8(%ebp),%esp 117668: 5b pop %ebx 117669: 5e pop %esi 11766a: c9 leave 11766b: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( 11766c: 8d 45 f4 lea -0xc(%ebp),%eax 11766f: 50 push %eax 117670: ff 75 10 pushl 0x10(%ebp) 117673: 53 push %ebx 117674: 8d 46 68 lea 0x68(%esi),%eax 117677: 50 push %eax 117678: e8 9b 2f 00 00 call 11a618 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 11767d: 83 c4 10 add $0x10,%esp 117680: 85 c0 test %eax,%eax 117682: 74 18 je 11769c the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117684: 48 dec %eax 117685: 74 25 je 1176ac 117687: bb 18 00 00 00 mov $0x18,%ebx 11768c: eb c4 jmp 117652 11768e: 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 ) 117690: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117692: 89 d8 mov %ebx,%eax 117694: 8d 65 f8 lea -0x8(%ebp),%esp 117697: 5b pop %ebx 117698: 5e pop %esi 117699: c9 leave 11769a: c3 ret 11769b: 90 nop <== NOT EXECUTED length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 11769c: 8b 45 f4 mov -0xc(%ebp),%eax 11769f: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 1176a2: 01 46 5c add %eax,0x5c(%esi) 1176a5: 31 db xor %ebx,%ebx 1176a7: eb a9 jmp 117652 1176a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 1176ac: bb 09 00 00 00 mov $0x9,%ebx 1176b1: eb 9f jmp 117652 001176b4 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 1176b4: 55 push %ebp 1176b5: 89 e5 mov %esp,%ebp 1176b7: 53 push %ebx 1176b8: 83 ec 14 sub $0x14,%esp 1176bb: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1176be: 85 db test %ebx,%ebx 1176c0: 74 76 je 117738 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1176c2: 83 ec 0c sub $0xc,%esp 1176c5: ff 35 f0 21 14 00 pushl 0x1421f0 1176cb: e8 2c 23 00 00 call 1199fc <_API_Mutex_Lock> 1176d0: 83 c4 0c add $0xc,%esp 1176d3: 8d 45 f4 lea -0xc(%ebp),%eax 1176d6: 50 push %eax 1176d7: ff 75 08 pushl 0x8(%ebp) 1176da: 68 40 20 14 00 push $0x142040 1176df: e8 f8 3b 00 00 call 11b2dc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 1176e4: 83 c4 10 add $0x10,%esp 1176e7: 8b 55 f4 mov -0xc(%ebp),%edx 1176ea: 85 d2 test %edx,%edx 1176ec: 74 1e je 11770c 1176ee: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1176f3: 83 ec 0c sub $0xc,%esp 1176f6: ff 35 f0 21 14 00 pushl 0x1421f0 1176fc: e8 43 23 00 00 call 119a44 <_API_Mutex_Unlock> return return_status; 117701: 83 c4 10 add $0x10,%esp } 117704: 89 d8 mov %ebx,%eax 117706: 8b 5d fc mov -0x4(%ebp),%ebx 117709: c9 leave 11770a: c3 ret 11770b: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 11770c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 117713: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 11771a: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117721: 83 ec 08 sub $0x8,%esp 117724: 53 push %ebx 117725: 83 c0 68 add $0x68,%eax 117728: 50 push %eax 117729: e8 fa 30 00 00 call 11a828 <_Heap_Get_free_information> 11772e: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 117730: 83 c4 10 add $0x10,%esp 117733: eb be jmp 1176f3 117735: 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 ) 117738: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 11773a: 89 d8 mov %ebx,%eax 11773c: 8b 5d fc mov -0x4(%ebp),%ebx 11773f: c9 leave 117740: c3 ret 00117744 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 117744: 55 push %ebp 117745: 89 e5 mov %esp,%ebp 117747: 53 push %ebx 117748: 83 ec 14 sub $0x14,%esp 11774b: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 11774e: 85 db test %ebx,%ebx 117750: 74 5e je 1177b0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117752: 83 ec 0c sub $0xc,%esp 117755: ff 35 f0 21 14 00 pushl 0x1421f0 11775b: e8 9c 22 00 00 call 1199fc <_API_Mutex_Lock> 117760: 83 c4 0c add $0xc,%esp 117763: 8d 45 f4 lea -0xc(%ebp),%eax 117766: 50 push %eax 117767: ff 75 08 pushl 0x8(%ebp) 11776a: 68 40 20 14 00 push $0x142040 11776f: e8 68 3b 00 00 call 11b2dc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117774: 83 c4 10 add $0x10,%esp 117777: 8b 55 f4 mov -0xc(%ebp),%edx 11777a: 85 d2 test %edx,%edx 11777c: 74 1e je 11779c 11777e: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117783: 83 ec 0c sub $0xc,%esp 117786: ff 35 f0 21 14 00 pushl 0x1421f0 11778c: e8 b3 22 00 00 call 119a44 <_API_Mutex_Unlock> return return_status; 117791: 83 c4 10 add $0x10,%esp } 117794: 89 d8 mov %ebx,%eax 117796: 8b 5d fc mov -0x4(%ebp),%ebx 117799: c9 leave 11779a: c3 ret 11779b: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 11779c: 83 ec 08 sub $0x8,%esp 11779f: 53 push %ebx 1177a0: 83 c0 68 add $0x68,%eax 1177a3: 50 push %eax 1177a4: e8 d7 30 00 00 call 11a880 <_Heap_Get_information> 1177a9: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 1177ab: 83 c4 10 add $0x10,%esp 1177ae: eb d3 jmp 117783 { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1177b0: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 1177b2: 89 d8 mov %ebx,%eax 1177b4: 8b 5d fc mov -0x4(%ebp),%ebx 1177b7: c9 leave 1177b8: c3 ret 001177bc : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 1177bc: 55 push %ebp 1177bd: 89 e5 mov %esp,%ebp 1177bf: 57 push %edi 1177c0: 56 push %esi 1177c1: 53 push %ebx 1177c2: 83 ec 2c sub $0x2c,%esp 1177c5: 8b 75 0c mov 0xc(%ebp),%esi 1177c8: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 1177cb: 85 db test %ebx,%ebx 1177cd: 0f 84 a1 00 00 00 je 117874 return RTEMS_INVALID_ADDRESS; *segment = NULL; 1177d3: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 1177d9: 85 f6 test %esi,%esi 1177db: 75 0f jne 1177ec 1177dd: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1177e2: 8d 65 f4 lea -0xc(%ebp),%esp 1177e5: 5b pop %ebx 1177e6: 5e pop %esi 1177e7: 5f pop %edi 1177e8: c9 leave 1177e9: c3 ret 1177ea: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 1177ec: 83 ec 0c sub $0xc,%esp 1177ef: ff 35 f0 21 14 00 pushl 0x1421f0 1177f5: e8 02 22 00 00 call 1199fc <_API_Mutex_Lock> executing = _Thread_Executing; 1177fa: a1 f8 21 14 00 mov 0x1421f8,%eax 1177ff: 89 45 d4 mov %eax,-0x2c(%ebp) 117802: 83 c4 0c add $0xc,%esp 117805: 8d 45 e4 lea -0x1c(%ebp),%eax 117808: 50 push %eax 117809: ff 75 08 pushl 0x8(%ebp) 11780c: 68 40 20 14 00 push $0x142040 117811: e8 c6 3a 00 00 call 11b2dc <_Objects_Get_no_protection> 117816: 89 c7 mov %eax,%edi the_region = _Region_Get( id, &location ); switch ( location ) { 117818: 83 c4 10 add $0x10,%esp 11781b: 8b 45 e4 mov -0x1c(%ebp),%eax 11781e: 85 c0 test %eax,%eax 117820: 75 2a jne 11784c case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 117822: 3b 77 5c cmp 0x5c(%edi),%esi 117825: 76 2d jbe 117854 117827: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11782c: 83 ec 0c sub $0xc,%esp 11782f: ff 35 f0 21 14 00 pushl 0x1421f0 117835: 89 45 d0 mov %eax,-0x30(%ebp) 117838: e8 07 22 00 00 call 119a44 <_API_Mutex_Unlock> return return_status; 11783d: 83 c4 10 add $0x10,%esp 117840: 8b 45 d0 mov -0x30(%ebp),%eax } 117843: 8d 65 f4 lea -0xc(%ebp),%esp 117846: 5b pop %ebx 117847: 5e pop %esi 117848: 5f pop %edi 117849: c9 leave 11784a: c3 ret 11784b: 90 nop <== NOT EXECUTED _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 11784c: b8 04 00 00 00 mov $0x4,%eax 117851: eb d9 jmp 11782c 117853: 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 ); 117854: 6a 00 push $0x0 117856: 6a 00 push $0x0 117858: 56 push %esi 117859: 8d 47 68 lea 0x68(%edi),%eax 11785c: 50 push %eax 11785d: e8 02 2c 00 00 call 11a464 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 117862: 83 c4 10 add $0x10,%esp 117865: 85 c0 test %eax,%eax 117867: 74 17 je 117880 the_region->number_of_used_blocks += 1; 117869: ff 47 64 incl 0x64(%edi) *segment = the_segment; 11786c: 89 03 mov %eax,(%ebx) 11786e: 31 c0 xor %eax,%eax 117870: eb ba jmp 11782c 117872: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117874: b8 09 00 00 00 mov $0x9,%eax 117879: e9 64 ff ff ff jmp 1177e2 11787e: 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 ) ) { 117880: f6 45 10 01 testb $0x1,0x10(%ebp) 117884: 74 07 je 11788d 117886: b8 0d 00 00 00 mov $0xd,%eax 11788b: eb 9f jmp 11782c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11788d: a1 38 21 14 00 mov 0x142138,%eax 117892: 40 inc %eax 117893: a3 38 21 14 00 mov %eax,0x142138 * 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(); 117898: 83 ec 0c sub $0xc,%esp 11789b: ff 35 f0 21 14 00 pushl 0x1421f0 1178a1: e8 9e 21 00 00 call 119a44 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 1178a6: 8d 47 10 lea 0x10(%edi),%eax 1178a9: 8b 55 d4 mov -0x2c(%ebp),%edx 1178ac: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 1178af: 8b 4d 08 mov 0x8(%ebp),%ecx 1178b2: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 1178b5: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 1178b8: 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; 1178bb: 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 ); 1178c2: 83 c4 0c add $0xc,%esp 1178c5: 68 70 c4 11 00 push $0x11c470 1178ca: ff 75 14 pushl 0x14(%ebp) 1178cd: 50 push %eax 1178ce: e8 8d 48 00 00 call 11c160 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 1178d3: e8 24 43 00 00 call 11bbfc <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 1178d8: 8b 55 d4 mov -0x2c(%ebp),%edx 1178db: 8b 42 34 mov 0x34(%edx),%eax 1178de: 83 c4 10 add $0x10,%esp 1178e1: e9 fc fe ff ff jmp 1177e2 001178e8 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 1178e8: 55 push %ebp 1178e9: 89 e5 mov %esp,%ebp 1178eb: 56 push %esi 1178ec: 53 push %ebx 1178ed: 83 ec 20 sub $0x20,%esp 1178f0: 8b 5d 0c mov 0xc(%ebp),%ebx 1178f3: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 1178f6: 85 db test %ebx,%ebx 1178f8: 74 72 je 11796c return RTEMS_INVALID_ADDRESS; if ( !size ) 1178fa: 85 f6 test %esi,%esi 1178fc: 74 6e je 11796c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1178fe: 83 ec 0c sub $0xc,%esp 117901: ff 35 f0 21 14 00 pushl 0x1421f0 117907: e8 f0 20 00 00 call 1199fc <_API_Mutex_Lock> 11790c: 83 c4 0c add $0xc,%esp 11790f: 8d 45 f4 lea -0xc(%ebp),%eax 117912: 50 push %eax 117913: ff 75 08 pushl 0x8(%ebp) 117916: 68 40 20 14 00 push $0x142040 11791b: e8 bc 39 00 00 call 11b2dc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117920: 83 c4 10 add $0x10,%esp 117923: 8b 55 f4 mov -0xc(%ebp),%edx 117926: 85 d2 test %edx,%edx 117928: 75 36 jne 117960 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 11792a: 52 push %edx 11792b: 56 push %esi 11792c: 53 push %ebx 11792d: 83 c0 68 add $0x68,%eax 117930: 50 push %eax 117931: e8 0a 34 00 00 call 11ad40 <_Heap_Size_of_alloc_area> 117936: 83 c4 10 add $0x10,%esp 117939: 84 c0 test %al,%al 11793b: 74 3b je 117978 <== ALWAYS TAKEN 11793d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11793f: 83 ec 0c sub $0xc,%esp 117942: ff 35 f0 21 14 00 pushl 0x1421f0 117948: 89 45 e4 mov %eax,-0x1c(%ebp) 11794b: e8 f4 20 00 00 call 119a44 <_API_Mutex_Unlock> return return_status; 117950: 83 c4 10 add $0x10,%esp 117953: 8b 45 e4 mov -0x1c(%ebp),%eax } 117956: 8d 65 f8 lea -0x8(%ebp),%esp 117959: 5b pop %ebx 11795a: 5e pop %esi 11795b: c9 leave 11795c: c3 ret 11795d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 117960: 4a dec %edx 117961: 75 da jne 11793d <== ALWAYS TAKEN 117963: b8 04 00 00 00 mov $0x4,%eax 117968: eb d5 jmp 11793f 11796a: 66 90 xchg %ax,%ax <== NOT EXECUTED return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 11796c: b8 09 00 00 00 mov $0x9,%eax } 117971: 8d 65 f8 lea -0x8(%ebp),%esp 117974: 5b pop %ebx 117975: 5e pop %esi 117976: c9 leave 117977: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 117978: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 11797d: eb c0 jmp 11793f <== NOT EXECUTED 001179a4 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 1179a4: 55 push %ebp 1179a5: 89 e5 mov %esp,%ebp 1179a7: 56 push %esi 1179a8: 53 push %ebx 1179a9: 83 ec 20 sub $0x20,%esp 1179ac: 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 ) 1179af: 85 db test %ebx,%ebx 1179b1: 0f 84 a5 00 00 00 je 117a5c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1179b7: 83 ec 0c sub $0xc,%esp 1179ba: ff 35 f0 21 14 00 pushl 0x1421f0 1179c0: e8 37 20 00 00 call 1199fc <_API_Mutex_Lock> 1179c5: 83 c4 0c add $0xc,%esp 1179c8: 8d 45 f0 lea -0x10(%ebp),%eax 1179cb: 50 push %eax 1179cc: ff 75 08 pushl 0x8(%ebp) 1179cf: 68 40 20 14 00 push $0x142040 1179d4: e8 03 39 00 00 call 11b2dc <_Objects_Get_no_protection> 1179d9: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 1179db: 83 c4 10 add $0x10,%esp 1179de: 8b 45 f0 mov -0x10(%ebp),%eax 1179e1: 85 c0 test %eax,%eax 1179e3: 74 1f je 117a04 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1179e5: 83 ec 0c sub $0xc,%esp 1179e8: ff 35 f0 21 14 00 pushl 0x1421f0 1179ee: e8 51 20 00 00 call 119a44 <_API_Mutex_Unlock> 1179f3: b8 04 00 00 00 mov $0x4,%eax return return_status; 1179f8: 83 c4 10 add $0x10,%esp } 1179fb: 8d 65 f8 lea -0x8(%ebp),%esp 1179fe: 5b pop %ebx 1179ff: 5e pop %esi 117a00: c9 leave 117a01: c3 ret 117a02: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 117a04: 83 ec 0c sub $0xc,%esp 117a07: 8d 45 f4 lea -0xc(%ebp),%eax 117a0a: 50 push %eax 117a0b: 8d 45 ec lea -0x14(%ebp),%eax 117a0e: 50 push %eax 117a0f: ff 75 10 pushl 0x10(%ebp) 117a12: ff 75 0c pushl 0xc(%ebp) 117a15: 8d 46 68 lea 0x68(%esi),%eax 117a18: 50 push %eax 117a19: e8 16 32 00 00 call 11ac34 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 117a1e: 8b 55 ec mov -0x14(%ebp),%edx 117a21: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 117a23: 83 c4 20 add $0x20,%esp 117a26: 85 c0 test %eax,%eax 117a28: 75 16 jne 117a40 _Region_Process_queue( the_region ); /* unlocks allocator */ 117a2a: 83 ec 0c sub $0xc,%esp 117a2d: 56 push %esi 117a2e: e8 a1 76 00 00 call 11f0d4 <_Region_Process_queue> 117a33: 31 c0 xor %eax,%eax 117a35: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 117a38: 8d 65 f8 lea -0x8(%ebp),%esp 117a3b: 5b pop %ebx 117a3c: 5e pop %esi 117a3d: c9 leave 117a3e: c3 ret 117a3f: 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(); 117a40: 83 ec 0c sub $0xc,%esp 117a43: ff 35 f0 21 14 00 pushl 0x1421f0 117a49: 89 45 e4 mov %eax,-0x1c(%ebp) 117a4c: e8 f3 1f 00 00 call 119a44 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 117a51: 83 c4 10 add $0x10,%esp 117a54: 8b 45 e4 mov -0x1c(%ebp),%eax 117a57: 83 f8 01 cmp $0x1,%eax 117a5a: 74 0c je 117a68 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 117a5c: b8 09 00 00 00 mov $0x9,%eax } 117a61: 8d 65 f8 lea -0x8(%ebp),%esp 117a64: 5b pop %ebx 117a65: 5e pop %esi 117a66: c9 leave 117a67: c3 ret _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 117a68: b0 0d mov $0xd,%al 117a6a: eb 8f jmp 1179fb 00117a6c : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 117a6c: 55 push %ebp 117a6d: 89 e5 mov %esp,%ebp 117a6f: 53 push %ebx 117a70: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 117a73: ff 35 f0 21 14 00 pushl 0x1421f0 117a79: e8 7e 1f 00 00 call 1199fc <_API_Mutex_Lock> 117a7e: 83 c4 0c add $0xc,%esp 117a81: 8d 45 f4 lea -0xc(%ebp),%eax 117a84: 50 push %eax 117a85: ff 75 08 pushl 0x8(%ebp) 117a88: 68 40 20 14 00 push $0x142040 117a8d: e8 4a 38 00 00 call 11b2dc <_Objects_Get_no_protection> 117a92: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 117a94: 83 c4 10 add $0x10,%esp 117a97: 8b 45 f4 mov -0xc(%ebp),%eax 117a9a: 85 c0 test %eax,%eax 117a9c: 74 1e je 117abc 117a9e: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117aa3: 83 ec 0c sub $0xc,%esp 117aa6: ff 35 f0 21 14 00 pushl 0x1421f0 117aac: e8 93 1f 00 00 call 119a44 <_API_Mutex_Unlock> return return_status; 117ab1: 83 c4 10 add $0x10,%esp } 117ab4: 89 d8 mov %ebx,%eax 117ab6: 8b 5d fc mov -0x4(%ebp),%ebx 117ab9: c9 leave 117aba: c3 ret 117abb: 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 ); 117abc: 83 ec 08 sub $0x8,%esp 117abf: ff 75 0c pushl 0xc(%ebp) 117ac2: 8d 43 68 lea 0x68(%ebx),%eax 117ac5: 50 push %eax 117ac6: e8 ed 2b 00 00 call 11a6b8 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 117acb: 83 c4 10 add $0x10,%esp 117ace: 84 c0 test %al,%al 117ad0: 75 0a jne 117adc else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 117ad2: bb 09 00 00 00 mov $0x9,%ebx 117ad7: eb ca jmp 117aa3 117ad9: 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; 117adc: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 117adf: 83 ec 0c sub $0xc,%esp 117ae2: 53 push %ebx 117ae3: e8 ec 75 00 00 call 11f0d4 <_Region_Process_queue> 117ae8: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 117aea: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 117aed: 89 d8 mov %ebx,%eax 117aef: 8b 5d fc mov -0x4(%ebp),%ebx 117af2: c9 leave 117af3: c3 ret 0010b388 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b388: 55 push %ebp 10b389: 89 e5 mov %esp,%ebp 10b38b: 57 push %edi 10b38c: 56 push %esi 10b38d: 53 push %ebx 10b38e: 83 ec 3c sub $0x3c,%esp 10b391: 8b 75 08 mov 0x8(%ebp),%esi 10b394: 8b 5d 10 mov 0x10(%ebp),%ebx 10b397: 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 ) ) 10b39a: 85 f6 test %esi,%esi 10b39c: 74 4a je 10b3e8 return RTEMS_INVALID_NAME; if ( !id ) 10b39e: 85 ff test %edi,%edi 10b3a0: 0f 84 f6 00 00 00 je 10b49c return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b3a6: 89 da mov %ebx,%edx 10b3a8: 81 e2 c0 00 00 00 and $0xc0,%edx 10b3ae: 74 48 je 10b3f8 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b3b0: 89 d8 mov %ebx,%eax 10b3b2: 83 e0 30 and $0x30,%eax 10b3b5: 83 f8 10 cmp $0x10,%eax 10b3b8: 74 0e je 10b3c8 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b3ba: b8 0b 00 00 00 mov $0xb,%eax } 10b3bf: 8d 65 f4 lea -0xc(%ebp),%esp 10b3c2: 5b pop %ebx 10b3c3: 5e pop %esi 10b3c4: 5f pop %edi 10b3c5: c9 leave 10b3c6: c3 ret 10b3c7: 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 ) && 10b3c8: f6 c3 04 test $0x4,%bl 10b3cb: 74 ed je 10b3ba _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b3cd: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b3d3: 74 e5 je 10b3ba 10b3d5: 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 ) ) 10b3da: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b3de: 76 1f jbe 10b3ff 10b3e0: b8 0a 00 00 00 mov $0xa,%eax 10b3e5: eb d8 jmp 10b3bf 10b3e7: 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 ) ) 10b3e8: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b3ed: 8d 65 f4 lea -0xc(%ebp),%esp 10b3f0: 5b pop %ebx 10b3f1: 5e pop %esi 10b3f2: 5f pop %edi 10b3f3: c9 leave 10b3f4: c3 ret 10b3f5: 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 ) ) 10b3f8: 89 d9 mov %ebx,%ecx 10b3fa: 83 e1 30 and $0x30,%ecx 10b3fd: 75 db jne 10b3da rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b3ff: a1 f8 73 12 00 mov 0x1273f8,%eax 10b404: 40 inc %eax 10b405: a3 f8 73 12 00 mov %eax,0x1273f8 * 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 ); 10b40a: 83 ec 0c sub $0xc,%esp 10b40d: 68 40 73 12 00 push $0x127340 10b412: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b415: e8 16 14 00 00 call 10c830 <_Objects_Allocate> 10b41a: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b41c: 83 c4 10 add $0x10,%esp 10b41f: 85 c0 test %eax,%eax 10b421: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b424: 0f 84 ba 00 00 00 je 10b4e4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b42a: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b42d: 85 c9 test %ecx,%ecx 10b42f: 74 77 je 10b4a8 /* * 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; 10b431: 31 c0 xor %eax,%eax 10b433: f6 c3 04 test $0x4,%bl 10b436: 0f 95 c0 setne %al 10b439: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b43c: 83 f9 10 cmp $0x10,%ecx 10b43f: 0f 84 ae 00 00 00 je 10b4f3 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; 10b445: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b44c: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b450: 50 push %eax 10b451: 31 c0 xor %eax,%eax 10b453: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b457: 0f 94 c0 sete %al 10b45a: 50 push %eax 10b45b: 8d 45 d0 lea -0x30(%ebp),%eax 10b45e: 50 push %eax 10b45f: 8d 42 14 lea 0x14(%edx),%eax 10b462: 50 push %eax 10b463: 89 55 c4 mov %edx,-0x3c(%ebp) 10b466: e8 35 0c 00 00 call 10c0a0 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 10b46b: 83 c4 10 add $0x10,%esp 10b46e: 83 f8 06 cmp $0x6,%eax 10b471: 8b 55 c4 mov -0x3c(%ebp),%edx 10b474: 0f 84 a9 00 00 00 je 10b523 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b47a: 8b 42 08 mov 0x8(%edx),%eax 10b47d: 0f b7 d8 movzwl %ax,%ebx 10b480: 8b 0d 5c 73 12 00 mov 0x12735c,%ecx 10b486: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b489: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b48c: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b48e: e8 c1 20 00 00 call 10d554 <_Thread_Enable_dispatch> 10b493: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b495: e9 25 ff ff ff jmp 10b3bf 10b49a: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10b49c: b8 09 00 00 00 mov $0x9,%eax 10b4a1: e9 19 ff ff ff jmp 10b3bf 10b4a6: 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; 10b4a8: 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; 10b4af: 31 c0 xor %eax,%eax 10b4b1: f6 c3 04 test $0x4,%bl 10b4b4: 0f 95 c0 setne %al 10b4b7: 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; 10b4ba: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b4c1: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b4c8: 51 push %ecx 10b4c9: ff 75 0c pushl 0xc(%ebp) 10b4cc: 8d 45 e0 lea -0x20(%ebp),%eax 10b4cf: 50 push %eax 10b4d0: 8d 42 14 lea 0x14(%edx),%eax 10b4d3: 50 push %eax 10b4d4: 89 55 c4 mov %edx,-0x3c(%ebp) 10b4d7: e8 68 0e 00 00 call 10c344 <_CORE_semaphore_Initialize> 10b4dc: 83 c4 10 add $0x10,%esp 10b4df: 8b 55 c4 mov -0x3c(%ebp),%edx 10b4e2: eb 96 jmp 10b47a _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b4e4: e8 6b 20 00 00 call 10d554 <_Thread_Enable_dispatch> 10b4e9: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10b4ee: e9 cc fe ff ff jmp 10b3bf 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; 10b4f3: 8b 45 14 mov 0x14(%ebp),%eax 10b4f6: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b4f9: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b500: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b504: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b508: 0f 85 42 ff ff ff jne 10b450 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b50e: f6 c3 40 test $0x40,%bl 10b511: 74 30 je 10b543 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b513: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b51a: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b51e: e9 2d ff ff ff jmp 10b450 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b523: 83 ec 08 sub $0x8,%esp 10b526: 52 push %edx 10b527: 68 40 73 12 00 push $0x127340 10b52c: e8 7f 16 00 00 call 10cbb0 <_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(); 10b531: e8 1e 20 00 00 call 10d554 <_Thread_Enable_dispatch> 10b536: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10b53b: 83 c4 10 add $0x10,%esp 10b53e: e9 7c fe ff ff jmp 10b3bf 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 ) ) { 10b543: 84 db test %bl,%bl 10b545: 0f 89 05 ff ff ff jns 10b450 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b54b: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b552: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b556: e9 f5 fe ff ff jmp 10b450 0010b55c : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b55c: 55 push %ebp 10b55d: 89 e5 mov %esp,%ebp 10b55f: 53 push %ebx 10b560: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10b563: 8d 45 f4 lea -0xc(%ebp),%eax 10b566: 50 push %eax 10b567: ff 75 08 pushl 0x8(%ebp) 10b56a: 68 40 73 12 00 push $0x127340 10b56f: e8 6c 17 00 00 call 10cce0 <_Objects_Get> 10b574: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10b576: 83 c4 10 add $0x10,%esp 10b579: 8b 4d f4 mov -0xc(%ebp),%ecx 10b57c: 85 c9 test %ecx,%ecx 10b57e: 74 0c je 10b58c 10b580: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b585: 8b 5d fc mov -0x4(%ebp),%ebx 10b588: c9 leave 10b589: c3 ret 10b58a: 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); 10b58c: 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) ) { 10b58f: 83 e0 30 and $0x30,%eax 10b592: 74 58 je 10b5ec if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b594: 8b 53 64 mov 0x64(%ebx),%edx 10b597: 85 d2 test %edx,%edx 10b599: 75 15 jne 10b5b0 10b59b: 83 f8 20 cmp $0x20,%eax 10b59e: 74 10 je 10b5b0 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b5a0: e8 af 1f 00 00 call 10d554 <_Thread_Enable_dispatch> 10b5a5: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b5aa: 8b 5d fc mov -0x4(%ebp),%ebx 10b5ad: c9 leave 10b5ae: c3 ret 10b5af: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b5b0: 50 push %eax 10b5b1: 6a 04 push $0x4 10b5b3: 6a 00 push $0x0 10b5b5: 8d 43 14 lea 0x14(%ebx),%eax 10b5b8: 50 push %eax 10b5b9: e8 d6 0a 00 00 call 10c094 <_CORE_mutex_Flush> 10b5be: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b5c1: 83 ec 08 sub $0x8,%esp 10b5c4: 53 push %ebx 10b5c5: 68 40 73 12 00 push $0x127340 10b5ca: e8 dd 12 00 00 call 10c8ac <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b5cf: 58 pop %eax 10b5d0: 5a pop %edx 10b5d1: 53 push %ebx 10b5d2: 68 40 73 12 00 push $0x127340 10b5d7: e8 d4 15 00 00 call 10cbb0 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b5dc: e8 73 1f 00 00 call 10d554 <_Thread_Enable_dispatch> 10b5e1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b5e3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b5e6: 8b 5d fc mov -0x4(%ebp),%ebx 10b5e9: c9 leave 10b5ea: c3 ret 10b5eb: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b5ec: 51 push %ecx 10b5ed: 6a 02 push $0x2 10b5ef: 6a 00 push $0x0 10b5f1: 8d 43 14 lea 0x14(%ebx),%eax 10b5f4: 50 push %eax 10b5f5: e8 3e 0d 00 00 call 10c338 <_CORE_semaphore_Flush> 10b5fa: 83 c4 10 add $0x10,%esp 10b5fd: eb c2 jmp 10b5c1 0010b600 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b600: 55 push %ebp 10b601: 89 e5 mov %esp,%ebp 10b603: 57 push %edi 10b604: 56 push %esi 10b605: 53 push %ebx 10b606: 83 ec 1c sub $0x1c,%esp 10b609: 8b 5d 08 mov 0x8(%ebp),%ebx 10b60c: 8b 75 0c mov 0xc(%ebp),%esi 10b60f: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 10b612: 8d 45 e0 lea -0x20(%ebp),%eax 10b615: 50 push %eax 10b616: 8d 45 e4 lea -0x1c(%ebp),%eax 10b619: 50 push %eax 10b61a: 53 push %ebx 10b61b: 68 40 73 12 00 push $0x127340 10b620: e8 63 16 00 00 call 10cc88 <_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 ) { 10b625: 83 c4 10 add $0x10,%esp 10b628: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b62b: 85 c9 test %ecx,%ecx 10b62d: 74 0d je 10b63c 10b62f: b8 04 00 00 00 mov $0x4,%eax break; } return RTEMS_INVALID_ID; } 10b634: 8d 65 f4 lea -0xc(%ebp),%esp 10b637: 5b pop %ebx 10b638: 5e pop %esi 10b639: 5f pop %edi 10b63a: c9 leave 10b63b: 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) ) { 10b63c: f6 40 10 30 testb $0x30,0x10(%eax) 10b640: 74 36 je 10b678 _CORE_mutex_Seize( 10b642: 83 ec 0c sub $0xc,%esp 10b645: ff 75 e0 pushl -0x20(%ebp) 10b648: 57 push %edi 10b649: 83 e6 01 and $0x1,%esi 10b64c: 83 f6 01 xor $0x1,%esi 10b64f: 56 push %esi 10b650: 53 push %ebx 10b651: 83 c0 14 add $0x14,%eax 10b654: 50 push %eax 10b655: e8 3e 0b 00 00 call 10c198 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b65a: 83 c4 14 add $0x14,%esp 10b65d: a1 b8 74 12 00 mov 0x1274b8,%eax 10b662: ff 70 34 pushl 0x34(%eax) 10b665: e8 12 01 00 00 call 10b77c <_Semaphore_Translate_core_mutex_return_code> 10b66a: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b66d: 8d 65 f4 lea -0xc(%ebp),%esp 10b670: 5b pop %ebx 10b671: 5e pop %esi 10b672: 5f pop %edi 10b673: c9 leave 10b674: c3 ret 10b675: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b678: 8b 15 b8 74 12 00 mov 0x1274b8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b67e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b685: 8b 48 5c mov 0x5c(%eax),%ecx 10b688: 85 c9 test %ecx,%ecx 10b68a: 75 2c jne 10b6b8 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b68c: 83 e6 01 and $0x1,%esi 10b68f: 74 33 je 10b6c4 _ISR_Enable( *level_p ); 10b691: ff 75 e0 pushl -0x20(%ebp) 10b694: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b695: 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( 10b69c: 83 ec 0c sub $0xc,%esp 10b69f: a1 b8 74 12 00 mov 0x1274b8,%eax 10b6a4: ff 70 34 pushl 0x34(%eax) 10b6a7: e8 e0 00 00 00 call 10b78c <_Semaphore_Translate_core_semaphore_return_code> 10b6ac: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b6af: 8d 65 f4 lea -0xc(%ebp),%esp 10b6b2: 5b pop %ebx 10b6b3: 5e pop %esi 10b6b4: 5f pop %edi 10b6b5: c9 leave 10b6b6: c3 ret 10b6b7: 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; 10b6b8: 49 dec %ecx 10b6b9: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b6bc: ff 75 e0 pushl -0x20(%ebp) 10b6bf: 9d popf 10b6c0: eb da jmp 10b69c 10b6c2: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b6c4: 8b 0d f8 73 12 00 mov 0x1273f8,%ecx 10b6ca: 41 inc %ecx 10b6cb: 89 0d f8 73 12 00 mov %ecx,0x1273f8 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; 10b6d1: 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; 10b6d8: 83 c0 14 add $0x14,%eax 10b6db: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b6de: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b6e1: ff 75 e0 pushl -0x20(%ebp) 10b6e4: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b6e5: 52 push %edx 10b6e6: 68 9c dd 10 00 push $0x10dd9c 10b6eb: 57 push %edi 10b6ec: 50 push %eax 10b6ed: e8 9a 23 00 00 call 10da8c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b6f2: e8 5d 1e 00 00 call 10d554 <_Thread_Enable_dispatch> 10b6f7: 83 c4 10 add $0x10,%esp 10b6fa: eb a0 jmp 10b69c 0010b6fc : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b6fc: 55 push %ebp 10b6fd: 89 e5 mov %esp,%ebp 10b6ff: 53 push %ebx 10b700: 83 ec 18 sub $0x18,%esp 10b703: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10b706: 8d 45 f4 lea -0xc(%ebp),%eax 10b709: 50 push %eax 10b70a: 53 push %ebx 10b70b: 68 40 73 12 00 push $0x127340 10b710: e8 cb 15 00 00 call 10cce0 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10b715: 83 c4 10 add $0x10,%esp 10b718: 8b 55 f4 mov -0xc(%ebp),%edx 10b71b: 85 d2 test %edx,%edx 10b71d: 74 0d je 10b72c 10b71f: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b724: 8b 5d fc mov -0x4(%ebp),%ebx 10b727: c9 leave 10b728: c3 ret 10b729: 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) ) { 10b72c: f6 40 10 30 testb $0x30,0x10(%eax) 10b730: 75 26 jne 10b758 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b732: 52 push %edx 10b733: 6a 00 push $0x0 10b735: 53 push %ebx 10b736: 83 c0 14 add $0x14,%eax 10b739: 50 push %eax 10b73a: e8 45 0c 00 00 call 10c384 <_CORE_semaphore_Surrender> 10b73f: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b741: e8 0e 1e 00 00 call 10d554 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10b746: 89 1c 24 mov %ebx,(%esp) 10b749: e8 3e 00 00 00 call 10b78c <_Semaphore_Translate_core_semaphore_return_code> &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10b74e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b751: 8b 5d fc mov -0x4(%ebp),%ebx 10b754: c9 leave 10b755: c3 ret 10b756: 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( 10b758: 51 push %ecx 10b759: 6a 00 push $0x0 10b75b: 53 push %ebx 10b75c: 83 c0 14 add $0x14,%eax 10b75f: 50 push %eax 10b760: e8 d3 0a 00 00 call 10c238 <_CORE_mutex_Surrender> 10b765: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b767: e8 e8 1d 00 00 call 10d554 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b76c: 89 1c 24 mov %ebx,(%esp) 10b76f: e8 08 00 00 00 call 10b77c <_Semaphore_Translate_core_mutex_return_code> 10b774: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b777: 8b 5d fc mov -0x4(%ebp),%ebx 10b77a: c9 leave 10b77b: c3 ret 0010c70c : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c70c: 55 push %ebp 10c70d: 89 e5 mov %esp,%ebp 10c70f: 83 ec 08 sub $0x8,%esp 10c712: 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 ]; 10c715: a1 78 9c 12 00 mov 0x129c78,%eax 10c71a: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10c720: 8b 0d b8 9b 12 00 mov 0x129bb8,%ecx 10c726: 41 inc %ecx 10c727: 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 ) ) { 10c72d: 85 d2 test %edx,%edx 10c72f: 74 13 je 10c744 asr->mode_set = mode_set; 10c731: 8b 4d 0c mov 0xc(%ebp),%ecx 10c734: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c737: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c73a: e8 41 21 00 00 call 10e880 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c73f: 31 c0 xor %eax,%eax 10c741: c9 leave 10c742: c3 ret 10c743: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c744: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c748: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c74f: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c756: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c75d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c764: 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(); 10c76b: e8 10 21 00 00 call 10e880 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c770: 31 c0 xor %eax,%eax 10c772: c9 leave 10c773: c3 ret 00117fc8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117fc8: 55 push %ebp 117fc9: 89 e5 mov %esp,%ebp 117fcb: 53 push %ebx 117fcc: 83 ec 14 sub $0x14,%esp 117fcf: 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 ) 117fd2: 85 db test %ebx,%ebx 117fd4: 75 0a jne 117fe0 117fd6: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117fdb: 8b 5d fc mov -0x4(%ebp),%ebx 117fde: c9 leave 117fdf: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117fe0: 83 ec 08 sub $0x8,%esp 117fe3: 8d 45 f4 lea -0xc(%ebp),%eax 117fe6: 50 push %eax 117fe7: ff 75 08 pushl 0x8(%ebp) 117fea: e8 5d 3c 00 00 call 11bc4c <_Thread_Get> switch ( location ) { 117fef: 83 c4 10 add $0x10,%esp 117ff2: 8b 55 f4 mov -0xc(%ebp),%edx 117ff5: 85 d2 test %edx,%edx 117ff7: 74 0b je 118004 117ff9: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117ffe: 8b 5d fc mov -0x4(%ebp),%ebx 118001: c9 leave 118002: c3 ret 118003: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 118004: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx asr = &api->Signal; 11800a: 8b 4a 0c mov 0xc(%edx),%ecx 11800d: 85 c9 test %ecx,%ecx 11800f: 74 43 je 118054 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 118011: 80 7a 08 00 cmpb $0x0,0x8(%edx) 118015: 74 29 je 118040 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 118017: 9c pushf 118018: fa cli 118019: 59 pop %ecx *signal_set |= signals; 11801a: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 11801d: 51 push %ecx 11801e: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 11801f: c6 40 74 01 movb $0x1,0x74(%eax) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 118023: 8b 15 d4 21 14 00 mov 0x1421d4,%edx 118029: 85 d2 test %edx,%edx 11802b: 74 1b je 118048 11802d: 3b 05 f8 21 14 00 cmp 0x1421f8,%eax 118033: 75 13 jne 118048 <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 118035: c6 05 a8 22 14 00 01 movb $0x1,0x1422a8 11803c: eb 0a jmp 118048 11803e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 118040: 9c pushf 118041: fa cli 118042: 58 pop %eax *signal_set |= signals; 118043: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 118046: 50 push %eax 118047: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 118048: e8 af 3b 00 00 call 11bbfc <_Thread_Enable_dispatch> 11804d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11804f: 8b 5d fc mov -0x4(%ebp),%ebx 118052: c9 leave 118053: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 118054: e8 a3 3b 00 00 call 11bbfc <_Thread_Enable_dispatch> 118059: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 11805e: e9 78 ff ff ff jmp 117fdb 0010a340 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 10a340: 55 push %ebp 10a341: 89 e5 mov %esp,%ebp 10a343: 57 push %edi 10a344: 56 push %esi 10a345: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 10a348: 8b 50 08 mov 0x8(%eax),%edx 10a34b: 85 d2 test %edx,%edx 10a34d: 74 15 je 10a364 <== ALWAYS TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 10a34f: 8b b8 c8 00 00 00 mov 0xc8(%eax),%edi 10a355: 83 c7 08 add $0x8,%edi 10a358: be 40 ed 16 00 mov $0x16ed40,%esi 10a35d: b9 04 00 00 00 mov $0x4,%ecx 10a362: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 10a364: 5e pop %esi 10a365: 5f pop %edi 10a366: c9 leave 10a367: c3 ret 0010a758 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 10a758: 55 push %ebp 10a759: 89 e5 mov %esp,%ebp 10a75b: 57 push %edi 10a75c: 8b 7d 0c mov 0xc(%ebp),%edi Stack_check_Initialize(); 10a75f: e8 94 ff ff ff call 10a6f8 if (the_thread) 10a764: 85 ff test %edi,%edi 10a766: 74 12 je 10a77a <== ALWAYS TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 10a768: 8b 8f c4 00 00 00 mov 0xc4(%edi),%ecx 10a76e: 8b 97 c8 00 00 00 mov 0xc8(%edi),%edx 10a774: b0 a5 mov $0xa5,%al 10a776: 89 d7 mov %edx,%edi 10a778: f3 aa rep stos %al,%es:(%edi) return true; } 10a77a: b0 01 mov $0x1,%al 10a77c: 5f pop %edi 10a77d: c9 leave 10a77e: c3 ret 0010a628 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 10a628: 55 push %ebp 10a629: 89 e5 mov %esp,%ebp 10a62b: 57 push %edi 10a62c: 56 push %esi Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 10a62d: a1 b8 ef 16 00 mov 0x16efb8,%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 10a632: 8b b0 c8 00 00 00 mov 0xc8(%eax),%esi 10a638: 39 f5 cmp %esi,%ebp 10a63a: 73 48 jae 10a684 <== NEVER TAKEN 10a63c: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 10a63e: 8b 0d d8 bf 16 00 mov 0x16bfd8,%ecx 10a644: 85 c9 test %ecx,%ecx 10a646: 75 28 jne 10a670 <== NEVER TAKEN 10a648: b2 01 mov $0x1,%dl <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 10a64a: 84 c0 test %al,%al 10a64c: 74 04 je 10a652 <== ALWAYS TAKEN 10a64e: 84 d2 test %dl,%dl 10a650: 75 42 jne 10a694 <== NEVER TAKEN return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 10a652: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a655: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 10a658: 52 push %edx <== NOT EXECUTED 10a659: ff 35 b8 ef 16 00 pushl 0x16efb8 <== NOT EXECUTED 10a65f: e8 08 ff ff ff call 10a56c <== NOT EXECUTED 10a664: b0 01 mov $0x1,%al <== NOT EXECUTED return true; 10a666: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a669: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a66c: 5e pop %esi <== NOT EXECUTED 10a66d: 5f pop %edi <== NOT EXECUTED 10a66e: c9 leave <== NOT EXECUTED 10a66f: c3 ret <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 10a670: 83 c6 08 add $0x8,%esi 10a673: bf 40 ed 16 00 mov $0x16ed40,%edi 10a678: b9 10 00 00 00 mov $0x10,%ecx 10a67d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10a67f: 0f 94 c2 sete %dl 10a682: eb c6 jmp 10a64a } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 10a684: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx 10a68a: 8d 04 16 lea (%esi,%edx,1),%eax 10a68d: 39 c5 cmp %eax,%ebp 10a68f: 0f 96 c0 setbe %al 10a692: eb aa jmp 10a63e } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 10a694: 31 c0 xor %eax,%eax /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 10a696: 8d 65 f8 lea -0x8(%ebp),%esp 10a699: 5e pop %esi 10a69a: 5f pop %edi 10a69b: c9 leave 10a69c: c3 ret 0010a554 : void rtems_stack_checker_report_usage( void ) { 10a554: 55 push %ebp <== NOT EXECUTED 10a555: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a557: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 10a55a: 68 d0 ce 10 00 push $0x10ced0 <== NOT EXECUTED 10a55f: 6a 00 push $0x0 <== NOT EXECUTED 10a561: e8 8a ff ff ff call 10a4f0 <== NOT EXECUTED 10a566: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a569: c9 leave <== NOT EXECUTED 10a56a: c3 ret <== NOT EXECUTED 0010a4f0 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 10a4f0: 55 push %ebp <== NOT EXECUTED 10a4f1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a4f3: 56 push %esi <== NOT EXECUTED 10a4f4: 53 push %ebx <== NOT EXECUTED 10a4f5: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 10a4f8: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED print_context = context; 10a4fb: 89 35 dc bf 16 00 mov %esi,0x16bfdc <== NOT EXECUTED print_handler = print; 10a501: 89 1d e0 bf 16 00 mov %ebx,0x16bfe0 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 10a507: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a50a: 68 b3 b0 15 00 push $0x15b0b3 <== NOT EXECUTED 10a50f: 56 push %esi <== NOT EXECUTED 10a510: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 10a512: 58 pop %eax <== NOT EXECUTED 10a513: 5a pop %edx <== NOT EXECUTED 10a514: 68 34 b1 15 00 push $0x15b134 <== NOT EXECUTED 10a519: 56 push %esi <== NOT EXECUTED 10a51a: 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 ); 10a51c: c7 04 24 a0 a3 10 00 movl $0x10a3a0,(%esp) <== NOT EXECUTED 10a523: e8 38 70 00 00 call 111560 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 10a528: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 10a52f: e8 6c fe ff ff call 10a3a0 <== NOT EXECUTED print_context = NULL; 10a534: c7 05 dc bf 16 00 00 movl $0x0,0x16bfdc <== NOT EXECUTED 10a53b: 00 00 00 print_handler = NULL; 10a53e: c7 05 e0 bf 16 00 00 movl $0x0,0x16bfe0 <== NOT EXECUTED 10a545: 00 00 00 10a548: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a54b: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a54e: 5b pop %ebx <== NOT EXECUTED 10a54f: 5e pop %esi <== NOT EXECUTED 10a550: c9 leave <== NOT EXECUTED 10a551: c3 ret <== NOT EXECUTED 0010a6a0 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 10a6a0: 55 push %ebp 10a6a1: 89 e5 mov %esp,%ebp 10a6a3: 57 push %edi 10a6a4: 56 push %esi 10a6a5: 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; 10a6a8: 8b 90 c8 00 00 00 mov 0xc8(%eax),%edx 10a6ae: 8d 72 08 lea 0x8(%edx),%esi ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 10a6b1: 39 d5 cmp %edx,%ebp 10a6b3: 72 0a jb 10a6bf <== 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; 10a6b5: 03 90 c4 00 00 00 add 0xc4(%eax),%edx 10a6bb: 39 d5 cmp %edx,%ebp 10a6bd: 76 21 jbe 10a6e0 <== 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, 10a6bf: bf 40 ed 16 00 mov $0x16ed40,%edi <== NOT EXECUTED 10a6c4: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED 10a6c9: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED 10a6cb: 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 ); 10a6ce: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 10a6d1: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10a6d4: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } } 10a6d7: 5e pop %esi <== NOT EXECUTED 10a6d8: 5f pop %edi <== NOT EXECUTED 10a6d9: 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 ); 10a6da: e9 8d fe ff ff jmp 10a56c <== NOT EXECUTED 10a6df: 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, 10a6e0: bf 40 ed 16 00 mov $0x16ed40,%edi 10a6e5: b9 10 00 00 00 mov $0x10,%ecx (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 10a6ea: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10a6ec: 74 06 je 10a6f4 <== NEVER TAKEN 10a6ee: 31 d2 xor %edx,%edx <== NOT EXECUTED 10a6f0: eb dc jmp 10a6ce <== NOT EXECUTED 10a6f2: 66 90 xchg %ax,%ax <== NOT EXECUTED Stack_check_report_blown_task( running, pattern_ok ); } } 10a6f4: 5e pop %esi 10a6f5: 5f pop %edi 10a6f6: c9 leave 10a6f7: c3 ret 00110dc0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110dc0: 55 push %ebp 110dc1: 89 e5 mov %esp,%ebp 110dc3: 57 push %edi 110dc4: 56 push %esi 110dc5: 53 push %ebx 110dc6: 83 ec 2c sub $0x2c,%esp 110dc9: 8b 75 08 mov 0x8(%ebp),%esi 110dcc: 8b 5d 0c mov 0xc(%ebp),%ebx 110dcf: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110dd2: 85 db test %ebx,%ebx 110dd4: 74 72 je 110e48 return RTEMS_INVALID_ADDRESS; errno = 0; 110dd6: e8 71 28 00 00 call 11364c <__errno> 110ddb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110de1: c7 03 00 00 00 00 movl $0x0,(%ebx) 110de7: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 110dee: 83 ec 08 sub $0x8,%esp 110df1: 8d 45 e4 lea -0x1c(%ebp),%eax 110df4: 50 push %eax 110df5: 56 push %esi 110df6: e8 ed 52 00 00 call 1160e8 #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 ) 110dfb: 83 c4 10 add $0x10,%esp 110dfe: 85 ff test %edi,%edi 110e00: 74 05 je 110e07 *endptr = end; 110e02: 8b 45 e4 mov -0x1c(%ebp),%eax 110e05: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110e07: 39 75 e4 cmp %esi,-0x1c(%ebp) 110e0a: 74 4c je 110e58 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110e0c: dd 05 b0 54 12 00 fldl 0x1254b0 110e12: d9 c9 fxch %st(1) 110e14: dd e1 fucom %st(1) 110e16: df e0 fnstsw %ax 110e18: dd d9 fstp %st(1) 110e1a: f6 c4 45 test $0x45,%ah 110e1d: 74 0d je 110e2c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110e1f: dd 1b fstpl (%ebx) 110e21: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 110e23: 8d 65 f4 lea -0xc(%ebp),%esp 110e26: 5b pop %ebx 110e27: 5e pop %esi 110e28: 5f pop %edi 110e29: c9 leave 110e2a: c3 ret 110e2b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110e2c: dd 5d c8 fstpl -0x38(%ebp) 110e2f: e8 18 28 00 00 call 11364c <__errno> 110e34: 83 38 22 cmpl $0x22,(%eax) 110e37: dd 45 c8 fldl -0x38(%ebp) 110e3a: 75 e3 jne 110e1f <== ALWAYS TAKEN 110e3c: dd d8 fstp %st(0) 110e3e: b8 0a 00 00 00 mov $0xa,%eax 110e43: eb de jmp 110e23 110e45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110e48: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110e4d: 8d 65 f4 lea -0xc(%ebp),%esp 110e50: 5b pop %ebx 110e51: 5e pop %esi 110e52: 5f pop %edi 110e53: c9 leave 110e54: c3 ret 110e55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110e58: 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 ) 110e5a: b8 0b 00 00 00 mov $0xb,%eax 110e5f: eb c2 jmp 110e23 00110e64 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110e64: 55 push %ebp 110e65: 89 e5 mov %esp,%ebp 110e67: 57 push %edi 110e68: 56 push %esi 110e69: 53 push %ebx 110e6a: 83 ec 2c sub $0x2c,%esp 110e6d: 8b 75 08 mov 0x8(%ebp),%esi 110e70: 8b 5d 0c mov 0xc(%ebp),%ebx 110e73: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110e76: 85 db test %ebx,%ebx 110e78: 74 6a je 110ee4 return RTEMS_INVALID_ADDRESS; errno = 0; 110e7a: e8 cd 27 00 00 call 11364c <__errno> 110e7f: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110e85: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 110e8b: 83 ec 08 sub $0x8,%esp 110e8e: 8d 45 e4 lea -0x1c(%ebp),%eax 110e91: 50 push %eax 110e92: 56 push %esi 110e93: e8 0c 52 00 00 call 1160a4 #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 ) 110e98: 83 c4 10 add $0x10,%esp 110e9b: 85 ff test %edi,%edi 110e9d: 74 05 je 110ea4 *endptr = end; 110e9f: 8b 45 e4 mov -0x1c(%ebp),%eax 110ea2: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110ea4: 39 75 e4 cmp %esi,-0x1c(%ebp) 110ea7: 74 4b je 110ef4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110ea9: d9 05 b8 54 12 00 flds 0x1254b8 110eaf: d9 c9 fxch %st(1) 110eb1: dd e1 fucom %st(1) 110eb3: df e0 fnstsw %ax 110eb5: dd d9 fstp %st(1) 110eb7: f6 c4 45 test $0x45,%ah 110eba: 74 0c je 110ec8 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110ebc: d9 1b fstps (%ebx) 110ebe: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 110ec0: 8d 65 f4 lea -0xc(%ebp),%esp 110ec3: 5b pop %ebx 110ec4: 5e pop %esi 110ec5: 5f pop %edi 110ec6: c9 leave 110ec7: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110ec8: d9 5d c8 fstps -0x38(%ebp) 110ecb: e8 7c 27 00 00 call 11364c <__errno> 110ed0: 83 38 22 cmpl $0x22,(%eax) 110ed3: d9 45 c8 flds -0x38(%ebp) 110ed6: 75 e4 jne 110ebc <== ALWAYS TAKEN 110ed8: dd d8 fstp %st(0) 110eda: b8 0a 00 00 00 mov $0xa,%eax 110edf: eb df jmp 110ec0 110ee1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110ee4: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110ee9: 8d 65 f4 lea -0xc(%ebp),%esp 110eec: 5b pop %ebx 110eed: 5e pop %esi 110eee: 5f pop %edi 110eef: c9 leave 110ef0: c3 ret 110ef1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110ef4: 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 ) 110ef6: b8 0b 00 00 00 mov $0xb,%eax 110efb: eb c3 jmp 110ec0 00121994 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 121994: 55 push %ebp 121995: 89 e5 mov %esp,%ebp 121997: 57 push %edi 121998: 56 push %esi 121999: 53 push %ebx 12199a: 83 ec 2c sub $0x2c,%esp 12199d: 8b 75 08 mov 0x8(%ebp),%esi 1219a0: 8b 5d 0c mov 0xc(%ebp),%ebx 1219a3: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 1219a6: 85 db test %ebx,%ebx 1219a8: 74 5e je 121a08 return RTEMS_INVALID_ADDRESS; errno = 0; 1219aa: e8 7d 0e 02 00 call 14282c <__errno> 1219af: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1219b5: 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 ); 1219bb: 50 push %eax 1219bc: ff 75 14 pushl 0x14(%ebp) 1219bf: 8d 45 e4 lea -0x1c(%ebp),%eax 1219c2: 50 push %eax 1219c3: 56 push %esi 1219c4: e8 3f 7c 02 00 call 149608 1219c9: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 1219cb: 83 c4 10 add $0x10,%esp 1219ce: 85 ff test %edi,%edi 1219d0: 74 05 je 1219d7 *endptr = end; 1219d2: 8b 45 e4 mov -0x1c(%ebp),%eax 1219d5: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 1219d7: 39 75 e4 cmp %esi,-0x1c(%ebp) 1219da: 74 3c je 121a18 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1219dc: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 1219e2: 74 0c je 1219f0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 1219e4: 89 13 mov %edx,(%ebx) 1219e6: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 1219e8: 8d 65 f4 lea -0xc(%ebp),%esp 1219eb: 5b pop %ebx 1219ec: 5e pop %esi 1219ed: 5f pop %edi 1219ee: c9 leave 1219ef: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1219f0: 89 55 d4 mov %edx,-0x2c(%ebp) 1219f3: e8 34 0e 02 00 call 14282c <__errno> 1219f8: 83 38 22 cmpl $0x22,(%eax) 1219fb: 8b 55 d4 mov -0x2c(%ebp),%edx 1219fe: 75 e4 jne 1219e4 <== ALWAYS TAKEN 121a00: b8 0a 00 00 00 mov $0xa,%eax 121a05: eb e1 jmp 1219e8 121a07: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 121a08: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 121a0d: 8d 65 f4 lea -0xc(%ebp),%esp 121a10: 5b pop %ebx 121a11: 5e pop %esi 121a12: 5f pop %edi 121a13: c9 leave 121a14: c3 ret 121a15: 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 ) 121a18: b8 0b 00 00 00 mov $0xb,%eax 121a1d: eb c9 jmp 1219e8 0011103c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11103c: 55 push %ebp 11103d: 89 e5 mov %esp,%ebp 11103f: 57 push %edi 111040: 56 push %esi 111041: 53 push %ebx 111042: 83 ec 1c sub $0x1c,%esp 111045: 8b 7d 08 mov 0x8(%ebp),%edi 111048: 8b 5d 0c mov 0xc(%ebp),%ebx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11104b: 85 db test %ebx,%ebx 11104d: 74 69 je 1110b8 return RTEMS_INVALID_ADDRESS; errno = 0; 11104f: e8 f8 25 00 00 call 11364c <__errno> 111054: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11105a: 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 ); 111060: 52 push %edx 111061: ff 75 14 pushl 0x14(%ebp) 111064: 8d 45 e4 lea -0x1c(%ebp),%eax 111067: 50 push %eax 111068: 57 push %edi 111069: e8 16 52 00 00 call 116284 11106e: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 111070: 83 c4 10 add $0x10,%esp 111073: 8b 45 10 mov 0x10(%ebp),%eax 111076: 85 c0 test %eax,%eax 111078: 74 08 je 111082 *endptr = end; 11107a: 8b 45 e4 mov -0x1c(%ebp),%eax 11107d: 8b 55 10 mov 0x10(%ebp),%edx 111080: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 111082: 39 7d e4 cmp %edi,-0x1c(%ebp) 111085: 74 41 je 1110c8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 111087: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 11108d: 74 15 je 1110a4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 11108f: 81 fe 00 00 00 80 cmp $0x80000000,%esi 111095: 74 0d je 1110a4 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 111097: 89 33 mov %esi,(%ebx) 111099: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 11109b: 8d 65 f4 lea -0xc(%ebp),%esp 11109e: 5b pop %ebx 11109f: 5e pop %esi 1110a0: 5f pop %edi 1110a1: c9 leave 1110a2: c3 ret 1110a3: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 1110a4: e8 a3 25 00 00 call 11364c <__errno> 1110a9: 83 38 22 cmpl $0x22,(%eax) 1110ac: 75 e9 jne 111097 <== ALWAYS TAKEN #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 1110ae: b8 0a 00 00 00 mov $0xa,%eax 1110b3: eb e6 jmp 11109b 1110b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 1110b8: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 1110bd: 8d 65 f4 lea -0xc(%ebp),%esp 1110c0: 5b pop %ebx 1110c1: 5e pop %esi 1110c2: 5f pop %edi 1110c3: c9 leave 1110c4: c3 ret 1110c5: 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 ) 1110c8: b8 0b 00 00 00 mov $0xb,%eax 1110cd: eb cc jmp 11109b 00110f8c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110f8c: 55 push %ebp 110f8d: 89 e5 mov %esp,%ebp 110f8f: 57 push %edi 110f90: 56 push %esi 110f91: 53 push %ebx 110f92: 83 ec 2c sub $0x2c,%esp 110f95: 8b 7d 08 mov 0x8(%ebp),%edi 110f98: 8b 5d 0c mov 0xc(%ebp),%ebx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110f9b: 85 db test %ebx,%ebx 110f9d: 0f 84 81 00 00 00 je 111024 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 110fa3: e8 a4 26 00 00 call 11364c <__errno> 110fa8: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110fae: c7 03 00 00 00 00 movl $0x0,(%ebx) 110fb4: 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 ); 110fbb: 52 push %edx 110fbc: ff 75 14 pushl 0x14(%ebp) 110fbf: 8d 45 e4 lea -0x1c(%ebp),%eax 110fc2: 50 push %eax 110fc3: 57 push %edi 110fc4: e8 d7 52 00 00 call 1162a0 110fc9: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110fcb: 83 c4 10 add $0x10,%esp 110fce: 8b 45 10 mov 0x10(%ebp),%eax 110fd1: 85 c0 test %eax,%eax 110fd3: 74 08 je 110fdd *endptr = end; 110fd5: 8b 45 e4 mov -0x1c(%ebp),%eax 110fd8: 8b 4d 10 mov 0x10(%ebp),%ecx 110fdb: 89 01 mov %eax,(%ecx) /* nothing was converted */ if ( end == s ) 110fdd: 39 7d e4 cmp %edi,-0x1c(%ebp) 110fe0: 74 52 je 111034 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110fe2: 89 d1 mov %edx,%ecx 110fe4: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx 110fea: 89 f0 mov %esi,%eax 110fec: f7 d0 not %eax 110fee: 09 c1 or %eax,%ecx 110ff0: 74 1a je 11100c <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110ff2: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 110ff8: 09 f0 or %esi,%eax 110ffa: 74 10 je 11100c <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110ffc: 89 33 mov %esi,(%ebx) 110ffe: 89 53 04 mov %edx,0x4(%ebx) 111001: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 111003: 8d 65 f4 lea -0xc(%ebp),%esp 111006: 5b pop %ebx 111007: 5e pop %esi 111008: 5f pop %edi 111009: c9 leave 11100a: c3 ret 11100b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 11100c: 89 55 d4 mov %edx,-0x2c(%ebp) 11100f: e8 38 26 00 00 call 11364c <__errno> 111014: 83 38 22 cmpl $0x22,(%eax) 111017: 8b 55 d4 mov -0x2c(%ebp),%edx 11101a: 75 e0 jne 110ffc <== ALWAYS TAKEN #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 11101c: b8 0a 00 00 00 mov $0xa,%eax 111021: eb e0 jmp 111003 111023: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 111024: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 111029: 8d 65 f4 lea -0xc(%ebp),%esp 11102c: 5b pop %ebx 11102d: 5e pop %esi 11102e: 5f pop %edi 11102f: c9 leave 111030: c3 ret 111031: 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 ) 111034: b8 0b 00 00 00 mov $0xb,%eax 111039: eb c8 jmp 111003 00121a20 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 121a20: 55 push %ebp 121a21: 89 e5 mov %esp,%ebp 121a23: 57 push %edi 121a24: 56 push %esi 121a25: 53 push %ebx 121a26: 83 ec 2c sub $0x2c,%esp 121a29: 8b 75 08 mov 0x8(%ebp),%esi 121a2c: 8b 5d 0c mov 0xc(%ebp),%ebx 121a2f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 121a32: 85 db test %ebx,%ebx 121a34: 74 5a je 121a90 return RTEMS_INVALID_ADDRESS; errno = 0; 121a36: e8 f1 0d 02 00 call 14282c <__errno> 121a3b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 121a41: 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 ); 121a47: 50 push %eax 121a48: 6a 10 push $0x10 121a4a: 8d 45 e4 lea -0x1c(%ebp),%eax 121a4d: 50 push %eax 121a4e: 56 push %esi 121a4f: e8 30 80 02 00 call 149a84 121a54: 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 ) 121a56: 83 c4 10 add $0x10,%esp 121a59: 85 ff test %edi,%edi 121a5b: 74 05 je 121a62 *endptr = end; 121a5d: 8b 45 e4 mov -0x1c(%ebp),%eax 121a60: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 121a62: 39 75 e4 cmp %esi,-0x1c(%ebp) 121a65: 74 39 je 121aa0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 121a67: 83 fa ff cmp $0xffffffff,%edx 121a6a: 74 0c je 121a78 <== ALWAYS TAKEN if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 121a6c: 89 13 mov %edx,(%ebx) 121a6e: 31 c0 xor %eax,%eax #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 121a70: 8d 65 f4 lea -0xc(%ebp),%esp 121a73: 5b pop %ebx 121a74: 5e pop %esi 121a75: 5f pop %edi 121a76: c9 leave 121a77: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 121a78: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 121a7b: e8 ac 0d 02 00 call 14282c <__errno> <== NOT EXECUTED 121a80: 83 38 22 cmpl $0x22,(%eax) <== NOT EXECUTED 121a83: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 121a86: 75 e4 jne 121a6c <== NOT EXECUTED 121a88: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 121a8d: eb e1 jmp 121a70 <== NOT EXECUTED 121a8f: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 121a90: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 121a95: 8d 65 f4 lea -0xc(%ebp),%esp 121a98: 5b pop %ebx 121a99: 5e pop %esi 121a9a: 5f pop %edi 121a9b: c9 leave 121a9c: c3 ret 121a9d: 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 ) 121aa0: b8 0b 00 00 00 mov $0xb,%eax 121aa5: eb c9 jmp 121a70 00121aa8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 121aa8: 55 push %ebp 121aa9: 89 e5 mov %esp,%ebp 121aab: 57 push %edi 121aac: 56 push %esi 121aad: 53 push %ebx 121aae: 83 ec 1c sub $0x1c,%esp 121ab1: 8b 75 08 mov 0x8(%ebp),%esi 121ab4: 8b 5d 0c mov 0xc(%ebp),%ebx 121ab7: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 121aba: 85 db test %ebx,%ebx 121abc: 74 3a je 121af8 return RTEMS_INVALID_ADDRESS; errno = 0; 121abe: e8 69 0d 02 00 call 14282c <__errno> 121ac3: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 121ac9: 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 ); 121acc: 50 push %eax 121acd: ff 75 14 pushl 0x14(%ebp) 121ad0: 8d 45 e4 lea -0x1c(%ebp),%eax 121ad3: 50 push %eax 121ad4: 56 push %esi 121ad5: e8 aa 7f 02 00 call 149a84 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 121ada: 83 c4 10 add $0x10,%esp 121add: 85 ff test %edi,%edi 121adf: 74 05 je 121ae6 *endptr = end; 121ae1: 8b 55 e4 mov -0x1c(%ebp),%edx 121ae4: 89 17 mov %edx,(%edi) /* nothing was converted */ if ( end == s ) 121ae6: 39 75 e4 cmp %esi,-0x1c(%ebp) 121ae9: 74 1d je 121b08 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 121aeb: 88 03 mov %al,(%ebx) 121aed: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 121aef: 8d 65 f4 lea -0xc(%ebp),%esp 121af2: 5b pop %ebx 121af3: 5e pop %esi 121af4: 5f pop %edi 121af5: c9 leave 121af6: c3 ret 121af7: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 121af8: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 121afd: 8d 65 f4 lea -0xc(%ebp),%esp 121b00: 5b pop %ebx 121b01: 5e pop %esi 121b02: 5f pop %edi 121b03: c9 leave 121b04: c3 ret 121b05: 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 ) 121b08: b8 0b 00 00 00 mov $0xb,%eax 121b0d: eb e0 jmp 121aef 001111c0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 1111c0: 55 push %ebp 1111c1: 89 e5 mov %esp,%ebp 1111c3: 57 push %edi 1111c4: 56 push %esi 1111c5: 53 push %ebx 1111c6: 83 ec 2c sub $0x2c,%esp 1111c9: 8b 75 08 mov 0x8(%ebp),%esi 1111cc: 8b 5d 0c mov 0xc(%ebp),%ebx 1111cf: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 1111d2: 85 db test %ebx,%ebx 1111d4: 74 5e je 111234 return RTEMS_INVALID_ADDRESS; errno = 0; 1111d6: e8 71 24 00 00 call 11364c <__errno> 1111db: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1111e1: 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 ); 1111e7: 50 push %eax 1111e8: ff 75 14 pushl 0x14(%ebp) 1111eb: 8d 45 e4 lea -0x1c(%ebp),%eax 1111ee: 50 push %eax 1111ef: 56 push %esi 1111f0: e8 0b 55 00 00 call 116700 1111f5: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 1111f7: 83 c4 10 add $0x10,%esp 1111fa: 85 ff test %edi,%edi 1111fc: 74 05 je 111203 *endptr = end; 1111fe: 8b 45 e4 mov -0x1c(%ebp),%eax 111201: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 111203: 39 75 e4 cmp %esi,-0x1c(%ebp) 111206: 74 3c je 111244 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 111208: 83 fa ff cmp $0xffffffff,%edx 11120b: 74 0f je 11121c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 11120d: 89 13 mov %edx,(%ebx) 11120f: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 111211: 8d 65 f4 lea -0xc(%ebp),%esp 111214: 5b pop %ebx 111215: 5e pop %esi 111216: 5f pop %edi 111217: c9 leave 111218: c3 ret 111219: 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)) 11121c: 89 55 d4 mov %edx,-0x2c(%ebp) 11121f: e8 28 24 00 00 call 11364c <__errno> 111224: 83 38 22 cmpl $0x22,(%eax) 111227: 8b 55 d4 mov -0x2c(%ebp),%edx 11122a: 75 e1 jne 11120d <== ALWAYS TAKEN 11122c: b8 0a 00 00 00 mov $0xa,%eax 111231: eb de jmp 111211 111233: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 111234: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 111239: 8d 65 f4 lea -0xc(%ebp),%esp 11123c: 5b pop %ebx 11123d: 5e pop %esi 11123e: 5f pop %edi 11123f: c9 leave 111240: c3 ret 111241: 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 ) 111244: b8 0b 00 00 00 mov $0xb,%eax 111249: eb c6 jmp 111211 00121b10 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 121b10: 55 push %ebp 121b11: 89 e5 mov %esp,%ebp 121b13: 57 push %edi 121b14: 56 push %esi 121b15: 53 push %ebx 121b16: 83 ec 2c sub $0x2c,%esp 121b19: 8b 75 08 mov 0x8(%ebp),%esi 121b1c: 8b 5d 0c mov 0xc(%ebp),%ebx 121b1f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 121b22: 85 db test %ebx,%ebx 121b24: 74 5e je 121b84 return RTEMS_INVALID_ADDRESS; errno = 0; 121b26: e8 01 0d 02 00 call 14282c <__errno> 121b2b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 121b31: 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 ); 121b37: 50 push %eax 121b38: ff 75 14 pushl 0x14(%ebp) 121b3b: 8d 45 e4 lea -0x1c(%ebp),%eax 121b3e: 50 push %eax 121b3f: 56 push %esi 121b40: e8 3f 7f 02 00 call 149a84 121b45: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 121b47: 83 c4 10 add $0x10,%esp 121b4a: 85 ff test %edi,%edi 121b4c: 74 05 je 121b53 *endptr = end; 121b4e: 8b 45 e4 mov -0x1c(%ebp),%eax 121b51: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 121b53: 39 75 e4 cmp %esi,-0x1c(%ebp) 121b56: 74 3c je 121b94 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 121b58: 83 fa ff cmp $0xffffffff,%edx 121b5b: 74 0f je 121b6c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 121b5d: 89 13 mov %edx,(%ebx) 121b5f: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 121b61: 8d 65 f4 lea -0xc(%ebp),%esp 121b64: 5b pop %ebx 121b65: 5e pop %esi 121b66: 5f pop %edi 121b67: c9 leave 121b68: c3 ret 121b69: 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)) 121b6c: 89 55 d4 mov %edx,-0x2c(%ebp) 121b6f: e8 b8 0c 02 00 call 14282c <__errno> 121b74: 83 38 22 cmpl $0x22,(%eax) 121b77: 8b 55 d4 mov -0x2c(%ebp),%edx 121b7a: 75 e1 jne 121b5d <== ALWAYS TAKEN 121b7c: b8 0a 00 00 00 mov $0xa,%eax 121b81: eb de jmp 121b61 121b83: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 121b84: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 121b89: 8d 65 f4 lea -0xc(%ebp),%esp 121b8c: 5b pop %ebx 121b8d: 5e pop %esi 121b8e: 5f pop %edi 121b8f: c9 leave 121b90: c3 ret 121b91: 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 ) 121b94: b8 0b 00 00 00 mov $0xb,%eax 121b99: eb c6 jmp 121b61 0011124c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11124c: 55 push %ebp 11124d: 89 e5 mov %esp,%ebp 11124f: 57 push %edi 111250: 56 push %esi 111251: 53 push %ebx 111252: 83 ec 2c sub $0x2c,%esp 111255: 8b 7d 08 mov 0x8(%ebp),%edi 111258: 8b 5d 0c mov 0xc(%ebp),%ebx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11125b: 85 db test %ebx,%ebx 11125d: 74 6d je 1112cc return RTEMS_INVALID_ADDRESS; errno = 0; 11125f: e8 e8 23 00 00 call 11364c <__errno> 111264: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11126a: c7 03 00 00 00 00 movl $0x0,(%ebx) 111270: 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 ); 111277: 52 push %edx 111278: ff 75 14 pushl 0x14(%ebp) 11127b: 8d 45 e4 lea -0x1c(%ebp),%eax 11127e: 50 push %eax 11127f: 57 push %edi 111280: e8 97 54 00 00 call 11671c 111285: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 111287: 83 c4 10 add $0x10,%esp 11128a: 8b 45 10 mov 0x10(%ebp),%eax 11128d: 85 c0 test %eax,%eax 11128f: 74 08 je 111299 *endptr = end; 111291: 8b 45 e4 mov -0x1c(%ebp),%eax 111294: 8b 4d 10 mov 0x10(%ebp),%ecx 111297: 89 01 mov %eax,(%ecx) /* nothing was converted */ if ( end == s ) 111299: 39 7d e4 cmp %edi,-0x1c(%ebp) 11129c: 74 3e je 1112dc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11129e: 89 f0 mov %esi,%eax 1112a0: 21 d0 and %edx,%eax 1112a2: 40 inc %eax 1112a3: 74 0f je 1112b4 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 1112a5: 89 33 mov %esi,(%ebx) 1112a7: 89 53 04 mov %edx,0x4(%ebx) 1112aa: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 1112ac: 8d 65 f4 lea -0xc(%ebp),%esp 1112af: 5b pop %ebx 1112b0: 5e pop %esi 1112b1: 5f pop %edi 1112b2: c9 leave 1112b3: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1112b4: 89 55 d4 mov %edx,-0x2c(%ebp) 1112b7: e8 90 23 00 00 call 11364c <__errno> 1112bc: 83 38 22 cmpl $0x22,(%eax) 1112bf: 8b 55 d4 mov -0x2c(%ebp),%edx 1112c2: 75 e1 jne 1112a5 <== ALWAYS TAKEN 1112c4: b8 0a 00 00 00 mov $0xa,%eax 1112c9: eb e1 jmp 1112ac 1112cb: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 1112cc: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 1112d1: 8d 65 f4 lea -0xc(%ebp),%esp 1112d4: 5b pop %ebx 1112d5: 5e pop %esi 1112d6: 5f pop %edi 1112d7: c9 leave 1112d8: c3 ret 1112d9: 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 ) 1112dc: b8 0b 00 00 00 mov $0xb,%eax 1112e1: eb c9 jmp 1112ac 0010b79c : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b79c: 55 push %ebp 10b79d: 89 e5 mov %esp,%ebp 10b79f: 57 push %edi 10b7a0: 56 push %esi 10b7a1: 53 push %ebx 10b7a2: 83 ec 1c sub $0x1c,%esp 10b7a5: 8b 5d 08 mov 0x8(%ebp),%ebx 10b7a8: 8b 4d 0c mov 0xc(%ebp),%ecx 10b7ab: 8b 7d 18 mov 0x18(%ebp),%edi 10b7ae: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b7b1: 85 f6 test %esi,%esi 10b7b3: 0f 84 37 01 00 00 je 10b8f0 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b7b9: 85 db test %ebx,%ebx 10b7bb: 0f 84 cb 00 00 00 je 10b88c /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b7c1: 66 85 ff test %di,%di 10b7c4: 78 1d js 10b7e3 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b7c6: 85 c9 test %ecx,%ecx 10b7c8: 75 0e jne 10b7d8 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 10b7ca: b8 13 00 00 00 mov $0x13,%eax } 10b7cf: 8d 65 f4 lea -0xc(%ebp),%esp 10b7d2: 5b pop %ebx 10b7d3: 5e pop %esi 10b7d4: 5f pop %edi 10b7d5: c9 leave 10b7d6: c3 ret 10b7d7: 90 nop <== NOT EXECUTED 10b7d8: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10b7df: 39 c1 cmp %eax,%ecx 10b7e1: 77 e7 ja 10b7ca */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b7e3: 83 ec 0c sub $0xc,%esp 10b7e6: ff 35 b0 74 12 00 pushl 0x1274b0 10b7ec: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b7ef: e8 ac 06 00 00 call 10bea0 <_API_Mutex_Lock> * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 10b7f4: c7 04 24 80 73 12 00 movl $0x127380,(%esp) 10b7fb: e8 30 10 00 00 call 10c830 <_Objects_Allocate> 10b800: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b802: 83 c4 10 add $0x10,%esp 10b805: 85 c0 test %eax,%eax 10b807: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b80a: 0f 84 c0 00 00 00 je 10b8d0 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b810: 50 push %eax 10b811: 53 push %ebx 10b812: 8b 45 14 mov 0x14(%ebp),%eax 10b815: 83 e0 01 and $0x1,%eax 10b818: 50 push %eax 10b819: 6a 00 push $0x0 10b81b: 8b 45 14 mov 0x14(%ebp),%eax 10b81e: c1 e8 09 shr $0x9,%eax 10b821: 83 e0 01 and $0x1,%eax 10b824: 50 push %eax 10b825: 8b 45 14 mov 0x14(%ebp),%eax 10b828: c1 e8 08 shr $0x8,%eax 10b82b: 83 f0 01 xor $0x1,%eax 10b82e: 83 e0 01 and $0x1,%eax 10b831: 50 push %eax 10b832: 51 push %ecx 10b833: 83 e7 01 and $0x1,%edi 10b836: 57 push %edi 10b837: ff 75 10 pushl 0x10(%ebp) 10b83a: 6a 00 push $0x0 10b83c: 52 push %edx 10b83d: 68 80 73 12 00 push $0x127380 10b842: 89 55 e4 mov %edx,-0x1c(%ebp) 10b845: e8 a6 1d 00 00 call 10d5f0 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b84a: 83 c4 30 add $0x30,%esp 10b84d: 84 c0 test %al,%al 10b84f: 8b 55 e4 mov -0x1c(%ebp),%edx 10b852: 74 48 je 10b89c } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10b854: 8b 8a f4 00 00 00 mov 0xf4(%edx),%ecx 10b85a: 8b 45 14 mov 0x14(%ebp),%eax 10b85d: c1 e8 0a shr $0xa,%eax 10b860: 83 f0 01 xor $0x1,%eax 10b863: 83 e0 01 and $0x1,%eax 10b866: 88 41 08 mov %al,0x8(%ecx) *id = the_thread->Object.id; 10b869: 8b 42 08 mov 0x8(%edx),%eax 10b86c: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b86e: 83 ec 0c sub $0xc,%esp 10b871: ff 35 b0 74 12 00 pushl 0x1274b0 10b877: e8 6c 06 00 00 call 10bee8 <_API_Mutex_Unlock> 10b87c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b87e: 83 c4 10 add $0x10,%esp } 10b881: 8d 65 f4 lea -0xc(%ebp),%esp 10b884: 5b pop %ebx 10b885: 5e pop %esi 10b886: 5f pop %edi 10b887: c9 leave 10b888: c3 ret 10b889: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b88c: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b891: 8d 65 f4 lea -0xc(%ebp),%esp 10b894: 5b pop %ebx 10b895: 5e pop %esi 10b896: 5f pop %edi 10b897: c9 leave 10b898: c3 ret 10b899: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b89c: 83 ec 0c sub $0xc,%esp 10b89f: ff 72 08 pushl 0x8(%edx) 10b8a2: e8 79 13 00 00 call 10cc20 <_Objects_Get_information_id> 10b8a7: 5a pop %edx 10b8a8: 59 pop %ecx 10b8a9: 8b 55 e4 mov -0x1c(%ebp),%edx 10b8ac: 52 push %edx 10b8ad: 50 push %eax 10b8ae: e8 fd 12 00 00 call 10cbb0 <_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(); 10b8b3: 58 pop %eax 10b8b4: ff 35 b0 74 12 00 pushl 0x1274b0 10b8ba: e8 29 06 00 00 call 10bee8 <_API_Mutex_Unlock> 10b8bf: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 10b8c4: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b8c7: 8d 65 f4 lea -0xc(%ebp),%esp 10b8ca: 5b pop %ebx 10b8cb: 5e pop %esi 10b8cc: 5f pop %edi 10b8cd: c9 leave 10b8ce: c3 ret 10b8cf: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b8d0: 83 ec 0c sub $0xc,%esp 10b8d3: ff 35 b0 74 12 00 pushl 0x1274b0 10b8d9: e8 0a 06 00 00 call 10bee8 <_API_Mutex_Unlock> 10b8de: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10b8e3: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b8e6: 8d 65 f4 lea -0xc(%ebp),%esp 10b8e9: 5b pop %ebx 10b8ea: 5e pop %esi 10b8eb: 5f pop %edi 10b8ec: c9 leave 10b8ed: c3 ret 10b8ee: 66 90 xchg %ax,%ax <== NOT EXECUTED Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b8f0: b8 09 00 00 00 mov $0x9,%eax 10b8f5: e9 d5 fe ff ff jmp 10b7cf 0010b8fc : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b8fc: 55 push %ebp 10b8fd: 89 e5 mov %esp,%ebp 10b8ff: 53 push %ebx 10b900: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b903: ff 35 b0 74 12 00 pushl 0x1274b0 10b909: e8 92 05 00 00 call 10bea0 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10b90e: 5a pop %edx 10b90f: 59 pop %ecx 10b910: 8d 45 f4 lea -0xc(%ebp),%eax 10b913: 50 push %eax 10b914: ff 75 08 pushl 0x8(%ebp) 10b917: e8 5c 1c 00 00 call 10d578 <_Thread_Get> 10b91c: 89 c3 mov %eax,%ebx switch ( location ) { 10b91e: 83 c4 10 add $0x10,%esp 10b921: 8b 45 f4 mov -0xc(%ebp),%eax 10b924: 85 c0 test %eax,%eax 10b926: 75 44 jne 10b96c case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10b928: 83 ec 0c sub $0xc,%esp 10b92b: ff 73 08 pushl 0x8(%ebx) 10b92e: e8 ed 12 00 00 call 10cc20 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10b933: 5a pop %edx 10b934: 59 pop %ecx 10b935: 53 push %ebx 10b936: 50 push %eax 10b937: e8 04 19 00 00 call 10d240 <_Thread_Close> 10b93c: 58 pop %eax 10b93d: ff 73 08 pushl 0x8(%ebx) 10b940: e8 db 12 00 00 call 10cc20 <_Objects_Get_information_id> 10b945: 5a pop %edx 10b946: 59 pop %ecx 10b947: 53 push %ebx 10b948: 50 push %eax 10b949: e8 62 12 00 00 call 10cbb0 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b94e: 58 pop %eax 10b94f: ff 35 b0 74 12 00 pushl 0x1274b0 10b955: e8 8e 05 00 00 call 10bee8 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10b95a: e8 f5 1b 00 00 call 10d554 <_Thread_Enable_dispatch> 10b95f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b961: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10b964: 8b 5d fc mov -0x4(%ebp),%ebx 10b967: c9 leave 10b968: c3 ret 10b969: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10b96c: 83 ec 0c sub $0xc,%esp 10b96f: ff 35 b0 74 12 00 pushl 0x1274b0 10b975: e8 6e 05 00 00 call 10bee8 <_API_Mutex_Unlock> 10b97a: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10b97f: 83 c4 10 add $0x10,%esp } 10b982: 8b 5d fc mov -0x4(%ebp),%ebx 10b985: c9 leave 10b986: c3 ret 0010d418 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d418: 55 push %ebp 10d419: 89 e5 mov %esp,%ebp 10d41b: 56 push %esi 10d41c: 53 push %ebx 10d41d: 83 ec 10 sub $0x10,%esp 10d420: 8b 45 08 mov 0x8(%ebp),%eax 10d423: 8b 75 0c mov 0xc(%ebp),%esi 10d426: 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() ) 10d429: 80 3d 04 6d 12 00 00 cmpb $0x0,0x126d04 10d430: 74 6e je 10d4a0 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d432: 85 db test %ebx,%ebx 10d434: 74 7e je 10d4b4 /* * 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 ) 10d436: 83 fe 0f cmp $0xf,%esi 10d439: 77 3d ja 10d478 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d43b: 85 c0 test %eax,%eax 10d43d: 74 45 je 10d484 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d43f: 8b 15 b8 b2 12 00 mov 0x12b2b8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d445: 3b 42 08 cmp 0x8(%edx),%eax 10d448: 74 40 je 10d48a api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d44a: 83 ec 08 sub $0x8,%esp 10d44d: 8d 55 f4 lea -0xc(%ebp),%edx 10d450: 52 push %edx 10d451: 50 push %eax 10d452: e8 45 1f 00 00 call 10f39c <_Thread_Get> switch ( location ) { 10d457: 83 c4 10 add $0x10,%esp 10d45a: 8b 55 f4 mov -0xc(%ebp),%edx 10d45d: 85 d2 test %edx,%edx 10d45f: 75 4b jne 10d4ac case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d461: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d467: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d46b: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d46d: e8 06 1f 00 00 call 10f378 <_Thread_Enable_dispatch> 10d472: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d474: eb 07 jmp 10d47d 10d476: 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 ) 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 b8 b2 12 00 mov 0x12b2b8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d48a: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d490: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d494: 89 03 mov %eax,(%ebx) 10d496: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d498: 8d 65 f8 lea -0x8(%ebp),%esp 10d49b: 5b pop %ebx 10d49c: 5e pop %esi 10d49d: c9 leave 10d49e: c3 ret 10d49f: 90 nop <== 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 *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10d4ac: b8 04 00 00 00 mov $0x4,%eax 10d4b1: eb ca jmp 10d47d 10d4b3: 90 nop <== NOT EXECUTED RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 10d4b4: b8 09 00 00 00 mov $0x9,%eax 10d4b9: eb c2 jmp 10d47d 0010b988 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10b988: 55 push %ebp 10b989: 89 e5 mov %esp,%ebp 10b98b: 83 ec 08 sub $0x8,%esp 10b98e: 8b 55 08 mov 0x8(%ebp),%edx 10b991: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10b994: 85 c0 test %eax,%eax 10b996: 74 30 je 10b9c8 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10b998: 85 d2 test %edx,%edx 10b99a: 75 10 jne 10b9ac *id = _Thread_Executing->Object.id; 10b99c: 8b 15 b8 74 12 00 mov 0x1274b8,%edx 10b9a2: 8b 52 08 mov 0x8(%edx),%edx 10b9a5: 89 10 mov %edx,(%eax) 10b9a7: 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 ]; } 10b9a9: c9 leave 10b9aa: c3 ret 10b9ab: 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 ); 10b9ac: 50 push %eax 10b9ad: ff 75 0c pushl 0xc(%ebp) 10b9b0: 52 push %edx 10b9b1: 68 80 73 12 00 push $0x127380 10b9b6: e8 a9 14 00 00 call 10ce64 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10b9bb: 8b 04 85 cc 0c 12 00 mov 0x120ccc(,%eax,4),%eax 10b9c2: 83 c4 10 add $0x10,%esp } 10b9c5: c9 leave 10b9c6: c3 ret 10b9c7: 90 nop <== NOT EXECUTED rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) 10b9c8: 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 ]; } 10b9ca: c9 leave 10b9cb: c3 ret 001183ac : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 1183ac: 55 push %ebp 1183ad: 89 e5 mov %esp,%ebp 1183af: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 1183b2: 8d 45 f4 lea -0xc(%ebp),%eax 1183b5: 50 push %eax 1183b6: ff 75 08 pushl 0x8(%ebp) 1183b9: e8 8e 38 00 00 call 11bc4c <_Thread_Get> switch ( location ) { 1183be: 83 c4 10 add $0x10,%esp 1183c1: 8b 55 f4 mov -0xc(%ebp),%edx 1183c4: 85 d2 test %edx,%edx 1183c6: 74 08 je 1183d0 1183c8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183cd: c9 leave 1183ce: c3 ret 1183cf: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 1183d0: f6 40 10 02 testb $0x2,0x10(%eax) 1183d4: 74 0e je 1183e4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1183d6: e8 21 38 00 00 call 11bbfc <_Thread_Enable_dispatch> 1183db: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183e0: c9 leave 1183e1: c3 ret 1183e2: 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(); 1183e4: e8 13 38 00 00 call 11bbfc <_Thread_Enable_dispatch> 1183e9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183eb: c9 leave 1183ec: c3 ret 00112804 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 112804: 55 push %ebp 112805: 89 e5 mov %esp,%ebp 112807: 57 push %edi 112808: 56 push %esi 112809: 53 push %ebx 11280a: 83 ec 1c sub $0x1c,%esp 11280d: 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 ) 112810: 85 c9 test %ecx,%ecx 112812: 0f 84 1c 01 00 00 je 112934 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 112818: 8b 1d b8 74 12 00 mov 0x1274b8,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 11281e: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 112824: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 112828: 19 f6 sbb %esi,%esi 11282a: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 112830: 8b 53 7c mov 0x7c(%ebx),%edx 112833: 85 d2 test %edx,%edx 112835: 0f 85 b5 00 00 00 jne 1128f0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 11283b: 80 7f 08 01 cmpb $0x1,0x8(%edi) 11283f: 19 d2 sbb %edx,%edx 112841: 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(); 112847: 89 55 e4 mov %edx,-0x1c(%ebp) 11284a: 89 4d e0 mov %ecx,-0x20(%ebp) 11284d: e8 2a c1 ff ff call 10e97c <_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; 112852: 8b 55 e4 mov -0x1c(%ebp),%edx 112855: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 112857: 09 f0 or %esi,%eax 112859: 8b 4d e0 mov -0x20(%ebp),%ecx 11285c: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 11285e: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 112865: 74 0f je 112876 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 112867: 8b 45 08 mov 0x8(%ebp),%eax 11286a: c1 e8 08 shr $0x8,%eax 11286d: 83 f0 01 xor $0x1,%eax 112870: 83 e0 01 and $0x1,%eax 112873: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 112876: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 11287d: 74 18 je 112897 if ( _Modes_Is_timeslice(mode_set) ) { 11287f: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 112886: 74 74 je 1128fc executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 112888: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 11288f: a1 c4 73 12 00 mov 0x1273c4,%eax 112894: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112897: f6 45 0c 01 testb $0x1,0xc(%ebp) 11289b: 74 07 je 1128a4 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 11289d: f6 45 08 01 testb $0x1,0x8(%ebp) 1128a1: 74 69 je 11290c 1128a3: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 1128a4: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1128ab: 74 2c je 1128d9 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 1128ad: 8b 45 08 mov 0x8(%ebp),%eax 1128b0: c1 e8 0a shr $0xa,%eax 1128b3: 83 f0 01 xor $0x1,%eax 1128b6: 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; 1128b9: 38 47 08 cmp %al,0x8(%edi) 1128bc: 74 1b je 1128d9 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; 1128be: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 1128c1: 9c pushf 1128c2: fa cli 1128c3: 58 pop %eax _signals = information->signals_pending; 1128c4: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 1128c7: 8b 4f 14 mov 0x14(%edi),%ecx 1128ca: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 1128cd: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 1128d0: 50 push %eax 1128d1: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 1128d2: 8b 47 14 mov 0x14(%edi),%eax 1128d5: 85 c0 test %eax,%eax 1128d7: 75 53 jne 11292c 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; 1128d9: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 1128db: 83 3d c0 75 12 00 03 cmpl $0x3,0x1275c0 1128e2: 74 2c je 112910 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 1128e4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1128e6: 83 c4 1c add $0x1c,%esp 1128e9: 5b pop %ebx 1128ea: 5e pop %esi 1128eb: 5f pop %edi 1128ec: c9 leave 1128ed: c3 ret 1128ee: 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; 1128f0: 81 ce 00 02 00 00 or $0x200,%esi 1128f6: e9 40 ff ff ff jmp 11283b 1128fb: 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; 1128fc: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112903: f6 45 0c 01 testb $0x1,0xc(%ebp) 112907: 74 9b je 1128a4 112909: eb 92 jmp 11289d 11290b: 90 nop <== NOT EXECUTED 11290c: fb sti 11290d: eb 95 jmp 1128a4 11290f: 90 nop <== NOT EXECUTED } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 112910: e8 a7 02 00 00 call 112bbc <_Thread_Evaluate_mode> 112915: 84 c0 test %al,%al 112917: 75 04 jne 11291d 112919: 84 db test %bl,%bl 11291b: 74 c7 je 1128e4 _Thread_Dispatch(); 11291d: e8 d6 aa ff ff call 10d3f8 <_Thread_Dispatch> 112922: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 112924: 83 c4 1c add $0x1c,%esp 112927: 5b pop %ebx 112928: 5e pop %esi 112929: 5f pop %edi 11292a: c9 leave 11292b: 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; 11292c: c6 43 74 01 movb $0x1,0x74(%ebx) 112930: b3 01 mov $0x1,%bl 112932: eb a7 jmp 1128db ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 112934: 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; } 112939: 83 c4 1c add $0x1c,%esp 11293c: 5b pop %ebx 11293d: 5e pop %esi 11293e: 5f pop %edi 11293f: c9 leave 112940: c3 ret 0010c45c : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c45c: 55 push %ebp 10c45d: 89 e5 mov %esp,%ebp 10c45f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c462: 8d 45 f4 lea -0xc(%ebp),%eax 10c465: 50 push %eax 10c466: ff 75 08 pushl 0x8(%ebp) 10c469: e8 32 1c 00 00 call 10e0a0 <_Thread_Get> switch ( location ) { 10c46e: 83 c4 10 add $0x10,%esp 10c471: 8b 4d f4 mov -0xc(%ebp),%ecx 10c474: 85 c9 test %ecx,%ecx 10c476: 75 20 jne 10c498 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c478: 52 push %edx 10c479: ff 75 0c pushl 0xc(%ebp) 10c47c: 6a 00 push $0x0 10c47e: 50 push %eax 10c47f: e8 78 24 00 00 call 10e8fc <_Thread_Restart> 10c484: 83 c4 10 add $0x10,%esp 10c487: 84 c0 test %al,%al 10c489: 75 15 jne 10c4a0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c48b: e8 ec 1b 00 00 call 10e07c <_Thread_Enable_dispatch> 10c490: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c495: c9 leave 10c496: c3 ret 10c497: 90 nop <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10c498: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c49d: c9 leave 10c49e: c3 ret 10c49f: 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(); 10c4a0: e8 d7 1b 00 00 call 10e07c <_Thread_Enable_dispatch> 10c4a5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c4a7: c9 leave 10c4a8: c3 ret 0010f190 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10f190: 55 push %ebp 10f191: 89 e5 mov %esp,%ebp 10f193: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10f196: 8d 45 f4 lea -0xc(%ebp),%eax 10f199: 50 push %eax 10f19a: ff 75 08 pushl 0x8(%ebp) 10f19d: e8 12 1d 00 00 call 110eb4 <_Thread_Get> switch ( location ) { 10f1a2: 83 c4 10 add $0x10,%esp 10f1a5: 8b 55 f4 mov -0xc(%ebp),%edx 10f1a8: 85 d2 test %edx,%edx 10f1aa: 74 08 je 10f1b4 10f1ac: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f1b1: c9 leave 10f1b2: c3 ret 10f1b3: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10f1b4: f6 40 10 02 testb $0x2,0x10(%eax) 10f1b8: 75 0e jne 10f1c8 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10f1ba: e8 a5 1c 00 00 call 110e64 <_Thread_Enable_dispatch> 10f1bf: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f1c4: c9 leave 10f1c5: c3 ret 10f1c6: 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 ); 10f1c8: 83 ec 08 sub $0x8,%esp 10f1cb: 6a 01 push $0x1 10f1cd: 50 push %eax 10f1ce: e8 3d 25 00 00 call 111710 <_Thread_Resume> _Thread_Enable_dispatch(); 10f1d3: e8 8c 1c 00 00 call 110e64 <_Thread_Enable_dispatch> 10f1d8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f1da: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f1dd: c9 leave 10f1de: c3 ret 0010d590 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d590: 55 push %ebp 10d591: 89 e5 mov %esp,%ebp 10d593: 56 push %esi 10d594: 53 push %ebx 10d595: 83 ec 10 sub $0x10,%esp 10d598: 8b 45 08 mov 0x8(%ebp),%eax 10d59b: 8b 5d 0c mov 0xc(%ebp),%ebx 10d59e: 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() ) 10d5a1: 80 3d 04 6d 12 00 00 cmpb $0x0,0x126d04 10d5a8: 74 66 je 10d610 /* * 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 ) 10d5aa: 83 fb 0f cmp $0xf,%ebx 10d5ad: 77 39 ja 10d5e8 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d5af: 85 c0 test %eax,%eax 10d5b1: 74 41 je 10d5f4 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d5b3: 8b 15 b8 b2 12 00 mov 0x12b2b8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d5b9: 3b 42 08 cmp 0x8(%edx),%eax 10d5bc: 74 3c je 10d5fa api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d5be: 83 ec 08 sub $0x8,%esp 10d5c1: 8d 55 f4 lea -0xc(%ebp),%edx 10d5c4: 52 push %edx 10d5c5: 50 push %eax 10d5c6: e8 d1 1d 00 00 call 10f39c <_Thread_Get> switch ( location ) { 10d5cb: 83 c4 10 add $0x10,%esp 10d5ce: 8b 55 f4 mov -0xc(%ebp),%edx 10d5d1: 85 d2 test %edx,%edx 10d5d3: 75 47 jne 10d61c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d5d5: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d5db: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d5df: e8 94 1d 00 00 call 10f378 <_Thread_Enable_dispatch> 10d5e4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d5e6: eb 05 jmp 10d5ed /* * 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 ) 10d5e8: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5ed: 8d 65 f8 lea -0x8(%ebp),%esp 10d5f0: 5b pop %ebx 10d5f1: 5e pop %esi 10d5f2: c9 leave 10d5f3: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d5f4: 8b 15 b8 b2 12 00 mov 0x12b2b8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d5fa: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d600: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10d604: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d606: 8d 65 f8 lea -0x8(%ebp),%esp 10d609: 5b pop %ebx 10d60a: 5e pop %esi 10d60b: c9 leave 10d60c: c3 ret 10d60d: 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() ) 10d610: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d615: 8d 65 f8 lea -0x8(%ebp),%esp 10d618: 5b pop %ebx 10d619: 5e pop %esi 10d61a: c9 leave 10d61b: c3 ret api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10d61c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d621: 8d 65 f8 lea -0x8(%ebp),%esp 10d624: 5b pop %ebx 10d625: 5e pop %esi 10d626: c9 leave 10d627: c3 ret 0010fe4c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10fe4c: 55 push %ebp 10fe4d: 89 e5 mov %esp,%ebp 10fe4f: 56 push %esi 10fe50: 53 push %ebx 10fe51: 83 ec 10 sub $0x10,%esp 10fe54: 8b 5d 0c mov 0xc(%ebp),%ebx 10fe57: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10fe5a: 85 db test %ebx,%ebx 10fe5c: 74 0b je 10fe69 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10fe5e: 0f b6 05 74 8c 12 00 movzbl 0x128c74,%eax 10fe65: 39 c3 cmp %eax,%ebx 10fe67: 77 5f ja 10fec8 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fe69: 85 f6 test %esi,%esi 10fe6b: 74 67 je 10fed4 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10fe6d: 83 ec 08 sub $0x8,%esp 10fe70: 8d 45 f4 lea -0xc(%ebp),%eax 10fe73: 50 push %eax 10fe74: ff 75 08 pushl 0x8(%ebp) 10fe77: e8 68 1e 00 00 call 111ce4 <_Thread_Get> switch ( location ) { 10fe7c: 83 c4 10 add $0x10,%esp 10fe7f: 8b 55 f4 mov -0xc(%ebp),%edx 10fe82: 85 d2 test %edx,%edx 10fe84: 75 36 jne 10febc case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10fe86: 8b 50 14 mov 0x14(%eax),%edx 10fe89: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10fe8b: 85 db test %ebx,%ebx 10fe8d: 74 1c je 10feab the_thread->real_priority = new_priority; 10fe8f: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10fe92: 8b 48 1c mov 0x1c(%eax),%ecx 10fe95: 85 c9 test %ecx,%ecx 10fe97: 74 05 je 10fe9e the_thread->current_priority > new_priority ) 10fe99: 3b 58 14 cmp 0x14(%eax),%ebx 10fe9c: 73 0d jae 10feab <== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10fe9e: 52 push %edx 10fe9f: 6a 00 push $0x0 10fea1: 53 push %ebx 10fea2: 50 push %eax 10fea3: e8 04 19 00 00 call 1117ac <_Thread_Change_priority> 10fea8: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10feab: e8 e4 1d 00 00 call 111c94 <_Thread_Enable_dispatch> 10feb0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10feb2: 8d 65 f8 lea -0x8(%ebp),%esp 10feb5: 5b pop %ebx 10feb6: 5e pop %esi 10feb7: c9 leave 10feb8: c3 ret 10feb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10febc: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fec1: 8d 65 f8 lea -0x8(%ebp),%esp 10fec4: 5b pop %ebx 10fec5: 5e pop %esi 10fec6: c9 leave 10fec7: c3 ret 10fec8: b8 13 00 00 00 mov $0x13,%eax 10fecd: 8d 65 f8 lea -0x8(%ebp),%esp 10fed0: 5b pop %ebx 10fed1: 5e pop %esi 10fed2: c9 leave 10fed3: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fed4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fed9: 8d 65 f8 lea -0x8(%ebp),%esp 10fedc: 5b pop %ebx 10fedd: 5e pop %esi 10fede: c9 leave 10fedf: c3 ret 0010ba40 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10ba40: 55 push %ebp 10ba41: 89 e5 mov %esp,%ebp 10ba43: 53 push %ebx 10ba44: 83 ec 14 sub $0x14,%esp 10ba47: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10ba4a: 85 db test %ebx,%ebx 10ba4c: 74 4e je 10ba9c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10ba4e: 83 ec 08 sub $0x8,%esp 10ba51: 8d 45 f4 lea -0xc(%ebp),%eax 10ba54: 50 push %eax 10ba55: ff 75 08 pushl 0x8(%ebp) 10ba58: e8 1b 1b 00 00 call 10d578 <_Thread_Get> switch ( location ) { 10ba5d: 83 c4 10 add $0x10,%esp 10ba60: 8b 55 f4 mov -0xc(%ebp),%edx 10ba63: 85 d2 test %edx,%edx 10ba65: 75 29 jne 10ba90 case OBJECTS_LOCAL: if ( _Thread_Start( 10ba67: 83 ec 0c sub $0xc,%esp 10ba6a: ff 75 10 pushl 0x10(%ebp) 10ba6d: 6a 00 push $0x0 10ba6f: 53 push %ebx 10ba70: 6a 00 push $0x0 10ba72: 50 push %eax 10ba73: e8 14 26 00 00 call 10e08c <_Thread_Start> 10ba78: 83 c4 20 add $0x20,%esp 10ba7b: 84 c0 test %al,%al 10ba7d: 75 29 jne 10baa8 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ba7f: e8 d0 1a 00 00 call 10d554 <_Thread_Enable_dispatch> 10ba84: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba89: 8b 5d fc mov -0x4(%ebp),%ebx 10ba8c: c9 leave 10ba8d: c3 ret 10ba8e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10ba90: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba95: 8b 5d fc mov -0x4(%ebp),%ebx 10ba98: c9 leave 10ba99: c3 ret 10ba9a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10ba9c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10baa1: 8b 5d fc mov -0x4(%ebp),%ebx 10baa4: c9 leave 10baa5: c3 ret 10baa6: 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(); 10baa8: e8 a7 1a 00 00 call 10d554 <_Thread_Enable_dispatch> 10baad: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10baaf: 8b 5d fc mov -0x4(%ebp),%ebx 10bab2: c9 leave 10bab3: c3 ret 00110838 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 110838: 55 push %ebp 110839: 89 e5 mov %esp,%ebp 11083b: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11083e: 8d 45 f4 lea -0xc(%ebp),%eax 110841: 50 push %eax 110842: ff 75 08 pushl 0x8(%ebp) 110845: e8 2e cd ff ff call 10d578 <_Thread_Get> switch ( location ) { 11084a: 83 c4 10 add $0x10,%esp 11084d: 8b 55 f4 mov -0xc(%ebp),%edx 110850: 85 d2 test %edx,%edx 110852: 74 08 je 11085c 110854: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110859: c9 leave 11085a: c3 ret 11085b: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 11085c: f6 40 10 02 testb $0x2,0x10(%eax) 110860: 74 0e je 110870 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 110862: e8 ed cc ff ff call 10d554 <_Thread_Enable_dispatch> 110867: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11086c: c9 leave 11086d: c3 ret 11086e: 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 ); 110870: 83 ec 0c sub $0xc,%esp 110873: 50 push %eax 110874: e8 5b 0a 00 00 call 1112d4 <_Thread_Suspend> _Thread_Enable_dispatch(); 110879: e8 d6 cc ff ff call 10d554 <_Thread_Enable_dispatch> 11087e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110880: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110883: c9 leave 110884: c3 ret 0012e30c : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 12e30c: 55 push %ebp 12e30d: 89 e5 mov %esp,%ebp 12e30f: 57 push %edi 12e310: 56 push %esi 12e311: 53 push %ebx 12e312: 83 ec 1c sub $0x1c,%esp 12e315: 8b 5d 0c mov 0xc(%ebp),%ebx 12e318: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12e31b: 85 db test %ebx,%ebx 12e31d: 0f 84 9d 00 00 00 je 12e3c0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12e323: 83 ec 08 sub $0x8,%esp 12e326: 8d 45 e4 lea -0x1c(%ebp),%eax 12e329: 50 push %eax 12e32a: ff 75 08 pushl 0x8(%ebp) 12e32d: e8 72 41 fe ff call 1124a4 <_Thread_Get> 12e332: 89 c6 mov %eax,%esi switch (location) { 12e334: 83 c4 10 add $0x10,%esp 12e337: 8b 45 e4 mov -0x1c(%ebp),%eax 12e33a: 85 c0 test %eax,%eax 12e33c: 74 0e je 12e34c 12e33e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e343: 8d 65 f4 lea -0xc(%ebp),%esp 12e346: 5b pop %ebx 12e347: 5e pop %esi 12e348: 5f pop %edi 12e349: c9 leave 12e34a: c3 ret 12e34b: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 12e34c: 8b 86 04 01 00 00 mov 0x104(%esi),%eax while (tvp) { 12e352: 85 c0 test %eax,%eax 12e354: 75 44 jne 12e39a 12e356: 66 90 xchg %ax,%ax } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 12e358: 83 ec 0c sub $0xc,%esp 12e35b: 6a 14 push $0x14 12e35d: e8 ce 52 fe ff call 113630 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 12e362: 83 c4 10 add $0x10,%esp 12e365: 85 c0 test %eax,%eax 12e367: 74 4b je 12e3b4 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 12e369: 8b 13 mov (%ebx),%edx 12e36b: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 12e36e: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 12e371: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 12e374: 8b 96 04 01 00 00 mov 0x104(%esi),%edx 12e37a: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 12e37c: 89 86 04 01 00 00 mov %eax,0x104(%esi) _Thread_Enable_dispatch(); 12e382: e8 f9 40 fe ff call 112480 <_Thread_Enable_dispatch> 12e387: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e389: 8d 65 f4 lea -0xc(%ebp),%esp 12e38c: 5b pop %ebx 12e38d: 5e pop %esi 12e38e: 5f pop %edi 12e38f: c9 leave 12e390: c3 ret 12e391: 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; 12e394: 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) { 12e396: 85 c0 test %eax,%eax 12e398: 74 be je 12e358 if (tvp->ptr == ptr) { 12e39a: 39 58 04 cmp %ebx,0x4(%eax) 12e39d: 75 f5 jne 12e394 tvp->dtor = dtor; 12e39f: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 12e3a2: e8 d9 40 fe ff call 112480 <_Thread_Enable_dispatch> 12e3a7: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e3a9: 8d 65 f4 lea -0xc(%ebp),%esp 12e3ac: 5b pop %ebx 12e3ad: 5e pop %esi 12e3ae: 5f pop %edi 12e3af: c9 leave 12e3b0: c3 ret 12e3b1: 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(); 12e3b4: e8 c7 40 fe ff call 112480 <_Thread_Enable_dispatch> 12e3b9: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 12e3be: eb 83 jmp 12e343 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12e3c0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e3c5: 8d 65 f4 lea -0xc(%ebp),%esp 12e3c8: 5b pop %ebx 12e3c9: 5e pop %esi 12e3ca: 5f pop %edi 12e3cb: c9 leave 12e3cc: c3 ret 0012e3d0 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 12e3d0: 55 push %ebp 12e3d1: 89 e5 mov %esp,%ebp 12e3d3: 53 push %ebx 12e3d4: 83 ec 14 sub $0x14,%esp 12e3d7: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 12e3da: 85 db test %ebx,%ebx 12e3dc: 74 4c je 12e42a return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 12e3de: 83 ec 08 sub $0x8,%esp 12e3e1: 8d 45 f4 lea -0xc(%ebp),%eax 12e3e4: 50 push %eax 12e3e5: ff 75 08 pushl 0x8(%ebp) 12e3e8: e8 b7 40 fe ff call 1124a4 <_Thread_Get> switch (location) { 12e3ed: 83 c4 10 add $0x10,%esp 12e3f0: 8b 55 f4 mov -0xc(%ebp),%edx 12e3f3: 85 d2 test %edx,%edx 12e3f5: 74 0d je 12e404 12e3f7: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e3fc: 8b 5d fc mov -0x4(%ebp),%ebx 12e3ff: c9 leave 12e400: c3 ret 12e401: 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; 12e404: 8b 90 04 01 00 00 mov 0x104(%eax),%edx while (tvp) { 12e40a: 85 d2 test %edx,%edx 12e40c: 74 17 je 12e425 if (tvp->ptr == ptr) { 12e40e: 39 5a 04 cmp %ebx,0x4(%edx) 12e411: 75 0a jne 12e41d 12e413: eb 3c jmp 12e451 12e415: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12e418: 39 5a 04 cmp %ebx,0x4(%edx) 12e41b: 74 17 je 12e434 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; 12e41d: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 12e41f: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 12e421: 85 d2 test %edx,%edx 12e423: 75 f3 jne 12e418 <== NEVER TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12e425: e8 56 40 fe ff call 112480 <_Thread_Enable_dispatch> 12e42a: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e42f: 8b 5d fc mov -0x4(%ebp),%ebx 12e432: c9 leave 12e433: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 12e434: 8b 1a mov (%edx),%ebx 12e436: 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 ); 12e438: 83 ec 08 sub $0x8,%esp 12e43b: 52 push %edx 12e43c: 50 push %eax 12e43d: e8 a2 00 00 00 call 12e4e4 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 12e442: e8 39 40 fe ff call 112480 <_Thread_Enable_dispatch> 12e447: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12e449: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e44c: 8b 5d fc mov -0x4(%ebp),%ebx 12e44f: c9 leave 12e450: 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; 12e451: 8b 0a mov (%edx),%ecx 12e453: 89 88 04 01 00 00 mov %ecx,0x104(%eax) 12e459: eb dd jmp 12e438 0012e45c : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 12e45c: 55 push %ebp 12e45d: 89 e5 mov %esp,%ebp 12e45f: 56 push %esi 12e460: 53 push %ebx 12e461: 83 ec 10 sub $0x10,%esp 12e464: 8b 5d 0c mov 0xc(%ebp),%ebx 12e467: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 12e46a: 85 db test %ebx,%ebx 12e46c: 74 56 je 12e4c4 return RTEMS_INVALID_ADDRESS; if ( !result ) 12e46e: 85 f6 test %esi,%esi 12e470: 74 52 je 12e4c4 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12e472: 83 ec 08 sub $0x8,%esp 12e475: 8d 45 f4 lea -0xc(%ebp),%eax 12e478: 50 push %eax 12e479: ff 75 08 pushl 0x8(%ebp) 12e47c: e8 23 40 fe ff call 1124a4 <_Thread_Get> switch (location) { 12e481: 83 c4 10 add $0x10,%esp 12e484: 8b 55 f4 mov -0xc(%ebp),%edx 12e487: 85 d2 test %edx,%edx 12e489: 75 2d jne 12e4b8 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 12e48b: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 12e491: 85 c0 test %eax,%eax 12e493: 75 09 jne 12e49e 12e495: eb 39 jmp 12e4d0 12e497: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 12e498: 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) { 12e49a: 85 c0 test %eax,%eax 12e49c: 74 32 je 12e4d0 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 12e49e: 39 58 04 cmp %ebx,0x4(%eax) 12e4a1: 75 f5 jne 12e498 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 12e4a3: 8b 40 0c mov 0xc(%eax),%eax 12e4a6: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 12e4a8: e8 d3 3f fe ff call 112480 <_Thread_Enable_dispatch> 12e4ad: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e4af: 8d 65 f8 lea -0x8(%ebp),%esp 12e4b2: 5b pop %ebx 12e4b3: 5e pop %esi 12e4b4: c9 leave 12e4b5: c3 ret 12e4b6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 12e4b8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e4bd: 8d 65 f8 lea -0x8(%ebp),%esp 12e4c0: 5b pop %ebx 12e4c1: 5e pop %esi 12e4c2: c9 leave 12e4c3: c3 ret return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 12e4c4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e4c9: 8d 65 f8 lea -0x8(%ebp),%esp 12e4cc: 5b pop %ebx 12e4cd: 5e pop %esi 12e4ce: c9 leave 12e4cf: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12e4d0: e8 ab 3f fe ff call 112480 <_Thread_Enable_dispatch> 12e4d5: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e4da: 8d 65 f8 lea -0x8(%ebp),%esp 12e4dd: 5b pop %ebx 12e4de: 5e pop %esi 12e4df: c9 leave 12e4e0: c3 ret 0010bab4 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10bab4: 55 push %ebp 10bab5: 89 e5 mov %esp,%ebp 10bab7: 53 push %ebx 10bab8: 83 ec 04 sub $0x4,%esp 10babb: 8b 5d 08 mov 0x8(%ebp),%ebx 10babe: a1 f8 73 12 00 mov 0x1273f8,%eax 10bac3: 40 inc %eax 10bac4: a3 f8 73 12 00 mov %eax,0x1273f8 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10bac9: 85 db test %ebx,%ebx 10bacb: 74 53 je 10bb20 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10bacd: 83 ec 08 sub $0x8,%esp 10bad0: 6a 08 push $0x8 10bad2: ff 35 b8 74 12 00 pushl 0x1274b8 10bad8: e8 63 23 00 00 call 10de40 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10badd: a1 b8 74 12 00 mov 0x1274b8,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10bae2: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bae5: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10baec: c7 40 64 bc d3 10 00 movl $0x10d3bc,0x64(%eax) the_watchdog->id = id; 10baf3: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10baf6: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bafd: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bb00: 5a pop %edx 10bb01: 59 pop %ecx 10bb02: 83 c0 48 add $0x48,%eax 10bb05: 50 push %eax 10bb06: 68 d8 74 12 00 push $0x1274d8 10bb0b: e8 b8 29 00 00 call 10e4c8 <_Watchdog_Insert> 10bb10: 83 c4 10 add $0x10,%esp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bb13: e8 3c 1a 00 00 call 10d554 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bb18: 31 c0 xor %eax,%eax 10bb1a: 8b 5d fc mov -0x4(%ebp),%ebx 10bb1d: c9 leave 10bb1e: c3 ret 10bb1f: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10bb20: e8 33 26 00 00 call 10e158 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bb25: e8 2a 1a 00 00 call 10d554 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bb2a: 31 c0 xor %eax,%eax 10bb2c: 8b 5d fc mov -0x4(%ebp),%ebx 10bb2f: c9 leave 10bb30: c3 ret 0010c8e0 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10c8e0: 55 push %ebp 10c8e1: 89 e5 mov %esp,%ebp 10c8e3: 53 push %ebx 10c8e4: 83 ec 14 sub $0x14,%esp 10c8e7: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c8ea: 80 3d ac 9d 12 00 00 cmpb $0x0,0x129dac 10c8f1: 0f 84 a9 00 00 00 je 10c9a0 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c8f7: 85 db test %ebx,%ebx 10c8f9: 0f 84 ad 00 00 00 je 10c9ac return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10c8ff: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10c906: 83 ec 0c sub $0xc,%esp 10c909: 53 push %ebx 10c90a: e8 d9 f3 ff ff call 10bce8 <_TOD_Validate> 10c90f: 83 c4 10 add $0x10,%esp 10c912: 84 c0 test %al,%al 10c914: 75 0a jne 10c920 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10c916: b8 14 00 00 00 mov $0x14,%eax } 10c91b: 8b 5d fc mov -0x4(%ebp),%ebx 10c91e: c9 leave 10c91f: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10c920: 83 ec 0c sub $0xc,%esp 10c923: 53 push %ebx 10c924: e8 33 f3 ff ff call 10bc5c <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10c929: 83 c4 10 add $0x10,%esp 10c92c: 3b 05 2c 9e 12 00 cmp 0x129e2c,%eax 10c932: 76 e2 jbe 10c916 10c934: 8b 15 98 9d 12 00 mov 0x129d98,%edx 10c93a: 42 inc %edx 10c93b: 89 15 98 9d 12 00 mov %edx,0x129d98 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10c941: 83 ec 08 sub $0x8,%esp 10c944: 6a 10 push $0x10 10c946: ff 35 58 9e 12 00 pushl 0x129e58 10c94c: 89 45 f4 mov %eax,-0xc(%ebp) 10c94f: e8 5c 24 00 00 call 10edb0 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10c954: 8b 15 58 9e 12 00 mov 0x129e58,%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( 10c95a: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c95d: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10c964: c7 42 64 2c e3 10 00 movl $0x10e32c,0x64(%edx) the_watchdog->id = id; 10c96b: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10c96e: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c975: 8b 45 f4 mov -0xc(%ebp),%eax 10c978: 2b 05 2c 9e 12 00 sub 0x129e2c,%eax 10c97e: 89 42 54 mov %eax,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10c981: 58 pop %eax 10c982: 59 pop %ecx 10c983: 83 c2 48 add $0x48,%edx 10c986: 52 push %edx 10c987: 68 6c 9e 12 00 push $0x129e6c 10c98c: e8 1f 2b 00 00 call 10f4b0 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10c991: e8 2e 1b 00 00 call 10e4c4 <_Thread_Enable_dispatch> 10c996: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c998: 83 c4 10 add $0x10,%esp 10c99b: e9 7b ff ff ff jmp 10c91b rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c9a0: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c9a5: 8b 5d fc mov -0x4(%ebp),%ebx 10c9a8: c9 leave 10c9a9: c3 ret 10c9aa: 66 90 xchg %ax,%ax <== NOT EXECUTED Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c9ac: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c9b1: 8b 5d fc mov -0x4(%ebp),%ebx 10c9b4: c9 leave 10c9b5: c3 ret 0010a0a0 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 10a0a0: 55 push %ebp 10a0a1: 89 e5 mov %esp,%ebp 10a0a3: 8b 45 08 mov 0x8(%ebp),%eax int baud_index; switch (termios_baud) { 10a0a6: 83 f8 09 cmp $0x9,%eax 10a0a9: 0f 84 f1 00 00 00 je 10a1a0 <== ALWAYS TAKEN 10a0af: 7e 37 jle 10a0e8 <== NEVER TAKEN 10a0b1: 83 f8 0e cmp $0xe,%eax <== NOT EXECUTED 10a0b4: 0f 84 f6 00 00 00 je 10a1b0 <== NOT EXECUTED 10a0ba: 7e 5c jle 10a118 <== NOT EXECUTED 10a0bc: 3d 02 10 00 00 cmp $0x1002,%eax <== NOT EXECUTED 10a0c1: 0f 84 01 01 00 00 je 10a1c8 <== NOT EXECUTED 10a0c7: 0f 8e 97 00 00 00 jle 10a164 <== NOT EXECUTED 10a0cd: 3d 03 10 00 00 cmp $0x1003,%eax <== NOT EXECUTED 10a0d2: 0f 84 e0 00 00 00 je 10a1b8 <== NOT EXECUTED 10a0d8: 3d 04 10 00 00 cmp $0x1004,%eax <== NOT EXECUTED 10a0dd: 75 51 jne 10a130 <== 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; 10a0df: b8 13 00 00 00 mov $0x13,%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 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a0e8: 83 f8 04 cmp $0x4,%eax 10a0eb: 0f 84 b7 00 00 00 je 10a1a8 <== ALWAYS TAKEN 10a0f1: 7f 45 jg 10a138 <== ALWAYS TAKEN 10a0f3: 83 f8 01 cmp $0x1,%eax 10a0f6: 0f 84 8c 00 00 00 je 10a188 <== ALWAYS TAKEN 10a0fc: 0f 8e de 00 00 00 jle 10a1e0 <== NEVER TAKEN 10a102: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10a105: 0f 84 c5 00 00 00 je 10a1d0 <== NOT EXECUTED 10a10b: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED 10a10e: 75 20 jne 10a130 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 10a110: b8 03 00 00 00 mov $0x3,%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 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a118: 83 f8 0b cmp $0xb,%eax <== NOT EXECUTED 10a11b: 0f 84 9f 00 00 00 je 10a1c0 <== NOT EXECUTED 10a121: 7c 39 jl 10a15c <== NOT EXECUTED 10a123: 83 f8 0c cmp $0xc,%eax <== NOT EXECUTED 10a126: 74 50 je 10a178 <== NOT EXECUTED 10a128: 83 f8 0d cmp $0xd,%eax <== NOT EXECUTED 10a12b: 74 62 je 10a18f <== NOT EXECUTED 10a12d: 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; 10a130: b8 ff ff ff ff mov $0xffffffff,%eax default: baud_index = -1; break; } return baud_index; } 10a135: c9 leave 10a136: c3 ret 10a137: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a138: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10a13b: 74 43 je 10a180 <== NOT EXECUTED 10a13d: 7c 15 jl 10a154 <== NOT EXECUTED 10a13f: 83 f8 07 cmp $0x7,%eax <== NOT EXECUTED 10a142: 0f 84 90 00 00 00 je 10a1d8 <== NOT EXECUTED 10a148: 83 f8 08 cmp $0x8,%eax <== NOT EXECUTED 10a14b: 75 e3 jne 10a130 <== 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; 10a14d: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a152: c9 leave <== NOT EXECUTED 10a153: 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; 10a154: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a159: c9 leave <== NOT EXECUTED 10a15a: c3 ret <== NOT EXECUTED 10a15b: 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; 10a15c: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a161: c9 leave <== NOT EXECUTED 10a162: c3 ret <== NOT EXECUTED 10a163: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a164: 83 f8 0f cmp $0xf,%eax <== NOT EXECUTED 10a167: 74 2f je 10a198 <== NOT EXECUTED 10a169: 3d 01 10 00 00 cmp $0x1001,%eax <== NOT EXECUTED 10a16e: 75 c0 jne 10a130 <== 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; 10a170: b8 10 00 00 00 mov $0x10,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a175: c9 leave <== NOT EXECUTED 10a176: c3 ret <== NOT EXECUTED 10a177: 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; 10a178: b8 0c 00 00 00 mov $0xc,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a17d: c9 leave <== NOT EXECUTED 10a17e: c3 ret <== NOT EXECUTED 10a17f: 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; 10a180: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a185: c9 leave <== NOT EXECUTED 10a186: c3 ret <== NOT EXECUTED 10a187: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a188: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a18d: c9 leave <== NOT EXECUTED 10a18e: 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; 10a18f: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a194: c9 leave <== NOT EXECUTED 10a195: c3 ret <== NOT EXECUTED 10a196: 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; 10a198: b8 0f 00 00 00 mov $0xf,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a19d: c9 leave <== NOT EXECUTED 10a19e: c3 ret <== NOT EXECUTED 10a19f: 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; 10a1a0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a1a5: c9 leave <== NOT EXECUTED 10a1a6: c3 ret <== NOT EXECUTED 10a1a7: 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; 10a1a8: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a1ad: c9 leave <== NOT EXECUTED 10a1ae: c3 ret <== NOT EXECUTED 10a1af: 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; 10a1b0: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a1b5: c9 leave <== NOT EXECUTED 10a1b6: c3 ret <== NOT EXECUTED 10a1b7: 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; 10a1b8: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a1bd: c9 leave <== NOT EXECUTED 10a1be: c3 ret <== NOT EXECUTED 10a1bf: 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; 10a1c0: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a1c5: c9 leave <== NOT EXECUTED 10a1c6: c3 ret <== NOT EXECUTED 10a1c7: 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; 10a1c8: b8 11 00 00 00 mov $0x11,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a1cd: c9 leave <== NOT EXECUTED 10a1ce: c3 ret <== NOT EXECUTED 10a1cf: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a1d0: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a1d5: c9 leave <== NOT EXECUTED 10a1d6: c3 ret <== NOT EXECUTED 10a1d7: 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; 10a1d8: b8 07 00 00 00 mov $0x7,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a1dd: c9 leave <== NOT EXECUTED 10a1de: c3 ret <== NOT EXECUTED 10a1df: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a1e0: 85 c0 test %eax,%eax 10a1e2: 0f 85 48 ff ff ff jne 10a130 <== NEVER TAKEN 10a1e8: 31 c0 xor %eax,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a1ea: c9 leave <== NOT EXECUTED 10a1eb: c3 ret <== NOT EXECUTED 00108dbc : #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 108dbc: 55 push %ebp 108dbd: 89 e5 mov %esp,%ebp 108dbf: 8b 45 08 mov 0x8(%ebp),%eax int32_t baud; switch (termios_baud) { 108dc2: 83 f8 09 cmp $0x9,%eax 108dc5: 0f 84 f1 00 00 00 je 108ebc 108dcb: 7e 37 jle 108e04 108dcd: 83 f8 0e cmp $0xe,%eax 108dd0: 0f 84 f6 00 00 00 je 108ecc 108dd6: 7e 5c jle 108e34 108dd8: 3d 02 10 00 00 cmp $0x1002,%eax 108ddd: 0f 84 01 01 00 00 je 108ee4 108de3: 0f 8e 97 00 00 00 jle 108e80 108de9: 3d 03 10 00 00 cmp $0x1003,%eax 108dee: 0f 84 e0 00 00 00 je 108ed4 108df4: 3d 04 10 00 00 cmp $0x1004,%eax 108df9: 75 51 jne 108e4c <== 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; 108dfb: b8 00 08 07 00 mov $0x70800,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e00: c9 leave 108e01: c3 ret 108e02: 66 90 xchg %ax,%ax <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108e04: 83 f8 04 cmp $0x4,%eax 108e07: 0f 84 b7 00 00 00 je 108ec4 108e0d: 7f 45 jg 108e54 108e0f: 83 f8 01 cmp $0x1,%eax 108e12: 0f 84 8c 00 00 00 je 108ea4 108e18: 0f 8e de 00 00 00 jle 108efc 108e1e: 83 f8 02 cmp $0x2,%eax 108e21: 0f 84 c5 00 00 00 je 108eec 108e27: 83 f8 03 cmp $0x3,%eax 108e2a: 75 20 jne 108e4c <== ALWAYS TAKEN case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 108e2c: b8 6e 00 00 00 mov $0x6e,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e31: c9 leave 108e32: c3 ret 108e33: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108e34: 83 f8 0b cmp $0xb,%eax 108e37: 0f 84 9f 00 00 00 je 108edc 108e3d: 7c 39 jl 108e78 108e3f: 83 f8 0c cmp $0xc,%eax 108e42: 74 50 je 108e94 108e44: 83 f8 0d cmp $0xd,%eax 108e47: 74 62 je 108eab <== NEVER TAKEN 108e49: 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; 108e4c: b8 ff ff ff ff mov $0xffffffff,%eax default: baud = -1; break; } return baud; } 108e51: c9 leave 108e52: c3 ret 108e53: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108e54: 83 f8 06 cmp $0x6,%eax 108e57: 74 43 je 108e9c 108e59: 7c 15 jl 108e70 108e5b: 83 f8 07 cmp $0x7,%eax 108e5e: 0f 84 90 00 00 00 je 108ef4 108e64: 83 f8 08 cmp $0x8,%eax 108e67: 75 e3 jne 108e4c <== 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; 108e69: b8 58 02 00 00 mov $0x258,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e6e: c9 leave 108e6f: 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; 108e70: b8 96 00 00 00 mov $0x96,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e75: c9 leave 108e76: c3 ret 108e77: 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; 108e78: b8 08 07 00 00 mov $0x708,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e7d: c9 leave 108e7e: c3 ret 108e7f: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108e80: 83 f8 0f cmp $0xf,%eax 108e83: 74 2f je 108eb4 108e85: 3d 01 10 00 00 cmp $0x1001,%eax 108e8a: 75 c0 jne 108e4c <== 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; 108e8c: b8 00 e1 00 00 mov $0xe100,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e91: c9 leave 108e92: c3 ret 108e93: 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; 108e94: b8 c0 12 00 00 mov $0x12c0,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e99: c9 leave 108e9a: c3 ret 108e9b: 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; 108e9c: b8 c8 00 00 00 mov $0xc8,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ea1: c9 leave 108ea2: c3 ret 108ea3: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108ea4: b8 32 00 00 00 mov $0x32,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ea9: c9 leave 108eaa: 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; 108eab: b8 80 25 00 00 mov $0x2580,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108eb0: c9 leave 108eb1: c3 ret 108eb2: 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; 108eb4: b8 00 96 00 00 mov $0x9600,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108eb9: c9 leave 108eba: c3 ret 108ebb: 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; 108ebc: b8 b0 04 00 00 mov $0x4b0,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ec1: c9 leave 108ec2: c3 ret 108ec3: 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; 108ec4: b8 86 00 00 00 mov $0x86,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ec9: c9 leave 108eca: c3 ret 108ecb: 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; 108ecc: b8 00 4b 00 00 mov $0x4b00,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ed1: c9 leave 108ed2: c3 ret 108ed3: 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; 108ed4: b8 00 84 03 00 mov $0x38400,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ed9: c9 leave 108eda: c3 ret 108edb: 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; 108edc: b8 60 09 00 00 mov $0x960,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ee1: c9 leave 108ee2: c3 ret 108ee3: 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; 108ee4: b8 00 c2 01 00 mov $0x1c200,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ee9: c9 leave 108eea: c3 ret 108eeb: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108eec: b8 4b 00 00 00 mov $0x4b,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ef1: c9 leave 108ef2: c3 ret 108ef3: 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; 108ef4: b8 2c 01 00 00 mov $0x12c,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ef9: c9 leave 108efa: c3 ret 108efb: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108efc: 85 c0 test %eax,%eax 108efe: 0f 85 48 ff ff ff jne 108e4c 108f04: 31 c0 xor %eax,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108f06: c9 leave 108f07: c3 ret 00108f44 : rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 108f44: 55 push %ebp <== NOT EXECUTED 108f45: 89 e5 mov %esp,%ebp <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 108f47: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 108f4a: a3 08 50 12 00 mov %eax,0x125008 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 108f4f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 108f52: a3 0c 50 12 00 mov %eax,0x12500c <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 108f57: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 108f5a: a3 10 50 12 00 mov %eax,0x125010 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 108f5f: 31 c0 xor %eax,%eax <== NOT EXECUTED 108f61: c9 leave <== NOT EXECUTED 108f62: c3 ret <== NOT EXECUTED 0010a3f0 : } } rtems_status_code rtems_termios_close (void *arg) { 10a3f0: 55 push %ebp 10a3f1: 89 e5 mov %esp,%ebp 10a3f3: 56 push %esi 10a3f4: 53 push %ebx 10a3f5: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a3f8: 8b 06 mov (%esi),%eax 10a3fa: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a3fd: 50 push %eax 10a3fe: 6a 00 push $0x0 10a400: 6a 00 push $0x0 10a402: ff 35 b8 72 12 00 pushl 0x1272b8 10a408: e8 f3 11 00 00 call 10b600 if (sc != RTEMS_SUCCESSFUL) 10a40d: 83 c4 10 add $0x10,%esp 10a410: 85 c0 test %eax,%eax 10a412: 0f 85 92 01 00 00 jne 10a5aa <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 10a418: 8b 43 08 mov 0x8(%ebx),%eax 10a41b: 48 dec %eax 10a41c: 89 43 08 mov %eax,0x8(%ebx) 10a41f: 85 c0 test %eax,%eax 10a421: 0f 85 bf 00 00 00 jne 10a4e6 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 10a427: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a42d: c1 e0 05 shl $0x5,%eax 10a430: 8b 80 24 6f 12 00 mov 0x126f24(%eax),%eax 10a436: 85 c0 test %eax,%eax 10a438: 0f 84 12 01 00 00 je 10a550 <== NEVER TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 10a43e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a441: 53 push %ebx <== NOT EXECUTED 10a442: ff d0 call *%eax <== NOT EXECUTED 10a444: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 10a447: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) <== NOT EXECUTED 10a44e: 0f 84 24 01 00 00 je 10a578 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 10a454: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 10a45a: 85 c0 test %eax,%eax 10a45c: 74 0d je 10a46b (*tty->device.lastClose)(tty->major, tty->minor, arg); 10a45e: 52 push %edx 10a45f: 56 push %esi 10a460: ff 73 10 pushl 0x10(%ebx) 10a463: ff 73 0c pushl 0xc(%ebx) 10a466: ff d0 call *%eax 10a468: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 10a46b: 8b 03 mov (%ebx),%eax 10a46d: 85 c0 test %eax,%eax 10a46f: 0f 84 9b 00 00 00 je 10a510 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 10a475: 8b 53 04 mov 0x4(%ebx),%edx 10a478: 89 50 04 mov %edx,0x4(%eax) } if (tty->back == NULL) { 10a47b: 8b 53 04 mov 0x4(%ebx),%edx 10a47e: 85 d2 test %edx,%edx 10a480: 0f 84 ae 00 00 00 je 10a534 <== NEVER TAKEN if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 10a486: 89 02 mov %eax,(%edx) <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 10a488: 83 ec 0c sub $0xc,%esp 10a48b: ff 73 14 pushl 0x14(%ebx) 10a48e: e8 c9 10 00 00 call 10b55c rtems_semaphore_delete (tty->osem); 10a493: 58 pop %eax 10a494: ff 73 18 pushl 0x18(%ebx) 10a497: e8 c0 10 00 00 call 10b55c rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 10a49c: 5e pop %esi 10a49d: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10a4a3: e8 b4 10 00 00 call 10b55c if ((tty->device.pollRead == NULL) || 10a4a8: 83 c4 10 add $0x10,%esp 10a4ab: 8b 8b a0 00 00 00 mov 0xa0(%ebx),%ecx 10a4b1: 85 c9 test %ecx,%ecx 10a4b3: 74 4b je 10a500 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 10a4b5: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10a4bc: 74 42 je 10a500 <== ALWAYS TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 10a4be: 83 ec 0c sub $0xc,%esp 10a4c1: ff 73 58 pushl 0x58(%ebx) 10a4c4: e8 b3 db ff ff call 10807c free (tty->rawOutBuf.theBuf); 10a4c9: 5a pop %edx 10a4ca: ff 73 7c pushl 0x7c(%ebx) 10a4cd: e8 aa db ff ff call 10807c free (tty->cbuf); 10a4d2: 58 pop %eax 10a4d3: ff 73 1c pushl 0x1c(%ebx) 10a4d6: e8 a1 db ff ff call 10807c free (tty); 10a4db: 89 1c 24 mov %ebx,(%esp) 10a4de: e8 99 db ff ff call 10807c 10a4e3: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 10a4e6: 83 ec 0c sub $0xc,%esp 10a4e9: ff 35 b8 72 12 00 pushl 0x1272b8 10a4ef: e8 08 12 00 00 call 10b6fc return RTEMS_SUCCESSFUL; } 10a4f4: 31 c0 xor %eax,%eax 10a4f6: 8d 65 f8 lea -0x8(%ebp),%esp 10a4f9: 5b pop %ebx 10a4fa: 5e pop %esi 10a4fb: c9 leave 10a4fc: c3 ret 10a4fd: 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); 10a500: 83 ec 0c sub $0xc,%esp 10a503: ff 73 68 pushl 0x68(%ebx) 10a506: e8 51 10 00 00 call 10b55c 10a50b: 83 c4 10 add $0x10,%esp 10a50e: eb ae jmp 10a4be 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; 10a510: 8b 43 04 mov 0x4(%ebx),%eax 10a513: a3 bc 72 12 00 mov %eax,0x1272bc if ( rtems_termios_ttyTail != NULL ) { 10a518: 85 c0 test %eax,%eax 10a51a: 0f 84 94 00 00 00 je 10a5b4 <== NEVER TAKEN rtems_termios_ttyTail->forw = NULL; 10a520: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 10a526: 8b 03 mov (%ebx),%eax <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 10a528: 8b 53 04 mov 0x4(%ebx),%edx <== NOT EXECUTED 10a52b: 85 d2 test %edx,%edx <== NOT EXECUTED 10a52d: 0f 85 53 ff ff ff jne 10a486 <== NOT EXECUTED 10a533: 90 nop <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 10a534: a3 c0 72 12 00 mov %eax,0x1272c0 if ( rtems_termios_ttyHead != NULL ) { 10a539: 85 c0 test %eax,%eax 10a53b: 0f 84 47 ff ff ff je 10a488 <== ALWAYS TAKEN rtems_termios_ttyHead->back = NULL; 10a541: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10a548: e9 3b ff ff ff jmp 10a488 10a54d: 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); 10a550: 51 push %ecx 10a551: 6a 00 push $0x0 10a553: 6a 00 push $0x0 10a555: ff 73 18 pushl 0x18(%ebx) 10a558: e8 a3 10 00 00 call 10b600 if (sc != RTEMS_SUCCESSFUL) { 10a55d: 83 c4 10 add $0x10,%esp 10a560: 85 c0 test %eax,%eax 10a562: 75 46 jne 10a5aa <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 10a564: 89 d8 mov %ebx,%eax 10a566: e8 c1 f6 ff ff call 109c2c } if (tty->device.outputUsesInterrupts 10a56b: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10a572: 0f 85 dc fe ff ff jne 10a454 <== NEVER TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 10a578: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a57b: 6a 01 push $0x1 <== NOT EXECUTED 10a57d: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 10a583: e8 68 0b 00 00 call 10b0f0 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 10a588: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a58b: 85 c0 test %eax,%eax <== NOT EXECUTED 10a58d: 75 1b jne 10a5aa <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 10a58f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a592: 6a 01 push $0x1 <== NOT EXECUTED 10a594: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 10a59a: e8 51 0b 00 00 call 10b0f0 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 10a59f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a5a2: 85 c0 test %eax,%eax <== NOT EXECUTED 10a5a4: 0f 84 aa fe ff ff je 10a454 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10a5aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a5ad: 50 push %eax <== NOT EXECUTED 10a5ae: e8 89 16 00 00 call 10bc3c <== NOT EXECUTED 10a5b3: 90 nop <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 10a5b4: c7 05 c0 72 12 00 00 movl $0x0,0x1272c0 10a5bb: 00 00 00 10a5be: e9 c5 fe ff ff jmp 10a488 001091b8 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 1091b8: 55 push %ebp 1091b9: 89 e5 mov %esp,%ebp 1091bb: 83 ec 08 sub $0x8,%esp 1091be: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 1091c1: 8b 55 0c mov 0xc(%ebp),%edx 1091c4: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1091ca: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 1091d1: 74 2d je 109200 <== 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 ) { 1091d3: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 1091da: 74 0c je 1091e8 <== 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); 1091dc: 89 45 08 mov %eax,0x8(%ebp) } } 1091df: 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); 1091e0: e9 9b fd ff ff jmp 108f80 1091e5: 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) { 1091e8: 8b 15 d4 6f 12 00 mov 0x126fd4,%edx <== NOT EXECUTED 1091ee: 85 d2 test %edx,%edx <== NOT EXECUTED 1091f0: 74 09 je 1091fb <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 1091f2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1091f5: 50 push %eax <== NOT EXECUTED 1091f6: ff d2 call *%edx <== NOT EXECUTED 1091f8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 1091fb: 31 c0 xor %eax,%eax <== NOT EXECUTED 1091fd: c9 leave <== NOT EXECUTED 1091fe: c3 ret <== NOT EXECUTED 1091ff: 90 nop <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 109200: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109203: 6a 02 push $0x2 <== NOT EXECUTED 109205: ff b0 c8 00 00 00 pushl 0xc8(%eax) <== NOT EXECUTED 10920b: e8 e0 1e 00 00 call 10b0f0 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 109210: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109213: 85 c0 test %eax,%eax <== NOT EXECUTED 109215: 74 e4 je 1091fb <== NOT EXECUTED rtems_fatal_error_occurred (sc); 109217: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10921a: 50 push %eax <== NOT EXECUTED 10921b: e8 1c 2a 00 00 call 10bc3c <== NOT EXECUTED 00109220 : * 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) { 109220: 55 push %ebp <== NOT EXECUTED 109221: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109223: 57 push %edi <== NOT EXECUTED 109224: 56 push %esi <== NOT EXECUTED 109225: 53 push %ebx <== NOT EXECUTED 109226: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 109229: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10922c: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 10922f: 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) { 109232: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 109238: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10923b: 8b 80 30 6f 12 00 mov 0x126f30(%eax),%eax <== NOT EXECUTED 109241: 85 c0 test %eax,%eax <== NOT EXECUTED 109243: 0f 84 8b 00 00 00 je 1092d4 <== NOT EXECUTED while (len--) { 109249: 85 ff test %edi,%edi <== NOT EXECUTED 10924b: 74 2e je 10927b <== NOT EXECUTED 10924d: 31 d2 xor %edx,%edx <== NOT EXECUTED 10924f: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 109252: 89 f7 mov %esi,%edi <== NOT EXECUTED 109254: 89 d6 mov %edx,%esi <== NOT EXECUTED 109256: eb 0f jmp 109267 <== NOT EXECUTED 109258: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 10925e: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 109261: 8b 80 30 6f 12 00 mov 0x126f30(%eax),%eax <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 109267: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10926a: 53 push %ebx <== NOT EXECUTED 10926b: 0f be 14 37 movsbl (%edi,%esi,1),%edx <== NOT EXECUTED 10926f: 52 push %edx <== NOT EXECUTED 109270: ff d0 call *%eax <== NOT EXECUTED 109272: 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--) { 109273: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109276: 39 75 e4 cmp %esi,-0x1c(%ebp) <== NOT EXECUTED 109279: 75 dd jne 109258 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 10927b: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx <== NOT EXECUTED 109281: 85 d2 test %edx,%edx <== NOT EXECUTED 109283: 75 3b jne 1092c0 <== NOT EXECUTED 109285: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 10928b: 85 c0 test %eax,%eax <== NOT EXECUTED 10928d: 74 31 je 1092c0 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10928f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109292: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 109298: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 10929b: 52 push %edx <== NOT EXECUTED 10929c: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 10929e: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 1092a5: 00 00 00 1092a8: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED 1092af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 1092b2: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1092b5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1092b8: 5b pop %ebx <== NOT EXECUTED 1092b9: 5e pop %esi <== NOT EXECUTED 1092ba: 5f pop %edi <== NOT EXECUTED 1092bb: c9 leave <== NOT EXECUTED 1092bc: c3 ret <== NOT EXECUTED 1092bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 1092c0: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED } 1092c7: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1092ca: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1092cd: 5b pop %ebx <== NOT EXECUTED 1092ce: 5e pop %esi <== NOT EXECUTED 1092cf: 5f pop %edi <== NOT EXECUTED 1092d0: c9 leave <== NOT EXECUTED 1092d1: c3 ret <== NOT EXECUTED 1092d2: 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, 1092d4: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 1092d7: 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); 1092da: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 1092dd: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 1092e0: c6 45 db 00 movb $0x0,-0x25(%ebp) <== NOT EXECUTED 1092e4: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 1092eb: 85 ff test %edi,%edi <== NOT EXECUTED 1092ed: 0f 84 0b 01 00 00 je 1093fe <== NOT EXECUTED 1092f3: 90 nop <== NOT EXECUTED c = *buf++; 1092f4: 8a 06 mov (%esi),%al <== NOT EXECUTED 1092f6: 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) { 1092f9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1092ff: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 109302: 74 1c je 109320 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 109304: 0f be 45 e4 movsbl -0x1c(%ebp),%eax <== NOT EXECUTED 109308: 0f b6 53 4a movzbl 0x4a(%ebx),%edx <== NOT EXECUTED 10930c: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10930e: 0f 84 0c 01 00 00 je 109420 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 109314: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 109318: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10931a: 0f 84 54 01 00 00 je 109474 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 109320: 80 7d db 00 cmpb $0x0,-0x25(%ebp) <== NOT EXECUTED 109324: 0f 85 11 01 00 00 jne 10943b <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 10932a: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10932d: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 109330: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 109333: 40 inc %eax <== NOT EXECUTED 109334: 31 d2 xor %edx,%edx <== NOT EXECUTED 109336: f7 75 dc divl -0x24(%ebp) <== NOT EXECUTED 109339: 89 d1 mov %edx,%ecx <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 10933b: 9c pushf <== NOT EXECUTED 10933c: fa cli <== NOT EXECUTED 10933d: 8f 45 d4 popl -0x2c(%ebp) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 109340: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 109343: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED 109346: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 109349: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 10934c: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 10934f: 2b 45 c4 sub -0x3c(%ebp),%eax <== NOT EXECUTED 109352: 01 c8 add %ecx,%eax <== NOT EXECUTED 109354: 31 d2 xor %edx,%edx <== NOT EXECUTED 109356: f7 75 dc divl -0x24(%ebp) <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 109359: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx <== NOT EXECUTED 10935f: 76 47 jbe 1093a8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 109361: 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) 109367: a8 01 test $0x1,%al <== NOT EXECUTED 109369: 75 3d jne 1093a8 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 10936b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109371: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 109374: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 10937a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109380: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 109385: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 10938a: 0f 84 27 01 00 00 je 1094b7 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 109390: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109396: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 10939b: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 1093a0: 0f 84 55 01 00 00 je 1094fb <== NOT EXECUTED 1093a6: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 1093a8: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 1093ab: 9d popf <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 1093ac: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1093af: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 1093b1: 0f 84 b5 00 00 00 je 10946c <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 1093b7: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 1093ba: 8a 55 e4 mov -0x1c(%ebp),%dl <== NOT EXECUTED 1093bd: 88 14 08 mov %dl,(%eax,%ecx,1) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 1093c0: 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 )) { 1093c3: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax <== NOT EXECUTED 1093c9: 85 c0 test %eax,%eax <== NOT EXECUTED 1093cb: 75 27 jne 1093f4 <== NOT EXECUTED 1093cd: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 1093d3: 85 c0 test %eax,%eax <== NOT EXECUTED 1093d5: 74 1d je 1093f4 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1093d7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1093da: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 1093e0: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 1093e3: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 1093e5: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 1093ec: 00 00 00 1093ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1093f2: 66 90 xchg %ax,%ax <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 1093f4: 46 inc %esi <== NOT EXECUTED 1093f5: 4f dec %edi <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 1093f6: 85 ff test %edi,%edi <== NOT EXECUTED 1093f8: 0f 85 f6 fe ff ff jne 1092f4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 1093fe: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109401: 01 43 78 add %eax,0x78(%ebx) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 109404: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109407: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 10940a: e8 ed 22 00 00 call 10b6fc <== NOT EXECUTED return dropped; 10940f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109412: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109415: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109418: 5b pop %ebx <== NOT EXECUTED 109419: 5e pop %esi <== NOT EXECUTED 10941a: 5f pop %edi <== NOT EXECUTED 10941b: c9 leave <== NOT EXECUTED 10941c: c3 ret <== NOT EXECUTED 10941d: 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]) { 109420: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 109424: 39 d0 cmp %edx,%eax <== NOT EXECUTED 109426: 74 7e je 1094a6 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 109428: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10942e: 83 c8 10 or $0x10,%eax <== NOT EXECUTED 109431: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 109437: 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) { 10943b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109441: 83 e0 30 and $0x30,%eax <== NOT EXECUTED 109444: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED 109447: 75 ab jne 1093f4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 109449: 9c pushf <== NOT EXECUTED 10944a: fa cli <== NOT EXECUTED 10944b: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10944c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109452: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 109455: 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) { 10945b: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 109461: 85 c0 test %eax,%eax <== NOT EXECUTED 109463: 75 20 jne 109485 <== 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); 109465: 52 push %edx <== NOT EXECUTED 109466: 9d popf <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 109467: 46 inc %esi <== NOT EXECUTED 109468: 4f dec %edi <== NOT EXECUTED 109469: eb 8b jmp 1093f6 <== NOT EXECUTED 10946b: 90 nop <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 10946c: ff 45 e0 incl -0x20(%ebp) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 10946f: 46 inc %esi <== NOT EXECUTED 109470: 4f dec %edi <== NOT EXECUTED 109471: eb 83 jmp 1093f6 <== NOT EXECUTED 109473: 90 nop <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 109474: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10947a: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 10947d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 109483: eb b2 jmp 109437 <== 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); 109485: 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, 10948b: 51 push %ecx <== NOT EXECUTED 10948c: 6a 01 push $0x1 <== NOT EXECUTED 10948e: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 109491: 50 push %eax <== NOT EXECUTED 109492: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109495: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 109498: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10949e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1094a1: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 1094a4: eb bf jmp 109465 <== 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; 1094a6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094ac: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 1094af: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 1094b5: eb 80 jmp 109437 <== 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) || 1094b7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094bd: a8 20 test $0x20,%al <== NOT EXECUTED 1094bf: 75 0e jne 1094cf <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 1094c1: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 1094c7: 85 c0 test %eax,%eax <== NOT EXECUTED 1094c9: 0f 85 d9 fe ff ff jne 1093a8 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 1094cf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094d5: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 1094d8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 1094de: 52 push %edx <== NOT EXECUTED 1094df: 6a 01 push $0x1 <== NOT EXECUTED 1094e1: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 1094e4: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1094e7: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 1094ea: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 1094f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1094f3: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 1094f6: e9 ad fe ff ff jmp 1093a8 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 1094fb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109501: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 109504: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 10950a: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 109510: 85 c0 test %eax,%eax <== NOT EXECUTED 109512: 0f 84 90 fe ff ff je 1093a8 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 109518: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10951b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10951e: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 109521: ff d0 call *%eax <== NOT EXECUTED 109523: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109526: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 109529: e9 7a fe ff ff jmp 1093a8 <== NOT EXECUTED 00108f08 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 108f08: 55 push %ebp 108f09: 89 e5 mov %esp,%ebp 108f0b: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 108f0e: a1 b8 72 12 00 mov 0x1272b8,%eax 108f13: 85 c0 test %eax,%eax 108f15: 74 05 je 108f1c RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 108f17: c9 leave 108f18: c3 ret 108f19: 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 ( 108f1c: 83 ec 0c sub $0xc,%esp 108f1f: 68 b8 72 12 00 push $0x1272b8 108f24: 6a 00 push $0x0 108f26: 6a 54 push $0x54 108f28: 6a 01 push $0x1 108f2a: 68 69 6d 52 54 push $0x54526d69 108f2f: e8 54 24 00 00 call 10b388 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) 108f34: 83 c4 20 add $0x20,%esp 108f37: 85 c0 test %eax,%eax 108f39: 74 dc je 108f17 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 108f3b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108f3e: 50 push %eax <== NOT EXECUTED 108f3f: e8 f8 2c 00 00 call 10bc3c <== NOT EXECUTED 00109fd8 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 109fd8: 55 push %ebp 109fd9: 89 e5 mov %esp,%ebp 109fdb: 57 push %edi 109fdc: 56 push %esi 109fdd: 53 push %ebx 109fde: 83 ec 20 sub $0x20,%esp 109fe1: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109fe4: 8b 03 mov (%ebx),%eax 109fe6: 8b 40 34 mov 0x34(%eax),%eax 109fe9: 89 45 e4 mov %eax,-0x1c(%ebp) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 109fec: 8b 73 08 mov 0x8(%ebx),%esi rtems_status_code sc; args->ioctl_return = 0; 109fef: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109ff6: 6a 00 push $0x0 109ff8: 6a 00 push $0x0 109ffa: ff 70 18 pushl 0x18(%eax) 109ffd: e8 fe 15 00 00 call 10b600 10a002: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) { 10a005: 83 c4 10 add $0x10,%esp 10a008: 85 c0 test %eax,%eax 10a00a: 75 24 jne 10a030 <== ALWAYS TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 10a00c: 8b 43 04 mov 0x4(%ebx),%eax 10a00f: 83 f8 04 cmp $0x4,%eax 10a012: 74 74 je 10a088 <== ALWAYS TAKEN 10a014: 77 2a ja 10a040 <== ALWAYS TAKEN 10a016: 83 f8 02 cmp $0x2,%eax 10a019: 0f 84 a1 00 00 00 je 10a0c0 10a01f: 0f 86 3b 02 00 00 jbe 10a260 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 10a025: 8b 45 e4 mov -0x1c(%ebp),%eax 10a028: e8 ff fb ff ff call 109c2c break; 10a02d: eb 6d jmp 10a09c 10a02f: 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; 10a030: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; return sc; } 10a033: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a036: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a039: 5b pop %ebx <== NOT EXECUTED 10a03a: 5e pop %esi <== NOT EXECUTED 10a03b: 5f pop %edi <== NOT EXECUTED 10a03c: c9 leave <== NOT EXECUTED 10a03d: c3 ret <== NOT EXECUTED 10a03e: 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) { 10a040: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED 10a045: 0f 84 ed 01 00 00 je 10a238 <== NOT EXECUTED 10a04b: 0f 87 2f 02 00 00 ja 10a280 <== NOT EXECUTED 10a051: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED 10a054: 0f 84 aa 02 00 00 je 10a304 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 10a05a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a05d: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax <== NOT EXECUTED 10a063: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a066: 8b 80 38 6f 12 00 mov 0x126f38(%eax),%eax <== NOT EXECUTED 10a06c: 85 c0 test %eax,%eax <== NOT EXECUTED 10a06e: 0f 84 ac 02 00 00 je 10a320 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 10a074: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a077: 53 push %ebx <== NOT EXECUTED 10a078: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10a07b: ff d0 call *%eax <== NOT EXECUTED 10a07d: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a080: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a083: eb 17 jmp 10a09c <== NOT EXECUTED 10a085: 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; 10a088: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10a08a: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10a08d: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a090: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx) <== NOT EXECUTED 10a096: 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); 10a09c: 83 ec 0c sub $0xc,%esp 10a09f: 8b 45 e4 mov -0x1c(%ebp),%eax 10a0a2: ff 70 18 pushl 0x18(%eax) 10a0a5: e8 52 16 00 00 call 10b6fc args->ioctl_return = sc; 10a0aa: 8b 55 e0 mov -0x20(%ebp),%edx 10a0ad: 89 53 0c mov %edx,0xc(%ebx) return sc; 10a0b0: 83 c4 10 add $0x10,%esp } 10a0b3: 8b 45 e0 mov -0x20(%ebp),%eax 10a0b6: 8d 65 f4 lea -0xc(%ebp),%esp 10a0b9: 5b pop %ebx 10a0ba: 5e pop %esi 10a0bb: 5f pop %edi 10a0bc: c9 leave 10a0bd: c3 ret 10a0be: 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; 10a0c0: 8b 73 08 mov 0x8(%ebx),%esi 10a0c3: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a0c6: 83 c1 30 add $0x30,%ecx 10a0c9: 89 4d dc mov %ecx,-0x24(%ebp) 10a0cc: b9 09 00 00 00 mov $0x9,%ecx 10a0d1: 8b 7d dc mov -0x24(%ebp),%edi 10a0d4: 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) && 10a0d6: 8b 55 e4 mov -0x1c(%ebp),%edx 10a0d9: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a0df: f6 c4 02 test $0x2,%ah 10a0e2: 74 44 je 10a128 10a0e4: f6 42 31 04 testb $0x4,0x31(%edx) 10a0e8: 75 3e jne 10a128 <== NEVER TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 10a0ea: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a0f0: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 10a0f5: 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) { 10a0fb: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a101: a8 20 test $0x20,%al <== NOT EXECUTED 10a103: 74 23 je 10a128 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 10a105: 9c pushf <== NOT EXECUTED 10a106: fa cli <== NOT EXECUTED 10a107: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10a108: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a10e: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 10a111: 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) { 10a117: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED 10a11d: 85 ff test %edi,%edi <== NOT EXECUTED 10a11f: 0f 85 ab 02 00 00 jne 10a3d0 <== 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); 10a125: 56 push %esi <== NOT EXECUTED 10a126: 9d popf <== NOT EXECUTED 10a127: 90 nop <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 10a128: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a12b: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax 10a131: f6 c4 04 test $0x4,%ah 10a134: 74 24 je 10a15a <== NEVER TAKEN 10a136: f6 41 31 10 testb $0x10,0x31(%ecx) <== NOT EXECUTED 10a13a: 75 1e jne 10a15a <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 10a13c: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a142: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 10a145: 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); 10a14b: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a151: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10a154: 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) && 10a15a: 8b 55 e4 mov -0x1c(%ebp),%edx 10a15d: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a163: f6 c4 01 test $0x1,%ah 10a166: 74 4b je 10a1b3 <== NEVER TAKEN 10a168: 8b 7a 38 mov 0x38(%edx),%edi <== NOT EXECUTED 10a16b: 85 ff test %edi,%edi <== NOT EXECUTED 10a16d: 0f 88 09 02 00 00 js 10a37c <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 10a173: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a179: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED 10a17c: 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) && 10a182: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a188: a8 04 test $0x4,%al <== NOT EXECUTED 10a18a: 74 15 je 10a1a1 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 10a18c: 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) && 10a192: 85 c0 test %eax,%eax <== NOT EXECUTED 10a194: 74 0b je 10a1a1 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 10a196: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a199: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 10a19c: ff d0 call *%eax <== NOT EXECUTED 10a19e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 10a1a1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a1a4: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a1aa: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10a1ad: 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) { 10a1b3: 8b 45 e4 mov -0x1c(%ebp),%eax 10a1b6: 8b 70 38 mov 0x38(%eax),%esi 10a1b9: 85 f6 test %esi,%esi 10a1bb: 0f 88 bb 01 00 00 js 10a37c <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 10a1c1: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a1c4: 8b 41 30 mov 0x30(%ecx),%eax 10a1c7: f6 c4 10 test $0x10,%ah 10a1ca: 74 0f je 10a1db <== NEVER TAKEN tty->flow_ctrl |= FL_MDXOF; 10a1cc: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 10a1d2: 80 ce 04 or $0x4,%dh <== NOT EXECUTED 10a1d5: 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) { 10a1db: f6 c4 04 test $0x4,%ah 10a1de: 74 12 je 10a1f2 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXON; 10a1e0: 8b 55 e4 mov -0x1c(%ebp),%edx 10a1e3: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a1e9: 80 cc 02 or $0x2,%ah 10a1ec: 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) { 10a1f2: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a1f5: f6 41 3c 02 testb $0x2,0x3c(%ecx) 10a1f9: 0f 84 2d 01 00 00 je 10a32c <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10a1ff: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 10a206: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10a20d: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 10a214: 8b 55 e4 mov -0x1c(%ebp),%edx 10a217: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax 10a21d: 85 c0 test %eax,%eax 10a21f: 0f 84 77 fe ff ff je 10a09c <== ALWAYS TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 10a225: 83 ec 08 sub $0x8,%esp 10a228: ff 75 dc pushl -0x24(%ebp) 10a22b: ff 72 10 pushl 0x10(%edx) 10a22e: ff d0 call *%eax 10a230: 83 c4 10 add $0x10,%esp 10a233: e9 64 fe ff ff jmp 10a09c *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 10a238: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a23b: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED 10a23e: 89 d1 mov %edx,%ecx <== NOT EXECUTED 10a240: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 10a243: 29 d0 sub %edx,%eax <== NOT EXECUTED 10a245: 0f 88 25 01 00 00 js 10a370 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 10a24b: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED 10a24e: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a251: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED 10a254: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED 10a257: 89 02 mov %eax,(%edx) <== NOT EXECUTED 10a259: e9 3e fe ff ff jmp 10a09c <== NOT EXECUTED 10a25e: 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) { 10a260: 48 dec %eax 10a261: 0f 85 f3 fd ff ff jne 10a05a <== ALWAYS TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 10a267: 8b 43 08 mov 0x8(%ebx),%eax 10a26a: 8b 75 e4 mov -0x1c(%ebp),%esi 10a26d: 83 c6 30 add $0x30,%esi 10a270: b9 09 00 00 00 mov $0x9,%ecx 10a275: 89 c7 mov %eax,%edi 10a277: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 10a279: e9 1e fe ff ff jmp 10a09c 10a27e: 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) { 10a280: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED 10a285: 74 69 je 10a2f0 <== NOT EXECUTED 10a287: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED 10a28c: 0f 85 c8 fd ff ff jne 10a05a <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 10a292: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a295: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax <== NOT EXECUTED 10a29b: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a29e: 8b 80 24 6f 12 00 mov 0x126f24(%eax),%eax <== NOT EXECUTED 10a2a4: 85 c0 test %eax,%eax <== NOT EXECUTED 10a2a6: 74 0c je 10a2b4 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 10a2a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a2ab: 52 push %edx <== NOT EXECUTED 10a2ac: ff d0 call *%eax <== NOT EXECUTED 10a2ae: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a2b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 10a2b4: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10a2b7: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10a2b9: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a2bc: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 10a2c2: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx) <== NOT EXECUTED 10a2c9: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 10a2cc: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a2cf: 8b 80 20 6f 12 00 mov 0x126f20(%eax),%eax <== NOT EXECUTED 10a2d5: 85 c0 test %eax,%eax <== NOT EXECUTED 10a2d7: 0f 84 bf fd ff ff je 10a09c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 10a2dd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a2e0: 51 push %ecx <== NOT EXECUTED 10a2e1: ff d0 call *%eax <== NOT EXECUTED 10a2e3: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a2e6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a2e9: e9 ae fd ff ff jmp 10a09c <== NOT EXECUTED 10a2ee: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 10a2f0: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10a2f3: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a2f6: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx <== NOT EXECUTED 10a2fc: 89 10 mov %edx,(%eax) <== NOT EXECUTED break; 10a2fe: e9 99 fd ff ff jmp 10a09c <== NOT EXECUTED 10a303: 90 nop <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 10a304: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10a306: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10a309: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a30c: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx) <== NOT EXECUTED 10a312: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) <== NOT EXECUTED break; 10a318: e9 7f fd ff ff jmp 10a09c <== NOT EXECUTED 10a31d: 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) { 10a320: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED 10a327: e9 70 fd ff ff jmp 10a09c <== 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; 10a32c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10a32f: 0f b6 70 46 movzbl 0x46(%eax),%esi <== NOT EXECUTED 10a333: e8 b8 0b 00 00 call 10aef0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 10a338: 0f af c6 imul %esi,%eax <== NOT EXECUTED 10a33b: ba cd cc cc cc mov $0xcccccccd,%edx <== NOT EXECUTED 10a340: f7 e2 mul %edx <== NOT EXECUTED 10a342: c1 ea 03 shr $0x3,%edx <== NOT EXECUTED 10a345: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a348: 89 51 54 mov %edx,0x54(%ecx) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 10a34b: 80 79 46 00 cmpb $0x0,0x46(%ecx) <== NOT EXECUTED 10a34f: 74 42 je 10a393 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10a351: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 10a358: 89 51 70 mov %edx,0x70(%ecx) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 10a35b: 80 79 47 00 cmpb $0x0,0x47(%ecx) <== NOT EXECUTED 10a35f: 74 55 je 10a3b6 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10a361: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) <== NOT EXECUTED 10a368: e9 a7 fe ff ff jmp 10a214 <== NOT EXECUTED 10a36d: 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; 10a370: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED 10a373: 01 d0 add %edx,%eax <== NOT EXECUTED 10a375: e9 d1 fe ff ff jmp 10a24b <== NOT EXECUTED 10a37a: 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; 10a37c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a37f: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a385: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 10a388: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED 10a38e: e9 2e fe ff ff jmp 10a1c1 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 10a393: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a396: 80 7a 47 00 cmpb $0x0,0x47(%edx) <== NOT EXECUTED 10a39a: 74 25 je 10a3c1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10a39c: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 10a3a3: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10a3aa: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED 10a3b1: e9 5e fe ff ff jmp 10a214 <== 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; 10a3b6: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10a3b9: 89 50 74 mov %edx,0x74(%eax) <== NOT EXECUTED 10a3bc: e9 53 fe ff ff jmp 10a214 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 10a3c1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a3c4: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx) <== NOT EXECUTED 10a3cb: e9 44 fe ff ff jmp 10a214 <== 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); 10a3d0: 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, 10a3d6: 51 push %ecx <== NOT EXECUTED 10a3d7: 6a 01 push $0x1 <== NOT EXECUTED 10a3d9: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED 10a3dc: 50 push %eax <== NOT EXECUTED 10a3dd: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 10a3e0: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED 10a3e6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a3e9: e9 37 fd ff ff jmp 10a125 <== NOT EXECUTED 0010a374 : #include int rtems_termios_number_to_baud( int32_t baud ) { 10a374: 55 push %ebp 10a375: 89 e5 mov %esp,%ebp 10a377: 8b 45 08 mov 0x8(%ebp),%eax int termios_baud; switch (baud) { 10a37a: 3d b0 04 00 00 cmp $0x4b0,%eax 10a37f: 0f 84 47 01 00 00 je 10a4cc 10a385: 7e 3d jle 10a3c4 10a387: 3d 00 4b 00 00 cmp $0x4b00,%eax 10a38c: 0f 84 4a 01 00 00 je 10a4dc 10a392: 7e 64 jle 10a3f8 10a394: 3d 00 c2 01 00 cmp $0x1c200,%eax 10a399: 0f 84 15 01 00 00 je 10a4b4 10a39f: 0f 8e af 00 00 00 jle 10a454 10a3a5: 3d 00 84 03 00 cmp $0x38400,%eax 10a3aa: 0f 84 fc 00 00 00 je 10a4ac 10a3b0: 3d 00 08 07 00 cmp $0x70800,%eax 10a3b5: 0f 85 89 00 00 00 jne 10a444 <== 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; 10a3bb: b8 04 10 00 00 mov $0x1004,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3c0: c9 leave 10a3c1: c3 ret 10a3c2: 66 90 xchg %ax,%ax <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a3c4: 3d 86 00 00 00 cmp $0x86,%eax 10a3c9: 0f 84 05 01 00 00 je 10a4d4 10a3cf: 7e 4f jle 10a420 10a3d1: 3d c8 00 00 00 cmp $0xc8,%eax 10a3d6: 0f 84 b8 00 00 00 je 10a494 10a3dc: 7e 5e jle 10a43c 10a3de: 3d 2c 01 00 00 cmp $0x12c,%eax 10a3e3: 0f 84 9b 00 00 00 je 10a484 10a3e9: 3d 58 02 00 00 cmp $0x258,%eax 10a3ee: 75 54 jne 10a444 <== 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; 10a3f0: b8 08 00 00 00 mov $0x8,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3f5: c9 leave 10a3f6: c3 ret 10a3f7: 90 nop <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a3f8: 3d 60 09 00 00 cmp $0x960,%eax 10a3fd: 0f 84 c1 00 00 00 je 10a4c4 10a403: 7e 67 jle 10a46c 10a405: 3d c0 12 00 00 cmp $0x12c0,%eax 10a40a: 0f 84 8c 00 00 00 je 10a49c 10a410: 3d 80 25 00 00 cmp $0x2580,%eax 10a415: 75 2d jne 10a444 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; 10a417: b8 0d 00 00 00 mov $0xd,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a41c: c9 leave 10a41d: c3 ret 10a41e: 66 90 xchg %ax,%ax <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a420: 83 f8 32 cmp $0x32,%eax 10a423: 74 7f je 10a4a4 10a425: 7e 25 jle 10a44c 10a427: 83 f8 4b cmp $0x4b,%eax 10a42a: 0f 84 8c 00 00 00 je 10a4bc 10a430: 83 f8 6e cmp $0x6e,%eax 10a433: 75 0f jne 10a444 <== ALWAYS TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 10a435: b8 03 00 00 00 mov $0x3,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a43a: c9 leave 10a43b: c3 ret int32_t baud ) { int termios_baud; switch (baud) { 10a43c: 3d 96 00 00 00 cmp $0x96,%eax 10a441: 74 39 je 10a47c <== NEVER TAKEN 10a443: 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; 10a444: b8 ff ff ff ff mov $0xffffffff,%eax default: termios_baud = -1; break; } return termios_baud; } 10a449: c9 leave 10a44a: c3 ret 10a44b: 90 nop <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a44c: 85 c0 test %eax,%eax 10a44e: 75 f4 jne 10a444 10a450: 31 c0 xor %eax,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a452: c9 leave 10a453: c3 ret int32_t baud ) { int termios_baud; switch (baud) { 10a454: 3d 00 96 00 00 cmp $0x9600,%eax 10a459: 74 31 je 10a48c 10a45b: 3d 00 e1 00 00 cmp $0xe100,%eax 10a460: 75 e2 jne 10a444 <== 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; 10a462: b8 01 10 00 00 mov $0x1001,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a467: c9 leave 10a468: c3 ret 10a469: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a46c: 3d 08 07 00 00 cmp $0x708,%eax 10a471: 75 d1 jne 10a444 <== 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; 10a473: b8 0a 00 00 00 mov $0xa,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a478: c9 leave 10a479: c3 ret 10a47a: 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; 10a47c: b8 05 00 00 00 mov $0x5,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a481: c9 leave 10a482: c3 ret 10a483: 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; 10a484: b8 07 00 00 00 mov $0x7,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a489: c9 leave 10a48a: c3 ret 10a48b: 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; 10a48c: b8 0f 00 00 00 mov $0xf,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a491: c9 leave 10a492: c3 ret 10a493: 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; 10a494: b8 06 00 00 00 mov $0x6,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a499: c9 leave 10a49a: c3 ret 10a49b: 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; 10a49c: b8 0c 00 00 00 mov $0xc,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a4a1: c9 leave 10a4a2: c3 ret 10a4a3: 90 nop <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a4a4: b8 01 00 00 00 mov $0x1,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a4a9: c9 leave 10a4aa: c3 ret 10a4ab: 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; 10a4ac: b8 03 10 00 00 mov $0x1003,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a4b1: c9 leave 10a4b2: c3 ret 10a4b3: 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; 10a4b4: b8 02 10 00 00 mov $0x1002,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a4b9: c9 leave 10a4ba: c3 ret 10a4bb: 90 nop <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a4bc: b8 02 00 00 00 mov $0x2,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a4c1: c9 leave 10a4c2: c3 ret 10a4c3: 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; 10a4c4: b8 0b 00 00 00 mov $0xb,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a4c9: c9 leave 10a4ca: c3 ret 10a4cb: 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; 10a4cc: b8 09 00 00 00 mov $0x9,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a4d1: c9 leave 10a4d2: c3 ret 10a4d3: 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; 10a4d4: b8 04 00 00 00 mov $0x4,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a4d9: c9 leave 10a4da: c3 ret 10a4db: 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; 10a4dc: b8 0e 00 00 00 mov $0xe,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a4e1: c9 leave 10a4e2: c3 ret 0010a5c4 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 10a5c4: 55 push %ebp 10a5c5: 89 e5 mov %esp,%ebp 10a5c7: 57 push %edi 10a5c8: 56 push %esi 10a5c9: 53 push %ebx 10a5ca: 83 ec 20 sub $0x20,%esp 10a5cd: 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, 10a5d0: 6a 00 push $0x0 10a5d2: 6a 00 push $0x0 10a5d4: ff 35 b8 72 12 00 pushl 0x1272b8 10a5da: 89 55 dc mov %edx,-0x24(%ebp) 10a5dd: e8 1e 10 00 00 call 10b600 10a5e2: 89 45 e4 mov %eax,-0x1c(%ebp) RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10a5e5: 83 c4 10 add $0x10,%esp 10a5e8: 85 c0 test %eax,%eax 10a5ea: 8b 55 dc mov -0x24(%ebp),%edx 10a5ed: 75 6f jne 10a65e <== ALWAYS TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 10a5ef: 8b 1d c0 72 12 00 mov 0x1272c0,%ebx 10a5f5: 85 db test %ebx,%ebx 10a5f7: 0f 84 a7 00 00 00 je 10a6a4 10a5fd: 8b 45 0c mov 0xc(%ebp),%eax 10a600: eb 0c jmp 10a60e 10a602: 66 90 xchg %ax,%ax <== NOT EXECUTED 10a604: 8b 1b mov (%ebx),%ebx 10a606: 85 db test %ebx,%ebx 10a608: 0f 84 96 00 00 00 je 10a6a4 <== NEVER TAKEN if ((tty->major == major) && (tty->minor == minor)) 10a60e: 39 53 0c cmp %edx,0xc(%ebx) 10a611: 75 f1 jne 10a604 10a613: 39 43 10 cmp %eax,0x10(%ebx) 10a616: 75 ec jne 10a604 <== ALWAYS TAKEN */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 10a618: 8b 4d 10 mov 0x10(%ebp),%ecx 10a61b: 8b 01 mov (%ecx),%eax 10a61d: 89 58 34 mov %ebx,0x34(%eax) if (!tty->refcount++) { 10a620: 8b 43 08 mov 0x8(%ebx),%eax 10a623: 8d 48 01 lea 0x1(%eax),%ecx 10a626: 89 4b 08 mov %ecx,0x8(%ebx) 10a629: 85 c0 test %eax,%eax 10a62b: 75 20 jne 10a64d if (tty->device.firstOpen) 10a62d: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax 10a633: 85 c0 test %eax,%eax 10a635: 74 0d je 10a644 (*tty->device.firstOpen)(major, minor, arg); 10a637: 56 push %esi 10a638: ff 75 10 pushl 0x10(%ebp) 10a63b: ff 75 0c pushl 0xc(%ebp) 10a63e: 52 push %edx 10a63f: ff d0 call *%eax 10a641: 83 c4 10 add $0x10,%esp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10a644: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10a64b: 74 1c je 10a669 <== ALWAYS TAKEN (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 10a64d: 83 ec 0c sub $0xc,%esp 10a650: ff 35 b8 72 12 00 pushl 0x1272b8 10a656: e8 a1 10 00 00 call 10b6fc return RTEMS_SUCCESSFUL; 10a65b: 83 c4 10 add $0x10,%esp } 10a65e: 8b 45 e4 mov -0x1c(%ebp),%eax 10a661: 8d 65 f4 lea -0xc(%ebp),%esp 10a664: 5b pop %ebx 10a665: 5e pop %esi 10a666: 5f pop %edi 10a667: c9 leave 10a668: 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, 10a669: 51 push %ecx <== NOT EXECUTED 10a66a: 53 push %ebx <== NOT EXECUTED 10a66b: 68 d8 aa 10 00 push $0x10aad8 <== NOT EXECUTED 10a670: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 10a676: e8 c5 13 00 00 call 10ba40 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10a67b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a67e: 85 c0 test %eax,%eax <== NOT EXECUTED 10a680: 0f 85 3e 03 00 00 jne 10a9c4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 10a686: 52 push %edx <== NOT EXECUTED 10a687: 53 push %ebx <== NOT EXECUTED 10a688: 68 6c aa 10 00 push $0x10aa6c <== NOT EXECUTED 10a68d: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 10a693: e8 a8 13 00 00 call 10ba40 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10a698: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a69b: 85 c0 test %eax,%eax <== NOT EXECUTED 10a69d: 74 ae je 10a64d <== NOT EXECUTED 10a69f: e9 20 03 00 00 jmp 10a9c4 <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 10a6a4: 83 ec 08 sub $0x8,%esp 10a6a7: 68 e8 00 00 00 push $0xe8 10a6ac: 6a 01 push $0x1 10a6ae: 89 55 dc mov %edx,-0x24(%ebp) 10a6b1: e8 06 53 00 00 call 10f9bc 10a6b6: 89 45 e0 mov %eax,-0x20(%ebp) 10a6b9: 89 c3 mov %eax,%ebx if (tty == NULL) { 10a6bb: 83 c4 10 add $0x10,%esp 10a6be: 85 c0 test %eax,%eax 10a6c0: 8b 55 dc mov -0x24(%ebp),%edx 10a6c3: 0f 84 79 02 00 00 je 10a942 <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 10a6c9: a1 0c 50 12 00 mov 0x12500c,%eax 10a6ce: 8b 4d e0 mov -0x20(%ebp),%ecx 10a6d1: 89 41 64 mov %eax,0x64(%ecx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 10a6d4: 8b 41 64 mov 0x64(%ecx),%eax 10a6d7: 83 ec 0c sub $0xc,%esp 10a6da: 50 push %eax 10a6db: 89 55 dc mov %edx,-0x24(%ebp) 10a6de: e8 e9 db ff ff call 1082cc 10a6e3: 8b 75 e0 mov -0x20(%ebp),%esi 10a6e6: 89 46 58 mov %eax,0x58(%esi) if (tty->rawInBuf.theBuf == NULL) { 10a6e9: 83 c4 10 add $0x10,%esp 10a6ec: 85 c0 test %eax,%eax 10a6ee: 8b 55 dc mov -0x24(%ebp),%edx 10a6f1: 0f 84 68 02 00 00 je 10a95f <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 10a6f7: a1 10 50 12 00 mov 0x125010,%eax 10a6fc: 8b 4d e0 mov -0x20(%ebp),%ecx 10a6ff: 89 81 88 00 00 00 mov %eax,0x88(%ecx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 10a705: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 10a70b: 83 ec 0c sub $0xc,%esp 10a70e: 50 push %eax 10a70f: 89 55 dc mov %edx,-0x24(%ebp) 10a712: e8 b5 db ff ff call 1082cc 10a717: 8b 75 e0 mov -0x20(%ebp),%esi 10a71a: 89 46 7c mov %eax,0x7c(%esi) if (tty->rawOutBuf.theBuf == NULL) { 10a71d: 83 c4 10 add $0x10,%esp 10a720: 85 c0 test %eax,%eax 10a722: 8b 55 dc mov -0x24(%ebp),%edx 10a725: 0f 84 58 02 00 00 je 10a983 <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 10a72b: 83 ec 0c sub $0xc,%esp 10a72e: ff 35 08 50 12 00 pushl 0x125008 10a734: 89 55 dc mov %edx,-0x24(%ebp) 10a737: e8 90 db ff ff call 1082cc 10a73c: 8b 4d e0 mov -0x20(%ebp),%ecx 10a73f: 89 41 1c mov %eax,0x1c(%ecx) if (tty->cbuf == NULL) { 10a742: 83 c4 10 add $0x10,%esp 10a745: 85 c0 test %eax,%eax 10a747: 8b 55 dc mov -0x24(%ebp),%edx 10a74a: 0f 84 7d 02 00 00 je 10a9cd <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 10a750: 8b 45 e0 mov -0x20(%ebp),%eax 10a753: c7 80 d4 00 00 00 00 movl $0x0,0xd4(%eax) 10a75a: 00 00 00 tty->tty_snd.sw_arg = NULL; 10a75d: c7 80 d8 00 00 00 00 movl $0x0,0xd8(%eax) 10a764: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 10a767: c7 80 dc 00 00 00 00 movl $0x0,0xdc(%eax) 10a76e: 00 00 00 tty->tty_rcv.sw_arg = NULL; 10a771: c7 80 e0 00 00 00 00 movl $0x0,0xe0(%eax) 10a778: 00 00 00 tty->tty_rcvwakeup = 0; 10a77b: c7 80 e4 00 00 00 00 movl $0x0,0xe4(%eax) 10a782: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 10a785: a1 c0 72 12 00 mov 0x1272c0,%eax 10a78a: 8b 4d e0 mov -0x20(%ebp),%ecx 10a78d: 89 01 mov %eax,(%ecx) tty->back = NULL; 10a78f: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) if (rtems_termios_ttyHead != NULL) 10a796: 85 c0 test %eax,%eax 10a798: 74 03 je 10a79d rtems_termios_ttyHead->back = tty; 10a79a: 89 48 04 mov %ecx,0x4(%eax) rtems_termios_ttyHead = tty; 10a79d: 8b 75 e0 mov -0x20(%ebp),%esi 10a7a0: 89 35 c0 72 12 00 mov %esi,0x1272c0 if (rtems_termios_ttyTail == NULL) 10a7a6: 8b 3d bc 72 12 00 mov 0x1272bc,%edi 10a7ac: 85 ff test %edi,%edi 10a7ae: 0f 84 ac 02 00 00 je 10aa60 rtems_termios_ttyTail = tty; tty->minor = minor; 10a7b4: 8b 4d 0c mov 0xc(%ebp),%ecx 10a7b7: 8b 45 e0 mov -0x20(%ebp),%eax 10a7ba: 89 48 10 mov %ecx,0x10(%eax) tty->major = major; 10a7bd: 89 50 0c mov %edx,0xc(%eax) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 10a7c0: 83 ec 0c sub $0xc,%esp 10a7c3: 83 c0 14 add $0x14,%eax 10a7c6: 50 push %eax 10a7c7: 6a 00 push $0x0 10a7c9: 6a 54 push $0x54 10a7cb: 6a 01 push $0x1 10a7cd: 0f be 05 14 50 12 00 movsbl 0x125014,%eax 10a7d4: 0d 00 69 52 54 or $0x54526900,%eax 10a7d9: 50 push %eax 10a7da: 89 55 dc mov %edx,-0x24(%ebp) 10a7dd: e8 a6 0b 00 00 call 10b388 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) 10a7e2: 83 c4 20 add $0x20,%esp 10a7e5: 85 c0 test %eax,%eax 10a7e7: 8b 55 dc mov -0x24(%ebp),%edx 10a7ea: 0f 85 d4 01 00 00 jne 10a9c4 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10a7f0: 83 ec 0c sub $0xc,%esp 10a7f3: 8b 45 e0 mov -0x20(%ebp),%eax 10a7f6: 83 c0 18 add $0x18,%eax 10a7f9: 50 push %eax 10a7fa: 6a 00 push $0x0 10a7fc: 6a 54 push $0x54 10a7fe: 6a 01 push $0x1 10a800: 0f be 05 14 50 12 00 movsbl 0x125014,%eax 10a807: 0d 00 6f 52 54 or $0x54526f00,%eax 10a80c: 50 push %eax 10a80d: 89 55 dc mov %edx,-0x24(%ebp) 10a810: e8 73 0b 00 00 call 10b388 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) 10a815: 83 c4 20 add $0x20,%esp 10a818: 85 c0 test %eax,%eax 10a81a: 8b 55 dc mov -0x24(%ebp),%edx 10a81d: 0f 85 a1 01 00 00 jne 10a9c4 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10a823: 83 ec 0c sub $0xc,%esp 10a826: 8b 45 e0 mov -0x20(%ebp),%eax 10a829: 05 8c 00 00 00 add $0x8c,%eax 10a82e: 50 push %eax 10a82f: 6a 00 push $0x0 10a831: 6a 20 push $0x20 10a833: 6a 00 push $0x0 10a835: 0f be 05 14 50 12 00 movsbl 0x125014,%eax 10a83c: 0d 00 78 52 54 or $0x54527800,%eax 10a841: 50 push %eax 10a842: 89 55 dc mov %edx,-0x24(%ebp) 10a845: e8 3e 0b 00 00 call 10b388 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 10a84a: 83 c4 20 add $0x20,%esp 10a84d: 85 c0 test %eax,%eax 10a84f: 8b 55 dc mov -0x24(%ebp),%edx 10a852: 0f 85 6c 01 00 00 jne 10a9c4 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 10a858: 8b 75 e0 mov -0x20(%ebp),%esi 10a85b: c7 86 94 00 00 00 00 movl $0x0,0x94(%esi) 10a862: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 10a865: 89 f7 mov %esi,%edi 10a867: 81 c7 98 00 00 00 add $0x98,%edi 10a86d: b9 08 00 00 00 mov $0x8,%ecx 10a872: 8b 75 14 mov 0x14(%ebp),%esi 10a875: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10a877: 8b 45 e0 mov -0x20(%ebp),%eax 10a87a: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 10a881: 0f 84 63 01 00 00 je 10a9ea <== ALWAYS TAKEN &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 10a887: 8b 4d e0 mov -0x20(%ebp),%ecx 10a88a: 8b b9 a0 00 00 00 mov 0xa0(%ecx),%edi 10a890: 85 ff test %edi,%edi 10a892: 0f 84 f9 00 00 00 je 10a991 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 10a898: 83 b9 b4 00 00 00 02 cmpl $0x2,0xb4(%ecx) 10a89f: 0f 84 ec 00 00 00 je 10a991 <== ALWAYS TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 10a8a5: 8b 75 e0 mov -0x20(%ebp),%esi 10a8a8: c7 46 30 02 25 00 00 movl $0x2502,0x30(%esi) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 10a8af: c7 46 34 05 18 00 00 movl $0x1805,0x34(%esi) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 10a8b6: c7 46 38 bd 08 00 00 movl $0x8bd,0x38(%esi) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 10a8bd: c7 46 3c 3b 82 00 00 movl $0x823b,0x3c(%esi) tty->termios.c_cc[VINTR] = '\003'; 10a8c4: c6 46 41 03 movb $0x3,0x41(%esi) tty->termios.c_cc[VQUIT] = '\034'; 10a8c8: c6 46 42 1c movb $0x1c,0x42(%esi) tty->termios.c_cc[VERASE] = '\177'; 10a8cc: c6 46 43 7f movb $0x7f,0x43(%esi) tty->termios.c_cc[VKILL] = '\025'; 10a8d0: c6 46 44 15 movb $0x15,0x44(%esi) tty->termios.c_cc[VEOF] = '\004'; 10a8d4: c6 46 45 04 movb $0x4,0x45(%esi) tty->termios.c_cc[VEOL] = '\000'; 10a8d8: c6 46 4c 00 movb $0x0,0x4c(%esi) tty->termios.c_cc[VEOL2] = '\000'; 10a8dc: c6 46 51 00 movb $0x0,0x51(%esi) tty->termios.c_cc[VSTART] = '\021'; 10a8e0: c6 46 49 11 movb $0x11,0x49(%esi) tty->termios.c_cc[VSTOP] = '\023'; 10a8e4: c6 46 4a 13 movb $0x13,0x4a(%esi) tty->termios.c_cc[VSUSP] = '\032'; 10a8e8: c6 46 4b 1a movb $0x1a,0x4b(%esi) tty->termios.c_cc[VREPRINT] = '\022'; 10a8ec: c6 46 4d 12 movb $0x12,0x4d(%esi) tty->termios.c_cc[VDISCARD] = '\017'; 10a8f0: c6 46 4e 0f movb $0xf,0x4e(%esi) tty->termios.c_cc[VWERASE] = '\027'; 10a8f4: c6 46 4f 17 movb $0x17,0x4f(%esi) tty->termios.c_cc[VLNEXT] = '\026'; 10a8f8: c6 46 50 16 movb $0x16,0x50(%esi) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 10a8fc: c7 86 b8 00 00 00 00 movl $0x0,0xb8(%esi) 10a903: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 10a906: 8b 46 64 mov 0x64(%esi),%eax 10a909: d1 e8 shr %eax 10a90b: 89 86 bc 00 00 00 mov %eax,0xbc(%esi) tty->highwater = tty->rawInBuf.Size * 3/4; 10a911: 8b 46 64 mov 0x64(%esi),%eax 10a914: 8d 04 40 lea (%eax,%eax,2),%eax 10a917: c1 e8 02 shr $0x2,%eax 10a91a: 89 86 c0 00 00 00 mov %eax,0xc0(%esi) /* * Bump name characer */ if (c++ == 'z') 10a920: a0 14 50 12 00 mov 0x125014,%al 10a925: 8d 48 01 lea 0x1(%eax),%ecx 10a928: 88 0d 14 50 12 00 mov %cl,0x125014 10a92e: 3c 7a cmp $0x7a,%al 10a930: 0f 85 e2 fc ff ff jne 10a618 <== NEVER TAKEN c = 'a'; 10a936: c6 05 14 50 12 00 61 movb $0x61,0x125014 <== NOT EXECUTED 10a93d: e9 d6 fc ff ff jmp 10a618 <== NOT EXECUTED /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 10a942: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a945: ff 35 b8 72 12 00 pushl 0x1272b8 <== NOT EXECUTED 10a94b: e8 ac 0d 00 00 call 10b6fc <== NOT EXECUTED 10a950: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED return RTEMS_NO_MEMORY; 10a957: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a95a: e9 ff fc ff ff jmp 10a65e <== 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); 10a95f: 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); 10a962: 56 push %esi <== NOT EXECUTED 10a963: e8 14 d7 ff ff call 10807c <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 10a968: 59 pop %ecx <== NOT EXECUTED 10a969: ff 35 b8 72 12 00 pushl 0x1272b8 <== NOT EXECUTED 10a96f: e8 88 0d 00 00 call 10b6fc <== NOT EXECUTED 10a974: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED return RTEMS_NO_MEMORY; 10a97b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a97e: e9 db fc ff ff jmp 10a65e <== 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)); 10a983: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a986: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 10a989: e8 ee d6 ff ff call 10807c <== NOT EXECUTED free(tty); 10a98e: 5b pop %ebx <== NOT EXECUTED 10a98f: eb d1 jmp 10a962 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 10a991: 83 ec 0c sub $0xc,%esp 10a994: 8b 45 e0 mov -0x20(%ebp),%eax 10a997: 83 c0 68 add $0x68,%eax 10a99a: 50 push %eax 10a99b: 6a 00 push $0x0 10a99d: 6a 24 push $0x24 10a99f: 6a 00 push $0x0 10a9a1: 0f be 05 14 50 12 00 movsbl 0x125014,%eax 10a9a8: 0d 00 72 52 54 or $0x54527200,%eax 10a9ad: 50 push %eax 10a9ae: 89 55 dc mov %edx,-0x24(%ebp) 10a9b1: e8 d2 09 00 00 call 10b388 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 10a9b6: 83 c4 20 add $0x20,%esp 10a9b9: 85 c0 test %eax,%eax 10a9bb: 8b 55 dc mov -0x24(%ebp),%edx 10a9be: 0f 84 e1 fe ff ff je 10a8a5 <== NEVER TAKEN sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 10a9c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a9c7: 50 push %eax <== NOT EXECUTED 10a9c8: e8 6f 12 00 00 call 10bc3c <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 10a9cd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a9d0: ff 71 7c pushl 0x7c(%ecx) <== NOT EXECUTED 10a9d3: e8 a4 d6 ff ff call 10807c <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 10a9d8: 5a pop %edx <== NOT EXECUTED 10a9d9: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 10a9dc: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 10a9df: e8 98 d6 ff ff call 10807c <== NOT EXECUTED free(tty); 10a9e4: 58 pop %eax <== NOT EXECUTED 10a9e5: e9 78 ff ff ff jmp 10a962 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 10a9ea: 51 push %ecx <== NOT EXECUTED 10a9eb: 51 push %ecx <== NOT EXECUTED 10a9ec: 05 c8 00 00 00 add $0xc8,%eax <== NOT EXECUTED 10a9f1: 50 push %eax <== NOT EXECUTED 10a9f2: 6a 00 push $0x0 <== NOT EXECUTED 10a9f4: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 10a9f9: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 10a9fe: 6a 0a push $0xa <== NOT EXECUTED 10aa00: 0f be 05 14 50 12 00 movsbl 0x125014,%eax <== NOT EXECUTED 10aa07: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED 10aa0c: 50 push %eax <== NOT EXECUTED 10aa0d: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 10aa10: e8 87 0d 00 00 call 10b79c <== 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) 10aa15: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10aa18: 85 c0 test %eax,%eax <== NOT EXECUTED 10aa1a: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 10aa1d: 75 a5 jne 10a9c4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 10aa1f: 50 push %eax <== NOT EXECUTED 10aa20: 50 push %eax <== NOT EXECUTED 10aa21: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10aa24: 05 c4 00 00 00 add $0xc4,%eax <== NOT EXECUTED 10aa29: 50 push %eax <== NOT EXECUTED 10aa2a: 6a 00 push $0x0 <== NOT EXECUTED 10aa2c: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 10aa31: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 10aa36: 6a 09 push $0x9 <== NOT EXECUTED 10aa38: 0f be 05 14 50 12 00 movsbl 0x125014,%eax <== NOT EXECUTED 10aa3f: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED 10aa44: 50 push %eax <== NOT EXECUTED 10aa45: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 10aa48: e8 4f 0d 00 00 call 10b79c <== 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) 10aa4d: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10aa50: 85 c0 test %eax,%eax <== NOT EXECUTED 10aa52: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 10aa55: 0f 84 2c fe ff ff je 10a887 <== NOT EXECUTED 10aa5b: e9 64 ff ff ff jmp 10a9c4 <== 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; 10aa60: 89 35 bc 72 12 00 mov %esi,0x1272bc 10aa66: e9 49 fd ff ff jmp 10a7b4 00109530 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 109530: 55 push %ebp 109531: 89 e5 mov %esp,%ebp 109533: 57 push %edi 109534: 56 push %esi 109535: 53 push %ebx 109536: 83 ec 1c sub $0x1c,%esp 109539: 8b 45 08 mov 0x8(%ebp),%eax 10953c: 8b 55 0c mov 0xc(%ebp),%edx 10953f: 89 55 e4 mov %edx,-0x1c(%ebp) 109542: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 109545: 89 c6 mov %eax,%esi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 109547: 8b bb b4 00 00 00 mov 0xb4(%ebx),%edi 10954d: 85 ff test %edi,%edi 10954f: 0f 84 eb 00 00 00 je 109640 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 109555: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10955b: 89 45 e0 mov %eax,-0x20(%ebp) while (len) { 10955e: 8b 4d e4 mov -0x1c(%ebp),%ecx 109561: 85 c9 test %ecx,%ecx 109563: 0f 84 cf 00 00 00 je 109638 <== ALWAYS TAKEN 109569: 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; 10956c: 8b 45 e0 mov -0x20(%ebp),%eax 10956f: 40 inc %eax 109570: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 109576: 31 d2 xor %edx,%edx 109578: f7 f1 div %ecx 10957a: 89 55 dc mov %edx,-0x24(%ebp) 10957d: 89 55 e0 mov %edx,-0x20(%ebp) rtems_interrupt_disable (level); 109580: 9c pushf 109581: fa cli 109582: 5f pop %edi while (newHead == tty->rawOutBuf.Tail) { 109583: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109589: 3b 55 e0 cmp -0x20(%ebp),%edx 10958c: 75 3e jne 1095cc 10958e: 89 f8 mov %edi,%eax 109590: 89 f7 mov %esi,%edi 109592: 89 d6 mov %edx,%esi tty->rawOutBufState = rob_wait; 109594: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 10959b: 00 00 00 rtems_interrupt_enable (level); 10959e: 50 push %eax 10959f: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 1095a0: 52 push %edx 1095a1: 6a 00 push $0x0 1095a3: 6a 00 push $0x0 1095a5: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 1095ab: e8 50 20 00 00 call 10b600 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 1095b0: 83 c4 10 add $0x10,%esp 1095b3: 85 c0 test %eax,%eax 1095b5: 0f 85 a0 00 00 00 jne 10965b <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 1095bb: 9c pushf 1095bc: fa cli 1095bd: 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) { 1095be: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 1095c4: 39 f2 cmp %esi,%edx 1095c6: 74 cc je 109594 <== ALWAYS TAKEN 1095c8: 89 fe mov %edi,%esi 1095ca: 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++; 1095cc: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 1095d2: 8b 4b 7c mov 0x7c(%ebx),%ecx 1095d5: 8a 16 mov (%esi),%dl 1095d7: 88 14 01 mov %dl,(%ecx,%eax,1) tty->rawOutBuf.Head = newHead; 1095da: 8b 45 dc mov -0x24(%ebp),%eax 1095dd: 89 83 80 00 00 00 mov %eax,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 1095e3: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 1095e9: 85 c0 test %eax,%eax 1095eb: 75 23 jne 109610 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 1095ed: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1095f3: a8 10 test $0x10,%al 1095f5: 74 26 je 10961d <== 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; 1095f7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1095fd: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 109600: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 109606: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 10960d: 00 00 00 } rtems_interrupt_enable (level); 109610: 57 push %edi 109611: 9d popf if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 109612: ff 4d e4 decl -0x1c(%ebp) 109615: 74 21 je 109638 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 109617: 46 inc %esi 109618: e9 4f ff ff ff jmp 10956c 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); 10961d: 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, 109623: 51 push %ecx 109624: 6a 01 push $0x1 109626: 03 43 7c add 0x7c(%ebx),%eax 109629: 50 push %eax 10962a: ff 73 10 pushl 0x10(%ebx) 10962d: ff 93 a4 00 00 00 call *0xa4(%ebx) 109633: 83 c4 10 add $0x10,%esp 109636: eb ce jmp 109606 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109638: 8d 65 f4 lea -0xc(%ebp),%esp 10963b: 5b pop %ebx 10963c: 5e pop %esi 10963d: 5f pop %edi 10963e: c9 leave 10963f: 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); 109640: 89 55 10 mov %edx,0x10(%ebp) <== NOT EXECUTED 109643: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 109646: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 109649: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 10964c: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109652: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109655: 5b pop %ebx <== NOT EXECUTED 109656: 5e pop %esi <== NOT EXECUTED 109657: 5f pop %edi <== NOT EXECUTED 109658: 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); 109659: 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); 10965b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10965e: 50 push %eax <== NOT EXECUTED 10965f: e8 d8 25 00 00 call 10bc3c <== NOT EXECUTED 00109c9c : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 109c9c: 55 push %ebp <== NOT EXECUTED 109c9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109c9f: 57 push %edi <== NOT EXECUTED 109ca0: 56 push %esi <== NOT EXECUTED 109ca1: 53 push %ebx <== NOT EXECUTED 109ca2: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109ca5: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 109ca8: 8b 02 mov (%edx),%eax <== NOT EXECUTED 109caa: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t count = args->count; 109cad: 8b 4a 10 mov 0x10(%edx),%ecx <== NOT EXECUTED 109cb0: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED char *buffer = args->buffer; 109cb3: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED 109cb6: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109cb9: 6a 00 push $0x0 <== NOT EXECUTED 109cbb: 6a 00 push $0x0 <== NOT EXECUTED 109cbd: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 109cc0: e8 3b 19 00 00 call 10b600 <== NOT EXECUTED 109cc5: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 109cc8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109ccb: 85 c0 test %eax,%eax <== NOT EXECUTED 109ccd: 75 35 jne 109d04 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 109ccf: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 109cd5: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 109cd8: 8b 80 28 6f 12 00 mov 0x126f28(%eax),%eax <== NOT EXECUTED 109cde: 85 c0 test %eax,%eax <== NOT EXECUTED 109ce0: 74 2e je 109d10 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 109ce2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109ce5: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 109ce8: 53 push %ebx <== NOT EXECUTED 109ce9: ff d0 call *%eax <== NOT EXECUTED 109ceb: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 109cee: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 109cf5: 00 00 00 rtems_semaphore_release (tty->isem); 109cf8: 59 pop %ecx <== NOT EXECUTED 109cf9: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 109cfc: e8 fb 19 00 00 call 10b6fc <== NOT EXECUTED return sc; 109d01: 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; } 109d04: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109d07: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109d0a: 5b pop %ebx <== NOT EXECUTED 109d0b: 5e pop %esi <== NOT EXECUTED 109d0c: 5f pop %edi <== NOT EXECUTED 109d0d: c9 leave <== NOT EXECUTED 109d0e: c3 ret <== NOT EXECUTED 109d0f: 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) { 109d10: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 109d13: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 109d16: 74 5f je 109d77 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 109d18: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 109d1b: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109d1d: 74 29 je 109d48 <== NOT EXECUTED 109d1f: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 109d22: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 109d25: 7d 21 jge 109d48 <== NOT EXECUTED 109d27: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 109d2a: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED 109d2d: eb 06 jmp 109d35 <== NOT EXECUTED 109d2f: 90 nop <== NOT EXECUTED 109d30: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 109d33: 7e 10 jle 109d45 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 109d35: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED 109d38: 8a 0c 06 mov (%esi,%eax,1),%cl <== NOT EXECUTED 109d3b: 88 0a mov %cl,(%edx) <== NOT EXECUTED 109d3d: 42 inc %edx <== NOT EXECUTED 109d3e: 40 inc %eax <== NOT EXECUTED 109d3f: 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)) { 109d42: 4f dec %edi <== NOT EXECUTED 109d43: 75 eb jne 109d30 <== NOT EXECUTED 109d45: 89 7d dc mov %edi,-0x24(%ebp) <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 109d48: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 109d4b: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED 109d4e: 2b 45 dc sub -0x24(%ebp),%eax <== NOT EXECUTED 109d51: 89 42 18 mov %eax,0x18(%edx) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 109d54: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 109d5b: 00 00 00 rtems_semaphore_release (tty->isem); 109d5e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109d61: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 109d64: e8 93 19 00 00 call 10b6fc <== NOT EXECUTED return sc; 109d69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109d6c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109d6f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109d72: 5b pop %ebx <== NOT EXECUTED 109d73: 5e pop %esi <== NOT EXECUTED 109d74: 5f pop %edi <== NOT EXECUTED 109d75: c9 leave <== NOT EXECUTED 109d76: 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; 109d77: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED 109d7e: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED tty->read_start_column = tty->column; 109d85: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109d88: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 109d8b: 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 109d91: 85 c0 test %eax,%eax <== NOT EXECUTED 109d93: 74 0e je 109da3 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 109d95: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx <== NOT EXECUTED 109d9b: 85 d2 test %edx,%edx <== NOT EXECUTED 109d9d: 0f 84 72 01 00 00 je 109f15 <== 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; 109da3: 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, 109da6: 8d 53 49 lea 0x49(%ebx),%edx <== NOT EXECUTED 109da9: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 109dac: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) <== NOT EXECUTED 109db3: 90 nop <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 109db4: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 109db7: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 109dba: 39 c2 cmp %eax,%edx <== NOT EXECUTED 109dbc: 75 2c jne 109dea <== NOT EXECUTED 109dbe: e9 f5 00 00 00 jmp 109eb8 <== NOT EXECUTED 109dc3: 90 nop <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) 109dc4: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 109dc7: 89 da mov %ebx,%edx <== NOT EXECUTED 109dc9: e8 3e fd ff ff call 109b0c <== NOT EXECUTED 109dce: 85 c0 test %eax,%eax <== NOT EXECUTED 109dd0: 74 07 je 109dd9 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) 109dd2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 109dd9: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 109ddc: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 109ddf: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 109de2: 39 c2 cmp %eax,%edx <== NOT EXECUTED 109de4: 0f 84 ce 00 00 00 je 109eb8 <== NOT EXECUTED 109dea: a1 08 50 12 00 mov 0x125008,%eax <== NOT EXECUTED 109def: 48 dec %eax <== NOT EXECUTED 109df0: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 109df3: 0f 8d bf 00 00 00 jge 109eb8 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 109df9: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 109dfc: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 109dff: 40 inc %eax <== NOT EXECUTED 109e00: 31 d2 xor %edx,%edx <== NOT EXECUTED 109e02: f7 f1 div %ecx <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 109e04: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 109e07: 8a 0c 10 mov (%eax,%edx,1),%cl <== NOT EXECUTED tty->rawInBuf.Head = newHead; 109e0a: 89 53 5c mov %edx,0x5c(%ebx) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 109e0d: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 109e10: 8b 7b 64 mov 0x64(%ebx),%edi <== NOT EXECUTED 109e13: 8b 73 64 mov 0x64(%ebx),%esi <== NOT EXECUTED 109e16: 8d 04 07 lea (%edi,%eax,1),%eax <== NOT EXECUTED 109e19: 29 d0 sub %edx,%eax <== NOT EXECUTED 109e1b: 31 d2 xor %edx,%edx <== NOT EXECUTED 109e1d: f7 f6 div %esi <== NOT EXECUTED 109e1f: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx <== NOT EXECUTED 109e25: 73 5d jae 109e84 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 109e27: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109e2d: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED 109e30: 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)) 109e36: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109e3c: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED 109e41: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED 109e46: 0f 84 94 00 00 00 je 109ee0 <== 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) { 109e4c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109e52: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 109e55: 74 2d je 109e84 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 109e57: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109e5d: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 109e60: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 109e66: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 109e6c: 85 c0 test %eax,%eax <== NOT EXECUTED 109e6e: 74 14 je 109e84 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 109e70: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109e73: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109e76: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 109e79: ff d0 call *%eax <== NOT EXECUTED 109e7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109e7e: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 109e81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 109e84: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 109e88: 0f 85 36 ff ff ff jne 109dc4 <== NOT EXECUTED if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 109e8e: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 109e91: 89 da mov %ebx,%edx <== NOT EXECUTED 109e93: e8 74 fc ff ff call 109b0c <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 109e98: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 109e9c: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 109e9f: 0f 8d 2d ff ff ff jge 109dd2 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 109ea5: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 109ea8: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 109eab: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 109eae: 39 c2 cmp %eax,%edx <== NOT EXECUTED 109eb0: 0f 85 34 ff ff ff jne 109dea <== NOT EXECUTED 109eb6: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 109eb8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 109ebb: 85 c0 test %eax,%eax <== NOT EXECUTED 109ebd: 0f 84 55 fe ff ff je 109d18 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 109ec3: 57 push %edi <== NOT EXECUTED 109ec4: 56 push %esi <== NOT EXECUTED 109ec5: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 109ec8: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 109ecb: e8 30 17 00 00 call 10b600 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 109ed0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109ed3: 85 c0 test %eax,%eax <== NOT EXECUTED 109ed5: 0f 84 d9 fe ff ff je 109db4 <== NOT EXECUTED 109edb: e9 38 fe ff ff jmp 109d18 <== 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)) 109ee0: 8b b3 94 00 00 00 mov 0x94(%ebx),%esi <== NOT EXECUTED 109ee6: 85 f6 test %esi,%esi <== NOT EXECUTED 109ee8: 74 0e je 109ef8 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 109eea: 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)) 109ef0: a8 20 test $0x20,%al <== NOT EXECUTED 109ef2: 0f 84 54 ff ff ff je 109e4c <== 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, 109ef8: 52 push %edx <== NOT EXECUTED 109ef9: 6a 01 push $0x1 <== NOT EXECUTED 109efb: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 109efe: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109f01: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 109f04: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 109f0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f0d: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 109f10: e9 6f ff ff ff jmp 109e84 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 109f15: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 109f19: 75 1d jne 109f38 <== NOT EXECUTED 109f1b: eb 39 jmp 109f56 <== NOT EXECUTED 109f1d: 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)) 109f20: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109f23: 89 da mov %ebx,%edx <== NOT EXECUTED 109f25: e8 e2 fb ff ff call 109b0c <== NOT EXECUTED 109f2a: 85 c0 test %eax,%eax <== NOT EXECUTED 109f2c: 0f 85 e6 fd ff ff jne 109d18 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 109f32: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 109f38: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109f3b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109f3e: ff d0 call *%eax <== NOT EXECUTED if (n < 0) { 109f40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f43: 85 c0 test %eax,%eax <== NOT EXECUTED 109f45: 79 d9 jns 109f20 <== NOT EXECUTED rtems_task_wake_after (1); 109f47: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109f4a: 6a 01 push $0x1 <== NOT EXECUTED 109f4c: e8 63 1b 00 00 call 10bab4 <== NOT EXECUTED 109f51: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f54: eb dc jmp 109f32 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 109f56: e8 a9 0f 00 00 call 10af04 <== NOT EXECUTED 109f5b: 89 c6 mov %eax,%esi <== NOT EXECUTED 109f5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 109f60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109f63: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109f66: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 109f6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f6f: 85 c0 test %eax,%eax <== NOT EXECUTED 109f71: 78 25 js 109f98 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 109f73: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109f76: 89 da mov %ebx,%edx <== NOT EXECUTED 109f78: e8 8f fb ff ff call 109b0c <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 109f7d: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED 109f80: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED 109f83: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED 109f86: 0f 8d 8c fd ff ff jge 109d18 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 109f8c: 84 c0 test %al,%al <== NOT EXECUTED 109f8e: 74 d0 je 109f60 <== NOT EXECUTED 109f90: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109f94: 74 ca je 109f60 <== NOT EXECUTED 109f96: eb be jmp 109f56 <== 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]) { 109f98: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 109f9c: 74 1d je 109fbb <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 109f9e: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109fa2: 74 08 je 109fac <== NOT EXECUTED 109fa4: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED 109fa7: 85 ff test %edi,%edi <== NOT EXECUTED 109fa9: 75 1a jne 109fc5 <== NOT EXECUTED 109fab: 90 nop <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 109fac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109faf: 6a 01 push $0x1 <== NOT EXECUTED 109fb1: e8 fe 1a 00 00 call 10bab4 <== NOT EXECUTED 109fb6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109fb9: eb a5 jmp 109f60 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 109fbb: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109fbf: 0f 84 53 fd ff ff je 109d18 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 109fc5: e8 3a 0f 00 00 call 10af04 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 109fca: 29 f0 sub %esi,%eax <== NOT EXECUTED 109fcc: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED 109fcf: 76 db jbe 109fac <== NOT EXECUTED 109fd1: e9 42 fd ff ff jmp 109d18 <== NOT EXECUTED 00108f80 : * 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) { 108f80: 55 push %ebp 108f81: 89 e5 mov %esp,%ebp 108f83: 57 push %edi 108f84: 56 push %esi 108f85: 53 push %ebx 108f86: 83 ec 0c sub $0xc,%esp 108f89: 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)) 108f8c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108f92: 25 03 04 00 00 and $0x403,%eax 108f97: 3d 01 04 00 00 cmp $0x401,%eax 108f9c: 0f 84 86 01 00 00 je 109128 <== ALWAYS TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 108fa2: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108fa8: 83 e0 03 and $0x3,%eax 108fab: 83 f8 02 cmp $0x2,%eax 108fae: 0f 84 b0 01 00 00 je 109164 <== ALWAYS TAKEN rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 108fb4: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 108fba: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108fc0: 39 c2 cmp %eax,%edx 108fc2: 0f 84 b0 00 00 00 je 109078 <== ALWAYS TAKEN rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 108fc8: 9c pushf 108fc9: fa cli 108fca: 58 pop %eax len = tty->t_dqlen; 108fcb: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx tty->t_dqlen = 0; 108fd1: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 108fd8: 00 00 00 rtems_interrupt_enable(level); 108fdb: 50 push %eax 108fdc: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 108fdd: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108fe3: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 108fe9: 8d 04 01 lea (%ecx,%eax,1),%eax 108fec: 31 d2 xor %edx,%edx 108fee: f7 f7 div %edi 108ff0: 89 d6 mov %edx,%esi tty->rawOutBuf.Tail = newTail; 108ff2: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 108ff8: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 108fff: 0f 84 e7 00 00 00 je 1090ec /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 109005: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10900b: 39 f0 cmp %esi,%eax 10900d: 0f 84 81 00 00 00 je 109094 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)) 109013: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109019: 25 10 02 00 00 and $0x210,%eax 10901e: 3d 10 02 00 00 cmp $0x210,%eax 109023: 0f 84 db 00 00 00 je 109104 <== ALWAYS TAKEN } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 109029: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10902f: 39 c6 cmp %eax,%esi 109031: 0f 87 95 00 00 00 ja 1090cc nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 109037: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi 10903d: 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)) { 10903f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109045: f6 c4 06 test $0x6,%ah 109048: 0f 84 95 00 00 00 je 1090e3 <== NEVER TAKEN 10904e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 109053: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 109058: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 10905f: 00 00 00 (*tty->device.write)(tty->minor, 109062: 52 push %edx 109063: 50 push %eax 109064: 8b 43 7c mov 0x7c(%ebx),%eax 109067: 01 f0 add %esi,%eax 109069: 50 push %eax 10906a: ff 73 10 pushl 0x10(%ebx) 10906d: ff 93 a4 00 00 00 call *0xa4(%ebx) 109073: 83 c4 10 add $0x10,%esp 109076: eb 44 jmp 1090bc else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 109078: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED 10907f: 0f 84 1b 01 00 00 je 1091a0 <== NOT EXECUTED 109085: 31 ff xor %edi,%edi <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 109087: 89 f8 mov %edi,%eax <== NOT EXECUTED 109089: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10908c: 5b pop %ebx <== NOT EXECUTED 10908d: 5e pop %esi <== NOT EXECUTED 10908e: 5f pop %edi <== NOT EXECUTED 10908f: c9 leave <== NOT EXECUTED 109090: c3 ret <== NOT EXECUTED 109091: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 109094: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 10909b: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 10909e: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 1090a4: 85 c0 test %eax,%eax 1090a6: 74 7a je 109122 <== NEVER TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 1090a8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1090ab: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 1090b1: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 1090b4: 52 push %edx <== NOT EXECUTED 1090b5: ff d0 call *%eax <== NOT EXECUTED 1090b7: 31 ff xor %edi,%edi <== NOT EXECUTED 1090b9: 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*/ 1090bc: 89 b3 84 00 00 00 mov %esi,0x84(%ebx) } return nToSend; } 1090c2: 89 f8 mov %edi,%eax 1090c4: 8d 65 f4 lea -0xc(%ebp),%esp 1090c7: 5b pop %ebx 1090c8: 5e pop %esi 1090c9: 5f pop %edi 1090ca: c9 leave 1090cb: c3 ret else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 1090cc: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 1090d2: 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)) { 1090d4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1090da: f6 c4 06 test $0x6,%ah 1090dd: 0f 85 6b ff ff ff jne 10904e <== ALWAYS TAKEN 1090e3: 89 f8 mov %edi,%eax 1090e5: e9 6e ff ff ff jmp 109058 1090ea: 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); 1090ec: 83 ec 0c sub $0xc,%esp 1090ef: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 1090f5: e8 02 26 00 00 call 10b6fc 1090fa: 83 c4 10 add $0x10,%esp 1090fd: e9 03 ff ff ff jmp 109005 109102: 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); 109104: 9c pushf <== NOT EXECUTED 109105: fa cli <== NOT EXECUTED 109106: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 109107: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10910d: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 109110: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 109116: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 10911d: 00 00 00 rtems_interrupt_enable(level); 109120: 52 push %edx <== NOT EXECUTED 109121: 9d popf <== NOT EXECUTED 109122: 31 ff xor %edi,%edi 109124: eb 96 jmp 1090bc 109126: 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, 109128: 56 push %esi <== NOT EXECUTED 109129: 6a 01 push $0x1 <== NOT EXECUTED 10912b: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 10912e: 50 push %eax <== NOT EXECUTED 10912f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109132: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 109138: 9c pushf <== NOT EXECUTED 109139: fa cli <== NOT EXECUTED 10913a: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10913b: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 109141: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109147: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10914a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 109150: 52 push %edx <== NOT EXECUTED 109151: 9d popf <== NOT EXECUTED 109152: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 109157: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10915a: 89 f8 mov %edi,%eax <== NOT EXECUTED 10915c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10915f: 5b pop %ebx <== NOT EXECUTED 109160: 5e pop %esi <== NOT EXECUTED 109161: 5f pop %edi <== NOT EXECUTED 109162: c9 leave <== NOT EXECUTED 109163: 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, 109164: 51 push %ecx <== NOT EXECUTED 109165: 6a 01 push $0x1 <== NOT EXECUTED 109167: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 10916a: 50 push %eax <== NOT EXECUTED 10916b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10916e: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 109174: 9c pushf <== NOT EXECUTED 109175: fa cli <== NOT EXECUTED 109176: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 109177: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 10917d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109183: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 109186: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 10918c: 52 push %edx <== NOT EXECUTED 10918d: 9d popf <== NOT EXECUTED 10918e: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 109193: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 109196: 89 f8 mov %edi,%eax <== NOT EXECUTED 109198: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10919b: 5b pop %ebx <== NOT EXECUTED 10919c: 5e pop %esi <== NOT EXECUTED 10919d: 5f pop %edi <== NOT EXECUTED 10919e: c9 leave <== NOT EXECUTED 10919f: c3 ret <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 1091a0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1091a3: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 1091a9: e8 4e 25 00 00 call 10b6fc <== NOT EXECUTED 1091ae: 31 ff xor %edi,%edi <== NOT EXECUTED 1091b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1091b3: e9 cf fe ff ff jmp 109087 <== NOT EXECUTED 0010aad8 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 10aad8: 55 push %ebp <== NOT EXECUTED 10aad9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10aadb: 57 push %edi <== NOT EXECUTED 10aadc: 56 push %esi <== NOT EXECUTED 10aadd: 53 push %ebx <== NOT EXECUTED 10aade: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10aae1: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10aae4: 8d 75 e0 lea -0x20(%ebp),%esi <== NOT EXECUTED 10aae7: 8d 7d e7 lea -0x19(%ebp),%edi <== NOT EXECUTED 10aaea: 66 90 xchg %ax,%ax <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 10aaec: 56 push %esi <== NOT EXECUTED 10aaed: 6a 00 push $0x0 <== NOT EXECUTED 10aaef: 6a 02 push $0x2 <== NOT EXECUTED 10aaf1: 6a 03 push $0x3 <== NOT EXECUTED 10aaf3: e8 74 04 00 00 call 10af6c <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 10aaf8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aafb: f6 45 e0 01 testb $0x1,-0x20(%ebp) <== NOT EXECUTED 10aaff: 75 27 jne 10ab28 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 10ab01: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ab04: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10ab07: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (c != EOF) { 10ab0d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ab10: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 10ab13: 74 d7 je 10aaec <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 10ab15: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 10ab18: 50 push %eax <== NOT EXECUTED 10ab19: 6a 01 push $0x1 <== NOT EXECUTED 10ab1b: 57 push %edi <== NOT EXECUTED 10ab1c: 53 push %ebx <== NOT EXECUTED 10ab1d: e8 fe e6 ff ff call 109220 <== NOT EXECUTED 10ab22: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ab25: eb c5 jmp 10aaec <== NOT EXECUTED 10ab27: 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; 10ab28: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 10ab2f: 00 00 00 rtems_task_delete(RTEMS_SELF); 10ab32: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ab35: 6a 00 push $0x0 <== NOT EXECUTED 10ab37: e8 c0 0d 00 00 call 10b8fc <== NOT EXECUTED 10ab3c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ab3f: eb ab jmp 10aaec <== NOT EXECUTED 00108f64 : * 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) { 108f64: 55 push %ebp <== NOT EXECUTED 108f65: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108f67: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 108f6a: 6a 02 push $0x2 <== NOT EXECUTED 108f6c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 108f6f: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED 108f75: e8 76 21 00 00 call 10b0f0 <== NOT EXECUTED 108f7a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 108f7d: c9 leave <== NOT EXECUTED 108f7e: c3 ret <== NOT EXECUTED 0010aa6c : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 10aa6c: 55 push %ebp <== NOT EXECUTED 10aa6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10aa6f: 56 push %esi <== NOT EXECUTED 10aa70: 53 push %ebx <== NOT EXECUTED 10aa71: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10aa74: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10aa77: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 10aa7a: 66 90 xchg %ax,%ax <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 10aa7c: 56 push %esi <== NOT EXECUTED 10aa7d: 6a 00 push $0x0 <== NOT EXECUTED 10aa7f: 6a 02 push $0x2 <== NOT EXECUTED 10aa81: 6a 03 push $0x3 <== NOT EXECUTED 10aa83: e8 e4 04 00 00 call 10af6c <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 10aa88: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aa8b: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED 10aa8f: 75 2b jne 10aabc <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10aa91: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 10aa97: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10aa9a: 8b 80 34 6f 12 00 mov 0x126f34(%eax),%eax <== NOT EXECUTED 10aaa0: 85 c0 test %eax,%eax <== NOT EXECUTED 10aaa2: 74 09 je 10aaad <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 10aaa4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aaa7: 53 push %ebx <== NOT EXECUTED 10aaa8: ff d0 call *%eax <== NOT EXECUTED 10aaaa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 10aaad: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aab0: 53 push %ebx <== NOT EXECUTED 10aab1: e8 ca e4 ff ff call 108f80 <== NOT EXECUTED 10aab6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aab9: eb c1 jmp 10aa7c <== NOT EXECUTED 10aabb: 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; 10aabc: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 10aac3: 00 00 00 rtems_task_delete(RTEMS_SELF); 10aac6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aac9: 6a 00 push $0x0 <== NOT EXECUTED 10aacb: e8 2c 0e 00 00 call 10b8fc <== NOT EXECUTED 10aad0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aad3: eb a7 jmp 10aa7c <== NOT EXECUTED 00109b60 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 109b60: 55 push %ebp 109b61: 89 e5 mov %esp,%ebp 109b63: 57 push %edi 109b64: 56 push %esi 109b65: 53 push %ebx 109b66: 83 ec 20 sub $0x20,%esp 109b69: 8b 7d 08 mov 0x8(%ebp),%edi rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109b6c: 8b 07 mov (%edi),%eax 109b6e: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109b71: 6a 00 push $0x0 109b73: 6a 00 push $0x0 109b75: ff 76 18 pushl 0x18(%esi) 109b78: e8 83 1a 00 00 call 10b600 109b7d: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) 109b80: 83 c4 10 add $0x10,%esp 109b83: 85 c0 test %eax,%eax 109b85: 75 29 jne 109bb0 <== ALWAYS TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 109b87: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 109b8d: c1 e0 05 shl $0x5,%eax 109b90: 8b 80 2c 6f 12 00 mov 0x126f2c(%eax),%eax 109b96: 85 c0 test %eax,%eax 109b98: 74 22 je 109bbc <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 109b9a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109b9d: 57 push %edi <== NOT EXECUTED 109b9e: 56 push %esi <== NOT EXECUTED 109b9f: ff d0 call *%eax <== NOT EXECUTED 109ba1: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 109ba4: 5f pop %edi <== NOT EXECUTED 109ba5: ff 76 18 pushl 0x18(%esi) <== NOT EXECUTED 109ba8: e8 4f 1b 00 00 call 10b6fc <== NOT EXECUTED return sc; 109bad: 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; } 109bb0: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 109bb3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109bb6: 5b pop %ebx <== NOT EXECUTED 109bb7: 5e pop %esi <== NOT EXECUTED 109bb8: 5f pop %edi <== NOT EXECUTED 109bb9: c9 leave <== NOT EXECUTED 109bba: c3 ret <== NOT EXECUTED 109bbb: 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) { 109bbc: f6 46 34 01 testb $0x1,0x34(%esi) 109bc0: 74 4e je 109c10 <== ALWAYS TAKEN uint32_t count = args->count; 109bc2: 8b 47 10 mov 0x10(%edi),%eax 109bc5: 89 45 e0 mov %eax,-0x20(%ebp) char *buffer = args->buffer; 109bc8: 8b 47 0c mov 0xc(%edi),%eax while (count--) 109bcb: 8b 5d e0 mov -0x20(%ebp),%ebx 109bce: 85 db test %ebx,%ebx 109bd0: 74 56 je 109c28 <== ALWAYS TAKEN 109bd2: 31 db xor %ebx,%ebx 109bd4: 89 7d dc mov %edi,-0x24(%ebp) 109bd7: 89 c7 mov %eax,%edi 109bd9: 8d 76 00 lea 0x0(%esi),%esi oproc (*buffer++, tty); 109bdc: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 109be0: 89 f2 mov %esi,%edx 109be2: e8 7d fa ff ff call 109664 109be7: 43 inc %ebx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 109be8: 3b 5d e0 cmp -0x20(%ebp),%ebx 109beb: 75 ef jne 109bdc 109bed: 8b 7d dc mov -0x24(%ebp),%edi 109bf0: 8b 47 10 mov 0x10(%edi),%eax oproc (*buffer++, tty); args->bytes_moved = args->count; 109bf3: 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); 109bf6: 83 ec 0c sub $0xc,%esp 109bf9: ff 76 18 pushl 0x18(%esi) 109bfc: e8 fb 1a 00 00 call 10b6fc return sc; 109c01: 83 c4 10 add $0x10,%esp } 109c04: 8b 45 e4 mov -0x1c(%ebp),%eax 109c07: 8d 65 f4 lea -0xc(%ebp),%esp 109c0a: 5b pop %ebx 109c0b: 5e pop %esi 109c0c: 5f pop %edi 109c0d: c9 leave 109c0e: c3 ret 109c0f: 90 nop <== NOT EXECUTED while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 109c10: 51 push %ecx <== NOT EXECUTED 109c11: 56 push %esi <== NOT EXECUTED 109c12: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED 109c15: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED 109c18: e8 13 f9 ff ff call 109530 <== NOT EXECUTED args->bytes_moved = args->count; 109c1d: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED 109c20: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED 109c23: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109c26: eb ce jmp 109bf6 <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 109c28: 31 c0 xor %eax,%eax <== NOT EXECUTED 109c2a: eb c7 jmp 109bf3 <== NOT EXECUTED 00118918 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 118918: 55 push %ebp 118919: 89 e5 mov %esp,%ebp 11891b: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 11891e: 8d 45 f4 lea -0xc(%ebp),%eax 118921: 50 push %eax 118922: ff 75 08 pushl 0x8(%ebp) 118925: 68 40 2b 14 00 push $0x142b40 11892a: e8 e9 29 00 00 call 11b318 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11892f: 83 c4 10 add $0x10,%esp 118932: 8b 55 f4 mov -0xc(%ebp),%edx 118935: 85 d2 test %edx,%edx 118937: 74 07 je 118940 118939: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11893e: c9 leave 11893f: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 118940: 83 78 38 04 cmpl $0x4,0x38(%eax) 118944: 74 0f je 118955 <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118946: 83 ec 0c sub $0xc,%esp 118949: 83 c0 10 add $0x10,%eax 11894c: 50 push %eax 11894d: e8 16 47 00 00 call 11d068 <_Watchdog_Remove> 118952: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118955: e8 a2 32 00 00 call 11bbfc <_Thread_Enable_dispatch> 11895a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11895c: c9 leave 11895d: c3 ret 0010bdec : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10bdec: 55 push %ebp 10bded: 89 e5 mov %esp,%ebp 10bdef: 57 push %edi 10bdf0: 56 push %esi 10bdf1: 53 push %ebx 10bdf2: 83 ec 0c sub $0xc,%esp 10bdf5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bdf8: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bdfb: 85 db test %ebx,%ebx 10bdfd: 74 6d je 10be6c return RTEMS_INVALID_NAME; if ( !id ) 10bdff: 85 f6 test %esi,%esi 10be01: 0f 84 89 00 00 00 je 10be90 10be07: a1 38 88 12 00 mov 0x128838,%eax 10be0c: 40 inc %eax 10be0d: a3 38 88 12 00 mov %eax,0x128838 * 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 ); 10be12: 83 ec 0c sub $0xc,%esp 10be15: 68 40 92 12 00 push $0x129240 10be1a: e8 5d 0e 00 00 call 10cc7c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10be1f: 83 c4 10 add $0x10,%esp 10be22: 85 c0 test %eax,%eax 10be24: 74 56 je 10be7c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10be26: 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; 10be2d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10be34: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10be3b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10be42: 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; 10be49: 8b 50 08 mov 0x8(%eax),%edx 10be4c: 0f b7 fa movzwl %dx,%edi 10be4f: 8b 0d 5c 92 12 00 mov 0x12925c,%ecx 10be55: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10be58: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10be5b: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10be5d: e8 3e 1b 00 00 call 10d9a0 <_Thread_Enable_dispatch> 10be62: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10be64: 8d 65 f4 lea -0xc(%ebp),%esp 10be67: 5b pop %ebx 10be68: 5e pop %esi 10be69: 5f pop %edi 10be6a: c9 leave 10be6b: c3 ret rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10be6c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10be71: 8d 65 f4 lea -0xc(%ebp),%esp 10be74: 5b pop %ebx 10be75: 5e pop %esi 10be76: 5f pop %edi 10be77: c9 leave 10be78: c3 ret 10be79: 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(); 10be7c: e8 1f 1b 00 00 call 10d9a0 <_Thread_Enable_dispatch> 10be81: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10be86: 8d 65 f4 lea -0xc(%ebp),%esp 10be89: 5b pop %ebx 10be8a: 5e pop %esi 10be8b: 5f pop %edi 10be8c: c9 leave 10be8d: c3 ret 10be8e: 66 90 xchg %ax,%ax <== NOT EXECUTED Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10be90: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10be95: 8d 65 f4 lea -0xc(%ebp),%esp 10be98: 5b pop %ebx 10be99: 5e pop %esi 10be9a: 5f pop %edi 10be9b: c9 leave 10be9c: c3 ret 00118a14 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 118a14: 55 push %ebp 118a15: 89 e5 mov %esp,%ebp 118a17: 53 push %ebx 118a18: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 118a1b: 8d 45 f4 lea -0xc(%ebp),%eax 118a1e: 50 push %eax 118a1f: ff 75 08 pushl 0x8(%ebp) 118a22: 68 40 2b 14 00 push $0x142b40 118a27: e8 ec 28 00 00 call 11b318 <_Objects_Get> 118a2c: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118a2e: 83 c4 10 add $0x10,%esp 118a31: 8b 4d f4 mov -0xc(%ebp),%ecx 118a34: 85 c9 test %ecx,%ecx 118a36: 75 38 jne 118a70 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 118a38: 83 ec 08 sub $0x8,%esp 118a3b: 50 push %eax 118a3c: 68 40 2b 14 00 push $0x142b40 118a41: e8 62 24 00 00 call 11aea8 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 118a46: 8d 43 10 lea 0x10(%ebx),%eax 118a49: 89 04 24 mov %eax,(%esp) 118a4c: e8 17 46 00 00 call 11d068 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 118a51: 58 pop %eax 118a52: 5a pop %edx 118a53: 53 push %ebx 118a54: 68 40 2b 14 00 push $0x142b40 118a59: e8 4e 27 00 00 call 11b1ac <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 118a5e: e8 99 31 00 00 call 11bbfc <_Thread_Enable_dispatch> 118a63: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118a65: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a68: 8b 5d fc mov -0x4(%ebp),%ebx 118a6b: c9 leave 118a6c: c3 ret 118a6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118a70: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a75: 8b 5d fc mov -0x4(%ebp),%ebx 118a78: c9 leave 118a79: c3 ret 0010bea0 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10bea0: 55 push %ebp 10bea1: 89 e5 mov %esp,%ebp 10bea3: 57 push %edi 10bea4: 56 push %esi 10bea5: 53 push %ebx 10bea6: 83 ec 2c sub $0x2c,%esp 10bea9: 8b 5d 0c mov 0xc(%ebp),%ebx 10beac: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10beaf: 85 db test %ebx,%ebx 10beb1: 0f 84 99 00 00 00 je 10bf50 return RTEMS_INVALID_NUMBER; if ( !routine ) 10beb7: 85 f6 test %esi,%esi 10beb9: 0f 84 b1 00 00 00 je 10bf70 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 10bebf: 57 push %edi 10bec0: 8d 45 e4 lea -0x1c(%ebp),%eax 10bec3: 50 push %eax 10bec4: ff 75 08 pushl 0x8(%ebp) 10bec7: 68 40 92 12 00 push $0x129240 10becc: e8 5b 12 00 00 call 10d12c <_Objects_Get> 10bed1: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10bed3: 83 c4 10 add $0x10,%esp 10bed6: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bed9: 85 c9 test %ecx,%ecx 10bedb: 74 0f je 10beec 10bedd: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bee2: 8d 65 f4 lea -0xc(%ebp),%esp 10bee5: 5b pop %ebx 10bee6: 5e pop %esi 10bee7: 5f pop %edi 10bee8: c9 leave 10bee9: c3 ret 10beea: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10beec: 8d 50 10 lea 0x10(%eax),%edx 10beef: 83 ec 0c sub $0xc,%esp 10bef2: 52 push %edx 10bef3: 89 55 d4 mov %edx,-0x2c(%ebp) 10bef6: e8 51 2b 00 00 call 10ea4c <_Watchdog_Remove> _ISR_Disable( level ); 10befb: 9c pushf 10befc: fa cli 10befd: 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 ) { 10befe: 83 c4 10 add $0x10,%esp 10bf01: 8b 57 18 mov 0x18(%edi),%edx 10bf04: 85 d2 test %edx,%edx 10bf06: 8b 55 d4 mov -0x2c(%ebp),%edx 10bf09: 75 55 jne 10bf60 /* * 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; 10bf0b: 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; 10bf12: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10bf19: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10bf1c: 8b 4d 08 mov 0x8(%ebp),%ecx 10bf1f: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10bf22: 8b 4d 14 mov 0x14(%ebp),%ecx 10bf25: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10bf28: 50 push %eax 10bf29: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bf2a: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bf2d: 83 ec 08 sub $0x8,%esp 10bf30: 52 push %edx 10bf31: 68 18 89 12 00 push $0x128918 10bf36: e8 d9 29 00 00 call 10e914 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10bf3b: e8 60 1a 00 00 call 10d9a0 <_Thread_Enable_dispatch> 10bf40: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bf42: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bf45: 8d 65 f4 lea -0xc(%ebp),%esp 10bf48: 5b pop %ebx 10bf49: 5e pop %esi 10bf4a: 5f pop %edi 10bf4b: c9 leave 10bf4c: c3 ret 10bf4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10bf50: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bf55: 8d 65 f4 lea -0xc(%ebp),%esp 10bf58: 5b pop %ebx 10bf59: 5e pop %esi 10bf5a: 5f pop %edi 10bf5b: c9 leave 10bf5c: c3 ret 10bf5d: 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 ); 10bf60: 50 push %eax 10bf61: 9d popf _Thread_Enable_dispatch(); 10bf62: e8 39 1a 00 00 call 10d9a0 <_Thread_Enable_dispatch> 10bf67: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bf69: e9 74 ff ff ff jmp 10bee2 10bf6e: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 10bf70: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bf75: 8d 65 f4 lea -0xc(%ebp),%esp 10bf78: 5b pop %ebx 10bf79: 5e pop %esi 10bf7a: 5f pop %edi 10bf7b: c9 leave 10bf7c: c3 ret 00118b5c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118b5c: 55 push %ebp 118b5d: 89 e5 mov %esp,%ebp 118b5f: 57 push %edi 118b60: 56 push %esi 118b61: 53 push %ebx 118b62: 83 ec 2c sub $0x2c,%esp 118b65: 8b 75 08 mov 0x8(%ebp),%esi 118b68: 8b 7d 0c mov 0xc(%ebp),%edi 118b6b: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 118b6e: 80 3d 4c 21 14 00 00 cmpb $0x0,0x14214c 118b75: 75 0d jne 118b84 118b77: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b7c: 8d 65 f4 lea -0xc(%ebp),%esp 118b7f: 5b pop %ebx 118b80: 5e pop %esi 118b81: 5f pop %edi 118b82: c9 leave 118b83: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 118b84: 83 ec 0c sub $0xc,%esp 118b87: 57 push %edi 118b88: e8 67 d4 ff ff call 115ff4 <_TOD_Validate> 118b8d: 83 c4 10 add $0x10,%esp 118b90: 84 c0 test %al,%al 118b92: 74 1e je 118bb2 return RTEMS_INVALID_CLOCK; if ( !routine ) 118b94: 85 db test %ebx,%ebx 118b96: 0f 84 a4 00 00 00 je 118c40 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 118b9c: 83 ec 0c sub $0xc,%esp 118b9f: 57 push %edi 118ba0: e8 c3 d3 ff ff call 115f68 <_TOD_To_seconds> 118ba5: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118ba7: 83 c4 10 add $0x10,%esp 118baa: 3b 05 cc 21 14 00 cmp 0x1421cc,%eax 118bb0: 77 0e ja 118bc0 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 118bb2: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118bb7: 8d 65 f4 lea -0xc(%ebp),%esp 118bba: 5b pop %ebx 118bbb: 5e pop %esi 118bbc: 5f pop %edi 118bbd: c9 leave 118bbe: c3 ret 118bbf: 90 nop <== NOT EXECUTED 118bc0: 50 push %eax 118bc1: 8d 45 e4 lea -0x1c(%ebp),%eax 118bc4: 50 push %eax 118bc5: 56 push %esi 118bc6: 68 40 2b 14 00 push $0x142b40 118bcb: e8 48 27 00 00 call 11b318 <_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 ) { 118bd0: 83 c4 10 add $0x10,%esp 118bd3: 8b 4d e4 mov -0x1c(%ebp),%ecx 118bd6: 85 c9 test %ecx,%ecx 118bd8: 75 5a jne 118c34 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118bda: 8d 48 10 lea 0x10(%eax),%ecx 118bdd: 83 ec 0c sub $0xc,%esp 118be0: 51 push %ecx 118be1: 89 45 d4 mov %eax,-0x2c(%ebp) 118be4: 89 4d d0 mov %ecx,-0x30(%ebp) 118be7: e8 7c 44 00 00 call 11d068 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 118bec: 8b 55 d4 mov -0x2c(%ebp),%edx 118bef: 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; 118bf6: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118bfd: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118c00: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 118c03: 8b 45 14 mov 0x14(%ebp),%eax 118c06: 89 42 34 mov %eax,0x34(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118c09: 2b 3d cc 21 14 00 sub 0x1421cc,%edi 118c0f: 89 7a 1c mov %edi,0x1c(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118c12: 58 pop %eax 118c13: 5a pop %edx 118c14: 8b 4d d0 mov -0x30(%ebp),%ecx 118c17: 51 push %ecx 118c18: 68 0c 22 14 00 push $0x14220c 118c1d: e8 0e 43 00 00 call 11cf30 <_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(); 118c22: e8 d5 2f 00 00 call 11bbfc <_Thread_Enable_dispatch> 118c27: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118c29: 83 c4 10 add $0x10,%esp 118c2c: e9 4b ff ff ff jmp 118b7c 118c31: 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 ) { 118c34: b8 04 00 00 00 mov $0x4,%eax 118c39: e9 3e ff ff ff jmp 118b7c 118c3e: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 118c40: b8 09 00 00 00 mov $0x9,%eax 118c45: e9 32 ff ff ff jmp 118b7c 00118c4c : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 118c4c: 55 push %ebp 118c4d: 89 e5 mov %esp,%ebp 118c4f: 53 push %ebx 118c50: 83 ec 14 sub $0x14,%esp 118c53: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 118c56: 85 db test %ebx,%ebx 118c58: 74 4a je 118ca4 118c5a: 51 push %ecx 118c5b: 8d 45 f4 lea -0xc(%ebp),%eax 118c5e: 50 push %eax 118c5f: ff 75 08 pushl 0x8(%ebp) 118c62: 68 40 2b 14 00 push $0x142b40 118c67: e8 ac 26 00 00 call 11b318 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118c6c: 83 c4 10 add $0x10,%esp 118c6f: 8b 55 f4 mov -0xc(%ebp),%edx 118c72: 85 d2 test %edx,%edx 118c74: 74 0a je 118c80 118c76: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c7b: 8b 5d fc mov -0x4(%ebp),%ebx 118c7e: c9 leave 118c7f: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 118c80: 8b 50 38 mov 0x38(%eax),%edx 118c83: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 118c85: 8b 50 1c mov 0x1c(%eax),%edx 118c88: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 118c8b: 8b 50 24 mov 0x24(%eax),%edx 118c8e: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 118c91: 8b 40 28 mov 0x28(%eax),%eax 118c94: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 118c97: e8 60 2f 00 00 call 11bbfc <_Thread_Enable_dispatch> 118c9c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c9e: 8b 5d fc mov -0x4(%ebp),%ebx 118ca1: c9 leave 118ca2: c3 ret 118ca3: 90 nop <== NOT EXECUTED ) { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 118ca4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118ca9: 8b 5d fc mov -0x4(%ebp),%ebx 118cac: c9 leave 118cad: c3 ret 00118f5c : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 118f5c: 55 push %ebp 118f5d: 89 e5 mov %esp,%ebp 118f5f: 56 push %esi 118f60: 53 push %ebx 118f61: 83 ec 10 sub $0x10,%esp 118f64: 8b 45 08 mov 0x8(%ebp),%eax 118f67: 85 c0 test %eax,%eax 118f69: 75 0d jne 118f78 if (status) { initialized = false; } #endif return status; 118f6b: b8 13 00 00 00 mov $0x13,%eax } 118f70: 8d 65 f8 lea -0x8(%ebp),%esp 118f73: 5b pop %ebx 118f74: 5e pop %esi 118f75: c9 leave 118f76: c3 ret 118f77: 90 nop <== NOT EXECUTED 118f78: 0f b6 15 34 9b 13 00 movzbl 0x139b34,%edx 118f7f: 39 d0 cmp %edx,%eax 118f81: 76 35 jbe 118fb8 * 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 ) 118f83: 40 inc %eax 118f84: 75 e5 jne 118f6b 118f86: 31 f6 xor %esi,%esi 118f88: 8b 15 38 21 14 00 mov 0x142138,%edx 118f8e: 42 inc %edx 118f8f: 89 15 38 21 14 00 mov %edx,0x142138 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 118f95: 8a 1d a0 d9 13 00 mov 0x13d9a0,%bl initialized = true; 118f9b: c6 05 a0 d9 13 00 01 movb $0x1,0x13d9a0 _Thread_Enable_dispatch(); 118fa2: e8 55 2c 00 00 call 11bbfc <_Thread_Enable_dispatch> if ( tmpInitialized ) 118fa7: 84 db test %bl,%bl 118fa9: 74 11 je 118fbc 118fab: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 118fb0: 8d 65 f8 lea -0x8(%ebp),%esp 118fb3: 5b pop %ebx 118fb4: 5e pop %esi 118fb5: c9 leave 118fb6: c3 ret 118fb7: 90 nop <== NOT EXECUTED 118fb8: 89 c6 mov %eax,%esi 118fba: eb cc jmp 118f88 * 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( 118fbc: 83 ec 08 sub $0x8,%esp 118fbf: 8d 45 f4 lea -0xc(%ebp),%eax 118fc2: 50 push %eax 118fc3: 8b 45 10 mov 0x10(%ebp),%eax 118fc6: 80 cc 80 or $0x80,%ah 118fc9: 50 push %eax 118fca: 68 00 01 00 00 push $0x100 118fcf: ff 75 0c pushl 0xc(%ebp) 118fd2: 56 push %esi 118fd3: 68 45 4d 49 54 push $0x54494d45 118fd8: e8 87 f0 ff ff call 118064 /* 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) { 118fdd: 83 c4 20 add $0x20,%esp 118fe0: 85 c0 test %eax,%eax 118fe2: 74 10 je 118ff4 initialized = false; 118fe4: c6 05 a0 d9 13 00 00 movb $0x0,0x13d9a0 initialized = false; } #endif return status; } 118feb: 8d 65 f8 lea -0x8(%ebp),%esp 118fee: 5b pop %ebx 118fef: 5e pop %esi 118ff0: c9 leave 118ff1: c3 ret 118ff2: 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) 118ff4: 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( 118ff7: 0f b7 c8 movzwl %ax,%ecx 118ffa: 8b 15 dc 20 14 00 mov 0x1420dc,%edx 119000: 8b 14 8a mov (%edx,%ecx,4),%edx 119003: 89 15 c0 d9 13 00 mov %edx,0x13d9c0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 119009: c7 05 f0 d9 13 00 f4 movl $0x13d9f4,0x13d9f0 119010: d9 13 00 the_chain->permanent_null = NULL; 119013: c7 05 f4 d9 13 00 00 movl $0x0,0x13d9f4 11901a: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11901d: c7 05 f8 d9 13 00 f0 movl $0x13d9f0,0x13d9f8 119024: d9 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 119027: c7 05 28 da 13 00 2c movl $0x13da2c,0x13da28 11902e: da 13 00 the_chain->permanent_null = NULL; 119031: c7 05 2c da 13 00 00 movl $0x0,0x13da2c 119038: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11903b: c7 05 30 da 13 00 28 movl $0x13da28,0x13da30 119042: da 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119045: c7 05 d0 d9 13 00 00 movl $0x0,0x13d9d0 11904c: 00 00 00 the_watchdog->routine = routine; 11904f: c7 05 e4 d9 13 00 64 movl $0x11ba64,0x13d9e4 119056: ba 11 00 the_watchdog->id = id; 119059: a3 e8 d9 13 00 mov %eax,0x13d9e8 the_watchdog->user_data = user_data; 11905e: c7 05 ec d9 13 00 00 movl $0x0,0x13d9ec 119065: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119068: c7 05 08 da 13 00 00 movl $0x0,0x13da08 11906f: 00 00 00 the_watchdog->routine = routine; 119072: c7 05 1c da 13 00 64 movl $0x11ba64,0x13da1c 119079: ba 11 00 the_watchdog->id = id; 11907c: a3 20 da 13 00 mov %eax,0x13da20 the_watchdog->user_data = user_data; 119081: c7 05 24 da 13 00 00 movl $0x0,0x13da24 119088: 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; 11908b: c7 05 c4 d9 13 00 30 movl $0x119330,0x13d9c4 119092: 93 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 119095: 8b 15 a4 22 14 00 mov 0x1422a4,%edx 11909b: 89 15 fc d9 13 00 mov %edx,0x13d9fc ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1190a1: 8b 15 cc 21 14 00 mov 0x1421cc,%edx 1190a7: 89 15 34 da 13 00 mov %edx,0x13da34 ts->insert_chain = NULL; 1190ad: c7 05 38 da 13 00 00 movl $0x0,0x13da38 1190b4: 00 00 00 ts->active = false; 1190b7: c6 05 3c da 13 00 00 movb $0x0,0x13da3c /* * The default timer server is now available. */ _Timer_server = ts; 1190be: c7 05 80 2b 14 00 c0 movl $0x13d9c0,0x142b80 1190c5: d9 13 00 /* * Start the timer server */ status = rtems_task_start( 1190c8: 52 push %edx 1190c9: 68 c0 d9 13 00 push $0x13d9c0 1190ce: 68 84 91 11 00 push $0x119184 1190d3: 50 push %eax 1190d4: e8 23 f6 ff ff call 1186fc if (status) { initialized = false; } #endif return status; 1190d9: 83 c4 10 add $0x10,%esp 1190dc: e9 8f fe ff ff jmp 118f70 00118cd4 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118cd4: 55 push %ebp 118cd5: 89 e5 mov %esp,%ebp 118cd7: 56 push %esi 118cd8: 53 push %ebx 118cd9: 83 ec 24 sub $0x24,%esp 118cdc: 8d 45 f4 lea -0xc(%ebp),%eax 118cdf: 50 push %eax 118ce0: ff 75 08 pushl 0x8(%ebp) 118ce3: 68 40 2b 14 00 push $0x142b40 118ce8: e8 2b 26 00 00 call 11b318 <_Objects_Get> 118ced: 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 ) { 118cef: 83 c4 10 add $0x10,%esp 118cf2: 8b 45 f4 mov -0xc(%ebp),%eax 118cf5: 85 c0 test %eax,%eax 118cf7: 74 0f je 118d08 118cf9: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118cfe: 8d 65 f8 lea -0x8(%ebp),%esp 118d01: 5b pop %ebx 118d02: 5e pop %esi 118d03: c9 leave 118d04: c3 ret 118d05: 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 ) { 118d08: 8b 43 38 mov 0x38(%ebx),%eax 118d0b: 85 c0 test %eax,%eax 118d0d: 74 1d je 118d2c _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118d0f: 48 dec %eax 118d10: 74 3a je 118d4c 118d12: 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(); 118d17: 89 45 e4 mov %eax,-0x1c(%ebp) 118d1a: e8 dd 2e 00 00 call 11bbfc <_Thread_Enable_dispatch> 118d1f: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118d22: 8d 65 f8 lea -0x8(%ebp),%esp 118d25: 5b pop %ebx 118d26: 5e pop %esi 118d27: c9 leave 118d28: c3 ret 118d29: 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 ); 118d2c: 83 c3 10 add $0x10,%ebx 118d2f: 83 ec 0c sub $0xc,%esp 118d32: 53 push %ebx 118d33: e8 30 43 00 00 call 11d068 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118d38: 59 pop %ecx 118d39: 5e pop %esi 118d3a: 53 push %ebx 118d3b: 68 18 22 14 00 push $0x142218 118d40: e8 eb 41 00 00 call 11cf30 <_Watchdog_Insert> 118d45: 31 c0 xor %eax,%eax 118d47: 83 c4 10 add $0x10,%esp 118d4a: eb cb jmp 118d17 } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 118d4c: 8b 35 80 2b 14 00 mov 0x142b80,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118d52: 83 ec 0c sub $0xc,%esp 118d55: 8d 43 10 lea 0x10(%ebx),%eax 118d58: 50 push %eax 118d59: e8 0a 43 00 00 call 11d068 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118d5e: 58 pop %eax 118d5f: 5a pop %edx 118d60: 53 push %ebx 118d61: 56 push %esi 118d62: ff 56 04 call *0x4(%esi) 118d65: 31 c0 xor %eax,%eax 118d67: 83 c4 10 add $0x10,%esp 118d6a: eb ab jmp 118d17 00118d6c : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118d6c: 55 push %ebp 118d6d: 89 e5 mov %esp,%ebp 118d6f: 57 push %edi 118d70: 56 push %esi 118d71: 53 push %ebx 118d72: 83 ec 2c sub $0x2c,%esp 118d75: 8b 7d 0c mov 0xc(%ebp),%edi 118d78: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 118d7b: 8b 1d 80 2b 14 00 mov 0x142b80,%ebx if ( !timer_server ) 118d81: 85 db test %ebx,%ebx 118d83: 0f 84 9f 00 00 00 je 118e28 return RTEMS_INCORRECT_STATE; if ( !routine ) 118d89: 85 f6 test %esi,%esi 118d8b: 0f 84 a3 00 00 00 je 118e34 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118d91: 85 ff test %edi,%edi 118d93: 75 0f jne 118da4 118d95: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118d9a: 8d 65 f4 lea -0xc(%ebp),%esp 118d9d: 5b pop %ebx 118d9e: 5e pop %esi 118d9f: 5f pop %edi 118da0: c9 leave 118da1: c3 ret 118da2: 66 90 xchg %ax,%ax <== NOT EXECUTED 118da4: 52 push %edx 118da5: 8d 45 e4 lea -0x1c(%ebp),%eax 118da8: 50 push %eax 118da9: ff 75 08 pushl 0x8(%ebp) 118dac: 68 40 2b 14 00 push $0x142b40 118db1: e8 62 25 00 00 call 11b318 <_Objects_Get> 118db6: 89 c2 mov %eax,%edx if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118db8: 83 c4 10 add $0x10,%esp 118dbb: 8b 45 e4 mov -0x1c(%ebp),%eax 118dbe: 85 c0 test %eax,%eax 118dc0: 75 56 jne 118e18 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118dc2: 83 ec 0c sub $0xc,%esp 118dc5: 8d 42 10 lea 0x10(%edx),%eax 118dc8: 50 push %eax 118dc9: 89 55 d4 mov %edx,-0x2c(%ebp) 118dcc: e8 97 42 00 00 call 11d068 <_Watchdog_Remove> _ISR_Disable( level ); 118dd1: 9c pushf 118dd2: fa cli 118dd3: 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 ) { 118dd4: 83 c4 10 add $0x10,%esp 118dd7: 8b 55 d4 mov -0x2c(%ebp),%edx 118dda: 8b 4a 18 mov 0x18(%edx),%ecx 118ddd: 85 c9 test %ecx,%ecx 118ddf: 75 5f jne 118e40 /* * 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; 118de1: 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; 118de8: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118def: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118df2: 8b 4d 08 mov 0x8(%ebp),%ecx 118df5: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118df8: 8b 4d 14 mov 0x14(%ebp),%ecx 118dfb: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 118dfe: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118e01: 50 push %eax 118e02: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118e03: 83 ec 08 sub $0x8,%esp 118e06: 52 push %edx 118e07: 53 push %ebx 118e08: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118e0b: e8 ec 2d 00 00 call 11bbfc <_Thread_Enable_dispatch> 118e10: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118e12: 83 c4 10 add $0x10,%esp 118e15: eb 83 jmp 118d9a 118e17: 90 nop <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118e18: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118e1d: 8d 65 f4 lea -0xc(%ebp),%esp 118e20: 5b pop %ebx 118e21: 5e pop %esi 118e22: 5f pop %edi 118e23: c9 leave 118e24: c3 ret 118e25: 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 ) 118e28: b8 0e 00 00 00 mov $0xe,%eax 118e2d: e9 68 ff ff ff jmp 118d9a 118e32: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !routine ) 118e34: b8 09 00 00 00 mov $0x9,%eax 118e39: e9 5c ff ff ff jmp 118d9a 118e3e: 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 ); 118e40: 50 push %eax 118e41: 9d popf _Thread_Enable_dispatch(); 118e42: e8 b5 2d 00 00 call 11bbfc <_Thread_Enable_dispatch> 118e47: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118e49: e9 4c ff ff ff jmp 118d9a 00118e50 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118e50: 55 push %ebp 118e51: 89 e5 mov %esp,%ebp 118e53: 57 push %edi 118e54: 56 push %esi 118e55: 53 push %ebx 118e56: 83 ec 2c sub $0x2c,%esp 118e59: 8b 7d 0c mov 0xc(%ebp),%edi 118e5c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118e5f: 8b 1d 80 2b 14 00 mov 0x142b80,%ebx if ( !timer_server ) 118e65: 85 db test %ebx,%ebx 118e67: 0f 84 d7 00 00 00 je 118f44 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118e6d: 80 3d 4c 21 14 00 00 cmpb $0x0,0x14214c 118e74: 0f 84 aa 00 00 00 je 118f24 <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 118e7a: 85 f6 test %esi,%esi 118e7c: 0f 84 b2 00 00 00 je 118f34 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118e82: 83 ec 0c sub $0xc,%esp 118e85: 57 push %edi 118e86: e8 69 d1 ff ff call 115ff4 <_TOD_Validate> 118e8b: 83 c4 10 add $0x10,%esp 118e8e: 84 c0 test %al,%al 118e90: 75 0e jne 118ea0 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 118e92: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118e97: 8d 65 f4 lea -0xc(%ebp),%esp 118e9a: 5b pop %ebx 118e9b: 5e pop %esi 118e9c: 5f pop %edi 118e9d: c9 leave 118e9e: c3 ret 118e9f: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118ea0: 83 ec 0c sub $0xc,%esp 118ea3: 57 push %edi 118ea4: e8 bf d0 ff ff call 115f68 <_TOD_To_seconds> 118ea9: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118eab: 83 c4 10 add $0x10,%esp 118eae: 3b 05 cc 21 14 00 cmp 0x1421cc,%eax 118eb4: 76 dc jbe 118e92 118eb6: 52 push %edx 118eb7: 8d 45 e4 lea -0x1c(%ebp),%eax 118eba: 50 push %eax 118ebb: ff 75 08 pushl 0x8(%ebp) 118ebe: 68 40 2b 14 00 push $0x142b40 118ec3: e8 50 24 00 00 call 11b318 <_Objects_Get> 118ec8: 89 c2 mov %eax,%edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118eca: 83 c4 10 add $0x10,%esp 118ecd: 8b 45 e4 mov -0x1c(%ebp),%eax 118ed0: 85 c0 test %eax,%eax 118ed2: 75 7c jne 118f50 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118ed4: 83 ec 0c sub $0xc,%esp 118ed7: 8d 42 10 lea 0x10(%edx),%eax 118eda: 50 push %eax 118edb: 89 55 d4 mov %edx,-0x2c(%ebp) 118ede: e8 85 41 00 00 call 11d068 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118ee3: 8b 55 d4 mov -0x2c(%ebp),%edx 118ee6: 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; 118eed: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118ef4: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118ef7: 8b 45 08 mov 0x8(%ebp),%eax 118efa: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 118efd: 8b 45 14 mov 0x14(%ebp),%eax 118f00: 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(); 118f03: 2b 3d cc 21 14 00 sub 0x1421cc,%edi 118f09: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 118f0c: 58 pop %eax 118f0d: 59 pop %ecx 118f0e: 52 push %edx 118f0f: 53 push %ebx 118f10: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118f13: e8 e4 2c 00 00 call 11bbfc <_Thread_Enable_dispatch> 118f18: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118f1a: 83 c4 10 add $0x10,%esp 118f1d: e9 75 ff ff ff jmp 118e97 118f22: 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 ) 118f24: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118f29: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118f2c: 5b pop %ebx <== NOT EXECUTED 118f2d: 5e pop %esi <== NOT EXECUTED 118f2e: 5f pop %edi <== NOT EXECUTED 118f2f: c9 leave <== NOT EXECUTED 118f30: c3 ret <== NOT EXECUTED 118f31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 118f34: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118f39: 8d 65 f4 lea -0xc(%ebp),%esp 118f3c: 5b pop %ebx 118f3d: 5e pop %esi 118f3e: 5f pop %edi 118f3f: c9 leave 118f40: c3 ret 118f41: 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 ) 118f44: b8 0e 00 00 00 mov $0xe,%eax 118f49: e9 49 ff ff ff jmp 118e97 118f4e: 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 ) { 118f50: b8 04 00 00 00 mov $0x4,%eax 118f55: e9 3d ff ff ff jmp 118e97 0010cb50 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10cb50: 55 push %ebp <== NOT EXECUTED 10cb51: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cb53: 57 push %edi <== NOT EXECUTED 10cb54: 56 push %esi <== NOT EXECUTED 10cb55: 53 push %ebx <== NOT EXECUTED 10cb56: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10cb59: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10cb5b: 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) 10cb5d: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED 10cb62: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10cb65: 74 2b je 10cb92 <== NOT EXECUTED { if (rtems_panic_in_progress++) 10cb67: 8b 15 60 f6 12 00 mov 0x12f660,%edx <== NOT EXECUTED 10cb6d: 8d 42 01 lea 0x1(%edx),%eax <== NOT EXECUTED 10cb70: a3 60 f6 12 00 mov %eax,0x12f660 <== NOT EXECUTED 10cb75: 85 d2 test %edx,%edx <== NOT EXECUTED 10cb77: 74 10 je 10cb89 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cb79: a1 f8 f7 12 00 mov 0x12f7f8,%eax <== NOT EXECUTED 10cb7e: 40 inc %eax <== NOT EXECUTED 10cb7f: a3 f8 f7 12 00 mov %eax,0x12f7f8 <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 10cb84: a1 60 f6 12 00 mov 0x12f660,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10cb89: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10cb8c: 0f 8f e6 00 00 00 jg 10cc78 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10cb92: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cb95: a1 00 d4 12 00 mov 0x12d400,%eax <== NOT EXECUTED 10cb9a: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10cb9d: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED 10cba0: e8 d3 d4 00 00 call 11a078 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 10cba5: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10cba7: 25 ff ff ff 8f and $0x8fffffff,%eax <== NOT EXECUTED 10cbac: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10cbaf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cbb2: f7 c3 00 00 00 40 test $0x40000000,%ebx <== NOT EXECUTED 10cbb8: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 10cbbb: 0f 85 d7 00 00 00 jne 10cc98 <== NOT EXECUTED 10cbc1: 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); 10cbc3: 52 push %edx <== NOT EXECUTED 10cbc4: 51 push %ecx <== NOT EXECUTED 10cbc5: 56 push %esi <== NOT EXECUTED 10cbc6: a1 00 d4 12 00 mov 0x12d400,%eax <== NOT EXECUTED 10cbcb: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cbce: e8 b9 2f 01 00 call 11fb8c <== NOT EXECUTED 10cbd3: 89 c6 mov %eax,%esi <== NOT EXECUTED if (status) 10cbd5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cbd8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10cbdb: 85 c0 test %eax,%eax <== NOT EXECUTED 10cbdd: 0f 85 c9 00 00 00 jne 10ccac <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 10cbe3: 83 ff 00 cmp $0x0,%edi <== NOT EXECUTED 10cbe6: 74 30 je 10cc18 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 10cbe8: 7e 15 jle 10cbff <== NOT EXECUTED 10cbea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cbed: 57 push %edi <== NOT EXECUTED 10cbee: e8 49 df 00 00 call 11ab3c <== NOT EXECUTED 10cbf3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cbf6: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED 10cbf9: 0f 85 d9 00 00 00 jne 10ccd8 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10cbff: 51 push %ecx <== NOT EXECUTED 10cc00: 57 push %edi <== NOT EXECUTED 10cc01: 68 89 7e 12 00 push $0x127e89 <== NOT EXECUTED 10cc06: a1 00 d4 12 00 mov 0x12d400,%eax <== NOT EXECUTED 10cc0b: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cc0e: e8 ad d7 00 00 call 11a3c0 <== NOT EXECUTED 10cc13: 01 c6 add %eax,%esi <== NOT EXECUTED 10cc15: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 10cc18: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cc1b: 68 6b 71 12 00 push $0x12716b <== NOT EXECUTED 10cc20: a1 00 d4 12 00 mov 0x12d400,%eax <== NOT EXECUTED 10cc25: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cc28: e8 93 d7 00 00 call 11a3c0 <== NOT EXECUTED 10cc2d: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED (void) fflush(stderr); 10cc30: 5a pop %edx <== NOT EXECUTED 10cc31: a1 00 d4 12 00 mov 0x12d400,%eax <== NOT EXECUTED 10cc36: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cc39: e8 3a d4 00 00 call 11a078 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 10cc3e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cc41: 81 e3 00 00 00 30 and $0x30000000,%ebx <== NOT EXECUTED 10cc47: 74 1f je 10cc68 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 10cc49: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10cc4c: 85 c0 test %eax,%eax <== NOT EXECUTED 10cc4e: 74 34 je 10cc84 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 10cc50: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cc53: 68 9d 7e 12 00 push $0x127e9d <== NOT EXECUTED 10cc58: 6a 00 push $0x0 <== NOT EXECUTED 10cc5a: e8 a9 00 00 00 call 10cd08 <== NOT EXECUTED _exit(local_errno); 10cc5f: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED 10cc62: e8 d1 0a 00 00 call 10d738 <_exit> <== NOT EXECUTED 10cc67: 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"); 10cc68: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10cc6b: 01 f0 add %esi,%eax <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 10cc6d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cc70: 5b pop %ebx <== NOT EXECUTED 10cc71: 5e pop %esi <== NOT EXECUTED 10cc72: 5f pop %edi <== NOT EXECUTED 10cc73: c9 leave <== NOT EXECUTED 10cc74: c3 ret <== NOT EXECUTED 10cc75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); abort(); 10cc78: 31 c0 xor %eax,%eax <== NOT EXECUTED } } return chars_written; } 10cc7a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cc7d: 5b pop %ebx <== NOT EXECUTED 10cc7e: 5e pop %esi <== NOT EXECUTED 10cc7f: 5f pop %edi <== NOT EXECUTED 10cc80: c9 leave <== NOT EXECUTED 10cc81: c3 ret <== NOT EXECUTED 10cc82: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 10cc84: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cc87: 68 b2 7e 12 00 push $0x127eb2 <== NOT EXECUTED 10cc8c: 6a 00 push $0x0 <== NOT EXECUTED 10cc8e: e8 75 00 00 00 call 10cd08 <== NOT EXECUTED abort(); 10cc93: e8 30 d0 00 00 call 119cc8 <== 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; 10cc98: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED 10cc9b: e8 5c d0 00 00 call 119cfc <__errno> <== NOT EXECUTED 10cca0: 8b 38 mov (%eax),%edi <== NOT EXECUTED 10cca2: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 10cca5: e9 19 ff ff ff jmp 10cbc3 <== NOT EXECUTED 10ccaa: 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)); 10ccac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ccaf: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10ccb2: e8 81 fe ff ff call 10cb38 <== NOT EXECUTED 10ccb7: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10ccba: 50 push %eax <== NOT EXECUTED 10ccbb: 68 6e 7e 12 00 push $0x127e6e <== NOT EXECUTED 10ccc0: a1 00 d4 12 00 mov 0x12d400,%eax <== NOT EXECUTED 10ccc5: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10ccc8: e8 f3 d6 00 00 call 11a3c0 <== NOT EXECUTED 10cccd: 01 c6 add %eax,%esi <== NOT EXECUTED 10cccf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ccd2: e9 0c ff ff ff jmp 10cbe3 <== NOT EXECUTED 10ccd7: 90 nop <== NOT EXECUTED if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10ccd8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ccdb: 57 push %edi <== NOT EXECUTED 10ccdc: e8 5b de 00 00 call 11ab3c <== NOT EXECUTED 10cce1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10cce4: 50 push %eax <== NOT EXECUTED 10cce5: 68 7c 7e 12 00 push $0x127e7c <== NOT EXECUTED 10ccea: e9 17 ff ff ff jmp 10cc06 <== NOT EXECUTED 0012b524 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 12b524: 55 push %ebp 12b525: 89 e5 mov %esp,%ebp 12b527: 57 push %edi 12b528: 56 push %esi 12b529: 53 push %ebx 12b52a: 83 ec 1c sub $0x1c,%esp 12b52d: 89 c6 mov %eax,%esi 12b52f: 89 55 e0 mov %edx,-0x20(%ebp) 12b532: 31 ff xor %edi,%edi 12b534: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) 12b53b: 31 db xor %ebx,%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 12b53d: 8b 46 04 mov 0x4(%esi),%eax 12b540: 48 dec %eax 12b541: 89 46 04 mov %eax,0x4(%esi) 12b544: 85 c0 test %eax,%eax 12b546: 78 52 js 12b59a <== ALWAYS TAKEN 12b548: 8b 06 mov (%esi),%eax 12b54a: 0f b6 08 movzbl (%eax),%ecx 12b54d: 40 inc %eax 12b54e: 89 06 mov %eax,(%esi) if (c == ':') 12b550: 83 f9 3a cmp $0x3a,%ecx 12b553: 74 5f je 12b5b4 break; if (sign == 0) { 12b555: 85 ff test %edi,%edi 12b557: 75 0e jne 12b567 <== ALWAYS TAKEN if (c == '-') { 12b559: 83 f9 2d cmp $0x2d,%ecx 12b55c: 0f 84 8a 00 00 00 je 12b5ec <== ALWAYS TAKEN sign = -1; limit++; continue; 12b562: bf 01 00 00 00 mov $0x1,%edi } sign = 1; } if (!isdigit(c)) 12b567: a1 08 9b 16 00 mov 0x169b08,%eax 12b56c: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 12b571: 74 6d je 12b5e0 <== ALWAYS TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 12b573: b8 cd cc cc cc mov $0xcccccccd,%eax 12b578: f7 65 e4 mull -0x1c(%ebp) 12b57b: c1 ea 03 shr $0x3,%edx 12b57e: 39 d3 cmp %edx,%ebx 12b580: 77 5e ja 12b5e0 <== ALWAYS TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 12b582: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) 12b585: 39 d3 cmp %edx,%ebx 12b587: 74 47 je 12b5d0 <== ALWAYS TAKEN || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 12b589: 8d 04 9b lea (%ebx,%ebx,4),%eax 12b58c: 8d 1c 41 lea (%ecx,%eax,2),%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 12b58f: 8b 46 04 mov 0x4(%esi),%eax 12b592: 48 dec %eax 12b593: 89 46 04 mov %eax,0x4(%esi) 12b596: 85 c0 test %eax,%eax 12b598: 79 ae jns 12b548 <== NEVER TAKEN 12b59a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b59d: 56 push %esi <== NOT EXECUTED 12b59e: ff 35 20 9b 16 00 pushl 0x169b20 <== NOT EXECUTED 12b5a4: e8 df be 01 00 call 147488 <__srget_r> <== NOT EXECUTED 12b5a9: 89 c1 mov %eax,%ecx <== NOT EXECUTED 12b5ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (c == ':') 12b5ae: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED 12b5b1: 75 a2 jne 12b555 <== NOT EXECUTED 12b5b3: 90 nop <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 12b5b4: 85 ff test %edi,%edi 12b5b6: 74 28 je 12b5e0 <== ALWAYS TAKEN return 0; *val = i * sign; 12b5b8: 0f af df imul %edi,%ebx 12b5bb: 8b 45 e0 mov -0x20(%ebp),%eax 12b5be: 89 18 mov %ebx,(%eax) 12b5c0: b8 01 00 00 00 mov $0x1,%eax return 1; } 12b5c5: 8d 65 f4 lea -0xc(%ebp),%esp 12b5c8: 5b pop %ebx 12b5c9: 5e pop %esi 12b5ca: 5f pop %edi 12b5cb: c9 leave 12b5cc: c3 ret 12b5cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 12b5d0: 8d 04 9b lea (%ebx,%ebx,4),%eax <== NOT EXECUTED 12b5d3: d1 e0 shl %eax <== NOT EXECUTED 12b5d5: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 12b5d8: 29 c2 sub %eax,%edx <== NOT EXECUTED 12b5da: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 12b5dc: 76 ab jbe 12b589 <== NOT EXECUTED 12b5de: 66 90 xchg %ax,%ax <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 12b5e0: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12b5e2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b5e5: 5b pop %ebx <== NOT EXECUTED 12b5e6: 5e pop %esi <== NOT EXECUTED 12b5e7: 5f pop %edi <== NOT EXECUTED 12b5e8: c9 leave <== NOT EXECUTED 12b5e9: c3 ret <== NOT EXECUTED 12b5ea: 66 90 xchg %ax,%ax <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 12b5ec: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED 12b5ef: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED continue; 12b5f4: e9 44 ff ff ff jmp 12b53d <== NOT EXECUTED 0012b5fc : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 12b5fc: 55 push %ebp 12b5fd: 89 e5 mov %esp,%ebp 12b5ff: 57 push %edi 12b600: 56 push %esi 12b601: 53 push %ebx 12b602: 83 ec 0c sub $0xc,%esp 12b605: 89 c3 mov %eax,%ebx 12b607: 89 ce mov %ecx,%esi 12b609: 8b 7d 08 mov 0x8(%ebp),%edi int c; *name = *bufp; 12b60c: 8b 01 mov (%ecx),%eax 12b60e: 89 02 mov %eax,(%edx) 12b610: eb 26 jmp 12b638 12b612: 66 90 xchg %ax,%ax <== NOT EXECUTED for (;;) { c = getc(fp); 12b614: 8b 13 mov (%ebx),%edx 12b616: 0f b6 02 movzbl (%edx),%eax 12b619: 42 inc %edx 12b61a: 89 13 mov %edx,(%ebx) if (c == ':') { 12b61c: 83 f8 3a cmp $0x3a,%eax 12b61f: 74 3b je 12b65c if (nlFlag) return 0; break; } if (c == '\n') { 12b621: 83 f8 0a cmp $0xa,%eax 12b624: 74 56 je 12b67c if (!nlFlag) return 0; break; } if (c == EOF) 12b626: 83 f8 ff cmp $0xffffffff,%eax 12b629: 74 59 je 12b684 <== ALWAYS TAKEN return 0; if (*nleft < 2) 12b62b: 83 3f 01 cmpl $0x1,(%edi) 12b62e: 76 54 jbe 12b684 <== ALWAYS TAKEN return 0; **bufp = c; 12b630: 8b 16 mov (%esi),%edx 12b632: 88 02 mov %al,(%edx) ++(*bufp); 12b634: ff 06 incl (%esi) --(*nleft); 12b636: ff 0f decl (%edi) { int c; *name = *bufp; for (;;) { c = getc(fp); 12b638: 8b 43 04 mov 0x4(%ebx),%eax 12b63b: 48 dec %eax 12b63c: 89 43 04 mov %eax,0x4(%ebx) 12b63f: 85 c0 test %eax,%eax 12b641: 79 d1 jns 12b614 12b643: 83 ec 08 sub $0x8,%esp 12b646: 53 push %ebx 12b647: ff 35 20 9b 16 00 pushl 0x169b20 12b64d: e8 36 be 01 00 call 147488 <__srget_r> 12b652: 83 c4 10 add $0x10,%esp if (c == ':') { 12b655: 83 f8 3a cmp $0x3a,%eax 12b658: 75 c7 jne 12b621 <== NEVER TAKEN 12b65a: 66 90 xchg %ax,%ax <== NOT EXECUTED if (nlFlag) 12b65c: 8b 55 0c mov 0xc(%ebp),%edx 12b65f: 85 d2 test %edx,%edx 12b661: 75 21 jne 12b684 <== ALWAYS TAKEN return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 12b663: 8b 06 mov (%esi),%eax 12b665: c6 00 00 movb $0x0,(%eax) ++(*bufp); 12b668: ff 06 incl (%esi) --(*nleft); 12b66a: ff 0f decl (%edi) 12b66c: b8 01 00 00 00 mov $0x1,%eax return 1; } 12b671: 8d 65 f4 lea -0xc(%ebp),%esp 12b674: 5b pop %ebx 12b675: 5e pop %esi 12b676: 5f pop %edi 12b677: c9 leave 12b678: c3 ret 12b679: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 12b67c: 8b 45 0c mov 0xc(%ebp),%eax 12b67f: 85 c0 test %eax,%eax 12b681: 75 e0 jne 12b663 <== NEVER TAKEN 12b683: 90 nop <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 12b684: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12b686: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b689: 5b pop %ebx <== NOT EXECUTED 12b68a: 5e pop %esi <== NOT EXECUTED 12b68b: 5f pop %edi <== NOT EXECUTED 12b68c: c9 leave <== NOT EXECUTED 12b68d: c3 ret <== NOT EXECUTED 0012b690 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 12b690: 55 push %ebp 12b691: 89 e5 mov %esp,%ebp 12b693: 57 push %edi 12b694: 56 push %esi 12b695: 53 push %ebx 12b696: 83 ec 34 sub $0x34,%esp 12b699: 89 c6 mov %eax,%esi 12b69b: 89 d3 mov %edx,%ebx 12b69d: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 12b6a0: 8d 7d d4 lea -0x2c(%ebp),%edi 12b6a3: 6a 00 push $0x0 12b6a5: 8d 45 08 lea 0x8(%ebp),%eax 12b6a8: 50 push %eax 12b6a9: 89 f9 mov %edi,%ecx 12b6ab: 89 f0 mov %esi,%eax 12b6ad: e8 4a ff ff ff call 12b5fc 12b6b2: 83 c4 10 add $0x10,%esp 12b6b5: 85 c0 test %eax,%eax 12b6b7: 75 0b jne 12b6c4 <== NEVER TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 12b6b9: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12b6bb: 8d 65 f4 lea -0xc(%ebp),%esp 12b6be: 5b pop %ebx 12b6bf: 5e pop %esi 12b6c0: 5f pop %edi 12b6c1: c9 leave 12b6c2: c3 ret 12b6c3: 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) 12b6c4: 83 ec 08 sub $0x8,%esp 12b6c7: 8d 53 04 lea 0x4(%ebx),%edx 12b6ca: 6a 00 push $0x0 12b6cc: 8d 45 08 lea 0x8(%ebp),%eax 12b6cf: 50 push %eax 12b6d0: 89 f9 mov %edi,%ecx 12b6d2: 89 f0 mov %esi,%eax 12b6d4: e8 23 ff ff ff call 12b5fc { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 12b6d9: 83 c4 10 add $0x10,%esp 12b6dc: 85 c0 test %eax,%eax 12b6de: 74 d9 je 12b6b9 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 12b6e0: 8d 55 e4 lea -0x1c(%ebp),%edx 12b6e3: 89 f0 mov %esi,%eax 12b6e5: e8 3a fe ff ff call 12b524 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 12b6ea: 85 c0 test %eax,%eax 12b6ec: 74 cb je 12b6b9 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 12b6ee: 83 ec 08 sub $0x8,%esp 12b6f1: 8d 55 e0 lea -0x20(%ebp),%edx 12b6f4: 6a 01 push $0x1 12b6f6: 8d 45 08 lea 0x8(%ebp),%eax 12b6f9: 50 push %eax 12b6fa: 89 f9 mov %edi,%ecx 12b6fc: 89 f0 mov %esi,%eax 12b6fe: e8 f9 fe ff ff call 12b5fc { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 12b703: 83 c4 10 add $0x10,%esp 12b706: 85 c0 test %eax,%eax 12b708: 74 af je 12b6b9 <== 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; 12b70a: 8b 45 e4 mov -0x1c(%ebp),%eax 12b70d: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12b711: 8b 75 e0 mov -0x20(%ebp),%esi 12b714: 8a 06 mov (%esi),%al 12b716: 84 c0 test %al,%al 12b718: 74 7d je 12b797 <== ALWAYS TAKEN 12b71a: 89 f2 mov %esi,%edx 12b71c: b9 01 00 00 00 mov $0x1,%ecx 12b721: eb 08 jmp 12b72b 12b723: 90 nop <== NOT EXECUTED 12b724: 42 inc %edx 12b725: 8a 02 mov (%edx),%al 12b727: 84 c0 test %al,%al 12b729: 74 09 je 12b734 if(*cp == ',') 12b72b: 3c 2c cmp $0x2c,%al 12b72d: 75 f5 jne 12b724 <== NEVER TAKEN memcount++; 12b72f: 41 inc %ecx <== NOT EXECUTED 12b730: eb f2 jmp 12b724 <== NOT EXECUTED 12b732: 66 90 xchg %ax,%ax <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12b734: 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)) 12b73b: 39 45 08 cmp %eax,0x8(%ebp) 12b73e: 0f 82 75 ff ff ff jb 12b6b9 <== ALWAYS TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 12b744: 8b 45 d4 mov -0x2c(%ebp),%eax 12b747: 83 c0 0f add $0xf,%eax 12b74a: 83 e0 f0 and $0xfffffff0,%eax 12b74d: 89 43 0c mov %eax,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 12b750: 89 30 mov %esi,(%eax) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12b752: 8b 45 e0 mov -0x20(%ebp),%eax 12b755: 8a 10 mov (%eax),%dl 12b757: 84 d2 test %dl,%dl 12b759: 74 43 je 12b79e <== ALWAYS TAKEN 12b75b: 40 inc %eax 12b75c: b9 01 00 00 00 mov $0x1,%ecx 12b761: eb 08 jmp 12b76b 12b763: 90 nop <== NOT EXECUTED 12b764: 8a 10 mov (%eax),%dl 12b766: 40 inc %eax 12b767: 84 d2 test %dl,%dl 12b769: 74 15 je 12b780 if(*cp == ',') { 12b76b: 80 fa 2c cmp $0x2c,%dl 12b76e: 75 f4 jne 12b764 <== NEVER TAKEN *cp = '\0'; 12b770: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 12b774: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 12b777: 89 04 8a mov %eax,(%edx,%ecx,4) <== NOT EXECUTED 12b77a: 41 inc %ecx <== NOT EXECUTED 12b77b: eb e7 jmp 12b764 <== NOT EXECUTED 12b77d: 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++) { 12b780: c1 e1 02 shl $0x2,%ecx if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 12b783: 8b 43 0c mov 0xc(%ebx),%eax 12b786: c7 04 08 00 00 00 00 movl $0x0,(%eax,%ecx,1) 12b78d: b8 01 00 00 00 mov $0x1,%eax return 1; 12b792: e9 24 ff ff ff jmp 12b6bb grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12b797: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED 12b79c: eb 9d jmp 12b73b <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12b79e: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED 12b7a3: eb de jmp 12b783 <== NOT EXECUTED 0012b7e4 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 12b7e4: 55 push %ebp 12b7e5: 89 e5 mov %esp,%ebp 12b7e7: 57 push %edi 12b7e8: 56 push %esi 12b7e9: 53 push %ebx 12b7ea: 83 ec 34 sub $0x34,%esp 12b7ed: 89 c6 mov %eax,%esi 12b7ef: 89 d3 mov %edx,%ebx 12b7f1: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12b7f4: 8d 7d d4 lea -0x2c(%ebp),%edi 12b7f7: 6a 00 push $0x0 12b7f9: 8d 45 08 lea 0x8(%ebp),%eax 12b7fc: 50 push %eax 12b7fd: 89 f9 mov %edi,%ecx 12b7ff: 89 f0 mov %esi,%eax 12b801: e8 f6 fd ff ff call 12b5fc 12b806: 83 c4 10 add $0x10,%esp 12b809: 85 c0 test %eax,%eax 12b80b: 75 0b jne 12b818 <== 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; 12b80d: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12b80f: 8d 65 f4 lea -0xc(%ebp),%esp 12b812: 5b pop %ebx 12b813: 5e pop %esi 12b814: 5f pop %edi 12b815: c9 leave 12b816: c3 ret 12b817: 90 nop <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 12b818: 83 ec 08 sub $0x8,%esp 12b81b: 8d 53 04 lea 0x4(%ebx),%edx 12b81e: 6a 00 push $0x0 12b820: 8d 45 08 lea 0x8(%ebp),%eax 12b823: 50 push %eax 12b824: 89 f9 mov %edi,%ecx 12b826: 89 f0 mov %esi,%eax 12b828: e8 cf fd ff ff call 12b5fc size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12b82d: 83 c4 10 add $0x10,%esp 12b830: 85 c0 test %eax,%eax 12b832: 74 d9 je 12b80d <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 12b834: 8d 55 e4 lea -0x1c(%ebp),%edx 12b837: 89 f0 mov %esi,%eax 12b839: e8 e6 fc ff ff call 12b524 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12b83e: 85 c0 test %eax,%eax 12b840: 74 cb je 12b80d <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 12b842: 8d 55 e0 lea -0x20(%ebp),%edx 12b845: 89 f0 mov %esi,%eax 12b847: e8 d8 fc ff ff call 12b524 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12b84c: 85 c0 test %eax,%eax 12b84e: 74 bd je 12b80d <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 12b850: 83 ec 08 sub $0x8,%esp 12b853: 8d 53 0c lea 0xc(%ebx),%edx 12b856: 6a 00 push $0x0 12b858: 8d 45 08 lea 0x8(%ebp),%eax 12b85b: 50 push %eax 12b85c: 89 f9 mov %edi,%ecx 12b85e: 89 f0 mov %esi,%eax 12b860: e8 97 fd ff ff call 12b5fc size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12b865: 83 c4 10 add $0x10,%esp 12b868: 85 c0 test %eax,%eax 12b86a: 74 a1 je 12b80d <== 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) 12b86c: 83 ec 08 sub $0x8,%esp 12b86f: 8d 53 10 lea 0x10(%ebx),%edx 12b872: 6a 00 push $0x0 12b874: 8d 45 08 lea 0x8(%ebp),%eax 12b877: 50 push %eax 12b878: 89 f9 mov %edi,%ecx 12b87a: 89 f0 mov %esi,%eax 12b87c: e8 7b fd ff ff call 12b5fc size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12b881: 83 c4 10 add $0x10,%esp 12b884: 85 c0 test %eax,%eax 12b886: 74 85 je 12b80d <== 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) 12b888: 83 ec 08 sub $0x8,%esp 12b88b: 8d 53 14 lea 0x14(%ebx),%edx 12b88e: 6a 00 push $0x0 12b890: 8d 45 08 lea 0x8(%ebp),%eax 12b893: 50 push %eax 12b894: 89 f9 mov %edi,%ecx 12b896: 89 f0 mov %esi,%eax 12b898: e8 5f fd ff ff call 12b5fc size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12b89d: 83 c4 10 add $0x10,%esp 12b8a0: 85 c0 test %eax,%eax 12b8a2: 0f 84 65 ff ff ff je 12b80d <== 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)) 12b8a8: 83 ec 08 sub $0x8,%esp 12b8ab: 8d 53 18 lea 0x18(%ebx),%edx 12b8ae: 6a 01 push $0x1 12b8b0: 8d 45 08 lea 0x8(%ebp),%eax 12b8b3: 50 push %eax 12b8b4: 89 f9 mov %edi,%ecx 12b8b6: 89 f0 mov %esi,%eax 12b8b8: e8 3f fd ff ff call 12b5fc size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12b8bd: 83 c4 10 add $0x10,%esp 12b8c0: 85 c0 test %eax,%eax 12b8c2: 0f 84 45 ff ff ff je 12b80d <== 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; 12b8c8: 8b 45 e4 mov -0x1c(%ebp),%eax 12b8cb: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 12b8cf: 8b 45 e0 mov -0x20(%ebp),%eax 12b8d2: 66 89 43 0a mov %ax,0xa(%ebx) 12b8d6: b8 01 00 00 00 mov $0x1,%eax return 1; 12b8db: e9 2f ff ff ff jmp 12b80f 0010bd78 : #include int sched_get_priority_max( int policy ) { 10bd78: 55 push %ebp 10bd79: 89 e5 mov %esp,%ebp 10bd7b: 83 ec 08 sub $0x8,%esp 10bd7e: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10bd81: 85 c0 test %eax,%eax 10bd83: 78 0a js 10bd8f 10bd85: 83 f8 02 cmp $0x2,%eax 10bd88: 7e 1a jle 10bda4 10bd8a: 83 f8 04 cmp $0x4,%eax 10bd8d: 74 15 je 10bda4 <== NEVER TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10bd8f: e8 00 86 00 00 call 114394 <__errno> 10bd94: c7 00 16 00 00 00 movl $0x16,(%eax) 10bd9a: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10bd9f: c9 leave 10bda0: c3 ret 10bda1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10bda4: 0f b6 05 3c 45 12 00 movzbl 0x12453c,%eax 10bdab: 48 dec %eax } 10bdac: c9 leave 10bdad: c3 ret 0010bdb0 : #include int sched_get_priority_min( int policy ) { 10bdb0: 55 push %ebp 10bdb1: 89 e5 mov %esp,%ebp 10bdb3: 83 ec 08 sub $0x8,%esp 10bdb6: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10bdb9: 85 c0 test %eax,%eax 10bdbb: 78 0a js 10bdc7 10bdbd: 83 f8 02 cmp $0x2,%eax 10bdc0: 7e 1a jle 10bddc <== NEVER TAKEN 10bdc2: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10bdc5: 74 15 je 10bddc <== NOT EXECUTED case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10bdc7: e8 c8 85 00 00 call 114394 <__errno> 10bdcc: c7 00 16 00 00 00 movl $0x16,(%eax) 10bdd2: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10bdd7: c9 leave 10bdd8: c3 ret 10bdd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int sched_get_priority_min( int policy ) { switch ( policy ) { 10bddc: b8 01 00 00 00 mov $0x1,%eax default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10bde1: c9 leave 10bde2: c3 ret 0010bde4 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10bde4: 55 push %ebp 10bde5: 89 e5 mov %esp,%ebp 10bde7: 56 push %esi 10bde8: 53 push %ebx 10bde9: 8b 75 08 mov 0x8(%ebp),%esi 10bdec: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10bdef: 85 f6 test %esi,%esi 10bdf1: 75 21 jne 10be14 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 10bdf3: 85 db test %ebx,%ebx 10bdf5: 74 38 je 10be2f rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10bdf7: 83 ec 08 sub $0x8,%esp 10bdfa: 53 push %ebx 10bdfb: ff 35 c4 86 12 00 pushl 0x1286c4 10be01: e8 1a 34 00 00 call 10f220 <_Timespec_From_ticks> 10be06: 31 c0 xor %eax,%eax return 0; 10be08: 83 c4 10 add $0x10,%esp } 10be0b: 8d 65 f8 lea -0x8(%ebp),%esp 10be0e: 5b pop %ebx 10be0f: 5e pop %esi 10be10: c9 leave 10be11: c3 ret 10be12: 66 90 xchg %ax,%ax <== NOT EXECUTED { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10be14: e8 7f c9 ff ff call 108798 10be19: 39 f0 cmp %esi,%eax 10be1b: 74 d6 je 10bdf3 rtems_set_errno_and_return_minus_one( ESRCH ); 10be1d: e8 72 85 00 00 call 114394 <__errno> 10be22: c7 00 03 00 00 00 movl $0x3,(%eax) 10be28: b8 ff ff ff ff mov $0xffffffff,%eax 10be2d: eb dc jmp 10be0b if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10be2f: e8 60 85 00 00 call 114394 <__errno> 10be34: c7 00 16 00 00 00 movl $0x16,(%eax) 10be3a: b8 ff ff ff ff mov $0xffffffff,%eax 10be3f: eb ca jmp 10be0b 0010e374 : */ int sem_close( sem_t *sem ) { 10e374: 55 push %ebp 10e375: 89 e5 mov %esp,%ebp 10e377: 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 *) 10e37a: 8d 45 f4 lea -0xc(%ebp),%eax 10e37d: 50 push %eax 10e37e: 8b 45 08 mov 0x8(%ebp),%eax 10e381: ff 30 pushl (%eax) 10e383: 68 e0 d3 12 00 push $0x12d3e0 10e388: e8 0b 21 00 00 call 110498 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e38d: 83 c4 10 add $0x10,%esp 10e390: 8b 55 f4 mov -0xc(%ebp),%edx 10e393: 85 d2 test %edx,%edx 10e395: 74 15 je 10e3ac #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e397: e8 10 94 00 00 call 1177ac <__errno> 10e39c: c7 00 16 00 00 00 movl $0x16,(%eax) 10e3a2: b8 ff ff ff ff mov $0xffffffff,%eax } 10e3a7: c9 leave 10e3a8: c3 ret 10e3a9: 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; 10e3ac: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10e3af: 83 ec 0c sub $0xc,%esp 10e3b2: 50 push %eax 10e3b3: e8 74 5d 00 00 call 11412c <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e3b8: e8 9f 29 00 00 call 110d5c <_Thread_Enable_dispatch> 10e3bd: 31 c0 xor %eax,%eax return 0; 10e3bf: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e3c2: c9 leave 10e3c3: c3 ret 0010e3c4 : */ int sem_destroy( sem_t *sem ) { 10e3c4: 55 push %ebp 10e3c5: 89 e5 mov %esp,%ebp 10e3c7: 83 ec 1c sub $0x1c,%esp 10e3ca: 8d 45 f4 lea -0xc(%ebp),%eax 10e3cd: 50 push %eax 10e3ce: 8b 45 08 mov 0x8(%ebp),%eax 10e3d1: ff 30 pushl (%eax) 10e3d3: 68 e0 d3 12 00 push $0x12d3e0 10e3d8: e8 bb 20 00 00 call 110498 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e3dd: 83 c4 10 add $0x10,%esp 10e3e0: 8b 55 f4 mov -0xc(%ebp),%edx 10e3e3: 85 d2 test %edx,%edx 10e3e5: 74 15 je 10e3fc #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e3e7: e8 c0 93 00 00 call 1177ac <__errno> 10e3ec: c7 00 16 00 00 00 movl $0x16,(%eax) 10e3f2: b8 ff ff ff ff mov $0xffffffff,%eax } 10e3f7: c9 leave 10e3f8: c3 ret 10e3f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10e3fc: 80 78 14 00 cmpb $0x0,0x14(%eax) 10e400: 75 16 jne 10e418 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10e402: 83 ec 0c sub $0xc,%esp 10e405: 50 push %eax 10e406: e8 21 5d 00 00 call 11412c <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e40b: e8 4c 29 00 00 call 110d5c <_Thread_Enable_dispatch> 10e410: 31 c0 xor %eax,%eax return 0; 10e412: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e415: c9 leave 10e416: c3 ret 10e417: 90 nop <== NOT EXECUTED /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { _Thread_Enable_dispatch(); 10e418: e8 3f 29 00 00 call 110d5c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10e41d: e8 8a 93 00 00 call 1177ac <__errno> 10e422: c7 00 16 00 00 00 movl $0x16,(%eax) 10e428: b8 ff ff ff ff mov $0xffffffff,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e42d: c9 leave 10e42e: c3 ret 0010e430 : int sem_getvalue( sem_t *sem, int *sval ) { 10e430: 55 push %ebp 10e431: 89 e5 mov %esp,%ebp 10e433: 83 ec 1c sub $0x1c,%esp 10e436: 8d 45 f4 lea -0xc(%ebp),%eax 10e439: 50 push %eax 10e43a: 8b 45 08 mov 0x8(%ebp),%eax 10e43d: ff 30 pushl (%eax) 10e43f: 68 e0 d3 12 00 push $0x12d3e0 10e444: e8 4f 20 00 00 call 110498 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e449: 83 c4 10 add $0x10,%esp 10e44c: 8b 55 f4 mov -0xc(%ebp),%edx 10e44f: 85 d2 test %edx,%edx 10e451: 74 15 je 10e468 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e453: e8 54 93 00 00 call 1177ac <__errno> 10e458: c7 00 16 00 00 00 movl $0x16,(%eax) 10e45e: b8 ff ff ff ff mov $0xffffffff,%eax } 10e463: c9 leave 10e464: c3 ret 10e465: 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 ); 10e468: 8b 50 64 mov 0x64(%eax),%edx 10e46b: 8b 45 0c mov 0xc(%ebp),%eax 10e46e: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e470: e8 e7 28 00 00 call 110d5c <_Thread_Enable_dispatch> 10e475: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e477: c9 leave 10e478: c3 ret 0010e4c4 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10e4c4: 55 push %ebp 10e4c5: 89 e5 mov %esp,%ebp 10e4c7: 57 push %edi 10e4c8: 56 push %esi 10e4c9: 53 push %ebx 10e4ca: 83 ec 2c sub $0x2c,%esp 10e4cd: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e4d0: a1 98 d0 12 00 mov 0x12d098,%eax 10e4d5: 40 inc %eax 10e4d6: a3 98 d0 12 00 mov %eax,0x12d098 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10e4db: 8b 7d 0c mov 0xc(%ebp),%edi 10e4de: 81 e7 00 02 00 00 and $0x200,%edi 10e4e4: 0f 85 86 00 00 00 jne 10e570 10e4ea: 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 ); 10e4f1: 83 ec 08 sub $0x8,%esp 10e4f4: 8d 45 e4 lea -0x1c(%ebp),%eax 10e4f7: 50 push %eax 10e4f8: 56 push %esi 10e4f9: e8 7e 5c 00 00 call 11417c <_POSIX_Semaphore_Name_to_id> 10e4fe: 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 ) { 10e500: 83 c4 10 add $0x10,%esp 10e503: 85 c0 test %eax,%eax 10e505: 74 25 je 10e52c /* * 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) ) ) { 10e507: 83 f8 02 cmp $0x2,%eax 10e50a: 75 04 jne 10e510 <== ALWAYS TAKEN 10e50c: 85 ff test %edi,%edi 10e50e: 75 6c jne 10e57c _Thread_Enable_dispatch(); 10e510: e8 47 28 00 00 call 110d5c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10e515: e8 92 92 00 00 call 1177ac <__errno> 10e51a: 89 18 mov %ebx,(%eax) 10e51c: b8 ff ff ff ff mov $0xffffffff,%eax id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 10e521: 8d 65 f4 lea -0xc(%ebp),%esp 10e524: 5b pop %ebx 10e525: 5e pop %esi 10e526: 5f pop %edi 10e527: c9 leave 10e528: c3 ret 10e529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10e52c: 8b 45 0c mov 0xc(%ebp),%eax 10e52f: 25 00 0a 00 00 and $0xa00,%eax 10e534: 3d 00 0a 00 00 cmp $0xa00,%eax 10e539: 74 65 je 10e5a0 10e53b: 50 push %eax 10e53c: 8d 45 dc lea -0x24(%ebp),%eax 10e53f: 50 push %eax 10e540: ff 75 e4 pushl -0x1c(%ebp) 10e543: 68 e0 d3 12 00 push $0x12d3e0 10e548: e8 4b 1f 00 00 call 110498 <_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 ); 10e54d: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10e550: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10e553: e8 04 28 00 00 call 110d5c <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10e558: e8 ff 27 00 00 call 110d5c <_Thread_Enable_dispatch> goto return_id; 10e55d: 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; 10e560: 8b 45 e0 mov -0x20(%ebp),%eax 10e563: 83 c0 08 add $0x8,%eax #endif return id; } 10e566: 8d 65 f4 lea -0xc(%ebp),%esp 10e569: 5b pop %ebx 10e56a: 5e pop %esi 10e56b: 5f pop %edi 10e56c: c9 leave 10e56d: c3 ret 10e56e: 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 ); 10e570: 8b 45 14 mov 0x14(%ebp),%eax 10e573: 89 45 d4 mov %eax,-0x2c(%ebp) 10e576: e9 76 ff ff ff jmp 10e4f1 10e57b: 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( 10e57c: 8d 45 e0 lea -0x20(%ebp),%eax 10e57f: 50 push %eax 10e580: ff 75 d4 pushl -0x2c(%ebp) 10e583: 6a 00 push $0x0 10e585: 56 push %esi 10e586: e8 95 5a 00 00 call 114020 <_POSIX_Semaphore_Create_support> 10e58b: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10e58d: e8 ca 27 00 00 call 110d5c <_Thread_Enable_dispatch> if ( status == -1 ) 10e592: 83 c4 10 add $0x10,%esp 10e595: 43 inc %ebx 10e596: 75 c8 jne 10e560 10e598: b8 ff ff ff ff mov $0xffffffff,%eax 10e59d: eb c7 jmp 10e566 10e59f: 90 nop <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 10e5a0: e8 b7 27 00 00 call 110d5c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10e5a5: e8 02 92 00 00 call 1177ac <__errno> 10e5aa: c7 00 11 00 00 00 movl $0x11,(%eax) 10e5b0: b8 ff ff ff ff mov $0xffffffff,%eax 10e5b5: eb af jmp 10e566 0010e5b8 : */ int sem_post( sem_t *sem ) { 10e5b8: 55 push %ebp 10e5b9: 89 e5 mov %esp,%ebp 10e5bb: 83 ec 1c sub $0x1c,%esp 10e5be: 8d 45 f4 lea -0xc(%ebp),%eax 10e5c1: 50 push %eax 10e5c2: 8b 45 08 mov 0x8(%ebp),%eax 10e5c5: ff 30 pushl (%eax) 10e5c7: 68 e0 d3 12 00 push $0x12d3e0 10e5cc: e8 c7 1e 00 00 call 110498 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e5d1: 83 c4 10 add $0x10,%esp 10e5d4: 8b 4d f4 mov -0xc(%ebp),%ecx 10e5d7: 85 c9 test %ecx,%ecx 10e5d9: 74 15 je 10e5f0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e5db: e8 cc 91 00 00 call 1177ac <__errno> 10e5e0: c7 00 16 00 00 00 movl $0x16,(%eax) 10e5e6: b8 ff ff ff ff mov $0xffffffff,%eax } 10e5eb: c9 leave 10e5ec: c3 ret 10e5ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10e5f0: 52 push %edx 10e5f1: 6a 00 push $0x0 10e5f3: ff 70 08 pushl 0x8(%eax) 10e5f6: 83 c0 1c add $0x1c,%eax 10e5f9: 50 push %eax 10e5fa: e8 3d 15 00 00 call 10fb3c <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10e5ff: e8 58 27 00 00 call 110d5c <_Thread_Enable_dispatch> 10e604: 31 c0 xor %eax,%eax return 0; 10e606: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e609: c9 leave 10e60a: c3 ret 0010e60c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 10e60c: 55 push %ebp 10e60d: 89 e5 mov %esp,%ebp 10e60f: 53 push %ebx 10e610: 83 ec 1c sub $0x1c,%esp 10e613: 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 ); 10e616: 8d 45 f4 lea -0xc(%ebp),%eax 10e619: 50 push %eax 10e61a: ff 75 0c pushl 0xc(%ebp) 10e61d: e8 26 51 00 00 call 113748 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10e622: 83 c4 10 add $0x10,%esp 10e625: 83 f8 03 cmp $0x3,%eax 10e628: 74 16 je 10e640 <== NEVER TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10e62a: 50 push %eax <== NOT EXECUTED 10e62b: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10e62e: 6a 00 push $0x0 <== NOT EXECUTED 10e630: 53 push %ebx <== NOT EXECUTED 10e631: e8 b2 5b 00 00 call 1141e8 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED 10e636: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } } return lock_status; } 10e639: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e63c: c9 leave <== NOT EXECUTED 10e63d: c3 ret <== NOT EXECUTED 10e63e: 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 ); 10e640: 52 push %edx 10e641: ff 75 f4 pushl -0xc(%ebp) 10e644: 6a 01 push $0x1 10e646: 53 push %ebx 10e647: e8 9c 5b 00 00 call 1141e8 <_POSIX_Semaphore_Wait_support> 10e64c: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10e64f: 8b 5d fc mov -0x4(%ebp),%ebx 10e652: c9 leave 10e653: c3 ret 0012b4b8 : */ int setgid( gid_t gid ) { 12b4b8: 55 push %ebp <== NOT EXECUTED 12b4b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED _POSIX_types_Gid = gid; 12b4bb: a1 84 92 16 00 mov 0x169284,%eax <== NOT EXECUTED 12b4c0: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12b4c3: 66 89 50 34 mov %dx,0x34(%eax) <== NOT EXECUTED return 0; } 12b4c7: 31 c0 xor %eax,%eax <== NOT EXECUTED 12b4c9: c9 leave <== NOT EXECUTED 12b4ca: c3 ret <== NOT EXECUTED 0012ba1c : return NULL; return &grent; } void setgrent(void) { 12ba1c: 55 push %ebp <== NOT EXECUTED 12ba1d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ba1f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 12ba22: e8 f5 fe ff ff call 12b91c <== NOT EXECUTED if (group_fp != NULL) 12ba27: a1 44 e9 16 00 mov 0x16e944,%eax <== NOT EXECUTED 12ba2c: 85 c0 test %eax,%eax <== NOT EXECUTED 12ba2e: 74 0c je 12ba3c <== NOT EXECUTED fclose(group_fp); 12ba30: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ba33: 50 push %eax <== NOT EXECUTED 12ba34: e8 3f 6f 01 00 call 142978 <== NOT EXECUTED 12ba39: 83 c4 10 add $0x10,%esp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 12ba3c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12ba3f: 68 6d c0 15 00 push $0x15c06d <== NOT EXECUTED 12ba44: 68 d7 8e 15 00 push $0x158ed7 <== NOT EXECUTED 12ba49: e8 42 77 01 00 call 143190 <== NOT EXECUTED 12ba4e: a3 44 e9 16 00 mov %eax,0x16e944 <== NOT EXECUTED 12ba53: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12ba56: c9 leave <== NOT EXECUTED 12ba57: c3 ret <== NOT EXECUTED 0010b250 : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 10b250: 55 push %ebp 10b251: 89 e5 mov %esp,%ebp 10b253: 83 ec 08 sub $0x8,%esp if ( !value ) 10b256: 8b 55 0c mov 0xc(%ebp),%edx 10b259: 85 d2 test %edx,%edx 10b25b: 74 33 je 10b290 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 10b25d: 8b 45 10 mov 0x10(%ebp),%eax 10b260: 85 c0 test %eax,%eax 10b262: 74 2c je 10b290 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b264: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b268: 76 12 jbe 10b27c case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b26a: e8 6d 8b 00 00 call 113ddc <__errno> 10b26f: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b275: b8 ff ff ff ff mov $0xffffffff,%eax 10b27a: c9 leave 10b27b: c3 ret switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b27c: e8 5b 8b 00 00 call 113ddc <__errno> 10b281: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b287: b8 ff ff ff ff mov $0xffffffff,%eax 10b28c: c9 leave 10b28d: c3 ret 10b28e: 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 ); 10b290: e8 47 8b 00 00 call 113ddc <__errno> 10b295: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b29b: eb d8 jmp 10b275 0012bbe8 : return NULL; return &pwent; } void setpwent(void) { 12bbe8: 55 push %ebp <== NOT EXECUTED 12bbe9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bbeb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 12bbee: e8 29 fd ff ff call 12b91c <== NOT EXECUTED if (passwd_fp != NULL) 12bbf3: a1 44 e8 16 00 mov 0x16e844,%eax <== NOT EXECUTED 12bbf8: 85 c0 test %eax,%eax <== NOT EXECUTED 12bbfa: 74 0c je 12bc08 <== NOT EXECUTED fclose(passwd_fp); 12bbfc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bbff: 50 push %eax <== NOT EXECUTED 12bc00: e8 73 6d 01 00 call 142978 <== NOT EXECUTED 12bc05: 83 c4 10 add $0x10,%esp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 12bc08: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12bc0b: 68 6d c0 15 00 push $0x15c06d <== NOT EXECUTED 12bc10: 68 cb 8e 15 00 push $0x158ecb <== NOT EXECUTED 12bc15: e8 76 75 01 00 call 143190 <== NOT EXECUTED 12bc1a: a3 44 e8 16 00 mov %eax,0x16e844 <== NOT EXECUTED 12bc1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12bc22: c9 leave <== NOT EXECUTED 12bc23: c3 ret <== NOT EXECUTED 0010bf10 : */ int setuid( uid_t uid ) { 10bf10: 55 push %ebp <== NOT EXECUTED 10bf11: 89 e5 mov %esp,%ebp <== NOT EXECUTED _POSIX_types_Uid = uid; 10bf13: a1 84 92 16 00 mov 0x169284,%eax <== NOT EXECUTED 10bf18: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10bf1b: 66 89 50 32 mov %dx,0x32(%eax) <== NOT EXECUTED return 0; } 10bf1f: 31 c0 xor %eax,%eax <== NOT EXECUTED 10bf21: c9 leave <== NOT EXECUTED 10bf22: c3 ret <== NOT EXECUTED 0010bcb8 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10bcb8: 55 push %ebp 10bcb9: 89 e5 mov %esp,%ebp 10bcbb: 57 push %edi 10bcbc: 56 push %esi 10bcbd: 53 push %ebx 10bcbe: 83 ec 1c sub $0x1c,%esp 10bcc1: 8b 5d 08 mov 0x8(%ebp),%ebx 10bcc4: 8b 45 0c mov 0xc(%ebp),%eax 10bcc7: 8b 55 10 mov 0x10(%ebp),%edx ISR_Level level; if ( oact ) 10bcca: 85 d2 test %edx,%edx 10bccc: 74 13 je 10bce1 *oact = _POSIX_signals_Vectors[ sig ]; 10bcce: 8d 0c 5b lea (%ebx,%ebx,2),%ecx 10bcd1: 8d 34 8d 60 99 12 00 lea 0x129960(,%ecx,4),%esi 10bcd8: b9 03 00 00 00 mov $0x3,%ecx 10bcdd: 89 d7 mov %edx,%edi 10bcdf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10bce1: 85 db test %ebx,%ebx 10bce3: 74 6f je 10bd54 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10bce5: 8d 53 ff lea -0x1(%ebx),%edx 10bce8: 83 fa 1f cmp $0x1f,%edx 10bceb: 77 67 ja 10bd54 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10bced: 83 fb 09 cmp $0x9,%ebx 10bcf0: 74 62 je 10bd54 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10bcf2: 85 c0 test %eax,%eax 10bcf4: 74 37 je 10bd2d <== 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 ); 10bcf6: 9c pushf 10bcf7: fa cli 10bcf8: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10bcfb: 8b 50 08 mov 0x8(%eax),%edx 10bcfe: 85 d2 test %edx,%edx 10bd00: 74 36 je 10bd38 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 10bd02: 83 ec 0c sub $0xc,%esp 10bd05: 53 push %ebx 10bd06: 89 45 e0 mov %eax,-0x20(%ebp) 10bd09: e8 36 54 00 00 call 111144 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10bd0e: 8d 14 5b lea (%ebx,%ebx,2),%edx 10bd11: 8d 3c 95 60 99 12 00 lea 0x129960(,%edx,4),%edi 10bd18: b9 03 00 00 00 mov $0x3,%ecx 10bd1d: 8b 45 e0 mov -0x20(%ebp),%eax 10bd20: 89 c6 mov %eax,%esi 10bd22: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bd24: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10bd27: ff 75 e4 pushl -0x1c(%ebp) 10bd2a: 9d popf 10bd2b: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10bd2d: 8d 65 f4 lea -0xc(%ebp),%esp 10bd30: 5b pop %ebx 10bd31: 5e pop %esi 10bd32: 5f pop %edi 10bd33: c9 leave 10bd34: c3 ret 10bd35: 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 ]; 10bd38: 8d 34 5b lea (%ebx,%ebx,2),%esi 10bd3b: c1 e6 02 shl $0x2,%esi 10bd3e: 8d be 60 99 12 00 lea 0x129960(%esi),%edi 10bd44: 81 c6 e0 2e 12 00 add $0x122ee0,%esi 10bd4a: b9 03 00 00 00 mov $0x3,%ecx 10bd4f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bd51: eb d4 jmp 10bd27 10bd53: 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 ); 10bd54: e8 af 87 00 00 call 114508 <__errno> 10bd59: c7 00 16 00 00 00 movl $0x16,(%eax) 10bd5f: b8 ff ff ff ff mov $0xffffffff,%eax 10bd64: eb c7 jmp 10bd2d 0010bd68 : int sigaddset( sigset_t *set, int signo ) { 10bd68: 55 push %ebp 10bd69: 89 e5 mov %esp,%ebp 10bd6b: 83 ec 08 sub $0x8,%esp 10bd6e: 8b 45 08 mov 0x8(%ebp),%eax 10bd71: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10bd74: 85 c0 test %eax,%eax 10bd76: 74 18 je 10bd90 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10bd78: 85 c9 test %ecx,%ecx 10bd7a: 74 14 je 10bd90 10bd7c: 49 dec %ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 10bd7d: 83 f9 1f cmp $0x1f,%ecx 10bd80: 77 0e ja 10bd90 rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo); 10bd82: ba 01 00 00 00 mov $0x1,%edx 10bd87: d3 e2 shl %cl,%edx 10bd89: 09 10 or %edx,(%eax) 10bd8b: 31 c0 xor %eax,%eax return 0; } 10bd8d: c9 leave 10bd8e: c3 ret 10bd8f: 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 ); 10bd90: e8 73 87 00 00 call 114508 <__errno> 10bd95: c7 00 16 00 00 00 movl $0x16,(%eax) 10bd9b: b8 ff ff ff ff mov $0xffffffff,%eax *set |= signo_to_mask(signo); return 0; } 10bda0: c9 leave 10bda1: c3 ret 0010d880 : int sigdelset( sigset_t *set, int signo ) { 10d880: 55 push %ebp 10d881: 89 e5 mov %esp,%ebp 10d883: 83 ec 08 sub $0x8,%esp 10d886: 8b 45 08 mov 0x8(%ebp),%eax 10d889: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10d88c: 85 c0 test %eax,%eax 10d88e: 74 18 je 10d8a8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d890: 85 c9 test %ecx,%ecx 10d892: 74 0f je 10d8a3 10d894: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10d895: 83 f9 1f cmp $0x1f,%ecx 10d898: 77 0e ja 10d8a8 rtems_set_errno_and_return_minus_one( EINVAL ); *set &= ~signo_to_mask(signo); 10d89a: ba fe ff ff ff mov $0xfffffffe,%edx 10d89f: d3 c2 rol %cl,%edx 10d8a1: 21 10 and %edx,(%eax) 10d8a3: 31 c0 xor %eax,%eax return 0; } 10d8a5: c9 leave 10d8a6: c3 ret 10d8a7: 90 nop <== NOT EXECUTED if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10d8a8: e8 03 87 00 00 call 115fb0 <__errno> 10d8ad: c7 00 16 00 00 00 movl $0x16,(%eax) 10d8b3: b8 ff ff ff ff mov $0xffffffff,%eax *set &= ~signo_to_mask(signo); return 0; } 10d8b8: c9 leave 10d8b9: c3 ret 0010d914 : int sigismember( const sigset_t *set, int signo ) { 10d914: 55 push %ebp 10d915: 89 e5 mov %esp,%ebp 10d917: 83 ec 08 sub $0x8,%esp 10d91a: 8b 45 08 mov 0x8(%ebp),%eax 10d91d: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10d920: 85 c0 test %eax,%eax 10d922: 74 20 je 10d944 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d924: 85 c9 test %ecx,%ecx 10d926: 74 18 je 10d940 10d928: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10d929: 83 f9 1f cmp $0x1f,%ecx 10d92c: 77 16 ja 10d944 rtems_set_errno_and_return_minus_one( EINVAL ); 10d92e: ba 01 00 00 00 mov $0x1,%edx 10d933: d3 e2 shl %cl,%edx 10d935: 85 10 test %edx,(%eax) 10d937: 0f 95 c0 setne %al 10d93a: 0f b6 c0 movzbl %al,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d93d: c9 leave 10d93e: c3 ret 10d93f: 90 nop <== NOT EXECUTED ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d940: 31 c0 xor %eax,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d942: c9 leave 10d943: c3 ret if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10d944: e8 67 86 00 00 call 115fb0 <__errno> 10d949: c7 00 16 00 00 00 movl $0x16,(%eax) 10d94f: b8 ff ff ff ff mov $0xffffffff,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d954: c9 leave 10d955: c3 ret 0010d9b8 : #include int sigsuspend( const sigset_t *sigmask ) { 10d9b8: 55 push %ebp 10d9b9: 89 e5 mov %esp,%ebp 10d9bb: 56 push %esi 10d9bc: 53 push %ebx 10d9bd: 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 ); 10d9c0: 8d 5d f4 lea -0xc(%ebp),%ebx 10d9c3: 53 push %ebx 10d9c4: ff 75 08 pushl 0x8(%ebp) 10d9c7: 6a 01 push $0x1 10d9c9: e8 c6 ff ff ff call 10d994 (void) sigfillset( &all_signals ); 10d9ce: 8d 75 f0 lea -0x10(%ebp),%esi 10d9d1: 89 34 24 mov %esi,(%esp) 10d9d4: e8 0f ff ff ff call 10d8e8 status = sigtimedwait( &all_signals, NULL, NULL ); 10d9d9: 83 c4 0c add $0xc,%esp 10d9dc: 6a 00 push $0x0 10d9de: 6a 00 push $0x0 10d9e0: 56 push %esi 10d9e1: e8 76 00 00 00 call 10da5c 10d9e6: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10d9e8: 83 c4 0c add $0xc,%esp 10d9eb: 6a 00 push $0x0 10d9ed: 53 push %ebx 10d9ee: 6a 00 push $0x0 10d9f0: e8 9f ff ff ff call 10d994 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10d9f5: 83 c4 10 add $0x10,%esp 10d9f8: 46 inc %esi 10d9f9: 75 0d jne 10da08 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINTR ); return status; } 10d9fb: b8 ff ff ff ff mov $0xffffffff,%eax 10da00: 8d 65 f8 lea -0x8(%ebp),%esp 10da03: 5b pop %ebx 10da04: 5e pop %esi 10da05: c9 leave 10da06: c3 ret 10da07: 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 ); 10da08: e8 a3 85 00 00 call 115fb0 <__errno> 10da0d: c7 00 04 00 00 00 movl $0x4,(%eax) 10da13: eb e6 jmp 10d9fb 0010c064 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10c064: 55 push %ebp 10c065: 89 e5 mov %esp,%ebp 10c067: 57 push %edi 10c068: 56 push %esi 10c069: 53 push %ebx 10c06a: 83 ec 2c sub $0x2c,%esp 10c06d: 8b 75 08 mov 0x8(%ebp),%esi 10c070: 8b 5d 0c mov 0xc(%ebp),%ebx 10c073: 8b 7d 10 mov 0x10(%ebp),%edi ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10c076: 85 f6 test %esi,%esi 10c078: 0f 84 7a 01 00 00 je 10c1f8 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10c07e: 85 ff test %edi,%edi 10c080: 0f 84 1e 01 00 00 je 10c1a4 if ( !_Timespec_Is_valid( timeout ) ) 10c086: 83 ec 0c sub $0xc,%esp 10c089: 57 push %edi 10c08a: e8 b9 34 00 00 call 10f548 <_Timespec_Is_valid> 10c08f: 83 c4 10 add $0x10,%esp 10c092: 84 c0 test %al,%al 10c094: 0f 84 5e 01 00 00 je 10c1f8 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10c09a: 83 ec 0c sub $0xc,%esp 10c09d: 57 push %edi 10c09e: e8 09 35 00 00 call 10f5ac <_Timespec_To_ticks> if ( !interval ) 10c0a3: 83 c4 10 add $0x10,%esp 10c0a6: 85 c0 test %eax,%eax 10c0a8: 0f 84 4a 01 00 00 je 10c1f8 <== ALWAYS TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c0ae: 85 db test %ebx,%ebx 10c0b0: 0f 84 f8 00 00 00 je 10c1ae <== ALWAYS TAKEN the_thread = _Thread_Executing; 10c0b6: 8b 15 d8 97 12 00 mov 0x1297d8,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c0bc: 8b ba f8 00 00 00 mov 0xf8(%edx),%edi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10c0c2: 9c pushf 10c0c3: fa cli 10c0c4: 8f 45 d0 popl -0x30(%ebp) if ( *set & api->signals_pending ) { 10c0c7: 8b 0e mov (%esi),%ecx 10c0c9: 89 4d d4 mov %ecx,-0x2c(%ebp) 10c0cc: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx 10c0d2: 85 4d d4 test %ecx,-0x2c(%ebp) 10c0d5: 0f 85 dd 00 00 00 jne 10c1b8 return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10c0db: 8b 0d 08 9f 12 00 mov 0x129f08,%ecx 10c0e1: 85 4d d4 test %ecx,-0x2c(%ebp) 10c0e4: 75 7e jne 10c164 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 10c0e6: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) 10c0ec: 8b 0d 18 97 12 00 mov 0x129718,%ecx 10c0f2: 41 inc %ecx 10c0f3: 89 0d 18 97 12 00 mov %ecx,0x129718 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10c0f9: c7 42 44 a0 9e 12 00 movl $0x129ea0,0x44(%edx) the_thread->Wait.return_code = EINTR; 10c100: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10c107: 8b 0e mov (%esi),%ecx 10c109: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10c10c: 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; 10c10f: c7 05 d0 9e 12 00 01 movl $0x1,0x129ed0 10c116: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10c119: ff 75 d0 pushl -0x30(%ebp) 10c11c: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10c11d: 52 push %edx 10c11e: 68 ec f0 10 00 push $0x10f0ec 10c123: 50 push %eax 10c124: 68 a0 9e 12 00 push $0x129ea0 10c129: e8 ae 2c 00 00 call 10eddc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c12e: e8 71 27 00 00 call 10e8a4 <_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 ); 10c133: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c13a: 6a 00 push $0x0 10c13c: 53 push %ebx 10c13d: ff 33 pushl (%ebx) 10c13f: 57 push %edi 10c140: e8 8b 56 00 00 call 1117d0 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10c145: 83 c4 20 add $0x20,%esp 10c148: e8 bb 86 00 00 call 114808 <__errno> 10c14d: 8b 15 d8 97 12 00 mov 0x1297d8,%edx 10c153: 8b 52 34 mov 0x34(%edx),%edx 10c156: 89 10 mov %edx,(%eax) return the_info->si_signo; 10c158: 8b 33 mov (%ebx),%esi } 10c15a: 89 f0 mov %esi,%eax 10c15c: 8d 65 f4 lea -0xc(%ebp),%esp 10c15f: 5b pop %ebx 10c160: 5e pop %esi 10c161: 5f pop %edi 10c162: c9 leave 10c163: c3 ret } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10c164: 83 ec 0c sub $0xc,%esp 10c167: 51 push %ecx 10c168: e8 b3 fe ff ff call 10c020 <_POSIX_signals_Get_highest> 10c16d: 89 c6 mov %eax,%esi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10c16f: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c176: 6a 01 push $0x1 10c178: 53 push %ebx 10c179: 50 push %eax 10c17a: 57 push %edi 10c17b: e8 50 56 00 00 call 1117d0 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10c180: ff 75 d0 pushl -0x30(%ebp) 10c183: 9d popf the_info->si_signo = signo; 10c184: 89 33 mov %esi,(%ebx) the_info->si_code = SI_USER; 10c186: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c18d: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10c194: 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; } 10c197: 89 f0 mov %esi,%eax 10c199: 8d 65 f4 lea -0xc(%ebp),%esp 10c19c: 5b pop %ebx 10c19d: 5e pop %esi 10c19e: 5f pop %edi 10c19f: c9 leave 10c1a0: c3 ret 10c1a1: 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 ); 10c1a4: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c1a6: 85 db test %ebx,%ebx 10c1a8: 0f 85 08 ff ff ff jne 10c0b6 10c1ae: 8d 5d dc lea -0x24(%ebp),%ebx 10c1b1: e9 00 ff ff ff jmp 10c0b6 10c1b6: 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 ); 10c1b8: 83 ec 0c sub $0xc,%esp 10c1bb: 51 push %ecx 10c1bc: e8 5f fe ff ff call 10c020 <_POSIX_signals_Get_highest> 10c1c1: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10c1c3: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c1ca: 6a 00 push $0x0 10c1cc: 53 push %ebx 10c1cd: 50 push %eax 10c1ce: 57 push %edi 10c1cf: e8 fc 55 00 00 call 1117d0 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10c1d4: ff 75 d0 pushl -0x30(%ebp) 10c1d7: 9d popf the_info->si_code = SI_USER; 10c1d8: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c1df: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10c1e6: 8b 33 mov (%ebx),%esi 10c1e8: 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; } 10c1eb: 89 f0 mov %esi,%eax 10c1ed: 8d 65 f4 lea -0xc(%ebp),%esp 10c1f0: 5b pop %ebx 10c1f1: 5e pop %esi 10c1f2: 5f pop %edi 10c1f3: c9 leave 10c1f4: c3 ret 10c1f5: 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 ); 10c1f8: e8 0b 86 00 00 call 114808 <__errno> 10c1fd: c7 00 16 00 00 00 movl $0x16,(%eax) 10c203: be ff ff ff ff mov $0xffffffff,%esi 10c208: e9 4d ff ff ff jmp 10c15a 0010dc20 : int sigwait( const sigset_t *set, int *sig ) { 10dc20: 55 push %ebp 10dc21: 89 e5 mov %esp,%ebp 10dc23: 53 push %ebx 10dc24: 83 ec 08 sub $0x8,%esp 10dc27: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10dc2a: 6a 00 push $0x0 10dc2c: 6a 00 push $0x0 10dc2e: ff 75 08 pushl 0x8(%ebp) 10dc31: e8 26 fe ff ff call 10da5c if ( status != -1 ) { 10dc36: 83 c4 10 add $0x10,%esp 10dc39: 83 f8 ff cmp $0xffffffff,%eax 10dc3c: 74 0e je 10dc4c if ( sig ) 10dc3e: 85 db test %ebx,%ebx 10dc40: 74 02 je 10dc44 <== ALWAYS TAKEN *sig = status; 10dc42: 89 03 mov %eax,(%ebx) 10dc44: 31 c0 xor %eax,%eax return 0; } return errno; } 10dc46: 8b 5d fc mov -0x4(%ebp),%ebx 10dc49: c9 leave 10dc4a: c3 ret 10dc4b: 90 nop <== NOT EXECUTED if ( sig ) *sig = status; return 0; } return errno; 10dc4c: e8 5f 83 00 00 call 115fb0 <__errno> 10dc51: 8b 00 mov (%eax),%eax } 10dc53: 8b 5d fc mov -0x4(%ebp),%ebx 10dc56: c9 leave 10dc57: c3 ret 00109b0c : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 109b0c: 55 push %ebp <== NOT EXECUTED 109b0d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109b0f: 56 push %esi <== NOT EXECUTED 109b10: 53 push %ebx <== NOT EXECUTED 109b11: 89 d3 mov %edx,%ebx <== NOT EXECUTED 109b13: 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)) { 109b15: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED 109b1c: 75 12 jne 109b30 <== 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); 109b1e: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109b21: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 109b23: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 109b26: 5b pop %ebx <== NOT EXECUTED 109b27: 5e pop %esi <== NOT EXECUTED 109b28: 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); 109b29: e9 a2 fe ff ff jmp 1099d0 <== NOT EXECUTED 109b2e: 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); 109b30: 52 push %edx <== NOT EXECUTED 109b31: 6a 00 push $0x0 <== NOT EXECUTED 109b33: 6a 00 push $0x0 <== NOT EXECUTED 109b35: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 109b38: e8 c3 1a 00 00 call 10b600 <== NOT EXECUTED i = iproc (c, tty); 109b3d: 89 f2 mov %esi,%edx <== NOT EXECUTED 109b3f: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED 109b42: 89 da mov %ebx,%edx <== NOT EXECUTED 109b44: e8 87 fe ff ff call 1099d0 <== NOT EXECUTED 109b49: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 109b4b: 58 pop %eax <== NOT EXECUTED 109b4c: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 109b4f: e8 a8 1b 00 00 call 10b6fc <== NOT EXECUTED 109b54: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 109b57: 89 f0 mov %esi,%eax <== NOT EXECUTED 109b59: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 109b5c: 5b pop %ebx <== NOT EXECUTED 109b5d: 5e pop %esi <== NOT EXECUTED 109b5e: c9 leave <== NOT EXECUTED 109b5f: c3 ret <== NOT EXECUTED 0010d098 : int _STAT_NAME( const char *path, struct stat *buf ) { 10d098: 55 push %ebp 10d099: 89 e5 mov %esp,%ebp 10d09b: 57 push %edi 10d09c: 56 push %esi 10d09d: 53 push %ebx 10d09e: 83 ec 2c sub $0x2c,%esp 10d0a1: 8b 55 08 mov 0x8(%ebp),%edx 10d0a4: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 10d0a7: 85 f6 test %esi,%esi 10d0a9: 0f 84 9d 00 00 00 je 10d14c rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 10d0af: b9 ff ff ff ff mov $0xffffffff,%ecx 10d0b4: 89 d7 mov %edx,%edi 10d0b6: 31 c0 xor %eax,%eax 10d0b8: f2 ae repnz scas %es:(%edi),%al 10d0ba: f7 d1 not %ecx 10d0bc: 49 dec %ecx 10d0bd: 83 ec 0c sub $0xc,%esp 10d0c0: 6a 01 push $0x1 10d0c2: 8d 5d d4 lea -0x2c(%ebp),%ebx 10d0c5: 53 push %ebx 10d0c6: 6a 00 push $0x0 10d0c8: 51 push %ecx 10d0c9: 52 push %edx 10d0ca: e8 79 ec ff ff call 10bd48 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 10d0cf: 83 c4 20 add $0x20,%esp 10d0d2: 85 c0 test %eax,%eax 10d0d4: 75 66 jne 10d13c return -1; if ( !loc.handlers->fstat_h ){ 10d0d6: 8b 55 dc mov -0x24(%ebp),%edx 10d0d9: 8b 42 18 mov 0x18(%edx),%eax 10d0dc: 85 c0 test %eax,%eax 10d0de: 74 39 je 10d119 <== ALWAYS TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 10d0e0: b9 48 00 00 00 mov $0x48,%ecx 10d0e5: 89 f7 mov %esi,%edi 10d0e7: 31 c0 xor %eax,%eax 10d0e9: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 10d0eb: 83 ec 08 sub $0x8,%esp 10d0ee: 56 push %esi 10d0ef: 53 push %ebx 10d0f0: ff 52 18 call *0x18(%edx) 10d0f3: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10d0f5: 8b 45 e0 mov -0x20(%ebp),%eax 10d0f8: 83 c4 10 add $0x10,%esp 10d0fb: 85 c0 test %eax,%eax 10d0fd: 74 10 je 10d10f <== ALWAYS TAKEN 10d0ff: 8b 40 1c mov 0x1c(%eax),%eax 10d102: 85 c0 test %eax,%eax 10d104: 74 09 je 10d10f <== ALWAYS TAKEN 10d106: 83 ec 0c sub $0xc,%esp 10d109: 53 push %ebx 10d10a: ff d0 call *%eax 10d10c: 83 c4 10 add $0x10,%esp return status; } 10d10f: 89 f0 mov %esi,%eax 10d111: 8d 65 f4 lea -0xc(%ebp),%esp 10d114: 5b pop %ebx 10d115: 5e pop %esi 10d116: 5f pop %edi 10d117: c9 leave 10d118: c3 ret 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 10d119: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10d11c: 85 c0 test %eax,%eax <== NOT EXECUTED 10d11e: 74 10 je 10d130 <== NOT EXECUTED 10d120: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10d123: 85 c0 test %eax,%eax <== NOT EXECUTED 10d125: 74 09 je 10d130 <== NOT EXECUTED 10d127: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d12a: 53 push %ebx <== NOT EXECUTED 10d12b: ff d0 call *%eax <== NOT EXECUTED 10d12d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10d130: e8 f7 56 03 00 call 14282c <__errno> <== NOT EXECUTED 10d135: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10d13b: 90 nop <== NOT EXECUTED 10d13c: be ff ff ff ff mov $0xffffffff,%esi status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10d141: 89 f0 mov %esi,%eax 10d143: 8d 65 f4 lea -0xc(%ebp),%esp 10d146: 5b pop %ebx 10d147: 5e pop %esi 10d148: 5f pop %edi 10d149: c9 leave 10d14a: c3 ret 10d14b: 90 nop <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 10d14c: e8 db 56 03 00 call 14282c <__errno> 10d151: c7 00 0e 00 00 00 movl $0xe,(%eax) 10d157: be ff ff ff ff mov $0xffffffff,%esi status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10d15c: 89 f0 mov %esi,%eax 10d15e: 8d 65 f4 lea -0xc(%ebp),%esp 10d161: 5b pop %ebx 10d162: 5e pop %esi 10d163: 5f pop %edi 10d164: c9 leave 10d165: c3 ret 0012c9fc : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 12c9fc: 55 push %ebp <== NOT EXECUTED 12c9fd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c9ff: 57 push %edi <== NOT EXECUTED 12ca00: 56 push %esi <== NOT EXECUTED 12ca01: 53 push %ebx <== NOT EXECUTED 12ca02: 83 ec 38 sub $0x38,%esp <== NOT EXECUTED 12ca05: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12ca08: 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 ) ) 12ca0b: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 12ca10: 89 d7 mov %edx,%edi <== NOT EXECUTED 12ca12: 31 c0 xor %eax,%eax <== NOT EXECUTED 12ca14: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 12ca16: f7 d1 not %ecx <== NOT EXECUTED 12ca18: 49 dec %ecx <== NOT EXECUTED 12ca19: 6a 01 push $0x1 <== NOT EXECUTED 12ca1b: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 12ca1e: 53 push %ebx <== NOT EXECUTED 12ca1f: 6a 00 push $0x0 <== NOT EXECUTED 12ca21: 51 push %ecx <== NOT EXECUTED 12ca22: 52 push %edx <== NOT EXECUTED 12ca23: e8 20 f3 fd ff call 10bd48 <== NOT EXECUTED 12ca28: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12ca2b: 85 c0 test %eax,%eax <== NOT EXECUTED 12ca2d: 75 59 jne 12ca88 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 12ca2f: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 12ca32: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 12ca35: 8b 40 44 mov 0x44(%eax),%eax <== NOT EXECUTED 12ca38: 85 c0 test %eax,%eax <== NOT EXECUTED 12ca3a: 74 3f je 12ca7b <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); 12ca3c: b9 38 00 00 00 mov $0x38,%ecx <== NOT EXECUTED 12ca41: 89 f7 mov %esi,%edi <== NOT EXECUTED 12ca43: 31 c0 xor %eax,%eax <== NOT EXECUTED 12ca45: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 12ca47: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12ca4a: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 12ca4d: 56 push %esi <== NOT EXECUTED 12ca4e: 83 c2 1c add $0x1c,%edx <== NOT EXECUTED 12ca51: 52 push %edx <== NOT EXECUTED 12ca52: ff 50 44 call *0x44(%eax) <== NOT EXECUTED 12ca55: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 12ca57: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12ca5a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ca5d: 85 c0 test %eax,%eax <== NOT EXECUTED 12ca5f: 74 10 je 12ca71 <== NOT EXECUTED 12ca61: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12ca64: 85 c0 test %eax,%eax <== NOT EXECUTED 12ca66: 74 09 je 12ca71 <== NOT EXECUTED 12ca68: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ca6b: 53 push %ebx <== NOT EXECUTED 12ca6c: ff d0 call *%eax <== NOT EXECUTED 12ca6e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return result; } 12ca71: 89 f0 mov %esi,%eax <== NOT EXECUTED 12ca73: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ca76: 5b pop %ebx <== NOT EXECUTED 12ca77: 5e pop %esi <== NOT EXECUTED 12ca78: 5f pop %edi <== NOT EXECUTED 12ca79: c9 leave <== NOT EXECUTED 12ca7a: 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 ); 12ca7b: e8 ac 5d 01 00 call 14282c <__errno> <== NOT EXECUTED 12ca80: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12ca86: 66 90 xchg %ax,%ax <== NOT EXECUTED 12ca88: 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; } 12ca8d: 89 f0 mov %esi,%eax <== NOT EXECUTED 12ca8f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ca92: 5b pop %ebx <== NOT EXECUTED 12ca93: 5e pop %esi <== NOT EXECUTED 12ca94: 5f pop %edi <== NOT EXECUTED 12ca95: c9 leave <== NOT EXECUTED 12ca96: c3 ret <== NOT EXECUTED 0012ca98 : int symlink( const char *actualpath, const char *sympath ) { 12ca98: 55 push %ebp 12ca99: 89 e5 mov %esp,%ebp 12ca9b: 57 push %edi 12ca9c: 56 push %esi 12ca9d: 53 push %ebx 12ca9e: 83 ec 2c sub $0x2c,%esp 12caa1: 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 ); 12caa4: 8a 10 mov (%eax),%dl 12caa6: 80 fa 2f cmp $0x2f,%dl 12caa9: 74 09 je 12cab4 12caab: 80 fa 5c cmp $0x5c,%dl 12caae: 74 04 je 12cab4 <== ALWAYS TAKEN 12cab0: 84 d2 test %dl,%dl 12cab2: 75 70 jne 12cb24 <== NEVER TAKEN 12cab4: 8d 5d d0 lea -0x30(%ebp),%ebx 12cab7: 8b 35 84 92 16 00 mov 0x169284,%esi 12cabd: 83 c6 18 add $0x18,%esi 12cac0: b9 05 00 00 00 mov $0x5,%ecx 12cac5: 89 df mov %ebx,%edi 12cac7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12cac9: b1 01 mov $0x1,%cl if ( !loc.ops->evalformake_h ) { 12cacb: 8b 55 dc mov -0x24(%ebp),%edx 12cace: 8b 52 04 mov 0x4(%edx),%edx 12cad1: 85 d2 test %edx,%edx 12cad3: 74 6e je 12cb43 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 12cad5: 56 push %esi 12cad6: 8d 75 e4 lea -0x1c(%ebp),%esi 12cad9: 56 push %esi 12cada: 53 push %ebx 12cadb: 01 c8 add %ecx,%eax 12cadd: 50 push %eax 12cade: ff d2 call *%edx if ( result != 0 ) 12cae0: 83 c4 10 add $0x10,%esp 12cae3: 85 c0 test %eax,%eax 12cae5: 75 67 jne 12cb4e return -1; if ( !loc.ops->symlink_h ) { 12cae7: 8b 55 dc mov -0x24(%ebp),%edx 12caea: 8b 42 38 mov 0x38(%edx),%eax 12caed: 85 c0 test %eax,%eax 12caef: 74 6c je 12cb5d <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 12caf1: 52 push %edx 12caf2: ff 75 e4 pushl -0x1c(%ebp) 12caf5: ff 75 08 pushl 0x8(%ebp) 12caf8: 53 push %ebx 12caf9: ff d0 call *%eax 12cafb: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 12cafd: 8b 45 dc mov -0x24(%ebp),%eax 12cb00: 83 c4 10 add $0x10,%esp 12cb03: 85 c0 test %eax,%eax 12cb05: 74 10 je 12cb17 <== ALWAYS TAKEN 12cb07: 8b 40 1c mov 0x1c(%eax),%eax 12cb0a: 85 c0 test %eax,%eax 12cb0c: 74 09 je 12cb17 <== ALWAYS TAKEN 12cb0e: 83 ec 0c sub $0xc,%esp 12cb11: 53 push %ebx 12cb12: ff d0 call *%eax 12cb14: 83 c4 10 add $0x10,%esp return result; } 12cb17: 89 f0 mov %esi,%eax 12cb19: 8d 65 f4 lea -0xc(%ebp),%esp 12cb1c: 5b pop %ebx 12cb1d: 5e pop %esi 12cb1e: 5f pop %edi 12cb1f: c9 leave 12cb20: c3 ret 12cb21: 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 ); 12cb24: 8d 5d d0 lea -0x30(%ebp),%ebx 12cb27: 8b 35 84 92 16 00 mov 0x169284,%esi 12cb2d: 83 c6 04 add $0x4,%esi 12cb30: b9 05 00 00 00 mov $0x5,%ecx 12cb35: 89 df mov %ebx,%edi 12cb37: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->evalformake_h ) { 12cb39: 8b 55 dc mov -0x24(%ebp),%edx 12cb3c: 8b 52 04 mov 0x4(%edx),%edx 12cb3f: 85 d2 test %edx,%edx 12cb41: 75 92 jne 12cad5 <== NEVER TAKEN if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 12cb43: e8 e4 5c 01 00 call 14282c <__errno> <== NOT EXECUTED 12cb48: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12cb4e: be ff ff ff ff mov $0xffffffff,%esi result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 12cb53: 89 f0 mov %esi,%eax 12cb55: 8d 65 f4 lea -0xc(%ebp),%esp 12cb58: 5b pop %ebx 12cb59: 5e pop %esi 12cb5a: 5f pop %edi 12cb5b: c9 leave 12cb5c: 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 ); 12cb5d: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12cb60: 85 c0 test %eax,%eax <== NOT EXECUTED 12cb62: 74 df je 12cb43 <== NOT EXECUTED 12cb64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12cb67: 53 push %ebx <== NOT EXECUTED 12cb68: ff d0 call *%eax <== NOT EXECUTED 12cb6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12cb6d: eb d4 jmp 12cb43 <== NOT EXECUTED 0010a654 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 10a654: 55 push %ebp 10a655: 89 e5 mov %esp,%ebp 10a657: 53 push %ebx 10a658: 83 ec 04 sub $0x4,%esp 10a65b: 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; 10a65e: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx if ( this_reent ) { 10a664: 85 d2 test %edx,%edx 10a666: 74 33 je 10a69b <== ALWAYS TAKEN current_reent = _Thread_Executing->libc_reent; 10a668: 8b 0d 38 ae 12 00 mov 0x12ae38,%ecx 10a66e: 8b 99 f0 00 00 00 mov 0xf0(%ecx),%ebx _Thread_Executing->libc_reent = this_reent; 10a674: 89 91 f0 00 00 00 mov %edx,0xf0(%ecx) _fwalk (t->libc_reent, sync_wrapper); 10a67a: 83 ec 08 sub $0x8,%esp 10a67d: 68 c8 a6 10 00 push $0x10a6c8 10a682: ff b0 f0 00 00 00 pushl 0xf0(%eax) 10a688: e8 27 c7 00 00 call 116db4 <_fwalk> _Thread_Executing->libc_reent = current_reent; 10a68d: a1 38 ae 12 00 mov 0x12ae38,%eax 10a692: 89 98 f0 00 00 00 mov %ebx,0xf0(%eax) 10a698: 83 c4 10 add $0x10,%esp } } 10a69b: 8b 5d fc mov -0x4(%ebp),%ebx 10a69e: c9 leave 10a69f: c3 ret 0010b110 : */ long sysconf( int name ) { 10b110: 55 push %ebp 10b111: 89 e5 mov %esp,%ebp 10b113: 83 ec 08 sub $0x8,%esp 10b116: 8b 45 08 mov 0x8(%ebp),%eax if ( name == _SC_CLK_TCK ) 10b119: 83 f8 02 cmp $0x2,%eax 10b11c: 74 16 je 10b134 return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 10b11e: 83 f8 04 cmp $0x4,%eax 10b121: 74 21 je 10b144 return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b123: 83 f8 33 cmp $0x33,%eax 10b126: 74 24 je 10b14c return 1024; if ( name == _SC_PAGESIZE ) 10b128: 83 f8 08 cmp $0x8,%eax 10b12b: 75 27 jne 10b154 10b12d: 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 ); } 10b131: c9 leave 10b132: c3 ret 10b133: 90 nop <== NOT EXECUTED long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 10b134: b8 40 42 0f 00 mov $0xf4240,%eax 10b139: 31 d2 xor %edx,%edx 10b13b: 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 ); } 10b141: c9 leave 10b142: c3 ret 10b143: 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; 10b144: 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 ); } 10b149: c9 leave 10b14a: c3 ret 10b14b: 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 ) 10b14c: 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 ); } 10b150: c9 leave 10b151: c3 ret 10b152: 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 ); 10b154: e8 53 8b 00 00 call 113cac <__errno> 10b159: c7 00 16 00 00 00 movl $0x16,(%eax) 10b15f: b8 ff ff ff ff mov $0xffffffff,%eax } 10b164: c9 leave 10b165: c3 ret 00117320 : int tcsetattr( int fd, int opt, struct termios *tp ) { 117320: 55 push %ebp 117321: 89 e5 mov %esp,%ebp 117323: 56 push %esi 117324: 53 push %ebx 117325: 8b 5d 08 mov 0x8(%ebp),%ebx 117328: 8b 45 0c mov 0xc(%ebp),%eax 11732b: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 11732e: 85 c0 test %eax,%eax 117330: 74 2c je 11735e <== NEVER TAKEN 117332: 48 dec %eax <== NOT EXECUTED 117333: 74 17 je 11734c <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 117335: e8 c6 49 00 00 call 11bd00 <__errno> <== NOT EXECUTED 11733a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 117340: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 117345: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 117348: 5b pop %ebx <== NOT EXECUTED 117349: 5e pop %esi <== NOT EXECUTED 11734a: c9 leave <== NOT EXECUTED 11734b: 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) 11734c: 50 push %eax <== NOT EXECUTED 11734d: 6a 00 push $0x0 <== NOT EXECUTED 11734f: 6a 03 push $0x3 <== NOT EXECUTED 117351: 53 push %ebx <== NOT EXECUTED 117352: e8 09 35 00 00 call 11a860 <== NOT EXECUTED 117357: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11735a: 85 c0 test %eax,%eax <== NOT EXECUTED 11735c: 78 e2 js 117340 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 11735e: 89 75 10 mov %esi,0x10(%ebp) 117361: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 117368: 89 5d 08 mov %ebx,0x8(%ebp) } } 11736b: 8d 65 f8 lea -0x8(%ebp),%esp 11736e: 5b pop %ebx 11736f: 5e pop %esi 117370: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 117371: e9 ea 34 00 00 jmp 11a860 0010b450 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10b450: 55 push %ebp 10b451: 89 e5 mov %esp,%ebp 10b453: 56 push %esi 10b454: 53 push %ebx 10b455: 8b 5d 0c mov 0xc(%ebp),%ebx 10b458: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10b45b: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10b45f: 0f 85 db 00 00 00 jne 10b540 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10b465: 85 f6 test %esi,%esi 10b467: 0f 84 d3 00 00 00 je 10b540 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10b46d: 85 db test %ebx,%ebx 10b46f: 74 21 je 10b492 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10b471: 8b 03 mov (%ebx),%eax 10b473: 48 dec %eax 10b474: 83 f8 01 cmp $0x1,%eax 10b477: 0f 87 c3 00 00 00 ja 10b540 <== 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 ) 10b47d: 8b 43 04 mov 0x4(%ebx),%eax 10b480: 85 c0 test %eax,%eax 10b482: 0f 84 b8 00 00 00 je 10b540 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10b488: 48 dec %eax 10b489: 83 f8 1f cmp $0x1f,%eax 10b48c: 0f 87 ae 00 00 00 ja 10b540 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b492: a1 78 93 12 00 mov 0x129378,%eax 10b497: 40 inc %eax 10b498: a3 78 93 12 00 mov %eax,0x129378 * 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 ); 10b49d: 83 ec 0c sub $0xc,%esp 10b4a0: 68 00 97 12 00 push $0x129700 10b4a5: e8 2a 1e 00 00 call 10d2d4 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10b4aa: 83 c4 10 add $0x10,%esp 10b4ad: 85 c0 test %eax,%eax 10b4af: 0f 84 a2 00 00 00 je 10b557 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; 10b4b5: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10b4b9: 8b 15 38 94 12 00 mov 0x129438,%edx 10b4bf: 8b 52 08 mov 0x8(%edx),%edx 10b4c2: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10b4c5: 85 db test %ebx,%ebx 10b4c7: 74 11 je 10b4da ptimer->inf.sigev_notify = evp->sigev_notify; 10b4c9: 8b 13 mov (%ebx),%edx 10b4cb: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10b4ce: 8b 53 04 mov 0x4(%ebx),%edx 10b4d1: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10b4d4: 8b 53 08 mov 0x8(%ebx),%edx 10b4d7: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10b4da: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10b4e1: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10b4e8: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10b4ef: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10b4f6: 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; 10b4fd: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10b504: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10b50b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10b512: 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; 10b519: 8b 50 08 mov 0x8(%eax),%edx 10b51c: 0f b7 da movzwl %dx,%ebx 10b51f: 8b 0d 1c 97 12 00 mov 0x12971c,%ecx 10b525: 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; 10b528: 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; 10b52f: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10b531: e8 c2 2a 00 00 call 10dff8 <_Thread_Enable_dispatch> 10b536: 31 c0 xor %eax,%eax return 0; } 10b538: 8d 65 f8 lea -0x8(%ebp),%esp 10b53b: 5b pop %ebx 10b53c: 5e pop %esi 10b53d: c9 leave 10b53e: c3 ret 10b53f: 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 ); 10b540: e8 bf 8c 00 00 call 114204 <__errno> 10b545: c7 00 16 00 00 00 movl $0x16,(%eax) 10b54b: 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; } 10b550: 8d 65 f8 lea -0x8(%ebp),%esp 10b553: 5b pop %ebx 10b554: 5e pop %esi 10b555: c9 leave 10b556: c3 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 10b557: e8 9c 2a 00 00 call 10dff8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10b55c: e8 a3 8c 00 00 call 114204 <__errno> 10b561: c7 00 0b 00 00 00 movl $0xb,(%eax) 10b567: b8 ff ff ff ff mov $0xffffffff,%eax 10b56c: eb ca jmp 10b538 0010b990 : int timer_delete( timer_t timerid ) { 10b990: 55 push %ebp 10b991: 89 e5 mov %esp,%ebp 10b993: 53 push %ebx 10b994: 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 *) 10b997: 8d 45 f4 lea -0xc(%ebp),%eax 10b99a: 50 push %eax 10b99b: ff 75 08 pushl 0x8(%ebp) 10b99e: 68 80 97 12 00 push $0x129780 10b9a3: e8 34 21 00 00 call 10dadc <_Objects_Get> 10b9a8: 89 c3 mov %eax,%ebx */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10b9aa: 83 c4 10 add $0x10,%esp 10b9ad: 8b 4d f4 mov -0xc(%ebp),%ecx 10b9b0: 85 c9 test %ecx,%ecx 10b9b2: 74 18 je 10b9cc #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b9b4: e8 af 8f 00 00 call 114968 <__errno> 10b9b9: c7 00 16 00 00 00 movl $0x16,(%eax) 10b9bf: b8 ff ff ff ff mov $0xffffffff,%eax } 10b9c4: 8b 5d fc mov -0x4(%ebp),%ebx 10b9c7: c9 leave 10b9c8: c3 ret 10b9c9: 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 ); 10b9cc: 83 ec 08 sub $0x8,%esp 10b9cf: 50 push %eax 10b9d0: 68 80 97 12 00 push $0x129780 10b9d5: e8 ce 1c 00 00 call 10d6a8 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10b9da: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10b9de: 8d 43 10 lea 0x10(%ebx),%eax 10b9e1: 89 04 24 mov %eax,(%esp) 10b9e4: e8 d3 3a 00 00 call 10f4bc <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10b9e9: 58 pop %eax 10b9ea: 5a pop %edx 10b9eb: 53 push %ebx 10b9ec: 68 80 97 12 00 push $0x129780 10b9f1: e8 b6 1f 00 00 call 10d9ac <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10b9f6: e8 55 29 00 00 call 10e350 <_Thread_Enable_dispatch> 10b9fb: 31 c0 xor %eax,%eax return 0; 10b9fd: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10ba00: 8b 5d fc mov -0x4(%ebp),%ebx 10ba03: c9 leave 10ba04: c3 ret 0010c858 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10c858: 55 push %ebp 10c859: 89 e5 mov %esp,%ebp 10c85b: 53 push %ebx 10c85c: 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 *) 10c85f: 8d 45 f4 lea -0xc(%ebp),%eax 10c862: 50 push %eax 10c863: ff 75 08 pushl 0x8(%ebp) 10c866: 68 40 b0 12 00 push $0x12b040 10c86b: e8 bc 20 00 00 call 10e92c <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10c870: 83 c4 10 add $0x10,%esp 10c873: 8b 55 f4 mov -0xc(%ebp),%edx 10c876: 85 d2 test %edx,%edx 10c878: 74 1a je 10c894 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c87a: e8 5d 8b 00 00 call 1153dc <__errno> 10c87f: c7 00 16 00 00 00 movl $0x16,(%eax) 10c885: bb ff ff ff ff mov $0xffffffff,%ebx } 10c88a: 89 d8 mov %ebx,%eax 10c88c: 8b 5d fc mov -0x4(%ebp),%ebx 10c88f: c9 leave 10c890: c3 ret 10c891: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 10c894: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10c897: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10c89e: e8 fd 28 00 00 call 10f1a0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c8a3: 89 d8 mov %ebx,%eax 10c8a5: 8b 5d fc mov -0x4(%ebp),%ebx 10c8a8: c9 leave 10c8a9: c3 ret 0010c8ac : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 10c8ac: 55 push %ebp 10c8ad: 89 e5 mov %esp,%ebp 10c8af: 56 push %esi 10c8b0: 53 push %ebx 10c8b1: 83 ec 10 sub $0x10,%esp 10c8b4: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 10c8b7: 85 db test %ebx,%ebx 10c8b9: 74 65 je 10c920 rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 10c8bb: 83 ec 0c sub $0xc,%esp 10c8be: 8d 45 ec lea -0x14(%ebp),%eax 10c8c1: 50 push %eax 10c8c2: e8 cd 16 00 00 call 10df94 <_TOD_Get> 10c8c7: 83 c4 0c add $0xc,%esp 10c8ca: 8d 45 f4 lea -0xc(%ebp),%eax 10c8cd: 50 push %eax 10c8ce: ff 75 08 pushl 0x8(%ebp) 10c8d1: 68 40 b0 12 00 push $0x12b040 10c8d6: e8 51 20 00 00 call 10e92c <_Objects_Get> 10c8db: 89 c6 mov %eax,%esi ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10c8dd: 83 c4 10 add $0x10,%esp 10c8e0: 8b 45 f4 mov -0xc(%ebp),%eax 10c8e3: 85 c0 test %eax,%eax 10c8e5: 75 39 jne 10c920 case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10c8e7: a1 24 ae 12 00 mov 0x12ae24,%eax _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10c8ec: 83 ec 08 sub $0x8,%esp 10c8ef: 8d 53 08 lea 0x8(%ebx),%edx 10c8f2: 52 push %edx 10c8f3: 8b 56 1c mov 0x1c(%esi),%edx 10c8f6: 03 56 24 add 0x24(%esi),%edx 10c8f9: 29 c2 sub %eax,%edx 10c8fb: 52 push %edx 10c8fc: e8 43 35 00 00 call 10fe44 <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 10c901: 8b 46 54 mov 0x54(%esi),%eax 10c904: 8b 56 58 mov 0x58(%esi),%edx 10c907: 89 03 mov %eax,(%ebx) 10c909: 89 53 04 mov %edx,0x4(%ebx) _Thread_Enable_dispatch(); 10c90c: e8 8f 28 00 00 call 10f1a0 <_Thread_Enable_dispatch> 10c911: 31 c0 xor %eax,%eax return 0; 10c913: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c916: 8d 65 f8 lea -0x8(%ebp),%esp 10c919: 5b pop %ebx 10c91a: 5e pop %esi 10c91b: c9 leave 10c91c: c3 ret 10c91d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c920: e8 b7 8a 00 00 call 1153dc <__errno> 10c925: c7 00 16 00 00 00 movl $0x16,(%eax) 10c92b: b8 ff ff ff ff mov $0xffffffff,%eax 10c930: eb e4 jmp 10c916 0010b570 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10b570: 55 push %ebp 10b571: 89 e5 mov %esp,%ebp 10b573: 57 push %edi 10b574: 56 push %esi 10b575: 53 push %ebx 10b576: 83 ec 3c sub $0x3c,%esp 10b579: 8b 4d 0c mov 0xc(%ebp),%ecx 10b57c: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10b57f: 85 db test %ebx,%ebx 10b581: 0f 84 39 01 00 00 je 10b6c0 <== 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 ) || 10b587: 81 7b 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%ebx) 10b58e: 0f 87 2c 01 00 00 ja 10b6c0 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 10b594: 81 7b 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%ebx) 10b59b: 0f 87 1f 01 00 00 ja 10b6c0 <== 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 ) { 10b5a1: 83 f9 04 cmp $0x4,%ecx 10b5a4: 0f 84 da 00 00 00 je 10b684 10b5aa: 85 c9 test %ecx,%ecx 10b5ac: 0f 85 0e 01 00 00 jne 10b6c0 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b5b2: 8d 45 cc lea -0x34(%ebp),%eax 10b5b5: 89 45 c4 mov %eax,-0x3c(%ebp) 10b5b8: b9 04 00 00 00 mov $0x4,%ecx 10b5bd: 89 c7 mov %eax,%edi 10b5bf: 89 de mov %ebx,%esi 10b5c1: 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 *) 10b5c3: 50 push %eax 10b5c4: 8d 45 e4 lea -0x1c(%ebp),%eax 10b5c7: 50 push %eax 10b5c8: ff 75 08 pushl 0x8(%ebp) 10b5cb: 68 00 97 12 00 push $0x129700 10b5d0: e8 af 21 00 00 call 10d784 <_Objects_Get> 10b5d5: 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 ) { 10b5d7: 83 c4 10 add $0x10,%esp 10b5da: 8b 7d e4 mov -0x1c(%ebp),%edi 10b5dd: 85 ff test %edi,%edi 10b5df: 0f 85 db 00 00 00 jne 10b6c0 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 ) { 10b5e5: 8b 75 d4 mov -0x2c(%ebp),%esi 10b5e8: 85 f6 test %esi,%esi 10b5ea: 75 0b jne 10b5f7 10b5ec: 8b 4d d8 mov -0x28(%ebp),%ecx 10b5ef: 85 c9 test %ecx,%ecx 10b5f1: 0f 84 e1 00 00 00 je 10b6d8 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10b5f7: 83 ec 0c sub $0xc,%esp 10b5fa: 53 push %ebx 10b5fb: 89 55 c0 mov %edx,-0x40(%ebp) 10b5fe: e8 f9 36 00 00 call 10ecfc <_Timespec_To_ticks> 10b603: 8b 55 c0 mov -0x40(%ebp),%edx 10b606: 89 42 64 mov %eax,0x64(%edx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10b609: 8d 45 d4 lea -0x2c(%ebp),%eax 10b60c: 89 04 24 mov %eax,(%esp) 10b60f: e8 e8 36 00 00 call 10ecfc <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10b614: 8b 55 c0 mov -0x40(%ebp),%edx 10b617: 89 14 24 mov %edx,(%esp) 10b61a: 68 44 b7 10 00 push $0x10b744 10b61f: ff 72 08 pushl 0x8(%edx) 10b622: 50 push %eax 10b623: 8d 42 10 lea 0x10(%edx),%eax 10b626: 50 push %eax 10b627: e8 1c 5b 00 00 call 111148 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10b62c: 83 c4 20 add $0x20,%esp 10b62f: 84 c0 test %al,%al 10b631: 8b 55 c0 mov -0x40(%ebp),%edx 10b634: 0f 84 ea 00 00 00 je 10b724 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10b63a: 8b 45 14 mov 0x14(%ebp),%eax 10b63d: 85 c0 test %eax,%eax 10b63f: 0f 84 ef 00 00 00 je 10b734 *ovalue = ptimer->timer_data; 10b645: 8d 42 54 lea 0x54(%edx),%eax 10b648: b9 04 00 00 00 mov $0x4,%ecx 10b64d: 8b 7d 14 mov 0x14(%ebp),%edi 10b650: 89 c6 mov %eax,%esi 10b652: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10b654: b9 04 00 00 00 mov $0x4,%ecx 10b659: 89 c7 mov %eax,%edi 10b65b: 8b 75 c4 mov -0x3c(%ebp),%esi 10b65e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b660: c6 42 3c 03 movb $0x3,0x3c(%edx) _TOD_Get( &ptimer->time ); 10b664: 83 ec 0c sub $0xc,%esp 10b667: 83 c2 6c add $0x6c,%edx 10b66a: 52 push %edx 10b66b: e8 a0 17 00 00 call 10ce10 <_TOD_Get> _Thread_Enable_dispatch(); 10b670: e8 83 29 00 00 call 10dff8 <_Thread_Enable_dispatch> 10b675: 31 c0 xor %eax,%eax return 0; 10b677: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b67a: 8d 65 f4 lea -0xc(%ebp),%esp 10b67d: 5b pop %ebx 10b67e: 5e pop %esi 10b67f: 5f pop %edi 10b680: c9 leave 10b681: c3 ret 10b682: 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; 10b684: 8d 45 cc lea -0x34(%ebp),%eax 10b687: 89 45 c4 mov %eax,-0x3c(%ebp) 10b68a: 89 c7 mov %eax,%edi 10b68c: 89 de mov %ebx,%esi 10b68e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 10b690: 83 ec 0c sub $0xc,%esp 10b693: 8d 75 dc lea -0x24(%ebp),%esi 10b696: 56 push %esi 10b697: e8 74 17 00 00 call 10ce10 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10b69c: 59 pop %ecx 10b69d: 5f pop %edi 10b69e: 8d 7d d4 lea -0x2c(%ebp),%edi 10b6a1: 57 push %edi 10b6a2: 56 push %esi 10b6a3: e8 f4 35 00 00 call 10ec9c <_Timespec_Greater_than> 10b6a8: 83 c4 10 add $0x10,%esp 10b6ab: 84 c0 test %al,%al 10b6ad: 75 11 jne 10b6c0 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10b6af: 52 push %edx 10b6b0: 57 push %edi 10b6b1: 57 push %edi 10b6b2: 56 push %esi 10b6b3: e8 08 36 00 00 call 10ecc0 <_Timespec_Subtract> 10b6b8: 83 c4 10 add $0x10,%esp 10b6bb: e9 03 ff ff ff jmp 10b5c3 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b6c0: e8 3f 8b 00 00 call 114204 <__errno> 10b6c5: c7 00 16 00 00 00 movl $0x16,(%eax) 10b6cb: b8 ff ff ff ff mov $0xffffffff,%eax } 10b6d0: 8d 65 f4 lea -0xc(%ebp),%esp 10b6d3: 5b pop %ebx 10b6d4: 5e pop %esi 10b6d5: 5f pop %edi 10b6d6: c9 leave 10b6d7: 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 ); 10b6d8: 83 ec 0c sub $0xc,%esp 10b6db: 8d 40 10 lea 0x10(%eax),%eax 10b6de: 50 push %eax 10b6df: 89 55 c0 mov %edx,-0x40(%ebp) 10b6e2: e8 35 3a 00 00 call 10f11c <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10b6e7: 83 c4 10 add $0x10,%esp 10b6ea: 8b 55 14 mov 0x14(%ebp),%edx 10b6ed: 85 d2 test %edx,%edx 10b6ef: 8b 55 c0 mov -0x40(%ebp),%edx 10b6f2: 74 48 je 10b73c *ovalue = ptimer->timer_data; 10b6f4: 8d 42 54 lea 0x54(%edx),%eax 10b6f7: b9 04 00 00 00 mov $0x4,%ecx 10b6fc: 8b 7d 14 mov 0x14(%ebp),%edi 10b6ff: 89 c6 mov %eax,%esi 10b701: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10b703: b9 04 00 00 00 mov $0x4,%ecx 10b708: 89 c7 mov %eax,%edi 10b70a: 8b 75 c4 mov -0x3c(%ebp),%esi 10b70d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b70f: c6 42 3c 04 movb $0x4,0x3c(%edx) /* Returns with success */ _Thread_Enable_dispatch(); 10b713: e8 e0 28 00 00 call 10dff8 <_Thread_Enable_dispatch> 10b718: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b71a: 8d 65 f4 lea -0xc(%ebp),%esp 10b71d: 5b pop %ebx 10b71e: 5e pop %esi 10b71f: 5f pop %edi 10b720: c9 leave 10b721: c3 ret 10b722: 66 90 xchg %ax,%ax <== NOT EXECUTED ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 10b724: e8 cf 28 00 00 call 10dff8 <_Thread_Enable_dispatch> 10b729: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b72b: 8d 65 f4 lea -0xc(%ebp),%esp 10b72e: 5b pop %ebx 10b72f: 5e pop %esi 10b730: 5f pop %edi 10b731: c9 leave 10b732: c3 ret 10b733: 90 nop <== NOT EXECUTED 10b734: 8d 42 54 lea 0x54(%edx),%eax 10b737: e9 18 ff ff ff jmp 10b654 10b73c: 8d 42 54 lea 0x54(%edx),%eax 10b73f: eb c2 jmp 10b703 0010d458 : int truncate( const char *path, off_t length ) { 10d458: 55 push %ebp 10d459: 89 e5 mov %esp,%ebp 10d45b: 57 push %edi 10d45c: 56 push %esi 10d45d: 53 push %ebx 10d45e: 83 ec 14 sub $0x14,%esp 10d461: 8b 75 0c mov 0xc(%ebp),%esi 10d464: 8b 7d 10 mov 0x10(%ebp),%edi int status; int fd; fd = open( path, O_WRONLY ); 10d467: 6a 01 push $0x1 10d469: ff 75 08 pushl 0x8(%ebp) 10d46c: e8 df db ff ff call 10b050 10d471: 89 c3 mov %eax,%ebx if ( fd == -1 ) 10d473: 83 c4 10 add $0x10,%esp 10d476: 83 f8 ff cmp $0xffffffff,%eax 10d479: 74 21 je 10d49c return -1; status = ftruncate( fd, length ); 10d47b: 50 push %eax 10d47c: 57 push %edi 10d47d: 56 push %esi 10d47e: 53 push %ebx 10d47f: e8 9c 5f 00 00 call 113420 10d484: 89 c6 mov %eax,%esi (void) close( fd ); 10d486: 89 1c 24 mov %ebx,(%esp) 10d489: e8 56 ca ff ff call 109ee4 return status; 10d48e: 83 c4 10 add $0x10,%esp } 10d491: 89 f0 mov %esi,%eax 10d493: 8d 65 f4 lea -0xc(%ebp),%esp 10d496: 5b pop %ebx 10d497: 5e pop %esi 10d498: 5f pop %edi 10d499: c9 leave 10d49a: c3 ret 10d49b: 90 nop <== NOT EXECUTED { int status; int fd; fd = open( path, O_WRONLY ); if ( fd == -1 ) 10d49c: be ff ff ff ff mov $0xffffffff,%esi status = ftruncate( fd, length ); (void) close( fd ); return status; } 10d4a1: 89 f0 mov %esi,%eax 10d4a3: 8d 65 f4 lea -0xc(%ebp),%esp 10d4a6: 5b pop %ebx 10d4a7: 5e pop %esi 10d4a8: 5f pop %edi 10d4a9: c9 leave 10d4aa: c3 ret 0010b328 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 10b328: 55 push %ebp 10b329: 89 e5 mov %esp,%ebp 10b32b: 57 push %edi 10b32c: 56 push %esi 10b32d: 53 push %ebx 10b32e: 83 ec 2c sub $0x2c,%esp 10b331: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10b334: 8b 0d fc 98 12 00 mov 0x1298fc,%ecx 10b33a: 85 c9 test %ecx,%ecx 10b33c: 0f 84 8e 00 00 00 je 10b3d0 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 10b342: 83 ec 0c sub $0xc,%esp 10b345: 68 e0 98 12 00 push $0x1298e0 10b34a: e8 21 39 00 00 call 10ec70 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 10b34f: 83 e8 02 sub $0x2,%eax 10b352: 83 c4 10 add $0x10,%esp 10b355: 83 f8 01 cmp $0x1,%eax 10b358: 0f 86 a2 00 00 00 jbe 10b400 <== NEVER TAKEN 10b35e: 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 ) { 10b360: 85 db test %ebx,%ebx 10b362: 74 62 je 10b3c6 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10b364: ba 83 de 1b 43 mov $0x431bde83,%edx 10b369: 89 d8 mov %ebx,%eax 10b36b: f7 e2 mul %edx 10b36d: c1 ea 12 shr $0x12,%edx 10b370: 89 55 e0 mov %edx,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10b373: 8d 04 92 lea (%edx,%edx,4),%eax 10b376: 8d 04 80 lea (%eax,%eax,4),%eax 10b379: 8d 04 80 lea (%eax,%eax,4),%eax 10b37c: 8d 04 80 lea (%eax,%eax,4),%eax 10b37f: 8d 04 80 lea (%eax,%eax,4),%eax 10b382: 8d 04 80 lea (%eax,%eax,4),%eax 10b385: c1 e0 06 shl $0x6,%eax 10b388: 29 c3 sub %eax,%ebx 10b38a: 8d 04 9b lea (%ebx,%ebx,4),%eax 10b38d: 8d 04 80 lea (%eax,%eax,4),%eax 10b390: 8d 04 80 lea (%eax,%eax,4),%eax 10b393: c1 e0 03 shl $0x3,%eax 10b396: 89 45 e4 mov %eax,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 10b399: 83 ec 0c sub $0xc,%esp 10b39c: 8d 5d e0 lea -0x20(%ebp),%ebx 10b39f: 53 push %ebx 10b3a0: e8 33 34 00 00 call 10e7d8 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10b3a5: 89 1c 24 mov %ebx,(%esp) 10b3a8: e8 2b 34 00 00 call 10e7d8 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b3ad: a3 ec 98 12 00 mov %eax,0x1298ec _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b3b2: 58 pop %eax 10b3b3: 5a pop %edx 10b3b4: 68 e0 98 12 00 push $0x1298e0 10b3b9: 68 38 90 12 00 push $0x129038 10b3be: e8 75 37 00 00 call 10eb38 <_Watchdog_Insert> 10b3c3: 83 c4 10 add $0x10,%esp } return remaining; } 10b3c6: 89 f0 mov %esi,%eax 10b3c8: 8d 65 f4 lea -0xc(%ebp),%esp 10b3cb: 5b pop %ebx 10b3cc: 5e pop %esi 10b3cd: 5f pop %edi 10b3ce: c9 leave 10b3cf: c3 ret Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b3d0: c7 05 e8 98 12 00 00 movl $0x0,0x1298e8 10b3d7: 00 00 00 the_watchdog->routine = routine; 10b3da: c7 05 fc 98 12 00 5c movl $0x10b45c,0x1298fc 10b3e1: b4 10 00 the_watchdog->id = id; 10b3e4: c7 05 00 99 12 00 00 movl $0x0,0x129900 10b3eb: 00 00 00 the_watchdog->user_data = user_data; 10b3ee: c7 05 04 99 12 00 00 movl $0x0,0x129904 10b3f5: 00 00 00 10b3f8: 31 f6 xor %esi,%esi 10b3fa: e9 61 ff ff ff jmp 10b360 10b3ff: 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); 10b400: a1 f4 98 12 00 mov 0x1298f4,%eax 10b405: 03 05 ec 98 12 00 add 0x1298ec,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10b40b: 83 ec 08 sub $0x8,%esp 10b40e: 8d 55 e0 lea -0x20(%ebp),%edx 10b411: 52 push %edx 10b412: 2b 05 f8 98 12 00 sub 0x1298f8,%eax 10b418: 50 push %eax 10b419: e8 36 33 00 00 call 10e754 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10b41e: 8b 45 e0 mov -0x20(%ebp),%eax 10b421: 8d 04 80 lea (%eax,%eax,4),%eax 10b424: 8d 04 80 lea (%eax,%eax,4),%eax 10b427: 8d 04 80 lea (%eax,%eax,4),%eax 10b42a: 8d 04 80 lea (%eax,%eax,4),%eax 10b42d: 8d 04 80 lea (%eax,%eax,4),%eax 10b430: 8d 3c 80 lea (%eax,%eax,4),%edi 10b433: c1 e7 06 shl $0x6,%edi remaining += tp.tv_nsec / 1000; 10b436: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10b43b: 8b 45 e4 mov -0x1c(%ebp),%eax 10b43e: f7 e9 imul %ecx 10b440: 89 45 d0 mov %eax,-0x30(%ebp) 10b443: 89 55 d4 mov %edx,-0x2c(%ebp) 10b446: 8b 75 d4 mov -0x2c(%ebp),%esi 10b449: c1 fe 06 sar $0x6,%esi 10b44c: 8b 45 e4 mov -0x1c(%ebp),%eax 10b44f: 99 cltd 10b450: 29 d6 sub %edx,%esi 10b452: 01 fe add %edi,%esi 10b454: 83 c4 10 add $0x10,%esp 10b457: e9 04 ff ff ff jmp 10b360 00112f08 : #include int unlink( const char *path ) { 112f08: 55 push %ebp 112f09: 89 e5 mov %esp,%ebp 112f0b: 57 push %edi 112f0c: 56 push %esi 112f0d: 53 push %ebx 112f0e: 83 ec 58 sub $0x58,%esp 112f11: 8b 55 08 mov 0x8(%ebp),%edx /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 112f14: 52 push %edx 112f15: 89 55 ac mov %edx,-0x54(%ebp) 112f18: e8 87 4f ff ff call 107ea4 112f1d: 89 c3 mov %eax,%ebx if ( parentpathlen == 0 ) 112f1f: 83 c4 10 add $0x10,%esp 112f22: 85 c0 test %eax,%eax 112f24: 8b 55 ac mov -0x54(%ebp),%edx 112f27: 0f 85 7b 01 00 00 jne 1130a8 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 112f2d: 8a 02 mov (%edx),%al 112f2f: 3c 2f cmp $0x2f,%al 112f31: 74 0c je 112f3f 112f33: 3c 5c cmp $0x5c,%al 112f35: 74 08 je 112f3f <== ALWAYS TAKEN 112f37: 84 c0 test %al,%al 112f39: 0f 85 ed 00 00 00 jne 11302c <== NEVER TAKEN 112f3f: 8d 45 d4 lea -0x2c(%ebp),%eax 112f42: 89 45 b4 mov %eax,-0x4c(%ebp) 112f45: 8b 35 18 50 12 00 mov 0x125018,%esi 112f4b: 83 c6 18 add $0x18,%esi 112f4e: b9 05 00 00 00 mov $0x5,%ecx 112f53: 89 c7 mov %eax,%edi 112f55: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 112f57: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 112f5b: 8d 7d c0 lea -0x40(%ebp),%edi 112f5e: b9 05 00 00 00 mov $0x5,%ecx 112f63: 8b 75 b4 mov -0x4c(%ebp),%esi 112f66: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 112f68: 8d 1c 1a lea (%edx,%ebx,1),%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 112f6b: be ff ff ff ff mov $0xffffffff,%esi 112f70: 89 f1 mov %esi,%ecx 112f72: 89 df mov %ebx,%edi 112f74: 31 c0 xor %eax,%eax 112f76: f2 ae repnz scas %es:(%edi),%al 112f78: f7 d1 not %ecx 112f7a: 49 dec %ecx 112f7b: 83 ec 08 sub $0x8,%esp 112f7e: 51 push %ecx 112f7f: 53 push %ebx 112f80: e8 e3 4e ff ff call 107e68 112f85: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 112f87: 89 f1 mov %esi,%ecx 112f89: 89 df mov %ebx,%edi 112f8b: 31 c0 xor %eax,%eax 112f8d: f2 ae repnz scas %es:(%edi),%al 112f8f: f7 d1 not %ecx 112f91: 49 dec %ecx 112f92: c7 04 24 00 00 00 00 movl $0x0,(%esp) 112f99: 8d 75 c0 lea -0x40(%ebp),%esi 112f9c: 56 push %esi 112f9d: 6a 00 push $0x0 112f9f: 51 push %ecx 112fa0: 53 push %ebx 112fa1: e8 4e 4f ff ff call 107ef4 0, &loc, false ); if ( result != 0 ) { 112fa6: 83 c4 20 add $0x20,%esp 112fa9: 85 c0 test %eax,%eax 112fab: 0f 85 9f 00 00 00 jne 113050 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 112fb1: 8b 55 cc mov -0x34(%ebp),%edx 112fb4: 8b 42 10 mov 0x10(%edx),%eax 112fb7: 85 c0 test %eax,%eax 112fb9: 0f 84 a5 00 00 00 je 113064 <== 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 ) { 112fbf: 83 ec 0c sub $0xc,%esp 112fc2: 56 push %esi 112fc3: ff d0 call *%eax 112fc5: 83 c4 10 add $0x10,%esp 112fc8: 48 dec %eax 112fc9: 0f 84 05 01 00 00 je 1130d4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 112fcf: 8b 55 cc mov -0x34(%ebp),%edx 112fd2: 8b 42 0c mov 0xc(%edx),%eax 112fd5: 85 c0 test %eax,%eax 112fd7: 0f 84 87 00 00 00 je 113064 <== ALWAYS TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 112fdd: 83 ec 08 sub $0x8,%esp 112fe0: 56 push %esi 112fe1: ff 75 b4 pushl -0x4c(%ebp) 112fe4: ff d0 call *%eax 112fe6: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 112fe8: 8b 45 cc mov -0x34(%ebp),%eax 112feb: 83 c4 10 add $0x10,%esp 112fee: 85 c0 test %eax,%eax 112ff0: 74 10 je 113002 <== ALWAYS TAKEN 112ff2: 8b 40 1c mov 0x1c(%eax),%eax 112ff5: 85 c0 test %eax,%eax 112ff7: 74 09 je 113002 <== ALWAYS TAKEN 112ff9: 83 ec 0c sub $0xc,%esp 112ffc: 56 push %esi 112ffd: ff d0 call *%eax 112fff: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 113002: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 113006: 74 19 je 113021 rtems_filesystem_freenode( &parentloc ); 113008: 8b 45 e0 mov -0x20(%ebp),%eax 11300b: 85 c0 test %eax,%eax 11300d: 74 12 je 113021 <== ALWAYS TAKEN 11300f: 8b 40 1c mov 0x1c(%eax),%eax 113012: 85 c0 test %eax,%eax 113014: 74 0b je 113021 <== ALWAYS TAKEN 113016: 83 ec 0c sub $0xc,%esp 113019: ff 75 b4 pushl -0x4c(%ebp) 11301c: ff d0 call *%eax 11301e: 83 c4 10 add $0x10,%esp return result; } 113021: 89 d8 mov %ebx,%eax 113023: 8d 65 f4 lea -0xc(%ebp),%esp 113026: 5b pop %ebx 113027: 5e pop %esi 113028: 5f pop %edi 113029: c9 leave 11302a: c3 ret 11302b: 90 nop <== NOT EXECUTED */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); 11302c: 8d 45 d4 lea -0x2c(%ebp),%eax 11302f: 89 45 b4 mov %eax,-0x4c(%ebp) 113032: 8b 35 18 50 12 00 mov 0x125018,%esi 113038: 83 c6 04 add $0x4,%esi 11303b: b9 05 00 00 00 mov $0x5,%ecx 113040: 89 c7 mov %eax,%edi 113042: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 113044: c6 45 b3 00 movb $0x0,-0x4d(%ebp) 113048: e9 0e ff ff ff jmp 112f5b 11304d: 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 ) 113050: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 113054: 0f 85 c5 00 00 00 jne 11311f <== NEVER TAKEN result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 11305a: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 11305f: eb c0 jmp 113021 <== NOT EXECUTED 113061: 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 ); 113064: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 113067: 85 c0 test %eax,%eax <== NOT EXECUTED 113069: 74 09 je 113074 <== NOT EXECUTED 11306b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11306e: 56 push %esi <== NOT EXECUTED 11306f: ff d0 call *%eax <== NOT EXECUTED 113071: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 113074: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED 113078: 74 19 je 113093 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 11307a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 11307d: 85 c0 test %eax,%eax <== NOT EXECUTED 11307f: 74 12 je 113093 <== NOT EXECUTED 113081: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 113084: 85 c0 test %eax,%eax <== NOT EXECUTED 113086: 74 0b je 113093 <== NOT EXECUTED 113088: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11308b: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 11308e: ff d0 call *%eax <== NOT EXECUTED 113090: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 113093: e8 38 06 00 00 call 1136d0 <__errno> <== NOT EXECUTED 113098: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11309e: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 1130a3: e9 79 ff ff ff jmp 113021 <== 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, 1130a8: 83 ec 0c sub $0xc,%esp 1130ab: 6a 00 push $0x0 1130ad: 8d 45 d4 lea -0x2c(%ebp),%eax 1130b0: 89 45 b4 mov %eax,-0x4c(%ebp) 1130b3: 50 push %eax 1130b4: 6a 02 push $0x2 1130b6: 53 push %ebx 1130b7: 52 push %edx 1130b8: 89 55 ac mov %edx,-0x54(%ebp) 1130bb: e8 08 4f ff ff call 107fc8 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 1130c0: 83 c4 20 add $0x20,%esp 1130c3: 85 c0 test %eax,%eax 1130c5: 8b 55 ac mov -0x54(%ebp),%edx 1130c8: 75 90 jne 11305a <== ALWAYS TAKEN 1130ca: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 1130ce: e9 88 fe ff ff jmp 112f5b 1130d3: 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 ); 1130d4: 8b 45 cc mov -0x34(%ebp),%eax 1130d7: 85 c0 test %eax,%eax 1130d9: 74 10 je 1130eb <== ALWAYS TAKEN 1130db: 8b 40 1c mov 0x1c(%eax),%eax 1130de: 85 c0 test %eax,%eax 1130e0: 74 09 je 1130eb <== ALWAYS TAKEN 1130e2: 83 ec 0c sub $0xc,%esp 1130e5: 56 push %esi 1130e6: ff d0 call *%eax 1130e8: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 1130eb: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 1130ef: 74 19 je 11310a <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 1130f1: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1130f4: 85 c0 test %eax,%eax <== NOT EXECUTED 1130f6: 74 12 je 11310a <== NOT EXECUTED 1130f8: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1130fb: 85 c0 test %eax,%eax <== NOT EXECUTED 1130fd: 74 0b je 11310a <== NOT EXECUTED 1130ff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113102: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 113105: ff d0 call *%eax <== NOT EXECUTED 113107: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 11310a: e8 c1 05 00 00 call 1136d0 <__errno> 11310f: c7 00 15 00 00 00 movl $0x15,(%eax) 113115: bb ff ff ff ff mov $0xffffffff,%ebx 11311a: e9 02 ff ff ff jmp 113021 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 11311f: 8b 45 e0 mov -0x20(%ebp),%eax 113122: 85 c0 test %eax,%eax 113124: 0f 84 30 ff ff ff je 11305a <== ALWAYS TAKEN 11312a: 8b 40 1c mov 0x1c(%eax),%eax 11312d: 85 c0 test %eax,%eax 11312f: 0f 84 25 ff ff ff je 11305a <== ALWAYS TAKEN 113135: 83 ec 0c sub $0xc,%esp 113138: ff 75 b4 pushl -0x4c(%ebp) 11313b: ff d0 call *%eax 11313d: 83 cb ff or $0xffffffff,%ebx 113140: 83 c4 10 add $0x10,%esp 113143: e9 d9 fe ff ff jmp 113021 0012cc50 : */ int unmount( const char *path ) { 12cc50: 55 push %ebp 12cc51: 89 e5 mov %esp,%ebp 12cc53: 57 push %edi 12cc54: 56 push %esi 12cc55: 53 push %ebx 12cc56: 83 ec 38 sub $0x38,%esp 12cc59: 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 ) ) 12cc5c: 31 c0 xor %eax,%eax 12cc5e: b9 ff ff ff ff mov $0xffffffff,%ecx 12cc63: 89 d7 mov %edx,%edi 12cc65: f2 ae repnz scas %es:(%edi),%al 12cc67: f7 d1 not %ecx 12cc69: 49 dec %ecx 12cc6a: 6a 01 push $0x1 12cc6c: 8d 75 d4 lea -0x2c(%ebp),%esi 12cc6f: 56 push %esi 12cc70: 6a 00 push $0x0 12cc72: 51 push %ecx 12cc73: 52 push %edx 12cc74: e8 cf f0 fd ff call 10bd48 12cc79: 83 c4 20 add $0x20,%esp 12cc7c: 85 c0 test %eax,%eax 12cc7e: 0f 85 92 00 00 00 jne 12cd16 return -1; mt_entry = loc.mt_entry; 12cc84: 8b 5d e4 mov -0x1c(%ebp),%ebx fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 12cc87: 8b 43 1c mov 0x1c(%ebx),%eax 12cc8a: 3b 45 d4 cmp -0x2c(%ebp),%eax 12cc8d: 0f 85 a9 00 00 00 jne 12cd3c /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 12cc93: 8b 45 e0 mov -0x20(%ebp),%eax 12cc96: 85 c0 test %eax,%eax 12cc98: 74 10 je 12ccaa <== ALWAYS TAKEN 12cc9a: 8b 40 1c mov 0x1c(%eax),%eax 12cc9d: 85 c0 test %eax,%eax 12cc9f: 74 09 je 12ccaa <== ALWAYS TAKEN 12cca1: 83 ec 0c sub $0xc,%esp 12cca4: 56 push %esi 12cca5: ff d0 call *%eax 12cca7: 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; 12ccaa: 8b 43 14 mov 0x14(%ebx),%eax 12ccad: 8b 50 28 mov 0x28(%eax),%edx 12ccb0: 85 d2 test %edx,%edx 12ccb2: 0f 84 20 01 00 00 je 12cdd8 <== ALWAYS TAKEN fs_root_loc = &mt_entry->mt_fs_root; 12ccb8: 8b 43 28 mov 0x28(%ebx),%eax 12ccbb: 8b 40 2c mov 0x2c(%eax),%eax 12ccbe: 85 c0 test %eax,%eax 12ccc0: 0f 84 12 01 00 00 je 12cdd8 <== 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 ) 12ccc6: a1 84 92 16 00 mov 0x169284,%eax 12cccb: 39 58 14 cmp %ebx,0x14(%eax) 12ccce: 74 54 je 12cd24 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 12ccd0: a1 ac ed 16 00 mov 0x16edac,%eax 12ccd5: 3d b0 ed 16 00 cmp $0x16edb0,%eax 12ccda: 74 1a je 12ccf6 <== 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 ) { 12ccdc: 8b 53 2c mov 0x2c(%ebx),%edx 12ccdf: 39 50 18 cmp %edx,0x18(%eax) 12cce2: 75 09 jne 12cced <== NEVER TAKEN 12cce4: eb 3e jmp 12cd24 <== NOT EXECUTED 12cce6: 66 90 xchg %ax,%ax <== NOT EXECUTED 12cce8: 3b 50 18 cmp 0x18(%eax),%edx 12cceb: 74 37 je 12cd24 * 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 ) { 12cced: 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; 12ccef: 3d b0 ed 16 00 cmp $0x16edb0,%eax 12ccf4: 75 f2 jne 12cce8 * 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 ) 12ccf6: 83 ec 0c sub $0xc,%esp 12ccf9: 53 push %ebx 12ccfa: e8 6d f3 fd ff call 10c06c 12ccff: 83 c4 10 add $0x10,%esp 12cd02: 48 dec %eax 12cd03: 74 1f je 12cd24 * 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 ) 12cd05: 83 ec 0c sub $0xc,%esp 12cd08: 8b 43 14 mov 0x14(%ebx),%eax 12cd0b: 53 push %ebx 12cd0c: ff 50 28 call *0x28(%eax) 12cd0f: 83 c4 10 add $0x10,%esp 12cd12: 85 c0 test %eax,%eax 12cd14: 74 56 je 12cd6c <== NEVER TAKEN */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 12cd16: b8 ff ff ff ff mov $0xffffffff,%eax } 12cd1b: 8d 65 f4 lea -0xc(%ebp),%esp 12cd1e: 5b pop %ebx 12cd1f: 5e pop %esi 12cd20: 5f pop %edi 12cd21: c9 leave 12cd22: c3 ret 12cd23: 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 ); 12cd24: e8 03 5b 01 00 call 14282c <__errno> 12cd29: c7 00 10 00 00 00 movl $0x10,(%eax) 12cd2f: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 12cd34: 8d 65 f4 lea -0xc(%ebp),%esp 12cd37: 5b pop %ebx 12cd38: 5e pop %esi 12cd39: 5f pop %edi 12cd3a: c9 leave 12cd3b: 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 ); 12cd3c: 8b 45 e0 mov -0x20(%ebp),%eax 12cd3f: 85 c0 test %eax,%eax 12cd41: 74 10 je 12cd53 <== ALWAYS TAKEN 12cd43: 8b 40 1c mov 0x1c(%eax),%eax 12cd46: 85 c0 test %eax,%eax 12cd48: 74 09 je 12cd53 <== ALWAYS TAKEN 12cd4a: 83 ec 0c sub $0xc,%esp 12cd4d: 56 push %esi 12cd4e: ff d0 call *%eax 12cd50: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EACCES ); 12cd53: e8 d4 5a 01 00 call 14282c <__errno> 12cd58: c7 00 0d 00 00 00 movl $0xd,(%eax) 12cd5e: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 12cd63: 8d 65 f4 lea -0xc(%ebp),%esp 12cd66: 5b pop %ebx 12cd67: 5e pop %esi 12cd68: 5f pop %edi 12cd69: c9 leave 12cd6a: c3 ret 12cd6b: 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){ 12cd6c: 83 ec 0c sub $0xc,%esp 12cd6f: 8b 43 28 mov 0x28(%ebx),%eax 12cd72: 53 push %ebx 12cd73: ff 50 2c call *0x2c(%eax) 12cd76: 83 c4 10 add $0x10,%esp 12cd79: 85 c0 test %eax,%eax 12cd7b: 75 3c jne 12cdb9 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 12cd7d: 83 ec 0c sub $0xc,%esp 12cd80: 53 push %ebx 12cd81: e8 06 3c fe ff call 11098c <_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 ); 12cd86: 8b 43 14 mov 0x14(%ebx),%eax 12cd89: 83 c4 10 add $0x10,%esp 12cd8c: 85 c0 test %eax,%eax 12cd8e: 74 13 je 12cda3 <== ALWAYS TAKEN 12cd90: 8b 40 1c mov 0x1c(%eax),%eax 12cd93: 85 c0 test %eax,%eax 12cd95: 74 0c je 12cda3 <== ALWAYS TAKEN 12cd97: 83 ec 0c sub $0xc,%esp 12cd9a: 8d 53 08 lea 0x8(%ebx),%edx 12cd9d: 52 push %edx 12cd9e: ff d0 call *%eax 12cda0: 83 c4 10 add $0x10,%esp free( mt_entry ); 12cda3: 83 ec 0c sub $0xc,%esp 12cda6: 53 push %ebx 12cda7: e8 50 f0 fd ff call 10bdfc 12cdac: 31 c0 xor %eax,%eax return 0; 12cdae: 83 c4 10 add $0x10,%esp } 12cdb1: 8d 65 f4 lea -0xc(%ebp),%esp 12cdb4: 5b pop %ebx 12cdb5: 5e pop %esi 12cdb6: 5f pop %edi 12cdb7: c9 leave 12cdb8: 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 ) 12cdb9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12cdbc: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 12cdbf: 53 push %ebx <== NOT EXECUTED 12cdc0: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 12cdc3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12cdc6: 85 c0 test %eax,%eax <== NOT EXECUTED 12cdc8: 0f 84 48 ff ff ff je 12cd16 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 12cdce: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12cdd1: 6a 00 push $0x0 <== NOT EXECUTED 12cdd3: e8 b4 38 fe ff call 11068c <== 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 ); 12cdd8: e8 4f 5a 01 00 call 14282c <__errno> <== NOT EXECUTED 12cddd: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12cde3: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12cde6: e9 30 ff ff ff jmp 12cd1b <== NOT EXECUTED 0012cdec : int utime( const char *path, const struct utimbuf *times ) { 12cdec: 55 push %ebp 12cded: 89 e5 mov %esp,%ebp 12cdef: 57 push %edi 12cdf0: 56 push %esi 12cdf1: 53 push %ebx 12cdf2: 83 ec 38 sub $0x38,%esp 12cdf5: 8b 55 08 mov 0x8(%ebp),%edx 12cdf8: 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 ) ) 12cdfb: 31 c0 xor %eax,%eax 12cdfd: b9 ff ff ff ff mov $0xffffffff,%ecx 12ce02: 89 d7 mov %edx,%edi 12ce04: f2 ae repnz scas %es:(%edi),%al 12ce06: f7 d1 not %ecx 12ce08: 49 dec %ecx 12ce09: 6a 01 push $0x1 12ce0b: 8d 75 d4 lea -0x2c(%ebp),%esi 12ce0e: 56 push %esi 12ce0f: 6a 00 push $0x0 12ce11: 51 push %ecx 12ce12: 52 push %edx 12ce13: e8 30 ef fd ff call 10bd48 12ce18: 83 c4 20 add $0x20,%esp 12ce1b: 85 c0 test %eax,%eax 12ce1d: 75 55 jne 12ce74 return -1; if ( !temp_loc.ops->utime_h ){ 12ce1f: 8b 55 e0 mov -0x20(%ebp),%edx 12ce22: 8b 42 30 mov 0x30(%edx),%eax 12ce25: 85 c0 test %eax,%eax 12ce27: 74 2f je 12ce58 <== 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 ); 12ce29: 52 push %edx 12ce2a: ff 73 04 pushl 0x4(%ebx) 12ce2d: ff 33 pushl (%ebx) 12ce2f: 56 push %esi 12ce30: ff d0 call *%eax 12ce32: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &temp_loc ); 12ce34: 8b 45 e0 mov -0x20(%ebp),%eax 12ce37: 83 c4 10 add $0x10,%esp 12ce3a: 85 c0 test %eax,%eax 12ce3c: 74 10 je 12ce4e <== ALWAYS TAKEN 12ce3e: 8b 40 1c mov 0x1c(%eax),%eax 12ce41: 85 c0 test %eax,%eax 12ce43: 74 09 je 12ce4e <== ALWAYS TAKEN 12ce45: 83 ec 0c sub $0xc,%esp 12ce48: 56 push %esi 12ce49: ff d0 call *%eax 12ce4b: 83 c4 10 add $0x10,%esp return result; } 12ce4e: 89 d8 mov %ebx,%eax 12ce50: 8d 65 f4 lea -0xc(%ebp),%esp 12ce53: 5b pop %ebx 12ce54: 5e pop %esi 12ce55: 5f pop %edi 12ce56: c9 leave 12ce57: 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 ); 12ce58: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12ce5b: 85 c0 test %eax,%eax <== NOT EXECUTED 12ce5d: 74 09 je 12ce68 <== NOT EXECUTED 12ce5f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ce62: 56 push %esi <== NOT EXECUTED 12ce63: ff d0 call *%eax <== NOT EXECUTED 12ce65: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12ce68: e8 bf 59 01 00 call 14282c <__errno> <== NOT EXECUTED 12ce6d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12ce73: 90 nop <== NOT EXECUTED 12ce74: 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; } 12ce79: 89 d8 mov %ebx,%eax 12ce7b: 8d 65 f4 lea -0xc(%ebp),%esp 12ce7e: 5b pop %ebx 12ce7f: 5e pop %esi 12ce80: 5f pop %edi 12ce81: c9 leave 12ce82: c3 ret 0010ab44 : */ void vprintk( const char *fmt, va_list ap ) { 10ab44: 55 push %ebp 10ab45: 89 e5 mov %esp,%ebp 10ab47: 57 push %edi 10ab48: 56 push %esi 10ab49: 53 push %ebx 10ab4a: 83 ec 4c sub $0x4c,%esp 10ab4d: 8b 75 08 mov 0x8(%ebp),%esi 10ab50: 8b 7d 0c mov 0xc(%ebp),%edi for (; *fmt != '\0'; fmt++) { 10ab53: 8a 06 mov (%esi),%al 10ab55: 84 c0 test %al,%al 10ab57: 75 28 jne 10ab81 <== NEVER TAKEN 10ab59: e9 d1 01 00 00 jmp 10ad2f <== NOT EXECUTED 10ab5e: 66 90 xchg %ax,%ax <== NOT EXECUTED bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); 10ab60: 83 ec 0c sub $0xc,%esp 10ab63: 0f be c0 movsbl %al,%eax 10ab66: 50 push %eax 10ab67: ff 15 84 32 12 00 call *0x123284 10ab6d: 89 7d bc mov %edi,-0x44(%ebp) continue; 10ab70: 83 c4 10 add $0x10,%esp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 10ab73: 46 inc %esi 10ab74: 8a 06 mov (%esi),%al 10ab76: 84 c0 test %al,%al 10ab78: 0f 84 b1 01 00 00 je 10ad2f 10ab7e: 8b 7d bc mov -0x44(%ebp),%edi bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 10ab81: 3c 25 cmp $0x25,%al 10ab83: 75 db jne 10ab60 BSP_output_char(*fmt); continue; } fmt++; 10ab85: 46 inc %esi if (*fmt == '0' ) { 10ab86: 8a 0e mov (%esi),%cl 10ab88: 80 f9 30 cmp $0x30,%cl 10ab8b: 0f 84 b7 01 00 00 je 10ad48 10ab91: b2 20 mov $0x20,%dl lead = '0'; fmt++; } if (*fmt == '-' ) { 10ab93: 80 f9 2d cmp $0x2d,%cl 10ab96: 0f 84 ba 01 00 00 je 10ad56 10ab9c: c6 45 c4 00 movb $0x0,-0x3c(%ebp) minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 10aba0: 8d 41 d0 lea -0x30(%ecx),%eax 10aba3: 3c 09 cmp $0x9,%al 10aba5: 0f 87 bd 01 00 00 ja 10ad68 10abab: 31 db xor %ebx,%ebx 10abad: 8d 76 00 lea 0x0(%esi),%esi width *= 10; width += ((unsigned) *fmt - '0'); 10abb0: 8d 04 9b lea (%ebx,%ebx,4),%eax 10abb3: 0f be c9 movsbl %cl,%ecx 10abb6: 8d 5c 41 d0 lea -0x30(%ecx,%eax,2),%ebx fmt++; 10abba: 46 inc %esi } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 10abbb: 8a 0e mov (%esi),%cl 10abbd: 8d 41 d0 lea -0x30(%ecx),%eax 10abc0: 3c 09 cmp $0x9,%al 10abc2: 76 ec jbe 10abb0 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 10abc4: 80 f9 6c cmp $0x6c,%cl 10abc7: 0f 84 a7 01 00 00 je 10ad74 lflag = true; c = *++fmt; } if ( c == 'c' ) { 10abcd: 80 f9 63 cmp $0x63,%cl 10abd0: 0f 84 aa 01 00 00 je 10ad80 /* 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' ) { 10abd6: 80 f9 73 cmp $0x73,%cl 10abd9: 0f 84 bd 01 00 00 je 10ad9c continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 10abdf: 80 f9 6f cmp $0x6f,%cl 10abe2: 0f 84 50 01 00 00 je 10ad38 <== ALWAYS TAKEN 10abe8: 80 f9 4f cmp $0x4f,%cl 10abeb: 0f 84 47 01 00 00 je 10ad38 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 10abf1: 80 f9 69 cmp $0x69,%cl 10abf4: 74 56 je 10ac4c 10abf6: 80 f9 49 cmp $0x49,%cl 10abf9: 74 51 je 10ac4c 10abfb: 80 f9 64 cmp $0x64,%cl 10abfe: 74 4c je 10ac4c 10ac00: 80 f9 44 cmp $0x44,%cl 10ac03: 74 47 je 10ac4c c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 10ac05: 80 f9 75 cmp $0x75,%cl 10ac08: 0f 84 62 02 00 00 je 10ae70 10ac0e: 80 f9 55 cmp $0x55,%cl 10ac11: 0f 84 59 02 00 00 je 10ae70 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 10ac17: 80 f9 78 cmp $0x78,%cl 10ac1a: 0f 84 97 02 00 00 je 10aeb7 10ac20: 80 f9 58 cmp $0x58,%cl 10ac23: 0f 84 8e 02 00 00 je 10aeb7 base = 16; sign = false; } else if ( c == 'p' ) { 10ac29: 80 f9 70 cmp $0x70,%cl 10ac2c: 0f 84 a8 02 00 00 je 10aeda base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 10ac32: 83 ec 0c sub $0xc,%esp 10ac35: 0f be c9 movsbl %cl,%ecx 10ac38: 51 push %ecx 10ac39: ff 15 84 32 12 00 call *0x123284 10ac3f: 89 7d bc mov %edi,-0x44(%ebp) continue; 10ac42: 83 c4 10 add $0x10,%esp 10ac45: e9 29 ff ff ff jmp 10ab73 10ac4a: 66 90 xchg %ax,%ax <== NOT EXECUTED 10ac4c: b1 01 mov $0x1,%cl 10ac4e: c7 45 b8 0a 00 00 00 movl $0xa,-0x48(%ebp) } printNum( 10ac55: 0f be d2 movsbl %dl,%edx 10ac58: 89 55 b4 mov %edx,-0x4c(%ebp) lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 10ac5b: 8d 47 04 lea 0x4(%edi),%eax 10ac5e: 89 45 bc mov %eax,-0x44(%ebp) } else { BSP_output_char(c); continue; } printNum( 10ac61: 8b 3f mov (%edi),%edi unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 10ac63: 84 c9 test %cl,%cl 10ac65: 74 08 je 10ac6f 10ac67: 85 ff test %edi,%edi 10ac69: 0f 88 0f 02 00 00 js 10ae7e BSP_output_char('-'); unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; 10ac6f: 89 7d c0 mov %edi,-0x40(%ebp) } count = 0; while ((n = unsigned_num / base) > 0) { 10ac72: 8b 45 c0 mov -0x40(%ebp),%eax 10ac75: 31 d2 xor %edx,%edx 10ac77: f7 75 b8 divl -0x48(%ebp) 10ac7a: 89 c1 mov %eax,%ecx 10ac7c: 85 c0 test %eax,%eax 10ac7e: 0f 84 25 02 00 00 je 10aea9 10ac84: 8a 45 b8 mov -0x48(%ebp),%al 10ac87: 88 45 c4 mov %al,-0x3c(%ebp) 10ac8a: 31 ff xor %edi,%edi 10ac8c: 89 5d b0 mov %ebx,-0x50(%ebp) 10ac8f: 8b 55 c0 mov -0x40(%ebp),%edx 10ac92: 8b 5d b8 mov -0x48(%ebp),%ebx 10ac95: eb 05 jmp 10ac9c 10ac97: 90 nop <== NOT EXECUTED 10ac98: 89 ca mov %ecx,%edx 10ac9a: 89 c1 mov %eax,%ecx toPrint[count++] = (char) (unsigned_num - (n * base)); 10ac9c: 8a 45 c4 mov -0x3c(%ebp),%al 10ac9f: f6 e1 mul %cl 10aca1: 28 c2 sub %al,%dl 10aca3: 88 54 3d d4 mov %dl,-0x2c(%ebp,%edi,1) 10aca7: 47 inc %edi } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 10aca8: 89 c8 mov %ecx,%eax 10acaa: 31 d2 xor %edx,%edx 10acac: f7 f3 div %ebx 10acae: 85 c0 test %eax,%eax 10acb0: 75 e6 jne 10ac98 10acb2: 8b 5d b0 mov -0x50(%ebp),%ebx 10acb5: 8d 47 01 lea 0x1(%edi),%eax 10acb8: 89 45 c4 mov %eax,-0x3c(%ebp) 10acbb: 89 4d c0 mov %ecx,-0x40(%ebp) toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 10acbe: 8a 45 c0 mov -0x40(%ebp),%al 10acc1: 88 44 3d d4 mov %al,-0x2c(%ebp,%edi,1) for (n=maxwidth ; n > count; n-- ) 10acc5: 3b 5d c4 cmp -0x3c(%ebp),%ebx 10acc8: 76 1f jbe 10ace9 10acca: 8b 7d c4 mov -0x3c(%ebp),%edi 10accd: 89 75 c0 mov %esi,-0x40(%ebp) 10acd0: 8b 75 b4 mov -0x4c(%ebp),%esi 10acd3: 90 nop BSP_output_char(lead); 10acd4: 83 ec 0c sub $0xc,%esp 10acd7: 56 push %esi 10acd8: 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-- ) 10acde: 4b dec %ebx 10acdf: 83 c4 10 add $0x10,%esp 10ace2: 39 fb cmp %edi,%ebx 10ace4: 77 ee ja 10acd4 10ace6: 8b 75 c0 mov -0x40(%ebp),%esi BSP_output_char(lead); for (n = 0; n < count; n++) { 10ace9: 8b 45 c4 mov -0x3c(%ebp),%eax 10acec: 85 c0 test %eax,%eax 10acee: 0f 84 7f fe ff ff je 10ab73 <== ALWAYS TAKEN 10acf4: 8b 45 c4 mov -0x3c(%ebp),%eax 10acf7: 8d 7c 05 d3 lea -0x2d(%ebp,%eax,1),%edi 10acfb: 31 db xor %ebx,%ebx 10acfd: 89 75 c0 mov %esi,-0x40(%ebp) 10ad00: 89 c6 mov %eax,%esi 10ad02: 66 90 xchg %ax,%ax BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 10ad04: 83 ec 0c sub $0xc,%esp 10ad07: 0f be 07 movsbl (%edi),%eax 10ad0a: 0f be 80 3a 0c 12 00 movsbl 0x120c3a(%eax),%eax 10ad11: 50 push %eax 10ad12: 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++) { 10ad18: 43 inc %ebx 10ad19: 4f dec %edi 10ad1a: 83 c4 10 add $0x10,%esp 10ad1d: 39 f3 cmp %esi,%ebx 10ad1f: 72 e3 jb 10ad04 10ad21: 8b 75 c0 mov -0x40(%ebp),%esi void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 10ad24: 46 inc %esi 10ad25: 8a 06 mov (%esi),%al 10ad27: 84 c0 test %al,%al 10ad29: 0f 85 4f fe ff ff jne 10ab7e <== NEVER TAKEN sign, width, lead ); } } 10ad2f: 8d 65 f4 lea -0xc(%ebp),%esp 10ad32: 5b pop %ebx 10ad33: 5e pop %esi 10ad34: 5f pop %edi 10ad35: c9 leave 10ad36: c3 ret 10ad37: 90 nop <== NOT EXECUTED base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10ad38: 31 c9 xor %ecx,%ecx 10ad3a: c7 45 b8 08 00 00 00 movl $0x8,-0x48(%ebp) 10ad41: e9 0f ff ff ff jmp 10ac55 10ad46: 66 90 xchg %ax,%ax <== NOT EXECUTED continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 10ad48: 46 inc %esi 10ad49: 8a 0e mov (%esi),%cl 10ad4b: b2 30 mov $0x30,%dl } if (*fmt == '-' ) { 10ad4d: 80 f9 2d cmp $0x2d,%cl 10ad50: 0f 85 46 fe ff ff jne 10ab9c <== NEVER TAKEN minus = true; fmt++; 10ad56: 46 inc %esi 10ad57: 8a 0e mov (%esi),%cl 10ad59: c6 45 c4 01 movb $0x1,-0x3c(%ebp) } while (*fmt >= '0' && *fmt <= '9' ) { 10ad5d: 8d 41 d0 lea -0x30(%ecx),%eax 10ad60: 3c 09 cmp $0x9,%al 10ad62: 0f 86 43 fe ff ff jbe 10abab <== NEVER TAKEN 10ad68: 31 db xor %ebx,%ebx width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 10ad6a: 80 f9 6c cmp $0x6c,%cl 10ad6d: 0f 85 5a fe ff ff jne 10abcd 10ad73: 90 nop lflag = true; c = *++fmt; 10ad74: 46 inc %esi 10ad75: 8a 0e mov (%esi),%cl } if ( c == 'c' ) { 10ad77: 80 f9 63 cmp $0x63,%cl 10ad7a: 0f 85 56 fe ff ff jne 10abd6 <== NEVER TAKEN /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 10ad80: 8d 47 04 lea 0x4(%edi),%eax 10ad83: 89 45 bc mov %eax,-0x44(%ebp) BSP_output_char(chr); 10ad86: 83 ec 0c sub $0xc,%esp 10ad89: 0f be 07 movsbl (%edi),%eax 10ad8c: 50 push %eax 10ad8d: ff 15 84 32 12 00 call *0x123284 continue; 10ad93: 83 c4 10 add $0x10,%esp 10ad96: e9 d8 fd ff ff jmp 10ab73 10ad9b: 90 nop <== NOT EXECUTED } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 10ad9c: 8d 47 04 lea 0x4(%edi),%eax 10ad9f: 89 45 bc mov %eax,-0x44(%ebp) 10ada2: 8b 07 mov (%edi),%eax if ( str == NULL ) { 10ada4: 85 c0 test %eax,%eax 10ada6: 0f 84 19 01 00 00 je 10aec5 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 10adac: 80 38 00 cmpb $0x0,(%eax) 10adaf: 0f 84 1e 01 00 00 je 10aed3 10adb5: 31 ff xor %edi,%edi 10adb7: 90 nop 10adb8: 47 inc %edi 10adb9: 80 3c 38 00 cmpb $0x0,(%eax,%edi,1) 10adbd: 75 f9 jne 10adb8 ; /* leading spaces */ if ( !minus ) 10adbf: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp) 10adc3: 75 30 jne 10adf5 for ( i=len ; i 10adc9: 89 fa mov %edi,%edx 10adcb: 89 7d c0 mov %edi,-0x40(%ebp) 10adce: 89 c7 mov %eax,%edi 10add0: 89 75 b8 mov %esi,-0x48(%ebp) 10add3: 89 de mov %ebx,%esi 10add5: 89 d3 mov %edx,%ebx 10add7: 90 nop BSP_output_char(' '); 10add8: 83 ec 0c sub $0xc,%esp 10addb: 6a 20 push $0x20 10addd: ff 15 84 32 12 00 call *0x123284 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 10adeb: 89 f3 mov %esi,%ebx 10aded: 89 f8 mov %edi,%eax 10adef: 8b 7d c0 mov -0x40(%ebp),%edi 10adf2: 8b 75 b8 mov -0x48(%ebp),%esi BSP_output_char(' '); /* no width option */ if (width == 0) { 10adf5: 85 db test %ebx,%ebx 10adf7: 75 06 jne 10adff width = len; } /* output the string */ for ( i=0 ; i 10adfd: 89 fb mov %edi,%ebx 10adff: 8a 10 mov (%eax),%dl 10ae01: 84 d2 test %dl,%dl 10ae03: 74 3f je 10ae44 <== ALWAYS TAKEN BSP_output_char(*str); 10ae05: 83 ec 0c sub $0xc,%esp 10ae08: 0f be d2 movsbl %dl,%edx 10ae0b: 52 push %edx 10ae0c: 89 45 ac mov %eax,-0x54(%ebp) 10ae0f: ff 15 84 32 12 00 call *0x123284 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 10ae25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED BSP_output_char(*str); 10ae28: 83 ec 0c sub $0xc,%esp 10ae2b: 0f be d2 movsbl %dl,%edx 10ae2e: 52 push %edx 10ae2f: ff 15 84 32 12 00 call *0x123284 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 10ae3f: 89 f3 mov %esi,%ebx 10ae41: 8b 75 c0 mov -0x40(%ebp),%esi BSP_output_char(*str); /* trailing spaces */ if ( minus ) 10ae44: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp) 10ae48: 0f 84 25 fd ff ff je 10ab73 for ( i=len ; i 10ae56: 66 90 xchg %ax,%ax BSP_output_char(' '); 10ae58: 83 ec 0c sub $0xc,%esp 10ae5b: 6a 20 push $0x20 10ae5d: ff 15 84 32 12 00 call *0x123284 for ( i=0 ; i 10ae6b: e9 03 fd ff ff jmp 10ab73 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10ae70: 31 c9 xor %ecx,%ecx 10ae72: c7 45 b8 0a 00 00 00 movl $0xa,-0x48(%ebp) 10ae79: e9 d7 fd ff ff jmp 10ac55 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 10ae7e: 83 ec 0c sub $0xc,%esp 10ae81: 6a 2d push $0x2d 10ae83: ff 15 84 32 12 00 call *0x123284 unsigned_num = (unsigned long) -num; 10ae89: f7 df neg %edi 10ae8b: 89 7d c0 mov %edi,-0x40(%ebp) if (maxwidth) maxwidth--; 10ae8e: 83 c4 10 add $0x10,%esp 10ae91: 83 fb 01 cmp $0x1,%ebx 10ae94: 83 d3 ff adc $0xffffffff,%ebx } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 10ae97: 8b 45 c0 mov -0x40(%ebp),%eax 10ae9a: 31 d2 xor %edx,%edx 10ae9c: f7 75 b8 divl -0x48(%ebp) 10ae9f: 89 c1 mov %eax,%ecx 10aea1: 85 c0 test %eax,%eax 10aea3: 0f 85 db fd ff ff jne 10ac84 <== NEVER TAKEN 10aea9: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) 10aeb0: 31 ff xor %edi,%edi 10aeb2: e9 07 fe ff ff jmp 10acbe base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10aeb7: 31 c9 xor %ecx,%ecx 10aeb9: c7 45 b8 10 00 00 00 movl $0x10,-0x48(%ebp) 10aec0: e9 90 fd ff ff jmp 10ac55 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 10aec5: b8 39 0c 12 00 mov $0x120c39,%eax str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 10aeca: 80 38 00 cmpb $0x0,(%eax) 10aecd: 0f 85 e2 fe ff ff jne 10adb5 <== ALWAYS TAKEN 10aed3: 31 ff xor %edi,%edi 10aed5: e9 e5 fe ff ff jmp 10adbf } else { BSP_output_char(c); continue; } printNum( 10aeda: 0f be d2 movsbl %dl,%edx 10aedd: 89 55 b4 mov %edx,-0x4c(%ebp) 10aee0: 31 c9 xor %ecx,%ecx 10aee2: c7 45 b8 10 00 00 00 movl $0x10,-0x48(%ebp) 10aee9: e9 6d fd ff ff jmp 10ac5b 0011eda0 : ssize_t write( int fd, const void *buffer, size_t count ) { 11eda0: 55 push %ebp 11eda1: 89 e5 mov %esp,%ebp 11eda3: 53 push %ebx 11eda4: 83 ec 04 sub $0x4,%esp 11eda7: 8b 5d 08 mov 0x8(%ebp),%ebx 11edaa: 8b 45 0c mov 0xc(%ebp),%eax 11edad: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11edb0: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 11edb6: 73 50 jae 11ee08 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 11edb8: c1 e3 06 shl $0x6,%ebx 11edbb: 03 1d 60 72 12 00 add 0x127260,%ebx rtems_libio_check_is_open( iop ); 11edc1: 8b 4b 14 mov 0x14(%ebx),%ecx 11edc4: f6 c5 01 test $0x1,%ch 11edc7: 74 3f je 11ee08 <== ALWAYS TAKEN rtems_libio_check_buffer( buffer ); 11edc9: 85 c0 test %eax,%eax 11edcb: 74 4f je 11ee1c <== ALWAYS TAKEN rtems_libio_check_count( count ); 11edcd: 85 d2 test %edx,%edx 11edcf: 74 2f je 11ee00 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 11edd1: 83 e1 04 and $0x4,%ecx 11edd4: 74 46 je 11ee1c <== ALWAYS TAKEN /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 11edd6: 8b 4b 3c mov 0x3c(%ebx),%ecx 11edd9: 8b 49 0c mov 0xc(%ecx),%ecx 11eddc: 85 c9 test %ecx,%ecx 11edde: 74 4e je 11ee2e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 11ede0: 83 ec 04 sub $0x4,%esp 11ede3: 52 push %edx 11ede4: 50 push %eax 11ede5: 53 push %ebx 11ede6: ff d1 call *%ecx if ( rc > 0 ) 11ede8: 83 c4 10 add $0x10,%esp 11edeb: 85 c0 test %eax,%eax 11eded: 7e 0b jle 11edfa <== ALWAYS TAKEN iop->offset += rc; 11edef: 89 c1 mov %eax,%ecx 11edf1: c1 f9 1f sar $0x1f,%ecx 11edf4: 01 43 0c add %eax,0xc(%ebx) 11edf7: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11edfa: 8b 5d fc mov -0x4(%ebp),%ebx 11edfd: c9 leave 11edfe: c3 ret 11edff: 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 ); 11ee00: 31 c0 xor %eax,%eax if ( rc > 0 ) iop->offset += rc; return rc; } 11ee02: 8b 5d fc mov -0x4(%ebp),%ebx 11ee05: c9 leave 11ee06: c3 ret 11ee07: 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 ); 11ee08: e8 c3 48 ff ff call 1136d0 <__errno> <== NOT EXECUTED 11ee0d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11ee13: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ee18: eb e0 jmp 11edfa <== NOT EXECUTED 11ee1a: 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 ); 11ee1c: e8 af 48 ff ff call 1136d0 <__errno> <== NOT EXECUTED 11ee21: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11ee27: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ee2c: eb cc jmp 11edfa <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11ee2e: e8 9d 48 ff ff call 1136d0 <__errno> <== NOT EXECUTED 11ee33: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11ee39: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ee3e: eb ba jmp 11edfa <== NOT EXECUTED 0010c31c : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 10c31c: 55 push %ebp 10c31d: 89 e5 mov %esp,%ebp 10c31f: 57 push %edi 10c320: 56 push %esi 10c321: 53 push %ebx 10c322: 83 ec 3c sub $0x3c,%esp 10c325: 8b 45 08 mov 0x8(%ebp),%eax 10c328: 8b 5d 0c mov 0xc(%ebp),%ebx 10c32b: 8b 7d 10 mov 0x10(%ebp),%edi int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 10c32e: 3b 05 cc 71 12 00 cmp 0x1271cc,%eax 10c334: 0f 83 f2 00 00 00 jae 10c42c <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 10c33a: c1 e0 06 shl $0x6,%eax 10c33d: 8b 15 e0 ba 12 00 mov 0x12bae0,%edx 10c343: 01 d0 add %edx,%eax 10c345: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_libio_check_is_open( iop ); 10c348: 8b 40 14 mov 0x14(%eax),%eax 10c34b: f6 c4 01 test $0x1,%ah 10c34e: 0f 84 d8 00 00 00 je 10c42c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10c354: a8 04 test $0x4,%al 10c356: 74 7c je 10c3d4 <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 10c358: 85 db test %ebx,%ebx 10c35a: 74 78 je 10c3d4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 10c35c: 85 ff test %edi,%edi 10c35e: 7e 74 jle 10c3d4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 10c360: 81 ff 00 04 00 00 cmp $0x400,%edi 10c366: 7f 6c jg 10c3d4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 10c368: 8b 55 e4 mov -0x1c(%ebp),%edx 10c36b: 8b 42 3c mov 0x3c(%edx),%eax 10c36e: 8b 48 0c mov 0xc(%eax),%ecx 10c371: 85 c9 test %ecx,%ecx 10c373: 0f 84 c5 00 00 00 je 10c43e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c379: be 01 00 00 00 mov $0x1,%esi 10c37e: 31 c0 xor %eax,%eax 10c380: 31 c9 xor %ecx,%ecx 10c382: eb 02 jmp 10c386 * 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++ ) { 10c384: 89 d1 mov %edx,%ecx if ( !iov[v].iov_base ) 10c386: 8b 14 c3 mov (%ebx,%eax,8),%edx 10c389: 85 d2 test %edx,%edx 10c38b: 74 47 je 10c3d4 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 ) 10c38d: 8b 54 c3 04 mov 0x4(%ebx,%eax,8),%edx 10c391: 85 d2 test %edx,%edx 10c393: 74 02 je 10c397 10c395: 31 f6 xor %esi,%esi all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 10c397: 8d 14 11 lea (%ecx,%edx,1),%edx if ( total < old || total > SSIZE_MAX ) 10c39a: 39 d1 cmp %edx,%ecx 10c39c: 7f 36 jg 10c3d4 10c39e: 81 fa ff 7f 00 00 cmp $0x7fff,%edx 10c3a4: 7f 2e jg 10c3d4 <== 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++ ) { 10c3a6: 40 inc %eax 10c3a7: 39 c7 cmp %eax,%edi 10c3a9: 7f d9 jg 10c384 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10c3ab: 89 f1 mov %esi,%ecx 10c3ad: 84 c9 test %cl,%cl 10c3af: 75 3d jne 10c3ee 10c3b1: 31 f6 xor %esi,%esi 10c3b3: 31 d2 xor %edx,%edx 10c3b5: 89 55 c0 mov %edx,-0x40(%ebp) /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 10c3b8: 8b 44 f3 04 mov 0x4(%ebx,%esi,8),%eax 10c3bc: 85 c0 test %eax,%eax 10c3be: 75 32 jne 10c3f2 <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 10c3c0: 46 inc %esi 10c3c1: 39 f7 cmp %esi,%edi 10c3c3: 7f f3 jg 10c3b8 10c3c5: 8b 55 c0 mov -0x40(%ebp),%edx if (bytes != iov[ v ].iov_len) break; } return total; } 10c3c8: 89 d0 mov %edx,%eax 10c3ca: 8d 65 f4 lea -0xc(%ebp),%esp 10c3cd: 5b pop %ebx 10c3ce: 5e pop %esi 10c3cf: 5f pop %edi 10c3d0: c9 leave 10c3d1: c3 ret 10c3d2: 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 ); 10c3d4: e8 47 96 00 00 call 115a20 <__errno> 10c3d9: c7 00 16 00 00 00 movl $0x16,(%eax) 10c3df: ba ff ff ff ff mov $0xffffffff,%edx if (bytes != iov[ v ].iov_len) break; } return total; } 10c3e4: 89 d0 mov %edx,%eax 10c3e6: 8d 65 f4 lea -0xc(%ebp),%esp 10c3e9: 5b pop %ebx 10c3ea: 5e pop %esi 10c3eb: 5f pop %edi 10c3ec: c9 leave 10c3ed: c3 ret } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10c3ee: 31 d2 xor %edx,%edx 10c3f0: eb f2 jmp 10c3e4 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 ); 10c3f2: 52 push %edx 10c3f3: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c3f6: 8b 51 3c mov 0x3c(%ecx),%edx 10c3f9: 50 push %eax 10c3fa: ff 34 f3 pushl (%ebx,%esi,8) 10c3fd: 51 push %ecx 10c3fe: ff 52 0c call *0xc(%edx) 10c401: 89 45 c4 mov %eax,-0x3c(%ebp) if ( bytes < 0 ) 10c404: 83 c4 10 add $0x10,%esp 10c407: 83 f8 00 cmp $0x0,%eax 10c40a: 7c 42 jl 10c44e <== ALWAYS TAKEN return -1; if ( bytes > 0 ) { 10c40c: 74 13 je 10c421 <== ALWAYS TAKEN iop->offset += bytes; 10c40e: 8b 45 c4 mov -0x3c(%ebp),%eax 10c411: 99 cltd 10c412: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c415: 01 41 0c add %eax,0xc(%ecx) 10c418: 11 51 10 adc %edx,0x10(%ecx) total += bytes; 10c41b: 8b 45 c4 mov -0x3c(%ebp),%eax 10c41e: 01 45 c0 add %eax,-0x40(%ebp) } if (bytes != iov[ v ].iov_len) 10c421: 8b 55 c4 mov -0x3c(%ebp),%edx 10c424: 3b 54 f3 04 cmp 0x4(%ebx,%esi,8),%edx 10c428: 74 96 je 10c3c0 <== NEVER TAKEN 10c42a: eb 99 jmp 10c3c5 <== NOT EXECUTED ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 10c42c: e8 ef 95 00 00 call 115a20 <__errno> 10c431: c7 00 09 00 00 00 movl $0x9,(%eax) 10c437: ba ff ff ff ff mov $0xffffffff,%edx 10c43c: eb a6 jmp 10c3e4 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 ); 10c43e: e8 dd 95 00 00 call 115a20 <__errno> <== NOT EXECUTED 10c443: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10c449: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 10c44c: eb 96 jmp 10c3e4 <== 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 ) 10c44e: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 10c451: eb 91 jmp 10c3e4 <== NOT EXECUTED