=============================================================================== 0010efe8 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10efe8: 55 push %ebp 10efe9: 89 e5 mov %esp,%ebp 10efeb: 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; 10efee: 8b 50 10 mov 0x10(%eax),%edx 10eff1: 8b 4a 34 mov 0x34(%edx),%ecx switch( node->type ) { 10eff4: 8b 10 mov (%eax),%edx 10eff6: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10effa: 77 12 ja 10f00e <== NEVER TAKEN 10effc: 8b 52 4c mov 0x4c(%edx),%edx 10efff: ff 24 95 f0 0e 12 00 jmp *0x120ef0(,%edx,4) 10f006: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10f008: 8b 51 0c mov 0xc(%ecx),%edx 10f00b: 89 50 08 mov %edx,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10f00e: 31 c0 xor %eax,%eax 10f010: c9 leave 10f011: c3 ret 10f012: 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; 10f014: 8b 51 08 mov 0x8(%ecx),%edx 10f017: 89 50 08 mov %edx,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10f01a: 31 c0 xor %eax,%eax 10f01c: c9 leave 10f01d: c3 ret 10f01e: 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; 10f020: c7 40 08 a0 0f 12 00 movl $0x120fa0,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10f027: 31 c0 xor %eax,%eax 10f029: c9 leave 10f02a: c3 ret 10f02b: 90 nop <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 10f02c: 8b 51 10 mov 0x10(%ecx),%edx 10f02f: 89 50 08 mov %edx,0x8(%eax) break; } return 0; } 10f032: 31 c0 xor %eax,%eax 10f034: c9 leave 10f035: c3 ret 10f036: 66 90 xchg %ax,%ax <== NOT EXECUTED switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10f038: c7 40 08 20 0f 12 00 movl $0x120f20,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10f03f: 31 c0 xor %eax,%eax 10f041: c9 leave 10f042: c3 ret =============================================================================== 0010f95c : void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { 10f95c: 55 push %ebp 10f95d: 89 e5 mov %esp,%ebp 10f95f: 53 push %ebx 10f960: 83 ec 10 sub $0x10,%esp 10f963: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { 10f966: 53 push %ebx 10f967: e8 f8 04 00 00 call 10fe64 10f96c: 83 c4 10 add $0x10,%esp 10f96f: 85 c0 test %eax,%eax 10f971: 75 2d jne 10f9a0 10f973: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10f978: 75 26 jne 10f9a0 if ( rtems_filesystem_current.node_access == jnode ) 10f97a: a1 30 41 12 00 mov 0x124130,%eax 10f97f: 39 58 04 cmp %ebx,0x4(%eax) 10f982: 74 58 je 10f9dc rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { 10f984: 8b 43 4c mov 0x4c(%ebx),%eax 10f987: 83 f8 04 cmp $0x4,%eax 10f98a: 74 34 je 10f9c0 10f98c: 83 f8 05 cmp $0x5,%eax 10f98f: 74 17 je 10f9a8 break; default: break; } free( jnode ); 10f991: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f994: 8b 5d fc mov -0x4(%ebp),%ebx 10f997: c9 leave break; default: break; } free( jnode ); 10f998: e9 f7 86 ff ff jmp 108094 10f99d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 10f9a0: 8b 5d fc mov -0x4(%ebp),%ebx 10f9a3: c9 leave 10f9a4: c3 ret 10f9a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); 10f9a8: 83 ec 0c sub $0xc,%esp 10f9ab: 53 push %ebx 10f9ac: e8 e3 24 00 00 call 111e94 break; 10f9b1: 83 c4 10 add $0x10,%esp break; default: break; } free( jnode ); 10f9b4: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f9b7: 8b 5d fc mov -0x4(%ebp),%ebx 10f9ba: c9 leave break; default: break; } free( jnode ); 10f9bb: e9 d4 86 ff ff jmp 108094 switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); break; case IMFS_SYM_LINK: free( jnode->info.sym_link.name ); 10f9c0: 83 ec 0c sub $0xc,%esp 10f9c3: ff 73 50 pushl 0x50(%ebx) 10f9c6: e8 c9 86 ff ff call 108094 break; 10f9cb: 83 c4 10 add $0x10,%esp default: break; } free( jnode ); 10f9ce: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f9d1: 8b 5d fc mov -0x4(%ebp),%ebx 10f9d4: c9 leave break; default: break; } free( jnode ); 10f9d5: e9 ba 86 ff ff jmp 108094 10f9da: 66 90 xchg %ax,%ax <== NOT EXECUTED void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; 10f9dc: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10f9e3: eb 9f jmp 10f984 =============================================================================== 0010eda8 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 10eda8: 55 push %ebp 10eda9: 89 e5 mov %esp,%ebp 10edab: 57 push %edi 10edac: 56 push %esi 10edad: 53 push %ebx 10edae: 83 ec 1c sub $0x1c,%esp 10edb1: 8b 7d 0c mov 0xc(%ebp),%edi 10edb4: 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; 10edb7: 8b 45 08 mov 0x8(%ebp),%eax 10edba: 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(); 10edbc: e8 b7 0e 00 00 call 10fc78 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 10edc1: 66 39 43 3c cmp %ax,0x3c(%ebx) 10edc5: 74 05 je 10edcc 10edc7: 66 85 c0 test %ax,%ax 10edca: 75 2c jne 10edf8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 10edcc: 66 89 7b 3c mov %di,0x3c(%ebx) jnode->st_gid = group; 10edd0: 66 89 73 3e mov %si,0x3e(%ebx) IMFS_update_ctime( jnode ); 10edd4: 83 ec 08 sub $0x8,%esp 10edd7: 6a 00 push $0x0 10edd9: 8d 45 e0 lea -0x20(%ebp),%eax 10eddc: 50 push %eax 10eddd: e8 2e 93 ff ff call 108110 10ede2: 8b 45 e0 mov -0x20(%ebp),%eax 10ede5: 89 43 48 mov %eax,0x48(%ebx) return 0; 10ede8: 83 c4 10 add $0x10,%esp 10edeb: 31 c0 xor %eax,%eax } 10eded: 8d 65 f4 lea -0xc(%ebp),%esp 10edf0: 5b pop %ebx 10edf1: 5e pop %esi 10edf2: 5f pop %edi 10edf3: c9 leave 10edf4: c3 ret 10edf5: 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 ); 10edf8: e8 9b 44 00 00 call 113298 <__errno> 10edfd: c7 00 01 00 00 00 movl $0x1,(%eax) 10ee03: b8 ff ff ff ff mov $0xffffffff,%eax 10ee08: eb e3 jmp 10eded =============================================================================== 0010ee7c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10ee7c: 55 push %ebp 10ee7d: 89 e5 mov %esp,%ebp 10ee7f: 57 push %edi 10ee80: 56 push %esi 10ee81: 53 push %ebx 10ee82: 83 ec 1c sub $0x1c,%esp 10ee85: 8b 45 08 mov 0x8(%ebp),%eax 10ee88: 8b 5d 0c mov 0xc(%ebp),%ebx IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 10ee8b: 85 c0 test %eax,%eax 10ee8d: 0f 84 ba 00 00 00 je 10ef4d <== NEVER TAKEN return NULL; parent = parent_loc->node_access; 10ee93: 8b 38 mov (%eax),%edi fs_info = parent_loc->mt_entry->fs_info; 10ee95: 8b 40 10 mov 0x10(%eax),%eax 10ee98: 8b 70 34 mov 0x34(%eax),%esi /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 10ee9b: 83 fb 07 cmp $0x7,%ebx 10ee9e: 0f 84 9c 00 00 00 je 10ef40 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10eea4: 50 push %eax 10eea5: a1 30 41 12 00 mov 0x124130,%eax 10eeaa: 8b 40 2c mov 0x2c(%eax),%eax 10eead: f7 d0 not %eax 10eeaf: 23 45 14 and 0x14(%ebp),%eax 10eeb2: 50 push %eax 10eeb3: ff 75 10 pushl 0x10(%ebp) 10eeb6: 53 push %ebx 10eeb7: e8 50 ff ff ff call 10ee0c if ( !node ) 10eebc: 83 c4 10 add $0x10,%esp 10eebf: 85 c0 test %eax,%eax 10eec1: 74 73 je 10ef36 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 10eec3: 83 fb 01 cmp $0x1,%ebx 10eec6: 74 38 je 10ef00 rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 10eec8: 83 fb 03 cmp $0x3,%ebx 10eecb: 0f 84 97 00 00 00 je 10ef68 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 10eed1: 83 fb 04 cmp $0x4,%ebx 10eed4: 0f 84 8e 00 00 00 je 10ef68 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { 10eeda: 83 fb 02 cmp $0x2,%ebx 10eedd: 74 79 je 10ef58 node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { 10eedf: 83 fb 06 cmp $0x6,%ebx 10eee2: 0f 84 8c 00 00 00 je 10ef74 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 10eee8: 83 fb 05 cmp $0x5,%ebx 10eeeb: 0f 84 9b 00 00 00 je 10ef8c node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; } else if ( type == IMFS_FIFO ) { 10eef1: 83 fb 07 cmp $0x7,%ebx 10eef4: 75 1d jne 10ef13 node->info.fifo.pipe = NULL; 10eef6: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10eefd: eb 14 jmp 10ef13 10eeff: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ef00: 8d 50 54 lea 0x54(%eax),%edx 10ef03: 89 50 50 mov %edx,0x50(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10ef06: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { rtems_chain_initialize_empty(&node->info.directory.Entries); 10ef0d: 8d 50 50 lea 0x50(%eax),%edx 10ef10: 89 50 58 mov %edx,0x58(%eax) } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 10ef13: 89 78 08 mov %edi,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10ef16: 8b 56 04 mov 0x4(%esi),%edx 10ef19: 42 inc %edx 10ef1a: 89 56 04 mov %edx,0x4(%esi) 10ef1d: 89 50 38 mov %edx,0x38(%eax) 10ef20: 83 ec 08 sub $0x8,%esp 10ef23: 50 push %eax rtems_chain_append( &parent->info.directory.Entries, &node->Node ); 10ef24: 83 c7 50 add $0x50,%edi 10ef27: 57 push %edi 10ef28: 89 45 e4 mov %eax,-0x1c(%ebp) 10ef2b: e8 7c d0 ff ff call 10bfac <_Chain_Append> return node; 10ef30: 83 c4 10 add $0x10,%esp 10ef33: 8b 45 e4 mov -0x1c(%ebp),%eax } 10ef36: 8d 65 f4 lea -0xc(%ebp),%esp 10ef39: 5b pop %ebx 10ef3a: 5e pop %esi 10ef3b: 5f pop %edi 10ef3c: c9 leave 10ef3d: c3 ret 10ef3e: 66 90 xchg %ax,%ax <== NOT EXECUTED fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 10ef40: 81 7e 10 80 0e 12 00 cmpl $0x120e80,0x10(%esi) 10ef47: 0f 85 57 ff ff ff jne 10eea4 fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 10ef4d: 31 c0 xor %eax,%eax node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 10ef4f: 8d 65 f4 lea -0xc(%ebp),%esp 10ef52: 5b pop %ebx 10ef53: 5e pop %esi 10ef54: 5f pop %edi 10ef55: c9 leave 10ef56: c3 ret 10ef57: 90 nop <== NOT EXECUTED } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; 10ef58: 8b 4d 18 mov 0x18(%ebp),%ecx 10ef5b: 8b 11 mov (%ecx),%edx 10ef5d: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10ef60: 8b 51 04 mov 0x4(%ecx),%edx 10ef63: 89 50 54 mov %edx,0x54(%eax) 10ef66: eb ab jmp 10ef13 if ( type == IMFS_DIRECTORY ) { rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; 10ef68: 8b 4d 18 mov 0x18(%ebp),%ecx 10ef6b: 8b 11 mov (%ecx),%edx 10ef6d: 89 50 50 mov %edx,0x50(%eax) 10ef70: eb a1 jmp 10ef13 10ef72: 66 90 xchg %ax,%ax <== NOT EXECUTED } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; 10ef74: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10ef7b: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.linearfile.direct = 0; 10ef82: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) 10ef89: eb 88 jmp 10ef13 10ef8b: 90 nop <== NOT EXECUTED } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; 10ef8c: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10ef93: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10ef9a: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10efa1: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10efa8: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) 10efaf: e9 5f ff ff ff jmp 10ef13 =============================================================================== 0010a4b8 : */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 10a4b8: 55 push %ebp 10a4b9: 89 e5 mov %esp,%ebp 10a4bb: 57 push %edi 10a4bc: 56 push %esi 10a4bd: 53 push %ebx 10a4be: 83 ec 1c sub $0x1c,%esp 10a4c1: 8b 45 08 mov 0x8(%ebp),%eax 10a4c4: 8b 75 0c mov 0xc(%ebp),%esi IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 10a4c7: 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; 10a4ca: 83 c0 54 add $0x54,%eax 10a4cd: 89 45 e4 mov %eax,-0x1c(%ebp) 10a4d0: 39 c7 cmp %eax,%edi 10a4d2: 74 47 je 10a51b 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 ); 10a4d4: 8d 46 01 lea 0x1(%esi),%eax 10a4d7: 89 45 e0 mov %eax,-0x20(%ebp) 10a4da: 66 90 xchg %ax,%ax !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++ ) 10a4dc: 85 f6 test %esi,%esi 10a4de: 78 22 js 10a502 <== NEVER TAKEN 10a4e0: 31 db xor %ebx,%ebx 10a4e2: 66 90 xchg %ax,%ax fprintf(stdout, "...." ); 10a4e4: a1 20 b2 12 00 mov 0x12b220,%eax 10a4e9: ff 70 08 pushl 0x8(%eax) 10a4ec: 6a 04 push $0x4 10a4ee: 6a 01 push $0x1 10a4f0: 68 92 68 12 00 push $0x126892 10a4f5: e8 ca e0 00 00 call 1185c4 !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++ ) 10a4fa: 43 inc %ebx 10a4fb: 83 c4 10 add $0x10,%esp 10a4fe: 39 de cmp %ebx,%esi 10a500: 7d e2 jge 10a4e4 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 10a502: 83 ec 0c sub $0xc,%esp 10a505: 57 push %edi 10a506: e8 75 fe ff ff call 10a380 if ( the_jnode->type == IMFS_DIRECTORY ) 10a50b: 83 c4 10 add $0x10,%esp 10a50e: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10a512: 74 10 je 10a524 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 ) { 10a514: 8b 3f mov (%edi),%edi IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 10a516: 3b 7d e4 cmp -0x1c(%ebp),%edi 10a519: 75 c1 jne 10a4dc fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 10a51b: 8d 65 f4 lea -0xc(%ebp),%esp 10a51e: 5b pop %ebx 10a51f: 5e pop %esi 10a520: 5f pop %edi 10a521: c9 leave 10a522: c3 ret 10a523: 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 ); 10a524: 83 ec 08 sub $0x8,%esp 10a527: ff 75 e0 pushl -0x20(%ebp) 10a52a: 57 push %edi 10a52b: e8 88 ff ff ff call 10a4b8 10a530: 83 c4 10 add $0x10,%esp 10a533: eb df jmp 10a514 =============================================================================== 0010f0f4 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10f0f4: 55 push %ebp 10f0f5: 89 e5 mov %esp,%ebp 10f0f7: 57 push %edi 10f0f8: 56 push %esi 10f0f9: 53 push %ebx 10f0fa: 83 ec 5c sub $0x5c,%esp char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 10f0fd: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10f104: 0f 85 ee 01 00 00 jne 10f2f8 <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10f10a: 8b 45 14 mov 0x14(%ebp),%eax 10f10d: 8b 38 mov (%eax),%edi size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; 10f10f: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) 10f116: 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 ); 10f119: 8d 55 e4 lea -0x1c(%ebp),%edx 10f11c: 52 push %edx 10f11d: 56 push %esi 10f11e: ff 75 0c pushl 0xc(%ebp) 10f121: 8b 45 08 mov 0x8(%ebp),%eax 10f124: 03 45 a4 add -0x5c(%ebp),%eax 10f127: 50 push %eax 10f128: e8 13 07 00 00 call 10f840 10f12d: 89 c3 mov %eax,%ebx pathnamelen -= len; 10f12f: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10f132: 8b 4d 14 mov 0x14(%ebp),%ecx 10f135: 8b 01 mov (%ecx),%eax 10f137: 83 c4 10 add $0x10,%esp 10f13a: 85 c0 test %eax,%eax 10f13c: 0f 84 e6 00 00 00 je 10f228 <== NEVER TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10f142: 29 55 0c sub %edx,0xc(%ebp) i += len; 10f145: 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 ) 10f148: 85 db test %ebx,%ebx 10f14a: 75 44 jne 10f190 * 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 ) { 10f14c: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10f150: 0f 84 26 01 00 00 je 10f27c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10f156: 83 ec 0c sub $0xc,%esp 10f159: ff 75 14 pushl 0x14(%ebp) 10f15c: e8 87 fe ff ff call 10efe8 10f161: 89 c3 mov %eax,%ebx 10f163: 5a pop %edx 10f164: 59 pop %ecx /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10f165: ff 75 10 pushl 0x10(%ebp) 10f168: ff 75 14 pushl 0x14(%ebp) 10f16b: e8 d4 fe ff ff call 10f044 10f170: 83 c4 10 add $0x10,%esp 10f173: 85 c0 test %eax,%eax 10f175: 0f 85 d1 00 00 00 jne 10f24c rtems_set_errno_and_return_minus_one( EACCES ); 10f17b: e8 18 41 00 00 call 113298 <__errno> 10f180: c7 00 0d 00 00 00 movl $0xd,(%eax) 10f186: bb ff ff ff ff mov $0xffffffff,%ebx 10f18b: e9 bc 00 00 00 jmp 10f24c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10f190: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10f194: 0f 84 be 00 00 00 je 10f258 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10f19a: 89 c7 mov %eax,%edi switch( type ) { 10f19c: 83 fb 03 cmp $0x3,%ebx 10f19f: 74 1b je 10f1bc 10f1a1: 83 fb 04 cmp $0x4,%ebx 10f1a4: 0f 84 92 00 00 00 je 10f23c 10f1aa: 83 fb 02 cmp $0x2,%ebx 10f1ad: 74 51 je 10f200 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10f1af: 83 fb 04 cmp $0x4,%ebx 10f1b2: 0f 85 61 ff ff ff jne 10f119 <== ALWAYS TAKEN 10f1b8: eb 92 jmp 10f14c <== NOT EXECUTED 10f1ba: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10f1bc: 8b 40 4c mov 0x4c(%eax),%eax 10f1bf: 83 f8 03 cmp $0x3,%eax 10f1c2: 0f 84 08 01 00 00 je 10f2d0 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 10f1c8: 83 f8 04 cmp $0x4,%eax 10f1cb: 0f 84 51 01 00 00 je 10f322 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10f1d1: 48 dec %eax 10f1d2: 0f 85 35 01 00 00 jne 10f30d /* * 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 ) { 10f1d8: 8b 47 5c mov 0x5c(%edi),%eax 10f1db: 85 c0 test %eax,%eax 10f1dd: 0f 85 a4 00 00 00 jne 10f287 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10f1e3: 83 ec 08 sub $0x8,%esp 10f1e6: 56 push %esi 10f1e7: 57 push %edi 10f1e8: e8 e7 05 00 00 call 10f7d4 10f1ed: 89 c7 mov %eax,%edi if ( !node ) 10f1ef: 83 c4 10 add $0x10,%esp 10f1f2: 85 c0 test %eax,%eax 10f1f4: 74 32 je 10f228 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10f1f6: 8b 45 14 mov 0x14(%ebp),%eax 10f1f9: 89 38 mov %edi,(%eax) 10f1fb: e9 19 ff ff ff jmp 10f119 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10f200: 8b 15 30 41 12 00 mov 0x124130,%edx 10f206: 39 42 18 cmp %eax,0x18(%edx) 10f209: 0f 84 0a ff ff ff je 10f119 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10f20f: 8b 4d 14 mov 0x14(%ebp),%ecx 10f212: 8b 51 10 mov 0x10(%ecx),%edx /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10f215: 39 42 1c cmp %eax,0x1c(%edx) 10f218: 0f 84 d2 00 00 00 je 10f2f0 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10f21e: 8b 78 08 mov 0x8(%eax),%edi 10f221: 85 ff test %edi,%edi 10f223: 75 d1 jne 10f1f6 10f225: 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 ); 10f228: e8 6b 40 00 00 call 113298 <__errno> 10f22d: c7 00 02 00 00 00 movl $0x2,(%eax) 10f233: bb ff ff ff ff mov $0xffffffff,%ebx 10f238: eb 12 jmp 10f24c 10f23a: 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 ); 10f23c: e8 57 40 00 00 call 113298 <__errno> 10f241: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10f247: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f24c: 89 d8 mov %ebx,%eax 10f24e: 8d 65 f4 lea -0xc(%ebp),%esp 10f251: 5b pop %ebx 10f252: 5e pop %esi 10f253: 5f pop %edi 10f254: c9 leave 10f255: c3 ret 10f256: 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 ) ) 10f258: 83 ec 08 sub $0x8,%esp 10f25b: 6a 01 push $0x1 10f25d: ff 75 14 pushl 0x14(%ebp) 10f260: e8 df fd ff ff call 10f044 10f265: 83 c4 10 add $0x10,%esp 10f268: 85 c0 test %eax,%eax 10f26a: 0f 84 0b ff ff ff je 10f17b 10f270: 8b 55 14 mov 0x14(%ebp),%edx 10f273: 8b 02 mov (%edx),%eax 10f275: e9 20 ff ff ff jmp 10f19a 10f27a: 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 ) { 10f27c: 8b 40 5c mov 0x5c(%eax),%eax 10f27f: 85 c0 test %eax,%eax 10f281: 0f 84 cf fe ff ff je 10f156 newloc = node->info.directory.mt_fs->mt_fs_root; 10f287: 8d 7d d0 lea -0x30(%ebp),%edi 10f28a: 8d 70 1c lea 0x1c(%eax),%esi 10f28d: b9 05 00 00 00 mov $0x5,%ecx 10f292: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f294: 8d 75 d0 lea -0x30(%ebp),%esi 10f297: b1 05 mov $0x5,%cl 10f299: 8b 7d 14 mov 0x14(%ebp),%edi 10f29c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10f29e: 8b 55 e4 mov -0x1c(%ebp),%edx 10f2a1: 8b 4d 14 mov 0x14(%ebp),%ecx 10f2a4: 8b 41 0c mov 0xc(%ecx),%eax 10f2a7: 51 push %ecx 10f2a8: ff 75 10 pushl 0x10(%ebp) 10f2ab: 8b 4d 0c mov 0xc(%ebp),%ecx 10f2ae: 01 d1 add %edx,%ecx 10f2b0: 51 push %ecx 10f2b1: 8b 4d a4 mov -0x5c(%ebp),%ecx 10f2b4: 29 d1 sub %edx,%ecx 10f2b6: 8b 55 08 mov 0x8(%ebp),%edx 10f2b9: 01 ca add %ecx,%edx 10f2bb: 52 push %edx 10f2bc: ff 10 call *(%eax) 10f2be: 89 c3 mov %eax,%ebx 10f2c0: 83 c4 10 add $0x10,%esp if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f2c3: 89 d8 mov %ebx,%eax 10f2c5: 8d 65 f4 lea -0xc(%ebp),%esp 10f2c8: 5b pop %ebx 10f2c9: 5e pop %esi 10f2ca: 5f pop %edi 10f2cb: c9 leave 10f2cc: c3 ret 10f2cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 10f2d0: 83 ec 08 sub $0x8,%esp 10f2d3: 6a 00 push $0x0 10f2d5: ff 75 14 pushl 0x14(%ebp) 10f2d8: e8 d3 fd ff ff call 10f0b0 node = pathloc->node_access; 10f2dd: 8b 55 14 mov 0x14(%ebp),%edx 10f2e0: 8b 3a mov (%edx),%edi 10f2e2: 8b 47 4c mov 0x4c(%edi),%eax 10f2e5: 83 c4 10 add $0x10,%esp 10f2e8: e9 e4 fe ff ff jmp 10f1d1 10f2ed: 8d 76 00 lea 0x0(%esi),%esi <== 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; 10f2f0: 8d 7d d0 lea -0x30(%ebp),%edi 10f2f3: 8d 72 08 lea 0x8(%edx),%esi 10f2f6: eb 95 jmp 10f28d rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); 10f2f8: e8 9b 3f 00 00 call 113298 <__errno> <== NOT EXECUTED 10f2fd: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 10f303: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 10f308: e9 3f ff ff ff jmp 10f24c <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f30d: e8 86 3f 00 00 call 113298 <__errno> 10f312: c7 00 14 00 00 00 movl $0x14,(%eax) 10f318: bb ff ff ff ff mov $0xffffffff,%ebx 10f31d: e9 2a ff ff ff jmp 10f24c * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 10f322: 83 ec 08 sub $0x8,%esp 10f325: 6a 00 push $0x0 10f327: ff 75 14 pushl 0x14(%ebp) 10f32a: e8 1d 00 00 00 call 10f34c 10f32f: 89 c3 mov %eax,%ebx /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 10f331: 8b 4d 14 mov 0x14(%ebp),%ecx 10f334: 8b 39 mov (%ecx),%edi if ( result == -1 ) 10f336: 83 c4 10 add $0x10,%esp 10f339: 83 f8 ff cmp $0xffffffff,%eax 10f33c: 0f 84 0a ff ff ff je 10f24c <== NEVER TAKEN /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 10f342: 8b 47 4c mov 0x4c(%edi),%eax 10f345: e9 87 fe ff ff jmp 10f1d1 =============================================================================== 0010f474 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10f474: 55 push %ebp 10f475: 89 e5 mov %esp,%ebp 10f477: 57 push %edi 10f478: 56 push %esi 10f479: 53 push %ebx 10f47a: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10f47d: 8b 45 0c mov 0xc(%ebp),%eax 10f480: 8b 18 mov (%eax),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10f482: 31 c0 xor %eax,%eax 10f484: b9 ff ff ff ff mov $0xffffffff,%ecx 10f489: 8b 7d 08 mov 0x8(%ebp),%edi 10f48c: f2 ae repnz scas %es:(%edi),%al 10f48e: f7 d1 not %ecx 10f490: 8d 71 ff lea -0x1(%ecx),%esi const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 10f493: 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 ); 10f49a: 8d 55 e4 lea -0x1c(%ebp),%edx 10f49d: 52 push %edx 10f49e: 8d 4d af lea -0x51(%ebp),%ecx 10f4a1: 51 push %ecx 10f4a2: 56 push %esi 10f4a3: 8b 45 08 mov 0x8(%ebp),%eax 10f4a6: 03 45 a4 add -0x5c(%ebp),%eax 10f4a9: 50 push %eax 10f4aa: e8 91 03 00 00 call 10f840 10f4af: 89 c7 mov %eax,%edi pathlen -= len; 10f4b1: 8b 55 e4 mov -0x1c(%ebp),%edx 10f4b4: 29 d6 sub %edx,%esi i += len; if ( !pathloc->node_access ) 10f4b6: 8b 4d 0c mov 0xc(%ebp),%ecx 10f4b9: 8b 01 mov (%ecx),%eax 10f4bb: 83 c4 10 add $0x10,%esp 10f4be: 85 c0 test %eax,%eax 10f4c0: 0f 84 55 01 00 00 je 10f61b <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10f4c6: 85 ff test %edi,%edi 10f4c8: 75 1a jne 10f4e4 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10f4ca: e8 c9 3d 00 00 call 113298 <__errno> 10f4cf: c7 00 11 00 00 00 movl $0x11,(%eax) 10f4d5: 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; } 10f4da: 89 d8 mov %ebx,%eax 10f4dc: 8d 65 f4 lea -0xc(%ebp),%esp 10f4df: 5b pop %ebx 10f4e0: 5e pop %esi 10f4e1: 5f pop %edi 10f4e2: c9 leave 10f4e3: c3 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10f4e4: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f4e8: 0f 84 c6 00 00 00 je 10f5b4 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10f4ee: 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; 10f4f1: 89 c3 mov %eax,%ebx switch( type ) { 10f4f3: 83 ff 02 cmp $0x2,%edi 10f4f6: 0f 84 88 00 00 00 je 10f584 10f4fc: 76 26 jbe 10f524 10f4fe: 83 ff 03 cmp $0x3,%edi 10f501: 74 2d je 10f530 10f503: 83 ff 04 cmp $0x4,%edi 10f506: 75 92 jne 10f49a <== NEVER 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 ); 10f508: e8 8b 3d 00 00 call 113298 <__errno> 10f50d: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10f513: 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; } 10f518: 89 d8 mov %ebx,%eax 10f51a: 8d 65 f4 lea -0xc(%ebp),%esp 10f51d: 5b pop %ebx 10f51e: 5e pop %esi 10f51f: 5f pop %edi 10f520: c9 leave 10f521: c3 ret 10f522: 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 ) { 10f524: 85 ff test %edi,%edi 10f526: 74 a2 je 10f4ca <== NEVER TAKEN 10f528: e9 6d ff ff ff jmp 10f49a 10f52d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10f530: 8b 40 4c mov 0x4c(%eax),%eax 10f533: 83 f8 03 cmp $0x3,%eax 10f536: 0f 84 b4 01 00 00 je 10f6f0 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10f53c: 83 f8 04 cmp $0x4,%eax 10f53f: 0f 84 ca 01 00 00 je 10f70f if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 10f545: 85 db test %ebx,%ebx 10f547: 0f 84 67 01 00 00 je 10f6b4 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10f54d: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f551: 0f 85 5d 01 00 00 jne 10f6b4 /* * 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 ) { 10f557: 8b 43 5c mov 0x5c(%ebx),%eax 10f55a: 85 c0 test %eax,%eax 10f55c: 0f 85 67 01 00 00 jne 10f6c9 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10f562: 83 ec 08 sub $0x8,%esp 10f565: 8d 45 af lea -0x51(%ebp),%eax 10f568: 50 push %eax 10f569: 53 push %ebx 10f56a: e8 65 02 00 00 call 10f7d4 10f56f: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10f571: 83 c4 10 add $0x10,%esp 10f574: 85 c0 test %eax,%eax 10f576: 74 64 je 10f5dc done = true; else pathloc->node_access = node; 10f578: 8b 55 0c mov 0xc(%ebp),%edx 10f57b: 89 02 mov %eax,(%edx) 10f57d: e9 18 ff ff ff jmp 10f49a 10f582: 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 ) 10f584: 8b 15 30 41 12 00 mov 0x124130,%edx 10f58a: 3b 42 18 cmp 0x18(%edx),%eax 10f58d: 0f 84 07 ff ff ff je 10f49a <== NEVER TAKEN /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10f593: 8b 4d 0c mov 0xc(%ebp),%ecx 10f596: 8b 51 10 mov 0x10(%ecx),%edx 10f599: 3b 42 1c cmp 0x1c(%edx),%eax 10f59c: 0f 84 8e 00 00 00 je 10f630 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 10f5a2: 8b 58 08 mov 0x8(%eax),%ebx 10f5a5: 85 db test %ebx,%ebx 10f5a7: 74 72 je 10f61b rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 10f5a9: 8b 4d 0c mov 0xc(%ebp),%ecx 10f5ac: 89 19 mov %ebx,(%ecx) break; 10f5ae: e9 e7 fe ff ff jmp 10f49a 10f5b3: 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 ) ) 10f5b4: 83 ec 08 sub $0x8,%esp 10f5b7: 6a 01 push $0x1 10f5b9: ff 75 0c pushl 0xc(%ebp) 10f5bc: 89 55 a0 mov %edx,-0x60(%ebp) 10f5bf: e8 80 fa ff ff call 10f044 10f5c4: 83 c4 10 add $0x10,%esp 10f5c7: 85 c0 test %eax,%eax 10f5c9: 8b 55 a0 mov -0x60(%ebp),%edx 10f5cc: 0f 84 cd 00 00 00 je 10f69f 10f5d2: 8b 4d 0c mov 0xc(%ebp),%ecx 10f5d5: 8b 01 mov (%ecx),%eax 10f5d7: e9 12 ff ff ff jmp 10f4ee case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10f5dc: 8b 45 a4 mov -0x5c(%ebp),%eax 10f5df: 2b 45 e4 sub -0x1c(%ebp),%eax 10f5e2: 03 45 08 add 0x8(%ebp),%eax 10f5e5: 8b 4d 10 mov 0x10(%ebp),%ecx 10f5e8: 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++) { 10f5ea: 8b 4d 08 mov 0x8(%ebp),%ecx 10f5ed: 8b 55 a4 mov -0x5c(%ebp),%edx 10f5f0: 8a 04 11 mov (%ecx,%edx,1),%al 10f5f3: 84 c0 test %al,%al 10f5f5: 74 75 je 10f66c 10f5f7: 89 d3 mov %edx,%ebx 10f5f9: 89 ce mov %ecx,%esi 10f5fb: eb 0b jmp 10f608 10f5fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10f600: 43 inc %ebx 10f601: 8a 04 1e mov (%esi,%ebx,1),%al 10f604: 84 c0 test %al,%al 10f606: 74 64 je 10f66c if ( !IMFS_is_separator( path[ i ] ) ) 10f608: 83 ec 0c sub $0xc,%esp 10f60b: 0f be c0 movsbl %al,%eax 10f60e: 50 push %eax 10f60f: e8 e4 98 ff ff call 108ef8 10f614: 83 c4 10 add $0x10,%esp 10f617: 85 c0 test %eax,%eax 10f619: 75 e5 jne 10f600 rtems_set_errno_and_return_minus_one( ENOENT ); 10f61b: e8 78 3c 00 00 call 113298 <__errno> 10f620: c7 00 02 00 00 00 movl $0x2,(%eax) 10f626: bb ff ff ff ff mov $0xffffffff,%ebx 10f62b: e9 aa fe ff ff jmp 10f4da if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10f630: 8d 7d d0 lea -0x30(%ebp),%edi 10f633: 8d 72 08 lea 0x8(%edx),%esi 10f636: b9 05 00 00 00 mov $0x5,%ecx 10f63b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f63d: 8d 75 d0 lea -0x30(%ebp),%esi 10f640: b1 05 mov $0x5,%cl 10f642: 8b 7d 0c mov 0xc(%ebp),%edi 10f645: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f647: 53 push %ebx 10f648: 8b 55 0c mov 0xc(%ebp),%edx 10f64b: 8b 42 0c mov 0xc(%edx),%eax 10f64e: ff 75 10 pushl 0x10(%ebp) 10f651: 52 push %edx */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f652: 8b 55 a4 mov -0x5c(%ebp),%edx 10f655: 2b 55 e4 sub -0x1c(%ebp),%edx 10f658: 03 55 08 add 0x8(%ebp),%edx 10f65b: 52 push %edx 10f65c: ff 50 04 call *0x4(%eax) 10f65f: 89 c3 mov %eax,%ebx 10f661: 83 c4 10 add $0x10,%esp 10f664: e9 71 fe ff ff jmp 10f4da 10f669: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10f66c: 83 ec 0c sub $0xc,%esp 10f66f: ff 75 0c pushl 0xc(%ebp) 10f672: e8 71 f9 ff ff call 10efe8 10f677: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 10f679: 8b 55 0c mov 0xc(%ebp),%edx 10f67c: 8b 02 mov (%edx),%eax 10f67e: 83 c4 10 add $0x10,%esp 10f681: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10f685: 75 2d jne 10f6b4 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10f687: 83 ec 08 sub $0x8,%esp 10f68a: 6a 03 push $0x3 10f68c: ff 75 0c pushl 0xc(%ebp) 10f68f: e8 b0 f9 ff ff call 10f044 10f694: 83 c4 10 add $0x10,%esp 10f697: 85 c0 test %eax,%eax 10f699: 0f 85 3b fe ff ff jne 10f4da rtems_set_errno_and_return_minus_one( EACCES ); 10f69f: e8 f4 3b 00 00 call 113298 <__errno> 10f6a4: c7 00 0d 00 00 00 movl $0xd,(%eax) 10f6aa: bb ff ff ff ff mov $0xffffffff,%ebx 10f6af: e9 26 fe ff ff jmp 10f4da /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f6b4: e8 df 3b 00 00 call 113298 <__errno> 10f6b9: c7 00 14 00 00 00 movl $0x14,(%eax) 10f6bf: bb ff ff ff ff mov $0xffffffff,%ebx 10f6c4: e9 11 fe ff ff jmp 10f4da * 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; 10f6c9: 8d 7d d0 lea -0x30(%ebp),%edi 10f6cc: 8d 70 1c lea 0x1c(%eax),%esi 10f6cf: b9 05 00 00 00 mov $0x5,%ecx 10f6d4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f6d6: 8d 75 d0 lea -0x30(%ebp),%esi 10f6d9: b1 05 mov $0x5,%cl 10f6db: 8b 7d 0c mov 0xc(%ebp),%edi 10f6de: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f6e0: 51 push %ecx 10f6e1: 8b 4d 0c mov 0xc(%ebp),%ecx 10f6e4: 8b 41 0c mov 0xc(%ecx),%eax 10f6e7: ff 75 10 pushl 0x10(%ebp) 10f6ea: 51 push %ecx 10f6eb: e9 62 ff ff ff jmp 10f652 case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10f6f0: 83 ec 08 sub $0x8,%esp 10f6f3: 6a 00 push $0x0 10f6f5: ff 75 0c pushl 0xc(%ebp) 10f6f8: e8 cb fc ff ff call 10f3c8 if ( result == -1 ) 10f6fd: 83 c4 10 add $0x10,%esp 10f700: 83 f8 ff cmp $0xffffffff,%eax 10f703: 74 29 je 10f72e <== NEVER TAKEN 10f705: 8b 45 0c mov 0xc(%ebp),%eax 10f708: 8b 18 mov (%eax),%ebx 10f70a: e9 36 fe ff ff jmp 10f545 return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10f70f: 83 ec 08 sub $0x8,%esp 10f712: 6a 00 push $0x0 10f714: ff 75 0c pushl 0xc(%ebp) 10f717: e8 ac fc ff ff call 10f3c8 if ( result == -1 ) 10f71c: 83 c4 10 add $0x10,%esp 10f71f: 83 f8 ff cmp $0xffffffff,%eax 10f722: 74 0a je 10f72e <== NEVER TAKEN 10f724: 8b 55 0c mov 0xc(%ebp),%edx 10f727: 8b 1a mov (%edx),%ebx 10f729: e9 17 fe ff ff jmp 10f545 10f72e: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f730: e9 a5 fd ff ff jmp 10f4da <== NOT EXECUTED =============================================================================== 0010f0b0 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10f0b0: 55 push %ebp 10f0b1: 89 e5 mov %esp,%ebp 10f0b3: 53 push %ebx 10f0b4: 83 ec 04 sub $0x4,%esp 10f0b7: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10f0ba: 8b 03 mov (%ebx),%eax 10f0bc: 8b 40 50 mov 0x50(%eax),%eax 10f0bf: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10f0c1: 53 push %ebx 10f0c2: e8 21 ff ff ff call 10efe8 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10f0c7: 50 push %eax 10f0c8: ff 75 0c pushl 0xc(%ebp) 10f0cb: 53 push %ebx 10f0cc: e8 73 ff ff ff call 10f044 10f0d1: 83 c4 10 add $0x10,%esp 10f0d4: 85 c0 test %eax,%eax 10f0d6: 74 08 je 10f0e0 rtems_set_errno_and_return_minus_one( EACCES ); return result; 10f0d8: 31 c0 xor %eax,%eax } 10f0da: 8b 5d fc mov -0x4(%ebp),%ebx 10f0dd: c9 leave 10f0de: c3 ret 10f0df: 90 nop <== 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 ); 10f0e0: e8 b3 41 00 00 call 113298 <__errno> 10f0e5: c7 00 0d 00 00 00 movl $0xd,(%eax) 10f0eb: b8 ff ff ff ff mov $0xffffffff,%eax 10f0f0: eb e8 jmp 10f0da =============================================================================== 0010f3c8 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10f3c8: 55 push %ebp 10f3c9: 89 e5 mov %esp,%ebp 10f3cb: 57 push %edi 10f3cc: 56 push %esi 10f3cd: 53 push %ebx 10f3ce: 83 ec 0c sub $0xc,%esp 10f3d1: 8b 75 08 mov 0x8(%ebp),%esi 10f3d4: 8b 7d 0c mov 0xc(%ebp),%edi */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 10f3d7: 8b 15 30 41 12 00 mov 0x124130,%edx 10f3dd: eb 0e jmp 10f3ed 10f3df: 90 nop <== NOT EXECUTED */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 10f3e0: 83 f8 04 cmp $0x4,%eax 10f3e3: 74 53 je 10f438 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 10f3e5: 83 e8 03 sub $0x3,%eax 10f3e8: 83 f8 01 cmp $0x1,%eax 10f3eb: 77 3a ja 10f427 <== ALWAYS TAKEN { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 10f3ed: 8b 1e mov (%esi),%ebx /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 10f3ef: 8b 42 30 mov 0x30(%edx),%eax 10f3f2: 40 inc %eax 10f3f3: 66 89 42 30 mov %ax,0x30(%edx) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 10f3f7: 66 83 f8 05 cmp $0x5,%ax 10f3fb: 77 57 ja 10f454 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 10f3fd: 8b 43 4c mov 0x4c(%ebx),%eax 10f400: 83 f8 03 cmp $0x3,%eax 10f403: 75 db jne 10f3e0 result = IMFS_evaluate_hard_link( node, flags ); 10f405: 83 ec 08 sub $0x8,%esp 10f408: 57 push %edi 10f409: 56 push %esi 10f40a: e8 a1 fc ff ff call 10f0b0 10f40f: 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 ) ) ); 10f412: 85 c0 test %eax,%eax 10f414: 75 33 jne 10f449 10f416: 8b 43 4c mov 0x4c(%ebx),%eax 10f419: 8b 15 30 41 12 00 mov 0x124130,%edx result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 10f41f: 83 e8 03 sub $0x3,%eax 10f422: 83 f8 01 cmp $0x1,%eax 10f425: 76 c6 jbe 10f3ed <== ALWAYS TAKEN 10f427: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 10f429: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 10f42f: 8d 65 f4 lea -0xc(%ebp),%esp 10f432: 5b pop %ebx 10f433: 5e pop %esi 10f434: 5f pop %edi 10f435: c9 leave 10f436: c3 ret 10f437: 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 ); 10f438: 83 ec 08 sub $0x8,%esp 10f43b: 57 push %edi 10f43c: 56 push %esi 10f43d: e8 0a ff ff ff call 10f34c 10f442: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10f445: 85 c0 test %eax,%eax 10f447: 74 cd je 10f416 10f449: 8b 15 30 41 12 00 mov 0x124130,%edx 10f44f: eb d8 jmp 10f429 10f451: 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; 10f454: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) rtems_set_errno_and_return_minus_one( ELOOP ); 10f45a: e8 39 3e 00 00 call 113298 <__errno> 10f45f: c7 00 5c 00 00 00 movl $0x5c,(%eax) 10f465: b8 ff ff ff ff mov $0xffffffff,%eax */ rtems_filesystem_link_counts = 0; return result; } 10f46a: 8d 65 f4 lea -0xc(%ebp),%esp 10f46d: 5b pop %ebx 10f46e: 5e pop %esi 10f46f: 5f pop %edi 10f470: c9 leave 10f471: c3 ret =============================================================================== 0010f044 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10f044: 55 push %ebp 10f045: 89 e5 mov %esp,%ebp 10f047: 57 push %edi 10f048: 56 push %esi 10f049: 53 push %ebx 10f04a: 83 ec 0c sub $0xc,%esp 10f04d: 8b 75 0c mov 0xc(%ebp),%esi uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 10f050: f7 c6 f8 ff ff ff test $0xfffffff8,%esi 10f056: 75 44 jne 10f09c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; 10f058: 8b 45 08 mov 0x8(%ebp),%eax 10f05b: 8b 18 mov (%eax),%ebx #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10f05d: e8 16 0c 00 00 call 10fc78 10f062: 89 c7 mov %eax,%edi st_gid = getegid(); 10f064: e8 ff 0b 00 00 call 10fc68 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 10f069: 66 39 7b 3c cmp %di,0x3c(%ebx) 10f06d: 74 1d je 10f08c flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 10f06f: 66 39 43 3e cmp %ax,0x3e(%ebx) 10f073: 74 1f je 10f094 <== ALWAYS TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10f075: 8b 43 30 mov 0x30(%ebx),%eax 10f078: 21 f0 and %esi,%eax gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10f07a: 39 c6 cmp %eax,%esi 10f07c: 0f 94 c0 sete %al 10f07f: 0f b6 c0 movzbl %al,%eax */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 10f082: 83 c4 0c add $0xc,%esp 10f085: 5b pop %ebx 10f086: 5e pop %esi 10f087: 5f pop %edi 10f088: c9 leave 10f089: c3 ret 10f08a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 10f08c: c1 e6 06 shl $0x6,%esi 10f08f: eb e4 jmp 10f075 10f091: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 10f094: c1 e6 03 shl $0x3,%esi 10f097: eb dc jmp 10f075 10f099: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10f09c: e8 f7 41 00 00 call 113298 <__errno> <== NOT EXECUTED 10f0a1: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10f0a7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f0ac: eb d4 jmp 10f082 <== NOT EXECUTED =============================================================================== 0010f34c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10f34c: 55 push %ebp 10f34d: 89 e5 mov %esp,%ebp 10f34f: 57 push %edi 10f350: 56 push %esi 10f351: 53 push %ebx 10f352: 83 ec 20 sub $0x20,%esp 10f355: 8b 5d 08 mov 0x8(%ebp),%ebx 10f358: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10f35b: 8b 3b mov (%ebx),%edi /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10f35d: 8b 47 08 mov 0x8(%edi),%eax 10f360: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10f362: 53 push %ebx 10f363: 8d 45 e4 lea -0x1c(%ebp),%eax 10f366: 50 push %eax 10f367: ff 77 50 pushl 0x50(%edi) 10f36a: e8 f5 0d 00 00 call 110164 ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10f36f: 8b 57 50 mov 0x50(%edi),%edx 10f372: 03 55 e4 add -0x1c(%ebp),%edx 10f375: 31 c0 xor %eax,%eax 10f377: b9 ff ff ff ff mov $0xffffffff,%ecx 10f37c: 89 d7 mov %edx,%edi 10f37e: f2 ae repnz scas %es:(%edi),%al 10f380: f7 d1 not %ecx 10f382: 49 dec %ecx 10f383: 53 push %ebx 10f384: 56 push %esi 10f385: 51 push %ecx 10f386: 52 push %edx 10f387: e8 68 fd ff ff call 10f0f4 10f38c: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10f38e: 83 c4 14 add $0x14,%esp 10f391: 53 push %ebx 10f392: e8 51 fc ff ff call 10efe8 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10f397: 58 pop %eax 10f398: 5a pop %edx 10f399: 56 push %esi 10f39a: 53 push %ebx 10f39b: e8 a4 fc ff ff call 10f044 10f3a0: 83 c4 10 add $0x10,%esp 10f3a3: 85 c0 test %eax,%eax 10f3a5: 74 0d je 10f3b4 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f3a7: 89 f8 mov %edi,%eax 10f3a9: 8d 65 f4 lea -0xc(%ebp),%esp 10f3ac: 5b pop %ebx 10f3ad: 5e pop %esi 10f3ae: 5f pop %edi 10f3af: c9 leave 10f3b0: c3 ret 10f3b1: 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 ); 10f3b4: e8 df 3e 00 00 call 113298 <__errno> 10f3b9: c7 00 0d 00 00 00 movl $0xd,(%eax) 10f3bf: bf ff ff ff ff mov $0xffffffff,%edi 10f3c4: eb e1 jmp 10f3a7 =============================================================================== 00112a1c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 112a1c: 55 push %ebp 112a1d: 89 e5 mov %esp,%ebp 112a1f: 53 push %ebx 112a20: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 112a23: 8b 45 08 mov 0x8(%ebp),%eax 112a26: 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(); 112a28: e8 4b d2 ff ff call 10fc78 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 112a2d: 66 39 43 3c cmp %ax,0x3c(%ebx) 112a31: 74 05 je 112a38 112a33: 66 85 c0 test %ax,%ax 112a36: 75 34 jne 112a6c <== ALWAYS TAKEN /* * 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); 112a38: 8b 45 0c mov 0xc(%ebp),%eax 112a3b: 25 ff 0f 00 00 and $0xfff,%eax /* * 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); 112a40: 8b 53 30 mov 0x30(%ebx),%edx 112a43: 81 e2 00 f0 ff ff and $0xfffff000,%edx jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 112a49: 09 d0 or %edx,%eax 112a4b: 89 43 30 mov %eax,0x30(%ebx) IMFS_update_ctime( jnode ); 112a4e: 83 ec 08 sub $0x8,%esp 112a51: 6a 00 push $0x0 112a53: 8d 45 f0 lea -0x10(%ebp),%eax 112a56: 50 push %eax 112a57: e8 b4 56 ff ff call 108110 112a5c: 8b 45 f0 mov -0x10(%ebp),%eax 112a5f: 89 43 48 mov %eax,0x48(%ebx) return 0; 112a62: 83 c4 10 add $0x10,%esp 112a65: 31 c0 xor %eax,%eax } 112a67: 8b 5d fc mov -0x4(%ebp),%ebx 112a6a: c9 leave 112a6b: 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 ); 112a6c: e8 27 08 00 00 call 113298 <__errno> 112a71: c7 00 01 00 00 00 movl $0x1,(%eax) 112a77: b8 ff ff ff ff mov $0xffffffff,%eax 112a7c: eb e9 jmp 112a67 =============================================================================== 00108a54 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 108a54: 55 push %ebp 108a55: 89 e5 mov %esp,%ebp 108a57: 53 push %ebx 108a58: 83 ec 04 sub $0x4,%esp 108a5b: 8b 45 08 mov 0x8(%ebp),%eax 108a5e: 8b 55 0c mov 0xc(%ebp),%edx 108a61: 8b 4d 10 mov 0x10(%ebp),%ecx int err; if (command == FIONBIO) { 108a64: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx 108a6a: 74 1c je 108a88 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 108a6c: 50 push %eax 108a6d: 51 push %ecx 108a6e: 52 push %edx 108a6f: 8b 40 18 mov 0x18(%eax),%eax 108a72: ff 70 50 pushl 0x50(%eax) 108a75: e8 3a 97 00 00 call 1121b4 IMFS_FIFO_RETURN(err); 108a7a: 83 c4 10 add $0x10,%esp 108a7d: 85 c0 test %eax,%eax 108a7f: 78 3e js 108abf } 108a81: 8b 5d fc mov -0x4(%ebp),%ebx 108a84: c9 leave 108a85: c3 ret 108a86: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 108a88: 85 c9 test %ecx,%ecx 108a8a: 74 20 je 108aac err = -EFAULT; else { if (*(int *)buffer) 108a8c: 8b 11 mov (%ecx),%edx 108a8e: 85 d2 test %edx,%edx 108a90: 74 0e je 108aa0 iop->flags |= LIBIO_FLAGS_NO_DELAY; 108a92: 83 48 14 01 orl $0x1,0x14(%eax) else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; 108a96: 31 c0 xor %eax,%eax } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 108a98: 8b 5d fc mov -0x4(%ebp),%ebx 108a9b: c9 leave 108a9c: c3 ret 108a9d: 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; 108aa0: 83 60 14 fe andl $0xfffffffe,0x14(%eax) return 0; 108aa4: 31 c0 xor %eax,%eax } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 108aa6: 8b 5d fc mov -0x4(%ebp),%ebx 108aa9: c9 leave 108aaa: c3 ret 108aab: 90 nop <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 108aac: bb 0e 00 00 00 mov $0xe,%ebx } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 108ab1: e8 b6 c9 00 00 call 11546c <__errno> 108ab6: 89 18 mov %ebx,(%eax) 108ab8: b8 ff ff ff ff mov $0xffffffff,%eax 108abd: eb c2 jmp 108a81 108abf: 89 c3 mov %eax,%ebx 108ac1: f7 db neg %ebx 108ac3: eb ec jmp 108ab1 =============================================================================== 00108a10 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 108a10: 55 push %ebp 108a11: 89 e5 mov %esp,%ebp 108a13: 53 push %ebx 108a14: 83 ec 10 sub $0x10,%esp 108a17: 8b 45 08 mov 0x8(%ebp),%eax off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 108a1a: 50 push %eax 108a1b: ff 75 14 pushl 0x14(%ebp) 108a1e: ff 75 10 pushl 0x10(%ebp) 108a21: ff 75 0c pushl 0xc(%ebp) 108a24: 8b 40 18 mov 0x18(%eax),%eax 108a27: ff 70 50 pushl 0x50(%eax) 108a2a: e8 e5 97 00 00 call 112214 108a2f: 89 c3 mov %eax,%ebx 108a31: 99 cltd IMFS_FIFO_RETURN(err); 108a32: 83 c4 20 add $0x20,%esp 108a35: 85 d2 test %edx,%edx 108a37: 78 05 js 108a3e <== ALWAYS TAKEN } 108a39: 8b 5d fc mov -0x4(%ebp),%ebx 108a3c: c9 leave 108a3d: c3 ret rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 108a3e: e8 29 ca 00 00 call 11546c <__errno> 108a43: f7 db neg %ebx 108a45: 89 18 mov %ebx,(%eax) 108a47: b8 ff ff ff ff mov $0xffffffff,%eax 108a4c: ba ff ff ff ff mov $0xffffffff,%edx 108a51: eb e6 jmp 108a39 =============================================================================== 00108b28 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 108b28: 55 push %ebp 108b29: 89 e5 mov %esp,%ebp 108b2b: 56 push %esi 108b2c: 53 push %ebx 108b2d: 83 ec 10 sub $0x10,%esp 108b30: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->pathinfo.node_access; 108b33: 8b 70 18 mov 0x18(%eax),%esi int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 108b36: 50 push %eax 108b37: ff 75 10 pushl 0x10(%ebp) 108b3a: ff 75 0c pushl 0xc(%ebp) 108b3d: ff 76 50 pushl 0x50(%esi) 108b40: e8 af 92 00 00 call 111df4 108b45: 89 c3 mov %eax,%ebx if (err > 0) 108b47: 83 c4 10 add $0x10,%esp 108b4a: 83 f8 00 cmp $0x0,%eax 108b4d: 7e 21 jle 108b70 IMFS_update_atime(jnode); 108b4f: 83 ec 08 sub $0x8,%esp 108b52: 6a 00 push $0x0 108b54: 8d 45 f0 lea -0x10(%ebp),%eax 108b57: 50 push %eax 108b58: e8 cb 0e 00 00 call 109a28 108b5d: 8b 45 f0 mov -0x10(%ebp),%eax 108b60: 89 46 40 mov %eax,0x40(%esi) 108b63: 83 c4 10 add $0x10,%esp IMFS_FIFO_RETURN(err); } 108b66: 89 d8 mov %ebx,%eax 108b68: 8d 65 f8 lea -0x8(%ebp),%esp 108b6b: 5b pop %ebx 108b6c: 5e pop %esi 108b6d: c9 leave 108b6e: c3 ret 108b6f: 90 nop <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 108b70: 74 f4 je 108b66 108b72: e8 f5 c8 00 00 call 11546c <__errno> 108b77: f7 db neg %ebx 108b79: 89 18 mov %ebx,(%eax) 108b7b: bb ff ff ff ff mov $0xffffffff,%ebx 108b80: eb e4 jmp 108b66 =============================================================================== 00108ac8 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 108ac8: 55 push %ebp 108ac9: 89 e5 mov %esp,%ebp 108acb: 56 push %esi 108acc: 53 push %ebx 108acd: 83 ec 10 sub $0x10,%esp 108ad0: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->pathinfo.node_access; 108ad3: 8b 58 18 mov 0x18(%eax),%ebx int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 108ad6: 50 push %eax 108ad7: ff 75 10 pushl 0x10(%ebp) 108ada: ff 75 0c pushl 0xc(%ebp) 108add: ff 73 50 pushl 0x50(%ebx) 108ae0: e8 cf 94 00 00 call 111fb4 108ae5: 89 c6 mov %eax,%esi if (err > 0) { 108ae7: 83 c4 10 add $0x10,%esp 108aea: 83 f8 00 cmp $0x0,%eax 108aed: 7e 25 jle 108b14 IMFS_mtime_ctime_update(jnode); 108aef: 83 ec 08 sub $0x8,%esp 108af2: 6a 00 push $0x0 108af4: 8d 45 f0 lea -0x10(%ebp),%eax 108af7: 50 push %eax 108af8: e8 2b 0f 00 00 call 109a28 108afd: 8b 45 f0 mov -0x10(%ebp),%eax 108b00: 89 43 44 mov %eax,0x44(%ebx) 108b03: 89 43 48 mov %eax,0x48(%ebx) 108b06: 83 c4 10 add $0x10,%esp } IMFS_FIFO_RETURN(err); } 108b09: 89 f0 mov %esi,%eax 108b0b: 8d 65 f8 lea -0x8(%ebp),%esp 108b0e: 5b pop %ebx 108b0f: 5e pop %esi 108b10: c9 leave 108b11: c3 ret 108b12: 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); 108b14: 74 f3 je 108b09 <== NEVER TAKEN 108b16: e8 51 c9 00 00 call 11546c <__errno> 108b1b: f7 de neg %esi 108b1d: 89 30 mov %esi,(%eax) 108b1f: be ff ff ff ff mov $0xffffffff,%esi 108b24: eb e3 jmp 108b09 =============================================================================== 0010f7d4 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10f7d4: 55 push %ebp 10f7d5: 89 e5 mov %esp,%ebp 10f7d7: 57 push %edi 10f7d8: 56 push %esi 10f7d9: 53 push %ebx 10f7da: 83 ec 0c sub $0xc,%esp 10f7dd: 8b 45 08 mov 0x8(%ebp),%eax 10f7e0: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10f7e3: bf 10 0f 12 00 mov $0x120f10,%edi 10f7e8: b9 02 00 00 00 mov $0x2,%ecx 10f7ed: 89 de mov %ebx,%esi 10f7ef: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f7f1: 74 13 je 10f806 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10f7f3: bf 12 0f 12 00 mov $0x120f12,%edi 10f7f8: b9 03 00 00 00 mov $0x3,%ecx 10f7fd: 89 de mov %ebx,%esi 10f7ff: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f801: 75 0d jne 10f810 <== ALWAYS TAKEN return directory->Parent; 10f803: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10f806: 8d 65 f4 lea -0xc(%ebp),%esp 10f809: 5b pop %ebx 10f80a: 5e pop %esi 10f80b: 5f pop %edi 10f80c: c9 leave 10f80d: c3 ret 10f80e: 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; 10f810: 8b 70 50 mov 0x50(%eax),%esi 10f813: 8d 78 54 lea 0x54(%eax),%edi 10f816: 39 fe cmp %edi,%esi 10f818: 75 08 jne 10f822 10f81a: eb 20 jmp 10f83c !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10f81c: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10f81e: 39 fe cmp %edi,%esi 10f820: 74 1a je 10f83c !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 ) ) 10f822: 8d 46 0c lea 0xc(%esi),%eax 10f825: 83 ec 08 sub $0x8,%esp 10f828: 50 push %eax 10f829: 53 push %ebx 10f82a: e8 dd 46 00 00 call 113f0c 10f82f: 83 c4 10 add $0x10,%esp 10f832: 85 c0 test %eax,%eax 10f834: 75 e6 jne 10f81c 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; 10f836: 89 f0 mov %esi,%eax 10f838: eb cc jmp 10f806 10f83a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 10f83c: 31 c0 xor %eax,%eax 10f83e: eb c6 jmp 10f806 =============================================================================== 0010f738 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10f738: 55 push %ebp 10f739: 89 e5 mov %esp,%ebp 10f73b: 57 push %edi 10f73c: 56 push %esi 10f73d: 53 push %ebx 10f73e: 83 ec 3c sub $0x3c,%esp 10f741: 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; 10f744: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 10f747: 8d 55 d4 lea -0x2c(%ebp),%edx 10f74a: 89 55 c4 mov %edx,-0x3c(%ebp) 10f74d: 8d 70 1c lea 0x1c(%eax),%esi 10f750: b9 05 00 00 00 mov $0x5,%ecx 10f755: 89 d7 mov %edx,%edi 10f757: 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; 10f759: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; 10f760: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 10f763: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 10f766: 83 ec 0c sub $0xc,%esp 10f769: 8d 45 d4 lea -0x2c(%ebp),%eax 10f76c: 50 push %eax 10f76d: e8 76 f8 ff ff call 10efe8 if ( jnode->type != IMFS_DIRECTORY ) { 10f772: 83 c4 10 add $0x10,%esp 10f775: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f779: 75 2d jne 10f7a8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f77b: 8d 43 54 lea 0x54(%ebx),%eax result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 10f77e: 39 43 50 cmp %eax,0x50(%ebx) 10f781: 74 3e je 10f7c1 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 10f783: 85 db test %ebx,%ebx 10f785: 74 15 je 10f79c if ( jnode->type == IMFS_DIRECTORY ) { 10f787: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f78b: 75 d3 jne 10f760 <== NEVER TAKEN 10f78d: 8d 43 54 lea 0x54(%ebx),%eax if ( jnode_has_children( jnode ) ) 10f790: 39 43 50 cmp %eax,0x50(%ebx) 10f793: 74 cb je 10f760 jnode = jnode_get_first_child( jnode ); 10f795: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 10f798: 85 db test %ebx,%ebx 10f79a: 75 c4 jne 10f760 <== ALWAYS TAKEN return 0; 10f79c: 31 c0 xor %eax,%eax } 10f79e: 8d 65 f4 lea -0xc(%ebp),%esp 10f7a1: 5b pop %ebx 10f7a2: 5e pop %esi 10f7a3: 5f pop %edi 10f7a4: c9 leave 10f7a5: c3 ret 10f7a6: 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 ); 10f7a8: 83 ec 08 sub $0x8,%esp 10f7ab: 8d 55 d4 lea -0x2c(%ebp),%edx 10f7ae: 52 push %edx if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10f7af: 6a 00 push $0x0 10f7b1: e8 26 84 ff ff call 107bdc if (result != 0) 10f7b6: 83 c4 10 add $0x10,%esp 10f7b9: 85 c0 test %eax,%eax 10f7bb: 75 0d jne 10f7ca <== NEVER TAKEN return -1; jnode = next; 10f7bd: 89 f3 mov %esi,%ebx 10f7bf: eb c2 jmp 10f783 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10f7c1: 83 ec 08 sub $0x8,%esp 10f7c4: 8d 45 d4 lea -0x2c(%ebp),%eax 10f7c7: 50 push %eax 10f7c8: eb e5 jmp 10f7af if (result != 0) return -1; 10f7ca: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f7cf: eb cd jmp 10f79e <== NOT EXECUTED =============================================================================== 0010f840 : const char *path, int pathlen, char *token, int *token_len ) { 10f840: 55 push %ebp 10f841: 89 e5 mov %esp,%ebp 10f843: 57 push %edi 10f844: 56 push %esi 10f845: 53 push %ebx 10f846: 83 ec 1c sub $0x1c,%esp 10f849: 8b 7d 08 mov 0x8(%ebp),%edi 10f84c: 8b 5d 10 mov 0x10(%ebp),%ebx register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10f84f: 8a 17 mov (%edi),%dl int pathlen, char *token, int *token_len ) { register int i = 0; 10f851: 31 f6 xor %esi,%esi 10f853: 89 7d e4 mov %edi,-0x1c(%ebp) 10f856: 89 df mov %ebx,%edi 10f858: 88 d3 mov %dl,%bl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10f85a: eb 07 jmp 10f863 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10f85c: 46 inc %esi 10f85d: 8b 45 e4 mov -0x1c(%ebp),%eax 10f860: 8a 1c 30 mov (%eax,%esi,1),%bl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10f863: 83 ec 0c sub $0xc,%esp 10f866: 0f be c3 movsbl %bl,%eax 10f869: 50 push %eax 10f86a: e8 89 96 ff ff call 108ef8 10f86f: 83 c4 10 add $0x10,%esp 10f872: 85 c0 test %eax,%eax 10f874: 75 1a jne 10f890 10f876: 3b 75 0c cmp 0xc(%ebp),%esi 10f879: 7d 15 jge 10f890 token[i] = c; 10f87b: 88 1c 37 mov %bl,(%edi,%esi,1) if ( i == IMFS_NAME_MAX ) 10f87e: 83 fe 20 cmp $0x20,%esi 10f881: 75 d9 jne 10f85c return IMFS_INVALID_TOKEN; 10f883: b8 04 00 00 00 mov $0x4,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f888: 8d 65 f4 lea -0xc(%ebp),%esp 10f88b: 5b pop %ebx 10f88c: 5e pop %esi 10f88d: 5f pop %edi 10f88e: c9 leave 10f88f: c3 ret 10f890: 88 da mov %bl,%dl 10f892: 89 fb mov %edi,%ebx /* * Copy a seperator into token. */ if ( i == 0 ) { 10f894: 85 f6 test %esi,%esi 10f896: 75 25 jne 10f8bd token[i] = c; 10f898: 88 17 mov %dl,(%edi) if ( (token[i] != '\0') && pathlen ) { 10f89a: 84 d2 test %dl,%dl 10f89c: 74 16 je 10f8b4 10f89e: 8b 45 0c mov 0xc(%ebp),%eax 10f8a1: 85 c0 test %eax,%eax 10f8a3: 74 0f je 10f8b4 i++; type = IMFS_CURRENT_DIR; 10f8a5: b8 01 00 00 00 mov $0x1,%eax if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 10f8aa: be 01 00 00 00 mov $0x1,%esi 10f8af: eb 05 jmp 10f8b6 10f8b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 10f8b4: 31 c0 xor %eax,%eax /* * Set token_len to the number of characters copied. */ *token_len = i; 10f8b6: 8b 55 14 mov 0x14(%ebp),%edx 10f8b9: 89 32 mov %esi,(%edx) 10f8bb: eb cb jmp 10f888 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10f8bd: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1) 10f8c2: 74 04 je 10f8c8 <== NEVER TAKEN token[i] = '\0'; 10f8c4: c6 04 37 00 movb $0x0,(%edi,%esi,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10f8c8: 8b 45 14 mov 0x14(%ebp),%eax 10f8cb: 89 30 mov %esi,(%eax) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 10f8cd: bf 15 0f 12 00 mov $0x120f15,%edi 10f8d2: b9 03 00 00 00 mov $0x3,%ecx 10f8d7: 89 de mov %ebx,%esi 10f8d9: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f8db: 75 0f jne 10f8ec type = IMFS_UP_DIR; 10f8dd: b8 02 00 00 00 mov $0x2,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f8e2: 8d 65 f4 lea -0xc(%ebp),%esp 10f8e5: 5b pop %ebx 10f8e6: 5e pop %esi 10f8e7: 5f pop %edi 10f8e8: c9 leave 10f8e9: c3 ret 10f8ea: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10f8ec: bf 16 0f 12 00 mov $0x120f16,%edi 10f8f1: b9 02 00 00 00 mov $0x2,%ecx 10f8f6: 89 de mov %ebx,%esi 10f8f8: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f8fa: 0f 97 c0 seta %al 10f8fd: 0f 92 c2 setb %dl 10f900: 28 d0 sub %dl,%al 10f902: 0f be c0 movsbl %al,%eax 10f905: 83 f8 01 cmp $0x1,%eax 10f908: 19 c0 sbb %eax,%eax 10f90a: 83 e0 fe and $0xfffffffe,%eax 10f90d: 83 c0 03 add $0x3,%eax type = IMFS_CURRENT_DIR; } return type; } 10f910: 8d 65 f4 lea -0xc(%ebp),%esp 10f913: 5b pop %ebx 10f914: 5e pop %esi 10f915: 5f pop %edi 10f916: c9 leave 10f917: c3 ret =============================================================================== 00107824 : const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 107824: 55 push %ebp 107825: 89 e5 mov %esp,%ebp 107827: 57 push %edi 107828: 56 push %esi 107829: 53 push %ebx 10782a: 83 ec 1c sub $0x1c,%esp 10782d: 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, 107830: 8b 0d 50 21 12 00 mov 0x122150,%ecx /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 107836: 83 f9 10 cmp $0x10,%ecx 107839: 74 1f je 10785a is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 10783b: 83 f9 0f cmp $0xf,%ecx 10783e: 7e 15 jle 107855 107840: ba 05 00 00 00 mov $0x5,%edx 107845: b8 20 00 00 00 mov $0x20,%eax /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 10784a: 39 c1 cmp %eax,%ecx 10784c: 74 0c je 10785a is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 10784e: 7c 05 jl 107855 <== NEVER TAKEN int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 107850: d1 e0 shl %eax 107852: 4a dec %edx 107853: 75 f5 jne 10784a <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 107855: b9 80 00 00 00 mov $0x80,%ecx break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 10785a: 89 0d 20 60 12 00 mov %ecx,0x126020 /* * 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(); 107860: e8 4f 77 00 00 call 10efb4 107865: 89 c2 mov %eax,%edx 107867: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 10786a: 8b 45 14 mov 0x14(%ebp),%eax 10786d: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 107870: 8b 45 0c mov 0xc(%ebp),%eax 107873: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 107876: 8d 7b 38 lea 0x38(%ebx),%edi 107879: be c0 0e 12 00 mov $0x120ec0,%esi 10787e: b9 0c 00 00 00 mov $0xc,%ecx 107883: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 107885: 83 ec 08 sub $0x8,%esp 107888: 6a 14 push $0x14 10788a: 6a 01 push $0x1 10788c: 89 55 e4 mov %edx,-0x1c(%ebp) 10788f: e8 70 06 00 00 call 107f04 if ( !fs_info ) { 107894: 83 c4 10 add $0x10,%esp 107897: 85 c0 test %eax,%eax 107899: 8b 55 e4 mov -0x1c(%ebp),%edx 10789c: 74 3c je 1078da free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 10789e: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 1078a1: 8b 0d 24 60 12 00 mov 0x126024,%ecx 1078a7: 89 08 mov %ecx,(%eax) 1078a9: 41 inc %ecx 1078aa: 89 0d 24 60 12 00 mov %ecx,0x126024 fs_info->ino_count = 1; 1078b0: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 1078b7: 8b 4d 10 mov 0x10(%ebp),%ecx 1078ba: 89 48 08 mov %ecx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 1078bd: 8b 4d 14 mov 0x14(%ebp),%ecx 1078c0: 89 48 0c mov %ecx,0xc(%eax) fs_info->fifo_handlers = fifo_handlers; 1078c3: 8b 4d 18 mov 0x18(%ebp),%ecx 1078c6: 89 48 10 mov %ecx,0x10(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 1078c9: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) return 0; 1078d0: 31 c0 xor %eax,%eax } 1078d2: 8d 65 f4 lea -0xc(%ebp),%esp 1078d5: 5b pop %ebx 1078d6: 5e pop %esi 1078d7: 5f pop %edi 1078d8: c9 leave 1078d9: 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); 1078da: 83 ec 0c sub $0xc,%esp 1078dd: 52 push %edx 1078de: e8 b1 07 00 00 call 108094 rtems_set_errno_and_return_minus_one(ENOMEM); 1078e3: e8 b0 b9 00 00 call 113298 <__errno> 1078e8: c7 00 0c 00 00 00 movl $0xc,(%eax) 1078ee: 83 c4 10 add $0x10,%esp 1078f1: 83 c8 ff or $0xffffffff,%eax 1078f4: eb dc jmp 1078d2 =============================================================================== 001078f8 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1078f8: 55 push %ebp 1078f9: 89 e5 mov %esp,%ebp 1078fb: 57 push %edi 1078fc: 53 push %ebx 1078fd: 83 ec 50 sub $0x50,%esp 107900: 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; 107903: 8b 45 08 mov 0x8(%ebp),%eax 107906: 8b 00 mov (%eax),%eax 107908: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 10790b: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 107910: 77 66 ja 107978 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 ); 107912: 31 c0 xor %eax,%eax 107914: b9 ff ff ff ff mov $0xffffffff,%ecx 107919: 89 d7 mov %edx,%edi 10791b: f2 ae repnz scas %es:(%edi),%al 10791d: f7 d1 not %ecx 10791f: 49 dec %ecx 107920: 8d 45 f4 lea -0xc(%ebp),%eax 107923: 50 push %eax 107924: 8d 5d b7 lea -0x49(%ebp),%ebx 107927: 53 push %ebx 107928: 51 push %ecx 107929: 52 push %edx 10792a: e8 11 7f 00 00 call 10f840 new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 10792f: 8d 45 d8 lea -0x28(%ebp),%eax * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107932: 89 04 24 mov %eax,(%esp) 107935: 68 ff a1 00 00 push $0xa1ff 10793a: 53 push %ebx 10793b: 6a 03 push $0x3 10793d: ff 75 0c pushl 0xc(%ebp) 107940: e8 37 75 00 00 call 10ee7c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 107945: 83 c4 20 add $0x20,%esp 107948: 85 c0 test %eax,%eax 10794a: 74 3e je 10798a 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++; 10794c: 8b 45 d8 mov -0x28(%ebp),%eax 10794f: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 107953: 83 ec 08 sub $0x8,%esp 107956: 6a 00 push $0x0 107958: 8d 45 ec lea -0x14(%ebp),%eax 10795b: 50 push %eax 10795c: e8 af 07 00 00 call 108110 107961: 8b 55 ec mov -0x14(%ebp),%edx 107964: 8b 45 d8 mov -0x28(%ebp),%eax 107967: 89 50 48 mov %edx,0x48(%eax) return 0; 10796a: 83 c4 10 add $0x10,%esp 10796d: 31 c0 xor %eax,%eax } 10796f: 8d 65 f8 lea -0x8(%ebp),%esp 107972: 5b pop %ebx 107973: 5f pop %edi 107974: c9 leave 107975: c3 ret 107976: 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 ); 107978: e8 1b b9 00 00 call 113298 <__errno> 10797d: c7 00 1f 00 00 00 movl $0x1f,(%eax) 107983: b8 ff ff ff ff mov $0xffffffff,%eax 107988: eb e5 jmp 10796f ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 10798a: e8 09 b9 00 00 call 113298 <__errno> 10798f: c7 00 0c 00 00 00 movl $0xc,(%eax) 107995: b8 ff ff ff ff mov $0xffffffff,%eax 10799a: eb d3 jmp 10796f =============================================================================== 00111ddc : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 111ddc: 55 push %ebp 111ddd: 89 e5 mov %esp,%ebp 111ddf: 53 push %ebx 111de0: 83 ec 08 sub $0x8,%esp IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 111de3: 6a 01 push $0x1 111de5: ff 75 0c pushl 0xc(%ebp) 111de8: ff 75 08 pushl 0x8(%ebp) 111deb: e8 28 fc ff ff call 111a18 111df0: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 111df2: 83 c4 10 add $0x10,%esp 111df5: 8b 00 mov (%eax),%eax 111df7: 85 c0 test %eax,%eax 111df9: 74 09 je 111e04 return 0; 111dfb: 31 c0 xor %eax,%eax if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 111dfd: 8b 5d fc mov -0x4(%ebp),%ebx 111e00: c9 leave 111e01: c3 ret 111e02: 66 90 xchg %ax,%ax <== NOT EXECUTED return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); 111e04: e8 eb fb ff ff call 1119f4 if ( !memory ) 111e09: 85 c0 test %eax,%eax 111e0b: 74 07 je 111e14 return 1; *block_entry_ptr = memory; 111e0d: 89 03 mov %eax,(%ebx) return 0; 111e0f: 31 c0 xor %eax,%eax 111e11: eb ea jmp 111dfd 111e13: 90 nop <== NOT EXECUTED /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; 111e14: b8 01 00 00 00 mov $0x1,%eax 111e19: eb e2 jmp 111dfd =============================================================================== 0011201c : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 11201c: 55 push %ebp 11201d: 89 e5 mov %esp,%ebp 11201f: 57 push %edi 112020: 56 push %esi 112021: 53 push %ebx 112022: 83 ec 2c sub $0x2c,%esp 112025: 8b 5d 08 mov 0x8(%ebp),%ebx 112028: 8b 45 0c mov 0xc(%ebp),%eax 11202b: 8b 55 10 mov 0x10(%ebp),%edx 11202e: 89 45 d8 mov %eax,-0x28(%ebp) 112031: 89 55 dc mov %edx,-0x24(%ebp) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 112034: a1 20 60 12 00 mov 0x126020,%eax 112039: 89 c1 mov %eax,%ecx 11203b: c1 e9 02 shr $0x2,%ecx 11203e: 8d 51 01 lea 0x1(%ecx),%edx 112041: 0f af d1 imul %ecx,%edx 112044: 42 inc %edx 112045: 0f af d1 imul %ecx,%edx 112048: 4a dec %edx 112049: 0f af d0 imul %eax,%edx 11204c: 31 c9 xor %ecx,%ecx 11204e: 3b 4d dc cmp -0x24(%ebp),%ecx 112051: 7f 1a jg 11206d <== NEVER TAKEN 112053: 7d 13 jge 112068 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 112055: e8 3e 12 00 00 call 113298 <__errno> 11205a: c7 00 16 00 00 00 movl $0x16,(%eax) 112060: b8 ff ff ff ff mov $0xffffffff,%eax 112065: eb 19 jmp 112080 112067: 90 nop <== NOT EXECUTED IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 112068: 3b 55 d8 cmp -0x28(%ebp),%edx 11206b: 76 e8 jbe 112055 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 11206d: 8b 53 50 mov 0x50(%ebx),%edx 112070: 8b 4b 54 mov 0x54(%ebx),%ecx 112073: 89 55 e0 mov %edx,-0x20(%ebp) 112076: 89 4d e4 mov %ecx,-0x1c(%ebp) 112079: 39 4d dc cmp %ecx,-0x24(%ebp) 11207c: 7d 0a jge 112088 <== ALWAYS TAKEN return 0; 11207e: 31 c0 xor %eax,%eax /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 112080: 8d 65 f4 lea -0xc(%ebp),%esp 112083: 5b pop %ebx 112084: 5e pop %esi 112085: 5f pop %edi 112086: c9 leave 112087: c3 ret rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 112088: 7f 05 jg 11208f <== NEVER TAKEN 11208a: 39 55 d8 cmp %edx,-0x28(%ebp) 11208d: 76 ef jbe 11207e return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 11208f: 89 45 d0 mov %eax,-0x30(%ebp) 112092: 89 c1 mov %eax,%ecx 112094: c1 f9 1f sar $0x1f,%ecx 112097: 89 4d d4 mov %ecx,-0x2c(%ebp) 11209a: ff 75 d4 pushl -0x2c(%ebp) 11209d: ff 75 d0 pushl -0x30(%ebp) 1120a0: ff 75 dc pushl -0x24(%ebp) 1120a3: ff 75 d8 pushl -0x28(%ebp) 1120a6: e8 25 c1 00 00 call 11e1d0 <__divdi3> 1120ab: 83 c4 10 add $0x10,%esp 1120ae: 89 c6 mov %eax,%esi old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 1120b0: ff 75 d4 pushl -0x2c(%ebp) 1120b3: ff 75 d0 pushl -0x30(%ebp) 1120b6: ff 75 e4 pushl -0x1c(%ebp) 1120b9: ff 75 e0 pushl -0x20(%ebp) 1120bc: e8 0f c1 00 00 call 11e1d0 <__divdi3> 1120c1: 83 c4 10 add $0x10,%esp 1120c4: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 1120c7: 39 c6 cmp %eax,%esi 1120c9: 72 51 jb 11211c <== NEVER TAKEN 1120cb: 89 c7 mov %eax,%edi 1120cd: eb 06 jmp 1120d5 1120cf: 90 nop <== NOT EXECUTED 1120d0: 47 inc %edi 1120d1: 39 fe cmp %edi,%esi 1120d3: 72 47 jb 11211c if ( IMFS_memfile_addblock( the_jnode, block ) ) { 1120d5: 83 ec 08 sub $0x8,%esp 1120d8: 57 push %edi 1120d9: 53 push %ebx 1120da: e8 fd fc ff ff call 111ddc 1120df: 83 c4 10 add $0x10,%esp 1120e2: 85 c0 test %eax,%eax 1120e4: 74 ea je 1120d0 for ( ; block>=old_blocks ; block-- ) { 1120e6: 39 7d e0 cmp %edi,-0x20(%ebp) 1120e9: 77 17 ja 112102 <== NEVER TAKEN 1120eb: 8b 75 e0 mov -0x20(%ebp),%esi 1120ee: 66 90 xchg %ax,%ax IMFS_memfile_remove_block( the_jnode, block ); 1120f0: 83 ec 08 sub $0x8,%esp 1120f3: 57 push %edi 1120f4: 53 push %ebx 1120f5: e8 f6 fe ff ff call 111ff0 /* * 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-- ) { 1120fa: 4f dec %edi 1120fb: 83 c4 10 add $0x10,%esp 1120fe: 39 fe cmp %edi,%esi 112100: 76 ee jbe 1120f0 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 112102: e8 91 11 00 00 call 113298 <__errno> 112107: c7 00 1c 00 00 00 movl $0x1c,(%eax) 11210d: b8 ff ff ff ff mov $0xffffffff,%eax /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 112112: 8d 65 f4 lea -0xc(%ebp),%esp 112115: 5b pop %ebx 112116: 5e pop %esi 112117: 5f pop %edi 112118: c9 leave 112119: c3 ret 11211a: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 11211c: 8b 45 d8 mov -0x28(%ebp),%eax 11211f: 8b 55 dc mov -0x24(%ebp),%edx 112122: 89 43 50 mov %eax,0x50(%ebx) 112125: 89 53 54 mov %edx,0x54(%ebx) return 0; 112128: 31 c0 xor %eax,%eax } 11212a: 8d 65 f4 lea -0xc(%ebp),%esp 11212d: 5b pop %ebx 11212e: 5e pop %esi 11212f: 5f pop %edi 112130: c9 leave 112131: c3 ret =============================================================================== 00111a18 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 111a18: 55 push %ebp 111a19: 89 e5 mov %esp,%ebp 111a1b: 57 push %edi 111a1c: 56 push %esi 111a1d: 53 push %ebx 111a1e: 83 ec 1c sub $0x1c,%esp 111a21: 8b 5d 08 mov 0x8(%ebp),%ebx 111a24: 8b 75 0c mov 0xc(%ebp),%esi 111a27: 8b 7d 10 mov 0x10(%ebp),%edi my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 111a2a: 8b 0d 20 60 12 00 mov 0x126020,%ecx 111a30: c1 e9 02 shr $0x2,%ecx 111a33: 8d 41 ff lea -0x1(%ecx),%eax 111a36: 39 c6 cmp %eax,%esi 111a38: 77 1a ja 111a54 p = info->indirect; 111a3a: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 111a3d: 85 ff test %edi,%edi 111a3f: 74 53 je 111a94 if ( !p ) { 111a41: 85 c0 test %eax,%eax 111a43: 0f 84 b6 00 00 00 je 111aff } if ( !p ) return 0; return &info->indirect[ my_block ]; 111a49: 8d 04 b0 lea (%eax,%esi,4),%eax /* * This means the requested block number is out of range. */ return 0; } 111a4c: 83 c4 1c add $0x1c,%esp 111a4f: 5b pop %ebx 111a50: 5e pop %esi 111a51: 5f pop %edi 111a52: c9 leave 111a53: c3 ret /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 111a54: 8d 41 01 lea 0x1(%ecx),%eax 111a57: 0f af c1 imul %ecx,%eax 111a5a: 8d 50 ff lea -0x1(%eax),%edx 111a5d: 39 d6 cmp %edx,%esi 111a5f: 77 3b ja 111a9c my_block -= FIRST_DOUBLY_INDIRECT; 111a61: 29 ce sub %ecx,%esi singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 111a63: 89 f0 mov %esi,%eax 111a65: 31 d2 xor %edx,%edx 111a67: f7 f1 div %ecx 111a69: 89 c6 mov %eax,%esi doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 111a6b: 8b 43 5c mov 0x5c(%ebx),%eax if ( malloc_it ) { 111a6e: 85 ff test %edi,%edi 111a70: 74 7e je 111af0 if ( !p ) { 111a72: 85 c0 test %eax,%eax 111a74: 0f 84 96 00 00 00 je 111b10 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 111a7a: 8d 1c b0 lea (%eax,%esi,4),%ebx 111a7d: 8b 03 mov (%ebx),%eax if ( !p1 ) { 111a7f: 85 c0 test %eax,%eax 111a81: 0f 84 a4 00 00 00 je 111b2b p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 111a87: 8d 04 90 lea (%eax,%edx,4),%eax /* * This means the requested block number is out of range. */ return 0; } 111a8a: 83 c4 1c add $0x1c,%esp 111a8d: 5b pop %ebx 111a8e: 5e pop %esi 111a8f: 5f pop %edi 111a90: c9 leave 111a91: c3 ret 111a92: 66 90 xchg %ax,%ax <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 111a94: 85 c0 test %eax,%eax 111a96: 75 b1 jne 111a49 <== ALWAYS TAKEN if ( !p ) return 0; p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; 111a98: 31 c0 xor %eax,%eax <== NOT EXECUTED 111a9a: eb ee jmp 111a8a <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 111a9c: 8d 50 01 lea 0x1(%eax),%edx 111a9f: 0f af d1 imul %ecx,%edx 111aa2: 4a dec %edx 111aa3: 39 d6 cmp %edx,%esi 111aa5: 77 f1 ja 111a98 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 111aa7: 29 c6 sub %eax,%esi 111aa9: 89 f0 mov %esi,%eax singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 111aab: 31 d2 xor %edx,%edx 111aad: f7 f1 div %ecx 111aaf: 89 55 e4 mov %edx,-0x1c(%ebp) doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 111ab2: 31 d2 xor %edx,%edx 111ab4: f7 f1 div %ecx 111ab6: 89 c6 mov %eax,%esi doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 111ab8: 8b 4b 60 mov 0x60(%ebx),%ecx if ( malloc_it ) { 111abb: 85 ff test %edi,%edi 111abd: 0f 84 82 00 00 00 je 111b45 if ( !p ) { 111ac3: 85 c9 test %ecx,%ecx 111ac5: 0f 84 9b 00 00 00 je 111b66 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 111acb: 8d 1c b1 lea (%ecx,%esi,4),%ebx 111ace: 8b 0b mov (%ebx),%ecx if ( !p1 ) { 111ad0: 85 c9 test %ecx,%ecx 111ad2: 0f 84 c5 00 00 00 je 111b9d if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 111ad8: 8d 1c 91 lea (%ecx,%edx,4),%ebx 111adb: 8b 13 mov (%ebx),%edx if ( !p2 ) { 111add: 85 d2 test %edx,%edx 111adf: 0f 84 a0 00 00 00 je 111b85 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 111ae5: 8b 4d e4 mov -0x1c(%ebp),%ecx 111ae8: 8d 04 8a lea (%edx,%ecx,4),%eax 111aeb: eb 9d jmp 111a8a 111aed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 111af0: 85 c0 test %eax,%eax 111af2: 74 a4 je 111a98 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 111af4: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !p ) 111af7: 85 c0 test %eax,%eax 111af9: 75 8c jne 111a87 <== ALWAYS TAKEN if ( !p ) return 0; p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; 111afb: 31 c0 xor %eax,%eax <== NOT EXECUTED 111afd: eb 8b jmp 111a8a <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 111aff: e8 f0 fe ff ff call 1119f4 if ( !p ) 111b04: 85 c0 test %eax,%eax 111b06: 74 90 je 111a98 <== NEVER TAKEN return 0; info->indirect = p; 111b08: 89 43 58 mov %eax,0x58(%ebx) 111b0b: e9 39 ff ff ff jmp 111a49 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 111b10: 89 55 e0 mov %edx,-0x20(%ebp) 111b13: e8 dc fe ff ff call 1119f4 if ( !p ) 111b18: 85 c0 test %eax,%eax 111b1a: 8b 55 e0 mov -0x20(%ebp),%edx 111b1d: 0f 84 75 ff ff ff je 111a98 <== NEVER TAKEN return 0; info->doubly_indirect = p; 111b23: 89 43 5c mov %eax,0x5c(%ebx) 111b26: e9 4f ff ff ff jmp 111a7a } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 111b2b: 89 55 e0 mov %edx,-0x20(%ebp) 111b2e: e8 c1 fe ff ff call 1119f4 if ( !p1 ) 111b33: 85 c0 test %eax,%eax 111b35: 8b 55 e0 mov -0x20(%ebp),%edx 111b38: 0f 84 5a ff ff ff je 111a98 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; 111b3e: 89 03 mov %eax,(%ebx) 111b40: e9 42 ff ff ff jmp 111a87 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 111b45: 85 c9 test %ecx,%ecx 111b47: 0f 84 4b ff ff ff je 111a98 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 111b4d: 8b 04 81 mov (%ecx,%eax,4),%eax if ( !p1 ) 111b50: 85 c0 test %eax,%eax 111b52: 0f 84 40 ff ff ff je 111a98 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 111b58: 8b 14 90 mov (%eax,%edx,4),%edx if ( !p2 ) return 0; 111b5b: 31 c0 xor %eax,%eax p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 111b5d: 85 d2 test %edx,%edx 111b5f: 75 84 jne 111ae5 <== ALWAYS TAKEN 111b61: e9 24 ff ff ff jmp 111a8a <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 111b66: 89 55 e0 mov %edx,-0x20(%ebp) 111b69: e8 86 fe ff ff call 1119f4 111b6e: 89 c1 mov %eax,%ecx if ( !p ) return 0; 111b70: 31 c0 xor %eax,%eax p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 111b72: 85 c9 test %ecx,%ecx 111b74: 8b 55 e0 mov -0x20(%ebp),%edx 111b77: 0f 84 0d ff ff ff je 111a8a <== NEVER TAKEN return 0; info->triply_indirect = p; 111b7d: 89 4b 60 mov %ecx,0x60(%ebx) 111b80: e9 46 ff ff ff jmp 111acb p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 111b85: e8 6a fe ff ff call 1119f4 111b8a: 89 c2 mov %eax,%edx if ( !p2 ) return 0; 111b8c: 31 c0 xor %eax,%eax } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 111b8e: 85 d2 test %edx,%edx 111b90: 0f 84 f4 fe ff ff je 111a8a <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 111b96: 89 13 mov %edx,(%ebx) 111b98: e9 48 ff ff ff jmp 111ae5 info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 111b9d: 89 55 e0 mov %edx,-0x20(%ebp) 111ba0: e8 4f fe ff ff call 1119f4 111ba5: 89 c1 mov %eax,%ecx if ( !p1 ) return 0; 111ba7: 31 c0 xor %eax,%eax } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 111ba9: 85 c9 test %ecx,%ecx 111bab: 8b 55 e0 mov -0x20(%ebp),%edx 111bae: 0f 84 d6 fe ff ff je 111a8a <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 111bb4: 89 0b mov %ecx,(%ebx) 111bb6: e9 1d ff ff ff jmp 111ad8 =============================================================================== 00111bbc : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 111bbc: 55 push %ebp 111bbd: 89 e5 mov %esp,%ebp 111bbf: 57 push %edi 111bc0: 56 push %esi 111bc1: 53 push %ebx 111bc2: 83 ec 3c sub $0x3c,%esp 111bc5: 8b 75 0c mov 0xc(%ebp),%esi 111bc8: 8b 7d 10 mov 0x10(%ebp),%edi * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 111bcb: 8b 45 08 mov 0x8(%ebp),%eax 111bce: 83 78 4c 06 cmpl $0x6,0x4c(%eax) 111bd2: 0f 84 60 01 00 00 je 111d38 <== NEVER 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; 111bd8: 89 f0 mov %esi,%eax if ( last_byte > the_jnode->info.file.size ) 111bda: 8b 55 08 mov 0x8(%ebp),%edx 111bdd: 8b 4a 50 mov 0x50(%edx),%ecx /* * 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; 111be0: 8b 5d 18 mov 0x18(%ebp),%ebx 111be3: 01 f3 add %esi,%ebx 111be5: 89 5d d0 mov %ebx,-0x30(%ebp) if ( last_byte > the_jnode->info.file.size ) 111be8: 31 d2 xor %edx,%edx 111bea: 8b 5d 08 mov 0x8(%ebp),%ebx 111bed: 3b 53 54 cmp 0x54(%ebx),%edx 111bf0: 0f 8d d2 00 00 00 jge 111cc8 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 111bf6: 8b 45 18 mov 0x18(%ebp),%eax 111bf9: 89 45 cc mov %eax,-0x34(%ebp) */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 111bfc: 8b 15 20 60 12 00 mov 0x126020,%edx 111c02: 89 55 d0 mov %edx,-0x30(%ebp) 111c05: 89 d0 mov %edx,%eax 111c07: 99 cltd 111c08: 89 d3 mov %edx,%ebx 111c0a: 52 push %edx 111c0b: 50 push %eax 111c0c: 57 push %edi 111c0d: 56 push %esi 111c0e: 89 45 c0 mov %eax,-0x40(%ebp) 111c11: e8 06 c7 00 00 call 11e31c <__moddi3> 111c16: 83 c4 10 add $0x10,%esp 111c19: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 111c1c: 8b 4d c0 mov -0x40(%ebp),%ecx 111c1f: 53 push %ebx 111c20: 51 push %ecx 111c21: 57 push %edi 111c22: 56 push %esi 111c23: e8 a8 c5 00 00 call 11e1d0 <__divdi3> 111c28: 83 c4 10 add $0x10,%esp 111c2b: 89 c3 mov %eax,%ebx if ( start_offset ) { 111c2d: 8b 7d c8 mov -0x38(%ebp),%edi 111c30: 85 ff test %edi,%edi 111c32: 0f 84 a0 00 00 00 je 111cd8 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 ); 111c38: 56 push %esi 111c39: 6a 00 push $0x0 111c3b: 50 push %eax 111c3c: ff 75 08 pushl 0x8(%ebp) 111c3f: e8 d4 fd ff ff call 111a18 if ( !block_ptr ) 111c44: 83 c4 10 add $0x10,%esp 111c47: 85 c0 test %eax,%eax 111c49: 0f 84 65 01 00 00 je 111db4 <== NEVER TAKEN * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 111c4f: 8b 4d d0 mov -0x30(%ebp),%ecx 111c52: 2b 4d c8 sub -0x38(%ebp),%ecx 111c55: 8b 55 cc mov -0x34(%ebp),%edx 111c58: 39 ca cmp %ecx,%edx 111c5a: 0f 87 3c 01 00 00 ja 111d9c if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 111c60: 8b 75 c8 mov -0x38(%ebp),%esi 111c63: 03 30 add (%eax),%esi dest += to_copy; 111c65: 8b 7d 14 mov 0x14(%ebp),%edi 111c68: 89 d1 mov %edx,%ecx 111c6a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 111c6c: 89 7d c8 mov %edi,-0x38(%ebp) block++; 111c6f: 43 inc %ebx my_length -= to_copy; 111c70: 29 55 cc sub %edx,-0x34(%ebp) 111c73: a1 20 60 12 00 mov 0x126020,%eax 111c78: 89 45 d0 mov %eax,-0x30(%ebp) copied += to_copy; 111c7b: 89 55 c4 mov %edx,-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 ) { 111c7e: 8b 4d d0 mov -0x30(%ebp),%ecx 111c81: 39 4d cc cmp %ecx,-0x34(%ebp) 111c84: 73 24 jae 111caa 111c86: eb 60 jmp 111ce8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 111c88: 8b 30 mov (%eax),%esi 111c8a: 8b 7d c8 mov -0x38(%ebp),%edi 111c8d: 8b 4d d0 mov -0x30(%ebp),%ecx 111c90: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 111c92: 89 7d c8 mov %edi,-0x38(%ebp) block++; 111c95: 43 inc %ebx my_length -= to_copy; 111c96: 8b 7d d0 mov -0x30(%ebp),%edi 111c99: 29 7d cc sub %edi,-0x34(%ebp) copied += to_copy; 111c9c: 01 7d c4 add %edi,-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 ) { 111c9f: 8b 45 cc mov -0x34(%ebp),%eax 111ca2: 39 05 20 60 12 00 cmp %eax,0x126020 111ca8: 77 3e ja 111ce8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111caa: 51 push %ecx 111cab: 6a 00 push $0x0 111cad: 53 push %ebx 111cae: ff 75 08 pushl 0x8(%ebp) 111cb1: e8 62 fd ff ff call 111a18 if ( !block_ptr ) 111cb6: 83 c4 10 add $0x10,%esp 111cb9: 85 c0 test %eax,%eax 111cbb: 75 cb jne 111c88 <== ALWAYS TAKEN IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 111cbd: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 111cc0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111cc3: 5b pop %ebx <== NOT EXECUTED 111cc4: 5e pop %esi <== NOT EXECUTED 111cc5: 5f pop %edi <== NOT EXECUTED 111cc6: c9 leave <== NOT EXECUTED 111cc7: c3 ret <== 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 ) 111cc8: 0f 8e be 00 00 00 jle 111d8c <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; 111cce: 29 c1 sub %eax,%ecx 111cd0: 89 4d cc mov %ecx,-0x34(%ebp) 111cd3: e9 24 ff ff ff jmp 111bfc unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 111cd8: 8b 55 14 mov 0x14(%ebp),%edx 111cdb: 89 55 c8 mov %edx,-0x38(%ebp) */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 111cde: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 111ce5: eb 97 jmp 111c7e 111ce7: 90 nop <== NOT EXECUTED /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 111ce8: 8b 55 cc mov -0x34(%ebp),%edx 111ceb: 85 d2 test %edx,%edx 111ced: 74 23 je 111d12 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111cef: 50 push %eax 111cf0: 6a 00 push $0x0 111cf2: 53 push %ebx 111cf3: ff 75 08 pushl 0x8(%ebp) 111cf6: e8 1d fd ff ff call 111a18 if ( !block_ptr ) 111cfb: 83 c4 10 add $0x10,%esp 111cfe: 85 c0 test %eax,%eax 111d00: 74 bb je 111cbd <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 111d02: 8b 30 mov (%eax),%esi 111d04: 8b 7d c8 mov -0x38(%ebp),%edi 111d07: 8b 4d cc mov -0x34(%ebp),%ecx 111d0a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 111d0c: 8b 55 cc mov -0x34(%ebp),%edx 111d0f: 01 55 c4 add %edx,-0x3c(%ebp) } IMFS_update_atime( the_jnode ); 111d12: 83 ec 08 sub $0x8,%esp 111d15: 6a 00 push $0x0 111d17: 8d 45 e0 lea -0x20(%ebp),%eax 111d1a: 50 push %eax 111d1b: e8 f0 63 ff ff call 108110 111d20: 8b 45 e0 mov -0x20(%ebp),%eax 111d23: 8b 4d 08 mov 0x8(%ebp),%ecx 111d26: 89 41 40 mov %eax,0x40(%ecx) return copied; 111d29: 8b 45 c4 mov -0x3c(%ebp),%eax 111d2c: 83 c4 10 add $0x10,%esp } 111d2f: 8d 65 f4 lea -0xc(%ebp),%esp 111d32: 5b pop %ebx 111d33: 5e pop %esi 111d34: 5f pop %edi 111d35: c9 leave 111d36: c3 ret 111d37: 90 nop <== NOT EXECUTED my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 111d38: 8b 50 58 mov 0x58(%eax),%edx 111d3b: 89 55 cc mov %edx,-0x34(%ebp) if (my_length > (the_jnode->info.linearfile.size - start)) 111d3e: 89 c1 mov %eax,%ecx 111d40: 8b 40 50 mov 0x50(%eax),%eax 111d43: 8b 51 54 mov 0x54(%ecx),%edx 111d46: 89 c1 mov %eax,%ecx 111d48: 89 d3 mov %edx,%ebx 111d4a: 29 f1 sub %esi,%ecx 111d4c: 19 fb sbb %edi,%ebx 111d4e: 89 4d d0 mov %ecx,-0x30(%ebp) 111d51: 89 5d d4 mov %ebx,-0x2c(%ebp) 111d54: 31 c9 xor %ecx,%ecx 111d56: 39 d9 cmp %ebx,%ecx 111d58: 7d 4a jge 111da4 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 111d5a: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 111d5d: 03 75 cc add -0x34(%ebp),%esi 111d60: 8b 7d 14 mov 0x14(%ebp),%edi 111d63: 89 d9 mov %ebx,%ecx 111d65: f3 a4 rep movsb %ds:(%esi),%es:(%edi) IMFS_update_atime( the_jnode ); 111d67: 83 ec 08 sub $0x8,%esp 111d6a: 6a 00 push $0x0 111d6c: 8d 45 e0 lea -0x20(%ebp),%eax 111d6f: 50 push %eax 111d70: e8 9b 63 ff ff call 108110 111d75: 8b 45 e0 mov -0x20(%ebp),%eax 111d78: 8b 7d 08 mov 0x8(%ebp),%edi 111d7b: 89 47 40 mov %eax,0x40(%edi) return my_length; 111d7e: 89 d8 mov %ebx,%eax 111d80: 83 c4 10 add $0x10,%esp } IMFS_update_atime( the_jnode ); return copied; } 111d83: 8d 65 f4 lea -0xc(%ebp),%esp 111d86: 5b pop %ebx 111d87: 5e pop %esi 111d88: 5f pop %edi 111d89: c9 leave 111d8a: c3 ret 111d8b: 90 nop <== 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 ) 111d8c: 39 4d d0 cmp %ecx,-0x30(%ebp) 111d8f: 0f 86 61 fe ff ff jbe 111bf6 111d95: e9 34 ff ff ff jmp 111cce 111d9a: 66 90 xchg %ax,%ax <== NOT EXECUTED * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 111d9c: 89 ca mov %ecx,%edx 111d9e: e9 bd fe ff ff jmp 111c60 111da3: 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)) 111da4: 7f 08 jg 111dae <== NEVER TAKEN 111da6: 8b 5d d0 mov -0x30(%ebp),%ebx 111da9: 39 5d 18 cmp %ebx,0x18(%ebp) 111dac: 76 ac jbe 111d5a <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 111dae: 89 c3 mov %eax,%ebx 111db0: 29 f3 sub %esi,%ebx 111db2: eb a9 jmp 111d5d to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 111db4: 31 c0 xor %eax,%eax <== NOT EXECUTED 111db6: e9 05 ff ff ff jmp 111cc0 <== NOT EXECUTED =============================================================================== 00111e94 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 111e94: 55 push %ebp 111e95: 89 e5 mov %esp,%ebp 111e97: 57 push %edi 111e98: 56 push %esi 111e99: 53 push %ebx 111e9a: 83 ec 1c sub $0x1c,%esp /* * 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; 111e9d: 8b 3d 20 60 12 00 mov 0x126020,%edi 111ea3: c1 ef 02 shr $0x2,%edi * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 111ea6: 8b 45 08 mov 0x8(%ebp),%eax 111ea9: 8b 50 58 mov 0x58(%eax),%edx 111eac: 85 d2 test %edx,%edx 111eae: 74 10 je 111ec0 memfile_free_blocks_in_table( &info->indirect, to_free ); 111eb0: 83 ec 08 sub $0x8,%esp 111eb3: 57 push %edi 111eb4: 83 c0 58 add $0x58,%eax 111eb7: 50 push %eax 111eb8: e8 7b ff ff ff call 111e38 111ebd: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 111ec0: 8b 4d 08 mov 0x8(%ebp),%ecx 111ec3: 8b 51 5c mov 0x5c(%ecx),%edx 111ec6: 85 d2 test %edx,%edx 111ec8: 74 55 je 111f1f for ( i=0 ; i<== NEVER TAKEN 111ed6: 31 c9 xor %ecx,%ecx 111ed8: 31 db xor %ebx,%ebx 111eda: 8b 75 08 mov 0x8(%ebp),%esi 111edd: eb 04 jmp 111ee3 111edf: 90 nop <== NOT EXECUTED 111ee0: 8b 56 5c mov 0x5c(%esi),%edx if ( info->doubly_indirect[i] ) { 111ee3: c1 e1 02 shl $0x2,%ecx 111ee6: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) 111eea: 74 14 je 111f00 <== NEVER TAKEN memfile_free_blocks_in_table( 111eec: 83 ec 08 sub $0x8,%esp 111eef: 57 push %edi 111ef0: 01 ca add %ecx,%edx 111ef2: 52 push %edx 111ef3: e8 40 ff ff ff call 111e38 111ef8: 83 c4 10 add $0x10,%esp 111efb: a1 20 60 12 00 mov 0x126020,%eax if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 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 ); 111f0c: 83 ec 08 sub $0x8,%esp 111f0f: 57 push %edi 111f10: 8b 45 08 mov 0x8(%ebp),%eax 111f13: 83 c0 5c add $0x5c,%eax 111f16: 50 push %eax 111f17: e8 1c ff ff ff call 111e38 111f1c: 83 c4 10 add $0x10,%esp } if ( info->triply_indirect ) { 111f1f: 8b 45 08 mov 0x8(%ebp),%eax 111f22: 8b 50 60 mov 0x60(%eax),%edx 111f25: 85 d2 test %edx,%edx 111f27: 0f 84 b6 00 00 00 je 111fe3 for ( i=0 ; i<== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; 111f3d: 8b 32 mov (%edx),%esi if ( !p ) /* ensure we have a valid pointer */ 111f3f: 85 f6 test %esi,%esi 111f41: 0f 84 89 00 00 00 je 111fd0 <== NEVER TAKEN } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 111f47: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( !p ) /* ensure we have a valid pointer */ 111f4e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 111f55: 8d 76 00 lea 0x0(%esi),%esi break; for ( j=0 ; j<== NEVER TAKEN 111f5f: 31 d2 xor %edx,%edx 111f61: 31 db xor %ebx,%ebx 111f63: 90 nop if ( p[j] ) { 111f64: c1 e2 02 shl $0x2,%edx 111f67: 8b 0c 16 mov (%esi,%edx,1),%ecx 111f6a: 85 c9 test %ecx,%ecx 111f6c: 74 15 je 111f83 <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 111f6e: 83 ec 08 sub $0x8,%esp 111f71: 57 push %edi 111f72: 8d 14 16 lea (%esi,%edx,1),%edx 111f75: 52 push %edx 111f76: e8 bd fe ff ff call 111e38 111f7b: 83 c4 10 add $0x10,%esp 111f7e: a1 20 60 12 00 mov 0x126020,%eax if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 111f8f: 83 ec 08 sub $0x8,%esp 111f92: 57 push %edi 111f93: 8b 45 e0 mov -0x20(%ebp),%eax 111f96: 8b 4d 08 mov 0x8(%ebp),%ecx 111f99: 03 41 60 add 0x60(%ecx),%eax 111f9c: 50 push %eax 111f9d: e8 96 fe ff ff call 111e38 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 111fb7: 8b 55 e4 mov -0x1c(%ebp),%edx 111fba: c1 e2 02 shl $0x2,%edx 111fbd: 89 55 e0 mov %edx,-0x20(%ebp) } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 111fc0: 8b 4d 08 mov 0x8(%ebp),%ecx 111fc3: 8b 51 60 mov 0x60(%ecx),%edx 111fc6: 8b 4d e0 mov -0x20(%ebp),%ecx 111fc9: 8b 34 0a mov (%edx,%ecx,1),%esi if ( !p ) /* ensure we have a valid pointer */ 111fcc: 85 f6 test %esi,%esi 111fce: 75 88 jne 111f58 <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 111fd0: 83 ec 08 sub $0x8,%esp 111fd3: 57 push %edi (block_p **)&info->triply_indirect, to_free ); 111fd4: 8b 45 08 mov 0x8(%ebp),%eax 111fd7: 83 c0 60 add $0x60,%eax } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 111fda: 50 push %eax 111fdb: e8 58 fe ff ff call 111e38 111fe0: 83 c4 10 add $0x10,%esp (block_p **)&info->triply_indirect, to_free ); } return 0; } 111fe3: 31 c0 xor %eax,%eax 111fe5: 8d 65 f4 lea -0xc(%ebp),%esp 111fe8: 5b pop %ebx 111fe9: 5e pop %esi 111fea: 5f pop %edi 111feb: c9 leave 111fec: c3 ret =============================================================================== 00112134 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 112134: 55 push %ebp 112135: 89 e5 mov %esp,%ebp 112137: 57 push %edi 112138: 56 push %esi 112139: 53 push %ebx 11213a: 83 ec 3c sub $0x3c,%esp 11213d: 8b 5d 0c mov 0xc(%ebp),%ebx 112140: 8b 75 10 mov 0x10(%ebp),%esi /* * 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 + my_length; 112143: 8b 4d 18 mov 0x18(%ebp),%ecx 112146: 01 d9 add %ebx,%ecx if ( last_byte > the_jnode->info.file.size ) { 112148: 89 c8 mov %ecx,%eax 11214a: 31 d2 xor %edx,%edx 11214c: 8b 7d 08 mov 0x8(%ebp),%edi 11214f: 3b 57 54 cmp 0x54(%edi),%edx 112152: 7c 1c jl 112170 <== NEVER TAKEN 112154: 0f 8e f2 00 00 00 jle 11224c <== ALWAYS TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 11215a: 51 push %ecx 11215b: 52 push %edx 11215c: 50 push %eax 11215d: ff 75 08 pushl 0x8(%ebp) 112160: e8 b7 fe ff ff call 11201c if ( status ) 112165: 83 c4 10 add $0x10,%esp 112168: 85 c0 test %eax,%eax 11216a: 0f 85 5a 01 00 00 jne 1122ca */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 112170: a1 20 60 12 00 mov 0x126020,%eax 112175: 89 45 d4 mov %eax,-0x2c(%ebp) 112178: 99 cltd 112179: 89 45 c8 mov %eax,-0x38(%ebp) 11217c: 89 55 cc mov %edx,-0x34(%ebp) 11217f: 52 push %edx 112180: 50 push %eax 112181: 56 push %esi 112182: 53 push %ebx 112183: e8 94 c1 00 00 call 11e31c <__moddi3> 112188: 83 c4 10 add $0x10,%esp 11218b: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 11218d: ff 75 cc pushl -0x34(%ebp) 112190: ff 75 c8 pushl -0x38(%ebp) 112193: 56 push %esi 112194: 53 push %ebx 112195: e8 36 c0 00 00 call 11e1d0 <__divdi3> 11219a: 83 c4 10 add $0x10,%esp 11219d: 89 c3 mov %eax,%ebx if ( start_offset ) { 11219f: 85 ff test %edi,%edi 1121a1: 75 5d jne 112200 unsigned int last_byte; unsigned int start_offset; int copied; const unsigned char *src; src = source; 1121a3: 8b 75 14 mov 0x14(%ebp),%esi /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 1121a6: 8b 55 18 mov 0x18(%ebp),%edx status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 1121a9: 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 ) { 1121b0: 3b 55 d4 cmp -0x2c(%ebp),%edx 1121b3: 73 26 jae 1121db 1121b5: e9 a2 00 00 00 jmp 11225c 1121ba: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 1121bc: 8b 00 mov (%eax),%eax src += to_copy; 1121be: 89 c7 mov %eax,%edi 1121c0: 8b 4d d4 mov -0x2c(%ebp),%ecx 1121c3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1121c5: 43 inc %ebx my_length -= to_copy; 1121c6: 2b 55 d4 sub -0x2c(%ebp),%edx * IMFS_memfile_write * * 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( 1121c9: 8b 45 d4 mov -0x2c(%ebp),%eax 1121cc: 01 45 c8 add %eax,-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 ) { 1121cf: 39 15 20 60 12 00 cmp %edx,0x126020 1121d5: 0f 87 81 00 00 00 ja 11225c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1121db: 57 push %edi 1121dc: 6a 00 push $0x0 1121de: 53 push %ebx 1121df: ff 75 08 pushl 0x8(%ebp) 1121e2: 89 55 c4 mov %edx,-0x3c(%ebp) 1121e5: e8 2e f8 ff ff call 111a18 if ( !block_ptr ) 1121ea: 83 c4 10 add $0x10,%esp 1121ed: 85 c0 test %eax,%eax 1121ef: 8b 55 c4 mov -0x3c(%ebp),%edx 1121f2: 75 c8 jne 1121bc <== ALWAYS TAKEN } IMFS_mtime_ctime_update( the_jnode ); return copied; } 1121f4: 8b 45 c8 mov -0x38(%ebp),%eax 1121f7: 8d 65 f4 lea -0xc(%ebp),%esp 1121fa: 5b pop %ebx 1121fb: 5e pop %esi 1121fc: 5f pop %edi 1121fd: c9 leave 1121fe: c3 ret 1121ff: 90 nop <== 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 ); 112200: 50 push %eax 112201: 6a 00 push $0x0 112203: 53 push %ebx 112204: ff 75 08 pushl 0x8(%ebp) 112207: e8 0c f8 ff ff call 111a18 if ( !block_ptr ) 11220c: 83 c4 10 add $0x10,%esp 11220f: 85 c0 test %eax,%eax 112211: 0f 84 a1 00 00 00 je 1122b8 <== NEVER TAKEN * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 112217: 8b 55 d4 mov -0x2c(%ebp),%edx 11221a: 29 fa sub %edi,%edx 11221c: 89 55 c8 mov %edx,-0x38(%ebp) 11221f: 8b 55 18 mov 0x18(%ebp),%edx 112222: 39 55 c8 cmp %edx,-0x38(%ebp) 112225: 0f 87 85 00 00 00 ja 1122b0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 11222b: 03 38 add (%eax),%edi src += to_copy; 11222d: 8b 75 14 mov 0x14(%ebp),%esi 112230: 8b 4d c8 mov -0x38(%ebp),%ecx 112233: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 112235: 43 inc %ebx my_length -= to_copy; 112236: 8b 55 18 mov 0x18(%ebp),%edx 112239: 2b 55 c8 sub -0x38(%ebp),%edx copied += to_copy; 11223c: 8b 3d 20 60 12 00 mov 0x126020,%edi 112242: 89 7d d4 mov %edi,-0x2c(%ebp) 112245: e9 66 ff ff ff jmp 1121b0 11224a: 66 90 xchg %ax,%ax <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 11224c: 3b 4f 50 cmp 0x50(%edi),%ecx 11224f: 0f 86 1b ff ff ff jbe 112170 <== NEVER TAKEN 112255: e9 00 ff ff ff jmp 11215a 11225a: 66 90 xchg %ax,%ax <== NOT EXECUTED * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 11225c: 85 d2 test %edx,%edx 11225e: 74 28 je 112288 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112260: 51 push %ecx 112261: 6a 00 push $0x0 112263: 53 push %ebx 112264: ff 75 08 pushl 0x8(%ebp) 112267: 89 55 c4 mov %edx,-0x3c(%ebp) 11226a: e8 a9 f7 ff ff call 111a18 if ( !block_ptr ) 11226f: 83 c4 10 add $0x10,%esp 112272: 85 c0 test %eax,%eax 112274: 8b 55 c4 mov -0x3c(%ebp),%edx 112277: 0f 84 77 ff ff ff je 1121f4 <== NEVER TAKEN return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 11227d: 8b 00 mov (%eax),%eax 11227f: 89 c7 mov %eax,%edi 112281: 89 d1 mov %edx,%ecx 112283: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 112285: 01 55 c8 add %edx,-0x38(%ebp) } IMFS_mtime_ctime_update( the_jnode ); 112288: 83 ec 08 sub $0x8,%esp 11228b: 6a 00 push $0x0 11228d: 8d 45 e0 lea -0x20(%ebp),%eax 112290: 50 push %eax 112291: e8 7a 5e ff ff call 108110 112296: 8b 45 e0 mov -0x20(%ebp),%eax 112299: 8b 55 08 mov 0x8(%ebp),%edx 11229c: 89 42 44 mov %eax,0x44(%edx) 11229f: 89 42 48 mov %eax,0x48(%edx) return copied; 1122a2: 83 c4 10 add $0x10,%esp } 1122a5: 8b 45 c8 mov -0x38(%ebp),%eax 1122a8: 8d 65 f4 lea -0xc(%ebp),%esp 1122ab: 5b pop %ebx 1122ac: 5e pop %esi 1122ad: 5f pop %edi 1122ae: c9 leave 1122af: c3 ret * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 1122b0: 89 55 c8 mov %edx,-0x38(%ebp) 1122b3: e9 73 ff ff ff jmp 11222b if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 1122b8: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 1122bf: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 1122c2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1122c5: 5b pop %ebx <== NOT EXECUTED 1122c6: 5e pop %esi <== NOT EXECUTED 1122c7: 5f pop %edi <== NOT EXECUTED 1122c8: c9 leave <== NOT EXECUTED 1122c9: c3 ret <== NOT EXECUTED last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); 1122ca: e8 c9 0f 00 00 call 113298 <__errno> 1122cf: c7 00 1c 00 00 00 movl $0x1c,(%eax) 1122d5: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) 1122dc: e9 13 ff ff ff jmp 1121f4 =============================================================================== 0010799c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10799c: 55 push %ebp 10799d: 89 e5 mov %esp,%ebp 10799f: 57 push %edi 1079a0: 56 push %esi 1079a1: 53 push %ebx 1079a2: 83 ec 5c sub $0x5c,%esp 1079a5: 8b 55 08 mov 0x8(%ebp),%edx 1079a8: 8b 5d 0c mov 0xc(%ebp),%ebx 1079ab: 8b 75 10 mov 0x10(%ebp),%esi 1079ae: 8b 45 14 mov 0x14(%ebp),%eax 1079b1: 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 ); 1079b4: 31 c0 xor %eax,%eax 1079b6: b9 ff ff ff ff mov $0xffffffff,%ecx 1079bb: 89 d7 mov %edx,%edi 1079bd: f2 ae repnz scas %es:(%edi),%al 1079bf: f7 d1 not %ecx 1079c1: 49 dec %ecx 1079c2: 8d 45 e4 lea -0x1c(%ebp),%eax 1079c5: 50 push %eax 1079c6: 8d 7d af lea -0x51(%ebp),%edi 1079c9: 57 push %edi 1079ca: 51 push %ecx 1079cb: 52 push %edx 1079cc: e8 6f 7e 00 00 call 10f840 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 1079d1: 89 d8 mov %ebx,%eax 1079d3: 25 00 f0 00 00 and $0xf000,%eax 1079d8: 83 c4 10 add $0x10,%esp 1079db: 3d 00 40 00 00 cmp $0x4000,%eax 1079e0: 74 56 je 107a38 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 1079e2: 3d 00 80 00 00 cmp $0x8000,%eax 1079e7: 74 57 je 107a40 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 1079e9: 3d 00 60 00 00 cmp $0x6000,%eax 1079ee: 74 14 je 107a04 1079f0: 3d 00 20 00 00 cmp $0x2000,%eax 1079f5: 74 0d je 107a04 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 1079f7: 3d 00 10 00 00 cmp $0x1000,%eax 1079fc: 74 4a je 107a48 mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { IMFS_token_types type = 0; 1079fe: 31 d2 xor %edx,%edx 107a00: eb 10 jmp 107a12 107a02: 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 ); 107a04: 89 75 d0 mov %esi,-0x30(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107a07: 8b 45 a4 mov -0x5c(%ebp),%eax 107a0a: 89 45 d4 mov %eax,-0x2c(%ebp) if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; 107a0d: ba 02 00 00 00 mov $0x2,%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( pathloc, type, new_name, mode, &info ); 107a12: 83 ec 0c sub $0xc,%esp 107a15: 8d 45 d0 lea -0x30(%ebp),%eax 107a18: 50 push %eax 107a19: 53 push %ebx 107a1a: 57 push %edi 107a1b: 52 push %edx 107a1c: ff 75 18 pushl 0x18(%ebp) 107a1f: e8 58 74 00 00 call 10ee7c if ( !new_node ) 107a24: 83 c4 20 add $0x20,%esp 107a27: 85 c0 test %eax,%eax 107a29: 74 24 je 107a4f rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; 107a2b: 31 c0 xor %eax,%eax } 107a2d: 8d 65 f4 lea -0xc(%ebp),%esp 107a30: 5b pop %ebx 107a31: 5e pop %esi 107a32: 5f pop %edi 107a33: c9 leave 107a34: c3 ret 107a35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 107a38: ba 01 00 00 00 mov $0x1,%edx 107a3d: eb d3 jmp 107a12 107a3f: 90 nop <== NOT EXECUTED else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 107a40: ba 05 00 00 00 mov $0x5,%edx 107a45: eb cb jmp 107a12 107a47: 90 nop <== NOT EXECUTED else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; 107a48: ba 07 00 00 00 mov $0x7,%edx 107a4d: eb c3 jmp 107a12 * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107a4f: e8 44 b8 00 00 call 113298 <__errno> 107a54: c7 00 0c 00 00 00 movl $0xc,(%eax) 107a5a: b8 ff ff ff ff mov $0xffffffff,%eax 107a5f: eb cc jmp 107a2d =============================================================================== 00107a64 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107a64: 55 push %ebp 107a65: 89 e5 mov %esp,%ebp 107a67: 83 ec 08 sub $0x8,%esp 107a6a: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107a6d: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107a70: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107a74: 75 0a jne 107a80 <== NEVER TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 107a76: 89 50 5c mov %edx,0x5c(%eax) return 0; 107a79: 31 c0 xor %eax,%eax } 107a7b: c9 leave 107a7c: c3 ret 107a7d: 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 ); 107a80: e8 13 b8 00 00 call 113298 <__errno> <== NOT EXECUTED 107a85: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107a8b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 107a90: c9 leave <== NOT EXECUTED 107a91: c3 ret <== NOT EXECUTED =============================================================================== 0010a380 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 10a380: 55 push %ebp 10a381: 89 e5 mov %esp,%ebp 10a383: 53 push %ebx 10a384: 83 ec 0c sub $0xc,%esp 10a387: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 10a38a: a1 20 b2 12 00 mov 0x12b220,%eax 10a38f: ff 70 08 pushl 0x8(%eax) 10a392: 8d 43 0c lea 0xc(%ebx),%eax 10a395: 50 push %eax 10a396: e8 09 d6 00 00 call 1179a4 switch( the_jnode->type ) { 10a39b: 8b 43 4c mov 0x4c(%ebx),%eax 10a39e: 83 c4 10 add $0x10,%esp 10a3a1: 83 f8 07 cmp $0x7,%eax 10a3a4: 76 1e jbe 10a3c4 <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 10a3a6: 52 push %edx <== NOT EXECUTED 10a3a7: 50 push %eax <== NOT EXECUTED 10a3a8: 68 84 68 12 00 push $0x126884 <== NOT EXECUTED 10a3ad: a1 20 b2 12 00 mov 0x12b220,%eax <== NOT EXECUTED 10a3b2: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10a3b5: e8 de d4 00 00 call 117898 <== NOT EXECUTED return; 10a3ba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } puts(""); } 10a3bd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10a3c0: c9 leave <== NOT EXECUTED 10a3c1: c3 ret <== NOT EXECUTED 10a3c2: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 10a3c4: ff 24 85 9c 68 12 00 jmp *0x12689c(,%eax,4) 10a3cb: 90 nop <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 10a3cc: a1 20 b2 12 00 mov 0x12b220,%eax 10a3d1: ff 70 08 pushl 0x8(%eax) 10a3d4: 6a 13 push $0x13 10a3d6: 6a 01 push $0x1 10a3d8: 68 5d 68 12 00 push $0x12685d 10a3dd: e8 e2 e1 00 00 call 1185c4 return; 10a3e2: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 10a3e5: 8b 5d fc mov -0x4(%ebp),%ebx 10a3e8: c9 leave 10a3e9: c3 ret 10a3ea: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 10a3ec: a1 20 b2 12 00 mov 0x12b220,%eax 10a3f1: ff 70 08 pushl 0x8(%eax) 10a3f4: 6a 12 push $0x12 10a3f6: 6a 01 push $0x1 10a3f8: 68 71 68 12 00 push $0x126871 10a3fd: e8 c2 e1 00 00 call 1185c4 return; 10a402: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 10a405: 8b 5d fc mov -0x4(%ebp),%ebx 10a408: c9 leave 10a409: c3 ret 10a40a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 10a40c: 51 push %ecx 10a40d: ff 73 50 pushl 0x50(%ebx) 10a410: 68 51 68 12 00 push $0x126851 10a415: a1 20 b2 12 00 mov 0x12b220,%eax 10a41a: ff 70 08 pushl 0x8(%eax) 10a41d: e8 76 d4 00 00 call 117898 (uint32_t)the_jnode->info.file.size ); #endif break; 10a422: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a425: c7 45 08 89 6b 12 00 movl $0x126b89,0x8(%ebp) } 10a42c: 8b 5d fc mov -0x4(%ebp),%ebx 10a42f: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a430: e9 83 ed 00 00 jmp 1191b8 10a435: 8d 76 00 lea 0x0(%esi),%esi <== 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)", 10a438: ff 73 58 pushl 0x58(%ebx) 10a43b: ff 73 50 pushl 0x50(%ebx) 10a43e: 68 42 68 12 00 push $0x126842 10a443: a1 20 b2 12 00 mov 0x12b220,%eax 10a448: ff 70 08 pushl 0x8(%eax) 10a44b: e8 48 d4 00 00 call 117898 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 10a450: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a453: c7 45 08 89 6b 12 00 movl $0x126b89,0x8(%ebp) } 10a45a: 8b 5d fc mov -0x4(%ebp),%ebx 10a45d: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a45e: e9 55 ed 00 00 jmp 1191b8 10a463: 90 nop <== NOT EXECUTED IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 10a464: 83 ec 08 sub $0x8,%esp 10a467: a1 20 b2 12 00 mov 0x12b220,%eax 10a46c: ff 70 08 pushl 0x8(%eax) 10a46f: 6a 2f push $0x2f 10a471: e8 82 d4 00 00 call 1178f8 break; 10a476: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a479: c7 45 08 89 6b 12 00 movl $0x126b89,0x8(%ebp) } 10a480: 8b 5d fc mov -0x4(%ebp),%ebx 10a483: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a484: e9 2f ed 00 00 jmp 1191b8 10a489: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 10a48c: ff 73 54 pushl 0x54(%ebx) 10a48f: ff 73 50 pushl 0x50(%ebx) 10a492: 68 2f 68 12 00 push $0x12682f 10a497: a1 20 b2 12 00 mov 0x12b220,%eax 10a49c: ff 70 08 pushl 0x8(%eax) 10a49f: e8 f4 d3 00 00 call 117898 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 10a4a4: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a4a7: c7 45 08 89 6b 12 00 movl $0x126b89,0x8(%ebp) } 10a4ae: 8b 5d fc mov -0x4(%ebp),%ebx 10a4b1: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a4b2: e9 01 ed 00 00 jmp 1191b8 =============================================================================== 00107aa4 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107aa4: 55 push %ebp 107aa5: 89 e5 mov %esp,%ebp 107aa7: 57 push %edi 107aa8: 56 push %esi 107aa9: 53 push %ebx 107aaa: 8b 7d 0c mov 0xc(%ebp),%edi 107aad: 8b 5d 10 mov 0x10(%ebp),%ebx IMFS_jnode_t *node; int i; node = loc->node_access; 107ab0: 8b 45 08 mov 0x8(%ebp),%eax 107ab3: 8b 30 mov (%eax),%esi IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ab5: 85 db test %ebx,%ebx 107ab7: 74 28 je 107ae1 <== NEVER TAKEN 107ab9: 8b 46 50 mov 0x50(%esi),%eax 107abc: 8a 10 mov (%eax),%dl 107abe: 84 d2 test %dl,%dl 107ac0: 74 1f je 107ae1 <== NEVER TAKEN 107ac2: 31 c9 xor %ecx,%ecx 107ac4: 31 c0 xor %eax,%eax 107ac6: eb 0a jmp 107ad2 107ac8: 8b 56 50 mov 0x50(%esi),%edx 107acb: 8a 14 02 mov (%edx,%eax,1),%dl 107ace: 84 d2 test %dl,%dl 107ad0: 74 0a je 107adc buf[i] = node->info.sym_link.name[i]; 107ad2: 88 14 0f mov %dl,(%edi,%ecx,1) node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ad5: 40 inc %eax 107ad6: 89 c1 mov %eax,%ecx 107ad8: 39 d8 cmp %ebx,%eax 107ada: 72 ec jb 107ac8 buf[i] = node->info.sym_link.name[i]; return i; } 107adc: 5b pop %ebx 107add: 5e pop %esi 107ade: 5f pop %edi 107adf: c9 leave 107ae0: c3 ret node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ae1: 31 c0 xor %eax,%eax <== NOT EXECUTED 107ae3: eb f7 jmp 107adc <== NOT EXECUTED =============================================================================== 00107ae8 : 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 */ ) { 107ae8: 55 push %ebp 107ae9: 89 e5 mov %esp,%ebp 107aeb: 53 push %ebx 107aec: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 107aef: 8b 45 0c mov 0xc(%ebp),%eax 107af2: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 107af4: 6a 20 push $0x20 107af6: ff 75 14 pushl 0x14(%ebp) 107af9: 8d 43 0c lea 0xc(%ebx),%eax 107afc: 50 push %eax 107afd: e8 8a c5 00 00 call 11408c if ( the_jnode->Parent != NULL ) 107b02: 83 c4 10 add $0x10,%esp 107b05: 8b 4b 08 mov 0x8(%ebx),%ecx 107b08: 85 c9 test %ecx,%ecx 107b0a: 74 0c je 107b18 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 107b0c: 83 ec 0c sub $0xc,%esp 107b0f: 53 push %ebx 107b10: e8 bb 44 00 00 call 10bfd0 <_Chain_Extract> 107b15: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 107b18: 8b 45 10 mov 0x10(%ebp),%eax 107b1b: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 107b1d: 89 43 08 mov %eax,0x8(%ebx) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107b20: 83 ec 08 sub $0x8,%esp 107b23: 53 push %ebx rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); 107b24: 83 c0 50 add $0x50,%eax 107b27: 50 push %eax 107b28: e8 7f 44 00 00 call 10bfac <_Chain_Append> /* * Update the time. */ IMFS_update_ctime( the_jnode ); 107b2d: 58 pop %eax 107b2e: 5a pop %edx 107b2f: 6a 00 push $0x0 107b31: 8d 45 f0 lea -0x10(%ebp),%eax 107b34: 50 push %eax 107b35: e8 d6 05 00 00 call 108110 107b3a: 8b 45 f0 mov -0x10(%ebp),%eax 107b3d: 89 43 48 mov %eax,0x48(%ebx) return 0; } 107b40: 31 c0 xor %eax,%eax 107b42: 8b 5d fc mov -0x4(%ebp),%ebx 107b45: c9 leave 107b46: c3 ret =============================================================================== 0010fa0c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10fa0c: 55 push %ebp 10fa0d: 89 e5 mov %esp,%ebp 10fa0f: 56 push %esi 10fa10: 53 push %ebx 10fa11: 8b 4d 08 mov 0x8(%ebp),%ecx 10fa14: 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; 10fa17: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10fa19: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10fa1d: 76 15 jbe 10fa34 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10fa1f: e8 74 38 00 00 call 113298 <__errno> 10fa24: c7 00 86 00 00 00 movl $0x86,(%eax) 10fa2a: b8 ff ff ff ff mov $0xffffffff,%eax buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 10fa2f: 5b pop %ebx 10fa30: 5e pop %esi 10fa31: c9 leave 10fa32: c3 ret 10fa33: 90 nop <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 10fa34: 8b 5a 4c mov 0x4c(%edx),%ebx 10fa37: ff 24 9d 18 10 12 00 jmp *0x121018(,%ebx,4) 10fa3e: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10fa40: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) 10fa47: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 10fa4e: 8b 49 10 mov 0x10(%ecx),%ecx buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 10fa51: 8b 49 34 mov 0x34(%ecx),%ecx 10fa54: 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 = 10fa56: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10fa5c: 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; 10fa5f: 8b 4a 30 mov 0x30(%edx),%ecx 10fa62: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10fa65: 8b 4a 34 mov 0x34(%edx),%ecx 10fa68: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10fa6c: 8b 4a 38 mov 0x38(%edx),%ecx 10fa6f: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10fa72: 8b 4a 3c mov 0x3c(%edx),%ecx 10fa75: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10fa79: 66 8b 4a 3e mov 0x3e(%edx),%cx 10fa7d: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10fa81: 8b 4a 40 mov 0x40(%edx),%ecx 10fa84: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10fa87: 8b 4a 44 mov 0x44(%edx),%ecx 10fa8a: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10fa8d: 8b 52 48 mov 0x48(%edx),%edx 10fa90: 89 50 38 mov %edx,0x38(%eax) return 0; 10fa93: 31 c0 xor %eax,%eax } 10fa95: 5b pop %ebx 10fa96: 5e pop %esi 10fa97: c9 leave 10fa98: c3 ret 10fa99: 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 ); 10fa9c: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10fa9f: 8b 72 50 mov 0x50(%edx),%esi 10faa2: 89 70 18 mov %esi,0x18(%eax) 10faa5: 89 58 1c mov %ebx,0x1c(%eax) break; 10faa8: eb a4 jmp 10fa4e 10faaa: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10faac: 8b 5a 50 mov 0x50(%edx),%ebx 10faaf: 8b 72 54 mov 0x54(%edx),%esi 10fab2: 89 58 20 mov %ebx,0x20(%eax) 10fab5: 89 70 24 mov %esi,0x24(%eax) break; 10fab8: eb 94 jmp 10fa4e =============================================================================== 00107bdc : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107bdc: 55 push %ebp 107bdd: 89 e5 mov %esp,%ebp 107bdf: 57 push %edi 107be0: 56 push %esi 107be1: 53 push %ebx 107be2: 83 ec 3c sub $0x3c,%esp 107be5: 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; 107be8: 8b 13 mov (%ebx),%edx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 107bea: 83 7a 4c 03 cmpl $0x3,0x4c(%edx) 107bee: 74 18 je 107c08 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 107bf0: 83 ec 08 sub $0x8,%esp 107bf3: 8b 43 08 mov 0x8(%ebx),%eax 107bf6: 53 push %ebx 107bf7: ff 75 08 pushl 0x8(%ebp) 107bfa: ff 50 34 call *0x34(%eax) return result; 107bfd: 83 c4 10 add $0x10,%esp } 107c00: 8d 65 f4 lea -0xc(%ebp),%esp 107c03: 5b pop %ebx 107c04: 5e pop %esi 107c05: 5f pop %edi 107c06: c9 leave 107c07: c3 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 107c08: 8b 42 50 mov 0x50(%edx),%eax 107c0b: 85 c0 test %eax,%eax 107c0d: 74 79 je 107c88 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 107c0f: 8d 7d cc lea -0x34(%ebp),%edi 107c12: b9 05 00 00 00 mov $0x5,%ecx 107c17: 89 de mov %ebx,%esi 107c19: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 107c1b: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 107c1e: 83 ec 0c sub $0xc,%esp 107c21: 8d 75 cc lea -0x34(%ebp),%esi 107c24: 56 push %esi 107c25: 89 55 c4 mov %edx,-0x3c(%ebp) 107c28: e8 bb 73 00 00 call 10efe8 /* * 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) 107c2d: 8b 55 c4 mov -0x3c(%ebp),%edx 107c30: 8b 42 50 mov 0x50(%edx),%eax 107c33: 8b 48 34 mov 0x34(%eax),%ecx 107c36: 83 c4 10 add $0x10,%esp 107c39: 66 83 f9 01 cmp $0x1,%cx 107c3d: 74 27 je 107c66 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 107c3f: 49 dec %ecx 107c40: 66 89 48 34 mov %cx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 107c44: 83 ec 08 sub $0x8,%esp 107c47: 6a 00 push $0x0 107c49: 8d 45 e0 lea -0x20(%ebp),%eax 107c4c: 50 push %eax 107c4d: 89 55 c4 mov %edx,-0x3c(%ebp) 107c50: e8 bb 04 00 00 call 108110 107c55: 8b 55 c4 mov -0x3c(%ebp),%edx 107c58: 8b 42 50 mov 0x50(%edx),%eax 107c5b: 8b 55 e0 mov -0x20(%ebp),%edx 107c5e: 89 50 48 mov %edx,0x48(%eax) 107c61: 83 c4 10 add $0x10,%esp 107c64: eb 8a jmp 107bf0 * 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 ); 107c66: 83 ec 08 sub $0x8,%esp 107c69: 56 push %esi 107c6a: ff 75 08 pushl 0x8(%ebp) 107c6d: 8b 45 d4 mov -0x2c(%ebp),%eax 107c70: ff 50 34 call *0x34(%eax) if ( result != 0 ) 107c73: 83 c4 10 add $0x10,%esp 107c76: 85 c0 test %eax,%eax 107c78: 0f 84 72 ff ff ff je 107bf0 return -1; 107c7e: b8 ff ff ff ff mov $0xffffffff,%eax 107c83: e9 78 ff ff ff jmp 107c00 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 107c88: e8 0b b6 00 00 call 113298 <__errno> <== NOT EXECUTED 107c8d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107c93: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107c98: e9 63 ff ff ff jmp 107c00 <== NOT EXECUTED =============================================================================== 00107ca0 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107ca0: 55 push %ebp 107ca1: 89 e5 mov %esp,%ebp 107ca3: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107ca6: 8b 45 08 mov 0x8(%ebp),%eax 107ca9: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107cac: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107cb0: 75 12 jne 107cc4 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 107cb2: 8b 50 5c mov 0x5c(%eax),%edx 107cb5: 85 d2 test %edx,%edx 107cb7: 74 1d je 107cd6 <== NEVER 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; 107cb9: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) return 0; 107cc0: 31 c0 xor %eax,%eax } 107cc2: c9 leave 107cc3: 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 ); 107cc4: e8 cf b5 00 00 call 113298 <__errno> <== NOT EXECUTED 107cc9: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107ccf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 107cd4: c9 leave <== NOT EXECUTED 107cd5: 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 */ 107cd6: e8 bd b5 00 00 call 113298 <__errno> <== NOT EXECUTED 107cdb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107ce1: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 107ce6: c9 leave <== NOT EXECUTED 107ce7: c3 ret <== NOT EXECUTED =============================================================================== 001082bc : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 1082bc: 55 push %ebp 1082bd: 89 e5 mov %esp,%ebp 1082bf: 57 push %edi 1082c0: 56 push %esi 1082c1: 53 push %ebx 1082c2: 83 ec 0c sub $0xc,%esp 1082c5: 8b 5d 08 mov 0x8(%ebp),%ebx 1082c8: 8b 75 0c mov 0xc(%ebp),%esi 1082cb: 8b 7d 10 mov 0x10(%ebp),%edi /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1082ce: a1 28 47 12 00 mov 0x124728,%eax 1082d3: 85 c0 test %eax,%eax 1082d5: 74 02 je 1082d9 (*rtems_malloc_statistics_helpers->initialize)(); 1082d7: ff 10 call *(%eax) } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1082d9: e8 76 ff ff ff call 108254 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1082de: a1 2c 47 12 00 mov 0x12472c,%eax 1082e3: 85 c0 test %eax,%eax 1082e5: 74 0e je 1082f5 heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1082e7: 83 ec 08 sub $0x8,%esp 1082ea: 57 push %edi 1082eb: 53 push %ebx 1082ec: ff 10 call *(%eax) 1082ee: 89 c3 mov %eax,%ebx 1082f0: 83 c4 10 add $0x10,%esp heap_begin, sbrk_amount ); heap_size = (uintptr_t) sbrk_amount; 1082f3: 89 fe mov %edi,%esi * 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 ( 1082f5: 80 3d 24 47 12 00 00 cmpb $0x0,0x124724 1082fc: 75 1f jne 10831d !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1082fe: 80 3d 48 22 12 00 00 cmpb $0x0,0x122248 108305: 75 41 jne 108348 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 108307: 6a 04 push $0x4 108309: 56 push %esi 10830a: 53 push %ebx 10830b: ff 35 58 21 12 00 pushl 0x122158 108311: e8 b2 43 00 00 call 10c6c8 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 108316: 83 c4 10 add $0x10,%esp 108319: 85 c0 test %eax,%eax 10831b: 74 3e je 10835b rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 10831d: 8b 1d 80 63 12 00 mov 0x126380,%ebx 108323: 83 ec 0c sub $0xc,%esp 108326: ff 35 58 21 12 00 pushl 0x122158 10832c: e8 1b 4e 00 00 call 10d14c <_Protected_heap_Get_size> 108331: 8d 1c 18 lea (%eax,%ebx,1),%ebx 108334: 89 1d 80 63 12 00 mov %ebx,0x126380 10833a: 83 c4 10 add $0x10,%esp } 10833d: 8d 65 f4 lea -0xc(%ebp),%esp 108340: 5b pop %ebx 108341: 5e pop %esi 108342: 5f pop %edi 108343: c9 leave 108344: c3 ret 108345: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 108348: 31 c0 xor %eax,%eax 10834a: 89 df mov %ebx,%edi 10834c: 89 f1 mov %esi,%ecx 10834e: 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 ) { 108350: 80 3d 24 47 12 00 00 cmpb $0x0,0x124724 108357: 74 ae je 108307 <== ALWAYS TAKEN 108359: eb c2 jmp 10831d <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 10835b: 83 ec 0c sub $0xc,%esp 10835e: 6a 1a push $0x1a 108360: e8 6b 39 00 00 call 10bcd0 =============================================================================== 00107bf0 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 107bf0: 55 push %ebp <== NOT EXECUTED 107bf1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107bf3: 57 push %edi <== NOT EXECUTED 107bf4: 56 push %esi <== NOT EXECUTED 107bf5: 53 push %ebx <== NOT EXECUTED 107bf6: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 107bf9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 107bfc: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 107bff: 0f 84 37 01 00 00 je 107d3c <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 107c05: 8d b3 c4 00 00 00 lea 0xc4(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 107c0b: 8b 83 d8 00 00 00 mov 0xd8(%ebx),%eax <== NOT EXECUTED 107c11: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 107c14: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 107c1a: 8d 51 10 lea 0x10(%ecx),%edx <== NOT EXECUTED 107c1d: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 107c20: 8b 3e mov (%esi),%edi <== NOT EXECUTED 107c22: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 107c25: 8d 41 20 lea 0x20(%ecx),%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 107c28: 89 fa mov %edi,%edx <== NOT EXECUTED 107c2a: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 107c2d: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 107c30: 39 d0 cmp %edx,%eax <== NOT EXECUTED 107c32: 73 23 jae 107c57 <== NOT EXECUTED if (*base != U32_PATTERN) 107c34: 81 79 20 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x20(%ecx) <== NOT EXECUTED 107c3b: 74 13 je 107c50 <== NOT EXECUTED 107c3d: e9 a2 00 00 00 jmp 107ce4 <== NOT EXECUTED 107c42: 66 90 xchg %ax,%ax <== NOT EXECUTED 107c44: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 107c4a: 0f 85 94 00 00 00 jne 107ce4 <== 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++) 107c50: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 107c53: 39 c2 cmp %eax,%edx <== NOT EXECUTED 107c55: 77 ed ja 107c44 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; 107c57: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 107c5e: 85 db test %ebx,%ebx <== NOT EXECUTED 107c60: 0f 84 98 00 00 00 je 107cfe <== NOT EXECUTED #endif { (*print_handler)( 107c66: a1 04 9a 12 00 mov 0x129a04,%eax <== NOT EXECUTED 107c6b: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 107c6e: 50 push %eax <== NOT EXECUTED 107c6f: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 107c72: 50 push %eax <== NOT EXECUTED 107c73: 6a 05 push $0x5 <== NOT EXECUTED 107c75: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107c78: e8 d3 5b 00 00 call 10d850 <== NOT EXECUTED 107c7d: 50 push %eax <== NOT EXECUTED 107c7e: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107c81: 68 13 32 12 00 push $0x123213 <== NOT EXECUTED 107c86: ff 35 00 9a 12 00 pushl 0x129a00 <== NOT EXECUTED 107c8c: ff 55 cc call *-0x34(%ebp) <== NOT EXECUTED 107c8f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 107c92: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 107c95: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107c98: 57 push %edi <== NOT EXECUTED 107c99: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 107c9c: 8b 16 mov (%esi),%edx <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 107c9e: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 107ca2: 52 push %edx <== NOT EXECUTED 107ca3: 50 push %eax <== NOT EXECUTED 107ca4: 68 2e 32 12 00 push $0x12322e <== NOT EXECUTED 107ca9: ff 35 00 9a 12 00 pushl 0x129a00 <== NOT EXECUTED 107caf: ff 15 04 9a 12 00 call *0x129a04 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 107cb5: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107cb8: 8b 15 08 9a 12 00 mov 0x129a08,%edx <== NOT EXECUTED 107cbe: 85 d2 test %edx,%edx <== NOT EXECUTED 107cc0: 74 5a je 107d1c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 107cc2: 50 push %eax <== NOT EXECUTED 107cc3: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 107cc6: 68 59 32 12 00 push $0x123259 <== NOT EXECUTED 107ccb: ff 35 00 9a 12 00 pushl 0x129a00 <== NOT EXECUTED 107cd1: ff 15 04 9a 12 00 call *0x129a04 <== NOT EXECUTED 107cd7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 107cda: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107cdd: 5b pop %ebx <== NOT EXECUTED 107cde: 5e pop %esi <== NOT EXECUTED 107cdf: 5f pop %edi <== NOT EXECUTED 107ce0: c9 leave <== NOT EXECUTED 107ce1: c3 ret <== NOT EXECUTED 107ce2: 66 90 xchg %ax,%ax <== 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 ) 107ce4: 85 c0 test %eax,%eax <== NOT EXECUTED 107ce6: 0f 84 6b ff ff ff je 107c57 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 107cec: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 107cef: 01 fa add %edi,%edx <== NOT EXECUTED 107cf1: 29 c2 sub %eax,%edx <== NOT EXECUTED 107cf3: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 107cf6: 85 db test %ebx,%ebx <== NOT EXECUTED 107cf8: 0f 85 68 ff ff ff jne 107c66 <== NOT EXECUTED rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 107cfe: 51 push %ecx <== NOT EXECUTED 107cff: 6a ff push $0xffffffff <== NOT EXECUTED 107d01: 68 20 32 12 00 push $0x123220 <== NOT EXECUTED 107d06: ff 35 00 9a 12 00 pushl 0x129a00 <== NOT EXECUTED 107d0c: ff 15 04 9a 12 00 call *0x129a04 <== NOT EXECUTED 107d12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d15: e9 78 ff ff ff jmp 107c92 <== NOT EXECUTED 107d1a: 66 90 xchg %ax,%ax <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 107d1c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107d1f: 68 4c 32 12 00 push $0x12324c <== NOT EXECUTED 107d24: ff 35 00 9a 12 00 pushl 0x129a00 <== NOT EXECUTED 107d2a: ff 15 04 9a 12 00 call *0x129a04 <== NOT EXECUTED 107d30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 107d33: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107d36: 5b pop %ebx <== NOT EXECUTED 107d37: 5e pop %esi <== NOT EXECUTED 107d38: 5f pop %edi <== NOT EXECUTED 107d39: c9 leave <== NOT EXECUTED 107d3a: c3 ret <== NOT EXECUTED 107d3b: 90 nop <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 107d3c: 8b 0d 74 9d 12 00 mov 0x129d74,%ecx <== NOT EXECUTED 107d42: 85 c9 test %ecx,%ecx <== NOT EXECUTED 107d44: 74 94 je 107cda <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 107d46: be 70 9d 12 00 mov $0x129d70,%esi <== NOT EXECUTED the_thread = 0; current = 0; 107d4b: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) return; stack = &Stack_check_Interrupt_stack; the_thread = 0; 107d52: 31 db xor %ebx,%ebx <== NOT EXECUTED 107d54: e9 c1 fe ff ff jmp 107c1a <== NOT EXECUTED =============================================================================== 00107d5c : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 107d5c: 55 push %ebp 107d5d: 89 e5 mov %esp,%ebp 107d5f: 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 ) 107d60: 8b 15 08 9a 12 00 mov 0x129a08,%edx 107d66: 85 d2 test %edx,%edx 107d68: 75 5a jne 107dc4 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 107d6a: c7 05 60 9d 12 00 0d movl $0xfeedf00d,0x129d60 107d71: f0 ed fe 107d74: c7 05 64 9d 12 00 06 movl $0xbad0d06,0x129d64 107d7b: 0d ad 0b 107d7e: c7 05 68 9d 12 00 0d movl $0xdeadf00d,0x129d68 107d85: f0 ad de 107d88: c7 05 6c 9d 12 00 06 movl $0x600d0d06,0x129d6c 107d8f: 0d 0d 60 /* * 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) { 107d92: 8b 15 2c a5 12 00 mov 0x12a52c,%edx 107d98: 85 d2 test %edx,%edx 107d9a: 74 1e je 107dba <== NEVER TAKEN 107d9c: 8b 0d 30 a5 12 00 mov 0x12a530,%ecx 107da2: 85 c9 test %ecx,%ecx 107da4: 74 14 je 107dba <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 107da6: 89 15 74 9d 12 00 mov %edx,0x129d74 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 107dac: 29 d1 sub %edx,%ecx 107dae: 89 0d 70 9d 12 00 mov %ecx,0x129d70 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 107db4: b0 a5 mov $0xa5,%al 107db6: 89 d7 mov %edx,%edi 107db8: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 107dba: c7 05 08 9a 12 00 01 movl $0x1,0x129a08 107dc1: 00 00 00 } 107dc4: 5f pop %edi 107dc5: c9 leave 107dc6: c3 ret =============================================================================== 00107e18 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 107e18: 55 push %ebp <== NOT EXECUTED 107e19: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e1b: 56 push %esi <== NOT EXECUTED 107e1c: 53 push %ebx <== NOT EXECUTED 107e1d: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 107e20: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 107e23: 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); 107e26: 8b b3 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 107e2c: 68 5f 32 12 00 push $0x12325f <== NOT EXECUTED 107e31: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 107e34: e8 1f 1a 00 00 call 109858 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 107e39: 5a pop %edx <== NOT EXECUTED 107e3a: 59 pop %ecx <== NOT EXECUTED 107e3b: 53 push %ebx <== NOT EXECUTED 107e3c: 68 6f 32 12 00 push $0x12326f <== NOT EXECUTED 107e41: e8 12 1a 00 00 call 109858 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 107e46: 59 pop %ecx <== NOT EXECUTED 107e47: 58 pop %eax <== NOT EXECUTED 107e48: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107e4b: 68 8c 32 12 00 push $0x12328c <== NOT EXECUTED 107e50: e8 03 1a 00 00 call 109858 <== NOT EXECUTED printk( 107e55: 58 pop %eax <== NOT EXECUTED 107e56: 5a pop %edx <== NOT EXECUTED 107e57: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 107e5a: 68 9e 32 12 00 push $0x12329e <== NOT EXECUTED 107e5f: e8 f4 19 00 00 call 109858 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 107e64: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 107e67: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 107e6a: 50 push %eax <== NOT EXECUTED 107e6b: 6a 20 push $0x20 <== NOT EXECUTED 107e6d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107e70: e8 db 59 00 00 call 10d850 <== NOT EXECUTED 107e75: 5a pop %edx <== NOT EXECUTED 107e76: 59 pop %ecx <== NOT EXECUTED 107e77: 50 push %eax <== NOT EXECUTED 107e78: 68 b2 32 12 00 push $0x1232b2 <== NOT EXECUTED 107e7d: e8 d6 19 00 00 call 109858 <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 107e82: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED 107e88: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 107e8e: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 107e91: 53 push %ebx <== NOT EXECUTED 107e92: 51 push %ecx <== NOT EXECUTED 107e93: 50 push %eax <== NOT EXECUTED 107e94: 68 e0 32 12 00 push $0x1232e0 <== NOT EXECUTED 107e99: e8 ba 19 00 00 call 109858 <== 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) { 107e9e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107ea1: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 107ea4: 84 d2 test %dl,%dl <== NOT EXECUTED 107ea6: 74 10 je 107eb8 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 107ea8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107eab: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 107eb0: e8 a7 61 00 00 call 10e05c <== NOT EXECUTED 107eb5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 107eb8: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 107ebb: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 107ebe: 56 push %esi <== NOT EXECUTED 107ebf: 50 push %eax <== NOT EXECUTED 107ec0: 6a 10 push $0x10 <== NOT EXECUTED 107ec2: 68 14 33 12 00 push $0x123314 <== NOT EXECUTED 107ec7: e8 8c 19 00 00 call 109858 <== NOT EXECUTED 107ecc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ecf: eb d7 jmp 107ea8 <== NOT EXECUTED =============================================================================== 0010be78 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10be78: 55 push %ebp 10be79: 89 e5 mov %esp,%ebp 10be7b: 53 push %ebx 10be7c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10be7f: 8b 1d 18 67 12 00 mov 0x126718,%ebx 10be85: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10be8b: 74 10 je 10be9d <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10be8d: 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)(); 10be90: 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 ) { 10be93: 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 ; 10be95: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10be9b: 75 f3 jne 10be90 <_API_extensions_Run_postdriver+0x18> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10be9d: 58 pop %eax 10be9e: 5b pop %ebx 10be9f: c9 leave 10bea0: c3 ret =============================================================================== 0010bea4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10bea4: 55 push %ebp 10bea5: 89 e5 mov %esp,%ebp 10bea7: 53 push %ebx 10bea8: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10beab: 8b 1d 18 67 12 00 mov 0x126718,%ebx 10beb1: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10beb7: 74 1c je 10bed5 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10beb9: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 10bebc: 83 ec 0c sub $0xc,%esp 10bebf: ff 35 98 6a 12 00 pushl 0x126a98 10bec5: 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 ) { 10bec8: 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 ; 10beca: 83 c4 10 add $0x10,%esp 10becd: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10bed3: 75 e7 jne 10bebc <_API_extensions_Run_postswitch+0x18> the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10bed5: 8b 5d fc mov -0x4(%ebp),%ebx 10bed8: c9 leave 10bed9: c3 ret =============================================================================== 0010e1f4 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e1f4: 55 push %ebp 10e1f5: 89 e5 mov %esp,%ebp 10e1f7: 57 push %edi 10e1f8: 56 push %esi 10e1f9: 53 push %ebx 10e1fa: 83 ec 1c sub $0x1c,%esp 10e1fd: 8b 5d 08 mov 0x8(%ebp),%ebx 10e200: 8b 7d 0c mov 0xc(%ebp),%edi 10e203: 8b 4d 14 mov 0x14(%ebp),%ecx 10e206: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e209: 8b 35 98 a6 12 00 mov 0x12a698,%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 ); 10e20f: 9c pushf 10e210: fa cli 10e211: 8f 45 e4 popl -0x1c(%ebp) switch ( the_rwlock->current_state ) { 10e214: 8b 43 44 mov 0x44(%ebx),%eax 10e217: 85 c0 test %eax,%eax 10e219: 75 1d jne 10e238 <_CORE_RWLock_Obtain_for_reading+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e21b: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10e222: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e225: ff 75 e4 pushl -0x1c(%ebp) 10e228: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e229: 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 */ } 10e230: 8d 65 f4 lea -0xc(%ebp),%esp 10e233: 5b pop %ebx 10e234: 5e pop %esi 10e235: 5f pop %edi 10e236: c9 leave 10e237: 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 ) { 10e238: 48 dec %eax 10e239: 74 51 je 10e28c <_CORE_RWLock_Obtain_for_reading+0x98> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e23b: 84 d2 test %dl,%dl 10e23d: 75 15 jne 10e254 <_CORE_RWLock_Obtain_for_reading+0x60> _ISR_Enable( level ); 10e23f: ff 75 e4 pushl -0x1c(%ebp) 10e242: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e243: 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 */ } 10e24a: 8d 65 f4 lea -0xc(%ebp),%esp 10e24d: 5b pop %ebx 10e24e: 5e pop %esi 10e24f: 5f pop %edi 10e250: c9 leave 10e251: c3 ret 10e252: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e254: 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; 10e25b: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10e25e: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10e261: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e268: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10e26f: ff 75 e4 pushl -0x1c(%ebp) 10e272: 9d popf _Thread_queue_Enqueue_with_handler( 10e273: c7 45 10 f8 e3 10 00 movl $0x10e3f8,0x10(%ebp) 10e27a: 89 4d 0c mov %ecx,0xc(%ebp) 10e27d: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e280: 8d 65 f4 lea -0xc(%ebp),%esp 10e283: 5b pop %ebx 10e284: 5e pop %esi 10e285: 5f pop %edi 10e286: 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( 10e287: e9 84 19 00 00 jmp 10fc10 <_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 ); 10e28c: 83 ec 0c sub $0xc,%esp 10e28f: 53 push %ebx 10e290: 88 55 e0 mov %dl,-0x20(%ebp) 10e293: 89 4d dc mov %ecx,-0x24(%ebp) 10e296: e8 bd 1c 00 00 call 10ff58 <_Thread_queue_First> if ( !waiter ) { 10e29b: 83 c4 10 add $0x10,%esp 10e29e: 85 c0 test %eax,%eax 10e2a0: 8a 55 e0 mov -0x20(%ebp),%dl 10e2a3: 8b 4d dc mov -0x24(%ebp),%ecx 10e2a6: 75 93 jne 10e23b <_CORE_RWLock_Obtain_for_reading+0x47><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10e2a8: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e2ab: ff 75 e4 pushl -0x1c(%ebp) 10e2ae: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e2af: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10e2b6: e9 75 ff ff ff jmp 10e230 <_CORE_RWLock_Obtain_for_reading+0x3c> =============================================================================== 0010e2bc <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e2bc: 55 push %ebp 10e2bd: 89 e5 mov %esp,%ebp 10e2bf: 57 push %edi 10e2c0: 56 push %esi 10e2c1: 53 push %ebx 10e2c2: 83 ec 0c sub $0xc,%esp 10e2c5: 8b 45 08 mov 0x8(%ebp),%eax 10e2c8: 8b 7d 0c mov 0xc(%ebp),%edi 10e2cb: 8b 75 14 mov 0x14(%ebp),%esi 10e2ce: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e2d1: 8b 15 98 a6 12 00 mov 0x12a698,%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 ); 10e2d7: 9c pushf 10e2d8: fa cli 10e2d9: 59 pop %ecx switch ( the_rwlock->current_state ) { 10e2da: 83 78 44 00 cmpl $0x0,0x44(%eax) 10e2de: 75 18 jne 10e2f8 <_CORE_RWLock_Obtain_for_writing+0x3c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e2e0: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10e2e7: 51 push %ecx 10e2e8: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e2e9: 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 */ } 10e2f0: 83 c4 0c add $0xc,%esp 10e2f3: 5b pop %ebx 10e2f4: 5e pop %esi 10e2f5: 5f pop %edi 10e2f6: c9 leave 10e2f7: c3 ret /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e2f8: 84 db test %bl,%bl 10e2fa: 75 14 jne 10e310 <_CORE_RWLock_Obtain_for_writing+0x54> _ISR_Enable( level ); 10e2fc: 51 push %ecx 10e2fd: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e2fe: 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 */ } 10e305: 83 c4 0c add $0xc,%esp 10e308: 5b pop %ebx 10e309: 5e pop %esi 10e30a: 5f pop %edi 10e30b: c9 leave 10e30c: c3 ret 10e30d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10e310: 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; 10e317: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10e31a: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10e31d: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e324: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10e32b: 51 push %ecx 10e32c: 9d popf _Thread_queue_Enqueue_with_handler( 10e32d: c7 45 10 f8 e3 10 00 movl $0x10e3f8,0x10(%ebp) 10e334: 89 75 0c mov %esi,0xc(%ebp) 10e337: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e33a: 83 c4 0c add $0xc,%esp 10e33d: 5b pop %ebx 10e33e: 5e pop %esi 10e33f: 5f pop %edi 10e340: 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( 10e341: e9 ca 18 00 00 jmp 10fc10 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010e348 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10e348: 55 push %ebp 10e349: 89 e5 mov %esp,%ebp 10e34b: 53 push %ebx 10e34c: 83 ec 04 sub $0x4,%esp 10e34f: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e352: 8b 0d 98 a6 12 00 mov 0x12a698,%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 ); 10e358: 9c pushf 10e359: fa cli 10e35a: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10e35b: 8b 43 44 mov 0x44(%ebx),%eax 10e35e: 85 c0 test %eax,%eax 10e360: 74 7a je 10e3dc <_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 ) { 10e362: 48 dec %eax 10e363: 74 63 je 10e3c8 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e365: 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; 10e36c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10e373: 52 push %edx 10e374: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10e375: 83 ec 0c sub $0xc,%esp 10e378: 53 push %ebx 10e379: e8 6e 17 00 00 call 10faec <_Thread_queue_Dequeue> if ( next ) { 10e37e: 83 c4 10 add $0x10,%esp 10e381: 85 c0 test %eax,%eax 10e383: 74 39 je 10e3be <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10e385: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e389: 74 61 je 10e3ec <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10e38b: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e38e: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10e395: eb 17 jmp 10e3ae <_CORE_RWLock_Release+0x66> 10e397: 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 || 10e398: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e39c: 74 20 je 10e3be <_CORE_RWLock_Release+0x76><== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10e39e: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10e3a1: 83 ec 08 sub $0x8,%esp 10e3a4: 50 push %eax 10e3a5: 53 push %ebx 10e3a6: e8 99 1a 00 00 call 10fe44 <_Thread_queue_Extract> } 10e3ab: 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 ); 10e3ae: 83 ec 0c sub $0xc,%esp 10e3b1: 53 push %ebx 10e3b2: e8 a1 1b 00 00 call 10ff58 <_Thread_queue_First> if ( !next || 10e3b7: 83 c4 10 add $0x10,%esp 10e3ba: 85 c0 test %eax,%eax 10e3bc: 75 da jne 10e398 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e3be: 31 c0 xor %eax,%eax 10e3c0: 8b 5d fc mov -0x4(%ebp),%ebx 10e3c3: c9 leave 10e3c4: c3 ret 10e3c5: 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; 10e3c8: 8b 43 48 mov 0x48(%ebx),%eax 10e3cb: 48 dec %eax 10e3cc: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10e3cf: 85 c0 test %eax,%eax 10e3d1: 74 92 je 10e365 <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10e3d3: 52 push %edx 10e3d4: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e3d5: 31 c0 xor %eax,%eax 10e3d7: 8b 5d fc mov -0x4(%ebp),%ebx 10e3da: c9 leave 10e3db: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10e3dc: 52 push %edx 10e3dd: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e3de: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e3e5: 31 c0 xor %eax,%eax 10e3e7: 8b 5d fc mov -0x4(%ebp),%ebx 10e3ea: c9 leave 10e3eb: 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; 10e3ec: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10e3f3: eb c9 jmp 10e3be <_CORE_RWLock_Release+0x76> =============================================================================== 0010e3f8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10e3f8: 55 push %ebp 10e3f9: 89 e5 mov %esp,%ebp 10e3fb: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e3fe: 8d 45 f4 lea -0xc(%ebp),%eax 10e401: 50 push %eax 10e402: ff 75 08 pushl 0x8(%ebp) 10e405: e8 42 13 00 00 call 10f74c <_Thread_Get> switch ( location ) { 10e40a: 83 c4 10 add $0x10,%esp 10e40d: 8b 55 f4 mov -0xc(%ebp),%edx 10e410: 85 d2 test %edx,%edx 10e412: 75 17 jne 10e42b <_CORE_RWLock_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10e414: 83 ec 0c sub $0xc,%esp 10e417: 50 push %eax 10e418: e8 1b 1c 00 00 call 110038 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e41d: a1 d4 a0 12 00 mov 0x12a0d4,%eax 10e422: 48 dec %eax 10e423: a3 d4 a0 12 00 mov %eax,0x12a0d4 10e428: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e42b: c9 leave 10e42c: c3 ret =============================================================================== 0010d0dc <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 10d0dc: 55 push %ebp 10d0dd: 89 e5 mov %esp,%ebp 10d0df: 57 push %edi 10d0e0: 56 push %esi 10d0e1: 53 push %ebx 10d0e2: 83 ec 1c sub $0x1c,%esp 10d0e5: 8b 45 08 mov 0x8(%ebp),%eax 10d0e8: 8b 5d 0c mov 0xc(%ebp),%ebx 10d0eb: 8b 75 14 mov 0x14(%ebp),%esi 10d0ee: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 10d0f1: 8b 15 b8 91 12 00 mov 0x1291b8,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 10d0f7: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 10d0fe: 9c pushf 10d0ff: fa cli 10d100: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 10d103: 8b 48 48 mov 0x48(%eax),%ecx 10d106: 41 inc %ecx 10d107: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 10d10a: 83 78 40 00 cmpl $0x0,0x40(%eax) 10d10e: 75 05 jne 10d115 <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == 10d110: 3b 48 44 cmp 0x44(%eax),%ecx 10d113: 74 2b je 10d140 <_CORE_barrier_Wait+0x64> 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; 10d115: 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; 10d11c: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10d11f: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 10d122: ff 75 e4 pushl -0x1c(%ebp) 10d125: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 10d126: c7 45 10 34 f0 10 00 movl $0x10f034,0x10(%ebp) 10d12d: 89 75 0c mov %esi,0xc(%ebp) 10d130: 89 45 08 mov %eax,0x8(%ebp) } 10d133: 83 c4 1c add $0x1c,%esp 10d136: 5b pop %ebx 10d137: 5e pop %esi 10d138: 5f pop %edi 10d139: 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 ); 10d13a: e9 a5 1b 00 00 jmp 10ece4 <_Thread_queue_Enqueue_with_handler> 10d13f: 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; 10d140: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 10d147: ff 75 e4 pushl -0x1c(%ebp) 10d14a: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10d14b: 89 7d 10 mov %edi,0x10(%ebp) 10d14e: 89 5d 0c mov %ebx,0xc(%ebp) 10d151: 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 ); } 10d154: 83 c4 1c add $0x1c,%esp 10d157: 5b pop %ebx 10d158: 5e pop %esi 10d159: 5f pop %edi 10d15a: 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 ); 10d15b: e9 94 4f 00 00 jmp 1120f4 <_CORE_barrier_Release> =============================================================================== 00119884 <_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 ) { 119884: 55 push %ebp 119885: 89 e5 mov %esp,%ebp 119887: 57 push %edi 119888: 56 push %esi 119889: 53 push %ebx 11988a: 83 ec 1c sub $0x1c,%esp 11988d: 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 ) { 119890: 8b 45 10 mov 0x10(%ebp),%eax 119893: 39 43 4c cmp %eax,0x4c(%ebx) 119896: 72 60 jb 1198f8 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 119898: 8b 43 48 mov 0x48(%ebx),%eax 11989b: 85 c0 test %eax,%eax 11989d: 75 45 jne 1198e4 <_CORE_message_queue_Broadcast+0x60> 11989f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1198a6: eb 18 jmp 1198c0 <_CORE_message_queue_Broadcast+0x3c> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 1198a8: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1198ab: 8b 42 2c mov 0x2c(%edx),%eax 1198ae: 89 c7 mov %eax,%edi 1198b0: 8b 75 0c mov 0xc(%ebp),%esi 1198b3: 8b 4d 10 mov 0x10(%ebp),%ecx 1198b6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1198b8: 8b 42 28 mov 0x28(%edx),%eax 1198bb: 8b 55 10 mov 0x10(%ebp),%edx 1198be: 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 = 1198c0: 83 ec 0c sub $0xc,%esp 1198c3: 53 push %ebx 1198c4: e8 0b 26 00 00 call 11bed4 <_Thread_queue_Dequeue> 1198c9: 89 c2 mov %eax,%edx 1198cb: 83 c4 10 add $0x10,%esp 1198ce: 85 c0 test %eax,%eax 1198d0: 75 d6 jne 1198a8 <_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; 1198d2: 8b 55 e4 mov -0x1c(%ebp),%edx 1198d5: 8b 45 1c mov 0x1c(%ebp),%eax 1198d8: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1198da: 31 c0 xor %eax,%eax } 1198dc: 8d 65 f4 lea -0xc(%ebp),%esp 1198df: 5b pop %ebx 1198e0: 5e pop %esi 1198e1: 5f pop %edi 1198e2: c9 leave 1198e3: 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; 1198e4: 8b 55 1c mov 0x1c(%ebp),%edx 1198e7: c7 02 00 00 00 00 movl $0x0,(%edx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1198ed: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1198ef: 8d 65 f4 lea -0xc(%ebp),%esp 1198f2: 5b pop %ebx 1198f3: 5e pop %esi 1198f4: 5f pop %edi 1198f5: c9 leave 1198f6: c3 ret 1198f7: 90 nop <== NOT EXECUTED Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 1198f8: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1198fd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 119900: 5b pop %ebx <== NOT EXECUTED 119901: 5e pop %esi <== NOT EXECUTED 119902: 5f pop %edi <== NOT EXECUTED 119903: c9 leave <== NOT EXECUTED 119904: c3 ret <== NOT EXECUTED =============================================================================== 001149dc <_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 ) { 1149dc: 55 push %ebp 1149dd: 89 e5 mov %esp,%ebp 1149df: 57 push %edi 1149e0: 56 push %esi 1149e1: 53 push %ebx 1149e2: 83 ec 0c sub $0xc,%esp 1149e5: 8b 5d 08 mov 0x8(%ebp),%ebx 1149e8: 8b 75 10 mov 0x10(%ebp),%esi 1149eb: 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; 1149ee: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1149f1: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1149f8: 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; 1149fb: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 114a02: 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)) { 114a09: a8 03 test $0x3,%al 114a0b: 74 17 je 114a24 <_CORE_message_queue_Initialize+0x48> allocated_message_size += sizeof(uint32_t); 114a0d: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114a10: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114a13: 39 d0 cmp %edx,%eax 114a15: 76 0f jbe 114a26 <_CORE_message_queue_Initialize+0x4a><== ALWAYS TAKEN */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) return false; 114a17: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 114a19: 8d 65 f4 lea -0xc(%ebp),%esp 114a1c: 5b pop %ebx 114a1d: 5e pop %esi 114a1e: 5f pop %edi 114a1f: c9 leave 114a20: c3 ret 114a21: 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)) { 114a24: 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)); 114a26: 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 * 114a29: 89 f8 mov %edi,%eax 114a2b: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114a2e: 39 d0 cmp %edx,%eax 114a30: 72 e5 jb 114a17 <_CORE_message_queue_Initialize+0x3b><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 114a32: 83 ec 0c sub $0xc,%esp 114a35: 50 push %eax 114a36: e8 75 2a 00 00 call 1174b0 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114a3b: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114a3e: 83 c4 10 add $0x10,%esp 114a41: 85 c0 test %eax,%eax 114a43: 74 d2 je 114a17 <_CORE_message_queue_Initialize+0x3b> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114a45: 57 push %edi 114a46: 56 push %esi 114a47: 50 push %eax 114a48: 8d 43 68 lea 0x68(%ebx),%eax 114a4b: 50 push %eax 114a4c: e8 63 51 00 00 call 119bb4 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114a51: 8d 43 54 lea 0x54(%ebx),%eax 114a54: 89 43 50 mov %eax,0x50(%ebx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 114a57: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); 114a5e: 8d 43 50 lea 0x50(%ebx),%eax 114a61: 89 43 58 mov %eax,0x58(%ebx) _Thread_queue_Initialize( 114a64: 6a 06 push $0x6 114a66: 68 80 00 00 00 push $0x80 114a6b: 8b 45 0c mov 0xc(%ebp),%eax 114a6e: 83 38 01 cmpl $0x1,(%eax) 114a71: 0f 94 c0 sete %al 114a74: 0f b6 c0 movzbl %al,%eax 114a77: 50 push %eax 114a78: 53 push %ebx 114a79: e8 ca 1f 00 00 call 116a48 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114a7e: 83 c4 20 add $0x20,%esp 114a81: b0 01 mov $0x1,%al } 114a83: 8d 65 f4 lea -0xc(%ebp),%esp 114a86: 5b pop %ebx 114a87: 5e pop %esi 114a88: 5f pop %edi 114a89: c9 leave 114a8a: c3 ret =============================================================================== 00110fd0 <_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 ) { 110fd0: 55 push %ebp 110fd1: 89 e5 mov %esp,%ebp 110fd3: 56 push %esi 110fd4: 53 push %ebx 110fd5: 83 ec 10 sub $0x10,%esp 110fd8: 8b 45 08 mov 0x8(%ebp),%eax 110fdb: 8b 55 0c mov 0xc(%ebp),%edx 110fde: 8b 4d 10 mov 0x10(%ebp),%ecx 110fe1: 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 ) { 110fe4: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx 110fea: 74 70 je 11105c <_CORE_message_queue_Insert_message+0x8c> _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 ) { 110fec: 81 f9 00 00 00 80 cmp $0x80000000,%ecx 110ff2: 0f 84 88 00 00 00 je 111080 <_CORE_message_queue_Insert_message+0xb0> 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; 110ff8: 8b 58 50 mov 0x50(%eax),%ebx 110ffb: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 110ffe: 39 de cmp %ebx,%esi 111000: 74 05 je 111007 <_CORE_message_queue_Insert_message+0x37> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 111002: 3b 4b 08 cmp 0x8(%ebx),%ecx 111005: 7d 45 jge 11104c <_CORE_message_queue_Insert_message+0x7c> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 111007: 9c pushf 111008: fa cli 111009: 5e pop %esi SET_NOTIFY(); 11100a: 8b 48 48 mov 0x48(%eax),%ecx * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 11100d: 85 c9 test %ecx,%ecx 11100f: 0f 94 45 f7 sete -0x9(%ebp) } break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 111013: 41 inc %ecx 111014: 89 48 48 mov %ecx,0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 111017: 8b 4b 04 mov 0x4(%ebx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 11101a: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 11101d: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 11101f: 89 11 mov %edx,(%ecx) the_node->next = before_node; 111021: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 111023: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 111026: 56 push %esi 111027: 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 ) 111028: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 11102c: 74 16 je 111044 <_CORE_message_queue_Insert_message+0x74> 11102e: 8b 50 60 mov 0x60(%eax),%edx 111031: 85 d2 test %edx,%edx 111033: 74 0f je 111044 <_CORE_message_queue_Insert_message+0x74> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 111035: 8b 40 64 mov 0x64(%eax),%eax 111038: 89 45 08 mov %eax,0x8(%ebp) #endif } 11103b: 83 c4 10 add $0x10,%esp 11103e: 5b pop %ebx 11103f: 5e pop %esi 111040: 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); 111041: ff e2 jmp *%edx 111043: 90 nop <== NOT EXECUTED #endif } 111044: 83 c4 10 add $0x10,%esp 111047: 5b pop %ebx 111048: 5e pop %esi 111049: c9 leave 11104a: c3 ret 11104b: 90 nop <== 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; 11104c: 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 ) ) { 11104e: 39 de cmp %ebx,%esi 111050: 74 b5 je 111007 <_CORE_message_queue_Insert_message+0x37> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 111052: 3b 4b 08 cmp 0x8(%ebx),%ecx 111055: 7c b0 jl 111007 <_CORE_message_queue_Insert_message+0x37> 111057: eb f3 jmp 11104c <_CORE_message_queue_Insert_message+0x7c> 111059: 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 ); 11105c: 9c pushf 11105d: fa cli 11105e: 5b pop %ebx SET_NOTIFY(); 11105f: 8b 48 48 mov 0x48(%eax),%ecx * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 111062: 85 c9 test %ecx,%ecx 111064: 0f 94 45 f7 sete -0x9(%ebp) _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 111068: 41 inc %ecx 111069: 89 48 48 mov %ecx,0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11106c: 8d 48 54 lea 0x54(%eax),%ecx 11106f: 89 0a mov %ecx,(%edx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 111071: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 111074: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 111077: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 111079: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 11107c: 53 push %ebx 11107d: 9d popf 11107e: eb a8 jmp 111028 <_CORE_message_queue_Insert_message+0x58> } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 111080: 9c pushf 111081: fa cli 111082: 5b pop %ebx SET_NOTIFY(); 111083: 8b 48 48 mov 0x48(%eax),%ecx * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 111086: 85 c9 test %ecx,%ecx 111088: 0f 94 45 f7 sete -0x9(%ebp) _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 ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 11108c: 41 inc %ecx 11108d: 89 48 48 mov %ecx,0x48(%eax) RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend_unprotected ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Prepend_unprotected( 111090: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 111093: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 111096: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 111099: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 11109c: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 11109e: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 1110a1: 53 push %ebx 1110a2: 9d popf 1110a3: eb 83 jmp 111028 <_CORE_message_queue_Insert_message+0x58> =============================================================================== 00114a8c <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114a8c: 55 push %ebp 114a8d: 89 e5 mov %esp,%ebp 114a8f: 57 push %edi 114a90: 56 push %esi 114a91: 53 push %ebx 114a92: 83 ec 2c sub $0x2c,%esp 114a95: 8b 55 08 mov 0x8(%ebp),%edx 114a98: 8b 45 0c mov 0xc(%ebp),%eax 114a9b: 89 45 dc mov %eax,-0x24(%ebp) 114a9e: 8b 4d 10 mov 0x10(%ebp),%ecx 114aa1: 89 4d e0 mov %ecx,-0x20(%ebp) 114aa4: 8b 45 14 mov 0x14(%ebp),%eax 114aa7: 8b 5d 1c mov 0x1c(%ebp),%ebx 114aaa: 89 5d d8 mov %ebx,-0x28(%ebp) 114aad: 0f b6 7d 18 movzbl 0x18(%ebp),%edi ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114ab1: 8b 0d f8 10 13 00 mov 0x1310f8,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114ab7: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114abe: 9c pushf 114abf: fa cli 114ac0: 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)); 114ac3: 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; 114ac6: 8d 72 54 lea 0x54(%edx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 114ac9: 39 f3 cmp %esi,%ebx 114acb: 74 7b je 114b48 <_CORE_message_queue_Seize+0xbc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114acd: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 114acf: 89 4a 50 mov %ecx,0x50(%edx) CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get_unprotected( &the_message_queue->Pending_messages ); 114ad2: 8d 72 50 lea 0x50(%edx),%esi 114ad5: 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; 114ad8: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 114adb: ff 75 e4 pushl -0x1c(%ebp) 114ade: 9d popf *size_p = the_message->Contents.size; 114adf: 8b 4b 0c mov 0xc(%ebx),%ecx 114ae2: 89 08 mov %ecx,(%eax) _Thread_Executing->Wait.count = 114ae4: 8b 73 08 mov 0x8(%ebx),%esi 114ae7: 8b 0d f8 10 13 00 mov 0x1310f8,%ecx 114aed: 89 71 24 mov %esi,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 114af0: 8d 4b 10 lea 0x10(%ebx),%ecx 114af3: 89 4d e4 mov %ecx,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114af6: 8b 08 mov (%eax),%ecx 114af8: 8b 7d e0 mov -0x20(%ebp),%edi 114afb: 8b 75 e4 mov -0x1c(%ebp),%esi 114afe: 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 ); 114b00: 83 ec 0c sub $0xc,%esp 114b03: 52 push %edx 114b04: 89 55 d4 mov %edx,-0x2c(%ebp) 114b07: e8 8c 1b 00 00 call 116698 <_Thread_queue_Dequeue> if ( !the_thread ) { 114b0c: 83 c4 10 add $0x10,%esp 114b0f: 85 c0 test %eax,%eax 114b11: 8b 55 d4 mov -0x2c(%ebp),%edx 114b14: 0f 84 86 00 00 00 je 114ba0 <_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; 114b1a: 8b 48 24 mov 0x24(%eax),%ecx 114b1d: 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; 114b20: 8b 48 30 mov 0x30(%eax),%ecx 114b23: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114b26: 8b 70 2c mov 0x2c(%eax),%esi 114b29: 8b 7d e4 mov -0x1c(%ebp),%edi 114b2c: 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( 114b2e: 8b 43 08 mov 0x8(%ebx),%eax 114b31: 89 45 10 mov %eax,0x10(%ebp) 114b34: 89 5d 0c mov %ebx,0xc(%ebp) 114b37: 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 ); } 114b3a: 8d 65 f4 lea -0xc(%ebp),%esp 114b3d: 5b pop %ebx 114b3e: 5e pop %esi 114b3f: 5f pop %edi 114b40: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 114b41: e9 be 50 00 00 jmp 119c04 <_CORE_message_queue_Insert_message> 114b46: 66 90 xchg %ax,%ax <== NOT EXECUTED return; } #endif } if ( !wait ) { 114b48: 89 fb mov %edi,%ebx 114b4a: 84 db test %bl,%bl 114b4c: 75 16 jne 114b64 <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 114b4e: ff 75 e4 pushl -0x1c(%ebp) 114b51: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114b52: 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 ); } 114b59: 8d 65 f4 lea -0xc(%ebp),%esp 114b5c: 5b pop %ebx 114b5d: 5e pop %esi 114b5e: 5f pop %edi 114b5f: c9 leave 114b60: c3 ret 114b61: 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; 114b64: 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; 114b6b: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 114b6e: 8b 5d dc mov -0x24(%ebp),%ebx 114b71: 89 59 20 mov %ebx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114b74: 8b 5d e0 mov -0x20(%ebp),%ebx 114b77: 89 59 2c mov %ebx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114b7a: 89 41 28 mov %eax,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114b7d: ff 75 e4 pushl -0x1c(%ebp) 114b80: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114b81: c7 45 10 0c 6b 11 00 movl $0x116b0c,0x10(%ebp) 114b88: 8b 45 d8 mov -0x28(%ebp),%eax 114b8b: 89 45 0c mov %eax,0xc(%ebp) 114b8e: 89 55 08 mov %edx,0x8(%ebp) } 114b91: 8d 65 f4 lea -0xc(%ebp),%esp 114b94: 5b pop %ebx 114b95: 5e pop %esi 114b96: 5f pop %edi 114b97: 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 ); 114b98: e9 1f 1c 00 00 jmp 1167bc <_Thread_queue_Enqueue_with_handler> 114b9d: 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 ); 114ba0: 89 5d 0c mov %ebx,0xc(%ebp) 114ba3: 83 c2 68 add $0x68,%edx 114ba6: 89 55 08 mov %edx,0x8(%ebp) } 114ba9: 8d 65 f4 lea -0xc(%ebp),%esp 114bac: 5b pop %ebx 114bad: 5e pop %esi 114bae: 5f pop %edi 114baf: c9 leave 114bb0: e9 a7 fd ff ff jmp 11495c <_Chain_Append> =============================================================================== 0010c00c <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c00c: 55 push %ebp 10c00d: 89 e5 mov %esp,%ebp 10c00f: 57 push %edi 10c010: 56 push %esi 10c011: 53 push %ebx 10c012: 83 ec 1c sub $0x1c,%esp 10c015: 8b 5d 08 mov 0x8(%ebp),%ebx 10c018: 8b 75 0c mov 0xc(%ebp),%esi 10c01b: 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 ) { 10c01e: 8b 45 10 mov 0x10(%ebp),%eax 10c021: 39 43 4c cmp %eax,0x4c(%ebx) 10c024: 72 32 jb 10c058 <_CORE_message_queue_Submit+0x4c> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c026: 8b 43 48 mov 0x48(%ebx),%eax 10c029: 85 c0 test %eax,%eax 10c02b: 74 3b je 10c068 <_CORE_message_queue_Submit+0x5c> /* * 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 < 10c02d: 39 43 44 cmp %eax,0x44(%ebx) 10c030: 0f 87 ba 00 00 00 ja 10c0f0 <_CORE_message_queue_Submit+0xe4> /* * 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 ) { 10c036: 84 c9 test %cl,%cl 10c038: 0f 84 ee 00 00 00 je 10c12c <_CORE_message_queue_Submit+0x120> /* * 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() ) { 10c03e: 8b 15 94 6a 12 00 mov 0x126a94,%edx 10c044: 85 d2 test %edx,%edx 10c046: 74 60 je 10c0a8 <_CORE_message_queue_Submit+0x9c> return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; 10c048: 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 } 10c04d: 8d 65 f4 lea -0xc(%ebp),%esp 10c050: 5b pop %ebx 10c051: 5e pop %esi 10c052: 5f pop %edi 10c053: c9 leave 10c054: c3 ret 10c055: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 10c058: 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 } 10c05d: 8d 65 f4 lea -0xc(%ebp),%esp 10c060: 5b pop %ebx 10c061: 5e pop %esi 10c062: 5f pop %edi 10c063: c9 leave 10c064: c3 ret 10c065: 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 ); 10c068: 83 ec 0c sub $0xc,%esp 10c06b: 53 push %ebx 10c06c: 88 4d e4 mov %cl,-0x1c(%ebp) 10c06f: e8 f8 19 00 00 call 10da6c <_Thread_queue_Dequeue> 10c074: 89 c2 mov %eax,%edx if ( the_thread ) { 10c076: 83 c4 10 add $0x10,%esp 10c079: 85 c0 test %eax,%eax 10c07b: 8a 4d e4 mov -0x1c(%ebp),%cl 10c07e: 0f 84 b8 00 00 00 je 10c13c <_CORE_message_queue_Submit+0x130> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c084: 8b 40 2c mov 0x2c(%eax),%eax 10c087: 89 c7 mov %eax,%edi 10c089: 8b 4d 10 mov 0x10(%ebp),%ecx 10c08c: 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; 10c08e: 8b 42 28 mov 0x28(%edx),%eax 10c091: 8b 4d 10 mov 0x10(%ebp),%ecx 10c094: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c096: 8b 45 1c mov 0x1c(%ebp),%eax 10c099: 89 42 24 mov %eax,0x24(%edx) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c09c: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c09e: 8d 65 f4 lea -0xc(%ebp),%esp 10c0a1: 5b pop %ebx 10c0a2: 5e pop %esi 10c0a3: 5f pop %edi 10c0a4: c9 leave 10c0a5: c3 ret 10c0a6: 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; 10c0a8: a1 98 6a 12 00 mov 0x126a98,%eax ISR_Level level; _ISR_Disable( level ); 10c0ad: 9c pushf 10c0ae: fa cli 10c0af: 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; 10c0b0: 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; 10c0b7: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10c0ba: 8b 55 14 mov 0x14(%ebp),%edx 10c0bd: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10c0c0: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10c0c3: 8b 55 10 mov 0x10(%ebp),%edx 10c0c6: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10c0c9: 8b 55 1c mov 0x1c(%ebp),%edx 10c0cc: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10c0cf: 51 push %ecx 10c0d0: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10c0d1: 50 push %eax 10c0d2: 68 e0 de 10 00 push $0x10dee0 10c0d7: ff 75 24 pushl 0x24(%ebp) 10c0da: 53 push %ebx 10c0db: e8 b0 1a 00 00 call 10db90 <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10c0e0: 83 c4 10 add $0x10,%esp 10c0e3: b8 07 00 00 00 mov $0x7,%eax #endif } 10c0e8: 8d 65 f4 lea -0xc(%ebp),%esp 10c0eb: 5b pop %ebx 10c0ec: 5e pop %esi 10c0ed: 5f pop %edi 10c0ee: c9 leave 10c0ef: c3 ret _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get( &the_message_queue->Inactive_messages ); 10c0f0: 83 ec 0c sub $0xc,%esp 10c0f3: 8d 43 68 lea 0x68(%ebx),%eax 10c0f6: 50 push %eax 10c0f7: e8 ec fe ff ff call 10bfe8 <_Chain_Get> 10c0fc: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 10c0fe: 8d 40 10 lea 0x10(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c101: 89 c7 mov %eax,%edi 10c103: 8b 4d 10 mov 0x10(%ebp),%ecx 10c106: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 10c108: 8b 4d 10 mov 0x10(%ebp),%ecx 10c10b: 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; 10c10e: 8b 45 1c mov 0x1c(%ebp),%eax 10c111: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c114: 83 c4 0c add $0xc,%esp 10c117: 50 push %eax 10c118: 52 push %edx 10c119: 53 push %ebx 10c11a: e8 b1 4e 00 00 call 110fd0 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c11f: 83 c4 10 add $0x10,%esp 10c122: 31 c0 xor %eax,%eax 10c124: e9 34 ff ff ff jmp 10c05d <_CORE_message_queue_Submit+0x51> 10c129: 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 ) { return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY; 10c12c: 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 } 10c131: 8d 65 f4 lea -0xc(%ebp),%esp 10c134: 5b pop %ebx 10c135: 5e pop %esi 10c136: 5f pop %edi 10c137: c9 leave 10c138: c3 ret 10c139: 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 ) { 10c13c: 8b 43 48 mov 0x48(%ebx),%eax 10c13f: e9 e9 fe ff ff jmp 10c02d <_CORE_message_queue_Submit+0x21> =============================================================================== 0010c150 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c150: 55 push %ebp 10c151: 89 e5 mov %esp,%ebp 10c153: 57 push %edi 10c154: 56 push %esi 10c155: 53 push %ebx 10c156: 83 ec 0c sub $0xc,%esp 10c159: 8b 45 08 mov 0x8(%ebp),%eax 10c15c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c15f: 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; 10c162: 8d 78 40 lea 0x40(%eax),%edi 10c165: b9 04 00 00 00 mov $0x4,%ecx 10c16a: 89 de mov %ebx,%esi 10c16c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c16e: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c171: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c178: 85 d2 test %edx,%edx 10c17a: 75 30 jne 10c1ac <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c17c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c183: 8b 15 98 6a 12 00 mov 0x126a98,%edx 10c189: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c18c: 8b 4a 08 mov 0x8(%edx),%ecx 10c18f: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c192: 8b 48 48 mov 0x48(%eax),%ecx if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c195: 83 f9 02 cmp $0x2,%ecx 10c198: 74 05 je 10c19f <_CORE_mutex_Initialize+0x4f> 10c19a: 83 f9 03 cmp $0x3,%ecx 10c19d: 75 22 jne 10c1c1 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10c19f: 8b 48 4c mov 0x4c(%eax),%ecx 10c1a2: 39 4a 14 cmp %ecx,0x14(%edx) 10c1a5: 72 41 jb 10c1e8 <_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++; 10c1a7: ff 42 1c incl 0x1c(%edx) 10c1aa: eb 15 jmp 10c1c1 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c1ac: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c1b3: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c1ba: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c1c1: 6a 05 push $0x5 10c1c3: 68 00 04 00 00 push $0x400 10c1c8: 31 d2 xor %edx,%edx 10c1ca: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c1ce: 0f 95 c2 setne %dl 10c1d1: 52 push %edx 10c1d2: 50 push %eax 10c1d3: e8 44 1c 00 00 call 10de1c <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c1d8: 83 c4 10 add $0x10,%esp 10c1db: 31 c0 xor %eax,%eax } 10c1dd: 8d 65 f4 lea -0xc(%ebp),%esp 10c1e0: 5b pop %ebx 10c1e1: 5e pop %esi 10c1e2: 5f pop %edi 10c1e3: c9 leave 10c1e4: c3 ret 10c1e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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 ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; 10c1e8: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 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 =============================================================================== 0010c248 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c248: 55 push %ebp 10c249: 89 e5 mov %esp,%ebp 10c24b: 53 push %ebx 10c24c: 83 ec 14 sub $0x14,%esp 10c24f: 8b 5d 08 mov 0x8(%ebp),%ebx 10c252: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c255: a1 d4 64 12 00 mov 0x1264d4,%eax 10c25a: 85 c0 test %eax,%eax 10c25c: 74 04 je 10c262 <_CORE_mutex_Seize+0x1a> 10c25e: 84 d2 test %dl,%dl 10c260: 75 36 jne 10c298 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c262: 83 ec 08 sub $0x8,%esp 10c265: 8d 45 18 lea 0x18(%ebp),%eax 10c268: 50 push %eax 10c269: 53 push %ebx 10c26a: 88 55 f4 mov %dl,-0xc(%ebp) 10c26d: e8 36 4e 00 00 call 1110a8 <_CORE_mutex_Seize_interrupt_trylock> 10c272: 83 c4 10 add $0x10,%esp 10c275: 85 c0 test %eax,%eax 10c277: 8a 55 f4 mov -0xc(%ebp),%dl 10c27a: 74 14 je 10c290 <_CORE_mutex_Seize+0x48> 10c27c: 84 d2 test %dl,%dl 10c27e: 75 30 jne 10c2b0 <_CORE_mutex_Seize+0x68> 10c280: ff 75 18 pushl 0x18(%ebp) 10c283: 9d popf 10c284: a1 98 6a 12 00 mov 0x126a98,%eax 10c289: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c290: 8b 5d fc mov -0x4(%ebp),%ebx 10c293: c9 leave 10c294: c3 ret 10c295: 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 ); 10c298: 83 3d 80 66 12 00 01 cmpl $0x1,0x126680 10c29f: 76 c1 jbe 10c262 <_CORE_mutex_Seize+0x1a> 10c2a1: 53 push %ebx 10c2a2: 6a 12 push $0x12 10c2a4: 6a 00 push $0x0 10c2a6: 6a 00 push $0x0 10c2a8: e8 23 06 00 00 call 10c8d0 <_Internal_error_Occurred> 10c2ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c2b0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c2b7: a1 98 6a 12 00 mov 0x126a98,%eax 10c2bc: 89 58 44 mov %ebx,0x44(%eax) 10c2bf: 8b 55 0c mov 0xc(%ebp),%edx 10c2c2: 89 50 20 mov %edx,0x20(%eax) 10c2c5: a1 d4 64 12 00 mov 0x1264d4,%eax 10c2ca: 40 inc %eax 10c2cb: a3 d4 64 12 00 mov %eax,0x1264d4 10c2d0: ff 75 18 pushl 0x18(%ebp) 10c2d3: 9d popf 10c2d4: 83 ec 08 sub $0x8,%esp 10c2d7: ff 75 14 pushl 0x14(%ebp) 10c2da: 53 push %ebx 10c2db: e8 18 ff ff ff call 10c1f8 <_CORE_mutex_Seize_interrupt_blocking> 10c2e0: 83 c4 10 add $0x10,%esp } 10c2e3: 8b 5d fc mov -0x4(%ebp),%ebx 10c2e6: c9 leave 10c2e7: c3 ret =============================================================================== 001110a8 <_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 ) { 1110a8: 55 push %ebp 1110a9: 89 e5 mov %esp,%ebp 1110ab: 56 push %esi 1110ac: 53 push %ebx 1110ad: 8b 45 08 mov 0x8(%ebp),%eax 1110b0: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 1110b3: 8b 15 98 6a 12 00 mov 0x126a98,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 1110b9: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 1110c0: 8b 58 50 mov 0x50(%eax),%ebx 1110c3: 85 db test %ebx,%ebx 1110c5: 74 31 je 1110f8 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 1110c7: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 1110ce: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 1110d1: 8b 5a 08 mov 0x8(%edx),%ebx 1110d4: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 1110d7: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 1110de: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 1110e1: 83 fb 02 cmp $0x2,%ebx 1110e4: 74 26 je 11110c <_CORE_mutex_Seize_interrupt_trylock+0x64> 1110e6: 83 fb 03 cmp $0x3,%ebx 1110e9: 74 3d je 111128 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 1110eb: ff 31 pushl (%ecx) 1110ed: 9d popf return 0; 1110ee: 31 c0 xor %eax,%eax 1110f0: 8d 65 f8 lea -0x8(%ebp),%esp 1110f3: 5b pop %ebx 1110f4: 5e pop %esi 1110f5: c9 leave 1110f6: c3 ret 1110f7: 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 ) ) { 1110f8: 3b 50 5c cmp 0x5c(%eax),%edx 1110fb: 74 17 je 111114 <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 1110fd: b8 01 00 00 00 mov $0x1,%eax 111102: 8d 65 f8 lea -0x8(%ebp),%esp 111105: 5b pop %ebx 111106: 5e pop %esi 111107: c9 leave 111108: c3 ret 111109: 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++; 11110c: ff 42 1c incl 0x1c(%edx) 11110f: eb da jmp 1110eb <_CORE_mutex_Seize_interrupt_trylock+0x43> 111111: 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 ) { 111114: 8b 58 40 mov 0x40(%eax),%ebx 111117: 85 db test %ebx,%ebx 111119: 75 45 jne 111160 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 11111b: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 11111e: ff 31 pushl (%ecx) 111120: 9d popf return 0; 111121: 31 c0 xor %eax,%eax 111123: eb dd jmp 111102 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 111125: 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++; 111128: 8b 5a 1c mov 0x1c(%edx),%ebx 11112b: 8d 73 01 lea 0x1(%ebx),%esi 11112e: 89 72 1c mov %esi,0x1c(%edx) Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { 111131: 8b 72 14 mov 0x14(%edx),%esi 111134: 39 70 4c cmp %esi,0x4c(%eax) 111137: 74 6b je 1111a4 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 111139: 72 39 jb 111174 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 11113b: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 111142: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 111149: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 111150: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 111153: ff 31 pushl (%ecx) 111155: 9d popf return 0; 111156: 31 c0 xor %eax,%eax 111158: 8d 65 f8 lea -0x8(%ebp),%esp 11115b: 5b pop %ebx 11115c: 5e pop %esi 11115d: c9 leave 11115e: c3 ret 11115f: 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 ) { 111160: 4b dec %ebx 111161: 75 9a jne 1110fd <_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; 111163: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _ISR_Enable( *level_p ); 11116a: ff 31 pushl (%ecx) 11116c: 9d popf return 0; 11116d: 31 c0 xor %eax,%eax 11116f: eb 91 jmp 111102 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 111171: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 111174: 8b 15 d4 64 12 00 mov 0x1264d4,%edx 11117a: 42 inc %edx 11117b: 89 15 d4 64 12 00 mov %edx,0x1264d4 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 111181: ff 31 pushl (%ecx) 111183: 9d popf _Thread_Change_priority( 111184: 52 push %edx 111185: 6a 00 push $0x0 111187: ff 70 4c pushl 0x4c(%eax) 11118a: ff 70 5c pushl 0x5c(%eax) 11118d: e8 12 c0 ff ff call 10d1a4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 111192: e8 11 c5 ff ff call 10d6a8 <_Thread_Enable_dispatch> 111197: 83 c4 10 add $0x10,%esp return 0; 11119a: 31 c0 xor %eax,%eax 11119c: e9 61 ff ff ff jmp 111102 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1111a1: 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 ); 1111a4: ff 31 pushl (%ecx) 1111a6: 9d popf return 0; 1111a7: 31 c0 xor %eax,%eax 1111a9: e9 54 ff ff ff jmp 111102 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c2e8 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c2e8: 55 push %ebp 10c2e9: 89 e5 mov %esp,%ebp 10c2eb: 53 push %ebx 10c2ec: 83 ec 04 sub $0x4,%esp 10c2ef: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10c2f2: 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 ) { 10c2f5: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c2f9: 74 15 je 10c310 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c2fb: 3b 05 98 6a 12 00 cmp 0x126a98,%eax 10c301: 74 0d je 10c310 <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10c303: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c308: 8b 5d fc mov -0x4(%ebp),%ebx 10c30b: c9 leave 10c30c: c3 ret 10c30d: 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 ) 10c310: 8b 53 54 mov 0x54(%ebx),%edx 10c313: 85 d2 test %edx,%edx 10c315: 74 51 je 10c368 <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c317: 4a dec %edx 10c318: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c31b: 85 d2 test %edx,%edx 10c31d: 75 49 jne 10c368 <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c31f: 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 ) || 10c322: 83 fa 02 cmp $0x2,%edx 10c325: 74 69 je 10c390 <_CORE_mutex_Surrender+0xa8> 10c327: 83 fa 03 cmp $0x3,%edx 10c32a: 74 64 je 10c390 <_CORE_mutex_Surrender+0xa8> if ( holder->resource_count == 0 && holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); } } the_mutex->holder = NULL; 10c32c: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c333: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * 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 ) ) ) { 10c33a: 83 ec 0c sub $0xc,%esp 10c33d: 53 push %ebx 10c33e: e8 29 17 00 00 call 10da6c <_Thread_queue_Dequeue> 10c343: 83 c4 10 add $0x10,%esp 10c346: 85 c0 test %eax,%eax 10c348: 74 7a je 10c3c4 <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10c34a: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c34d: 8b 50 08 mov 0x8(%eax),%edx 10c350: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c353: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c35a: 8b 53 48 mov 0x48(%ebx),%edx 10c35d: 83 fa 02 cmp $0x2,%edx 10c360: 74 56 je 10c3b8 <_CORE_mutex_Surrender+0xd0> 10c362: 83 fa 03 cmp $0x3,%edx 10c365: 74 09 je 10c370 <_CORE_mutex_Surrender+0x88> 10c367: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c368: 31 c0 xor %eax,%eax } 10c36a: 8b 5d fc mov -0x4(%ebp),%ebx 10c36d: c9 leave 10c36e: c3 ret 10c36f: 90 nop <== NOT EXECUTED _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; 10c370: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c373: 8b 53 4c mov 0x4c(%ebx),%edx 10c376: 3b 50 14 cmp 0x14(%eax),%edx 10c379: 73 ed jae 10c368 <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10c37b: 51 push %ecx 10c37c: 6a 00 push $0x0 10c37e: 52 push %edx 10c37f: 50 push %eax 10c380: e8 1f 0e 00 00 call 10d1a4 <_Thread_Change_priority> 10c385: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c388: 31 c0 xor %eax,%eax 10c38a: e9 79 ff ff ff jmp 10c308 <_CORE_mutex_Surrender+0x20> 10c38f: 90 nop <== NOT EXECUTED _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10c390: 8b 50 1c mov 0x1c(%eax),%edx 10c393: 4a dec %edx 10c394: 89 50 1c mov %edx,0x1c(%eax) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( holder->resource_count == 0 && 10c397: 85 d2 test %edx,%edx 10c399: 75 91 jne 10c32c <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10c39b: 8b 50 18 mov 0x18(%eax),%edx /* * 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 ( holder->resource_count == 0 && 10c39e: 3b 50 14 cmp 0x14(%eax),%edx 10c3a1: 74 89 je 10c32c <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10c3a3: 51 push %ecx 10c3a4: 6a 01 push $0x1 10c3a6: 52 push %edx 10c3a7: 50 push %eax 10c3a8: e8 f7 0d 00 00 call 10d1a4 <_Thread_Change_priority> 10c3ad: 83 c4 10 add $0x10,%esp 10c3b0: e9 77 ff ff ff jmp 10c32c <_CORE_mutex_Surrender+0x44> 10c3b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; 10c3b8: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c3bb: 31 c0 xor %eax,%eax case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; 10c3bd: e9 46 ff ff ff jmp 10c308 <_CORE_mutex_Surrender+0x20> 10c3c2: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c3c4: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10c3cb: 31 c0 xor %eax,%eax 10c3cd: e9 36 ff ff ff jmp 10c308 <_CORE_mutex_Surrender+0x20> =============================================================================== 00115198 <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 115198: 55 push %ebp 115199: 89 e5 mov %esp,%ebp 11519b: 57 push %edi 11519c: 56 push %esi 11519d: 53 push %ebx 11519e: 83 ec 1c sub $0x1c,%esp 1151a1: 8b 45 08 mov 0x8(%ebp),%eax 1151a4: 8b 7d 0c mov 0xc(%ebp),%edi 1151a7: 8b 75 14 mov 0x14(%ebp),%esi 1151aa: 8a 5d 10 mov 0x10(%ebp),%bl Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 1151ad: 8b 15 78 d7 12 00 mov 0x12d778,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 1151b3: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 1151ba: 9c pushf 1151bb: fa cli 1151bc: 8f 45 e4 popl -0x1c(%ebp) if ( the_semaphore->count != 0 ) { 1151bf: 8b 48 48 mov 0x48(%eax),%ecx 1151c2: 85 c9 test %ecx,%ecx 1151c4: 75 46 jne 11520c <_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 ) { 1151c6: 84 db test %bl,%bl 1151c8: 75 16 jne 1151e0 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 1151ca: ff 75 e4 pushl -0x1c(%ebp) 1151cd: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 1151ce: 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 ); } 1151d5: 83 c4 1c add $0x1c,%esp 1151d8: 5b pop %ebx 1151d9: 5e pop %esi 1151da: 5f pop %edi 1151db: c9 leave 1151dc: c3 ret 1151dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1151e0: 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; 1151e7: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 1151ea: 89 7a 20 mov %edi,0x20(%edx) _ISR_Enable( level ); 1151ed: ff 75 e4 pushl -0x1c(%ebp) 1151f0: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 1151f1: c7 45 10 f4 18 11 00 movl $0x1118f4,0x10(%ebp) 1151f8: 89 75 0c mov %esi,0xc(%ebp) 1151fb: 89 45 08 mov %eax,0x8(%ebp) } 1151fe: 83 c4 1c add $0x1c,%esp 115201: 5b pop %ebx 115202: 5e pop %esi 115203: 5f pop %edi 115204: 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 ); 115205: e9 9a c3 ff ff jmp 1115a4 <_Thread_queue_Enqueue_with_handler> 11520a: 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; 11520c: 49 dec %ecx 11520d: 89 48 48 mov %ecx,0x48(%eax) _ISR_Enable( level ); 115210: ff 75 e4 pushl -0x1c(%ebp) 115213: 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 ); } 115214: 83 c4 1c add $0x1c,%esp 115217: 5b pop %ebx 115218: 5e pop %esi 115219: 5f pop %edi 11521a: c9 leave 11521b: c3 ret =============================================================================== 0010c420 <_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 ) { 10c420: 55 push %ebp 10c421: 89 e5 mov %esp,%ebp 10c423: 53 push %ebx 10c424: 83 ec 10 sub $0x10,%esp 10c427: 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)) ) { 10c42a: 53 push %ebx 10c42b: e8 3c 16 00 00 call 10da6c <_Thread_queue_Dequeue> 10c430: 83 c4 10 add $0x10,%esp 10c433: 85 c0 test %eax,%eax 10c435: 74 09 je 10c440 <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c437: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c439: 8b 5d fc mov -0x4(%ebp),%ebx 10c43c: c9 leave 10c43d: c3 ret 10c43e: 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 ); 10c440: 9c pushf 10c441: fa cli 10c442: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c443: 8b 43 48 mov 0x48(%ebx),%eax 10c446: 3b 43 40 cmp 0x40(%ebx),%eax 10c449: 72 0d jb 10c458 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10c44b: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10c450: 52 push %edx 10c451: 9d popf } return status; } 10c452: 8b 5d fc mov -0x4(%ebp),%ebx 10c455: c9 leave 10c456: c3 ret 10c457: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c458: 40 inc %eax 10c459: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c45c: 31 c0 xor %eax,%eax 10c45e: eb f0 jmp 10c450 <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010cdc4 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10cdc4: 55 push %ebp 10cdc5: 89 e5 mov %esp,%ebp 10cdc7: 53 push %ebx 10cdc8: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10cdcb: 9c pushf 10cdcc: fa cli 10cdcd: 59 pop %ecx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cdce: 8b 50 04 mov 0x4(%eax),%edx 10cdd1: 85 d2 test %edx,%edx 10cdd3: 75 0b jne 10cde0 <_CORE_spinlock_Release+0x1c> _ISR_Enable( level ); 10cdd5: 51 push %ecx 10cdd6: 9d popf return CORE_SPINLOCK_NOT_LOCKED; 10cdd7: 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; } 10cddc: 5b pop %ebx 10cddd: c9 leave 10cdde: c3 ret 10cddf: 90 nop <== NOT EXECUTED } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10cde0: 8b 58 0c mov 0xc(%eax),%ebx 10cde3: 8b 15 18 8b 12 00 mov 0x128b18,%edx 10cde9: 3b 5a 08 cmp 0x8(%edx),%ebx 10cdec: 74 0a je 10cdf8 <_CORE_spinlock_Release+0x34> _ISR_Enable( level ); 10cdee: 51 push %ecx 10cdef: 9d popf return CORE_SPINLOCK_NOT_HOLDER; 10cdf0: 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; } 10cdf5: 5b pop %ebx 10cdf6: c9 leave 10cdf7: c3 ret } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10cdf8: 8b 50 08 mov 0x8(%eax),%edx 10cdfb: 4a dec %edx 10cdfc: 89 50 08 mov %edx,0x8(%eax) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10cdff: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_spinlock->holder = 0; 10ce06: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _ISR_Enable( level ); 10ce0d: 51 push %ecx 10ce0e: 9d popf return CORE_SPINLOCK_SUCCESSFUL; 10ce0f: 31 c0 xor %eax,%eax 10ce11: eb c9 jmp 10cddc <_CORE_spinlock_Release+0x18> =============================================================================== 0010ce14 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10ce14: 55 push %ebp 10ce15: 89 e5 mov %esp,%ebp 10ce17: 56 push %esi 10ce18: 53 push %ebx 10ce19: 83 ec 10 sub $0x10,%esp 10ce1c: 8b 5d 08 mov 0x8(%ebp),%ebx 10ce1f: 8a 45 0c mov 0xc(%ebp),%al 10ce22: 88 45 f7 mov %al,-0x9(%ebp) ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 10ce25: 9c pushf 10ce26: fa cli 10ce27: 5a pop %edx 10ce28: 89 d0 mov %edx,%eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10ce2a: 8b 4b 04 mov 0x4(%ebx),%ecx 10ce2d: 49 dec %ecx 10ce2e: 74 64 je 10ce94 <_CORE_spinlock_Wait+0x80> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10ce30: 8b 4b 08 mov 0x8(%ebx),%ecx 10ce33: 41 inc %ecx 10ce34: 89 4b 08 mov %ecx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10ce37: 8b 4b 04 mov 0x4(%ebx),%ecx 10ce3a: 85 c9 test %ecx,%ecx 10ce3c: 74 22 je 10ce60 <_CORE_spinlock_Wait+0x4c> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10ce3e: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 10ce42: 74 3a je 10ce7e <_CORE_spinlock_Wait+0x6a> * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10ce44: 50 push %eax 10ce45: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10ce46: e8 a9 12 00 00 call 10e0f4 <_Thread_Enable_dispatch> 10ce4b: a1 54 85 12 00 mov 0x128554,%eax 10ce50: 40 inc %eax 10ce51: a3 54 85 12 00 mov %eax,0x128554 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10ce56: 9c pushf 10ce57: fa cli 10ce58: 58 pop %eax _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10ce59: 8b 53 04 mov 0x4(%ebx),%edx 10ce5c: 85 d2 test %edx,%edx 10ce5e: 75 e4 jne 10ce44 <_CORE_spinlock_Wait+0x30> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10ce60: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10ce67: 8b 15 18 8b 12 00 mov 0x128b18,%edx 10ce6d: 8b 52 08 mov 0x8(%edx),%edx 10ce70: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10ce73: 50 push %eax 10ce74: 9d popf return CORE_SPINLOCK_SUCCESSFUL; 10ce75: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10ce77: 83 c4 10 add $0x10,%esp 10ce7a: 5b pop %ebx 10ce7b: 5e pop %esi 10ce7c: c9 leave 10ce7d: c3 ret /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 10ce7e: 8b 43 08 mov 0x8(%ebx),%eax 10ce81: 48 dec %eax 10ce82: 89 43 08 mov %eax,0x8(%ebx) _ISR_Enable( level ); 10ce85: 52 push %edx 10ce86: 9d popf return CORE_SPINLOCK_UNAVAILABLE; 10ce87: b8 05 00 00 00 mov $0x5,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10ce8c: 83 c4 10 add $0x10,%esp 10ce8f: 5b pop %ebx 10ce90: 5e pop %esi 10ce91: c9 leave 10ce92: c3 ret 10ce93: 90 nop <== 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) ) { 10ce94: 8b 73 0c mov 0xc(%ebx),%esi 10ce97: 8b 0d 18 8b 12 00 mov 0x128b18,%ecx #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10ce9d: 3b 71 08 cmp 0x8(%ecx),%esi 10cea0: 75 8e jne 10ce30 <_CORE_spinlock_Wait+0x1c> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 10cea2: 52 push %edx 10cea3: 9d popf return CORE_SPINLOCK_HOLDER_RELOCKING; 10cea4: b8 01 00 00 00 mov $0x1,%eax 10cea9: eb cc jmp 10ce77 <_CORE_spinlock_Wait+0x63> =============================================================================== 0010bfe8 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10bfe8: 55 push %ebp 10bfe9: 89 e5 mov %esp,%ebp 10bfeb: 53 push %ebx 10bfec: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10bfef: 9c pushf 10bff0: fa cli 10bff1: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10bff2: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bff4: 8d 4a 04 lea 0x4(%edx),%ecx if ( !_Chain_Is_empty( the_chain ) ) 10bff7: 39 c8 cmp %ecx,%eax 10bff9: 74 0d je 10c008 <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10bffb: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10bffd: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10bfff: 89 51 04 mov %edx,0x4(%ecx) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10c002: 53 push %ebx 10c003: 9d popf return return_node; } 10c004: 5b pop %ebx 10c005: c9 leave 10c006: c3 ret 10c007: 90 nop <== NOT EXECUTED ) { ISR_Level level; Chain_Node *return_node; return_node = NULL; 10c008: 31 c0 xor %eax,%eax 10c00a: eb f6 jmp 10c002 <_Chain_Get+0x1a> =============================================================================== 0010c550 <_Chain_Get_with_empty_check>: bool _Chain_Get_with_empty_check( Chain_Control *chain, Chain_Node **node ) { 10c550: 55 push %ebp 10c551: 89 e5 mov %esp,%ebp 10c553: 57 push %edi 10c554: 56 push %esi 10c555: 53 push %ebx 10c556: 8b 45 08 mov 0x8(%ebp),%eax 10c559: 8b 7d 0c mov 0xc(%ebp),%edi ISR_Level level; bool is_empty_now; _ISR_Disable( level ); 10c55c: 9c pushf 10c55d: fa cli 10c55e: 5e pop %esi Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; Chain_Node *first = the_chain->first; 10c55f: 8b 10 mov (%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c561: 8d 58 04 lea 0x4(%eax),%ebx ) { bool is_empty_now = true; Chain_Node *first = the_chain->first; if ( first != _Chain_Tail( the_chain ) ) { 10c564: 39 da cmp %ebx,%edx 10c566: 74 18 je 10c580 <_Chain_Get_with_empty_check+0x30><== NEVER TAKEN Chain_Node *new_first = first->next; 10c568: 8b 0a mov (%edx),%ecx the_chain->first = new_first; 10c56a: 89 08 mov %ecx,(%eax) new_first->previous = _Chain_Head( the_chain ); 10c56c: 89 41 04 mov %eax,0x4(%ecx) *the_node = first; 10c56f: 89 17 mov %edx,(%edi) is_empty_now = new_first == _Chain_Tail( the_chain ); 10c571: 39 cb cmp %ecx,%ebx 10c573: 0f 94 c0 sete %al is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); _ISR_Enable( level ); 10c576: 56 push %esi 10c577: 9d popf return is_empty_now; } 10c578: 5b pop %ebx 10c579: 5e pop %esi 10c57a: 5f pop %edi 10c57b: c9 leave 10c57c: c3 ret 10c57d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else *the_node = NULL; 10c580: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected( Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; 10c586: b0 01 mov $0x1,%al <== NOT EXECUTED 10c588: eb ec jmp 10c576 <_Chain_Get_with_empty_check+0x26><== NOT EXECUTED =============================================================================== 00110f80 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110f80: 55 push %ebp 110f81: 89 e5 mov %esp,%ebp 110f83: 57 push %edi 110f84: 56 push %esi 110f85: 53 push %ebx 110f86: 83 ec 04 sub $0x4,%esp 110f89: 8b 7d 08 mov 0x8(%ebp),%edi 110f8c: 8b 4d 10 mov 0x10(%ebp),%ecx 110f8f: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110f92: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 110f94: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 110f9b: 85 c9 test %ecx,%ecx 110f9d: 74 23 je 110fc2 <_Chain_Initialize+0x42><== NEVER TAKEN 110f9f: 49 dec %ecx 110fa0: 89 4d f0 mov %ecx,-0x10(%ebp) Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 110fa3: 8b 45 0c mov 0xc(%ebp),%eax 110fa6: eb 05 jmp 110fad <_Chain_Initialize+0x2d> while ( count-- ) { 110fa8: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 110faa: 89 d8 mov %ebx,%eax 110fac: 49 dec %ecx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 110fad: 89 02 mov %eax,(%edx) next->previous = current; 110faf: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 110fb2: 8d 1c 30 lea (%eax,%esi,1),%ebx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 110fb5: 85 c9 test %ecx,%ecx 110fb7: 75 ef jne 110fa8 <_Chain_Initialize+0x28> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 110fb9: 8b 55 f0 mov -0x10(%ebp),%edx 110fbc: 0f af d6 imul %esi,%edx 110fbf: 03 55 0c add 0xc(%ebp),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110fc2: 8d 47 04 lea 0x4(%edi),%eax 110fc5: 89 02 mov %eax,(%edx) current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); the_chain->last = current; 110fc7: 89 57 08 mov %edx,0x8(%edi) } 110fca: 58 pop %eax 110fcb: 5b pop %ebx 110fcc: 5e pop %esi 110fcd: 5f pop %edi 110fce: c9 leave 110fcf: c3 ret =============================================================================== 0010b050 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b050: 55 push %ebp 10b051: 89 e5 mov %esp,%ebp 10b053: 57 push %edi 10b054: 56 push %esi 10b055: 53 push %ebx 10b056: 83 ec 2c sub $0x2c,%esp 10b059: 8b 45 08 mov 0x8(%ebp),%eax 10b05c: 8b 4d 0c mov 0xc(%ebp),%ecx 10b05f: 8b 55 10 mov 0x10(%ebp),%edx 10b062: 89 55 dc mov %edx,-0x24(%ebp) 10b065: 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; 10b068: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b06e: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b075: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi _ISR_Disable( level ); 10b07b: 9c pushf 10b07c: fa cli 10b07d: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b080: 8b 16 mov (%esi),%edx 10b082: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b085: 21 c2 and %eax,%edx 10b087: 89 55 e4 mov %edx,-0x1c(%ebp) 10b08a: 74 0d je 10b099 <_Event_Seize+0x49> 10b08c: 39 d0 cmp %edx,%eax 10b08e: 0f 84 84 00 00 00 je 10b118 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10b094: f6 c1 02 test $0x2,%cl 10b097: 75 7f jne 10b118 <_Event_Seize+0xc8> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b099: f6 c1 01 test $0x1,%cl 10b09c: 75 62 jne 10b100 <_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; 10b09e: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b0a1: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b0a4: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b0a7: c7 05 88 6e 12 00 01 movl $0x1,0x126e88 10b0ae: 00 00 00 _ISR_Enable( level ); 10b0b1: ff 75 e0 pushl -0x20(%ebp) 10b0b4: 9d popf if ( ticks ) { 10b0b5: 8b 45 dc mov -0x24(%ebp),%eax 10b0b8: 85 c0 test %eax,%eax 10b0ba: 0f 85 80 00 00 00 jne 10b140 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b0c0: 83 ec 08 sub $0x8,%esp 10b0c3: 68 00 01 00 00 push $0x100 10b0c8: 53 push %ebx 10b0c9: e8 b6 2e 00 00 call 10df84 <_Thread_Set_state> _ISR_Disable( level ); 10b0ce: 9c pushf 10b0cf: fa cli 10b0d0: 5a pop %edx sync_state = _Event_Sync_state; 10b0d1: a1 88 6e 12 00 mov 0x126e88,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b0d6: c7 05 88 6e 12 00 00 movl $0x0,0x126e88 10b0dd: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b0e0: 83 c4 10 add $0x10,%esp 10b0e3: 83 f8 01 cmp $0x1,%eax 10b0e6: 74 4c je 10b134 <_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 ); 10b0e8: 89 55 10 mov %edx,0x10(%ebp) 10b0eb: 89 5d 0c mov %ebx,0xc(%ebp) 10b0ee: 89 45 08 mov %eax,0x8(%ebp) } 10b0f1: 8d 65 f4 lea -0xc(%ebp),%esp 10b0f4: 5b pop %ebx 10b0f5: 5e pop %esi 10b0f6: 5f pop %edi 10b0f7: 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 ); 10b0f8: e9 5b 20 00 00 jmp 10d158 <_Thread_blocking_operation_Cancel> 10b0fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b100: ff 75 e0 pushl -0x20(%ebp) 10b103: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b104: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b10b: 8b 55 e4 mov -0x1c(%ebp),%edx 10b10e: 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 ); } 10b110: 8d 65 f4 lea -0xc(%ebp),%esp 10b113: 5b pop %ebx 10b114: 5e pop %esi 10b115: 5f pop %edi 10b116: c9 leave 10b117: c3 ret RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 10b118: 8b 45 e4 mov -0x1c(%ebp),%eax 10b11b: f7 d0 not %eax 10b11d: 23 45 d4 and -0x2c(%ebp),%eax 10b120: 89 06 mov %eax,(%esi) if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b122: ff 75 e0 pushl -0x20(%ebp) 10b125: 9d popf *event_out = seized_events; 10b126: 8b 45 e4 mov -0x1c(%ebp),%eax 10b129: 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 ); } 10b12b: 8d 65 f4 lea -0xc(%ebp),%esp 10b12e: 5b pop %ebx 10b12f: 5e pop %esi 10b130: 5f pop %edi 10b131: c9 leave 10b132: c3 ret 10b133: 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 ); 10b134: 52 push %edx 10b135: 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 ); } 10b136: 8d 65 f4 lea -0xc(%ebp),%esp 10b139: 5b pop %ebx 10b13a: 5e pop %esi 10b13b: 5f pop %edi 10b13c: c9 leave 10b13d: c3 ret 10b13e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b140: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b143: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b14a: c7 43 64 f4 b2 10 00 movl $0x10b2f4,0x64(%ebx) the_watchdog->id = id; 10b151: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b154: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b15b: 8b 45 dc mov -0x24(%ebp),%eax 10b15e: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b161: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10b164: 8d 43 48 lea 0x48(%ebx),%eax 10b167: 50 push %eax 10b168: 68 a4 65 12 00 push $0x1265a4 10b16d: e8 b2 34 00 00 call 10e624 <_Watchdog_Insert> 10b172: 83 c4 10 add $0x10,%esp 10b175: e9 46 ff ff ff jmp 10b0c0 <_Event_Seize+0x70> =============================================================================== 0010b1d0 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b1d0: 55 push %ebp 10b1d1: 89 e5 mov %esp,%ebp 10b1d3: 57 push %edi 10b1d4: 56 push %esi 10b1d5: 53 push %ebx 10b1d6: 83 ec 2c sub $0x2c,%esp 10b1d9: 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 ]; 10b1dc: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b1e2: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10b1e5: 9c pushf 10b1e6: fa cli 10b1e7: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10b1ea: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b1ec: 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 ) ) { 10b1ef: 89 c6 mov %eax,%esi 10b1f1: 21 d6 and %edx,%esi 10b1f3: 89 75 e4 mov %esi,-0x1c(%ebp) 10b1f6: 74 74 je 10b26c <_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() && 10b1f8: 8b 35 94 6a 12 00 mov 0x126a94,%esi 10b1fe: 85 f6 test %esi,%esi 10b200: 74 0c je 10b20e <_Event_Surrender+0x3e> 10b202: 3b 1d 98 6a 12 00 cmp 0x126a98,%ebx 10b208: 0f 84 96 00 00 00 je 10b2a4 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b20e: f6 43 11 01 testb $0x1,0x11(%ebx) 10b212: 74 4c je 10b260 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b214: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b217: 74 05 je 10b21e <_Event_Surrender+0x4e> 10b219: 83 e7 02 and $0x2,%edi 10b21c: 74 42 je 10b260 <_Event_Surrender+0x90> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 10b21e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b221: f7 d0 not %eax 10b223: 21 d0 and %edx,%eax 10b225: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 10b227: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b22e: 8b 43 28 mov 0x28(%ebx),%eax 10b231: 8b 75 e4 mov -0x1c(%ebp),%esi 10b234: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10b236: ff 75 d4 pushl -0x2c(%ebp) 10b239: 9d popf 10b23a: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b23b: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b23f: 74 37 je 10b278 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b241: ff 75 d4 pushl -0x2c(%ebp) 10b244: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b245: 83 ec 08 sub $0x8,%esp 10b248: 68 f8 ff 03 10 push $0x1003fff8 10b24d: 53 push %ebx 10b24e: e8 91 20 00 00 call 10d2e4 <_Thread_Clear_state> 10b253: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b256: 8d 65 f4 lea -0xc(%ebp),%esp 10b259: 5b pop %ebx 10b25a: 5e pop %esi 10b25b: 5f pop %edi 10b25c: c9 leave 10b25d: c3 ret 10b25e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b260: ff 75 d4 pushl -0x2c(%ebp) 10b263: 9d popf } 10b264: 8d 65 f4 lea -0xc(%ebp),%esp 10b267: 5b pop %ebx 10b268: 5e pop %esi 10b269: 5f pop %edi 10b26a: c9 leave 10b26b: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b26c: ff 75 d4 pushl -0x2c(%ebp) 10b26f: 9d popf } return; } } _ISR_Enable( level ); } 10b270: 8d 65 f4 lea -0xc(%ebp),%esp 10b273: 5b pop %ebx 10b274: 5e pop %esi 10b275: 5f pop %edi 10b276: c9 leave 10b277: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b278: 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 ); 10b27f: ff 75 d4 pushl -0x2c(%ebp) 10b282: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b283: 83 ec 0c sub $0xc,%esp 10b286: 8d 43 48 lea 0x48(%ebx),%eax 10b289: 50 push %eax 10b28a: e8 cd 34 00 00 call 10e75c <_Watchdog_Remove> 10b28f: 58 pop %eax 10b290: 5a pop %edx 10b291: 68 f8 ff 03 10 push $0x1003fff8 10b296: 53 push %ebx 10b297: e8 48 20 00 00 call 10d2e4 <_Thread_Clear_state> 10b29c: 83 c4 10 add $0x10,%esp 10b29f: eb c3 jmp 10b264 <_Event_Surrender+0x94> 10b2a1: 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) || 10b2a4: 8b 35 88 6e 12 00 mov 0x126e88,%esi /* * 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 ) && 10b2aa: 83 fe 02 cmp $0x2,%esi 10b2ad: 74 0d je 10b2bc <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b2af: 8b 35 88 6e 12 00 mov 0x126e88,%esi * 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) || 10b2b5: 4e dec %esi 10b2b6: 0f 85 52 ff ff ff jne 10b20e <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b2bc: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b2bf: 74 05 je 10b2c6 <_Event_Surrender+0xf6> 10b2c1: 83 e7 02 and $0x2,%edi 10b2c4: 74 22 je 10b2e8 <_Event_Surrender+0x118><== NEVER TAKEN 10b2c6: 8b 45 e4 mov -0x1c(%ebp),%eax 10b2c9: f7 d0 not %eax 10b2cb: 21 d0 and %edx,%eax 10b2cd: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10b2cf: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b2d6: 8b 43 28 mov 0x28(%ebx),%eax 10b2d9: 8b 55 e4 mov -0x1c(%ebp),%edx 10b2dc: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b2de: c7 05 88 6e 12 00 03 movl $0x3,0x126e88 10b2e5: 00 00 00 } _ISR_Enable( level ); 10b2e8: ff 75 d4 pushl -0x2c(%ebp) 10b2eb: 9d popf return; 10b2ec: e9 73 ff ff ff jmp 10b264 <_Event_Surrender+0x94> =============================================================================== 0010b2f4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b2f4: 55 push %ebp 10b2f5: 89 e5 mov %esp,%ebp 10b2f7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b2fa: 8d 45 f4 lea -0xc(%ebp),%eax 10b2fd: 50 push %eax 10b2fe: ff 75 08 pushl 0x8(%ebp) 10b301: e8 c6 23 00 00 call 10d6cc <_Thread_Get> switch ( location ) { 10b306: 83 c4 10 add $0x10,%esp 10b309: 8b 55 f4 mov -0xc(%ebp),%edx 10b30c: 85 d2 test %edx,%edx 10b30e: 75 37 jne 10b347 <_Event_Timeout+0x53> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10b310: 9c pushf 10b311: fa cli 10b312: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b313: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b31a: 3b 05 98 6a 12 00 cmp 0x126a98,%eax 10b320: 74 2a je 10b34c <_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; 10b322: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b329: 52 push %edx 10b32a: 9d popf 10b32b: 83 ec 08 sub $0x8,%esp 10b32e: 68 f8 ff 03 10 push $0x1003fff8 10b333: 50 push %eax 10b334: e8 ab 1f 00 00 call 10d2e4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b339: a1 d4 64 12 00 mov 0x1264d4,%eax 10b33e: 48 dec %eax 10b33f: a3 d4 64 12 00 mov %eax,0x1264d4 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10b344: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b347: c9 leave 10b348: c3 ret 10b349: 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 ) 10b34c: 8b 0d 88 6e 12 00 mov 0x126e88,%ecx 10b352: 49 dec %ecx 10b353: 75 cd jne 10b322 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b355: c7 05 88 6e 12 00 02 movl $0x2,0x126e88 10b35c: 00 00 00 10b35f: eb c1 jmp 10b322 <_Event_Timeout+0x2e> =============================================================================== 0011120c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 11120c: 55 push %ebp 11120d: 89 e5 mov %esp,%ebp 11120f: 57 push %edi 111210: 56 push %esi 111211: 53 push %ebx 111212: 83 ec 2c sub $0x2c,%esp 111215: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 111218: 8d 47 04 lea 0x4(%edi),%eax 11121b: 89 45 dc mov %eax,-0x24(%ebp) - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 11121e: 8b 55 08 mov 0x8(%ebp),%edx 111221: 8b 52 10 mov 0x10(%edx),%edx 111224: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 111227: 39 c7 cmp %eax,%edi 111229: 0f 87 69 01 00 00 ja 111398 <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11122f: 8b 5d 14 mov 0x14(%ebp),%ebx 111232: 85 db test %ebx,%ebx 111234: 0f 85 56 01 00 00 jne 111390 <_Heap_Allocate_aligned_with_boundary+0x184> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 11123a: 8b 45 08 mov 0x8(%ebp),%eax 11123d: 8b 48 08 mov 0x8(%eax),%ecx do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 111240: 39 c8 cmp %ecx,%eax 111242: 0f 84 50 01 00 00 je 111398 <_Heap_Allocate_aligned_with_boundary+0x18c> 111248: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 11124f: 8b 55 cc mov -0x34(%ebp),%edx 111252: 83 c2 07 add $0x7,%edx 111255: 89 55 c8 mov %edx,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 111258: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 11125f: 29 7d d0 sub %edi,-0x30(%ebp) 111262: eb 1e jmp 111282 <_Heap_Allocate_aligned_with_boundary+0x76> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 111264: 8d 59 08 lea 0x8(%ecx),%ebx } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 111267: 85 db test %ebx,%ebx 111269: 0f 85 f1 00 00 00 jne 111360 <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN break; } block = block->next; 11126f: 8b 49 08 mov 0x8(%ecx),%ecx 111272: 8b 45 e4 mov -0x1c(%ebp),%eax 111275: 40 inc %eax do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 111276: 39 4d 08 cmp %ecx,0x8(%ebp) 111279: 0f 84 25 01 00 00 je 1113a4 <_Heap_Allocate_aligned_with_boundary+0x198> 11127f: 89 45 e4 mov %eax,-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 ) { 111282: 8b 59 04 mov 0x4(%ecx),%ebx 111285: 39 5d dc cmp %ebx,-0x24(%ebp) 111288: 73 e5 jae 11126f <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 11128a: 8b 55 10 mov 0x10(%ebp),%edx 11128d: 85 d2 test %edx,%edx 11128f: 74 d3 je 111264 <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 111291: 8b 45 08 mov 0x8(%ebp),%eax 111294: 8b 40 14 mov 0x14(%eax),%eax 111297: 89 45 d8 mov %eax,-0x28(%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; 11129a: 83 e3 fe and $0xfffffffe,%ebx uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 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; 11129d: 8d 1c 19 lea (%ecx,%ebx,1),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1112a0: 8d 51 08 lea 0x8(%ecx),%edx 1112a3: 89 55 d4 mov %edx,-0x2c(%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; 1112a6: 8b 75 c8 mov -0x38(%ebp),%esi 1112a9: 29 c6 sub %eax,%esi uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 1112ab: 01 de add %ebx,%esi + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 1112ad: 03 5d d0 add -0x30(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1112b0: 89 d8 mov %ebx,%eax 1112b2: 31 d2 xor %edx,%edx 1112b4: f7 75 10 divl 0x10(%ebp) 1112b7: 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 ) { 1112b9: 39 de cmp %ebx,%esi 1112bb: 73 0b jae 1112c8 <_Heap_Allocate_aligned_with_boundary+0xbc> 1112bd: 89 f0 mov %esi,%eax 1112bf: 31 d2 xor %edx,%edx 1112c1: f7 75 10 divl 0x10(%ebp) 1112c4: 89 f3 mov %esi,%ebx 1112c6: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 1112c8: 8b 45 14 mov 0x14(%ebp),%eax 1112cb: 85 c0 test %eax,%eax 1112cd: 74 5b je 11132a <_Heap_Allocate_aligned_with_boundary+0x11e> /* 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; 1112cf: 8d 34 3b lea (%ebx,%edi,1),%esi 1112d2: 89 f0 mov %esi,%eax 1112d4: 31 d2 xor %edx,%edx 1112d6: f7 75 14 divl 0x14(%ebp) 1112d9: 89 f0 mov %esi,%eax 1112db: 29 d0 sub %edx,%eax /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 1112dd: 39 c3 cmp %eax,%ebx 1112df: 73 49 jae 11132a <_Heap_Allocate_aligned_with_boundary+0x11e> 1112e1: 39 c6 cmp %eax,%esi 1112e3: 76 45 jbe 11132a <_Heap_Allocate_aligned_with_boundary+0x11e> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 1112e5: 8b 55 d4 mov -0x2c(%ebp),%edx 1112e8: 01 fa add %edi,%edx 1112ea: 89 55 e0 mov %edx,-0x20(%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 ) { 1112ed: 39 c2 cmp %eax,%edx 1112ef: 0f 87 7a ff ff ff ja 11126f <_Heap_Allocate_aligned_with_boundary+0x63> 1112f5: 89 ce mov %ecx,%esi 1112f7: eb 10 jmp 111309 <_Heap_Allocate_aligned_with_boundary+0xfd> 1112f9: 8d 76 00 lea 0x0(%esi),%esi <== 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 ) { 1112fc: 39 c1 cmp %eax,%ecx 1112fe: 76 28 jbe 111328 <_Heap_Allocate_aligned_with_boundary+0x11c> if ( boundary_line < boundary_floor ) { 111300: 39 45 e0 cmp %eax,-0x20(%ebp) 111303: 0f 87 9f 00 00 00 ja 1113a8 <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 111309: 89 c3 mov %eax,%ebx 11130b: 29 fb sub %edi,%ebx 11130d: 89 d8 mov %ebx,%eax 11130f: 31 d2 xor %edx,%edx 111311: f7 75 10 divl 0x10(%ebp) 111314: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 111316: 8d 0c 3b lea (%ebx,%edi,1),%ecx 111319: 89 c8 mov %ecx,%eax 11131b: 31 d2 xor %edx,%edx 11131d: f7 75 14 divl 0x14(%ebp) 111320: 89 c8 mov %ecx,%eax 111322: 29 d0 sub %edx,%eax /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 111324: 39 c3 cmp %eax,%ebx 111326: 72 d4 jb 1112fc <_Heap_Allocate_aligned_with_boundary+0xf0> 111328: 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 ) { 11132a: 39 5d d4 cmp %ebx,-0x2c(%ebp) 11132d: 0f 87 3c ff ff ff ja 11126f <_Heap_Allocate_aligned_with_boundary+0x63> 111333: be f8 ff ff ff mov $0xfffffff8,%esi 111338: 29 ce sub %ecx,%esi uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11133a: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11133c: 89 d8 mov %ebx,%eax 11133e: 31 d2 xor %edx,%edx 111340: f7 75 cc divl -0x34(%ebp) uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 111343: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 111345: 39 75 d8 cmp %esi,-0x28(%ebp) 111348: 0f 86 19 ff ff ff jbe 111267 <_Heap_Allocate_aligned_with_boundary+0x5b> 11134e: 85 f6 test %esi,%esi 111350: 0f 85 19 ff ff ff jne 11126f <_Heap_Allocate_aligned_with_boundary+0x63> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 111356: 85 db test %ebx,%ebx 111358: 0f 84 11 ff ff ff je 11126f <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 11135e: 66 90 xchg %ax,%ax search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 111360: 8b 45 08 mov 0x8(%ebp),%eax 111363: ff 40 48 incl 0x48(%eax) stats->searches += search_count; 111366: 8b 55 e4 mov -0x1c(%ebp),%edx 111369: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 11136c: 57 push %edi 11136d: 53 push %ebx 11136e: 51 push %ecx 11136f: 50 push %eax 111370: e8 67 b4 ff ff call 10c7dc <_Heap_Block_allocate> 111375: 89 d8 mov %ebx,%eax 111377: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 11137a: 8b 55 e4 mov -0x1c(%ebp),%edx 11137d: 8b 4d 08 mov 0x8(%ebp),%ecx 111380: 39 51 44 cmp %edx,0x44(%ecx) 111383: 73 15 jae 11139a <_Heap_Allocate_aligned_with_boundary+0x18e> stats->max_search = search_count; 111385: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 111388: 8d 65 f4 lea -0xc(%ebp),%esp 11138b: 5b pop %ebx 11138c: 5e pop %esi 11138d: 5f pop %edi 11138e: c9 leave 11138f: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 111390: 3b 7d 14 cmp 0x14(%ebp),%edi 111393: 76 1a jbe 1113af <_Heap_Allocate_aligned_with_boundary+0x1a3> 111395: 8d 76 00 lea 0x0(%esi),%esi do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 111398: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 11139a: 8d 65 f4 lea -0xc(%ebp),%esp 11139d: 5b pop %ebx 11139e: 5e pop %esi 11139f: 5f pop %edi 1113a0: c9 leave 1113a1: c3 ret 1113a2: 66 90 xchg %ax,%ax <== NOT EXECUTED do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1113a4: 31 c0 xor %eax,%eax 1113a6: eb d2 jmp 11137a <_Heap_Allocate_aligned_with_boundary+0x16e> 1113a8: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1113aa: e9 c0 fe ff ff jmp 11126f <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 1113af: 8b 4d 10 mov 0x10(%ebp),%ecx 1113b2: 85 c9 test %ecx,%ecx 1113b4: 0f 85 80 fe ff ff jne 11123a <_Heap_Allocate_aligned_with_boundary+0x2e> alignment = page_size; 1113ba: 89 55 10 mov %edx,0x10(%ebp) 1113bd: e9 78 fe ff ff jmp 11123a <_Heap_Allocate_aligned_with_boundary+0x2e> =============================================================================== 0010c7dc <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10c7dc: 55 push %ebp 10c7dd: 89 e5 mov %esp,%ebp 10c7df: 57 push %edi 10c7e0: 56 push %esi 10c7e1: 53 push %ebx 10c7e2: 83 ec 14 sub $0x14,%esp 10c7e5: 8b 5d 08 mov 0x8(%ebp),%ebx 10c7e8: 8b 75 0c mov 0xc(%ebp),%esi 10c7eb: 8b 45 10 mov 0x10(%ebp),%eax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c7ee: 8d 50 f8 lea -0x8(%eax),%edx 10c7f1: 89 55 f0 mov %edx,-0x10(%ebp) Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10c7f4: 29 f2 sub %esi,%edx 10c7f6: 89 55 e4 mov %edx,-0x1c(%ebp) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c7f9: 8b 4e 04 mov 0x4(%esi),%ecx 10c7fc: 89 4d e8 mov %ecx,-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; 10c7ff: 89 ca mov %ecx,%edx 10c801: 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); 10c804: 8d 0c 16 lea (%esi,%edx,1),%ecx 10c807: 89 4d ec mov %ecx,-0x14(%ebp) Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10c80a: f6 41 04 01 testb $0x1,0x4(%ecx) 10c80e: 0f 85 80 00 00 00 jne 10c894 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10c814: 8b 4e 0c mov 0xc(%esi),%ecx } _Heap_Protection_block_initialize( heap, block ); return block; } 10c817: 8b 7e 08 mov 0x8(%esi),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 10c81a: 89 79 08 mov %edi,0x8(%ecx) next->prev = prev; 10c81d: 89 4f 0c mov %ecx,0xc(%edi) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10c820: ff 4b 38 decl 0x38(%ebx) ++stats->used_blocks; 10c823: ff 43 40 incl 0x40(%ebx) stats->free_size -= _Heap_Block_size( block ); 10c826: 29 53 30 sub %edx,0x30(%ebx) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10c829: 8b 53 10 mov 0x10(%ebx),%edx 10c82c: 89 55 e0 mov %edx,-0x20(%ebp) 10c82f: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c832: 72 6d jb 10c8a1 <_Heap_Block_allocate+0xc5> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c834: 31 d2 xor %edx,%edx 10c836: f7 75 e0 divl -0x20(%ebp) 10c839: 89 d7 mov %edx,%edi uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10c83b: 8b 55 f0 mov -0x10(%ebp),%edx 10c83e: 29 fa sub %edi,%edx 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 ) 10c840: 89 55 f0 mov %edx,-0x10(%ebp) uintptr_t block_end = block_begin + block_size; Heap_Block *const new_block = _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; 10c843: 8b 45 ec mov -0x14(%ebp),%eax 10c846: 29 d0 sub %edx,%eax 10c848: 89 45 ec mov %eax,-0x14(%ebp) block_end = new_block_begin; block_size = block_end - block_begin; 10c84b: 89 d0 mov %edx,%eax 10c84d: 29 f0 sub %esi,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10c84f: 01 43 30 add %eax,0x30(%ebx) if ( _Heap_Is_prev_used( block ) ) { 10c852: f6 45 e8 01 testb $0x1,-0x18(%ebp) 10c856: 75 60 jne 10c8b8 <_Heap_Block_allocate+0xdc> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10c858: 2b 36 sub (%esi),%esi - 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; 10c85a: 8b 7e 04 mov 0x4(%esi),%edi 10c85d: 83 e7 fe and $0xfffffffe,%edi 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; 10c860: 01 f8 add %edi,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10c862: 89 c7 mov %eax,%edi 10c864: 83 cf 01 or $0x1,%edi 10c867: 89 7e 04 mov %edi,0x4(%esi) new_block->prev_size = block_size; 10c86a: 89 02 mov %eax,(%edx) new_block->size_and_flag = new_block_size; 10c86c: 8b 45 ec mov -0x14(%ebp),%eax 10c86f: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10c872: ff 75 14 pushl 0x14(%ebp) 10c875: 89 d8 mov %ebx,%eax 10c877: e8 f0 fc ff ff call 10c56c <_Heap_Block_split> 10c87c: 58 pop %eax alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10c87d: 8b 43 30 mov 0x30(%ebx),%eax 10c880: 39 43 34 cmp %eax,0x34(%ebx) 10c883: 76 03 jbe 10c888 <_Heap_Block_allocate+0xac> stats->min_free_size = stats->free_size; 10c885: 89 43 34 mov %eax,0x34(%ebx) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c888: 8b 45 f0 mov -0x10(%ebp),%eax 10c88b: 8d 65 f4 lea -0xc(%ebp),%esp 10c88e: 5b pop %ebx 10c88f: 5e pop %esi 10c890: 5f pop %edi 10c891: c9 leave 10c892: c3 ret 10c893: 90 nop <== 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 ); 10c894: 89 d9 mov %ebx,%ecx } if ( alloc_area_offset < heap->page_size ) { 10c896: 8b 53 10 mov 0x10(%ebx),%edx 10c899: 89 55 e0 mov %edx,-0x20(%ebp) 10c89c: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c89f: 73 93 jae 10c834 <_Heap_Block_allocate+0x58> alloc_size += alloc_area_offset; 10c8a1: 8b 45 e4 mov -0x1c(%ebp),%eax 10c8a4: 03 45 14 add 0x14(%ebp),%eax Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10c8a7: 50 push %eax 10c8a8: 89 f2 mov %esi,%edx 10c8aa: 89 d8 mov %ebx,%eax 10c8ac: e8 bb fc ff ff call 10c56c <_Heap_Block_split> 10c8b1: 5a pop %edx 10c8b2: 89 75 f0 mov %esi,-0x10(%ebp) 10c8b5: eb c6 jmp 10c87d <_Heap_Block_allocate+0xa1> 10c8b7: 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; 10c8b8: 8b 79 08 mov 0x8(%ecx),%edi new_block->next = next; 10c8bb: 89 7e 08 mov %edi,0x8(%esi) new_block->prev = block_before; 10c8be: 89 4e 0c mov %ecx,0xc(%esi) block_before->next = new_block; 10c8c1: 89 71 08 mov %esi,0x8(%ecx) next->prev = new_block; 10c8c4: 89 77 0c mov %esi,0xc(%edi) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10c8c7: ff 43 38 incl 0x38(%ebx) 10c8ca: 89 f1 mov %esi,%ecx 10c8cc: eb 94 jmp 10c862 <_Heap_Block_allocate+0x86> =============================================================================== 0010c56c <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c56c: 55 push %ebp 10c56d: 89 e5 mov %esp,%ebp 10c56f: 57 push %edi 10c570: 56 push %esi 10c571: 53 push %ebx 10c572: 83 ec 18 sub $0x18,%esp 10c575: 89 c3 mov %eax,%ebx 10c577: 89 d6 mov %edx,%esi Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c579: 8b 78 10 mov 0x10(%eax),%edi uintptr_t const min_block_size = heap->min_block_size; 10c57c: 8b 40 14 mov 0x14(%eax),%eax 10c57f: 89 45 e4 mov %eax,-0x1c(%ebp) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c582: 8b 52 04 mov 0x4(%edx),%edx 10c585: 89 55 e0 mov %edx,-0x20(%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; 10c588: 83 e2 fe and $0xfffffffe,%edx 10c58b: 89 55 ec mov %edx,-0x14(%ebp) { Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; 10c58e: 89 c2 mov %eax,%edx 10c590: 83 ea 08 sub $0x8,%edx return heap->stats.size; } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b ) { return a > b ? a : b; 10c593: 8b 45 08 mov 0x8(%ebp),%eax 10c596: 39 d0 cmp %edx,%eax 10c598: 73 02 jae 10c59c <_Heap_Block_split+0x30> 10c59a: 89 d0 mov %edx,%eax uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = 10c59c: 83 c0 08 add $0x8,%eax 10c59f: 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; 10c5a2: 31 d2 xor %edx,%edx 10c5a4: f7 f7 div %edi if ( remainder != 0 ) { 10c5a6: 85 d2 test %edx,%edx 10c5a8: 0f 84 8e 00 00 00 je 10c63c <_Heap_Block_split+0xd0> return value - remainder + alignment; 10c5ae: 03 7d f0 add -0x10(%ebp),%edi 10c5b1: 29 d7 sub %edx,%edi 10c5b3: 89 7d e8 mov %edi,-0x18(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c5b6: 8b 45 ec mov -0x14(%ebp),%eax 10c5b9: 01 f0 add %esi,%eax 10c5bb: 89 45 dc mov %eax,-0x24(%ebp) _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size ); uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size; 10c5be: 8b 55 ec mov -0x14(%ebp),%edx 10c5c1: 83 c2 04 add $0x4,%edx 10c5c4: 2b 55 f0 sub -0x10(%ebp),%edx uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS; 10c5c7: 8b 7d e4 mov -0x1c(%ebp),%edi 10c5ca: 83 c7 04 add $0x4,%edi Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_ALLOC_BONUS ); _HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS ); if ( free_size >= free_size_limit ) { 10c5cd: 39 fa cmp %edi,%edx 10c5cf: 72 77 jb 10c648 <_Heap_Block_split+0xdc> 10c5d1: 8b 55 e8 mov -0x18(%ebp),%edx 10c5d4: 01 f2 add %esi,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10c5d6: 8b 7d ec mov -0x14(%ebp),%edi 10c5d9: 2b 7d e8 sub -0x18(%ebp),%edi 10c5dc: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10c5df: 8b 7d e0 mov -0x20(%ebp),%edi 10c5e2: 83 e7 01 and $0x1,%edi 10c5e5: 89 7d f0 mov %edi,-0x10(%ebp) block->size_and_flag = size | flag; 10c5e8: 8b 7d e8 mov -0x18(%ebp),%edi 10c5eb: 09 7d f0 or %edi,-0x10(%ebp) 10c5ee: 8b 7d f0 mov -0x10(%ebp),%edi 10c5f1: 89 7e 04 mov %edi,0x4(%esi) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10c5f4: 8b 75 ec mov -0x14(%ebp),%esi 10c5f7: 01 73 30 add %esi,0x30(%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; 10c5fa: 8b 70 04 mov 0x4(%eax),%esi 10c5fd: 83 e6 fe and $0xfffffffe,%esi if ( _Heap_Is_used( next_block ) ) { 10c600: f6 44 30 04 01 testb $0x1,0x4(%eax,%esi,1) 10c605: 75 51 jne 10c658 <_Heap_Block_split+0xec> } _Heap_Protection_block_initialize( heap, block ); return block; } 10c607: 8b 48 08 mov 0x8(%eax),%ecx 10c60a: 8b 40 0c mov 0xc(%eax),%eax ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 10c60d: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c610: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c613: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c616: 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; 10c619: 01 75 ec add %esi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c61c: 8b 45 ec mov -0x14(%ebp),%eax 10c61f: 01 d0 add %edx,%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10c621: 8b 4d ec mov -0x14(%ebp),%ecx 10c624: 83 c9 01 or $0x1,%ecx 10c627: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c62a: 8b 7d ec mov -0x14(%ebp),%edi 10c62d: 89 38 mov %edi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c62f: 83 60 04 fe andl $0xfffffffe,0x4(%eax) _Heap_Protection_block_initialize( heap, free_block ); } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c633: 83 c4 18 add $0x18,%esp 10c636: 5b pop %ebx 10c637: 5e pop %esi 10c638: 5f pop %edi 10c639: c9 leave 10c63a: c3 ret 10c63b: 90 nop <== NOT EXECUTED uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c63c: 8b 7d f0 mov -0x10(%ebp),%edi 10c63f: 89 7d e8 mov %edi,-0x18(%ebp) 10c642: e9 6f ff ff ff jmp 10c5b6 <_Heap_Block_split+0x4a> 10c647: 90 nop <== NOT EXECUTED next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, free_block ); } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10c648: 8b 45 dc mov -0x24(%ebp),%eax 10c64b: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c64f: 83 c4 18 add $0x18,%esp 10c652: 5b pop %ebx 10c653: 5e pop %esi 10c654: 5f pop %edi 10c655: c9 leave 10c656: c3 ret 10c657: 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; 10c658: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10c65b: 89 72 08 mov %esi,0x8(%edx) new_block->prev = block_before; 10c65e: 89 4a 0c mov %ecx,0xc(%edx) block_before->next = new_block; 10c661: 89 51 08 mov %edx,0x8(%ecx) next->prev = new_block; 10c664: 89 56 0c mov %edx,0xc(%esi) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10c667: ff 43 38 incl 0x38(%ebx) 10c66a: eb b5 jmp 10c621 <_Heap_Block_split+0xb5> =============================================================================== 00111790 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 111790: 55 push %ebp 111791: 89 e5 mov %esp,%ebp 111793: 57 push %edi 111794: 56 push %esi 111795: 53 push %ebx 111796: 83 ec 4c sub $0x4c,%esp 111799: 8b 5d 08 mov 0x8(%ebp),%ebx 11179c: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 11179f: 8b 43 20 mov 0x20(%ebx),%eax 1117a2: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 1117a5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 1117ac: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 1117b3: 8b 53 10 mov 0x10(%ebx),%edx 1117b6: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 1117b9: 8b 43 14 mov 0x14(%ebx),%eax uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 1117bc: 8b 73 30 mov 0x30(%ebx),%esi 1117bf: 89 75 c0 mov %esi,-0x40(%ebp) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 1117c2: 8b 55 0c mov 0xc(%ebp),%edx 1117c5: 01 ca add %ecx,%edx 1117c7: 89 55 cc mov %edx,-0x34(%ebp) 1117ca: 73 0c jae 1117d8 <_Heap_Extend+0x48> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 1117cc: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 1117ce: 8d 65 f4 lea -0xc(%ebp),%esp 1117d1: 5b pop %ebx 1117d2: 5e pop %esi 1117d3: 5f pop %edi 1117d4: c9 leave 1117d5: c3 ret 1117d6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 1117d8: 83 ec 08 sub $0x8,%esp 1117db: 8d 55 e0 lea -0x20(%ebp),%edx 1117de: 52 push %edx 1117df: 8d 55 e4 lea -0x1c(%ebp),%edx 1117e2: 52 push %edx 1117e3: 50 push %eax 1117e4: ff 75 d4 pushl -0x2c(%ebp) 1117e7: 51 push %ecx 1117e8: ff 75 0c pushl 0xc(%ebp) 1117eb: e8 f8 b1 ff ff call 10c9e8 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 1117f0: 83 c4 20 add $0x20,%esp 1117f3: 84 c0 test %al,%al 1117f5: 74 d5 je 1117cc <_Heap_Extend+0x3c> 1117f7: 8b 7d d0 mov -0x30(%ebp),%edi 1117fa: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 111801: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 111808: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 11180f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 111816: 8b 75 cc mov -0x34(%ebp),%esi 111819: 89 5d b4 mov %ebx,-0x4c(%ebp) 11181c: eb 30 jmp 11184e <_Heap_Extend+0xbe> 11181e: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 111820: 39 ce cmp %ecx,%esi 111822: 73 03 jae 111827 <_Heap_Extend+0x97> 111824: 89 7d b8 mov %edi,-0x48(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 111827: 8d 59 f8 lea -0x8(%ecx),%ebx 11182a: 89 c8 mov %ecx,%eax 11182c: 31 d2 xor %edx,%edx 11182e: f7 75 d4 divl -0x2c(%ebp) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 111831: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 111833: 3b 4d 0c cmp 0xc(%ebp),%ecx 111836: 74 3c je 111874 <_Heap_Extend+0xe4> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 111838: 39 4d 0c cmp %ecx,0xc(%ebp) 11183b: 76 03 jbe 111840 <_Heap_Extend+0xb0> 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 ) 11183d: 89 5d bc mov %ebx,-0x44(%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; 111840: 8b 7b 04 mov 0x4(%ebx),%edi 111843: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 111846: 8d 3c 3b lea (%ebx,%edi,1),%edi link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 111849: 39 7d d0 cmp %edi,-0x30(%ebp) 11184c: 74 39 je 111887 <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 11184e: 3b 7d d0 cmp -0x30(%ebp),%edi 111851: 0f 84 35 01 00 00 je 11198c <_Heap_Extend+0x1fc> 111857: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 111859: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 11185b: 39 4d 0c cmp %ecx,0xc(%ebp) 11185e: 73 08 jae 111868 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 111860: 39 f0 cmp %esi,%eax 111862: 0f 82 64 ff ff ff jb 1117cc <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 111868: 39 f0 cmp %esi,%eax 11186a: 75 b4 jne 111820 <_Heap_Extend+0x90> 11186c: 89 7d c4 mov %edi,-0x3c(%ebp) 11186f: eb b6 jmp 111827 <_Heap_Extend+0x97> 111871: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { start_block->prev_size = extend_area_end; 111874: 89 37 mov %esi,(%edi) 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 ) 111876: 89 5d c8 mov %ebx,-0x38(%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; 111879: 8b 7b 04 mov 0x4(%ebx),%edi 11187c: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11187f: 8d 3c 3b lea (%ebx,%edi,1),%edi } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 111882: 39 7d d0 cmp %edi,-0x30(%ebp) 111885: 75 c7 jne 11184e <_Heap_Extend+0xbe> <== NEVER TAKEN 111887: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 11188a: 8b 75 0c mov 0xc(%ebp),%esi 11188d: 3b 73 18 cmp 0x18(%ebx),%esi 111890: 0f 82 02 01 00 00 jb 111998 <_Heap_Extend+0x208> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 111896: 8b 45 cc mov -0x34(%ebp),%eax 111899: 3b 43 1c cmp 0x1c(%ebx),%eax 11189c: 76 03 jbe 1118a1 <_Heap_Extend+0x111> heap->area_end = extend_area_end; 11189e: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 1118a1: 8b 55 e0 mov -0x20(%ebp),%edx 1118a4: 8b 45 e4 mov -0x1c(%ebp),%eax heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 1118a7: 89 d1 mov %edx,%ecx 1118a9: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 1118ab: 8b 75 cc mov -0x34(%ebp),%esi 1118ae: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 1118b0: 89 ce mov %ecx,%esi 1118b2: 83 ce 01 or $0x1,%esi 1118b5: 89 70 04 mov %esi,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 1118b8: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 1118ba: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 1118c1: 39 43 20 cmp %eax,0x20(%ebx) 1118c4: 0f 86 d6 00 00 00 jbe 1119a0 <_Heap_Extend+0x210> heap->first_block = extend_first_block; 1118ca: 89 43 20 mov %eax,0x20(%ebx) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 1118cd: 8b 75 c4 mov -0x3c(%ebp),%esi 1118d0: 85 f6 test %esi,%esi 1118d2: 0f 84 04 01 00 00 je 1119dc <_Heap_Extend+0x24c> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 1118d8: 8b 73 10 mov 0x10(%ebx),%esi uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 1118db: 8b 4d 0c mov 0xc(%ebp),%ecx 1118de: 83 c1 08 add $0x8,%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 1118e1: 89 c8 mov %ecx,%eax 1118e3: 31 d2 xor %edx,%edx 1118e5: f7 f6 div %esi if ( remainder != 0 ) { 1118e7: 85 d2 test %edx,%edx 1118e9: 74 04 je 1118ef <_Heap_Extend+0x15f> <== ALWAYS TAKEN return value - remainder + alignment; 1118eb: 01 f1 add %esi,%ecx <== NOT EXECUTED 1118ed: 29 d1 sub %edx,%ecx <== NOT EXECUTED uintptr_t const new_first_block_begin = 1118ef: 8d 51 f8 lea -0x8(%ecx),%edx uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 1118f2: 8b 75 c4 mov -0x3c(%ebp),%esi 1118f5: 8b 06 mov (%esi),%eax 1118f7: 89 41 f8 mov %eax,-0x8(%ecx) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 1118fa: 89 f0 mov %esi,%eax 1118fc: 29 d0 sub %edx,%eax first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 1118fe: 83 c8 01 or $0x1,%eax 111901: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 111904: 89 d8 mov %ebx,%eax 111906: e8 69 fe ff ff call 111774 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 11190b: 8b 45 c8 mov -0x38(%ebp),%eax 11190e: 85 c0 test %eax,%eax 111910: 0f 84 9e 00 00 00 je 1119b4 <_Heap_Extend+0x224> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 111916: 8b 4d cc mov -0x34(%ebp),%ecx 111919: 83 e9 08 sub $0x8,%ecx uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 11191c: 2b 4d c8 sub -0x38(%ebp),%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11191f: 89 c8 mov %ecx,%eax 111921: 31 d2 xor %edx,%edx 111923: f7 73 10 divl 0x10(%ebx) 111926: 29 d1 sub %edx,%ecx ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 111928: 8b 55 c8 mov -0x38(%ebp),%edx 11192b: 8b 42 04 mov 0x4(%edx),%eax 11192e: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 111930: 83 c8 01 or $0x1,%eax 111933: 89 44 11 04 mov %eax,0x4(%ecx,%edx,1) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 111937: 8b 42 04 mov 0x4(%edx),%eax 11193a: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 11193d: 09 c8 or %ecx,%eax 11193f: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 111942: 89 d8 mov %ebx,%eax 111944: e8 2b fe ff ff call 111774 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 111949: 8b 75 c4 mov -0x3c(%ebp),%esi 11194c: 85 f6 test %esi,%esi 11194e: 0f 84 a4 00 00 00 je 1119f8 <_Heap_Extend+0x268> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 111954: 8b 53 24 mov 0x24(%ebx),%edx * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 111957: 8b 43 20 mov 0x20(%ebx),%eax 11195a: 29 d0 sub %edx,%eax RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 11195c: 8b 4a 04 mov 0x4(%edx),%ecx 11195f: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 111962: 09 c8 or %ecx,%eax 111964: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 111967: 8b 43 30 mov 0x30(%ebx),%eax 11196a: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 11196d: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 111970: 8b 55 14 mov 0x14(%ebp),%edx 111973: 85 d2 test %edx,%edx 111975: 0f 84 99 00 00 00 je 111a14 <_Heap_Extend+0x284> <== NEVER TAKEN *extended_size_ptr = extended_size; 11197b: 8b 55 14 mov 0x14(%ebp),%edx 11197e: 89 02 mov %eax,(%edx) return true; 111980: b0 01 mov $0x1,%al } 111982: 8d 65 f4 lea -0xc(%ebp),%esp 111985: 5b pop %ebx 111986: 5e pop %esi 111987: 5f pop %edi 111988: c9 leave 111989: c3 ret 11198a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 11198c: 8b 55 b4 mov -0x4c(%ebp),%edx 11198f: 8b 42 18 mov 0x18(%edx),%eax 111992: e9 c2 fe ff ff jmp 111859 <_Heap_Extend+0xc9> 111997: 90 nop <== NOT EXECUTED start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; 111998: 89 73 18 mov %esi,0x18(%ebx) 11199b: e9 01 ff ff ff jmp 1118a1 <_Heap_Extend+0x111> extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 1119a0: 39 53 24 cmp %edx,0x24(%ebx) 1119a3: 0f 83 24 ff ff ff jae 1118cd <_Heap_Extend+0x13d> <== NEVER TAKEN heap->last_block = extend_last_block; 1119a9: 89 53 24 mov %edx,0x24(%ebx) 1119ac: e9 1c ff ff ff jmp 1118cd <_Heap_Extend+0x13d> 1119b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 1119b4: 8b 7d bc mov -0x44(%ebp),%edi 1119b7: 85 ff test %edi,%edi 1119b9: 74 8e je 111949 <_Heap_Extend+0x1b9> _Heap_Link_above( 1119bb: 8b 4d e0 mov -0x20(%ebp),%ecx ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 1119be: 8b 45 e4 mov -0x1c(%ebp),%eax 1119c1: 2b 45 bc sub -0x44(%ebp),%eax RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 1119c4: 8b 75 bc mov -0x44(%ebp),%esi 1119c7: 8b 56 04 mov 0x4(%esi),%edx 1119ca: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 1119cd: 09 d0 or %edx,%eax 1119cf: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 1119d2: 83 49 04 01 orl $0x1,0x4(%ecx) 1119d6: e9 6e ff ff ff jmp 111949 <_Heap_Extend+0x1b9> 1119db: 90 nop <== NOT EXECUTED heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 1119dc: 8b 4d b8 mov -0x48(%ebp),%ecx 1119df: 85 c9 test %ecx,%ecx 1119e1: 0f 84 24 ff ff ff je 11190b <_Heap_Extend+0x17b> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 1119e7: 8b 45 b8 mov -0x48(%ebp),%eax 1119ea: 29 d0 sub %edx,%eax 1119ec: 83 c8 01 or $0x1,%eax 1119ef: 89 42 04 mov %eax,0x4(%edx) 1119f2: e9 14 ff ff ff jmp 11190b <_Heap_Extend+0x17b> 1119f7: 90 nop <== NOT EXECUTED extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 1119f8: 8b 4d c8 mov -0x38(%ebp),%ecx 1119fb: 85 c9 test %ecx,%ecx 1119fd: 0f 85 51 ff ff ff jne 111954 <_Heap_Extend+0x1c4> <== NEVER TAKEN _Heap_Free_block( heap, extend_first_block ); 111a03: 8b 55 e4 mov -0x1c(%ebp),%edx 111a06: 89 d8 mov %ebx,%eax 111a08: e8 67 fd ff ff call 111774 <_Heap_Free_block> 111a0d: e9 42 ff ff ff jmp 111954 <_Heap_Extend+0x1c4> 111a12: 66 90 xchg %ax,%ax <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 111a14: b0 01 mov $0x1,%al <== NOT EXECUTED 111a16: e9 b3 fd ff ff jmp 1117ce <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 001113c4 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 1113c4: 55 push %ebp 1113c5: 89 e5 mov %esp,%ebp 1113c7: 57 push %edi 1113c8: 56 push %esi 1113c9: 53 push %ebx 1113ca: 83 ec 10 sub $0x10,%esp 1113cd: 8b 5d 08 mov 0x8(%ebp),%ebx 1113d0: 8b 45 0c mov 0xc(%ebp),%eax 1113d3: 8d 48 f8 lea -0x8(%eax),%ecx 1113d6: 31 d2 xor %edx,%edx 1113d8: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 1113db: 29 d1 sub %edx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 1113dd: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 1113e0: 39 c1 cmp %eax,%ecx 1113e2: 72 07 jb 1113eb <_Heap_Free+0x27> 1113e4: 8b 73 24 mov 0x24(%ebx),%esi 1113e7: 39 f1 cmp %esi,%ecx 1113e9: 76 0d jbe 1113f8 <_Heap_Free+0x34> /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { _HAssert( false ); return( false ); 1113eb: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1113ed: 83 c4 10 add $0x10,%esp 1113f0: 5b pop %ebx 1113f1: 5e pop %esi 1113f2: 5f pop %edi 1113f3: c9 leave 1113f4: c3 ret 1113f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1113f8: 8b 51 04 mov 0x4(%ecx),%edx 1113fb: 89 55 f0 mov %edx,-0x10(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 1113fe: 83 e2 fe and $0xfffffffe,%edx 111401: 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); 111404: 8d 14 11 lea (%ecx,%edx,1),%edx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 111407: 39 d0 cmp %edx,%eax 111409: 77 e0 ja 1113eb <_Heap_Free+0x27> <== NEVER TAKEN 11140b: 39 d6 cmp %edx,%esi 11140d: 72 dc jb 1113eb <_Heap_Free+0x27> <== NEVER TAKEN 11140f: 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 ) ) { 111412: f7 c7 01 00 00 00 test $0x1,%edi 111418: 74 d1 je 1113eb <_Heap_Free+0x27> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11141a: 83 e7 fe and $0xfffffffe,%edi 11141d: 89 7d e4 mov %edi,-0x1c(%ebp) return true; } 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 )); 111420: 39 d6 cmp %edx,%esi 111422: 0f 84 c8 00 00 00 je 1114f0 <_Heap_Free+0x12c> return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 111428: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 11142d: 0f 94 45 eb sete -0x15(%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 ) ) { 111431: f6 45 f0 01 testb $0x1,-0x10(%ebp) 111435: 75 45 jne 11147c <_Heap_Free+0xb8> uintptr_t const prev_size = block->prev_size; 111437: 8b 39 mov (%ecx),%edi 111439: 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); 11143c: 29 f9 sub %edi,%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; 11143e: 39 c8 cmp %ecx,%eax 111440: 77 a9 ja 1113eb <_Heap_Free+0x27> <== NEVER TAKEN 111442: 39 ce cmp %ecx,%esi 111444: 72 a5 jb 1113eb <_Heap_Free+0x27> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 111446: f6 41 04 01 testb $0x1,0x4(%ecx) 11144a: 74 9f je 1113eb <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 11144c: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 111450: 0f 84 a6 00 00 00 je 1114fc <_Heap_Free+0x138> uintptr_t const size = block_size + prev_size + next_block_size; 111456: 8b 7d e4 mov -0x1c(%ebp),%edi 111459: 03 7d ec add -0x14(%ebp),%edi 11145c: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 11145f: 8b 42 08 mov 0x8(%edx),%eax 111462: 8b 52 0c mov 0xc(%edx),%edx RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 111465: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 111468: 89 50 0c mov %edx,0xc(%eax) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 11146b: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11146e: 89 f8 mov %edi,%eax 111470: 83 c8 01 or $0x1,%eax 111473: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 111476: 89 3c 39 mov %edi,(%ecx,%edi,1) 111479: eb 2a jmp 1114a5 <_Heap_Free+0xe1> 11147b: 90 nop <== NOT EXECUTED 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 */ 11147c: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 111480: 74 3a je 1114bc <_Heap_Free+0xf8> uintptr_t const size = block_size + next_block_size; 111482: 8b 7d e4 mov -0x1c(%ebp),%edi 111485: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 111488: 8b 42 08 mov 0x8(%edx),%eax 11148b: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 11148e: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 111491: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 111494: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 111497: 89 4a 08 mov %ecx,0x8(%edx) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11149a: 89 f8 mov %edi,%eax 11149c: 83 c8 01 or $0x1,%eax 11149f: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 1114a2: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 1114a5: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 1114a8: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 1114ab: 8b 55 ec mov -0x14(%ebp),%edx 1114ae: 01 53 30 add %edx,0x30(%ebx) return( true ); 1114b1: b0 01 mov $0x1,%al } 1114b3: 83 c4 10 add $0x10,%esp 1114b6: 5b pop %ebx 1114b7: 5e pop %esi 1114b8: 5f pop %edi 1114b9: c9 leave 1114ba: c3 ret 1114bb: 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; 1114bc: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 1114bf: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 1114c2: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 1114c5: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 1114c8: 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; 1114cb: 8b 45 ec mov -0x14(%ebp),%eax 1114ce: 83 c8 01 or $0x1,%eax 1114d1: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 1114d4: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 1114d8: 8b 45 ec mov -0x14(%ebp),%eax 1114db: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 1114dd: 8b 43 38 mov 0x38(%ebx),%eax 1114e0: 40 inc %eax 1114e1: 89 43 38 mov %eax,0x38(%ebx) if ( stats->max_free_blocks < stats->free_blocks ) { 1114e4: 3b 43 3c cmp 0x3c(%ebx),%eax 1114e7: 76 bc jbe 1114a5 <_Heap_Free+0xe1> stats->max_free_blocks = stats->free_blocks; 1114e9: 89 43 3c mov %eax,0x3c(%ebx) 1114ec: eb b7 jmp 1114a5 <_Heap_Free+0xe1> 1114ee: 66 90 xchg %ax,%ax <== NOT EXECUTED return true; } 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 )); 1114f0: c6 45 eb 00 movb $0x0,-0x15(%ebp) 1114f4: e9 38 ff ff ff jmp 111431 <_Heap_Free+0x6d> 1114f9: 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; 1114fc: 8b 45 ec mov -0x14(%ebp),%eax 1114ff: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111502: 89 c6 mov %eax,%esi 111504: 83 ce 01 or $0x1,%esi 111507: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 11150a: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 11150e: 89 02 mov %eax,(%edx) 111510: eb 93 jmp 1114a5 <_Heap_Free+0xe1> =============================================================================== 0010c66c <_Heap_Get_first_and_last_block>: uintptr_t page_size, uintptr_t min_block_size, Heap_Block **first_block_ptr, Heap_Block **last_block_ptr ) { 10c66c: 55 push %ebp 10c66d: 89 e5 mov %esp,%ebp 10c66f: 57 push %edi 10c670: 56 push %esi 10c671: 53 push %ebx 10c672: 8b 5d 08 mov 0x8(%ebp),%ebx 10c675: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c678: 8d 34 1f lea (%edi,%ebx,1),%esi uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10c67b: 8d 4b 08 lea 0x8(%ebx),%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c67e: 89 c8 mov %ecx,%eax 10c680: 31 d2 xor %edx,%edx 10c682: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10c685: 85 d2 test %edx,%edx 10c687: 74 05 je 10c68e <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10c689: 03 4d 10 add 0x10(%ebp),%ecx 10c68c: 29 d1 sub %edx,%ecx _Heap_Align_down( heap_area_size - overhead, page_size ); Heap_Block *const first_block = (Heap_Block *) first_block_begin; Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( 10c68e: 39 f3 cmp %esi,%ebx 10c690: 77 2e ja 10c6c0 <_Heap_Get_first_and_last_block+0x54> uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 10c692: 8d 71 f8 lea -0x8(%ecx),%esi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = 10c695: 29 d9 sub %ebx,%ecx Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead 10c697: 39 cf cmp %ecx,%edi 10c699: 76 25 jbe 10c6c0 <_Heap_Get_first_and_last_block+0x54> uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); uintptr_t const first_block_size = _Heap_Align_down( heap_area_size - overhead, page_size ); 10c69b: 29 cf sub %ecx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c69d: 89 f8 mov %edi,%eax 10c69f: 31 d2 xor %edx,%edx 10c6a1: f7 75 10 divl 0x10(%ebp) 10c6a4: 29 d7 sub %edx,%edi _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size 10c6a6: 39 7d 14 cmp %edi,0x14(%ebp) 10c6a9: 77 15 ja 10c6c0 <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10c6ab: 8b 45 18 mov 0x18(%ebp),%eax 10c6ae: 89 30 mov %esi,(%eax) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c6b0: 01 f7 add %esi,%edi 10c6b2: 8b 45 1c mov 0x1c(%ebp),%eax 10c6b5: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10c6b7: b0 01 mov $0x1,%al } 10c6b9: 5b pop %ebx 10c6ba: 5e pop %esi 10c6bb: 5f pop %edi 10c6bc: c9 leave 10c6bd: c3 ret 10c6be: 66 90 xchg %ax,%ax <== NOT EXECUTED heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size ) { /* Invalid area or area too small */ return false; 10c6c0: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10c6c2: 5b pop %ebx 10c6c3: 5e pop %esi 10c6c4: 5f pop %edi 10c6c5: c9 leave 10c6c6: c3 ret =============================================================================== 0011508c <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 11508c: 55 push %ebp 11508d: 89 e5 mov %esp,%ebp 11508f: 57 push %edi 115090: 56 push %esi 115091: 53 push %ebx 115092: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 115095: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 11509b: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 1150a2: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1150a9: 8b 45 08 mov 0x8(%ebp),%eax 1150ac: 8b 50 08 mov 0x8(%eax),%edx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 1150af: 39 d0 cmp %edx,%eax 1150b1: 74 31 je 1150e4 <_Heap_Get_free_information+0x58> 1150b3: bb 01 00 00 00 mov $0x1,%ebx 1150b8: 31 f6 xor %esi,%esi 1150ba: 31 c9 xor %ecx,%ecx 1150bc: eb 07 jmp 1150c5 <_Heap_Get_free_information+0x39> 1150be: 66 90 xchg %ax,%ax <== NOT EXECUTED 1150c0: 8b 77 04 mov 0x4(%edi),%esi 1150c3: 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; 1150c5: 8b 42 04 mov 0x4(%edx),%eax 1150c8: 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; 1150cb: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 1150cd: 39 f0 cmp %esi,%eax 1150cf: 76 03 jbe 1150d4 <_Heap_Get_free_information+0x48> info->largest = the_size; 1150d1: 89 47 04 mov %eax,0x4(%edi) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 1150d4: 8b 52 08 mov 0x8(%edx),%edx 1150d7: 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); 1150da: 39 55 08 cmp %edx,0x8(%ebp) 1150dd: 75 e1 jne 1150c0 <_Heap_Get_free_information+0x34> 1150df: 89 1f mov %ebx,(%edi) 1150e1: 89 4f 08 mov %ecx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1150e4: 5b pop %ebx 1150e5: 5e pop %esi 1150e6: 5f pop %edi 1150e7: c9 leave 1150e8: c3 ret =============================================================================== 00111f3c <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 111f3c: 55 push %ebp 111f3d: 89 e5 mov %esp,%ebp 111f3f: 57 push %edi 111f40: 56 push %esi 111f41: 53 push %ebx 111f42: 8b 45 08 mov 0x8(%ebp),%eax 111f45: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 111f48: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 111f4b: 8b 70 24 mov 0x24(%eax),%esi memset(the_info, 0, sizeof(*the_info)); 111f4e: b9 18 00 00 00 mov $0x18,%ecx 111f53: 31 c0 xor %eax,%eax 111f55: 89 df mov %ebx,%edi 111f57: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 111f59: 39 f2 cmp %esi,%edx 111f5b: 74 33 je 111f90 <_Heap_Get_information+0x54><== NEVER TAKEN 111f5d: 8b 7a 04 mov 0x4(%edx),%edi 111f60: eb 16 jmp 111f78 <_Heap_Get_information+0x3c> 111f62: 66 90 xchg %ax,%ax <== NOT EXECUTED 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; 111f64: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 111f67: ff 00 incl (%eax) info->total += the_size; 111f69: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 111f6c: 39 48 04 cmp %ecx,0x4(%eax) 111f6f: 73 03 jae 111f74 <_Heap_Get_information+0x38> info->largest = the_size; 111f71: 89 48 04 mov %ecx,0x4(%eax) Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 111f74: 39 d6 cmp %edx,%esi 111f76: 74 18 je 111f90 <_Heap_Get_information+0x54> - 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; 111f78: 89 f9 mov %edi,%ecx 111f7a: 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); 111f7d: 01 ca add %ecx,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 111f7f: 8b 7a 04 mov 0x4(%edx),%edi 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) ) 111f82: f7 c7 01 00 00 00 test $0x1,%edi 111f88: 75 da jne 111f64 <_Heap_Get_information+0x28> info = &the_info->Used; else info = &the_info->Free; 111f8a: 89 d8 mov %ebx,%eax 111f8c: eb d9 jmp 111f67 <_Heap_Get_information+0x2b> 111f8e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 111f90: 5b pop %ebx 111f91: 5e pop %esi 111f92: 5f pop %edi 111f93: c9 leave 111f94: c3 ret =============================================================================== 0010c6c8 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c6c8: 55 push %ebp 10c6c9: 89 e5 mov %esp,%ebp 10c6cb: 57 push %edi 10c6cc: 56 push %esi 10c6cd: 53 push %ebx 10c6ce: 83 ec 18 sub $0x18,%esp 10c6d1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c6d4: 8b 7d 10 mov 0x10(%ebp),%edi 10c6d7: 8b 75 14 mov 0x14(%ebp),%esi uintptr_t first_block_begin = 0; uintptr_t first_block_size = 0; uintptr_t last_block_begin = 0; uintptr_t min_block_size = 0; bool area_ok = false; Heap_Block *first_block = NULL; 10c6da: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) Heap_Block *last_block = NULL; 10c6e1: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) if ( page_size == 0 ) { 10c6e8: 85 f6 test %esi,%esi 10c6ea: 74 2c je 10c718 <_Heap_Initialize+0x50> uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c6ec: 89 f0 mov %esi,%eax 10c6ee: 83 e0 03 and $0x3,%eax 10c6f1: 74 05 je 10c6f8 <_Heap_Initialize+0x30> return value - remainder + alignment; 10c6f3: 83 c6 04 add $0x4,%esi 10c6f6: 29 c6 sub %eax,%esi page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c6f8: 83 fe 03 cmp $0x3,%esi 10c6fb: 76 45 jbe 10c742 <_Heap_Initialize+0x7a> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c6fd: b8 10 00 00 00 mov $0x10,%eax 10c702: 31 d2 xor %edx,%edx 10c704: f7 f6 div %esi 10c706: 89 d1 mov %edx,%ecx if ( remainder != 0 ) { 10c708: 85 d2 test %edx,%edx 10c70a: 0f 84 bf 00 00 00 je 10c7cf <_Heap_Initialize+0x107> return value - remainder + alignment; 10c710: 8d 56 10 lea 0x10(%esi),%edx 10c713: 29 ca sub %ecx,%edx 10c715: eb 0b jmp 10c722 <_Heap_Initialize+0x5a> 10c717: 90 nop <== NOT EXECUTED bool area_ok = false; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; 10c718: be 04 00 00 00 mov $0x4,%esi } else { return value; 10c71d: ba 10 00 00 00 mov $0x10,%edx return 0; } } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); area_ok = _Heap_Get_first_and_last_block( 10c722: 8d 45 ec lea -0x14(%ebp),%eax 10c725: 50 push %eax 10c726: 8d 45 f0 lea -0x10(%ebp),%eax 10c729: 50 push %eax 10c72a: 52 push %edx 10c72b: 56 push %esi 10c72c: 57 push %edi 10c72d: ff 75 0c pushl 0xc(%ebp) 10c730: 89 55 dc mov %edx,-0x24(%ebp) 10c733: e8 34 ff ff ff call 10c66c <_Heap_Get_first_and_last_block> page_size, min_block_size, &first_block, &last_block ); if ( !area_ok ) { 10c738: 83 c4 18 add $0x18,%esp 10c73b: 84 c0 test %al,%al 10c73d: 8b 55 dc mov -0x24(%ebp),%edx 10c740: 75 0a jne 10c74c <_Heap_Initialize+0x84> return 0; 10c742: 31 c0 xor %eax,%eax _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c744: 8d 65 f4 lea -0xc(%ebp),%esp 10c747: 5b pop %ebx 10c748: 5e pop %esi 10c749: 5f pop %edi 10c74a: c9 leave 10c74b: c3 ret uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c74c: 03 7d 0c add 0xc(%ebp),%edi 10c74f: 89 7d e0 mov %edi,-0x20(%ebp) ); if ( !area_ok ) { return 0; } memset(heap, 0, sizeof(*heap)); 10c752: b9 58 00 00 00 mov $0x58,%ecx 10c757: 31 c0 xor %eax,%eax 10c759: 89 df mov %ebx,%edi 10c75b: f3 aa rep stos %al,%es:(%edi) heap->Protection.block_initialize = _Heap_Protection_block_initialize_default; heap->Protection.block_check = _Heap_Protection_block_check_default; heap->Protection.block_error = _Heap_Protection_block_error_default; #endif first_block_begin = (uintptr_t) first_block; 10c75d: 8b 4d f0 mov -0x10(%ebp),%ecx last_block_begin = (uintptr_t) last_block; first_block_size = last_block_begin - first_block_begin; 10c760: 8b 45 ec mov -0x14(%ebp),%eax 10c763: 29 c8 sub %ecx,%eax /* First block */ first_block->prev_size = heap_area_end; 10c765: 8b 7d e0 mov -0x20(%ebp),%edi 10c768: 89 39 mov %edi,(%ecx) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c76a: 89 c7 mov %eax,%edi 10c76c: 83 cf 01 or $0x1,%edi 10c76f: 89 79 04 mov %edi,0x4(%ecx) first_block->next = _Heap_Free_list_tail( heap ); 10c772: 89 59 08 mov %ebx,0x8(%ecx) first_block->prev = _Heap_Free_list_head( heap ); 10c775: 89 59 0c mov %ebx,0xc(%ecx) _Heap_Protection_block_initialize( heap, first_block ); /* Heap control */ heap->page_size = page_size; 10c778: 89 73 10 mov %esi,0x10(%ebx) heap->min_block_size = min_block_size; 10c77b: 89 53 14 mov %edx,0x14(%ebx) heap->area_begin = heap_area_begin; 10c77e: 8b 55 0c mov 0xc(%ebp),%edx 10c781: 89 53 18 mov %edx,0x18(%ebx) heap->area_end = heap_area_end; 10c784: 8b 7d e0 mov -0x20(%ebp),%edi 10c787: 89 7b 1c mov %edi,0x1c(%ebx) heap->first_block = first_block; 10c78a: 89 4b 20 mov %ecx,0x20(%ebx) heap->last_block = last_block; 10c78d: 8b 55 ec mov -0x14(%ebp),%edx 10c790: 89 53 24 mov %edx,0x24(%ebx) _Heap_Free_list_head( heap )->next = first_block; 10c793: 89 4b 08 mov %ecx,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c796: 89 4b 0c mov %ecx,0xc(%ebx) /* Last block */ last_block->prev_size = first_block_size; 10c799: 89 02 mov %eax,(%edx) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 10c79b: 29 d1 sub %edx,%ecx 10c79d: 89 4a 04 mov %ecx,0x4(%edx) last_block->size_and_flag = 0; _Heap_Set_last_block_size( heap ); _Heap_Protection_block_initialize( heap, last_block ); /* Statistics */ stats->size = first_block_size; 10c7a0: 89 43 2c mov %eax,0x2c(%ebx) stats->free_size = first_block_size; 10c7a3: 89 43 30 mov %eax,0x30(%ebx) stats->min_free_size = first_block_size; 10c7a6: 89 43 34 mov %eax,0x34(%ebx) stats->free_blocks = 1; 10c7a9: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c7b0: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->instance = instance++; 10c7b7: 8b 15 40 61 12 00 mov 0x126140,%edx 10c7bd: 89 53 28 mov %edx,0x28(%ebx) 10c7c0: 42 inc %edx 10c7c1: 89 15 40 61 12 00 mov %edx,0x126140 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c7c7: 8d 65 f4 lea -0xc(%ebp),%esp 10c7ca: 5b pop %ebx 10c7cb: 5e pop %esi 10c7cc: 5f pop %edi 10c7cd: c9 leave 10c7ce: c3 ret uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c7cf: ba 10 00 00 00 mov $0x10,%edx 10c7d4: e9 49 ff ff ff jmp 10c722 <_Heap_Initialize+0x5a> =============================================================================== 0011ec84 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11ec84: 55 push %ebp 11ec85: 89 e5 mov %esp,%ebp 11ec87: 57 push %edi 11ec88: 56 push %esi 11ec89: 53 push %ebx 11ec8a: 83 ec 2c sub $0x2c,%esp 11ec8d: 8b 5d 08 mov 0x8(%ebp),%ebx 11ec90: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11ec93: 8d 4e f8 lea -0x8(%esi),%ecx 11ec96: 89 f0 mov %esi,%eax 11ec98: 31 d2 xor %edx,%edx 11ec9a: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11ec9d: 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; 11ec9f: 8b 45 14 mov 0x14(%ebp),%eax 11eca2: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11eca8: 8b 55 18 mov 0x18(%ebp),%edx 11ecab: c7 02 00 00 00 00 movl $0x0,(%edx) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11ecb1: 39 4b 20 cmp %ecx,0x20(%ebx) 11ecb4: 77 05 ja 11ecbb <_Heap_Resize_block+0x37> 11ecb6: 39 4b 24 cmp %ecx,0x24(%ebx) 11ecb9: 73 0d jae 11ecc8 <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; 11ecbb: b8 02 00 00 00 mov $0x2,%eax } } 11ecc0: 8d 65 f4 lea -0xc(%ebp),%esp 11ecc3: 5b pop %ebx 11ecc4: 5e pop %esi 11ecc5: 5f pop %edi 11ecc6: c9 leave 11ecc7: c3 ret - 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; 11ecc8: 8b 41 04 mov 0x4(%ecx),%eax 11eccb: 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; 11ecce: 8d 3c 01 lea (%ecx,%eax,1),%edi 11ecd1: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS; 11ecd4: 89 fa mov %edi,%edx 11ecd6: 29 f2 sub %esi,%edx 11ecd8: 83 c2 04 add $0x4,%edx 11ecdb: 89 55 e0 mov %edx,-0x20(%ebp) 11ecde: 8b 57 04 mov 0x4(%edi),%edx 11ece1: 83 e2 fe and $0xfffffffe,%edx 11ece4: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11ece7: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11ecec: 0f 94 45 df sete -0x21(%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; 11ecf0: 8b 55 e0 mov -0x20(%ebp),%edx 11ecf3: 8b 7d 14 mov 0x14(%ebp),%edi 11ecf6: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11ecf8: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11ecfc: 75 6e jne 11ed6c <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11ecfe: 8b 55 e0 mov -0x20(%ebp),%edx 11ed01: 39 55 10 cmp %edx,0x10(%ebp) 11ed04: 77 79 ja 11ed7f <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11ed06: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11ed0a: 74 31 je 11ed3d <_Heap_Resize_block+0xb9> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 11ed0c: 8b 79 04 mov 0x4(%ecx),%edi 11ed0f: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11ed12: 09 c7 or %eax,%edi 11ed14: 89 79 04 mov %edi,0x4(%ecx) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11ed17: 8b 7d d4 mov -0x2c(%ebp),%edi 11ed1a: 8b 7f 08 mov 0x8(%edi),%edi 11ed1d: 89 7d e4 mov %edi,-0x1c(%ebp) 11ed20: 8b 55 d4 mov -0x2c(%ebp),%edx 11ed23: 8b 7a 0c mov 0xc(%edx),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 11ed26: 8b 55 e4 mov -0x1c(%ebp),%edx 11ed29: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11ed2c: 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; 11ed2f: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11ed34: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11ed37: 8b 7d d0 mov -0x30(%ebp),%edi 11ed3a: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11ed3d: ff 75 10 pushl 0x10(%ebp) 11ed40: 56 push %esi 11ed41: 51 push %ecx 11ed42: 53 push %ebx 11ed43: e8 94 da fe ff call 10c7dc <_Heap_Block_allocate> - 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; 11ed48: 8b 50 04 mov 0x4(%eax),%edx 11ed4b: 83 e2 fe and $0xfffffffe,%edx block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS; 11ed4e: 29 f0 sub %esi,%eax 11ed50: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11ed54: 8b 55 18 mov 0x18(%ebp),%edx 11ed57: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11ed59: ff 43 54 incl 0x54(%ebx) 11ed5c: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11ed5f: 31 c0 xor %eax,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11ed61: 8d 65 f4 lea -0xc(%ebp),%esp 11ed64: 5b pop %ebx 11ed65: 5e pop %esi 11ed66: 5f pop %edi 11ed67: c9 leave 11ed68: c3 ret 11ed69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11ed6c: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11ed6f: 8b 7d d0 mov -0x30(%ebp),%edi 11ed72: 01 fa add %edi,%edx 11ed74: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11ed77: 8b 55 e0 mov -0x20(%ebp),%edx 11ed7a: 39 55 10 cmp %edx,0x10(%ebp) 11ed7d: 76 87 jbe 11ed06 <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11ed7f: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11ed84: 8d 65 f4 lea -0xc(%ebp),%esp 11ed87: 5b pop %ebx 11ed88: 5e pop %esi 11ed89: 5f pop %edi 11ed8a: c9 leave 11ed8b: c3 ret =============================================================================== 0011ed8c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11ed8c: 55 push %ebp 11ed8d: 89 e5 mov %esp,%ebp 11ed8f: 56 push %esi 11ed90: 53 push %ebx 11ed91: 8b 5d 08 mov 0x8(%ebp),%ebx 11ed94: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11ed97: 8d 4e f8 lea -0x8(%esi),%ecx 11ed9a: 89 f0 mov %esi,%eax 11ed9c: 31 d2 xor %edx,%edx 11ed9e: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11eda1: 29 d1 sub %edx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11eda3: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11eda6: 39 c1 cmp %eax,%ecx 11eda8: 72 07 jb 11edb1 <_Heap_Size_of_alloc_area+0x25> 11edaa: 8b 53 24 mov 0x24(%ebx),%edx 11edad: 39 d1 cmp %edx,%ecx 11edaf: 76 07 jbe 11edb8 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 11edb1: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 11edb3: 5b pop %ebx 11edb4: 5e pop %esi 11edb5: c9 leave 11edb6: c3 ret 11edb7: 90 nop <== 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; 11edb8: 8b 59 04 mov 0x4(%ecx),%ebx 11edbb: 83 e3 fe and $0xfffffffe,%ebx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11edbe: 01 d9 add %ebx,%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; 11edc0: 39 c8 cmp %ecx,%eax 11edc2: 77 ed ja 11edb1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11edc4: 39 ca cmp %ecx,%edx 11edc6: 72 e9 jb 11edb1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 11edc8: f6 41 04 01 testb $0x1,0x4(%ecx) 11edcc: 74 e3 je 11edb1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11edce: 29 f1 sub %esi,%ecx 11edd0: 8d 51 04 lea 0x4(%ecx),%edx 11edd3: 8b 45 10 mov 0x10(%ebp),%eax 11edd6: 89 10 mov %edx,(%eax) return true; 11edd8: b0 01 mov $0x1,%al } 11edda: 5b pop %ebx 11eddb: 5e pop %esi 11eddc: c9 leave 11eddd: c3 ret =============================================================================== 0010d300 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d300: 55 push %ebp 10d301: 89 e5 mov %esp,%ebp 10d303: 57 push %edi 10d304: 56 push %esi 10d305: 53 push %ebx 10d306: 83 ec 4c sub $0x4c,%esp 10d309: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d30c: 8b 43 10 mov 0x10(%ebx),%eax 10d30f: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d312: 8b 53 14 mov 0x14(%ebx),%edx 10d315: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10d318: 8b 43 20 mov 0x20(%ebx),%eax 10d31b: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d31e: 8b 53 24 mov 0x24(%ebx),%edx 10d321: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d324: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d328: 74 1a je 10d344 <_Heap_Walk+0x44> 10d32a: c7 45 d8 b8 d2 10 00 movl $0x10d2b8,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d331: 83 3d 00 9b 12 00 03 cmpl $0x3,0x129b00 10d338: 74 1a je 10d354 <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10d33a: b0 01 mov $0x1,%al } 10d33c: 8d 65 f4 lea -0xc(%ebp),%esp 10d33f: 5b pop %ebx 10d340: 5e pop %esi 10d341: 5f pop %edi 10d342: c9 leave 10d343: c3 ret uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d344: c7 45 d8 b0 d2 10 00 movl $0x10d2b0,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d34b: 83 3d 00 9b 12 00 03 cmpl $0x3,0x129b00 10d352: 75 e6 jne 10d33a <_Heap_Walk+0x3a> 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)( 10d354: 52 push %edx 10d355: ff 73 0c pushl 0xc(%ebx) 10d358: ff 73 08 pushl 0x8(%ebx) 10d35b: ff 75 cc pushl -0x34(%ebp) 10d35e: ff 75 dc pushl -0x24(%ebp) 10d361: ff 73 1c pushl 0x1c(%ebx) 10d364: ff 73 18 pushl 0x18(%ebx) 10d367: ff 75 d0 pushl -0x30(%ebp) 10d36a: ff 75 e0 pushl -0x20(%ebp) 10d36d: 68 b4 1c 12 00 push $0x121cb4 10d372: 6a 00 push $0x0 10d374: ff 75 0c pushl 0xc(%ebp) 10d377: ff 55 d8 call *-0x28(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10d37a: 83 c4 30 add $0x30,%esp 10d37d: 8b 45 e0 mov -0x20(%ebp),%eax 10d380: 85 c0 test %eax,%eax 10d382: 74 70 je 10d3f4 <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d384: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d388: 75 72 jne 10d3fc <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d38a: 8b 45 d0 mov -0x30(%ebp),%eax 10d38d: 31 d2 xor %edx,%edx 10d38f: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d392: 85 d2 test %edx,%edx 10d394: 75 72 jne 10d408 <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d396: 8b 45 dc mov -0x24(%ebp),%eax 10d399: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d39c: 31 d2 xor %edx,%edx 10d39e: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10d3a1: 85 d2 test %edx,%edx 10d3a3: 75 6f jne 10d414 <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10d3a5: 8b 45 dc mov -0x24(%ebp),%eax 10d3a8: 8b 40 04 mov 0x4(%eax),%eax 10d3ab: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d3ae: a8 01 test $0x1,%al 10d3b0: 0f 84 8e 00 00 00 je 10d444 <_Heap_Walk+0x144> - 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; 10d3b6: 8b 55 cc mov -0x34(%ebp),%edx 10d3b9: 8b 42 04 mov 0x4(%edx),%eax 10d3bc: 83 e0 fe and $0xfffffffe,%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d3bf: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d3c1: f6 40 04 01 testb $0x1,0x4(%eax) 10d3c5: 74 25 je 10d3ec <_Heap_Walk+0xec> ); return false; } if ( 10d3c7: 39 45 dc cmp %eax,-0x24(%ebp) 10d3ca: 74 54 je 10d420 <_Heap_Walk+0x120> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10d3cc: 51 push %ecx <== NOT EXECUTED 10d3cd: 68 d0 1d 12 00 push $0x121dd0 <== NOT EXECUTED 10d3d2: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d3d4: 6a 01 push $0x1 10d3d6: ff 75 0c pushl 0xc(%ebp) 10d3d9: ff 55 d8 call *-0x28(%ebp) 10d3dc: 83 c4 10 add $0x10,%esp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 10d3df: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d3e1: 8d 65 f4 lea -0xc(%ebp),%esp 10d3e4: 5b pop %ebx 10d3e5: 5e pop %esi 10d3e6: 5f pop %edi 10d3e7: c9 leave 10d3e8: c3 ret 10d3e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d3ec: 53 push %ebx 10d3ed: 68 6a 1c 12 00 push $0x121c6a 10d3f2: eb e0 jmp 10d3d4 <_Heap_Walk+0xd4> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d3f4: 57 push %edi 10d3f5: 68 39 1c 12 00 push $0x121c39 10d3fa: eb d8 jmp 10d3d4 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d3fc: ff 75 e0 pushl -0x20(%ebp) 10d3ff: 68 4c 1c 12 00 push $0x121c4c 10d404: eb ce jmp 10d3d4 <_Heap_Walk+0xd4> 10d406: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d408: ff 75 d0 pushl -0x30(%ebp) 10d40b: 68 48 1d 12 00 push $0x121d48 10d410: eb c2 jmp 10d3d4 <_Heap_Walk+0xd4> 10d412: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d414: ff 75 dc pushl -0x24(%ebp) 10d417: 68 6c 1d 12 00 push $0x121d6c 10d41c: eb b6 jmp 10d3d4 <_Heap_Walk+0xd4> 10d41e: 66 90 xchg %ax,%ax <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d420: 8b 43 10 mov 0x10(%ebx),%eax 10d423: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10d426: 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 ) { 10d429: 39 cb cmp %ecx,%ebx 10d42b: 0f 84 a8 00 00 00 je 10d4d9 <_Heap_Walk+0x1d9> block = next_block; } while ( block != first_block ); return true; } 10d431: 8b 43 20 mov 0x20(%ebx),%eax 10d434: 89 45 d4 mov %eax,-0x2c(%ebp) 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; 10d437: 39 c8 cmp %ecx,%eax 10d439: 76 11 jbe 10d44c <_Heap_Walk+0x14c> <== ALWAYS TAKEN 10d43b: 90 nop <== NOT EXECUTED const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d43c: 51 push %ecx 10d43d: 68 00 1e 12 00 push $0x121e00 10d442: eb 90 jmp 10d3d4 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d444: 56 push %esi 10d445: 68 a0 1d 12 00 push $0x121da0 10d44a: eb 88 jmp 10d3d4 <_Heap_Walk+0xd4> 10d44c: 8b 7b 24 mov 0x24(%ebx),%edi 10d44f: 39 cf cmp %ecx,%edi 10d451: 72 e9 jb 10d43c <_Heap_Walk+0x13c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d453: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d456: 31 d2 xor %edx,%edx 10d458: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d45b: 85 d2 test %edx,%edx 10d45d: 0f 85 44 02 00 00 jne 10d6a7 <_Heap_Walk+0x3a7> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d463: 8b 41 04 mov 0x4(%ecx),%eax 10d466: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d469: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d46e: 0f 85 3e 02 00 00 jne 10d6b2 <_Heap_Walk+0x3b2> <== NEVER TAKEN 10d474: 89 da mov %ebx,%edx 10d476: 89 ce mov %ecx,%esi 10d478: eb 37 jmp 10d4b1 <_Heap_Walk+0x1b1> 10d47a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; 10d47c: 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 ) { 10d47f: 39 cb cmp %ecx,%ebx 10d481: 74 5c je 10d4df <_Heap_Walk+0x1df> 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; 10d483: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10d486: 77 b4 ja 10d43c <_Heap_Walk+0x13c> 10d488: 39 f9 cmp %edi,%ecx 10d48a: 77 b0 ja 10d43c <_Heap_Walk+0x13c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d48c: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d48f: 31 d2 xor %edx,%edx 10d491: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d494: 85 d2 test %edx,%edx 10d496: 0f 85 0b 02 00 00 jne 10d6a7 <_Heap_Walk+0x3a7> - 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; 10d49c: 8b 41 04 mov 0x4(%ecx),%eax 10d49f: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d4a2: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d4a7: 0f 85 05 02 00 00 jne 10d6b2 <_Heap_Walk+0x3b2> 10d4ad: 89 f2 mov %esi,%edx 10d4af: 89 ce mov %ecx,%esi ); return false; } if ( free_block->prev != prev_block ) { 10d4b1: 8b 41 0c mov 0xc(%ecx),%eax 10d4b4: 39 d0 cmp %edx,%eax 10d4b6: 74 c4 je 10d47c <_Heap_Walk+0x17c> (*printer)( 10d4b8: 83 ec 0c sub $0xc,%esp 10d4bb: 50 push %eax 10d4bc: 51 push %ecx 10d4bd: 68 50 1e 12 00 push $0x121e50 10d4c2: 66 90 xchg %ax,%ax Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d4c4: 6a 01 push $0x1 10d4c6: ff 75 0c pushl 0xc(%ebp) 10d4c9: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10d4cc: 83 c4 20 add $0x20,%esp 10d4cf: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d4d1: 8d 65 f4 lea -0xc(%ebp),%esp 10d4d4: 5b pop %ebx 10d4d5: 5e pop %esi 10d4d6: 5f pop %edi 10d4d7: c9 leave 10d4d8: c3 ret 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 ) { 10d4d9: 8b 53 20 mov 0x20(%ebx),%edx 10d4dc: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d4df: 8b 7d dc mov -0x24(%ebp),%edi 10d4e2: 8b 45 d4 mov -0x2c(%ebp),%eax 10d4e5: 8d 76 00 lea 0x0(%esi),%esi 10d4e8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d4eb: 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); 10d4ee: 8d 34 39 lea (%ecx,%edi,1),%esi 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; 10d4f1: 39 f0 cmp %esi,%eax 10d4f3: 76 0f jbe 10d504 <_Heap_Walk+0x204> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d4f5: 83 ec 0c sub $0xc,%esp 10d4f8: 56 push %esi 10d4f9: 57 push %edi 10d4fa: 68 84 1e 12 00 push $0x121e84 10d4ff: eb c3 jmp 10d4c4 <_Heap_Walk+0x1c4> 10d501: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d504: 39 73 24 cmp %esi,0x24(%ebx) 10d507: 72 ec jb 10d4f5 <_Heap_Walk+0x1f5> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 10d509: 3b 7d cc cmp -0x34(%ebp),%edi 10d50c: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d510: 89 c8 mov %ecx,%eax 10d512: 31 d2 xor %edx,%edx 10d514: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10d517: 85 d2 test %edx,%edx 10d519: 74 0a je 10d525 <_Heap_Walk+0x225> 10d51b: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d51f: 0f 85 52 01 00 00 jne 10d677 <_Heap_Walk+0x377> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10d525: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d528: 76 0a jbe 10d534 <_Heap_Walk+0x234> 10d52a: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d52e: 0f 85 52 01 00 00 jne 10d686 <_Heap_Walk+0x386> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10d534: 39 f7 cmp %esi,%edi 10d536: 72 0a jb 10d542 <_Heap_Walk+0x242> 10d538: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d53c: 0f 85 56 01 00 00 jne 10d698 <_Heap_Walk+0x398> 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; 10d542: 8b 55 e4 mov -0x1c(%ebp),%edx 10d545: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d548: f6 46 04 01 testb $0x1,0x4(%esi) 10d54c: 74 4e je 10d59c <_Heap_Walk+0x29c> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10d54e: 85 d2 test %edx,%edx 10d550: 74 2e je 10d580 <_Heap_Walk+0x280> (*printer)( 10d552: 83 ec 0c sub $0xc,%esp 10d555: 51 push %ecx 10d556: 57 push %edi 10d557: 68 9b 1c 12 00 push $0x121c9b 10d55c: 6a 00 push $0x0 10d55e: ff 75 0c pushl 0xc(%ebp) 10d561: ff 55 d8 call *-0x28(%ebp) 10d564: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10d567: 39 75 dc cmp %esi,-0x24(%ebp) 10d56a: 0f 84 ca fd ff ff je 10d33a <_Heap_Walk+0x3a> 10d570: 8b 56 04 mov 0x4(%esi),%edx 10d573: 89 55 e4 mov %edx,-0x1c(%ebp) 10d576: 8b 43 20 mov 0x20(%ebx),%eax 10d579: 89 f7 mov %esi,%edi 10d57b: e9 68 ff ff ff jmp 10d4e8 <_Heap_Walk+0x1e8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d580: 83 ec 08 sub $0x8,%esp 10d583: ff 37 pushl (%edi) 10d585: 51 push %ecx 10d586: 57 push %edi 10d587: 68 e8 1f 12 00 push $0x121fe8 10d58c: 6a 00 push $0x0 10d58e: ff 75 0c pushl 0xc(%ebp) 10d591: ff 55 d8 call *-0x28(%ebp) 10d594: 83 c4 20 add $0x20,%esp 10d597: eb ce jmp 10d567 <_Heap_Walk+0x267> 10d599: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED block = next_block; } while ( block != first_block ); return true; } 10d59c: 8b 43 08 mov 0x8(%ebx),%eax 10d59f: 89 45 b4 mov %eax,-0x4c(%ebp) block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 10d5a2: 8b 47 08 mov 0x8(%edi),%eax 10d5a5: 89 45 e4 mov %eax,-0x1c(%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)( 10d5a8: 39 43 0c cmp %eax,0xc(%ebx) 10d5ab: 0f 84 97 00 00 00 je 10d648 <_Heap_Walk+0x348> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d5b1: 39 c3 cmp %eax,%ebx 10d5b3: 0f 84 9b 00 00 00 je 10d654 <_Heap_Walk+0x354> 10d5b9: c7 45 c8 29 1b 12 00 movl $0x121b29,-0x38(%ebp) false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 10d5c0: 8b 47 0c mov 0xc(%edi),%eax 10d5c3: 89 45 d4 mov %eax,-0x2c(%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)( 10d5c6: 39 45 b4 cmp %eax,-0x4c(%ebp) 10d5c9: 74 75 je 10d640 <_Heap_Walk+0x340> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d5cb: 39 c3 cmp %eax,%ebx 10d5cd: 0f 84 8d 00 00 00 je 10d660 <_Heap_Walk+0x360> 10d5d3: b8 29 1b 12 00 mov $0x121b29,%eax Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d5d8: 83 ec 0c sub $0xc,%esp 10d5db: ff 75 c8 pushl -0x38(%ebp) 10d5de: ff 75 e4 pushl -0x1c(%ebp) 10d5e1: 50 push %eax 10d5e2: ff 75 d4 pushl -0x2c(%ebp) 10d5e5: 51 push %ecx 10d5e6: 57 push %edi 10d5e7: 68 44 1f 12 00 push $0x121f44 10d5ec: 6a 00 push $0x0 10d5ee: ff 75 0c pushl 0xc(%ebp) 10d5f1: 89 55 c4 mov %edx,-0x3c(%ebp) 10d5f4: 89 4d c0 mov %ecx,-0x40(%ebp) 10d5f7: ff 55 d8 call *-0x28(%ebp) block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10d5fa: 8b 06 mov (%esi),%eax 10d5fc: 83 c4 30 add $0x30,%esp 10d5ff: 8b 4d c0 mov -0x40(%ebp),%ecx 10d602: 39 c1 cmp %eax,%ecx 10d604: 8b 55 c4 mov -0x3c(%ebp),%edx 10d607: 75 27 jne 10d630 <_Heap_Walk+0x330> ); return false; } if ( !prev_used ) { 10d609: 85 d2 test %edx,%edx 10d60b: 74 5f je 10d66c <_Heap_Walk+0x36c> block = next_block; } while ( block != first_block ); return true; } 10d60d: 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 ) { 10d610: 39 c3 cmp %eax,%ebx 10d612: 74 0f je 10d623 <_Heap_Walk+0x323> <== NEVER TAKEN if ( free_block == block ) { 10d614: 39 c7 cmp %eax,%edi 10d616: 0f 84 4b ff ff ff je 10d567 <_Heap_Walk+0x267> return true; } free_block = free_block->next; 10d61c: 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 ) { 10d61f: 39 c3 cmp %eax,%ebx 10d621: 75 f1 jne 10d614 <_Heap_Walk+0x314> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d623: 57 push %edi 10d624: 68 10 20 12 00 push $0x122010 10d629: e9 a6 fd ff ff jmp 10d3d4 <_Heap_Walk+0xd4> 10d62e: 66 90 xchg %ax,%ax <== NOT EXECUTED " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10d630: 52 push %edx 10d631: 56 push %esi 10d632: 50 push %eax 10d633: 51 push %ecx 10d634: 57 push %edi 10d635: 68 7c 1f 12 00 push $0x121f7c 10d63a: e9 85 fe ff ff jmp 10d4c4 <_Heap_Walk+0x1c4> 10d63f: 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)( 10d640: b8 1f 1c 12 00 mov $0x121c1f,%eax 10d645: eb 91 jmp 10d5d8 <_Heap_Walk+0x2d8> 10d647: 90 nop <== NOT EXECUTED 10d648: c7 45 c8 06 1c 12 00 movl $0x121c06,-0x38(%ebp) 10d64f: e9 6c ff ff ff jmp 10d5c0 <_Heap_Walk+0x2c0> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d654: c7 45 c8 15 1c 12 00 movl $0x121c15,-0x38(%ebp) 10d65b: e9 60 ff ff ff jmp 10d5c0 <_Heap_Walk+0x2c0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d660: b8 2f 1c 12 00 mov $0x121c2f,%eax 10d665: e9 6e ff ff ff jmp 10d5d8 <_Heap_Walk+0x2d8> 10d66a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !prev_used ) { (*printer)( 10d66c: 57 push %edi 10d66d: 68 b8 1f 12 00 push $0x121fb8 10d672: e9 5d fd ff ff jmp 10d3d4 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10d677: 83 ec 0c sub $0xc,%esp 10d67a: 51 push %ecx 10d67b: 57 push %edi 10d67c: 68 b4 1e 12 00 push $0x121eb4 10d681: e9 3e fe ff ff jmp 10d4c4 <_Heap_Walk+0x1c4> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10d686: 83 ec 08 sub $0x8,%esp 10d689: ff 75 d0 pushl -0x30(%ebp) 10d68c: 51 push %ecx 10d68d: 57 push %edi 10d68e: 68 e4 1e 12 00 push $0x121ee4 10d693: e9 2c fe ff ff jmp 10d4c4 <_Heap_Walk+0x1c4> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10d698: 83 ec 0c sub $0xc,%esp 10d69b: 56 push %esi 10d69c: 57 push %edi 10d69d: 68 10 1f 12 00 push $0x121f10 10d6a2: e9 1d fe ff ff jmp 10d4c4 <_Heap_Walk+0x1c4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d6a7: 51 push %ecx 10d6a8: 68 20 1e 12 00 push $0x121e20 10d6ad: e9 22 fd ff ff jmp 10d3d4 <_Heap_Walk+0xd4> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d6b2: 51 push %ecx 10d6b3: 68 7f 1c 12 00 push $0x121c7f 10d6b8: e9 17 fd ff ff jmp 10d3d4 <_Heap_Walk+0xd4> =============================================================================== 0010bd7c <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10bd7c: 55 push %ebp 10bd7d: 89 e5 mov %esp,%ebp 10bd7f: 53 push %ebx 10bd80: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bd83: 8b 0d 20 6f 12 00 mov 0x126f20,%ecx 10bd89: 85 c9 test %ecx,%ecx 10bd8b: 74 1a je 10bda7 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10bd8d: 31 db xor %ebx,%ebx 10bd8f: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10bd90: 52 push %edx 10bd91: 6a 00 push $0x0 10bd93: 6a 00 push $0x0 10bd95: 53 push %ebx 10bd96: e8 a5 51 00 00 call 110f40 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bd9b: 43 inc %ebx 10bd9c: 83 c4 10 add $0x10,%esp 10bd9f: 39 1d 20 6f 12 00 cmp %ebx,0x126f20 10bda5: 77 e9 ja 10bd90 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10bda7: 8b 5d fc mov -0x4(%ebp),%ebx 10bdaa: c9 leave 10bdab: c3 ret =============================================================================== 0010bce4 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bce4: 55 push %ebp 10bce5: 89 e5 mov %esp,%ebp 10bce7: 57 push %edi 10bce8: 56 push %esi 10bce9: 53 push %ebx 10bcea: 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; 10bced: 8b 1d 54 22 12 00 mov 0x122254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bcf3: a1 50 22 12 00 mov 0x122250,%eax 10bcf8: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bcfb: 8b 35 4c 22 12 00 mov 0x12224c,%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 ) 10bd01: 39 f0 cmp %esi,%eax 10bd03: 73 5f jae 10bd64 <_IO_Manager_initialization+0x80> * 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 *) _Workspace_Allocate_or_fatal_error( 10bd05: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bd08: c1 e1 03 shl $0x3,%ecx 10bd0b: 83 ec 0c sub $0xc,%esp 10bd0e: 51 push %ecx 10bd0f: 89 4d dc mov %ecx,-0x24(%ebp) 10bd12: e8 a1 2b 00 00 call 10e8b8 <_Workspace_Allocate_or_fatal_error> 10bd17: 89 c2 mov %eax,%edx /* * 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 *) 10bd19: a3 24 6f 12 00 mov %eax,0x126f24 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bd1e: 89 35 20 6f 12 00 mov %esi,0x126f20 memset( 10bd24: 31 c0 xor %eax,%eax 10bd26: 8b 4d dc mov -0x24(%ebp),%ecx 10bd29: 89 d7 mov %edx,%edi 10bd2b: 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++ ) 10bd2d: 83 c4 10 add $0x10,%esp 10bd30: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd33: 85 c0 test %eax,%eax 10bd35: 74 25 je 10bd5c <_IO_Manager_initialization+0x78><== NEVER TAKEN 10bd37: a1 24 6f 12 00 mov 0x126f24,%eax 10bd3c: 89 45 e0 mov %eax,-0x20(%ebp) 10bd3f: 31 c0 xor %eax,%eax 10bd41: 31 d2 xor %edx,%edx 10bd43: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10bd44: 8b 7d e0 mov -0x20(%ebp),%edi 10bd47: 01 c7 add %eax,%edi 10bd49: 8d 34 03 lea (%ebx,%eax,1),%esi 10bd4c: b9 06 00 00 00 mov $0x6,%ecx 10bd51: 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++ ) 10bd53: 42 inc %edx 10bd54: 83 c0 18 add $0x18,%eax 10bd57: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bd5a: 77 e8 ja 10bd44 <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bd5c: 8d 65 f4 lea -0xc(%ebp),%esp 10bd5f: 5b pop %ebx 10bd60: 5e pop %esi 10bd61: 5f pop %edi 10bd62: c9 leave 10bd63: c3 ret * 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; 10bd64: 89 1d 24 6f 12 00 mov %ebx,0x126f24 _IO_Number_of_drivers = number_of_drivers; 10bd6a: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd6d: a3 20 6f 12 00 mov %eax,0x126f20 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bd72: 8d 65 f4 lea -0xc(%ebp),%esp 10bd75: 5b pop %ebx 10bd76: 5e pop %esi 10bd77: 5f pop %edi 10bd78: c9 leave 10bd79: c3 ret =============================================================================== 0010c8d0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c8d0: 55 push %ebp 10c8d1: 89 e5 mov %esp,%ebp 10c8d3: 53 push %ebx 10c8d4: 83 ec 08 sub $0x8,%esp 10c8d7: 8b 45 08 mov 0x8(%ebp),%eax 10c8da: 8b 55 0c mov 0xc(%ebp),%edx 10c8dd: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c8e0: a3 74 65 12 00 mov %eax,0x126574 _Internal_errors_What_happened.is_internal = is_internal; 10c8e5: 88 15 78 65 12 00 mov %dl,0x126578 _Internal_errors_What_happened.the_error = the_error; 10c8eb: 89 1d 7c 65 12 00 mov %ebx,0x12657c _User_extensions_Fatal( the_source, is_internal, the_error ); 10c8f1: 53 push %ebx 10c8f2: 0f b6 d2 movzbl %dl,%edx 10c8f5: 52 push %edx 10c8f6: 50 push %eax 10c8f7: e8 c4 1b 00 00 call 10e4c0 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c8fc: c7 05 80 66 12 00 05 movl $0x5,0x126680 <== NOT EXECUTED 10c903: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c906: fa cli <== NOT EXECUTED 10c907: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c909: f4 hlt <== NOT EXECUTED 10c90a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c90d: eb fe jmp 10c90d <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00111514 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 111514: 55 push %ebp 111515: 89 e5 mov %esp,%ebp 111517: 8b 45 08 mov 0x8(%ebp),%eax 11151a: 48 dec %eax 11151b: 83 f8 02 cmp $0x2,%eax 11151e: 77 0c ja 11152c <_Objects_API_maximum_class+0x18> 111520: 8b 04 85 c0 12 12 00 mov 0x1212c0(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 111527: c9 leave 111528: c3 ret 111529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 11152c: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 11152e: c9 leave 11152f: c3 ret =============================================================================== 0010c960 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c960: 55 push %ebp 10c961: 89 e5 mov %esp,%ebp 10c963: 56 push %esi 10c964: 53 push %ebx 10c965: 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 ) 10c968: 8b 43 18 mov 0x18(%ebx),%eax 10c96b: 85 c0 test %eax,%eax 10c96d: 75 0d jne 10c97c <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10c96f: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10c971: 89 c8 mov %ecx,%eax 10c973: 8d 65 f8 lea -0x8(%ebp),%esp 10c976: 5b pop %ebx 10c977: 5e pop %esi 10c978: c9 leave 10c979: c3 ret 10c97a: 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 ); 10c97c: 8d 73 20 lea 0x20(%ebx),%esi 10c97f: 83 ec 0c sub $0xc,%esp 10c982: 56 push %esi 10c983: e8 60 f6 ff ff call 10bfe8 <_Chain_Get> 10c988: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c98a: 83 c4 10 add $0x10,%esp 10c98d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c991: 74 de je 10c971 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c993: 85 c0 test %eax,%eax 10c995: 74 29 je 10c9c0 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c997: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c99b: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c99f: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10c9a1: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c9a5: 31 d2 xor %edx,%edx 10c9a7: f7 f6 div %esi information->inactive_per_block[ block ]--; 10c9a9: c1 e0 02 shl $0x2,%eax 10c9ac: 03 43 30 add 0x30(%ebx),%eax 10c9af: ff 08 decl (%eax) information->inactive--; 10c9b1: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10c9b5: 89 c8 mov %ecx,%eax 10c9b7: 8d 65 f8 lea -0x8(%ebp),%esp 10c9ba: 5b pop %ebx 10c9bb: 5e pop %esi 10c9bc: c9 leave 10c9bd: c3 ret 10c9be: 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 ); 10c9c0: 83 ec 0c sub $0xc,%esp 10c9c3: 53 push %ebx 10c9c4: e8 3b 00 00 00 call 10ca04 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c9c9: 89 34 24 mov %esi,(%esp) 10c9cc: e8 17 f6 ff ff call 10bfe8 <_Chain_Get> 10c9d1: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c9d3: 83 c4 10 add $0x10,%esp 10c9d6: 85 c0 test %eax,%eax 10c9d8: 74 97 je 10c971 <_Objects_Allocate+0x11> 10c9da: eb bb jmp 10c997 <_Objects_Allocate+0x37> =============================================================================== 0010ca04 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10ca04: 55 push %ebp 10ca05: 89 e5 mov %esp,%ebp 10ca07: 57 push %edi 10ca08: 56 push %esi 10ca09: 53 push %ebx 10ca0a: 83 ec 4c sub $0x4c,%esp 10ca0d: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10ca10: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10ca14: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10ca17: 8b 4b 34 mov 0x34(%ebx),%ecx 10ca1a: 85 c9 test %ecx,%ecx 10ca1c: 0f 84 66 02 00 00 je 10cc88 <_Objects_Extend_information+0x284> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10ca22: 8b 73 10 mov 0x10(%ebx),%esi 10ca25: 66 89 75 d0 mov %si,-0x30(%ebp) 10ca29: 8b 7b 14 mov 0x14(%ebx),%edi 10ca2c: 89 f0 mov %esi,%eax 10ca2e: 31 d2 xor %edx,%edx 10ca30: 66 f7 f7 div %di 10ca33: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10ca36: 85 f6 test %esi,%esi 10ca38: 0f 84 63 02 00 00 je 10cca1 <_Objects_Extend_information+0x29d><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10ca3e: 8b 01 mov (%ecx),%eax 10ca40: 85 c0 test %eax,%eax 10ca42: 0f 84 6b 02 00 00 je 10ccb3 <_Objects_Extend_information+0x2af><== NEVER TAKEN 10ca48: 0f b7 ff movzwl %di,%edi /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10ca4b: 8b 55 cc mov -0x34(%ebp),%edx 10ca4e: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10ca51: 31 d2 xor %edx,%edx 10ca53: 8b 45 d4 mov -0x2c(%ebp),%eax 10ca56: eb 0a jmp 10ca62 <_Objects_Extend_information+0x5e> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 10ca58: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10ca5c: 0f 84 c6 01 00 00 je 10cc28 <_Objects_Extend_information+0x224> do_extend = false; break; } else index_base += information->allocation_size; 10ca62: 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++ ) { 10ca64: 42 inc %edx 10ca65: 39 d6 cmp %edx,%esi 10ca67: 77 ef ja 10ca58 <_Objects_Extend_information+0x54> 10ca69: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10ca6c: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10ca6e: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10ca72: 01 f8 add %edi,%eax 10ca74: 89 45 d0 mov %eax,-0x30(%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 ) { 10ca77: 3d ff ff 00 00 cmp $0xffff,%eax 10ca7c: 0f 87 9e 01 00 00 ja 10cc20 <_Objects_Extend_information+0x21c> /* * 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; 10ca82: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10ca86: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10ca8a: 0f 84 a4 01 00 00 je 10cc34 <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); 10ca90: 83 ec 0c sub $0xc,%esp 10ca93: 57 push %edi 10ca94: 89 55 b8 mov %edx,-0x48(%ebp) 10ca97: 88 4d b4 mov %cl,-0x4c(%ebp) 10ca9a: e8 e5 1d 00 00 call 10e884 <_Workspace_Allocate> 10ca9f: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10caa2: 83 c4 10 add $0x10,%esp 10caa5: 85 c0 test %eax,%eax 10caa7: 8b 55 b8 mov -0x48(%ebp),%edx 10caaa: 8a 4d b4 mov -0x4c(%ebp),%cl 10caad: 0f 84 6d 01 00 00 je 10cc20 <_Objects_Extend_information+0x21c> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10cab3: 84 c9 test %cl,%cl 10cab5: 0f 84 ea 00 00 00 je 10cba5 <_Objects_Extend_information+0x1a1> */ /* * Up the block count and maximum */ block_count++; 10cabb: 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 ); 10cabe: 83 ec 0c sub $0xc,%esp /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 10cac1: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10cac4: 03 45 d0 add -0x30(%ebp),%eax /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 10cac7: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10caca: c1 e0 02 shl $0x2,%eax (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10cacd: 50 push %eax 10cace: 89 55 b8 mov %edx,-0x48(%ebp) 10cad1: e8 ae 1d 00 00 call 10e884 <_Workspace_Allocate> 10cad6: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10cad9: 83 c4 10 add $0x10,%esp 10cadc: 85 c0 test %eax,%eax 10cade: 8b 55 b8 mov -0x48(%ebp),%edx 10cae1: 0f 84 de 01 00 00 je 10ccc5 <_Objects_Extend_information+0x2c1> 10cae7: 8b 45 c4 mov -0x3c(%ebp),%eax 10caea: 8d 04 b8 lea (%eax,%edi,4),%eax 10caed: 89 45 bc mov %eax,-0x44(%ebp) 10caf0: 8b 4d c4 mov -0x3c(%ebp),%ecx 10caf3: 8d 04 f9 lea (%ecx,%edi,8),%eax * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10caf6: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cafa: 39 4d cc cmp %ecx,-0x34(%ebp) 10cafd: 0f 82 51 01 00 00 jb 10cc54 <_Objects_Extend_information+0x250> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10cb03: 8b 4d cc mov -0x34(%ebp),%ecx 10cb06: 85 c9 test %ecx,%ecx 10cb08: 74 12 je 10cb1c <_Objects_Extend_information+0x118><== NEVER TAKEN 10cb0a: 31 c9 xor %ecx,%ecx 10cb0c: 8b 7d cc mov -0x34(%ebp),%edi 10cb0f: 90 nop local_table[ index ] = NULL; 10cb10: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10cb17: 41 inc %ecx 10cb18: 39 cf cmp %ecx,%edi 10cb1a: 77 f4 ja 10cb10 <_Objects_Extend_information+0x10c><== NEVER TAKEN 10cb1c: c1 e6 02 shl $0x2,%esi 10cb1f: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10cb22: 8b 4d c4 mov -0x3c(%ebp),%ecx 10cb25: 8b 75 c0 mov -0x40(%ebp),%esi 10cb28: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10cb2f: 8b 4d bc mov -0x44(%ebp),%ecx 10cb32: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10cb39: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cb3d: 03 75 d4 add -0x2c(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10cb40: 39 75 d4 cmp %esi,-0x2c(%ebp) 10cb43: 73 0f jae 10cb54 <_Objects_Extend_information+0x150><== NEVER TAKEN 10cb45: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10cb48: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10cb4f: 41 inc %ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10cb50: 39 f1 cmp %esi,%ecx 10cb52: 72 f4 jb 10cb48 <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10cb54: 9c pushf 10cb55: fa cli 10cb56: 5f pop %edi old_tables = information->object_blocks; 10cb57: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10cb5a: 8b 75 c4 mov -0x3c(%ebp),%esi 10cb5d: 89 73 34 mov %esi,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10cb60: 8b 75 bc mov -0x44(%ebp),%esi 10cb63: 89 73 30 mov %esi,0x30(%ebx) information->local_table = local_table; 10cb66: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10cb69: 8b 45 d0 mov -0x30(%ebp),%eax 10cb6c: 66 89 43 10 mov %ax,0x10(%ebx) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cb70: 8b 33 mov (%ebx),%esi 10cb72: c1 e6 18 shl $0x18,%esi 10cb75: 81 ce 00 00 01 00 or $0x10000,%esi information->maximum_id = _Objects_Build_id( 10cb7b: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cb7f: c1 e0 1b shl $0x1b,%eax 10cb82: 09 c6 or %eax,%esi 10cb84: 0f b7 45 d0 movzwl -0x30(%ebp),%eax uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cb88: 09 c6 or %eax,%esi 10cb8a: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10cb8d: 57 push %edi 10cb8e: 9d popf if ( old_tables ) 10cb8f: 85 c9 test %ecx,%ecx 10cb91: 74 12 je 10cba5 <_Objects_Extend_information+0x1a1> _Workspace_Free( old_tables ); 10cb93: 83 ec 0c sub $0xc,%esp 10cb96: 51 push %ecx 10cb97: 89 55 b8 mov %edx,-0x48(%ebp) 10cb9a: e8 01 1d 00 00 call 10e8a0 <_Workspace_Free> 10cb9f: 83 c4 10 add $0x10,%esp 10cba2: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10cba5: c1 e2 02 shl $0x2,%edx 10cba8: 89 55 d0 mov %edx,-0x30(%ebp) 10cbab: 8b 43 34 mov 0x34(%ebx),%eax 10cbae: 8b 4d c8 mov -0x38(%ebp),%ecx 10cbb1: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10cbb4: ff 73 18 pushl 0x18(%ebx) 10cbb7: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10cbbb: 50 push %eax 10cbbc: 51 push %ecx 10cbbd: 8d 7d dc lea -0x24(%ebp),%edi 10cbc0: 57 push %edi 10cbc1: e8 ba 43 00 00 call 110f80 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10cbc6: 83 c4 10 add $0x10,%esp 10cbc9: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cbcc: 8d 43 20 lea 0x20(%ebx),%eax 10cbcf: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10cbd2: eb 29 jmp 10cbfd <_Objects_Extend_information+0x1f9> 10cbd4: 8b 13 mov (%ebx),%edx 10cbd6: c1 e2 18 shl $0x18,%edx 10cbd9: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10cbdf: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cbe3: c1 e1 1b shl $0x1b,%ecx 10cbe6: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cbe8: 09 f2 or %esi,%edx 10cbea: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cbed: 83 ec 08 sub $0x8,%esp 10cbf0: 50 push %eax 10cbf1: ff 75 d4 pushl -0x2c(%ebp) 10cbf4: e8 b3 f3 ff ff call 10bfac <_Chain_Append> index++; 10cbf9: 46 inc %esi 10cbfa: 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 ) { 10cbfd: 83 ec 0c sub $0xc,%esp 10cc00: 57 push %edi 10cc01: e8 e2 f3 ff ff call 10bfe8 <_Chain_Get> 10cc06: 83 c4 10 add $0x10,%esp 10cc09: 85 c0 test %eax,%eax 10cc0b: 75 c7 jne 10cbd4 <_Objects_Extend_information+0x1d0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10cc0d: 8b 43 14 mov 0x14(%ebx),%eax 10cc10: 8b 53 30 mov 0x30(%ebx),%edx 10cc13: 0f b7 c8 movzwl %ax,%ecx 10cc16: 8b 75 d0 mov -0x30(%ebp),%esi 10cc19: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10cc1c: 66 01 43 2c add %ax,0x2c(%ebx) } 10cc20: 8d 65 f4 lea -0xc(%ebp),%esp 10cc23: 5b pop %ebx 10cc24: 5e pop %esi 10cc25: 5f pop %edi 10cc26: c9 leave 10cc27: c3 ret 10cc28: 89 45 d4 mov %eax,-0x2c(%ebp) else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10cc2b: 31 c9 xor %ecx,%ecx 10cc2d: e9 3c fe ff ff jmp 10ca6e <_Objects_Extend_information+0x6a> 10cc32: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10cc34: 83 ec 0c sub $0xc,%esp 10cc37: 57 push %edi 10cc38: 89 55 b8 mov %edx,-0x48(%ebp) 10cc3b: 88 4d b4 mov %cl,-0x4c(%ebp) 10cc3e: e8 75 1c 00 00 call 10e8b8 <_Workspace_Allocate_or_fatal_error> 10cc43: 89 45 c8 mov %eax,-0x38(%ebp) 10cc46: 83 c4 10 add $0x10,%esp 10cc49: 8a 4d b4 mov -0x4c(%ebp),%cl 10cc4c: 8b 55 b8 mov -0x48(%ebp),%edx 10cc4f: e9 5f fe ff ff jmp 10cab3 <_Objects_Extend_information+0xaf> /* * 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, 10cc54: c1 e6 02 shl $0x2,%esi 10cc57: 89 75 c0 mov %esi,-0x40(%ebp) 10cc5a: 8b 73 34 mov 0x34(%ebx),%esi 10cc5d: 8b 7d c4 mov -0x3c(%ebp),%edi 10cc60: 8b 4d c0 mov -0x40(%ebp),%ecx 10cc63: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cc65: 8b 73 30 mov 0x30(%ebx),%esi 10cc68: 8b 7d bc mov -0x44(%ebp),%edi 10cc6b: 8b 4d c0 mov -0x40(%ebp),%ecx 10cc6e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 10cc70: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cc74: 03 4d cc add -0x34(%ebp),%ecx information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10cc77: c1 e1 02 shl $0x2,%ecx 10cc7a: 8b 73 1c mov 0x1c(%ebx),%esi 10cc7d: 89 c7 mov %eax,%edi 10cc7f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cc81: e9 9c fe ff ff jmp 10cb22 <_Objects_Extend_information+0x11e> 10cc86: 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 ) 10cc88: 8b 53 10 mov 0x10(%ebx),%edx 10cc8b: 66 89 55 d0 mov %dx,-0x30(%ebp) 10cc8f: 0f b7 7b 14 movzwl 0x14(%ebx),%edi /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10cc93: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10cc96: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cc98: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10cc9a: 31 f6 xor %esi,%esi 10cc9c: e9 cd fd ff ff jmp 10ca6e <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cca1: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10cca4: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10cca7: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10ccaa: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10ccac: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ccae: e9 bb fd ff ff jmp 10ca6e <_Objects_Extend_information+0x6a><== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 10ccb3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10ccb6: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10ccb9: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10ccbc: 31 c9 xor %ecx,%ecx <== NOT EXECUTED * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10ccbe: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ccc0: e9 a9 fd ff ff jmp 10ca6e <_Objects_Extend_information+0x6a><== 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 ); 10ccc5: 83 ec 0c sub $0xc,%esp 10ccc8: ff 75 c8 pushl -0x38(%ebp) 10cccb: e8 d0 1b 00 00 call 10e8a0 <_Workspace_Free> return; 10ccd0: 83 c4 10 add $0x10,%esp 10ccd3: e9 48 ff ff ff jmp 10cc20 <_Objects_Extend_information+0x21c> =============================================================================== 0010ce18 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10ce18: 55 push %ebp 10ce19: 89 e5 mov %esp,%ebp 10ce1b: 53 push %ebx 10ce1c: 83 ec 14 sub $0x14,%esp 10ce1f: 8b 55 08 mov 0x8(%ebp),%edx 10ce22: 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; 10ce25: b8 01 00 00 00 mov $0x1,%eax 10ce2a: 2b 42 08 sub 0x8(%edx),%eax 10ce2d: 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 ) { 10ce30: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10ce34: 39 c8 cmp %ecx,%eax 10ce36: 77 24 ja 10ce5c <_Objects_Get+0x44> 10ce38: 8b 0d d4 64 12 00 mov 0x1264d4,%ecx 10ce3e: 41 inc %ecx 10ce3f: 89 0d d4 64 12 00 mov %ecx,0x1264d4 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10ce45: 8b 52 1c mov 0x1c(%edx),%edx 10ce48: 8b 04 82 mov (%edx,%eax,4),%eax 10ce4b: 85 c0 test %eax,%eax 10ce4d: 74 1b je 10ce6a <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10ce4f: 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 } 10ce55: 83 c4 14 add $0x14,%esp 10ce58: 5b pop %ebx 10ce59: c9 leave 10ce5a: c3 ret 10ce5b: 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; 10ce5c: c7 03 01 00 00 00 movl $0x1,(%ebx) #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; 10ce62: 31 c0 xor %eax,%eax #endif } 10ce64: 83 c4 14 add $0x14,%esp 10ce67: 5b pop %ebx 10ce68: c9 leave 10ce69: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10ce6a: 89 45 f4 mov %eax,-0xc(%ebp) 10ce6d: e8 36 08 00 00 call 10d6a8 <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10ce72: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10ce78: 8b 45 f4 mov -0xc(%ebp),%eax 10ce7b: eb d8 jmp 10ce55 <_Objects_Get+0x3d> =============================================================================== 0010cd68 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10cd68: 55 push %ebp 10cd69: 89 e5 mov %esp,%ebp 10cd6b: 56 push %esi 10cd6c: 53 push %ebx 10cd6d: 8b 75 08 mov 0x8(%ebp),%esi 10cd70: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cd73: 66 85 db test %bx,%bx 10cd76: 75 0c jne 10cd84 <_Objects_Get_information+0x1c> the_class_api_maximum = _Objects_API_maximum_class( the_api ); if ( the_class_api_maximum == 0 ) return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; 10cd78: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10cd7a: 8d 65 f8 lea -0x8(%ebp),%esp 10cd7d: 5b pop %ebx 10cd7e: 5e pop %esi 10cd7f: c9 leave 10cd80: c3 ret 10cd81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * 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 ); 10cd84: 83 ec 0c sub $0xc,%esp 10cd87: 56 push %esi 10cd88: e8 87 47 00 00 call 111514 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10cd8d: 83 c4 10 add $0x10,%esp 10cd90: 85 c0 test %eax,%eax 10cd92: 74 e4 je 10cd78 <_Objects_Get_information+0x10> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10cd94: 0f b7 db movzwl %bx,%ebx 10cd97: 39 d8 cmp %ebx,%eax 10cd99: 72 dd jb 10cd78 <_Objects_Get_information+0x10> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cd9b: 8b 14 b5 ac 64 12 00 mov 0x1264ac(,%esi,4),%edx return NULL; 10cda2: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cda4: 85 d2 test %edx,%edx 10cda6: 74 d2 je 10cd7a <_Objects_Get_information+0x12><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10cda8: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10cdab: 85 c0 test %eax,%eax 10cdad: 74 cb je 10cd7a <_Objects_Get_information+0x12><== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 10cdaf: 31 d2 xor %edx,%edx 10cdb1: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cdb6: 0f 95 c2 setne %dl 10cdb9: f7 da neg %edx 10cdbb: 21 d0 and %edx,%eax 10cdbd: eb bb jmp 10cd7a <_Objects_Get_information+0x12> =============================================================================== 0010cdc0 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cdc0: 55 push %ebp 10cdc1: 89 e5 mov %esp,%ebp 10cdc3: 56 push %esi 10cdc4: 53 push %ebx 10cdc5: 8b 55 08 mov 0x8(%ebp),%edx 10cdc8: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cdcb: b8 01 00 00 00 mov $0x1,%eax 10cdd0: 2b 42 08 sub 0x8(%edx),%eax 10cdd3: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cdd6: 9c pushf 10cdd7: fa cli 10cdd8: 5e pop %esi if ( information->maximum >= index ) { 10cdd9: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cddd: 39 c8 cmp %ecx,%eax 10cddf: 77 1b ja 10cdfc <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cde1: 8b 52 1c mov 0x1c(%edx),%edx 10cde4: 8b 04 82 mov (%edx,%eax,4),%eax 10cde7: 85 c0 test %eax,%eax 10cde9: 74 21 je 10ce0c <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cdeb: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cdf1: 8b 55 14 mov 0x14(%ebp),%edx 10cdf4: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cdf6: 5b pop %ebx 10cdf7: 5e pop %esi 10cdf8: c9 leave 10cdf9: c3 ret 10cdfa: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cdfc: 56 push %esi 10cdfd: 9d popf *location = OBJECTS_ERROR; 10cdfe: c7 03 01 00 00 00 movl $0x1,(%ebx) #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; 10ce04: 31 c0 xor %eax,%eax #endif } 10ce06: 5b pop %ebx 10ce07: 5e pop %esi 10ce08: c9 leave 10ce09: c3 ret 10ce0a: 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 ); 10ce0c: 56 push %esi 10ce0d: 9d popf *location = OBJECTS_ERROR; 10ce0e: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10ce14: eb e0 jmp 10cdf6 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e49c <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e49c: 55 push %ebp 10e49d: 89 e5 mov %esp,%ebp 10e49f: 57 push %edi 10e4a0: 56 push %esi 10e4a1: 53 push %ebx 10e4a2: 83 ec 2c sub $0x2c,%esp 10e4a5: 8b 55 08 mov 0x8(%ebp),%edx 10e4a8: 8b 75 0c mov 0xc(%ebp),%esi 10e4ab: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e4ae: 85 f6 test %esi,%esi 10e4b0: 75 0e jne 10e4c0 <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10e4b2: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10e4b4: 89 d8 mov %ebx,%eax 10e4b6: 8d 65 f4 lea -0xc(%ebp),%esp 10e4b9: 5b pop %ebx 10e4ba: 5e pop %esi 10e4bb: 5f pop %edi 10e4bc: c9 leave 10e4bd: c3 ret 10e4be: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e4c0: 85 db test %ebx,%ebx 10e4c2: 74 f0 je 10e4b4 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e4c4: 85 d2 test %edx,%edx 10e4c6: 75 08 jne 10e4d0 <_Objects_Get_name_as_string+0x34> 10e4c8: a1 58 29 13 00 mov 0x132958,%eax 10e4cd: 8b 50 08 mov 0x8(%eax),%edx information = _Objects_Get_information_id( tmpId ); 10e4d0: 83 ec 0c sub $0xc,%esp 10e4d3: 52 push %edx 10e4d4: 89 55 cc mov %edx,-0x34(%ebp) 10e4d7: e8 f0 fe ff ff call 10e3cc <_Objects_Get_information_id> 10e4dc: 89 c7 mov %eax,%edi if ( !information ) 10e4de: 83 c4 10 add $0x10,%esp 10e4e1: 85 c0 test %eax,%eax 10e4e3: 8b 55 cc mov -0x34(%ebp),%edx 10e4e6: 74 ca je 10e4b2 <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e4e8: 51 push %ecx 10e4e9: 8d 45 e4 lea -0x1c(%ebp),%eax 10e4ec: 50 push %eax 10e4ed: 52 push %edx 10e4ee: 57 push %edi 10e4ef: e8 90 00 00 00 call 10e584 <_Objects_Get> switch ( location ) { 10e4f4: 83 c4 10 add $0x10,%esp 10e4f7: 8b 55 e4 mov -0x1c(%ebp),%edx 10e4fa: 85 d2 test %edx,%edx 10e4fc: 75 b4 jne 10e4b2 <_Objects_Get_name_as_string+0x16> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10e4fe: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10e502: 74 54 je 10e558 <_Objects_Get_name_as_string+0xbc> s = the_object->name.name_p; 10e504: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 10e507: 85 ff test %edi,%edi 10e509: 74 74 je 10e57f <_Objects_Get_name_as_string+0xe3> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e50b: 4e dec %esi 10e50c: 89 75 d4 mov %esi,-0x2c(%ebp) 10e50f: 74 6e je 10e57f <_Objects_Get_name_as_string+0xe3><== NEVER TAKEN 10e511: 8a 07 mov (%edi),%al 10e513: 84 c0 test %al,%al 10e515: 74 68 je 10e57f <_Objects_Get_name_as_string+0xe3> 10e517: 89 d9 mov %ebx,%ecx 10e519: 31 d2 xor %edx,%edx 10e51b: 89 5d d0 mov %ebx,-0x30(%ebp) 10e51e: eb 07 jmp 10e527 <_Objects_Get_name_as_string+0x8b> 10e520: 8a 04 17 mov (%edi,%edx,1),%al 10e523: 84 c0 test %al,%al 10e525: 74 21 je 10e548 <_Objects_Get_name_as_string+0xac> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10e527: 0f b6 d8 movzbl %al,%ebx 10e52a: 8b 35 88 82 12 00 mov 0x128288,%esi 10e530: 0f be 5c 1e 01 movsbl 0x1(%esi,%ebx,1),%ebx 10e535: 81 e3 97 00 00 00 and $0x97,%ebx 10e53b: 75 02 jne 10e53f <_Objects_Get_name_as_string+0xa3> 10e53d: b0 2a mov $0x2a,%al 10e53f: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e541: 42 inc %edx 10e542: 41 inc %ecx 10e543: 3b 55 d4 cmp -0x2c(%ebp),%edx 10e546: 72 d8 jb 10e520 <_Objects_Get_name_as_string+0x84> 10e548: 8b 5d d0 mov -0x30(%ebp),%ebx *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10e54b: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10e54e: e8 c1 08 00 00 call 10ee14 <_Thread_Enable_dispatch> return name; 10e553: e9 5c ff ff ff jmp 10e4b4 <_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; 10e558: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 10e55b: 89 c2 mov %eax,%edx 10e55d: c1 ea 18 shr $0x18,%edx 10e560: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e563: 89 c2 mov %eax,%edx 10e565: c1 ea 10 shr $0x10,%edx 10e568: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e56b: 89 c2 mov %eax,%edx 10e56d: c1 ea 08 shr $0x8,%edx 10e570: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e573: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e576: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; 10e57a: 8d 7d df lea -0x21(%ebp),%edi 10e57d: eb 8c jmp 10e50b <_Objects_Get_name_as_string+0x6f> } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e57f: 89 d9 mov %ebx,%ecx 10e581: eb c8 jmp 10e54b <_Objects_Get_name_as_string+0xaf> =============================================================================== 0010cf60 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10cf60: 55 push %ebp 10cf61: 89 e5 mov %esp,%ebp 10cf63: 57 push %edi 10cf64: 56 push %esi 10cf65: 53 push %ebx 10cf66: 83 ec 0c sub $0xc,%esp 10cf69: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf6c: 8b 75 0c mov 0xc(%ebp),%esi 10cf6f: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10cf72: 85 db test %ebx,%ebx 10cf74: 75 0a jne 10cf80 <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10cf76: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cf78: 8d 65 f4 lea -0xc(%ebp),%esp 10cf7b: 5b pop %ebx 10cf7c: 5e pop %esi 10cf7d: 5f pop %edi 10cf7e: c9 leave 10cf7f: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10cf80: 85 ff test %edi,%edi 10cf82: 74 f2 je 10cf76 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10cf84: 8b 45 14 mov 0x14(%ebp),%eax 10cf87: 85 c0 test %eax,%eax 10cf89: 74 eb je 10cf76 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10cf8b: 66 85 f6 test %si,%si 10cf8e: 75 04 jne 10cf94 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10cf90: 8b 73 08 mov 0x8(%ebx),%esi 10cf93: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10cf94: 66 39 73 10 cmp %si,0x10(%ebx) 10cf98: 72 22 jb 10cfbc <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10cf9a: 51 push %ecx 10cf9b: 57 push %edi 10cf9c: 56 push %esi 10cf9d: 53 push %ebx 10cf9e: e8 2d 00 00 00 call 10cfd0 <_Objects_Get> next_id++; 10cfa3: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10cfa4: 83 c4 10 add $0x10,%esp 10cfa7: 8b 17 mov (%edi),%edx 10cfa9: 85 d2 test %edx,%edx 10cfab: 75 e7 jne 10cf94 <_Objects_Get_next+0x34> *next_id_p = next_id; 10cfad: 8b 55 14 mov 0x14(%ebp),%edx 10cfb0: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cfb2: 8d 65 f4 lea -0xc(%ebp),%esp 10cfb5: 5b pop %ebx 10cfb6: 5e pop %esi 10cfb7: 5f pop %edi 10cfb8: c9 leave 10cfb9: c3 ret 10cfba: 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; 10cfbc: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10cfc2: 8b 45 14 mov 0x14(%ebp),%eax 10cfc5: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10cfcb: 31 c0 xor %eax,%eax 10cfcd: eb a9 jmp 10cf78 <_Objects_Get_next+0x18> =============================================================================== 0011b244 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b244: 55 push %ebp 11b245: 89 e5 mov %esp,%ebp 11b247: 53 push %ebx 11b248: 8b 55 08 mov 0x8(%ebp),%edx 11b24b: 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; 11b24e: b8 01 00 00 00 mov $0x1,%eax 11b253: 2b 42 08 sub 0x8(%edx),%eax 11b256: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b259: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b25d: 39 c8 cmp %ecx,%eax 11b25f: 77 13 ja 11b274 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b261: 8b 52 1c mov 0x1c(%edx),%edx 11b264: 8b 04 82 mov (%edx,%eax,4),%eax 11b267: 85 c0 test %eax,%eax 11b269: 74 09 je 11b274 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b26b: 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; } 11b271: 5b pop %ebx 11b272: c9 leave 11b273: 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; 11b274: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11b27a: 31 c0 xor %eax,%eax } 11b27c: 5b pop %ebx 11b27d: c9 leave 11b27e: c3 ret =============================================================================== 0010e0c0 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e0c0: 55 push %ebp 10e0c1: 89 e5 mov %esp,%ebp 10e0c3: 83 ec 18 sub $0x18,%esp 10e0c6: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e0c9: 85 d2 test %edx,%edx 10e0cb: 75 08 jne 10e0d5 <_Objects_Id_to_name+0x15> 10e0cd: a1 58 a6 12 00 mov 0x12a658,%eax 10e0d2: 8b 50 08 mov 0x8(%eax),%edx 10e0d5: 89 d0 mov %edx,%eax 10e0d7: c1 e8 18 shr $0x18,%eax 10e0da: 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 ) 10e0dd: 8d 48 ff lea -0x1(%eax),%ecx 10e0e0: 83 f9 02 cmp $0x2,%ecx 10e0e3: 77 1d ja 10e102 <_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 ] ) 10e0e5: 8b 04 85 6c a0 12 00 mov 0x12a06c(,%eax,4),%eax 10e0ec: 85 c0 test %eax,%eax 10e0ee: 74 12 je 10e102 <_Objects_Id_to_name+0x42> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e0f0: 89 d1 mov %edx,%ecx 10e0f2: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e0f5: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e0f8: 85 c0 test %eax,%eax 10e0fa: 74 06 je 10e102 <_Objects_Id_to_name+0x42><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10e0fc: 80 78 38 00 cmpb $0x0,0x38(%eax) 10e100: 74 0a je 10e10c <_Objects_Id_to_name+0x4c><== ALWAYS TAKEN the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 10e102: b8 03 00 00 00 mov $0x3,%eax return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 10e107: c9 leave 10e108: c3 ret 10e109: 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 ); 10e10c: 51 push %ecx 10e10d: 8d 4d f4 lea -0xc(%ebp),%ecx 10e110: 51 push %ecx 10e111: 52 push %edx 10e112: 50 push %eax 10e113: e8 40 ff ff ff call 10e058 <_Objects_Get> if ( !the_object ) 10e118: 83 c4 10 add $0x10,%esp 10e11b: 85 c0 test %eax,%eax 10e11d: 74 e3 je 10e102 <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; *name = the_object->name; 10e11f: 8b 50 0c mov 0xc(%eax),%edx 10e122: 8b 45 0c mov 0xc(%ebp),%eax 10e125: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e127: e8 2c 08 00 00 call 10e958 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e12c: 31 c0 xor %eax,%eax } 10e12e: c9 leave 10e12f: c3 ret =============================================================================== 0010ce80 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10ce80: 55 push %ebp 10ce81: 89 e5 mov %esp,%ebp 10ce83: 57 push %edi 10ce84: 56 push %esi 10ce85: 53 push %ebx 10ce86: 83 ec 0c sub $0xc,%esp 10ce89: 8b 45 08 mov 0x8(%ebp),%eax 10ce8c: 8b 55 0c mov 0xc(%ebp),%edx 10ce8f: 8b 5d 10 mov 0x10(%ebp),%ebx 10ce92: 8b 75 20 mov 0x20(%ebp),%esi 10ce95: 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; 10ce99: 89 10 mov %edx,(%eax) information->the_class = the_class; 10ce9b: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10ce9f: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10cea2: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10cea9: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10ceb0: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10ceb7: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10cebd: 8b 7d 1c mov 0x1c(%ebp),%edi 10cec0: 89 f9 mov %edi,%ecx 10cec2: 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; 10cec5: 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; 10cecb: 0f b7 db movzwl %bx,%ebx 10cece: 8b 3c 95 ac 64 12 00 mov 0x1264ac(,%edx,4),%edi 10ced5: 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; 10ced8: 8b 7d 14 mov 0x14(%ebp),%edi 10cedb: 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 = 10cede: 89 f9 mov %edi,%ecx 10cee0: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10cee3: 8b 4d 14 mov 0x14(%ebp),%ecx 10cee6: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10ceec: 85 ff test %edi,%edi 10ceee: 74 04 je 10cef4 <_Objects_Initialize_information+0x74> 10cef0: 85 c9 test %ecx,%ecx 10cef2: 74 67 je 10cf5b <_Objects_Initialize_information+0xdb><== NEVER TAKEN } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cef4: 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; 10cef8: c7 40 1c 44 61 12 00 movl $0x126144,0x1c(%eax) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ceff: c1 e2 18 shl $0x18,%edx 10cf02: 81 ca 00 00 01 00 or $0x10000,%edx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cf08: c1 e3 1b shl $0x1b,%ebx 10cf0b: 09 da or %ebx,%edx /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 10cf0d: 31 db xor %ebx,%ebx 10cf0f: 85 c9 test %ecx,%ecx 10cf11: 0f 95 c3 setne %bl uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cf14: 09 da or %ebx,%edx 10cf16: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cf19: f7 c6 03 00 00 00 test $0x3,%esi 10cf1f: 75 23 jne 10cf44 <_Objects_Initialize_information+0xc4> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10cf21: 66 89 70 3a mov %si,0x3a(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10cf25: 8d 50 24 lea 0x24(%eax),%edx 10cf28: 89 50 20 mov %edx,0x20(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10cf2b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) _Chain_Initialize_empty( &information->Inactive ); 10cf32: 8d 50 20 lea 0x20(%eax),%edx 10cf35: 89 50 28 mov %edx,0x28(%eax) /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10cf38: 85 c9 test %ecx,%ecx 10cf3a: 75 10 jne 10cf4c <_Objects_Initialize_information+0xcc> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cf3c: 8d 65 f4 lea -0xc(%ebp),%esp 10cf3f: 5b pop %ebx 10cf40: 5e pop %esi 10cf41: 5f pop %edi 10cf42: c9 leave 10cf43: c3 ret * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10cf44: 83 c6 04 add $0x4,%esi 10cf47: 83 e6 fc and $0xfffffffc,%esi 10cf4a: eb d5 jmp 10cf21 <_Objects_Initialize_information+0xa1> /* * 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 ); 10cf4c: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cf4f: 8d 65 f4 lea -0xc(%ebp),%esp 10cf52: 5b pop %ebx 10cf53: 5e pop %esi 10cf54: 5f pop %edi 10cf55: 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 ); 10cf56: e9 a9 fa ff ff jmp 10ca04 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10cf5b: 50 push %eax 10cf5c: 6a 13 push $0x13 10cf5e: 6a 01 push $0x1 10cf60: 6a 00 push $0x0 10cf62: e8 69 f9 ff ff call 10c8d0 <_Internal_error_Occurred> =============================================================================== 0011786c <_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 ) { 11786c: 55 push %ebp 11786d: 89 e5 mov %esp,%ebp 11786f: 57 push %edi 117870: 56 push %esi 117871: 53 push %ebx 117872: 83 ec 1c sub $0x1c,%esp 117875: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 117878: 8b 5d 10 mov 0x10(%ebp),%ebx 11787b: 85 db test %ebx,%ebx 11787d: 74 75 je 1178f4 <_Objects_Name_to_id_string+0x88> return OBJECTS_INVALID_ADDRESS; if ( !name ) 11787f: 8b 4d 0c mov 0xc(%ebp),%ecx 117882: 85 c9 test %ecx,%ecx 117884: 74 4b je 1178d1 <_Objects_Name_to_id_string+0x65> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 117886: 8b 47 10 mov 0x10(%edi),%eax 117889: 66 85 c0 test %ax,%ax 11788c: 74 43 je 1178d1 <_Objects_Name_to_id_string+0x65> name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 11788e: 0f b7 c0 movzwl %ax,%eax 117891: 89 45 e4 mov %eax,-0x1c(%ebp) 117894: 8b 47 1c mov 0x1c(%edi),%eax 117897: bb 01 00 00 00 mov $0x1,%ebx 11789c: 89 7d e0 mov %edi,-0x20(%ebp) 11789f: 89 c7 mov %eax,%edi 1178a1: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; 1178a4: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 1178a7: 85 f6 test %esi,%esi 1178a9: 74 20 je 1178cb <_Objects_Name_to_id_string+0x5f> continue; if ( !the_object->name.name_p ) 1178ab: 8b 46 0c mov 0xc(%esi),%eax 1178ae: 85 c0 test %eax,%eax 1178b0: 74 19 je 1178cb <_Objects_Name_to_id_string+0x5f> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 1178b2: 52 push %edx 1178b3: 8b 4d e0 mov -0x20(%ebp),%ecx 1178b6: 0f b7 51 3a movzwl 0x3a(%ecx),%edx 1178ba: 52 push %edx 1178bb: 50 push %eax 1178bc: ff 75 0c pushl 0xc(%ebp) 1178bf: e8 d8 35 00 00 call 11ae9c 1178c4: 83 c4 10 add $0x10,%esp 1178c7: 85 c0 test %eax,%eax 1178c9: 74 15 je 1178e0 <_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++ ) { 1178cb: 43 inc %ebx 1178cc: 3b 5d e4 cmp -0x1c(%ebp),%ebx 1178cf: 76 d3 jbe 1178a4 <_Objects_Name_to_id_string+0x38> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } } } return OBJECTS_INVALID_NAME; 1178d1: b8 01 00 00 00 mov $0x1,%eax } 1178d6: 8d 65 f4 lea -0xc(%ebp),%esp 1178d9: 5b pop %ebx 1178da: 5e pop %esi 1178db: 5f pop %edi 1178dc: c9 leave 1178dd: c3 ret 1178de: 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; 1178e0: 8b 46 08 mov 0x8(%esi),%eax 1178e3: 8b 55 10 mov 0x10(%ebp),%edx 1178e6: 89 02 mov %eax,(%edx) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 1178e8: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 1178ea: 8d 65 f4 lea -0xc(%ebp),%esp 1178ed: 5b pop %ebx 1178ee: 5e pop %esi 1178ef: 5f pop %edi 1178f0: c9 leave 1178f1: c3 ret 1178f2: 66 90 xchg %ax,%ax <== NOT EXECUTED uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 1178f4: b8 02 00 00 00 mov $0x2,%eax } } } return OBJECTS_INVALID_NAME; } 1178f9: 8d 65 f4 lea -0xc(%ebp),%esp 1178fc: 5b pop %ebx 1178fd: 5e pop %esi 1178fe: 5f pop %edi 1178ff: c9 leave 117900: c3 ret =============================================================================== 0010cf9c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10cf9c: 55 push %ebp 10cf9d: 89 e5 mov %esp,%ebp 10cf9f: 57 push %edi 10cfa0: 56 push %esi 10cfa1: 53 push %ebx 10cfa2: 8b 45 08 mov 0x8(%ebp),%eax 10cfa5: 8b 4d 0c mov 0xc(%ebp),%ecx 10cfa8: 8b 55 10 mov 0x10(%ebp),%edx 10cfab: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cfae: 85 ff test %edi,%edi 10cfb0: 74 56 je 10d008 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10cfb2: 85 c9 test %ecx,%ecx 10cfb4: 74 08 je 10cfbe <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cfb6: 8b 70 10 mov 0x10(%eax),%esi 10cfb9: 66 85 f6 test %si,%si 10cfbc: 75 0a jne 10cfc8 <_Objects_Name_to_id_u32+0x2c> return OBJECTS_INVALID_NAME; name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; 10cfbe: b8 01 00 00 00 mov $0x1,%eax #endif } 10cfc3: 5b pop %ebx 10cfc4: 5e pop %esi 10cfc5: 5f pop %edi 10cfc6: c9 leave 10cfc7: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cfc8: 85 d2 test %edx,%edx 10cfca: 75 20 jne 10cfec <_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++ ) { 10cfcc: 0f b7 f6 movzwl %si,%esi 10cfcf: 8b 58 1c mov 0x1c(%eax),%ebx 10cfd2: b8 01 00 00 00 mov $0x1,%eax 10cfd7: 90 nop the_object = information->local_table[ index ]; 10cfd8: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cfdb: 85 d2 test %edx,%edx 10cfdd: 74 05 je 10cfe4 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10cfdf: 39 4a 0c cmp %ecx,0xc(%edx) 10cfe2: 74 18 je 10cffc <_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++ ) { 10cfe4: 40 inc %eax 10cfe5: 39 c6 cmp %eax,%esi 10cfe7: 73 ef jae 10cfd8 <_Objects_Name_to_id_u32+0x3c> 10cfe9: eb d3 jmp 10cfbe <_Objects_Name_to_id_u32+0x22> 10cfeb: 90 nop <== NOT EXECUTED return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10cfec: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10cff2: 74 d8 je 10cfcc <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10cff4: 4a dec %edx 10cff5: 75 c7 jne 10cfbe <_Objects_Name_to_id_u32+0x22> 10cff7: eb d3 jmp 10cfcc <_Objects_Name_to_id_u32+0x30> 10cff9: 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; 10cffc: 8b 42 08 mov 0x8(%edx),%eax 10cfff: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10d001: 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 } 10d003: 5b pop %ebx 10d004: 5e pop %esi 10d005: 5f pop %edi 10d006: c9 leave 10d007: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10d008: 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 } 10d00d: 5b pop %ebx 10d00e: 5e pop %esi 10d00f: 5f pop %edi 10d010: c9 leave 10d011: c3 ret =============================================================================== 0010d680 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10d680: 55 push %ebp 10d681: 89 e5 mov %esp,%ebp 10d683: 57 push %edi 10d684: 56 push %esi 10d685: 53 push %ebx 10d686: 83 ec 14 sub $0x14,%esp 10d689: 8b 7d 08 mov 0x8(%ebp),%edi 10d68c: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10d68f: 0f b7 47 3a movzwl 0x3a(%edi),%eax 10d693: 50 push %eax 10d694: 53 push %ebx 10d695: e8 ce 79 00 00 call 115068 10d69a: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10d69c: 83 c4 10 add $0x10,%esp 10d69f: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10d6a3: 75 57 jne 10d6fc <_Objects_Set_name+0x7c> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d6a5: 0f be 13 movsbl (%ebx),%edx 10d6a8: c1 e2 18 shl $0x18,%edx 10d6ab: 83 f8 01 cmp $0x1,%eax 10d6ae: 76 38 jbe 10d6e8 <_Objects_Set_name+0x68> 10d6b0: 0f be 43 01 movsbl 0x1(%ebx),%eax 10d6b4: c1 e0 10 shl $0x10,%eax 10d6b7: 09 d0 or %edx,%eax 10d6b9: 83 fe 02 cmp $0x2,%esi 10d6bc: 74 31 je 10d6ef <_Objects_Set_name+0x6f> 10d6be: 0f be 53 02 movsbl 0x2(%ebx),%edx 10d6c2: c1 e2 08 shl $0x8,%edx 10d6c5: 09 c2 or %eax,%edx 10d6c7: 83 fe 03 cmp $0x3,%esi 10d6ca: 0f 84 88 00 00 00 je 10d758 <_Objects_Set_name+0xd8> 10d6d0: 0f be 43 03 movsbl 0x3(%ebx),%eax 10d6d4: 09 c2 or %eax,%edx 10d6d6: 8b 45 0c mov 0xc(%ebp),%eax 10d6d9: 89 50 0c mov %edx,0xc(%eax) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 10d6dc: b0 01 mov $0x1,%al } 10d6de: 8d 65 f4 lea -0xc(%ebp),%esp 10d6e1: 5b pop %ebx 10d6e2: 5e pop %esi 10d6e3: 5f pop %edi 10d6e4: c9 leave 10d6e5: c3 ret 10d6e6: 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( 10d6e8: 89 d0 mov %edx,%eax 10d6ea: 0d 00 00 20 00 or $0x200000,%eax 10d6ef: 89 c2 mov %eax,%edx 10d6f1: 80 ce 20 or $0x20,%dh 10d6f4: b8 20 00 00 00 mov $0x20,%eax 10d6f9: eb d9 jmp 10d6d4 <_Objects_Set_name+0x54> 10d6fb: 90 nop <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 10d6fc: 83 ec 0c sub $0xc,%esp 10d6ff: 8d 40 01 lea 0x1(%eax),%eax 10d702: 50 push %eax 10d703: e8 cc 18 00 00 call 10efd4 <_Workspace_Allocate> 10d708: 89 c7 mov %eax,%edi if ( !d ) 10d70a: 83 c4 10 add $0x10,%esp 10d70d: 85 c0 test %eax,%eax 10d70f: 74 43 je 10d754 <_Objects_Set_name+0xd4> return false; if ( the_object->name.name_p ) { 10d711: 8b 55 0c mov 0xc(%ebp),%edx 10d714: 8b 42 0c mov 0xc(%edx),%eax 10d717: 85 c0 test %eax,%eax 10d719: 74 16 je 10d731 <_Objects_Set_name+0xb1> _Workspace_Free( (void *)the_object->name.name_p ); 10d71b: 83 ec 0c sub $0xc,%esp 10d71e: 50 push %eax 10d71f: e8 cc 18 00 00 call 10eff0 <_Workspace_Free> the_object->name.name_p = NULL; 10d724: 8b 45 0c mov 0xc(%ebp),%eax 10d727: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10d72e: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10d731: 50 push %eax 10d732: 56 push %esi 10d733: 53 push %ebx 10d734: 57 push %edi 10d735: e8 b2 78 00 00 call 114fec d[length] = '\0'; 10d73a: c6 04 37 00 movb $0x0,(%edi,%esi,1) the_object->name.name_p = d; 10d73e: 8b 55 0c mov 0xc(%ebp),%edx 10d741: 89 7a 0c mov %edi,0xc(%edx) 10d744: 83 c4 10 add $0x10,%esp ((3 < length) ? s[ 3 ] : ' ') ); } return true; 10d747: b0 01 mov $0x1,%al } 10d749: 8d 65 f4 lea -0xc(%ebp),%esp 10d74c: 5b pop %ebx 10d74d: 5e pop %esi 10d74e: 5f pop %edi 10d74f: c9 leave 10d750: c3 ret 10d751: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 10d754: 31 c0 xor %eax,%eax 10d756: eb 86 jmp 10d6de <_Objects_Set_name+0x5e> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d758: b8 20 00 00 00 mov $0x20,%eax 10d75d: e9 72 ff ff ff jmp 10d6d4 <_Objects_Set_name+0x54> =============================================================================== 0010d014 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10d014: 55 push %ebp 10d015: 89 e5 mov %esp,%ebp 10d017: 57 push %edi 10d018: 56 push %esi 10d019: 53 push %ebx 10d01a: 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 ); 10d01d: 8b 45 08 mov 0x8(%ebp),%eax 10d020: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10d024: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10d028: 0f b7 40 10 movzwl 0x10(%eax),%eax 10d02c: 29 d8 sub %ebx,%eax 10d02e: 31 d2 xor %edx,%edx 10d030: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d032: 85 c0 test %eax,%eax 10d034: 74 21 je 10d057 <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10d036: 8b 55 08 mov 0x8(%ebp),%edx 10d039: 8b 7a 30 mov 0x30(%edx),%edi 10d03c: 3b 0f cmp (%edi),%ecx 10d03e: 74 1f je 10d05f <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10d040: 31 d2 xor %edx,%edx 10d042: eb 0e jmp 10d052 <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10d044: 01 cb add %ecx,%ebx 10d046: 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 ] == 10d04d: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10d050: 74 12 je 10d064 <_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++ ) { 10d052: 42 inc %edx 10d053: 39 d0 cmp %edx,%eax 10d055: 77 ed ja 10d044 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10d057: 8d 65 f4 lea -0xc(%ebp),%esp 10d05a: 5b pop %ebx 10d05b: 5e pop %esi 10d05c: 5f pop %edi 10d05d: c9 leave 10d05e: 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 ] == 10d05f: 31 f6 xor %esi,%esi <== NOT EXECUTED 10d061: 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; 10d064: 8b 55 08 mov 0x8(%ebp),%edx 10d067: 8b 42 20 mov 0x20(%edx),%eax 10d06a: 89 75 e4 mov %esi,-0x1c(%ebp) 10d06d: eb 07 jmp 10d076 <_Objects_Shrink_information+0x62> 10d06f: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d070: 85 ff test %edi,%edi 10d072: 74 2c je 10d0a0 <_Objects_Shrink_information+0x8c> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10d074: 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 ); 10d076: 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; 10d07a: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d07c: 39 da cmp %ebx,%edx 10d07e: 72 f0 jb 10d070 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d080: 8b 75 08 mov 0x8(%ebp),%esi 10d083: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d087: 8d 0c 0b lea (%ebx,%ecx,1),%ecx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 10d08a: 39 ca cmp %ecx,%edx 10d08c: 73 e2 jae 10d070 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10d08e: 83 ec 0c sub $0xc,%esp 10d091: 50 push %eax 10d092: e8 39 ef ff ff call 10bfd0 <_Chain_Extract> 10d097: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d09a: 85 ff test %edi,%edi 10d09c: 75 d6 jne 10d074 <_Objects_Shrink_information+0x60> 10d09e: 66 90 xchg %ax,%ax 10d0a0: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d0a3: 83 ec 0c sub $0xc,%esp 10d0a6: 8b 55 08 mov 0x8(%ebp),%edx 10d0a9: 8b 42 34 mov 0x34(%edx),%eax 10d0ac: ff 34 30 pushl (%eax,%esi,1) 10d0af: e8 ec 17 00 00 call 10e8a0 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d0b4: 8b 55 08 mov 0x8(%ebp),%edx 10d0b7: 8b 42 34 mov 0x34(%edx),%eax 10d0ba: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d0c1: 8b 42 30 mov 0x30(%edx),%eax 10d0c4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d0cb: 8b 42 14 mov 0x14(%edx),%eax 10d0ce: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d0d2: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d0d5: 8d 65 f4 lea -0xc(%ebp),%esp 10d0d8: 5b pop %ebx 10d0d9: 5e pop %esi 10d0da: 5f pop %edi 10d0db: c9 leave 10d0dc: c3 ret =============================================================================== 0010d4f4 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10d4f4: 55 push %ebp 10d4f5: 89 e5 mov %esp,%ebp 10d4f7: 57 push %edi 10d4f8: 56 push %esi 10d4f9: 53 push %ebx 10d4fa: 83 ec 38 sub $0x38,%esp 10d4fd: 8b 5d 08 mov 0x8(%ebp),%ebx 10d500: 8b 75 0c mov 0xc(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10d503: c7 06 00 00 00 00 movl $0x0,(%esi) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10d509: 53 push %ebx 10d50a: e8 e5 3c 00 00 call 1111f4 <_Timespec_Is_valid> 10d50f: 83 c4 10 add $0x10,%esp 10d512: 84 c0 test %al,%al 10d514: 75 0a jne 10d520 <_POSIX_Absolute_timeout_to_ticks+0x2c> return POSIX_ABSOLUTE_TIMEOUT_INVALID; 10d516: 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; } 10d518: 8d 65 f4 lea -0xc(%ebp),%esp 10d51b: 5b pop %ebx 10d51c: 5e pop %esi 10d51d: 5f pop %edi 10d51e: c9 leave 10d51f: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10d520: 83 ec 0c sub $0xc,%esp 10d523: 8d 7d e0 lea -0x20(%ebp),%edi 10d526: 57 push %edi 10d527: e8 78 1d 00 00 call 10f2a4 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10d52c: 5a pop %edx 10d52d: 59 pop %ecx 10d52e: 57 push %edi 10d52f: 53 push %ebx 10d530: e8 e7 3c 00 00 call 11121c <_Timespec_Less_than> 10d535: 83 c4 10 add $0x10,%esp 10d538: 84 c0 test %al,%al 10d53a: 74 10 je 10d54c <_POSIX_Absolute_timeout_to_ticks+0x58> return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; 10d53c: 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; } 10d541: 8d 65 f4 lea -0xc(%ebp),%esp 10d544: 5b pop %ebx 10d545: 5e pop %esi 10d546: 5f pop %edi 10d547: c9 leave 10d548: c3 ret 10d549: 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 ); 10d54c: 50 push %eax 10d54d: 8d 45 d8 lea -0x28(%ebp),%eax 10d550: 50 push %eax 10d551: 53 push %ebx 10d552: 57 push %edi 10d553: 89 45 d4 mov %eax,-0x2c(%ebp) 10d556: e8 e5 3c 00 00 call 111240 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10d55b: 8b 45 d4 mov -0x2c(%ebp),%eax 10d55e: 89 04 24 mov %eax,(%esp) 10d561: e8 1a 3d 00 00 call 111280 <_Timespec_To_ticks> 10d566: 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 ) 10d568: 83 c4 10 add $0x10,%esp return POSIX_ABSOLUTE_TIMEOUT_IS_NOW; 10d56b: 83 f8 01 cmp $0x1,%eax 10d56e: 19 c0 sbb %eax,%eax 10d570: 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; } 10d573: 8d 65 f4 lea -0xc(%ebp),%esp 10d576: 5b pop %ebx 10d577: 5e pop %esi 10d578: 5f pop %edi 10d579: c9 leave 10d57a: c3 ret =============================================================================== 0010c0ac <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10c0ac: 55 push %ebp 10c0ad: 89 e5 mov %esp,%ebp 10c0af: 56 push %esi 10c0b0: 53 push %ebx 10c0b1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c0b4: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10c0b7: 85 db test %ebx,%ebx 10c0b9: 74 39 je 10c0f4 <_POSIX_Condition_variables_Get+0x48> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10c0bb: 8b 03 mov (%ebx),%eax 10c0bd: 83 f8 ff cmp $0xffffffff,%eax 10c0c0: 74 1a je 10c0dc <_POSIX_Condition_variables_Get+0x30> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10c0c2: 52 push %edx 10c0c3: 56 push %esi 10c0c4: 50 push %eax 10c0c5: 68 60 a0 12 00 push $0x12a060 10c0ca: e8 75 2b 00 00 call 10ec44 <_Objects_Get> 10c0cf: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10c0d2: 8d 65 f8 lea -0x8(%ebp),%esp 10c0d5: 5b pop %ebx 10c0d6: 5e pop %esi 10c0d7: c9 leave 10c0d8: c3 ret 10c0d9: 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 ); 10c0dc: 83 ec 08 sub $0x8,%esp 10c0df: 6a 00 push $0x0 10c0e1: 53 push %ebx 10c0e2: e8 19 00 00 00 call 10c100 if ( status ) { 10c0e7: 83 c4 10 add $0x10,%esp 10c0ea: 85 c0 test %eax,%eax 10c0ec: 75 06 jne 10c0f4 <_POSIX_Condition_variables_Get+0x48> 10c0ee: 8b 03 mov (%ebx),%eax 10c0f0: eb d0 jmp 10c0c2 <_POSIX_Condition_variables_Get+0x16> 10c0f2: 66 90 xchg %ax,%ax <== NOT EXECUTED *location = OBJECTS_ERROR; 10c0f4: c7 06 01 00 00 00 movl $0x1,(%esi) return (POSIX_Condition_variables_Control *) 0; 10c0fa: 31 c0 xor %eax,%eax 10c0fc: eb d4 jmp 10c0d2 <_POSIX_Condition_variables_Get+0x26> =============================================================================== 0010c1c8 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10c1c8: 55 push %ebp 10c1c9: 89 e5 mov %esp,%ebp 10c1cb: 57 push %edi 10c1cc: 56 push %esi 10c1cd: 53 push %ebx 10c1ce: 83 ec 24 sub $0x24,%esp 10c1d1: 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 ); 10c1d4: 8d 45 e4 lea -0x1c(%ebp),%eax 10c1d7: 50 push %eax 10c1d8: ff 75 08 pushl 0x8(%ebp) 10c1db: e8 cc fe ff ff call 10c0ac <_POSIX_Condition_variables_Get> 10c1e0: 89 c7 mov %eax,%edi switch ( location ) { 10c1e2: 83 c4 10 add $0x10,%esp 10c1e5: 8b 45 e4 mov -0x1c(%ebp),%eax 10c1e8: 85 c0 test %eax,%eax 10c1ea: 74 10 je 10c1fc <_POSIX_Condition_variables_Signal_support+0x34> #endif case OBJECTS_ERROR: break; } return EINVAL; 10c1ec: b8 16 00 00 00 mov $0x16,%eax } 10c1f1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1f4: 5b pop %ebx 10c1f5: 5e pop %esi 10c1f6: 5f pop %edi 10c1f7: c9 leave 10c1f8: c3 ret 10c1f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c1fc: 8d 77 18 lea 0x18(%edi),%esi 10c1ff: eb 0b jmp 10c20c <_POSIX_Condition_variables_Signal_support+0x44> 10c201: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 10c204: 84 db test %bl,%bl 10c206: 74 20 je 10c228 <_POSIX_Condition_variables_Signal_support+0x60> 10c208: 85 c0 test %eax,%eax 10c20a: 74 1c je 10c228 <_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 ); 10c20c: 83 ec 0c sub $0xc,%esp 10c20f: 56 push %esi 10c210: e8 83 36 00 00 call 10f898 <_Thread_queue_Dequeue> if ( !the_thread ) 10c215: 83 c4 10 add $0x10,%esp 10c218: 85 c0 test %eax,%eax 10c21a: 75 e8 jne 10c204 <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c21c: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) } while ( is_broadcast && the_thread ); 10c223: 84 db test %bl,%bl 10c225: 75 e1 jne 10c208 <_POSIX_Condition_variables_Signal_support+0x40> 10c227: 90 nop _Thread_Enable_dispatch(); 10c228: e8 a7 32 00 00 call 10f4d4 <_Thread_Enable_dispatch> return 0; 10c22d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c22f: 8d 65 f4 lea -0xc(%ebp),%esp 10c232: 5b pop %ebx 10c233: 5e pop %esi 10c234: 5f pop %edi 10c235: c9 leave 10c236: c3 ret =============================================================================== 0010c290 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10c290: 55 push %ebp 10c291: 89 e5 mov %esp,%ebp 10c293: 57 push %edi 10c294: 56 push %esi 10c295: 53 push %ebx 10c296: 83 ec 34 sub $0x34,%esp 10c299: 8b 7d 08 mov 0x8(%ebp),%edi 10c29c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c29f: 8a 45 14 mov 0x14(%ebp),%al 10c2a2: 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 ) ) { 10c2a5: 8d 75 e4 lea -0x1c(%ebp),%esi 10c2a8: 56 push %esi 10c2a9: 53 push %ebx 10c2aa: e8 59 01 00 00 call 10c408 <_POSIX_Mutex_Get> 10c2af: 83 c4 10 add $0x10,%esp 10c2b2: 85 c0 test %eax,%eax 10c2b4: 74 21 je 10c2d7 <_POSIX_Condition_variables_Wait_support+0x47> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c2b6: a1 94 9b 12 00 mov 0x129b94,%eax 10c2bb: 48 dec %eax 10c2bc: a3 94 9b 12 00 mov %eax,0x129b94 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c2c1: 83 ec 08 sub $0x8,%esp 10c2c4: 56 push %esi 10c2c5: 57 push %edi 10c2c6: e8 e1 fd ff ff call 10c0ac <_POSIX_Condition_variables_Get> 10c2cb: 89 c6 mov %eax,%esi switch ( location ) { 10c2cd: 83 c4 10 add $0x10,%esp 10c2d0: 8b 55 e4 mov -0x1c(%ebp),%edx 10c2d3: 85 d2 test %edx,%edx 10c2d5: 74 11 je 10c2e8 <_POSIX_Condition_variables_Wait_support+0x58> #endif case OBJECTS_ERROR: break; } return EINVAL; 10c2d7: be 16 00 00 00 mov $0x16,%esi } 10c2dc: 89 f0 mov %esi,%eax 10c2de: 8d 65 f4 lea -0xc(%ebp),%esp 10c2e1: 5b pop %ebx 10c2e2: 5e pop %esi 10c2e3: 5f pop %edi 10c2e4: c9 leave 10c2e5: c3 ret 10c2e6: 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 ) ) { 10c2e8: 8b 40 14 mov 0x14(%eax),%eax 10c2eb: 85 c0 test %eax,%eax 10c2ed: 74 19 je 10c308 <_POSIX_Condition_variables_Wait_support+0x78> 10c2ef: 3b 03 cmp (%ebx),%eax 10c2f1: 74 15 je 10c308 <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 10c2f3: e8 dc 31 00 00 call 10f4d4 <_Thread_Enable_dispatch> return EINVAL; 10c2f8: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c2fd: 89 f0 mov %esi,%eax 10c2ff: 8d 65 f4 lea -0xc(%ebp),%esp 10c302: 5b pop %ebx 10c303: 5e pop %esi 10c304: 5f pop %edi 10c305: c9 leave 10c306: c3 ret 10c307: 90 nop <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10c308: 83 ec 0c sub $0xc,%esp 10c30b: 53 push %ebx 10c30c: e8 73 03 00 00 call 10c684 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10c311: 83 c4 10 add $0x10,%esp 10c314: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10c318: 75 4e jne 10c368 <_POSIX_Condition_variables_Wait_support+0xd8> the_cond->Mutex = *mutex; 10c31a: 8b 03 mov (%ebx),%eax 10c31c: 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; 10c31f: 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; 10c326: a1 58 a1 12 00 mov 0x12a158,%eax 10c32b: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10c332: 83 c6 18 add $0x18,%esi 10c335: 89 70 44 mov %esi,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10c338: 8b 17 mov (%edi),%edx 10c33a: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10c33d: 50 push %eax 10c33e: 68 5c fd 10 00 push $0x10fd5c 10c343: ff 75 10 pushl 0x10(%ebp) 10c346: 56 push %esi 10c347: e8 70 36 00 00 call 10f9bc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c34c: e8 83 31 00 00 call 10f4d4 <_Thread_Enable_dispatch> * a POSIX signal, then pthread_cond_wait returns spuriously, * according to the POSIX standard. It means that pthread_cond_wait * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; 10c351: a1 58 a1 12 00 mov 0x12a158,%eax 10c356: 8b 70 34 mov 0x34(%eax),%esi if ( status == EINTR ) 10c359: 83 c4 10 add $0x10,%esp 10c35c: 83 fe 04 cmp $0x4,%esi 10c35f: 75 11 jne 10c372 <_POSIX_Condition_variables_Wait_support+0xe2><== ALWAYS TAKEN status = 0; 10c361: 31 f6 xor %esi,%esi <== NOT EXECUTED 10c363: eb 0d jmp 10c372 <_POSIX_Condition_variables_Wait_support+0xe2><== NOT EXECUTED 10c365: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else { _Thread_Enable_dispatch(); 10c368: e8 67 31 00 00 call 10f4d4 <_Thread_Enable_dispatch> status = ETIMEDOUT; 10c36d: be 74 00 00 00 mov $0x74,%esi /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10c372: 83 ec 0c sub $0xc,%esp 10c375: 53 push %ebx 10c376: e8 81 02 00 00 call 10c5fc if ( mutex_status ) 10c37b: 83 c4 10 add $0x10,%esp 10c37e: 85 c0 test %eax,%eax 10c380: 0f 85 51 ff ff ff jne 10c2d7 <_POSIX_Condition_variables_Wait_support+0x47> case OBJECTS_ERROR: break; } return EINVAL; } 10c386: 89 f0 mov %esi,%eax 10c388: 8d 65 f4 lea -0xc(%ebp),%esp 10c38b: 5b pop %ebx 10c38c: 5e pop %esi 10c38d: 5f pop %edi 10c38e: c9 leave 10c38f: c3 ret =============================================================================== 00112b38 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 112b38: 55 push %ebp 112b39: 89 e5 mov %esp,%ebp 112b3b: 57 push %edi 112b3c: 56 push %esi 112b3d: 53 push %ebx 112b3e: 83 ec 2c sub $0x2c,%esp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 112b41: 8b 45 08 mov 0x8(%ebp),%eax 112b44: 8b 40 08 mov 0x8(%eax),%eax 112b47: 89 c7 mov %eax,%edi 112b49: c1 ef 18 shr $0x18,%edi 112b4c: 83 e7 07 and $0x7,%edi for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 112b4f: 0f b7 c0 movzwl %ax,%eax 112b52: c1 e0 02 shl $0x2,%eax 112b55: 89 45 e0 mov %eax,-0x20(%ebp) * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 112b58: 8b 1d 70 69 12 00 mov 0x126970,%ebx done = true; for ( index = 1 ; index <= max ; ++index ) { 112b5e: 66 85 db test %bx,%bx 112b61: 75 09 jne 112b6c <_POSIX_Keys_Run_destructors+0x34> done = false; } } } } } 112b63: 8d 65 f4 lea -0xc(%ebp),%esp 112b66: 5b pop %ebx 112b67: 5e pop %esi 112b68: 5f pop %edi 112b69: c9 leave 112b6a: c3 ret 112b6b: 90 nop <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 112b6c: be 01 00 00 00 mov $0x1,%esi 112b71: b0 01 mov $0x1,%al POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 112b73: 0f b7 ce movzwl %si,%ecx 112b76: 8b 15 7c 69 12 00 mov 0x12697c,%edx Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) 112b7c: 8b 0c 8a mov (%edx,%ecx,4),%ecx _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 112b7f: 85 c9 test %ecx,%ecx 112b81: 74 2c je 112baf <_POSIX_Keys_Run_destructors+0x77> 112b83: 8b 51 10 mov 0x10(%ecx),%edx 112b86: 89 55 d4 mov %edx,-0x2c(%ebp) 112b89: 85 d2 test %edx,%edx 112b8b: 74 22 je 112baf <_POSIX_Keys_Run_destructors+0x77> void *value = key->Values [ thread_api ][ thread_index ]; 112b8d: 8b 55 e0 mov -0x20(%ebp),%edx 112b90: 03 54 b9 14 add 0x14(%ecx,%edi,4),%edx 112b94: 89 55 e4 mov %edx,-0x1c(%ebp) 112b97: 8b 0a mov (%edx),%ecx if ( value != NULL ) { 112b99: 85 c9 test %ecx,%ecx 112b9b: 74 12 je 112baf <_POSIX_Keys_Run_destructors+0x77> key->Values [ thread_api ][ thread_index ] = NULL; 112b9d: c7 02 00 00 00 00 movl $0x0,(%edx) (*key->destructor)( value ); 112ba3: 83 ec 0c sub $0xc,%esp 112ba6: 51 push %ecx 112ba7: ff 55 d4 call *-0x2c(%ebp) 112baa: 83 c4 10 add $0x10,%esp done = false; 112bad: 31 c0 xor %eax,%eax Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 112baf: 46 inc %esi 112bb0: 66 39 f3 cmp %si,%bx 112bb3: 73 be jae 112b73 <_POSIX_Keys_Run_destructors+0x3b> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 112bb5: 84 c0 test %al,%al 112bb7: 74 9f je 112b58 <_POSIX_Keys_Run_destructors+0x20> 112bb9: eb a8 jmp 112b63 <_POSIX_Keys_Run_destructors+0x2b> =============================================================================== 00116290 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 116290: 55 push %ebp 116291: 89 e5 mov %esp,%ebp 116293: 57 push %edi 116294: 56 push %esi 116295: 53 push %ebx 116296: 83 ec 24 sub $0x24,%esp 116299: 8b 5d 10 mov 0x10(%ebp),%ebx CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 11629c: 68 ff 00 00 00 push $0xff 1162a1: ff 75 08 pushl 0x8(%ebp) 1162a4: e8 ff 4c 00 00 call 11afa8 1162a9: 89 c6 mov %eax,%esi 1162ab: a1 94 fa 12 00 mov 0x12fa94,%eax 1162b0: 40 inc %eax 1162b1: a3 94 fa 12 00 mov %eax,0x12fa94 * 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 ) { 1162b6: 83 c4 10 add $0x10,%esp 1162b9: 85 db test %ebx,%ebx 1162bb: 0f 84 b7 00 00 00 je 116378 <_POSIX_Message_queue_Create_support+0xe8> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 1162c1: 8b 7b 04 mov 0x4(%ebx),%edi 1162c4: 85 ff test %edi,%edi 1162c6: 0f 8e f0 00 00 00 jle 1163bc <_POSIX_Message_queue_Create_support+0x12c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 1162cc: 8b 5b 08 mov 0x8(%ebx),%ebx 1162cf: 89 5d e4 mov %ebx,-0x1c(%ebp) 1162d2: 85 db test %ebx,%ebx 1162d4: 0f 8e e2 00 00 00 jle 1163bc <_POSIX_Message_queue_Create_support+0x12c> RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) _Objects_Allocate( &_POSIX_Message_queue_Information ); 1162da: 83 ec 0c sub $0xc,%esp 1162dd: 68 40 fe 12 00 push $0x12fe40 1162e2: e8 99 c4 ff ff call 112780 <_Objects_Allocate> 1162e7: 89 c3 mov %eax,%ebx attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 1162e9: 83 c4 10 add $0x10,%esp 1162ec: 85 c0 test %eax,%eax 1162ee: 0f 84 0a 01 00 00 je 1163fe <_POSIX_Message_queue_Create_support+0x16e> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 1162f4: 8b 45 0c mov 0xc(%ebp),%eax 1162f7: 89 43 10 mov %eax,0x10(%ebx) the_mq->named = true; 1162fa: c6 43 14 01 movb $0x1,0x14(%ebx) the_mq->open_count = 1; 1162fe: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx) the_mq->linked = true; 116305: c6 43 15 01 movb $0x1,0x15(%ebx) /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 116309: 8d 56 01 lea 0x1(%esi),%edx 11630c: 83 ec 0c sub $0xc,%esp 11630f: 52 push %edx 116310: 89 55 e0 mov %edx,-0x20(%ebp) 116313: e8 e8 e4 ff ff call 114800 <_Workspace_Allocate> 116318: 89 c6 mov %eax,%esi if (!name) { 11631a: 83 c4 10 add $0x10,%esp 11631d: 85 c0 test %eax,%eax 11631f: 8b 55 e0 mov -0x20(%ebp),%edx 116322: 0f 84 ab 00 00 00 je 1163d3 <_POSIX_Message_queue_Create_support+0x143> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strncpy( name, name_arg, n+1 ); 116328: 50 push %eax 116329: 52 push %edx 11632a: ff 75 08 pushl 0x8(%ebp) 11632d: 56 push %esi 11632e: e8 f9 4b 00 00 call 11af2c * * 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; 116333: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) if ( !_CORE_message_queue_Initialize( 11633a: ff 75 e4 pushl -0x1c(%ebp) 11633d: 57 push %edi * current scheduling policy. * * 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; 11633e: 8d 43 5c lea 0x5c(%ebx),%eax the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( !_CORE_message_queue_Initialize( 116341: 50 push %eax 116342: 8d 43 1c lea 0x1c(%ebx),%eax 116345: 50 push %eax 116346: e8 19 0f 00 00 call 117264 <_CORE_message_queue_Initialize> 11634b: 83 c4 20 add $0x20,%esp 11634e: 84 c0 test %al,%al 116350: 74 3a je 11638c <_POSIX_Message_queue_Create_support+0xfc> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 116352: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116356: a1 5c fe 12 00 mov 0x12fe5c,%eax 11635b: 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; 11635e: 89 73 0c mov %esi,0xc(%ebx) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 116361: 8b 45 14 mov 0x14(%ebp),%eax 116364: 89 18 mov %ebx,(%eax) _Thread_Enable_dispatch(); 116366: e8 dd d1 ff ff call 113548 <_Thread_Enable_dispatch> return 0; 11636b: 31 c0 xor %eax,%eax } 11636d: 8d 65 f4 lea -0xc(%ebp),%esp 116370: 5b pop %ebx 116371: 5e pop %esi 116372: 5f pop %edi 116373: c9 leave 116374: c3 ret 116375: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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 ) { attr.mq_maxmsg = 10; attr.mq_msgsize = 16; 116378: c7 45 e4 10 00 00 00 movl $0x10,-0x1c(%ebp) * 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 ) { attr.mq_maxmsg = 10; 11637f: bf 0a 00 00 00 mov $0xa,%edi 116384: e9 51 ff ff ff jmp 1162da <_POSIX_Message_queue_Create_support+0x4a> 116389: 8d 76 00 lea 0x0(%esi),%esi <== 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 ); 11638c: 83 ec 08 sub $0x8,%esp 11638f: 53 push %ebx 116390: 68 40 fe 12 00 push $0x12fe40 116395: e8 5e c7 ff ff call 112af8 <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 11639a: 89 34 24 mov %esi,(%esp) 11639d: e8 7a e4 ff ff call 11481c <_Workspace_Free> _Thread_Enable_dispatch(); 1163a2: e8 a1 d1 ff ff call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 1163a7: e8 74 34 00 00 call 119820 <__errno> 1163ac: c7 00 1c 00 00 00 movl $0x1c,(%eax) 1163b2: 83 c4 10 add $0x10,%esp 1163b5: b8 ff ff ff ff mov $0xffffffff,%eax 1163ba: eb b1 jmp 11636d <_POSIX_Message_queue_Create_support+0xdd> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 1163bc: e8 87 d1 ff ff call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 1163c1: e8 5a 34 00 00 call 119820 <__errno> 1163c6: c7 00 16 00 00 00 movl $0x16,(%eax) 1163cc: b8 ff ff ff ff mov $0xffffffff,%eax 1163d1: eb 9a jmp 11636d <_POSIX_Message_queue_Create_support+0xdd> 1163d3: 83 ec 08 sub $0x8,%esp 1163d6: 53 push %ebx 1163d7: 68 40 fe 12 00 push $0x12fe40 1163dc: e8 17 c7 ff ff call 112af8 <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 1163e1: e8 62 d1 ff ff call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 1163e6: e8 35 34 00 00 call 119820 <__errno> 1163eb: c7 00 0c 00 00 00 movl $0xc,(%eax) 1163f1: 83 c4 10 add $0x10,%esp 1163f4: b8 ff ff ff ff mov $0xffffffff,%eax 1163f9: e9 6f ff ff ff jmp 11636d <_POSIX_Message_queue_Create_support+0xdd> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 1163fe: e8 45 d1 ff ff call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 116403: e8 18 34 00 00 call 119820 <__errno> 116408: c7 00 17 00 00 00 movl $0x17,(%eax) 11640e: b8 ff ff ff ff mov $0xffffffff,%eax 116413: e9 55 ff ff ff jmp 11636d <_POSIX_Message_queue_Create_support+0xdd> =============================================================================== 00116418 <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 116418: 55 push %ebp 116419: 89 e5 mov %esp,%ebp 11641b: 53 push %ebx 11641c: 83 ec 14 sub $0x14,%esp 11641f: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 116422: 85 db test %ebx,%ebx 116424: 74 05 je 11642b <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 116426: 80 3b 00 cmpb $0x0,(%ebx) 116429: 75 0d jne 116438 <_POSIX_Message_queue_Name_to_id+0x20> return EINVAL; 11642b: b8 16 00 00 00 mov $0x16,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 116430: 8b 5d fc mov -0x4(%ebp),%ebx 116433: c9 leave 116434: c3 ret 116435: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 116438: 83 ec 08 sub $0x8,%esp 11643b: 68 ff 00 00 00 push $0xff 116440: 53 push %ebx 116441: e8 62 4b 00 00 call 11afa8 116446: 83 c4 10 add $0x10,%esp 116449: 3d fe 00 00 00 cmp $0xfe,%eax 11644e: 76 0c jbe 11645c <_POSIX_Message_queue_Name_to_id+0x44> return ENAMETOOLONG; 116450: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 116455: 8b 5d fc mov -0x4(%ebp),%ebx 116458: c9 leave 116459: c3 ret 11645a: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 11645c: 50 push %eax 11645d: 8d 45 f4 lea -0xc(%ebp),%eax 116460: 50 push %eax 116461: 53 push %ebx 116462: 68 40 fe 12 00 push $0x12fe40 116467: e8 00 14 00 00 call 11786c <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 11646c: 8b 4d f4 mov -0xc(%ebp),%ecx 11646f: 8b 55 0c mov 0xc(%ebp),%edx 116472: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 116474: 83 c4 10 add $0x10,%esp return 0; 116477: 83 f8 01 cmp $0x1,%eax 11647a: 19 c0 sbb %eax,%eax 11647c: f7 d0 not %eax 11647e: 83 e0 02 and $0x2,%eax return ENOENT; } 116481: 8b 5d fc mov -0x4(%ebp),%ebx 116484: c9 leave 116485: c3 ret =============================================================================== 0010fcc8 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10fcc8: 55 push %ebp 10fcc9: 89 e5 mov %esp,%ebp 10fccb: 53 push %ebx 10fccc: 83 ec 28 sub $0x28,%esp 10fccf: 8b 5d 08 mov 0x8(%ebp),%ebx 10fcd2: 8a 45 18 mov 0x18(%ebp),%al 10fcd5: 88 45 e7 mov %al,-0x19(%ebp) POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10fcd8: 8d 45 f4 lea -0xc(%ebp),%eax 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( 10fcdb: 50 push %eax 10fcdc: 53 push %ebx 10fcdd: 68 e0 ff 12 00 push $0x12ffe0 10fce2: e8 51 2f 00 00 call 112c38 <_Objects_Get> switch ( location ) { 10fce7: 83 c4 10 add $0x10,%esp 10fcea: 8b 55 f4 mov -0xc(%ebp),%edx 10fced: 85 d2 test %edx,%edx 10fcef: 74 17 je 10fd08 <_POSIX_Message_queue_Receive_support+0x40> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fcf1: e8 2a 9b 00 00 call 119820 <__errno> 10fcf6: c7 00 09 00 00 00 movl $0x9,(%eax) 10fcfc: b8 ff ff ff ff mov $0xffffffff,%eax } 10fd01: 8b 5d fc mov -0x4(%ebp),%ebx 10fd04: c9 leave 10fd05: c3 ret 10fd06: 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_WRONLY ) { 10fd08: 8b 50 14 mov 0x14(%eax),%edx 10fd0b: 89 d1 mov %edx,%ecx 10fd0d: 83 e1 03 and $0x3,%ecx 10fd10: 49 dec %ecx 10fd11: 0f 84 af 00 00 00 je 10fdc6 <_POSIX_Message_queue_Receive_support+0xfe> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fd17: 8b 40 10 mov 0x10(%eax),%eax if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10fd1a: 8b 4d 10 mov 0x10(%ebp),%ecx 10fd1d: 39 48 68 cmp %ecx,0x68(%eax) 10fd20: 77 62 ja 10fd84 <_POSIX_Message_queue_Receive_support+0xbc> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10fd22: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fd29: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10fd2d: 75 45 jne 10fd74 <_POSIX_Message_queue_Receive_support+0xac><== ALWAYS TAKEN 10fd2f: 31 d2 xor %edx,%edx <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10fd31: 83 ec 08 sub $0x8,%esp 10fd34: ff 75 1c pushl 0x1c(%ebp) 10fd37: 52 push %edx 10fd38: 8d 55 f0 lea -0x10(%ebp),%edx 10fd3b: 52 push %edx 10fd3c: ff 75 0c pushl 0xc(%ebp) 10fd3f: 53 push %ebx 10fd40: 83 c0 1c add $0x1c,%eax 10fd43: 50 push %eax 10fd44: e8 93 1f 00 00 call 111cdc <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10fd49: 83 c4 20 add $0x20,%esp 10fd4c: e8 f7 37 00 00 call 113548 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10fd51: 8b 15 58 00 13 00 mov 0x130058,%edx RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); 10fd57: 8b 42 24 mov 0x24(%edx),%eax 10fd5a: 85 c0 test %eax,%eax 10fd5c: 78 22 js 10fd80 <_POSIX_Message_queue_Receive_support+0xb8> do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fd5e: 8b 4d 14 mov 0x14(%ebp),%ecx 10fd61: 89 01 mov %eax,(%ecx) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10fd63: 8b 42 34 mov 0x34(%edx),%eax 10fd66: 85 c0 test %eax,%eax 10fd68: 75 36 jne 10fda0 <_POSIX_Message_queue_Receive_support+0xd8> return length_out; 10fd6a: 8b 45 f0 mov -0x10(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fd6d: 8b 5d fc mov -0x4(%ebp),%ebx 10fd70: c9 leave 10fd71: c3 ret 10fd72: 66 90 xchg %ax,%ax <== NOT EXECUTED length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fd74: 80 e6 40 and $0x40,%dh 10fd77: 0f 94 c2 sete %dl 10fd7a: 0f b6 d2 movzbl %dl,%edx 10fd7d: eb b2 jmp 10fd31 <_POSIX_Message_queue_Receive_support+0x69> 10fd7f: 90 nop <== NOT EXECUTED 10fd80: f7 d8 neg %eax 10fd82: eb da jmp 10fd5e <_POSIX_Message_queue_Receive_support+0x96> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 10fd84: e8 bf 37 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10fd89: e8 92 9a 00 00 call 119820 <__errno> 10fd8e: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10fd94: b8 ff ff ff ff mov $0xffffffff,%eax 10fd99: e9 63 ff ff ff jmp 10fd01 <_POSIX_Message_queue_Receive_support+0x39> 10fd9e: 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( 10fda0: e8 7b 9a 00 00 call 119820 <__errno> 10fda5: 89 c3 mov %eax,%ebx 10fda7: 83 ec 0c sub $0xc,%esp 10fdaa: a1 58 00 13 00 mov 0x130058,%eax 10fdaf: ff 70 34 pushl 0x34(%eax) 10fdb2: e8 29 02 00 00 call 10ffe0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10fdb7: 89 03 mov %eax,(%ebx) 10fdb9: 83 c4 10 add $0x10,%esp 10fdbc: b8 ff ff ff ff mov $0xffffffff,%eax 10fdc1: e9 3b ff ff ff jmp 10fd01 <_POSIX_Message_queue_Receive_support+0x39> 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(); 10fdc6: e8 7d 37 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fdcb: e8 50 9a 00 00 call 119820 <__errno> 10fdd0: c7 00 09 00 00 00 movl $0x9,(%eax) 10fdd6: b8 ff ff ff ff mov $0xffffffff,%eax 10fddb: e9 21 ff ff ff jmp 10fd01 <_POSIX_Message_queue_Receive_support+0x39> =============================================================================== 0010fe00 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10fe00: 55 push %ebp 10fe01: 89 e5 mov %esp,%ebp 10fe03: 56 push %esi 10fe04: 53 push %ebx 10fe05: 83 ec 20 sub $0x20,%esp 10fe08: 8b 75 08 mov 0x8(%ebp),%esi 10fe0b: 8b 5d 14 mov 0x14(%ebp),%ebx 10fe0e: 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 ) 10fe11: 83 fb 20 cmp $0x20,%ebx 10fe14: 0f 87 92 00 00 00 ja 10feac <_POSIX_Message_queue_Send_support+0xac> 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( 10fe1a: 51 push %ecx rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10fe1b: 8d 45 f4 lea -0xc(%ebp),%eax 10fe1e: 50 push %eax 10fe1f: 56 push %esi 10fe20: 68 e0 ff 12 00 push $0x12ffe0 10fe25: 88 55 e4 mov %dl,-0x1c(%ebp) 10fe28: e8 0b 2e 00 00 call 112c38 <_Objects_Get> switch ( location ) { 10fe2d: 83 c4 10 add $0x10,%esp 10fe30: 8b 55 f4 mov -0xc(%ebp),%edx 10fe33: 85 d2 test %edx,%edx 10fe35: 8a 55 e4 mov -0x1c(%ebp),%dl 10fe38: 75 5e jne 10fe98 <_POSIX_Message_queue_Send_support+0x98> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10fe3a: 8b 48 14 mov 0x14(%eax),%ecx 10fe3d: f6 c1 03 test $0x3,%cl 10fe40: 74 7e je 10fec0 <_POSIX_Message_queue_Send_support+0xc0> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fe42: 8b 40 10 mov 0x10(%eax),%eax /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fe45: 84 d2 test %dl,%dl 10fe47: 75 37 jne 10fe80 <_POSIX_Message_queue_Send_support+0x80> 10fe49: 31 d2 xor %edx,%edx do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10fe4b: ff 75 1c pushl 0x1c(%ebp) 10fe4e: 52 push %edx RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core( unsigned int priority ) { return priority * -1; 10fe4f: f7 db neg %ebx 10fe51: 53 push %ebx 10fe52: 6a 00 push $0x0 10fe54: 56 push %esi 10fe55: ff 75 10 pushl 0x10(%ebp) 10fe58: ff 75 0c pushl 0xc(%ebp) 10fe5b: 83 c0 1c add $0x1c,%eax 10fe5e: 50 push %eax 10fe5f: e8 a4 1f 00 00 call 111e08 <_CORE_message_queue_Submit> 10fe64: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10fe66: 83 c4 20 add $0x20,%esp 10fe69: e8 da 36 00 00 call 113548 <_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 ) 10fe6e: 83 fb 07 cmp $0x7,%ebx 10fe71: 74 19 je 10fe8c <_POSIX_Message_queue_Send_support+0x8c> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 10fe73: 85 db test %ebx,%ebx 10fe75: 75 61 jne 10fed8 <_POSIX_Message_queue_Send_support+0xd8> return msg_status; 10fe77: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fe79: 8d 65 f8 lea -0x8(%ebp),%esp 10fe7c: 5b pop %ebx 10fe7d: 5e pop %esi 10fe7e: c9 leave 10fe7f: c3 ret the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fe80: 31 d2 xor %edx,%edx 10fe82: f6 c5 40 test $0x40,%ch 10fe85: 0f 94 c2 sete %dl 10fe88: eb c1 jmp 10fe4b <_POSIX_Message_queue_Send_support+0x4b> 10fe8a: 66 90 xchg %ax,%ax <== 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; 10fe8c: a1 58 00 13 00 mov 0x130058,%eax 10fe91: 8b 58 34 mov 0x34(%eax),%ebx 10fe94: eb dd jmp 10fe73 <_POSIX_Message_queue_Send_support+0x73> 10fe96: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fe98: e8 83 99 00 00 call 119820 <__errno> 10fe9d: c7 00 09 00 00 00 movl $0x9,(%eax) 10fea3: b8 ff ff ff ff mov $0xffffffff,%eax 10fea8: eb cf jmp 10fe79 <_POSIX_Message_queue_Send_support+0x79> 10feaa: 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 ); 10feac: e8 6f 99 00 00 call 119820 <__errno> 10feb1: c7 00 16 00 00 00 movl $0x16,(%eax) 10feb7: b8 ff ff ff ff mov $0xffffffff,%eax 10febc: eb bb jmp 10fe79 <_POSIX_Message_queue_Send_support+0x79> 10febe: 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(); 10fec0: e8 83 36 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fec5: e8 56 99 00 00 call 119820 <__errno> 10feca: c7 00 09 00 00 00 movl $0x9,(%eax) 10fed0: b8 ff ff ff ff mov $0xffffffff,%eax 10fed5: eb a2 jmp 10fe79 <_POSIX_Message_queue_Send_support+0x79> 10fed7: 90 nop <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 10fed8: e8 43 99 00 00 call 119820 <__errno> 10fedd: 89 c6 mov %eax,%esi 10fedf: 83 ec 0c sub $0xc,%esp 10fee2: 53 push %ebx 10fee3: e8 f8 00 00 00 call 10ffe0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10fee8: 89 06 mov %eax,(%esi) 10feea: 83 c4 10 add $0x10,%esp 10feed: b8 ff ff ff ff mov $0xffffffff,%eax 10fef2: eb 85 jmp 10fe79 <_POSIX_Message_queue_Send_support+0x79> =============================================================================== 0010d0c4 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 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+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+0x30> return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); 10d0da: 52 push %edx 10d0db: 56 push %esi 10d0dc: 50 push %eax 10d0dd: 68 80 c7 12 00 push $0x12c780 10d0e2: e8 e1 2b 00 00 call 10fcc8 <_Objects_Get> { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); return (POSIX_Mutex_Control *) 10d0e7: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10d0ea: 8d 65 f8 lea -0x8(%ebp),%esp 10d0ed: 5b pop %ebx 10d0ee: 5e pop %esi 10d0ef: c9 leave 10d0f0: c3 ret 10d0f1: 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 ); 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+0x48> 10d106: 8b 03 mov (%ebx),%eax 10d108: eb d0 jmp 10d0da <_POSIX_Mutex_Get+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 d4 jmp 10d0ea <_POSIX_Mutex_Get+0x26> =============================================================================== 0010d118 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 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_interrupt_disable+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_interrupt_disable+0x30> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10d12e: ff 75 10 pushl 0x10(%ebp) 10d131: 56 push %esi 10d132: 50 push %eax 10d133: 68 80 c7 12 00 push $0x12c780 10d138: e8 33 2b 00 00 call 10fc70 <_Objects_Get_isr_disable> 10d13d: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10d140: 8d 65 f8 lea -0x8(%ebp),%esp 10d143: 5b pop %ebx 10d144: 5e pop %esi 10d145: c9 leave 10d146: c3 ret 10d147: 90 nop <== NOT EXECUTED ISR_Level *level ) { ___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_interrupt_disable+0x48> 10d15a: 8b 03 mov (%ebx),%eax 10d15c: eb d0 jmp 10d12e <_POSIX_Mutex_Get_interrupt_disable+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 d6 jmp 10d140 <_POSIX_Mutex_Get_interrupt_disable+0x28> =============================================================================== 0010d318 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10d318: 55 push %ebp 10d319: 89 e5 mov %esp,%ebp 10d31b: 53 push %ebx 10d31c: 83 ec 18 sub $0x18,%esp 10d31f: 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 ); 10d322: 8d 45 f0 lea -0x10(%ebp),%eax 10d325: 50 push %eax 10d326: 8d 45 f4 lea -0xc(%ebp),%eax 10d329: 50 push %eax 10d32a: ff 75 08 pushl 0x8(%ebp) 10d32d: e8 e6 fd ff ff call 10d118 <_POSIX_Mutex_Get_interrupt_disable> switch ( location ) { 10d332: 83 c4 10 add $0x10,%esp 10d335: 8b 55 f4 mov -0xc(%ebp),%edx 10d338: 85 d2 test %edx,%edx 10d33a: 75 34 jne 10d370 <_POSIX_Mutex_Lock_support+0x58> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10d33c: 83 ec 0c sub $0xc,%esp 10d33f: ff 75 f0 pushl -0x10(%ebp) 10d342: ff 75 10 pushl 0x10(%ebp) 10d345: 0f b6 db movzbl %bl,%ebx 10d348: 53 push %ebx 10d349: ff 70 08 pushl 0x8(%eax) 10d34c: 83 c0 14 add $0x14,%eax 10d34f: 50 push %eax 10d350: e8 37 1d 00 00 call 10f08c <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d355: 83 c4 14 add $0x14,%esp (CORE_mutex_Status) _Thread_Executing->Wait.return_code 10d358: a1 58 c9 12 00 mov 0x12c958,%eax the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d35d: ff 70 34 pushl 0x34(%eax) 10d360: e8 1b 01 00 00 call 10d480 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d365: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d368: 8b 5d fc mov -0x4(%ebp),%ebx 10d36b: c9 leave 10d36c: c3 ret 10d36d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10d370: b8 16 00 00 00 mov $0x16,%eax } 10d375: 8b 5d fc mov -0x4(%ebp),%ebx 10d378: c9 leave 10d379: c3 ret =============================================================================== 00114864 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 114864: 55 push %ebp 114865: 89 e5 mov %esp,%ebp 114867: 56 push %esi 114868: 53 push %ebx 114869: 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) 11486c: 8b 55 0c mov 0xc(%ebp),%edx 11486f: 85 d2 test %edx,%edx 114871: 0f 85 b9 00 00 00 jne 114930 <_POSIX_Semaphore_Create_support+0xcc> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 114877: 85 db test %ebx,%ebx 114879: 74 1c je 114897 <_POSIX_Semaphore_Create_support+0x33> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 11487b: 83 ec 08 sub $0x8,%esp 11487e: 68 ff 00 00 00 push $0xff 114883: 53 push %ebx 114884: e8 5f 3e 00 00 call 1186e8 114889: 83 c4 10 add $0x10,%esp 11488c: 3d fe 00 00 00 cmp $0xfe,%eax 114891: 0f 87 ad 00 00 00 ja 114944 <_POSIX_Semaphore_Create_support+0xe0> 114897: a1 b4 d1 12 00 mov 0x12d1b4,%eax 11489c: 40 inc %eax 11489d: a3 b4 d1 12 00 mov %eax,0x12d1b4 */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) _Objects_Allocate( &_POSIX_Semaphore_Information ); 1148a2: 83 ec 0c sub $0xc,%esp 1148a5: 68 e0 d4 12 00 push $0x12d4e0 1148aa: e8 45 ba ff ff call 1102f4 <_Objects_Allocate> 1148af: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 1148b1: 83 c4 10 add $0x10,%esp 1148b4: 85 c0 test %eax,%eax 1148b6: 0f 84 9a 00 00 00 je 114956 <_POSIX_Semaphore_Create_support+0xf2> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 1148bc: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 1148c3: 85 db test %ebx,%ebx 1148c5: 74 55 je 11491c <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; 1148c7: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 1148cb: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 1148d2: 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; 1148d6: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 1148dd: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 1148e4: 50 push %eax 1148e5: ff 75 10 pushl 0x10(%ebp) the_semaphore->named = false; the_semaphore->open_count = 0; the_semaphore->linked = false; } the_sem_attr = &the_semaphore->Semaphore.Attributes; 1148e8: 8d 46 5c lea 0x5c(%esi),%eax /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 1148eb: 50 push %eax 1148ec: 8d 46 1c lea 0x1c(%esi),%eax 1148ef: 50 push %eax 1148f0: e8 7f b4 ff ff call 10fd74 <_CORE_semaphore_Initialize> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 1148f5: 0f b7 56 08 movzwl 0x8(%esi),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1148f9: a1 fc d4 12 00 mov 0x12d4fc,%eax 1148fe: 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; 114901: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 114904: 8b 45 14 mov 0x14(%ebp),%eax 114907: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 114909: e8 ae c7 ff ff call 1110bc <_Thread_Enable_dispatch> return 0; 11490e: 83 c4 10 add $0x10,%esp 114911: 31 c0 xor %eax,%eax } 114913: 8d 65 f8 lea -0x8(%ebp),%esp 114916: 5b pop %ebx 114917: 5e pop %esi 114918: c9 leave 114919: c3 ret 11491a: 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; 11491c: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 114920: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 114927: c6 40 15 00 movb $0x0,0x15(%eax) 11492b: eb a9 jmp 1148d6 <_POSIX_Semaphore_Create_support+0x72> 11492d: 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 ); 114930: e8 7f 2c 00 00 call 1175b4 <__errno> 114935: c7 00 58 00 00 00 movl $0x58,(%eax) 11493b: b8 ff ff ff ff mov $0xffffffff,%eax 114940: eb d1 jmp 114913 <_POSIX_Semaphore_Create_support+0xaf> 114942: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 114944: e8 6b 2c 00 00 call 1175b4 <__errno> 114949: c7 00 5b 00 00 00 movl $0x5b,(%eax) 11494f: b8 ff ff ff ff mov $0xffffffff,%eax 114954: eb bd jmp 114913 <_POSIX_Semaphore_Create_support+0xaf> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 114956: e8 61 c7 ff ff call 1110bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 11495b: e8 54 2c 00 00 call 1175b4 <__errno> 114960: c7 00 1c 00 00 00 movl $0x1c,(%eax) 114966: b8 ff ff ff ff mov $0xffffffff,%eax 11496b: eb a6 jmp 114913 <_POSIX_Semaphore_Create_support+0xaf> =============================================================================== 001149c0 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 1149c0: 55 push %ebp 1149c1: 89 e5 mov %esp,%ebp 1149c3: 83 ec 18 sub $0x18,%esp 1149c6: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 1149c9: 85 c0 test %eax,%eax 1149cb: 74 05 je 1149d2 <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 1149cd: 80 38 00 cmpb $0x0,(%eax) 1149d0: 75 0a jne 1149dc <_POSIX_Semaphore_Name_to_id+0x1c> return EINVAL; 1149d2: b8 16 00 00 00 mov $0x16,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 1149d7: c9 leave 1149d8: c3 ret 1149d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 1149dc: 52 push %edx 1149dd: 8d 55 f4 lea -0xc(%ebp),%edx 1149e0: 52 push %edx 1149e1: 50 push %eax 1149e2: 68 e0 d4 12 00 push $0x12d4e0 1149e7: e8 6c 0c 00 00 call 115658 <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 1149ec: 8b 4d f4 mov -0xc(%ebp),%ecx 1149ef: 8b 55 0c mov 0xc(%ebp),%edx 1149f2: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 1149f4: 83 c4 10 add $0x10,%esp return 0; 1149f7: 83 f8 01 cmp $0x1,%eax 1149fa: 19 c0 sbb %eax,%eax 1149fc: f7 d0 not %eax 1149fe: 83 e0 02 and $0x2,%eax return ENOENT; } 114a01: c9 leave 114a02: c3 ret =============================================================================== 00114a2c <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 114a2c: 55 push %ebp 114a2d: 89 e5 mov %esp,%ebp 114a2f: 53 push %ebx 114a30: 83 ec 18 sub $0x18,%esp 114a33: 8a 5d 0c mov 0xc(%ebp),%bl POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 114a36: 8d 45 f4 lea -0xc(%ebp),%eax sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) _Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location ); 114a39: 50 push %eax 114a3a: 8b 45 08 mov 0x8(%ebp),%eax 114a3d: ff 30 pushl (%eax) 114a3f: 68 e0 d4 12 00 push $0x12d4e0 114a44: e8 63 bd ff ff call 1107ac <_Objects_Get> switch ( location ) { 114a49: 83 c4 10 add $0x10,%esp 114a4c: 8b 55 f4 mov -0xc(%ebp),%edx 114a4f: 85 d2 test %edx,%edx 114a51: 74 15 je 114a68 <_POSIX_Semaphore_Wait_support+0x3c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 114a53: e8 5c 2b 00 00 call 1175b4 <__errno> 114a58: c7 00 16 00 00 00 movl $0x16,(%eax) 114a5e: b8 ff ff ff ff mov $0xffffffff,%eax } 114a63: 8b 5d fc mov -0x4(%ebp),%ebx 114a66: c9 leave 114a67: c3 ret the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 114a68: ff 75 10 pushl 0x10(%ebp) 114a6b: 0f b6 db movzbl %bl,%ebx 114a6e: 53 push %ebx 114a6f: ff 70 08 pushl 0x8(%eax) 114a72: 83 c0 1c add $0x1c,%eax 114a75: 50 push %eax 114a76: e8 1d 07 00 00 call 115198 <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 114a7b: e8 3c c6 ff ff call 1110bc <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 114a80: 83 c4 10 add $0x10,%esp 114a83: a1 78 d7 12 00 mov 0x12d778,%eax 114a88: 8b 40 34 mov 0x34(%eax),%eax 114a8b: 85 c0 test %eax,%eax 114a8d: 75 09 jne 114a98 <_POSIX_Semaphore_Wait_support+0x6c> return 0; 114a8f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 114a91: 8b 5d fc mov -0x4(%ebp),%ebx 114a94: c9 leave 114a95: c3 ret 114a96: 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( 114a98: e8 17 2b 00 00 call 1175b4 <__errno> 114a9d: 89 c3 mov %eax,%ebx 114a9f: 83 ec 0c sub $0xc,%esp 114aa2: a1 78 d7 12 00 mov 0x12d778,%eax 114aa7: ff 70 34 pushl 0x34(%eax) 114aaa: e8 75 26 00 00 call 117124 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 114aaf: 89 03 mov %eax,(%ebx) 114ab1: 83 c4 10 add $0x10,%esp 114ab4: b8 ff ff ff ff mov $0xffffffff,%eax 114ab9: eb a8 jmp 114a63 <_POSIX_Semaphore_Wait_support+0x37> =============================================================================== 001105f8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 1105f8: 55 push %ebp 1105f9: 89 e5 mov %esp,%ebp 1105fb: 83 ec 08 sub $0x8,%esp 1105fe: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110601: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 110607: 8b 88 d8 00 00 00 mov 0xd8(%eax),%ecx 11060d: 85 c9 test %ecx,%ecx 11060f: 75 09 jne 11061a <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN 110611: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax) 110618: 74 06 je 110620 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 11061a: 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(); 11061b: e9 d0 d4 ff ff jmp 10daf0 <_Thread_Enable_dispatch> POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 110620: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax 110626: 85 c0 test %eax,%eax 110628: 74 f0 je 11061a <_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; 11062a: a1 94 87 12 00 mov 0x128794,%eax 11062f: 48 dec %eax 110630: a3 94 87 12 00 mov %eax,0x128794 thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 110635: 83 ec 08 sub $0x8,%esp 110638: 6a ff push $0xffffffff 11063a: 52 push %edx 11063b: e8 c0 08 00 00 call 110f00 <_POSIX_Thread_Exit> 110640: 83 c4 10 add $0x10,%esp } else _Thread_Enable_dispatch(); } 110643: c9 leave 110644: c3 ret =============================================================================== 00111954 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 111954: 55 push %ebp 111955: 89 e5 mov %esp,%ebp 111957: 57 push %edi 111958: 56 push %esi 111959: 53 push %ebx 11195a: 83 ec 18 sub $0x18,%esp 11195d: 8b 5d 08 mov 0x8(%ebp),%ebx 111960: 8b 75 0c mov 0xc(%ebp),%esi 111963: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 111966: ff 36 pushl (%esi) 111968: e8 cb ff ff ff call 111938 <_POSIX_Priority_Is_valid> 11196d: 83 c4 10 add $0x10,%esp 111970: 84 c0 test %al,%al 111972: 74 2a je 11199e <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111974: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 11197a: 8b 45 14 mov 0x14(%ebp),%eax 11197d: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 111983: 85 db test %ebx,%ebx 111985: 74 25 je 1119ac <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 111987: 83 fb 01 cmp $0x1,%ebx 11198a: 0f 84 90 00 00 00 je 111a20 <_POSIX_Thread_Translate_sched_param+0xcc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 111990: 83 fb 02 cmp $0x2,%ebx 111993: 0f 84 8f 00 00 00 je 111a28 <_POSIX_Thread_Translate_sched_param+0xd4> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 111999: 83 fb 04 cmp $0x4,%ebx 11199c: 74 1e je 1119bc <_POSIX_Thread_Translate_sched_param+0x68> if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; 11199e: b8 16 00 00 00 mov $0x16,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 1119a3: 8d 65 f4 lea -0xc(%ebp),%esp 1119a6: 5b pop %ebx 1119a7: 5e pop %esi 1119a8: 5f pop %edi 1119a9: c9 leave 1119aa: c3 ret 1119ab: 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; 1119ac: c7 07 01 00 00 00 movl $0x1,(%edi) return 0; 1119b2: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 1119b4: 8d 65 f4 lea -0xc(%ebp),%esp 1119b7: 5b pop %ebx 1119b8: 5e pop %esi 1119b9: 5f pop %edi 1119ba: c9 leave 1119bb: 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) && 1119bc: 8b 5e 08 mov 0x8(%esi),%ebx 1119bf: 85 db test %ebx,%ebx 1119c1: 75 07 jne 1119ca <_POSIX_Thread_Translate_sched_param+0x76> 1119c3: 8b 4e 0c mov 0xc(%esi),%ecx 1119c6: 85 c9 test %ecx,%ecx 1119c8: 74 d4 je 11199e <_POSIX_Thread_Translate_sched_param+0x4a> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 1119ca: 8b 56 10 mov 0x10(%esi),%edx 1119cd: 85 d2 test %edx,%edx 1119cf: 75 07 jne 1119d8 <_POSIX_Thread_Translate_sched_param+0x84> 1119d1: 8b 46 14 mov 0x14(%esi),%eax 1119d4: 85 c0 test %eax,%eax 1119d6: 74 c6 je 11199e <_POSIX_Thread_Translate_sched_param+0x4a> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 1119d8: 83 ec 0c sub $0xc,%esp 1119db: 8d 46 08 lea 0x8(%esi),%eax 1119de: 50 push %eax 1119df: e8 1c da ff ff call 10f400 <_Timespec_To_ticks> 1119e4: 89 c3 mov %eax,%ebx _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 1119e6: 8d 46 10 lea 0x10(%esi),%eax 1119e9: 89 04 24 mov %eax,(%esp) 1119ec: e8 0f da ff ff call 10f400 <_Timespec_To_ticks> if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 1119f1: 83 c4 10 add $0x10,%esp 1119f4: 39 c3 cmp %eax,%ebx 1119f6: 72 a6 jb 11199e <_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 ) ) 1119f8: 83 ec 0c sub $0xc,%esp 1119fb: ff 76 04 pushl 0x4(%esi) 1119fe: e8 35 ff ff ff call 111938 <_POSIX_Priority_Is_valid> 111a03: 83 c4 10 add $0x10,%esp 111a06: 84 c0 test %al,%al 111a08: 74 94 je 11199e <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 111a0a: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 111a10: 8b 45 14 mov 0x14(%ebp),%eax 111a13: c7 00 f4 bc 10 00 movl $0x10bcf4,(%eax) return 0; 111a19: 31 c0 xor %eax,%eax 111a1b: eb 86 jmp 1119a3 <_POSIX_Thread_Translate_sched_param+0x4f> 111a1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 111a20: 31 c0 xor %eax,%eax 111a22: e9 7c ff ff ff jmp 1119a3 <_POSIX_Thread_Translate_sched_param+0x4f> 111a27: 90 nop <== NOT EXECUTED } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 111a28: c7 07 02 00 00 00 movl $0x2,(%edi) return 0; 111a2e: 31 c0 xor %eax,%eax 111a30: e9 6e ff ff ff jmp 1119a3 <_POSIX_Thread_Translate_sched_param+0x4f> =============================================================================== 00110814 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 110814: 55 push %ebp 110815: 89 e5 mov %esp,%ebp 110817: 57 push %edi 110818: 56 push %esi 110819: 53 push %ebx 11081a: 83 ec 28 sub $0x28,%esp 11081d: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 110820: 68 f0 00 00 00 push $0xf0 110825: 89 55 e4 mov %edx,-0x1c(%ebp) 110828: e8 57 e0 ff ff call 10e884 <_Workspace_Allocate> 11082d: 89 c3 mov %eax,%ebx if ( !api ) 11082f: 83 c4 10 add $0x10,%esp 110832: 85 c0 test %eax,%eax 110834: 8b 55 e4 mov -0x1c(%ebp),%edx 110837: 0f 84 2f 01 00 00 je 11096c <_POSIX_Threads_Create_extension+0x158> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 11083d: 89 82 f8 00 00 00 mov %eax,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 110843: b9 40 00 00 00 mov $0x40,%ecx 110848: 31 c0 xor %eax,%eax 11084a: 89 df mov %ebx,%edi 11084c: f3 aa rep stos %al,%es:(%edi) 11084e: c7 03 01 00 00 00 movl $0x1,(%ebx) 110854: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) 11085b: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx) 110862: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx) 110869: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) 110870: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 110877: c7 43 40 01 00 00 00 movl $0x1,0x40(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 11087e: c7 83 84 00 00 00 01 movl $0x1,0x84(%ebx) 110885: 00 00 00 api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 110888: be 98 12 12 00 mov $0x121298,%esi 11088d: 8d bb 88 00 00 00 lea 0x88(%ebx),%edi 110893: b1 07 mov $0x7,%cl 110895: f3 a5 rep movsl %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 110897: 0f b6 05 14 22 12 00 movzbl 0x122214,%eax 11089e: 2b 42 14 sub 0x14(%edx),%eax 1108a1: 89 83 88 00 00 00 mov %eax,0x88(%ebx) _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 1108a7: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx) 1108ae: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 1108b1: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx) 1108b8: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 1108bb: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 1108c2: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1108c5: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 1108cb: 89 83 e4 00 00 00 mov %eax,0xe4(%ebx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 1108d1: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 1108d8: 00 00 00 _Chain_Initialize_empty (&api->Cancellation_Handlers); 1108db: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax 1108e1: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 1108e7: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 1108ee: 00 00 00 1108f1: 0f b6 42 0b movzbl 0xb(%edx),%eax 1108f5: 83 e0 07 and $0x7,%eax if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 1108f8: 83 f8 03 cmp $0x3,%eax 1108fb: 74 53 je 110950 <_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; 1108fd: c7 83 d0 00 00 00 ff movl $0xffffffff,0xd0(%ebx) 110904: ff ff ff } _Thread_queue_Initialize( 110907: 6a 00 push $0x0 110909: 68 00 10 00 00 push $0x1000 11090e: 6a 00 push $0x0 110910: 8d 43 44 lea 0x44(%ebx),%eax 110913: 50 push %eax 110914: 89 55 e4 mov %edx,-0x1c(%ebp) 110917: e8 00 d5 ff ff call 10de1c <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 11091c: 8b 55 e4 mov -0x1c(%ebp),%edx 11091f: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 110922: c7 83 b0 00 00 00 00 movl $0x0,0xb0(%ebx) 110929: 00 00 00 the_watchdog->routine = routine; 11092c: c7 83 c4 00 00 00 78 movl $0x110978,0xc4(%ebx) 110933: 09 11 00 the_watchdog->id = id; 110936: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) the_watchdog->user_data = user_data; 11093c: 89 93 cc 00 00 00 mov %edx,0xcc(%ebx) _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 110942: 83 c4 10 add $0x10,%esp 110945: b0 01 mov $0x1,%al } 110947: 8d 65 f4 lea -0xc(%ebp),%esp 11094a: 5b pop %ebx 11094b: 5e pop %esi 11094c: 5f pop %edi 11094d: c9 leave 11094e: c3 ret 11094f: 90 nop <== NOT EXECUTED if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API #if defined(RTEMS_DEBUG) && _Objects_Get_class( created->Object.id ) == 1 #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 110950: a1 98 6a 12 00 mov 0x126a98,%eax api->signals_blocked = executing_api->signals_blocked; 110955: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 11095b: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 110961: 89 83 d0 00 00 00 mov %eax,0xd0(%ebx) 110967: eb 9e jmp 110907 <_POSIX_Threads_Create_extension+0xf3> 110969: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) return false; 11096c: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 11096e: 8d 65 f4 lea -0xc(%ebp),%esp 110971: 5b pop %ebx 110972: 5e pop %esi 110973: 5f pop %edi 110974: c9 leave 110975: c3 ret =============================================================================== 0011078c <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 11078c: 55 push %ebp 11078d: 89 e5 mov %esp,%ebp 11078f: 57 push %edi 110790: 56 push %esi 110791: 53 push %ebx 110792: 83 ec 28 sub $0x28,%esp 110795: 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 ]; 110798: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax 11079e: 89 45 e4 mov %eax,-0x1c(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 1107a1: 57 push %edi 1107a2: e8 2d 23 00 00 call 112ad4 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 1107a7: 89 3c 24 mov %edi,(%esp) 1107aa: e8 89 23 00 00 call 112b38 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 1107af: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 1107b2: 83 c4 10 add $0x10,%esp 1107b5: 8b 45 e4 mov -0x1c(%ebp),%eax 1107b8: 8d 58 44 lea 0x44(%eax),%ebx 1107bb: eb 08 jmp 1107c5 <_POSIX_Threads_Delete_extension+0x39> 1107bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; 1107c0: 8b 40 28 mov 0x28(%eax),%eax 1107c3: 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 )) ) 1107c5: 83 ec 0c sub $0xc,%esp 1107c8: 53 push %ebx 1107c9: e8 9e d2 ff ff call 10da6c <_Thread_queue_Dequeue> 1107ce: 83 c4 10 add $0x10,%esp 1107d1: 85 c0 test %eax,%eax 1107d3: 75 eb jne 1107c0 <_POSIX_Threads_Delete_extension+0x34> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 1107d5: 8b 45 e4 mov -0x1c(%ebp),%eax 1107d8: 83 b8 84 00 00 00 04 cmpl $0x4,0x84(%eax) 1107df: 74 1f je 110800 <_POSIX_Threads_Delete_extension+0x74> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 1107e1: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi) 1107e8: 00 00 00 (void) _Workspace_Free( api ); 1107eb: 8b 45 e4 mov -0x1c(%ebp),%eax 1107ee: 89 45 08 mov %eax,0x8(%ebp) } 1107f1: 8d 65 f4 lea -0xc(%ebp),%esp 1107f4: 5b pop %ebx 1107f5: 5e pop %esi 1107f6: 5f pop %edi 1107f7: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 1107f8: e9 a3 e0 ff ff jmp 10e8a0 <_Workspace_Free> 1107fd: 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 ); 110800: 83 ec 0c sub $0xc,%esp 110803: 05 a8 00 00 00 add $0xa8,%eax 110808: 50 push %eax 110809: e8 4e df ff ff call 10e75c <_Watchdog_Remove> 11080e: 83 c4 10 add $0x10,%esp 110811: eb ce jmp 1107e1 <_POSIX_Threads_Delete_extension+0x55> =============================================================================== 00110768 <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 110768: 55 push %ebp 110769: 89 e5 mov %esp,%ebp 11076b: 83 ec 08 sub $0x8,%esp 11076e: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 110771: 0f b6 42 0b movzbl 0xb(%edx),%eax 110775: 83 e0 07 and $0x7,%eax /* * 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 ) 110778: 83 f8 03 cmp $0x3,%eax 11077b: 74 03 je 110780 <_POSIX_Threads_Exitted_extension+0x18> pthread_exit( executing->Wait.return_argument ); } 11077d: c9 leave 11077e: c3 ret 11077f: 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 ); 110780: 8b 42 28 mov 0x28(%edx),%eax 110783: 89 45 08 mov %eax,0x8(%ebp) } 110786: 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 ); 110787: e9 70 26 00 00 jmp 112dfc =============================================================================== 00110750 <_POSIX_Threads_Initialize_user_threads>: * * This routine creates and starts all configured user * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { 110750: 55 push %ebp 110751: 89 e5 mov %esp,%ebp 110753: 83 ec 08 sub $0x8,%esp if ( _POSIX_Threads_Initialize_user_threads_p ) 110756: a1 78 47 12 00 mov 0x124778,%eax 11075b: 85 c0 test %eax,%eax 11075d: 74 05 je 110764 <_POSIX_Threads_Initialize_user_threads+0x14> (*_POSIX_Threads_Initialize_user_threads_p)(); } 11075f: c9 leave * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); 110760: ff e0 jmp *%eax 110762: 66 90 xchg %ax,%ax <== NOT EXECUTED } 110764: c9 leave 110765: c3 ret =============================================================================== 0010b9d4 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10b9d4: 55 push %ebp 10b9d5: 89 e5 mov %esp,%ebp 10b9d7: 57 push %edi 10b9d8: 56 push %esi 10b9d9: 53 push %ebx 10b9da: 83 ec 6c sub $0x6c,%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; 10b9dd: 8b 3d b4 44 12 00 mov 0x1244b4,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10b9e3: a1 b0 44 12 00 mov 0x1244b0,%eax 10b9e8: 89 45 94 mov %eax,-0x6c(%ebp) if ( !user_threads || maximum == 0 ) 10b9eb: 85 ff test %edi,%edi 10b9ed: 74 44 je 10ba33 <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10b9ef: 85 c0 test %eax,%eax 10b9f1: 74 40 je 10ba33 <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10b9f3: 31 db xor %ebx,%ebx 10b9f5: 8d 75 a4 lea -0x5c(%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 ); 10b9f8: 83 ec 0c sub $0xc,%esp 10b9fb: 56 push %esi 10b9fc: e8 37 60 00 00 call 111a38 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10ba01: 5a pop %edx 10ba02: 59 pop %ecx 10ba03: 6a 02 push $0x2 10ba05: 56 push %esi 10ba06: e8 59 60 00 00 call 111a64 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10ba0b: 59 pop %ecx 10ba0c: 58 pop %eax 10ba0d: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10ba11: 56 push %esi 10ba12: e8 81 60 00 00 call 111a98 status = pthread_create( 10ba17: 6a 00 push $0x0 10ba19: ff 34 df pushl (%edi,%ebx,8) 10ba1c: 56 push %esi 10ba1d: 8d 45 e4 lea -0x1c(%ebp),%eax 10ba20: 50 push %eax 10ba21: e8 92 fc ff ff call 10b6b8 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10ba26: 83 c4 20 add $0x20,%esp 10ba29: 85 c0 test %eax,%eax 10ba2b: 75 0e jne 10ba3b <_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++ ) { 10ba2d: 43 inc %ebx 10ba2e: 39 5d 94 cmp %ebx,-0x6c(%ebp) 10ba31: 77 c5 ja 10b9f8 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10ba33: 8d 65 f4 lea -0xc(%ebp),%esp 10ba36: 5b pop %ebx 10ba37: 5e pop %esi 10ba38: 5f pop %edi 10ba39: c9 leave 10ba3a: c3 ret &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10ba3b: 52 push %edx 10ba3c: 50 push %eax 10ba3d: 6a 01 push $0x1 10ba3f: 6a 02 push $0x2 10ba41: e8 be 1e 00 00 call 10d904 <_Internal_error_Occurred> =============================================================================== 00110978 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 110978: 55 push %ebp 110979: 89 e5 mov %esp,%ebp 11097b: 56 push %esi 11097c: 53 push %ebx 11097d: 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 ]; 110980: 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 ); 110986: 83 ec 0c sub $0xc,%esp 110989: 8d 83 98 00 00 00 lea 0x98(%ebx),%eax 11098f: 50 push %eax 110990: e8 97 0f 00 00 call 11192c <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 110995: 89 46 78 mov %eax,0x78(%esi) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 110998: 0f b6 05 14 22 12 00 movzbl 0x122214,%eax 11099f: 2b 83 88 00 00 00 sub 0x88(%ebx),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 1109a5: 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 ) { 1109a8: 83 c4 10 add $0x10,%esp 1109ab: 8b 4e 1c mov 0x1c(%esi),%ecx 1109ae: 85 c9 test %ecx,%ecx 1109b0: 75 05 jne 1109b7 <_POSIX_Threads_Sporadic_budget_TSR+0x3f><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 1109b2: 39 46 14 cmp %eax,0x14(%esi) 1109b5: 77 35 ja 1109ec <_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 ); 1109b7: 83 ec 0c sub $0xc,%esp 1109ba: 8d 83 90 00 00 00 lea 0x90(%ebx),%eax 1109c0: 50 push %eax 1109c1: e8 66 0f 00 00 call 11192c <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1109c6: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1109cc: 83 c4 10 add $0x10,%esp _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 1109cf: 81 c3 a8 00 00 00 add $0xa8,%ebx 1109d5: 89 5d 0c mov %ebx,0xc(%ebp) 1109d8: c7 45 08 a4 65 12 00 movl $0x1265a4,0x8(%ebp) } 1109df: 8d 65 f8 lea -0x8(%ebp),%esp 1109e2: 5b pop %ebx 1109e3: 5e pop %esi 1109e4: c9 leave 1109e5: e9 3a dc ff ff jmp 10e624 <_Watchdog_Insert> 1109ea: 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 ); 1109ec: 52 push %edx 1109ed: 6a 01 push $0x1 1109ef: 50 push %eax 1109f0: 56 push %esi 1109f1: e8 ae c7 ff ff call 10d1a4 <_Thread_Change_priority> 1109f6: 83 c4 10 add $0x10,%esp 1109f9: eb bc jmp 1109b7 <_POSIX_Threads_Sporadic_budget_TSR+0x3f> =============================================================================== 001109fc <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 1109fc: 55 push %ebp 1109fd: 89 e5 mov %esp,%ebp 1109ff: 83 ec 08 sub $0x8,%esp 110a02: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110a05: 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 */ 110a0b: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) 110a12: 0f b6 15 14 22 12 00 movzbl 0x122214,%edx 110a19: 2b 91 8c 00 00 00 sub 0x8c(%ecx),%edx new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 110a1f: 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 ) { 110a22: 8b 48 1c mov 0x1c(%eax),%ecx 110a25: 85 c9 test %ecx,%ecx 110a27: 75 05 jne 110a2e <_POSIX_Threads_Sporadic_budget_callout+0x32><== NEVER 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 ) { 110a29: 39 50 14 cmp %edx,0x14(%eax) 110a2c: 72 02 jb 110a30 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 110a2e: c9 leave <== NOT EXECUTED 110a2f: 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 ); 110a30: 51 push %ecx 110a31: 6a 01 push $0x1 110a33: 52 push %edx 110a34: 50 push %eax 110a35: e8 6a c7 ff ff call 10d1a4 <_Thread_Change_priority> 110a3a: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 110a3d: c9 leave 110a3e: c3 ret =============================================================================== 00112ad4 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 112ad4: 55 push %ebp 112ad5: 89 e5 mov %esp,%ebp 112ad7: 57 push %edi 112ad8: 56 push %esi 112ad9: 53 push %ebx 112ada: 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 ]; 112add: 8b 45 08 mov 0x8(%ebp),%eax 112ae0: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 112ae6: c7 86 d8 00 00 00 01 movl $0x1,0xd8(%esi) 112aed: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112af0: 8d 9e e8 00 00 00 lea 0xe8(%esi),%ebx while ( !_Chain_Is_empty( handler_stack ) ) { 112af6: 39 9e e4 00 00 00 cmp %ebx,0xe4(%esi) 112afc: 74 30 je 112b2e <_POSIX_Threads_cancel_run+0x5a> 112afe: 66 90 xchg %ax,%ax _ISR_Disable( level ); 112b00: 9c pushf 112b01: fa cli 112b02: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 112b03: 8b 7b 04 mov 0x4(%ebx),%edi ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112b06: 8b 17 mov (%edi),%edx previous = the_node->previous; 112b08: 8b 47 04 mov 0x4(%edi),%eax next->previous = previous; 112b0b: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 112b0e: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 112b10: 51 push %ecx 112b11: 9d popf (*handler->routine)( handler->arg ); 112b12: 83 ec 0c sub $0xc,%esp 112b15: ff 77 0c pushl 0xc(%edi) 112b18: ff 57 08 call *0x8(%edi) _Workspace_Free( handler ); 112b1b: 89 3c 24 mov %edi,(%esp) 112b1e: e8 7d bd ff ff call 10e8a0 <_Workspace_Free> handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 112b23: 83 c4 10 add $0x10,%esp 112b26: 39 9e e4 00 00 00 cmp %ebx,0xe4(%esi) 112b2c: 75 d2 jne 112b00 <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 112b2e: 8d 65 f4 lea -0xc(%ebp),%esp 112b31: 5b pop %ebx 112b32: 5e pop %esi 112b33: 5f pop %edi 112b34: c9 leave 112b35: c3 ret =============================================================================== 00111738 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 111738: 55 push %ebp 111739: 89 e5 mov %esp,%ebp 11173b: 56 push %esi 11173c: 53 push %ebx 11173d: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 111740: 83 ec 0c sub $0xc,%esp 111743: 53 push %ebx 111744: e8 0f db ff ff call 10f258 <_Watchdog_Remove> _ISR_Disable( level ); 111749: 9c pushf 11174a: fa cli 11174b: 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 ) { 11174c: 83 c4 10 add $0x10,%esp 11174f: 8b 43 08 mov 0x8(%ebx),%eax 111752: 85 c0 test %eax,%eax 111754: 74 0e je 111764 <_POSIX_Timer_Insert_helper+0x2c> _ISR_Enable( level ); 111756: 56 push %esi 111757: 9d popf return false; 111758: 31 c0 xor %eax,%eax */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 11175a: 8d 65 f8 lea -0x8(%ebp),%esp 11175d: 5b pop %ebx 11175e: 5e pop %esi 11175f: c9 leave 111760: c3 ret 111761: 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; 111764: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 11176b: 8b 45 14 mov 0x14(%ebp),%eax 11176e: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 111771: 8b 45 10 mov 0x10(%ebp),%eax 111774: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 111777: 8b 45 18 mov 0x18(%ebp),%eax 11177a: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11177d: 8b 45 0c mov 0xc(%ebp),%eax 111780: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 111783: 83 ec 08 sub $0x8,%esp 111786: 53 push %ebx 111787: 68 64 98 12 00 push $0x129864 11178c: e8 8f d9 ff ff call 10f120 <_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 ); 111791: 56 push %esi 111792: 9d popf return true; 111793: 83 c4 10 add $0x10,%esp 111796: b0 01 mov $0x1,%al } 111798: 8d 65 f8 lea -0x8(%ebp),%esp 11179b: 5b pop %ebx 11179c: 5e pop %esi 11179d: c9 leave 11179e: c3 ret =============================================================================== 0010b7d0 <_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) { 10b7d0: 55 push %ebp 10b7d1: 89 e5 mov %esp,%ebp 10b7d3: 53 push %ebx 10b7d4: 83 ec 04 sub $0x4,%esp 10b7d7: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10b7da: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10b7dd: 8b 53 54 mov 0x54(%ebx),%edx 10b7e0: 85 d2 test %edx,%edx 10b7e2: 75 28 jne 10b80c <_POSIX_Timer_TSR+0x3c> 10b7e4: 8b 43 58 mov 0x58(%ebx),%eax 10b7e7: 85 c0 test %eax,%eax 10b7e9: 75 21 jne 10b80c <_POSIX_Timer_TSR+0x3c> <== ALWAYS TAKEN /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b7eb: 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 ) ) { 10b7ef: 83 ec 08 sub $0x8,%esp 10b7f2: ff 73 44 pushl 0x44(%ebx) 10b7f5: ff 73 38 pushl 0x38(%ebx) 10b7f8: e8 cb 5a 00 00 call 1112c8 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10b7fd: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10b804: 83 c4 10 add $0x10,%esp } 10b807: 8b 5d fc mov -0x4(%ebp),%ebx 10b80a: c9 leave 10b80b: 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( 10b80c: 83 ec 0c sub $0xc,%esp 10b80f: 53 push %ebx 10b810: 68 d0 b7 10 00 push $0x10b7d0 10b815: ff 73 08 pushl 0x8(%ebx) 10b818: ff 73 64 pushl 0x64(%ebx) 10b81b: 8d 43 10 lea 0x10(%ebx),%eax 10b81e: 50 push %eax 10b81f: e8 14 5f 00 00 call 111738 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10b824: 83 c4 20 add $0x20,%esp 10b827: 84 c0 test %al,%al 10b829: 74 dc je 10b807 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10b82b: 83 ec 0c sub $0xc,%esp 10b82e: 8d 43 6c lea 0x6c(%ebx),%eax 10b831: 50 push %eax 10b832: e8 85 16 00 00 call 10cebc <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b837: c6 43 3c 03 movb $0x3,0x3c(%ebx) 10b83b: 83 c4 10 add $0x10,%esp 10b83e: eb af jmp 10b7ef <_POSIX_Timer_TSR+0x1f> =============================================================================== 00112bbc <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 112bbc: 55 push %ebp 112bbd: 89 e5 mov %esp,%ebp 112bbf: 57 push %edi 112bc0: 56 push %esi 112bc1: 53 push %ebx 112bc2: 83 ec 78 sub $0x78,%esp 112bc5: 8b 5d 0c mov 0xc(%ebp),%ebx siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 112bc8: 6a 01 push $0x1 112bca: 0f b6 45 10 movzbl 0x10(%ebp),%eax 112bce: 50 push %eax 112bcf: 8d 55 dc lea -0x24(%ebp),%edx 112bd2: 52 push %edx 112bd3: 53 push %ebx 112bd4: ff 75 08 pushl 0x8(%ebp) 112bd7: 89 55 9c mov %edx,-0x64(%ebp) 112bda: e8 b5 00 00 00 call 112c94 <_POSIX_signals_Clear_signals> 112bdf: 83 c4 20 add $0x20,%esp 112be2: 84 c0 test %al,%al 112be4: 8b 55 9c mov -0x64(%ebp),%edx 112be7: 0f 84 9b 00 00 00 je 112c88 <_POSIX_signals_Check_signal+0xcc> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 112bed: 8d 04 5b lea (%ebx,%ebx,2),%eax 112bf0: c1 e0 02 shl $0x2,%eax 112bf3: 8b 88 c8 6a 12 00 mov 0x126ac8(%eax),%ecx 112bf9: 89 4d a4 mov %ecx,-0x5c(%ebp) 112bfc: 49 dec %ecx 112bfd: 0f 84 85 00 00 00 je 112c88 <_POSIX_signals_Check_signal+0xcc><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 112c03: 8b 75 08 mov 0x8(%ebp),%esi 112c06: 8b b6 d0 00 00 00 mov 0xd0(%esi),%esi 112c0c: 89 75 a0 mov %esi,-0x60(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 112c0f: 8b 88 c4 6a 12 00 mov 0x126ac4(%eax),%ecx 112c15: 09 f1 or %esi,%ecx 112c17: 8b 75 08 mov 0x8(%ebp),%esi 112c1a: 89 8e d0 00 00 00 mov %ecx,0xd0(%esi) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 112c20: 8d 75 b4 lea -0x4c(%ebp),%esi 112c23: 89 75 94 mov %esi,-0x6c(%ebp) 112c26: 8b 35 98 6a 12 00 mov 0x126a98,%esi 112c2c: 83 c6 20 add $0x20,%esi 112c2f: b9 0a 00 00 00 mov $0xa,%ecx 112c34: 8b 7d 94 mov -0x6c(%ebp),%edi 112c37: f3 a5 rep movsl %ds:(%esi),%es:(%edi) sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 112c39: 83 b8 c0 6a 12 00 02 cmpl $0x2,0x126ac0(%eax) 112c40: 74 36 je 112c78 <_POSIX_signals_Check_signal+0xbc> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 112c42: 83 ec 0c sub $0xc,%esp 112c45: 53 push %ebx 112c46: ff 55 a4 call *-0x5c(%ebp) break; 112c49: 83 c4 10 add $0x10,%esp } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 112c4c: 8b 3d 98 6a 12 00 mov 0x126a98,%edi 112c52: 83 c7 20 add $0x20,%edi 112c55: b9 0a 00 00 00 mov $0xa,%ecx 112c5a: 8b 75 94 mov -0x6c(%ebp),%esi 112c5d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 112c5f: 8b 55 a0 mov -0x60(%ebp),%edx 112c62: 8b 45 08 mov 0x8(%ebp),%eax 112c65: 89 90 d0 00 00 00 mov %edx,0xd0(%eax) return true; 112c6b: b0 01 mov $0x1,%al } 112c6d: 8d 65 f4 lea -0xc(%ebp),%esp 112c70: 5b pop %ebx 112c71: 5e pop %esi 112c72: 5f pop %edi 112c73: c9 leave 112c74: c3 ret 112c75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 112c78: 50 push %eax 112c79: 6a 00 push $0x0 112c7b: 52 push %edx 112c7c: 53 push %ebx 112c7d: ff 55 a4 call *-0x5c(%ebp) signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 112c80: 83 c4 10 add $0x10,%esp 112c83: eb c7 jmp 112c4c <_POSIX_signals_Check_signal+0x90> 112c85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) return false; 112c88: 31 c0 xor %eax,%eax * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } 112c8a: 8d 65 f4 lea -0xc(%ebp),%esp 112c8d: 5b pop %ebx 112c8e: 5e pop %esi 112c8f: 5f pop %edi 112c90: c9 leave 112c91: c3 ret =============================================================================== 00113244 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 113244: 55 push %ebp 113245: 89 e5 mov %esp,%ebp 113247: 53 push %ebx 113248: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 11324b: 9c pushf 11324c: fa cli 11324d: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 11324e: 8d 04 49 lea (%ecx,%ecx,2),%eax 113251: c1 e0 02 shl $0x2,%eax 113254: 83 b8 c0 6a 12 00 02 cmpl $0x2,0x126ac0(%eax) 11325b: 74 13 je 113270 <_POSIX_signals_Clear_process_signals+0x2c> 11325d: 49 dec %ecx 11325e: b8 fe ff ff ff mov $0xfffffffe,%eax if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 113263: d3 c0 rol %cl,%eax 113265: 21 05 c8 6c 12 00 and %eax,0x126cc8 } _ISR_Enable( level ); 11326b: 52 push %edx 11326c: 9d popf } 11326d: 5b pop %ebx 11326e: c9 leave 11326f: c3 ret */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 113270: 8d 98 e4 6c 12 00 lea 0x126ce4(%eax),%ebx ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 113276: 39 98 e0 6c 12 00 cmp %ebx,0x126ce0(%eax) 11327c: 75 ed jne 11326b <_POSIX_signals_Clear_process_signals+0x27><== NEVER TAKEN 11327e: eb dd jmp 11325d <_POSIX_signals_Clear_process_signals+0x19> =============================================================================== 00112c94 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 112c94: 55 push %ebp 112c95: 89 e5 mov %esp,%ebp 112c97: 57 push %edi 112c98: 56 push %esi 112c99: 53 push %ebx 112c9a: 83 ec 1c sub $0x1c,%esp 112c9d: 8b 5d 0c mov 0xc(%ebp),%ebx 112ca0: 0f b6 7d 14 movzbl 0x14(%ebp),%edi static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 112ca4: 8d 4b ff lea -0x1(%ebx),%ecx 112ca7: b8 01 00 00 00 mov $0x1,%eax 112cac: 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 ) 112cae: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 112cb2: 74 40 je 112cf4 <_POSIX_signals_Clear_signals+0x60> signals_blocked = ~api->signals_blocked; 112cb4: 8b 55 08 mov 0x8(%ebp),%edx 112cb7: 8b 8a d0 00 00 00 mov 0xd0(%edx),%ecx 112cbd: f7 d1 not %ecx signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 112cbf: 9c pushf 112cc0: fa cli 112cc1: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 112cc4: 89 fa mov %edi,%edx 112cc6: 84 d2 test %dl,%dl 112cc8: 74 32 je 112cfc <_POSIX_signals_Clear_signals+0x68> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 112cca: 23 05 c8 6c 12 00 and 0x126cc8,%eax 112cd0: 85 c8 test %ecx,%eax 112cd2: 74 54 je 112d28 <_POSIX_signals_Clear_signals+0x94> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 112cd4: 8d 14 5b lea (%ebx,%ebx,2),%edx 112cd7: c1 e2 02 shl $0x2,%edx 112cda: 83 ba c0 6a 12 00 02 cmpl $0x2,0x126ac0(%edx) 112ce1: 74 49 je 112d2c <_POSIX_signals_Clear_signals+0x98> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 112ce3: 83 ec 0c sub $0xc,%esp 112ce6: 53 push %ebx 112ce7: e8 58 05 00 00 call 113244 <_POSIX_signals_Clear_process_signals> 112cec: 83 c4 10 add $0x10,%esp do_callout = true; 112cef: b0 01 mov $0x1,%al 112cf1: eb 26 jmp 112d19 <_POSIX_signals_Clear_signals+0x85> 112cf3: 90 nop <== NOT EXECUTED */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; else signals_blocked = SIGNAL_ALL_MASK; 112cf4: b9 ff ff ff ff mov $0xffffffff,%ecx 112cf9: eb c4 jmp 112cbf <_POSIX_signals_Clear_signals+0x2b> 112cfb: 90 nop <== NOT EXECUTED } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 112cfc: 8b 55 08 mov 0x8(%ebp),%edx 112cff: 8b 9a d4 00 00 00 mov 0xd4(%edx),%ebx 112d05: 89 c6 mov %eax,%esi 112d07: 21 de and %ebx,%esi 112d09: 85 ce test %ecx,%esi 112d0b: 74 1b je 112d28 <_POSIX_signals_Clear_signals+0x94> api->signals_pending &= ~mask; 112d0d: f7 d0 not %eax 112d0f: 21 d8 and %ebx,%eax 112d11: 89 82 d4 00 00 00 mov %eax,0xd4(%edx) do_callout = true; 112d17: b0 01 mov $0x1,%al } } _ISR_Enable( level ); 112d19: ff 75 e4 pushl -0x1c(%ebp) 112d1c: 9d popf return do_callout; } 112d1d: 8d 65 f4 lea -0xc(%ebp),%esp 112d20: 5b pop %ebx 112d21: 5e pop %esi 112d22: 5f pop %edi 112d23: c9 leave 112d24: c3 ret 112d25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); do_callout = false; 112d28: 31 c0 xor %eax,%eax 112d2a: eb ed jmp 112d19 <_POSIX_signals_Clear_signals+0x85> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 112d2c: 8d 8a e0 6c 12 00 lea 0x126ce0(%edx),%ecx 112d32: 8b 82 e0 6c 12 00 mov 0x126ce0(%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112d38: 8d 71 04 lea 0x4(%ecx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 112d3b: 39 f0 cmp %esi,%eax 112d3d: 74 45 je 112d84 <_POSIX_signals_Clear_signals+0xf0> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112d3f: 8b 30 mov (%eax),%esi the_chain->first = new_first; 112d41: 89 b2 e0 6c 12 00 mov %esi,0x126ce0(%edx) _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 *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); 112d47: 89 4e 04 mov %ecx,0x4(%esi) _POSIX_signals_Clear_process_signals( signo ); 112d4a: 83 ec 0c sub $0xc,%esp 112d4d: 53 push %ebx 112d4e: 89 45 e0 mov %eax,-0x20(%ebp) 112d51: e8 ee 04 00 00 call 113244 <_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; 112d56: 8b 45 e0 mov -0x20(%ebp),%eax 112d59: 8d 70 08 lea 0x8(%eax),%esi 112d5c: b9 03 00 00 00 mov $0x3,%ecx 112d61: 8b 7d 10 mov 0x10(%ebp),%edi 112d64: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 112d66: c7 00 44 6c 12 00 movl $0x126c44,(%eax) old_last_node = the_chain->last; 112d6c: 8b 15 48 6c 12 00 mov 0x126c48,%edx the_chain->last = the_node; 112d72: a3 48 6c 12 00 mov %eax,0x126c48 old_last_node->next = the_node; 112d77: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 112d79: 89 50 04 mov %edx,0x4(%eax) 112d7c: 83 c4 10 add $0x10,%esp 112d7f: e9 5f ff ff ff jmp 112ce3 <_POSIX_signals_Clear_signals+0x4f> 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 ); 112d84: 83 ec 0c sub $0xc,%esp 112d87: 53 push %ebx 112d88: e8 b7 04 00 00 call 113244 <_POSIX_signals_Clear_process_signals> 112d8d: 83 c4 10 add $0x10,%esp 112d90: e9 4e ff ff ff jmp 112ce3 <_POSIX_signals_Clear_signals+0x4f> =============================================================================== 0010c0ac <_POSIX_signals_Get_lowest>: #include int _POSIX_signals_Get_lowest( sigset_t set ) { 10c0ac: 55 push %ebp 10c0ad: 89 e5 mov %esp,%ebp 10c0af: 56 push %esi 10c0b0: 53 push %ebx 10c0b1: 8b 55 08 mov 0x8(%ebp),%edx int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10c0b4: b8 1b 00 00 00 mov $0x1b,%eax 10c0b9: bb 01 00 00 00 mov $0x1,%ebx #include #include #include #include int _POSIX_signals_Get_lowest( 10c0be: 8d 48 ff lea -0x1(%eax),%ecx 10c0c1: 89 de mov %ebx,%esi 10c0c3: d3 e6 shl %cl,%esi ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10c0c5: 85 d6 test %edx,%esi 10c0c7: 75 20 jne 10c0e9 <_POSIX_signals_Get_lowest+0x3d><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10c0c9: 40 inc %eax 10c0ca: 83 f8 20 cmp $0x20,%eax 10c0cd: 75 ef jne 10c0be <_POSIX_signals_Get_lowest+0x12> 10c0cf: b0 01 mov $0x1,%al 10c0d1: bb 01 00 00 00 mov $0x1,%ebx 10c0d6: eb 06 jmp 10c0de <_POSIX_signals_Get_lowest+0x32> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10c0d8: 40 inc %eax 10c0d9: 83 f8 1b cmp $0x1b,%eax 10c0dc: 74 0b je 10c0e9 <_POSIX_signals_Get_lowest+0x3d><== NEVER TAKEN #include #include #include #include int _POSIX_signals_Get_lowest( 10c0de: 8d 48 ff lea -0x1(%eax),%ecx 10c0e1: 89 de mov %ebx,%esi 10c0e3: d3 e6 shl %cl,%esi #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10c0e5: 85 d6 test %edx,%esi 10c0e7: 74 ef je 10c0d8 <_POSIX_signals_Get_lowest+0x2c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10c0e9: 5b pop %ebx 10c0ea: 5e pop %esi 10c0eb: c9 leave 10c0ec: c3 ret =============================================================================== 00124384 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 124384: 55 push %ebp 124385: 89 e5 mov %esp,%ebp 124387: 57 push %edi 124388: 56 push %esi 124389: 53 push %ebx 12438a: 83 ec 0c sub $0xc,%esp 12438d: 8b 5d 08 mov 0x8(%ebp),%ebx 124390: 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 ]; 124393: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 124399: 8d 4a ff lea -0x1(%edx),%ecx 12439c: b8 01 00 00 00 mov $0x1,%eax 1243a1: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1243a3: 8b 4b 10 mov 0x10(%ebx),%ecx 1243a6: 89 cf mov %ecx,%edi 1243a8: 81 e7 00 80 00 10 and $0x10008000,%edi 1243ae: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1243b4: 74 72 je 124428 <_POSIX_signals_Unblock_thread+0xa4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 1243b6: 8b 96 d0 00 00 00 mov 0xd0(%esi),%edx 1243bc: f7 d2 not %edx 1243be: 85 d0 test %edx,%eax 1243c0: 74 5a je 12441c <_POSIX_signals_Unblock_thread+0x98> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 1243c2: f7 c1 00 00 00 10 test $0x10000000,%ecx 1243c8: 74 3a je 124404 <_POSIX_signals_Unblock_thread+0x80> the_thread->Wait.return_code = EINTR; 1243ca: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 1243d1: f7 c1 e0 be 03 00 test $0x3bee0,%ecx 1243d7: 0f 85 93 00 00 00 jne 124470 <_POSIX_signals_Unblock_thread+0xec><== NEVER TAKEN _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 1243dd: 83 e1 08 and $0x8,%ecx 1243e0: 74 3a je 12441c <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 1243e2: 83 ec 0c sub $0xc,%esp 1243e5: 8d 43 48 lea 0x48(%ebx),%eax 1243e8: 50 push %eax 1243e9: e8 4e f4 fe ff call 11383c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1243ee: 5a pop %edx 1243ef: 59 pop %ecx 1243f0: 68 f8 ff 03 10 push $0x1003fff8 1243f5: 53 push %ebx 1243f6: e8 c9 df fe ff call 1123c4 <_Thread_Clear_state> 1243fb: 83 c4 10 add $0x10,%esp } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 1243fe: 31 c0 xor %eax,%eax 124400: eb 1c jmp 12441e <_POSIX_signals_Unblock_thread+0x9a> 124402: 66 90 xchg %ax,%ax <== NOT EXECUTED else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 124404: 85 c9 test %ecx,%ecx 124406: 75 14 jne 12441c <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 124408: a1 54 e7 12 00 mov 0x12e754,%eax 12440d: 85 c0 test %eax,%eax 12440f: 74 0b je 12441c <_POSIX_signals_Unblock_thread+0x98> 124411: 3b 1d 58 e7 12 00 cmp 0x12e758,%ebx 124417: 74 7b je 124494 <_POSIX_signals_Unblock_thread+0x110><== ALWAYS TAKEN 124419: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Dispatch_necessary = true; } } return false; 12441c: 31 c0 xor %eax,%eax } 12441e: 8d 65 f4 lea -0xc(%ebp),%esp 124421: 5b pop %ebx 124422: 5e pop %esi 124423: 5f pop %edi 124424: c9 leave 124425: c3 ret 124426: 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) ) { 124428: 85 43 30 test %eax,0x30(%ebx) 12442b: 74 33 je 124460 <_POSIX_signals_Unblock_thread+0xdc> the_thread->Wait.return_code = EINTR; 12442d: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 124434: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 124437: 8b 75 10 mov 0x10(%ebp),%esi 12443a: 85 f6 test %esi,%esi 12443c: 74 42 je 124480 <_POSIX_signals_Unblock_thread+0xfc> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 12443e: b9 03 00 00 00 mov $0x3,%ecx 124443: 89 c7 mov %eax,%edi 124445: 8b 75 10 mov 0x10(%ebp),%esi 124448: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 12444a: 83 ec 0c sub $0xc,%esp 12444d: 53 push %ebx 12444e: e8 51 ea fe ff call 112ea4 <_Thread_queue_Extract_with_proxy> return true; 124453: 83 c4 10 add $0x10,%esp 124456: b0 01 mov $0x1,%al if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 124458: 8d 65 f4 lea -0xc(%ebp),%esp 12445b: 5b pop %ebx 12445c: 5e pop %esi 12445d: 5f pop %edi 12445e: c9 leave 12445f: 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) ) { 124460: 8b 8e d0 00 00 00 mov 0xd0(%esi),%ecx 124466: f7 d1 not %ecx 124468: 85 c8 test %ecx,%eax 12446a: 75 c1 jne 12442d <_POSIX_signals_Unblock_thread+0xa9> 12446c: eb ae jmp 12441c <_POSIX_signals_Unblock_thread+0x98> 12446e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 124470: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124473: 53 push %ebx <== NOT EXECUTED 124474: e8 2b ea fe ff call 112ea4 <_Thread_queue_Extract_with_proxy><== NOT EXECUTED 124479: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 12447c: 31 c0 xor %eax,%eax <== NOT EXECUTED 12447e: eb 9e jmp 12441e <_POSIX_signals_Unblock_thread+0x9a><== NOT EXECUTED the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 124480: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 124482: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 124489: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 124490: eb b8 jmp 12444a <_POSIX_signals_Unblock_thread+0xc6> 124492: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 124494: c6 05 64 e7 12 00 01 movb $0x1,0x12e764 } } return false; 12449b: 31 c0 xor %eax,%eax 12449d: e9 7c ff ff ff jmp 12441e <_POSIX_signals_Unblock_thread+0x9a> =============================================================================== 0010d83c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10d83c: 55 push %ebp 10d83d: 89 e5 mov %esp,%ebp 10d83f: 56 push %esi 10d840: 53 push %ebx 10d841: 8b 5d 08 mov 0x8(%ebp),%ebx 10d844: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 10d847: 85 db test %ebx,%ebx 10d849: 74 35 je 10d880 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 10d84b: 85 f6 test %esi,%esi 10d84d: 74 31 je 10d880 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 10d84f: 83 ec 0c sub $0xc,%esp 10d852: ff 35 e4 7e 12 00 pushl 0x127ee4 10d858: e8 c7 ed ff ff call 10c624 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 10d85d: 5a pop %edx 10d85e: 59 pop %ecx 10d85f: 56 push %esi 10d860: 53 push %ebx 10d861: e8 d6 46 00 00 call 111f3c <_Heap_Get_information> _RTEMS_Unlock_allocator(); 10d866: 58 pop %eax 10d867: ff 35 e4 7e 12 00 pushl 0x127ee4 10d86d: e8 fa ed ff ff call 10c66c <_API_Mutex_Unlock> return true; 10d872: 83 c4 10 add $0x10,%esp 10d875: b0 01 mov $0x1,%al } 10d877: 8d 65 f8 lea -0x8(%ebp),%esp 10d87a: 5b pop %ebx 10d87b: 5e pop %esi 10d87c: c9 leave 10d87d: c3 ret 10d87e: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !the_heap ) return false; if ( !the_info ) return false; 10d880: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 10d882: 8d 65 f8 lea -0x8(%ebp),%esp 10d885: 5b pop %ebx 10d886: 5e pop %esi 10d887: c9 leave 10d888: c3 ret =============================================================================== 00110bc4 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110bc4: 55 push %ebp 110bc5: 89 e5 mov %esp,%ebp 110bc7: 56 push %esi 110bc8: 53 push %ebx 110bc9: 83 ec 10 sub $0x10,%esp 110bcc: 8b 5d 08 mov 0x8(%ebp),%ebx 110bcf: 8b 75 0c mov 0xc(%ebp),%esi 110bd2: 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 ) { 110bd5: 8b 15 14 de 12 00 mov 0x12de14,%edx 110bdb: 85 d2 test %edx,%edx 110bdd: 74 19 je 110bf8 <_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 ); 110bdf: 0f b6 c0 movzbl %al,%eax 110be2: 89 45 10 mov %eax,0x10(%ebp) 110be5: 89 75 0c mov %esi,0xc(%ebp) 110be8: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110beb: 8d 65 f8 lea -0x8(%ebp),%esp 110bee: 5b pop %ebx 110bef: 5e pop %esi 110bf0: 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 ); 110bf1: e9 4a f2 ff ff jmp 10fe40 <_Heap_Walk> 110bf6: 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(); 110bf8: 83 ec 0c sub $0xc,%esp 110bfb: ff 35 c4 de 12 00 pushl 0x12dec4 110c01: 88 45 f4 mov %al,-0xc(%ebp) 110c04: e8 cf e3 ff ff call 10efd8 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110c09: 83 c4 0c add $0xc,%esp 110c0c: 8a 45 f4 mov -0xc(%ebp),%al 110c0f: 0f b6 c0 movzbl %al,%eax 110c12: 50 push %eax 110c13: 56 push %esi 110c14: 53 push %ebx 110c15: e8 26 f2 ff ff call 10fe40 <_Heap_Walk> _RTEMS_Unlock_allocator(); 110c1a: 5a pop %edx 110c1b: ff 35 c4 de 12 00 pushl 0x12dec4 110c21: 88 45 f4 mov %al,-0xc(%ebp) 110c24: e8 f7 e3 ff ff call 10f020 <_API_Mutex_Unlock> 110c29: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110c2c: 8a 45 f4 mov -0xc(%ebp),%al 110c2f: 8d 65 f8 lea -0x8(%ebp),%esp 110c32: 5b pop %ebx 110c33: 5e pop %esi 110c34: c9 leave 110c35: c3 ret =============================================================================== 00110d90 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 110d90: 55 push %ebp 110d91: 89 e5 mov %esp,%ebp 110d93: 53 push %ebx 110d94: 83 ec 10 sub $0x10,%esp 110d97: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); 110d9a: 80 3d e4 21 12 00 01 cmpb $0x1,0x1221e4 110da1: 19 c0 sbb %eax,%eax 110da3: 83 e0 c0 and $0xffffffc0,%eax 110da6: 83 c0 60 add $0x60,%eax if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 110da9: 50 push %eax 110daa: e8 d5 da ff ff call 10e884 <_Workspace_Allocate> if ( !api ) 110daf: 83 c4 10 add $0x10,%esp 110db2: 85 c0 test %eax,%eax 110db4: 74 6a je 110e20 <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 110db6: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 110dbc: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 110dc2: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 110dc9: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 110dcd: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 110dd4: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 110ddb: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 110de2: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 110de9: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 110df0: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 110df7: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 110dfa: 80 3d e4 21 12 00 00 cmpb $0x0,0x1221e4 110e01: 74 13 je 110e16 <_RTEMS_tasks_Create_extension+0x86> 110e03: 31 d2 xor %edx,%edx 110e05: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 110e08: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 110e0f: 00 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 110e10: 42 inc %edx 110e11: 83 fa 10 cmp $0x10,%edx 110e14: 75 f2 jne 110e08 <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 110e16: b0 01 mov $0x1,%al } 110e18: 8b 5d fc mov -0x4(%ebp),%ebx 110e1b: c9 leave 110e1c: c3 ret 110e1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 110e20: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 110e22: 8b 5d fc mov -0x4(%ebp),%ebx 110e25: c9 leave 110e26: c3 ret =============================================================================== 00110d38 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 110d38: 55 push %ebp 110d39: 89 e5 mov %esp,%ebp 110d3b: 56 push %esi 110d3c: 53 push %ebx 110d3d: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 110d40: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax deleted->task_variables = NULL; 110d46: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 110d4d: 00 00 00 while (tvp) { 110d50: 85 c0 test %eax,%eax 110d52: 75 06 jne 110d5a <_RTEMS_tasks_Delete_extension+0x22> 110d54: eb 17 jmp 110d6d <_RTEMS_tasks_Delete_extension+0x35> 110d56: 66 90 xchg %ax,%ax <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 110d58: 89 f0 mov %esi,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 110d5a: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 110d5c: 83 ec 08 sub $0x8,%esp 110d5f: 50 push %eax 110d60: 53 push %ebx 110d61: e8 56 01 00 00 call 110ebc <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 110d66: 83 c4 10 add $0x10,%esp 110d69: 85 f6 test %esi,%esi 110d6b: 75 eb jne 110d58 <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 110d6d: 83 ec 0c sub $0xc,%esp 110d70: ff b3 f4 00 00 00 pushl 0xf4(%ebx) 110d76: e8 25 db ff ff call 10e8a0 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 110d7b: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 110d82: 00 00 00 110d85: 83 c4 10 add $0x10,%esp } 110d88: 8d 65 f8 lea -0x8(%ebp),%esp 110d8b: 5b pop %ebx 110d8c: 5e pop %esi 110d8d: c9 leave 110d8e: c3 ret =============================================================================== 00110cbc <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 110cbc: 55 push %ebp 110cbd: 89 e5 mov %esp,%ebp 110cbf: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 110cc2: a1 60 22 12 00 mov 0x122260,%eax 110cc7: 85 c0 test %eax,%eax 110cc9: 74 05 je 110cd0 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 110ccb: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 110ccc: ff e0 jmp *%eax 110cce: 66 90 xchg %ax,%ax <== NOT EXECUTED } 110cd0: c9 leave 110cd1: c3 ret =============================================================================== 0010ba60 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10ba60: 55 push %ebp 10ba61: 89 e5 mov %esp,%ebp 10ba63: 57 push %edi 10ba64: 56 push %esi 10ba65: 53 push %ebx 10ba66: 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; 10ba69: 8b 1d 0c 22 12 00 mov 0x12220c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10ba6f: 8b 3d 08 22 12 00 mov 0x122208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10ba75: 85 db test %ebx,%ebx 10ba77: 74 46 je 10babf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10ba79: 85 ff test %edi,%edi 10ba7b: 74 42 je 10babf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10ba7d: 31 f6 xor %esi,%esi 10ba7f: 90 nop return_value = rtems_task_create( 10ba80: 83 ec 08 sub $0x8,%esp 10ba83: 8d 45 e4 lea -0x1c(%ebp),%eax 10ba86: 50 push %eax 10ba87: ff 73 0c pushl 0xc(%ebx) 10ba8a: ff 73 14 pushl 0x14(%ebx) 10ba8d: ff 73 04 pushl 0x4(%ebx) 10ba90: ff 73 08 pushl 0x8(%ebx) 10ba93: ff 33 pushl (%ebx) 10ba95: e8 92 fd ff ff call 10b82c user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10ba9a: 83 c4 20 add $0x20,%esp 10ba9d: 85 c0 test %eax,%eax 10ba9f: 75 26 jne 10bac7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10baa1: 51 push %ecx 10baa2: ff 73 18 pushl 0x18(%ebx) 10baa5: ff 73 10 pushl 0x10(%ebx) 10baa8: ff 75 e4 pushl -0x1c(%ebp) 10baab: e8 24 00 00 00 call 10bad4 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10bab0: 83 c4 10 add $0x10,%esp 10bab3: 85 c0 test %eax,%eax 10bab5: 75 10 jne 10bac7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bab7: 46 inc %esi 10bab8: 83 c3 1c add $0x1c,%ebx 10babb: 39 f7 cmp %esi,%edi 10babd: 77 c1 ja 10ba80 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10babf: 8d 65 f4 lea -0xc(%ebp),%esp 10bac2: 5b pop %ebx 10bac3: 5e pop %esi 10bac4: 5f pop %edi 10bac5: c9 leave 10bac6: 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 ); 10bac7: 52 push %edx 10bac8: 50 push %eax 10bac9: 6a 01 push $0x1 10bacb: 6a 01 push $0x1 10bacd: e8 fe 0d 00 00 call 10c8d0 <_Internal_error_Occurred> =============================================================================== 00110c74 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 110c74: 55 push %ebp 110c75: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 110c77: 8b 45 08 mov 0x8(%ebp),%eax 110c7a: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 110c80: 85 c0 test %eax,%eax 110c82: 74 13 je 110c97 <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 110c84: 8b 50 04 mov 0x4(%eax),%edx 110c87: 8b 0a mov (%edx),%ecx 110c89: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 110c8c: 8b 48 08 mov 0x8(%eax),%ecx 110c8f: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110c91: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 110c93: 85 c0 test %eax,%eax 110c95: 75 ed jne 110c84 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 110c97: 8b 45 0c mov 0xc(%ebp),%eax 110c9a: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 110ca0: 85 c0 test %eax,%eax 110ca2: 74 13 je 110cb7 <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 110ca4: 8b 50 04 mov 0x4(%eax),%edx 110ca7: 8b 0a mov (%edx),%ecx 110ca9: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 110cac: 8b 48 0c mov 0xc(%eax),%ecx 110caf: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110cb1: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 110cb3: 85 c0 test %eax,%eax 110cb5: 75 ed jne 110ca4 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 110cb7: c9 leave 110cb8: c3 ret =============================================================================== 0010c424 <_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 ) { 10c424: 55 push %ebp 10c425: 89 e5 mov %esp,%ebp 10c427: 57 push %edi 10c428: 56 push %esi 10c429: 53 push %ebx 10c42a: 83 ec 38 sub $0x38,%esp 10c42d: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 10c430: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 10c433: 8d 75 e0 lea -0x20(%ebp),%esi 10c436: 56 push %esi 10c437: e8 2c 19 00 00 call 10dd68 <_TOD_Get_uptime> _Timestamp_Subtract( 10c43c: 83 c4 0c add $0xc,%esp 10c43f: ff 75 0c pushl 0xc(%ebp) 10c442: 56 push %esi 10c443: 8d 43 4c lea 0x4c(%ebx),%eax 10c446: 50 push %eax 10c447: e8 8c 3a 00 00 call 10fed8 <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 10c44c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 10c452: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 10c458: 89 45 d8 mov %eax,-0x28(%ebp) 10c45b: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10c45e: 83 c4 10 add $0x10,%esp 10c461: 39 3d b8 ad 12 00 cmp %edi,0x12adb8 10c467: 74 0b je 10c474 <_Rate_monotonic_Get_status+0x50> if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 10c469: b0 01 mov $0x1,%al } 10c46b: 8d 65 f4 lea -0xc(%ebp),%esp 10c46e: 5b pop %ebx 10c46f: 5e pop %esi 10c470: 5f pop %edi 10c471: c9 leave 10c472: c3 ret 10c473: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 10c474: 52 push %edx 10c475: 8d 7d d0 lea -0x30(%ebp),%edi 10c478: 57 push %edi 10c479: 56 push %esi 10c47a: 68 b0 a8 12 00 push $0x12a8b0 10c47f: e8 54 3a 00 00 call 10fed8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 10c484: 5e pop %esi 10c485: 58 pop %eax 10c486: 57 push %edi 10c487: 8d 75 d8 lea -0x28(%ebp),%esi 10c48a: 56 push %esi 10c48b: e8 4c 39 00 00 call 10fddc <_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)) 10c490: 83 c3 44 add $0x44,%ebx 10c493: 5a pop %edx 10c494: 59 pop %ecx 10c495: 53 push %ebx 10c496: 56 push %esi 10c497: e8 18 3a 00 00 call 10feb4 <_Timespec_Less_than> 10c49c: 83 c4 10 add $0x10,%esp 10c49f: 84 c0 test %al,%al 10c4a1: 74 05 je 10c4a8 <_Rate_monotonic_Get_status+0x84> return false; 10c4a3: 31 c0 xor %eax,%eax 10c4a5: eb c4 jmp 10c46b <_Rate_monotonic_Get_status+0x47> 10c4a7: 90 nop <== NOT EXECUTED /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 10c4a8: 50 push %eax 10c4a9: ff 75 10 pushl 0x10(%ebp) 10c4ac: 56 push %esi 10c4ad: 53 push %ebx 10c4ae: e8 25 3a 00 00 call 10fed8 <_Timespec_Subtract> 10c4b3: 83 c4 10 add $0x10,%esp if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 10c4b6: b0 01 mov $0x1,%al 10c4b8: eb b1 jmp 10c46b <_Rate_monotonic_Get_status+0x47> =============================================================================== 0010c4bc <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10c4bc: 55 push %ebp 10c4bd: 89 e5 mov %esp,%ebp 10c4bf: 57 push %edi 10c4c0: 56 push %esi 10c4c1: 53 push %ebx 10c4c2: 83 ec 28 sub $0x28,%esp 10c4c5: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10c4c8: 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 ); 10c4cb: 8d 7d e0 lea -0x20(%ebp),%edi 10c4ce: 57 push %edi 10c4cf: e8 94 18 00 00 call 10dd68 <_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; 10c4d4: 8b 45 e0 mov -0x20(%ebp),%eax 10c4d7: 8b 55 e4 mov -0x1c(%ebp),%edx 10c4da: 89 43 4c mov %eax,0x4c(%ebx) 10c4dd: 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; 10c4e0: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10c4e6: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10c4ec: 89 43 44 mov %eax,0x44(%ebx) 10c4ef: 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) { 10c4f2: 83 c4 10 add $0x10,%esp 10c4f5: 39 35 b8 ad 12 00 cmp %esi,0x12adb8 10c4fb: 74 0b je 10c508 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10c4fd: 8d 65 f4 lea -0xc(%ebp),%esp 10c500: 5b pop %ebx 10c501: 5e pop %esi 10c502: 5f pop %edi 10c503: c9 leave 10c504: c3 ret 10c505: 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( 10c508: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10c509: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c50c: 56 push %esi 10c50d: 57 push %edi 10c50e: 68 b0 a8 12 00 push $0x12a8b0 10c513: e8 c0 39 00 00 call 10fed8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10c518: 59 pop %ecx 10c519: 5f pop %edi 10c51a: 56 push %esi 10c51b: 83 c3 44 add $0x44,%ebx 10c51e: 53 push %ebx 10c51f: e8 b8 38 00 00 call 10fddc <_Timespec_Add_to> 10c524: 83 c4 10 add $0x10,%esp } #endif } 10c527: 8d 65 f4 lea -0xc(%ebp),%esp 10c52a: 5b pop %ebx 10c52b: 5e pop %esi 10c52c: 5f pop %edi 10c52d: c9 leave 10c52e: c3 ret =============================================================================== 0010ca78 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10ca78: 55 push %ebp 10ca79: 89 e5 mov %esp,%ebp 10ca7b: 83 ec 2c sub $0x2c,%esp /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); 10ca7e: 8d 45 f4 lea -0xc(%ebp),%eax 10ca81: 50 push %eax 10ca82: ff 75 08 pushl 0x8(%ebp) 10ca85: 68 00 a7 12 00 push $0x12a700 10ca8a: e8 79 1d 00 00 call 10e808 <_Objects_Get> switch ( location ) { 10ca8f: 83 c4 10 add $0x10,%esp 10ca92: 8b 55 f4 mov -0xc(%ebp),%edx 10ca95: 85 d2 test %edx,%edx 10ca97: 75 29 jne 10cac2 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10ca99: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10ca9c: f6 42 11 40 testb $0x40,0x11(%edx) 10caa0: 74 08 je 10caaa <_Rate_monotonic_Timeout+0x32> 10caa2: 8b 48 08 mov 0x8(%eax),%ecx 10caa5: 39 4a 20 cmp %ecx,0x20(%edx) 10caa8: 74 4e je 10caf8 <_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 ) { 10caaa: 83 78 38 01 cmpl $0x1,0x38(%eax) 10caae: 74 14 je 10cac4 <_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; 10cab0: 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; 10cab7: a1 f4 a7 12 00 mov 0x12a7f4,%eax 10cabc: 48 dec %eax 10cabd: a3 f4 a7 12 00 mov %eax,0x12a7f4 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10cac2: c9 leave 10cac3: 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; 10cac4: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10cacb: 83 ec 0c sub $0xc,%esp 10cace: 50 push %eax 10cacf: 89 45 e4 mov %eax,-0x1c(%ebp) 10cad2: e8 e5 f9 ff ff call 10c4bc <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cad7: 8b 45 e4 mov -0x1c(%ebp),%eax 10cada: 8b 50 3c mov 0x3c(%eax),%edx 10cadd: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cae0: 5a pop %edx 10cae1: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10cae2: 83 c0 10 add $0x10,%eax 10cae5: 50 push %eax 10cae6: 68 c4 a8 12 00 push $0x12a8c4 10caeb: e8 c8 36 00 00 call 1101b8 <_Watchdog_Insert> 10caf0: 83 c4 10 add $0x10,%esp 10caf3: eb c2 jmp 10cab7 <_Rate_monotonic_Timeout+0x3f> 10caf5: 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 ); 10caf8: 83 ec 08 sub $0x8,%esp 10cafb: 68 f8 ff 03 10 push $0x1003fff8 10cb00: 52 push %edx 10cb01: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb04: e8 cb 21 00 00 call 10ecd4 <_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 ); 10cb09: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb0c: 89 04 24 mov %eax,(%esp) 10cb0f: eb c1 jmp 10cad2 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010c530 <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10c530: 55 push %ebp 10c531: 89 e5 mov %esp,%ebp 10c533: 57 push %edi 10c534: 56 push %esi 10c535: 53 push %ebx 10c536: 83 ec 1c sub $0x1c,%esp 10c539: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10c53c: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10c53f: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10c543: 0f 84 bf 00 00 00 je 10c608 <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c549: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c54a: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c54d: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c54e: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c551: 56 push %esi 10c552: 53 push %ebx 10c553: e8 cc fe ff ff call 10c424 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10c558: 83 c4 10 add $0x10,%esp 10c55b: 84 c0 test %al,%al 10c55d: 75 09 jne 10c568 <_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 } 10c55f: 8d 65 f4 lea -0xc(%ebp),%esp 10c562: 5b pop %ebx 10c563: 5e pop %esi 10c564: 5f pop %edi 10c565: c9 leave 10c566: c3 ret 10c567: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10c568: 83 ec 08 sub $0x8,%esp 10c56b: 57 push %edi 10c56c: 8d 43 6c lea 0x6c(%ebx),%eax 10c56f: 50 push %eax 10c570: e8 67 38 00 00 call 10fddc <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10c575: 58 pop %eax 10c576: 5a pop %edx 10c577: 8d 43 5c lea 0x5c(%ebx),%eax 10c57a: 50 push %eax 10c57b: 57 push %edi 10c57c: e8 33 39 00 00 call 10feb4 <_Timespec_Less_than> 10c581: 83 c4 10 add $0x10,%esp 10c584: 84 c0 test %al,%al 10c586: 74 0c je 10c594 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10c588: 8b 45 e0 mov -0x20(%ebp),%eax 10c58b: 8b 55 e4 mov -0x1c(%ebp),%edx 10c58e: 89 43 5c mov %eax,0x5c(%ebx) 10c591: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10c594: 83 ec 08 sub $0x8,%esp 10c597: 8d 43 64 lea 0x64(%ebx),%eax 10c59a: 50 push %eax 10c59b: 57 push %edi 10c59c: e8 ef 38 00 00 call 10fe90 <_Timespec_Greater_than> 10c5a1: 83 c4 10 add $0x10,%esp 10c5a4: 84 c0 test %al,%al 10c5a6: 74 0c je 10c5b4 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10c5a8: 8b 45 e0 mov -0x20(%ebp),%eax 10c5ab: 8b 55 e4 mov -0x1c(%ebp),%edx 10c5ae: 89 43 64 mov %eax,0x64(%ebx) 10c5b1: 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 ); 10c5b4: 83 ec 08 sub $0x8,%esp 10c5b7: 56 push %esi 10c5b8: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c5be: 50 push %eax 10c5bf: e8 18 38 00 00 call 10fddc <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10c5c4: 5a pop %edx 10c5c5: 59 pop %ecx 10c5c6: 8d 43 74 lea 0x74(%ebx),%eax 10c5c9: 50 push %eax 10c5ca: 56 push %esi 10c5cb: e8 e4 38 00 00 call 10feb4 <_Timespec_Less_than> 10c5d0: 83 c4 10 add $0x10,%esp 10c5d3: 84 c0 test %al,%al 10c5d5: 75 39 jne 10c610 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10c5d7: 83 ec 08 sub $0x8,%esp 10c5da: 8d 43 7c lea 0x7c(%ebx),%eax 10c5dd: 50 push %eax 10c5de: 56 push %esi 10c5df: e8 ac 38 00 00 call 10fe90 <_Timespec_Greater_than> 10c5e4: 83 c4 10 add $0x10,%esp 10c5e7: 84 c0 test %al,%al 10c5e9: 0f 84 70 ff ff ff je 10c55f <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10c5ef: 8b 45 d8 mov -0x28(%ebp),%eax 10c5f2: 8b 55 dc mov -0x24(%ebp),%edx 10c5f5: 89 43 7c mov %eax,0x7c(%ebx) 10c5f8: 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 } 10c5fe: 8d 65 f4 lea -0xc(%ebp),%esp 10c601: 5b pop %ebx 10c602: 5e pop %esi 10c603: 5f pop %edi 10c604: c9 leave 10c605: c3 ret 10c606: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10c608: ff 43 58 incl 0x58(%ebx) 10c60b: e9 39 ff ff ff jmp 10c549 <_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; 10c610: 8b 45 d8 mov -0x28(%ebp),%eax 10c613: 8b 55 dc mov -0x24(%ebp),%edx 10c616: 89 43 74 mov %eax,0x74(%ebx) 10c619: 89 53 78 mov %edx,0x78(%ebx) 10c61c: eb b9 jmp 10c5d7 <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010daa4 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10daa4: 55 push %ebp 10daa5: 89 e5 mov %esp,%ebp 10daa7: 53 push %ebx 10daa8: 83 ec 04 sub $0x4,%esp 10daab: 8b 5d 08 mov 0x8(%ebp),%ebx 10daae: a1 54 23 13 00 mov 0x132354,%eax 10dab3: 40 inc %eax 10dab4: a3 54 23 13 00 mov %eax,0x132354 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10dab9: a1 e8 23 13 00 mov 0x1323e8,%eax if ( time->tv_sec < seconds ) 10dabe: 8b 13 mov (%ebx),%edx 10dac0: 39 d0 cmp %edx,%eax 10dac2: 7f 34 jg 10daf8 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10dac4: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10dac5: 29 c2 sub %eax,%edx 10dac7: 52 push %edx 10dac8: 6a 00 push $0x0 10daca: 68 18 24 13 00 push $0x132418 10dacf: e8 30 25 00 00 call 110004 <_Watchdog_Adjust> 10dad4: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10dad7: 8b 03 mov (%ebx),%eax 10dad9: a3 e8 23 13 00 mov %eax,0x1323e8 10dade: 8b 43 04 mov 0x4(%ebx),%eax 10dae1: a3 ec 23 13 00 mov %eax,0x1323ec _TOD_Is_set = true; 10dae6: c6 05 68 23 13 00 01 movb $0x1,0x132368 _TOD_Activate(); _Thread_Enable_dispatch(); } 10daed: 8b 5d fc mov -0x4(%ebp),%ebx 10daf0: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10daf1: e9 1e 13 00 00 jmp 10ee14 <_Thread_Enable_dispatch> 10daf6: 66 90 xchg %ax,%ax <== NOT EXECUTED 10daf8: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10daf9: 29 d0 sub %edx,%eax 10dafb: 50 push %eax 10dafc: 6a 01 push $0x1 10dafe: 68 18 24 13 00 push $0x132418 10db03: e8 fc 24 00 00 call 110004 <_Watchdog_Adjust> 10db08: 83 c4 10 add $0x10,%esp 10db0b: eb ca jmp 10dad7 <_TOD_Set+0x33> =============================================================================== 0010c1ac <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c1ac: 55 push %ebp 10c1ad: 89 e5 mov %esp,%ebp 10c1af: 56 push %esi 10c1b0: 53 push %ebx 10c1b1: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c1b4: 8b 72 08 mov 0x8(%edx),%esi 10c1b7: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c1b8: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c1ba: 89 c3 mov %eax,%ebx 10c1bc: 83 e3 03 and $0x3,%ebx 10c1bf: 74 67 je 10c228 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c1c1: 8b 4a 04 mov 0x4(%edx),%ecx 10c1c4: 0f b7 8c 09 40 3a 12 movzwl 0x123a40(%ecx,%ecx,1),%ecx 10c1cb: 00 10c1cc: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c1cf: 0f b7 8c 1b 74 3a 12 movzwl 0x123a74(%ebx,%ebx,1),%ecx 10c1d6: 00 if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c1d7: 2d c4 07 00 00 sub $0x7c4,%eax 10c1dc: c1 e8 02 shr $0x2,%eax 10c1df: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c1e2: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c1e5: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c1e8: 8d 04 98 lea (%eax,%ebx,4),%eax 10c1eb: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c1ed: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c1ef: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c1f2: 8d 04 81 lea (%ecx,%eax,4),%eax 10c1f5: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c1f8: c1 e0 02 shl $0x2,%eax 10c1fb: 29 c8 sub %ecx,%eax 10c1fd: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c200: 8b 5a 14 mov 0x14(%edx),%ebx 10c203: 8b 4a 0c mov 0xc(%edx),%ecx 10c206: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c209: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c20c: c1 e1 02 shl $0x2,%ecx 10c20f: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10c212: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c215: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10c218: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10c21f: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10c222: 5b pop %ebx 10c223: 5e pop %esi 10c224: c9 leave 10c225: c3 ret 10c226: 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 ]; 10c228: 8b 4a 04 mov 0x4(%edx),%ecx 10c22b: 0f b7 8c 09 5a 3a 12 movzwl 0x123a5a(%ecx,%ecx,1),%ecx 10c232: 00 10c233: 8d 34 31 lea (%ecx,%esi,1),%esi 10c236: eb 97 jmp 10c1cf <_TOD_To_seconds+0x23> =============================================================================== 0010c238 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c238: 55 push %ebp 10c239: 89 e5 mov %esp,%ebp 10c23b: 53 push %ebx 10c23c: 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(); 10c23f: 8b 1d 2c 62 12 00 mov 0x12622c,%ebx if ((!the_tod) || 10c245: 85 c9 test %ecx,%ecx 10c247: 74 53 je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10c249: b8 40 42 0f 00 mov $0xf4240,%eax 10c24e: 31 d2 xor %edx,%edx 10c250: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c252: 3b 41 18 cmp 0x18(%ecx),%eax 10c255: 76 45 jbe 10c29c <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10c257: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c25b: 77 3f ja 10c29c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c25d: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c261: 77 39 ja 10c29c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c263: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c267: 77 33 ja 10c29c <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10c269: 8b 41 04 mov 0x4(%ecx),%eax rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c26c: 85 c0 test %eax,%eax 10c26e: 74 2c je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10c270: 83 f8 0c cmp $0xc,%eax 10c273: 77 27 ja 10c29c <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c275: 8b 11 mov (%ecx),%edx (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 10c277: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c27d: 76 1d jbe 10c29c <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c27f: 8b 49 08 mov 0x8(%ecx),%ecx (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) || 10c282: 85 c9 test %ecx,%ecx 10c284: 74 16 je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c286: 83 e2 03 and $0x3,%edx 10c289: 75 16 jne 10c2a1 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c28b: 8b 04 85 b4 3a 12 00 mov 0x123ab4(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c292: 39 c8 cmp %ecx,%eax 10c294: 0f 93 c0 setae %al 10c297: eb 05 jmp 10c29e <_TOD_Validate+0x66> 10c299: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 10c29c: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c29e: 5b pop %ebx 10c29f: c9 leave 10c2a0: 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 ]; 10c2a1: 8b 04 85 80 3a 12 00 mov 0x123a80(,%eax,4),%eax 10c2a8: eb e8 jmp 10c292 <_TOD_Validate+0x5a> =============================================================================== 0010d1a4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d1a4: 55 push %ebp 10d1a5: 89 e5 mov %esp,%ebp 10d1a7: 57 push %edi 10d1a8: 56 push %esi 10d1a9: 53 push %ebx 10d1aa: 83 ec 28 sub $0x28,%esp 10d1ad: 8b 5d 08 mov 0x8(%ebp),%ebx 10d1b0: 8b 75 0c mov 0xc(%ebp),%esi 10d1b3: 8a 45 10 mov 0x10(%ebp),%al 10d1b6: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d1b9: 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 ); 10d1bc: 53 push %ebx 10d1bd: e8 a2 0e 00 00 call 10e064 <_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 ) 10d1c2: 83 c4 10 add $0x10,%esp 10d1c5: 39 73 14 cmp %esi,0x14(%ebx) 10d1c8: 74 0d je 10d1d7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d1ca: 83 ec 08 sub $0x8,%esp 10d1cd: 56 push %esi 10d1ce: 53 push %ebx 10d1cf: e8 44 0d 00 00 call 10df18 <_Thread_Set_priority> 10d1d4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d1d7: 9c pushf 10d1d8: fa cli 10d1d9: 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; 10d1da: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d1dd: 83 f8 04 cmp $0x4,%eax 10d1e0: 74 26 je 10d208 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d1e2: 83 e7 04 and $0x4,%edi 10d1e5: 74 15 je 10d1fc <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d1e7: 52 push %edx 10d1e8: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d1e9: a9 e0 be 03 00 test $0x3bee0,%eax 10d1ee: 0f 85 bc 00 00 00 jne 10d2b0 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10d1f4: 8d 65 f4 lea -0xc(%ebp),%esp 10d1f7: 5b pop %ebx 10d1f8: 5e pop %esi 10d1f9: 5f pop %edi 10d1fa: c9 leave 10d1fb: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d1fc: 89 c1 mov %eax,%ecx 10d1fe: 83 e1 fb and $0xfffffffb,%ecx 10d201: 89 4b 10 mov %ecx,0x10(%ebx) 10d204: eb e1 jmp 10d1e7 <_Thread_Change_priority+0x43> 10d206: 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 ) ) { 10d208: 83 e7 04 and $0x4,%edi 10d20b: 75 45 jne 10d252 <_Thread_Change_priority+0xae><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10d20d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d214: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d21a: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d221: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d224: 66 a1 80 65 12 00 mov 0x126580,%ax 10d22a: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d230: 66 a3 80 65 12 00 mov %ax,0x126580 _Priority_bit_map_Add( &the_thread->Priority_map ); if ( prepend_it ) 10d236: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d23a: 0f 84 88 00 00 00 je 10d2c8 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d240: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d246: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d249: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d24b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d24d: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d24f: 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 ); 10d252: 52 push %edx 10d253: 9d popf 10d254: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d255: 66 8b 1d 80 65 12 00 mov 0x126580,%bx 10d25c: 31 c0 xor %eax,%eax 10d25e: 89 c1 mov %eax,%ecx 10d260: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d264: 0f b7 c9 movzwl %cx,%ecx 10d267: 66 8b 9c 09 00 66 12 mov 0x126600(%ecx,%ecx,1),%bx 10d26e: 00 10d26f: 66 0f bc c3 bsf %bx,%ax return (_Priority_Bits_index( major ) << 4) + 10d273: c1 e1 04 shl $0x4,%ecx 10d276: 0f b7 c0 movzwl %ax,%eax */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 10d279: 8d 04 01 lea (%ecx,%eax,1),%eax 10d27c: 8d 04 40 lea (%eax,%eax,2),%eax 10d27f: c1 e0 02 shl $0x2,%eax 10d282: 03 05 a0 64 12 00 add 0x1264a0,%eax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d288: 8b 00 mov (%eax),%eax 10d28a: a3 9c 6a 12 00 mov %eax,0x126a9c * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d28f: 8b 0d 98 6a 12 00 mov 0x126a98,%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() && 10d295: 39 c8 cmp %ecx,%eax 10d297: 74 0d je 10d2a6 <_Thread_Change_priority+0x102> 10d299: 80 79 74 00 cmpb $0x0,0x74(%ecx) 10d29d: 74 07 je 10d2a6 <_Thread_Change_priority+0x102> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10d29f: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 _ISR_Enable( level ); 10d2a6: 52 push %edx 10d2a7: 9d popf } 10d2a8: 8d 65 f4 lea -0xc(%ebp),%esp 10d2ab: 5b pop %ebx 10d2ac: 5e pop %esi 10d2ad: 5f pop %edi 10d2ae: c9 leave 10d2af: c3 ret /* 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 ); 10d2b0: 89 5d 0c mov %ebx,0xc(%ebp) 10d2b3: 8b 43 44 mov 0x44(%ebx),%eax 10d2b6: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10d2b9: 8d 65 f4 lea -0xc(%ebp),%esp 10d2bc: 5b pop %ebx 10d2bd: 5e pop %esi 10d2be: 5f pop %edi 10d2bf: 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 ); 10d2c0: e9 bb 0b 00 00 jmp 10de80 <_Thread_queue_Requeue> 10d2c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Priority_bit_map_Add( &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 ); 10d2c8: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d2ce: 8d 48 04 lea 0x4(%eax),%ecx 10d2d1: 89 0b mov %ecx,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d2d3: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d2d6: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d2d9: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d2db: 89 4b 04 mov %ecx,0x4(%ebx) 10d2de: e9 6f ff ff ff jmp 10d252 <_Thread_Change_priority+0xae> =============================================================================== 0010d2e4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d2e4: 55 push %ebp 10d2e5: 89 e5 mov %esp,%ebp 10d2e7: 53 push %ebx 10d2e8: 8b 45 08 mov 0x8(%ebp),%eax 10d2eb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d2ee: 9c pushf 10d2ef: fa cli 10d2f0: 5b pop %ebx current_state = the_thread->current_state; 10d2f1: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d2f4: 85 ca test %ecx,%edx 10d2f6: 74 70 je 10d368 <_Thread_Clear_state+0x84> 10d2f8: f7 d2 not %edx 10d2fa: 21 ca and %ecx,%edx current_state = the_thread->current_state = _States_Clear( state, current_state ); 10d2fc: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10d2ff: 85 d2 test %edx,%edx 10d301: 75 65 jne 10d368 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d303: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d309: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d310: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d313: 66 8b 15 80 65 12 00 mov 0x126580,%dx 10d31a: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d320: 66 89 15 80 65 12 00 mov %dx,0x126580 _Priority_bit_map_Add( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d327: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d32d: 8d 4a 04 lea 0x4(%edx),%ecx 10d330: 89 08 mov %ecx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d332: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d335: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d338: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d33a: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d33d: 53 push %ebx 10d33e: 9d popf 10d33f: 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 ) { 10d340: 8b 50 14 mov 0x14(%eax),%edx 10d343: 8b 0d 9c 6a 12 00 mov 0x126a9c,%ecx 10d349: 3b 51 14 cmp 0x14(%ecx),%edx 10d34c: 73 1a jae 10d368 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d34e: a3 9c 6a 12 00 mov %eax,0x126a9c if ( _Thread_Executing->is_preemptible || 10d353: a1 98 6a 12 00 mov 0x126a98,%eax 10d358: 80 78 74 00 cmpb $0x0,0x74(%eax) 10d35c: 74 12 je 10d370 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 10d35e: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 10d365: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d368: 53 push %ebx 10d369: 9d popf } 10d36a: 5b pop %ebx 10d36b: c9 leave 10d36c: c3 ret 10d36d: 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 || 10d370: 85 d2 test %edx,%edx 10d372: 74 ea je 10d35e <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d374: eb f2 jmp 10d368 <_Thread_Clear_state+0x84> =============================================================================== 0010d378 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d378: 55 push %ebp 10d379: 89 e5 mov %esp,%ebp 10d37b: 56 push %esi 10d37c: 53 push %ebx 10d37d: 8b 75 08 mov 0x8(%ebp),%esi 10d380: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 10d383: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d387: 8b 46 1c mov 0x1c(%esi),%eax 10d38a: 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; 10d391: a1 d4 64 12 00 mov 0x1264d4,%eax 10d396: 48 dec %eax 10d397: a3 d4 64 12 00 mov %eax,0x1264d4 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d39c: 83 ec 0c sub $0xc,%esp 10d39f: 53 push %ebx 10d3a0: e8 bf 11 00 00 call 10e564 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d3a5: a1 d4 64 12 00 mov 0x1264d4,%eax 10d3aa: 40 inc %eax 10d3ab: a3 d4 64 12 00 mov %eax,0x1264d4 /* * 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 ); 10d3b0: 59 pop %ecx 10d3b1: 58 pop %eax 10d3b2: 53 push %ebx 10d3b3: 56 push %esi 10d3b4: e8 23 f6 ff ff call 10c9dc <_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 ); 10d3b9: 58 pop %eax 10d3ba: 5a pop %edx 10d3bb: 6a 01 push $0x1 10d3bd: 53 push %ebx 10d3be: e8 c1 0b 00 00 call 10df84 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d3c3: 89 1c 24 mov %ebx,(%esp) 10d3c6: e8 f9 09 00 00 call 10ddc4 <_Thread_queue_Extract_with_proxy> 10d3cb: 83 c4 10 add $0x10,%esp 10d3ce: 84 c0 test %al,%al 10d3d0: 75 06 jne 10d3d8 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d3d2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d3d6: 74 68 je 10d440 <_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 ) ) 10d3d8: 3b 1d 60 65 12 00 cmp 0x126560,%ebx 10d3de: 74 74 je 10d454 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d3e0: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d3e7: 00 00 00 if ( the_thread->Start.fp_context ) 10d3ea: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10d3f0: 85 c0 test %eax,%eax 10d3f2: 74 0c je 10d400 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d3f4: 83 ec 0c sub $0xc,%esp 10d3f7: 50 push %eax 10d3f8: e8 a3 14 00 00 call 10e8a0 <_Workspace_Free> 10d3fd: 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 ); 10d400: 83 ec 0c sub $0xc,%esp 10d403: 53 push %ebx 10d404: e8 37 0d 00 00 call 10e140 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d409: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10d410: 00 00 00 if ( the_thread->extensions ) 10d413: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10d419: 83 c4 10 add $0x10,%esp 10d41c: 85 c0 test %eax,%eax 10d41e: 74 0c je 10d42c <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d420: 83 ec 0c sub $0xc,%esp 10d423: 50 push %eax 10d424: e8 77 14 00 00 call 10e8a0 <_Workspace_Free> 10d429: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d42c: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d433: 00 00 00 } 10d436: 8d 65 f8 lea -0x8(%ebp),%esp 10d439: 5b pop %ebx 10d43a: 5e pop %esi 10d43b: c9 leave 10d43c: c3 ret 10d43d: 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 ); 10d440: 83 ec 0c sub $0xc,%esp 10d443: 8d 43 48 lea 0x48(%ebx),%eax 10d446: 50 push %eax 10d447: e8 10 13 00 00 call 10e75c <_Watchdog_Remove> 10d44c: 83 c4 10 add $0x10,%esp 10d44f: eb 87 jmp 10d3d8 <_Thread_Close+0x60> 10d451: 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; 10d454: c7 05 60 65 12 00 00 movl $0x0,0x126560 10d45b: 00 00 00 10d45e: eb 80 jmp 10d3e0 <_Thread_Close+0x68> =============================================================================== 0010d4f4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d4f4: 55 push %ebp 10d4f5: 89 e5 mov %esp,%ebp 10d4f7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d4fa: 8d 45 f4 lea -0xc(%ebp),%eax 10d4fd: 50 push %eax 10d4fe: ff 75 08 pushl 0x8(%ebp) 10d501: e8 c6 01 00 00 call 10d6cc <_Thread_Get> switch ( location ) { 10d506: 83 c4 10 add $0x10,%esp 10d509: 8b 55 f4 mov -0xc(%ebp),%edx 10d50c: 85 d2 test %edx,%edx 10d50e: 75 1c jne 10d52c <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d510: 83 ec 08 sub $0x8,%esp 10d513: 68 18 00 00 10 push $0x10000018 10d518: 50 push %eax 10d519: e8 c6 fd ff ff call 10d2e4 <_Thread_Clear_state> 10d51e: a1 d4 64 12 00 mov 0x1264d4,%eax 10d523: 48 dec %eax 10d524: a3 d4 64 12 00 mov %eax,0x1264d4 10d529: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d52c: c9 leave 10d52d: c3 ret =============================================================================== 0010d530 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d530: 55 push %ebp 10d531: 89 e5 mov %esp,%ebp 10d533: 57 push %edi 10d534: 56 push %esi 10d535: 53 push %ebx 10d536: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d539: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx _ISR_Disable( level ); 10d53f: 9c pushf 10d540: fa cli 10d541: 58 pop %eax while ( _Thread_Dispatch_necessary == true ) { 10d542: 8a 15 a4 6a 12 00 mov 0x126aa4,%dl 10d548: 84 d2 test %dl,%dl 10d54a: 0f 84 3c 01 00 00 je 10d68c <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d550: 8b 35 9c 6a 12 00 mov 0x126a9c,%esi _Thread_Dispatch_disable_level = 1; 10d556: c7 05 d4 64 12 00 01 movl $0x1,0x1264d4 10d55d: 00 00 00 _Thread_Dispatch_necessary = false; 10d560: c6 05 a4 6a 12 00 00 movb $0x0,0x126aa4 _Thread_Executing = heir; 10d567: 89 35 98 6a 12 00 mov %esi,0x126a98 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10d56d: 39 f3 cmp %esi,%ebx 10d56f: 0f 84 17 01 00 00 je 10d68c <_Thread_Dispatch+0x15c> 10d575: 8d 7d d8 lea -0x28(%ebp),%edi 10d578: e9 f5 00 00 00 jmp 10d672 <_Thread_Dispatch+0x142> 10d57d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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 ); 10d580: 50 push %eax 10d581: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d582: 83 ec 0c sub $0xc,%esp 10d585: 8d 45 e0 lea -0x20(%ebp),%eax 10d588: 50 push %eax 10d589: e8 22 3c 00 00 call 1111b0 <_TOD_Get_uptime> _Timestamp_Subtract( 10d58e: 83 c4 0c add $0xc,%esp 10d591: 57 push %edi 10d592: 8d 45 e0 lea -0x20(%ebp),%eax 10d595: 50 push %eax 10d596: 68 90 65 12 00 push $0x126590 10d59b: e8 a4 0d 00 00 call 10e344 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d5a0: 58 pop %eax 10d5a1: 5a pop %edx 10d5a2: 57 push %edi 10d5a3: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d5a9: 50 push %eax 10d5aa: e8 59 0d 00 00 call 10e308 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d5af: 8b 45 e0 mov -0x20(%ebp),%eax 10d5b2: 8b 55 e4 mov -0x1c(%ebp),%edx 10d5b5: a3 90 65 12 00 mov %eax,0x126590 10d5ba: 89 15 94 65 12 00 mov %edx,0x126594 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d5c0: a1 64 65 12 00 mov 0x126564,%eax 10d5c5: 83 c4 10 add $0x10,%esp 10d5c8: 85 c0 test %eax,%eax 10d5ca: 74 10 je 10d5dc <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10d5cc: 8b 10 mov (%eax),%edx 10d5ce: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d5d4: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10d5da: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d5dc: 83 ec 08 sub $0x8,%esp 10d5df: 56 push %esi 10d5e0: 53 push %ebx 10d5e1: e8 fe 0f 00 00 call 10e5e4 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d5e6: 5a pop %edx 10d5e7: 59 pop %ecx 10d5e8: 81 c6 d4 00 00 00 add $0xd4,%esi 10d5ee: 56 push %esi 10d5ef: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10d5f5: 50 push %eax 10d5f6: e8 f5 12 00 00 call 10e8f0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d5fb: 83 c4 10 add $0x10,%esp 10d5fe: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10d604: 85 c0 test %eax,%eax 10d606: 74 36 je 10d63e <_Thread_Dispatch+0x10e> #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 ); 10d608: a1 60 65 12 00 mov 0x126560,%eax 10d60d: 39 c3 cmp %eax,%ebx 10d60f: 74 2d je 10d63e <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d611: 85 c0 test %eax,%eax 10d613: 74 11 je 10d626 <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d615: 83 ec 0c sub $0xc,%esp 10d618: 05 ec 00 00 00 add $0xec,%eax 10d61d: 50 push %eax 10d61e: e8 01 13 00 00 call 10e924 <_CPU_Context_save_fp> 10d623: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d626: 83 ec 0c sub $0xc,%esp 10d629: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10d62f: 50 push %eax 10d630: e8 f9 12 00 00 call 10e92e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d635: 89 1d 60 65 12 00 mov %ebx,0x126560 10d63b: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d63e: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx _ISR_Disable( level ); 10d644: 9c pushf 10d645: fa cli 10d646: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10d647: 8a 15 a4 6a 12 00 mov 0x126aa4,%dl 10d64d: 84 d2 test %dl,%dl 10d64f: 74 3b je 10d68c <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d651: 8b 35 9c 6a 12 00 mov 0x126a9c,%esi _Thread_Dispatch_disable_level = 1; 10d657: c7 05 d4 64 12 00 01 movl $0x1,0x1264d4 10d65e: 00 00 00 _Thread_Dispatch_necessary = false; 10d661: c6 05 a4 6a 12 00 00 movb $0x0,0x126aa4 _Thread_Executing = heir; 10d668: 89 35 98 6a 12 00 mov %esi,0x126a98 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10d66e: 39 de cmp %ebx,%esi 10d670: 74 1a je 10d68c <_Thread_Dispatch+0x15c><== NEVER TAKEN */ #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 ) 10d672: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d676: 0f 85 04 ff ff ff jne 10d580 <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d67c: 8b 15 a4 64 12 00 mov 0x1264a4,%edx 10d682: 89 56 78 mov %edx,0x78(%esi) 10d685: e9 f6 fe ff ff jmp 10d580 <_Thread_Dispatch+0x50> 10d68a: 66 90 xchg %ax,%ax <== NOT EXECUTED _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10d68c: c7 05 d4 64 12 00 00 movl $0x0,0x1264d4 10d693: 00 00 00 _ISR_Enable( level ); 10d696: 50 push %eax 10d697: 9d popf _API_extensions_Run_postswitch(); 10d698: e8 07 e8 ff ff call 10bea4 <_API_extensions_Run_postswitch> } 10d69d: 8d 65 f4 lea -0xc(%ebp),%esp 10d6a0: 5b pop %ebx 10d6a1: 5e pop %esi 10d6a2: 5f pop %edi 10d6a3: c9 leave 10d6a4: c3 ret =============================================================================== 0010d6cc <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d6cc: 55 push %ebp 10d6cd: 89 e5 mov %esp,%ebp 10d6cf: 53 push %ebx 10d6d0: 83 ec 04 sub $0x4,%esp 10d6d3: 8b 45 08 mov 0x8(%ebp),%eax 10d6d6: 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 ) ) { 10d6d9: 85 c0 test %eax,%eax 10d6db: 74 47 je 10d724 <_Thread_Get+0x58> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10d6dd: 89 c2 mov %eax,%edx 10d6df: c1 ea 18 shr $0x18,%edx 10d6e2: 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 ) 10d6e5: 8d 5a ff lea -0x1(%edx),%ebx 10d6e8: 83 fb 02 cmp $0x2,%ebx 10d6eb: 77 27 ja 10d714 <_Thread_Get+0x48> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d6ed: 89 c3 mov %eax,%ebx 10d6ef: c1 eb 1b shr $0x1b,%ebx *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d6f2: 4b dec %ebx 10d6f3: 75 1f jne 10d714 <_Thread_Get+0x48> *location = OBJECTS_ERROR; goto done; } #endif information = api_information[ the_class ]; 10d6f5: 8b 14 95 ac 64 12 00 mov 0x1264ac(,%edx,4),%edx 10d6fc: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d6ff: 85 d2 test %edx,%edx 10d701: 74 11 je 10d714 <_Thread_Get+0x48> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d703: 53 push %ebx 10d704: 51 push %ecx 10d705: 50 push %eax 10d706: 52 push %edx 10d707: e8 0c f7 ff ff call 10ce18 <_Objects_Get> 10d70c: 83 c4 10 add $0x10,%esp done: return tp; } 10d70f: 8b 5d fc mov -0x4(%ebp),%ebx 10d712: c9 leave 10d713: c3 ret } #endif information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d714: c7 01 01 00 00 00 movl $0x1,(%ecx) { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 10d71a: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d71c: 8b 5d fc mov -0x4(%ebp),%ebx 10d71f: c9 leave 10d720: c3 ret 10d721: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d724: a1 d4 64 12 00 mov 0x1264d4,%eax 10d729: 40 inc %eax 10d72a: a3 d4 64 12 00 mov %eax,0x1264d4 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; 10d72f: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d735: a1 98 6a 12 00 mov 0x126a98,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d73a: 8b 5d fc mov -0x4(%ebp),%ebx 10d73d: c9 leave 10d73e: c3 ret =============================================================================== 001130d0 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 1130d0: 55 push %ebp 1130d1: 89 e5 mov %esp,%ebp 1130d3: 53 push %ebx 1130d4: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 1130d7: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 1130dd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 1130e3: 85 c0 test %eax,%eax 1130e5: 74 79 je 113160 <_Thread_Handler+0x90> 1130e7: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 1130e8: a0 4c 61 12 00 mov 0x12614c,%al 1130ed: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 1130f0: c6 05 4c 61 12 00 01 movb $0x1,0x12614c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 1130f7: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 1130fd: 85 c0 test %eax,%eax 1130ff: 74 24 je 113125 <_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 ); 113101: a1 60 65 12 00 mov 0x126560,%eax 113106: 39 c3 cmp %eax,%ebx 113108: 74 1b je 113125 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 11310a: 85 c0 test %eax,%eax 11310c: 74 11 je 11311f <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 11310e: 83 ec 0c sub $0xc,%esp 113111: 05 ec 00 00 00 add $0xec,%eax 113116: 50 push %eax 113117: e8 08 b8 ff ff call 10e924 <_CPU_Context_save_fp> 11311c: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 11311f: 89 1d 60 65 12 00 mov %ebx,0x126560 /* * 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 ); 113125: 83 ec 0c sub $0xc,%esp 113128: 53 push %ebx 113129: e8 1a b3 ff ff call 10e448 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 11312e: e8 75 a5 ff ff call 10d6a8 <_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) */ { 113133: 83 c4 10 add $0x10,%esp 113136: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 11313a: 74 28 je 113164 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 11313c: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113142: 85 c0 test %eax,%eax 113144: 74 2d je 113173 <_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 ) { 113146: 48 dec %eax 113147: 74 43 je 11318c <_Thread_Handler+0xbc> <== ALWAYS 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 ); 113149: 83 ec 0c sub $0xc,%esp 11314c: 53 push %ebx 11314d: e8 32 b3 ff ff call 10e484 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 113152: 83 c4 0c add $0xc,%esp 113155: 6a 05 push $0x5 113157: 6a 01 push $0x1 113159: 6a 00 push $0x0 11315b: e8 70 97 ff ff call 10c8d0 <_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); 113160: fb sti 113161: eb 85 jmp 1130e8 <_Thread_Handler+0x18> 113163: 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 (); 113164: e8 77 be 00 00 call 11efe0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113169: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 11316f: 85 c0 test %eax,%eax 113171: 75 d3 jne 113146 <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 113173: 83 ec 0c sub $0xc,%esp 113176: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 11317c: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 113182: 89 43 28 mov %eax,0x28(%ebx) 113185: 83 c4 10 add $0x10,%esp 113188: eb bf jmp 113149 <_Thread_Handler+0x79> 11318a: 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)( 11318c: 83 ec 0c sub $0xc,%esp 11318f: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 113195: 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 = 11319b: 89 43 28 mov %eax,0x28(%ebx) 11319e: 83 c4 10 add $0x10,%esp 1131a1: eb a6 jmp 113149 <_Thread_Handler+0x79> =============================================================================== 0010d740 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d740: 55 push %ebp 10d741: 89 e5 mov %esp,%ebp 10d743: 57 push %edi 10d744: 56 push %esi 10d745: 53 push %ebx 10d746: 83 ec 1c sub $0x1c,%esp 10d749: 8b 5d 0c mov 0xc(%ebp),%ebx 10d74c: 8b 4d 10 mov 0x10(%ebp),%ecx 10d74f: 8b 75 14 mov 0x14(%ebp),%esi 10d752: 8b 7d 1c mov 0x1c(%ebp),%edi 10d755: 8a 55 18 mov 0x18(%ebp),%dl 10d758: 8a 45 20 mov 0x20(%ebp),%al 10d75b: 88 45 e3 mov %al,-0x1d(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10d75e: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d765: 00 00 00 10d768: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d76f: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d772: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d779: 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 ) { 10d77c: 85 c9 test %ecx,%ecx 10d77e: 0f 84 e3 01 00 00 je 10d967 <_Thread_Initialize+0x227> 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; 10d784: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10d78b: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d78d: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10d793: 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 ) { 10d799: 84 d2 test %dl,%dl 10d79b: 0f 85 63 01 00 00 jne 10d904 <_Thread_Initialize+0x1c4> 10d7a1: 31 c0 xor %eax,%eax extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 10d7a3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%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; 10d7aa: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10d7b0: 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; 10d7b6: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d7bd: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d7c4: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d7cb: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d7d2: a1 70 65 12 00 mov 0x126570,%eax 10d7d7: 85 c0 test %eax,%eax 10d7d9: 0f 85 45 01 00 00 jne 10d924 <_Thread_Initialize+0x1e4> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d7df: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d7e6: 00 00 00 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10d7e9: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d7eb: 8a 45 e3 mov -0x1d(%ebp),%al 10d7ee: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d7f4: 8b 45 24 mov 0x24(%ebp),%eax 10d7f7: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d7fd: 8b 45 28 mov 0x28(%ebp),%eax 10d800: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10d806: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10d80a: 75 08 jne 10d814 <_Thread_Initialize+0xd4> 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; 10d80c: a1 a4 64 12 00 mov 0x1264a4,%eax 10d811: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10d814: 8b 45 2c mov 0x2c(%ebp),%eax 10d817: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d81d: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d824: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d82b: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10d832: 89 7b 18 mov %edi,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d835: 89 bb bc 00 00 00 mov %edi,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d83b: 83 ec 08 sub $0x8,%esp 10d83e: 57 push %edi 10d83f: 53 push %ebx 10d840: e8 d3 06 00 00 call 10df18 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10d845: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d84c: 00 00 00 10d84f: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d856: 00 00 00 _Thread_Stack_Free( the_thread ); return false; } 10d859: 8b 45 08 mov 0x8(%ebp),%eax 10d85c: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d85f: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d863: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d866: 8b 45 30 mov 0x30(%ebp),%eax 10d869: 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 ); 10d86c: 89 1c 24 mov %ebx,(%esp) 10d86f: e8 9c 0c 00 00 call 10e510 <_User_extensions_Thread_create> if ( extension_status ) 10d874: 83 c4 10 add $0x10,%esp 10d877: 84 c0 test %al,%al 10d879: 75 7d jne 10d8f8 <_Thread_Initialize+0x1b8> return true; failed: if ( the_thread->libc_reent ) 10d87b: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d881: 85 c0 test %eax,%eax 10d883: 74 0c je 10d891 <_Thread_Initialize+0x151> _Workspace_Free( the_thread->libc_reent ); 10d885: 83 ec 0c sub $0xc,%esp 10d888: 50 push %eax 10d889: e8 12 10 00 00 call 10e8a0 <_Workspace_Free> 10d88e: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d891: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10d897: 85 c0 test %eax,%eax 10d899: 74 0c je 10d8a7 <_Thread_Initialize+0x167> _Workspace_Free( the_thread->API_Extensions[i] ); 10d89b: 83 ec 0c sub $0xc,%esp 10d89e: 50 push %eax 10d89f: e8 fc 0f 00 00 call 10e8a0 <_Workspace_Free> 10d8a4: 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] ) 10d8a7: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10d8ad: 85 c0 test %eax,%eax 10d8af: 74 0c je 10d8bd <_Thread_Initialize+0x17d> _Workspace_Free( the_thread->API_Extensions[i] ); 10d8b1: 83 ec 0c sub $0xc,%esp 10d8b4: 50 push %eax 10d8b5: e8 e6 0f 00 00 call 10e8a0 <_Workspace_Free> 10d8ba: 83 c4 10 add $0x10,%esp if ( extensions_area ) 10d8bd: 85 f6 test %esi,%esi 10d8bf: 74 0c je 10d8cd <_Thread_Initialize+0x18d> (void) _Workspace_Free( extensions_area ); 10d8c1: 83 ec 0c sub $0xc,%esp 10d8c4: 56 push %esi 10d8c5: e8 d6 0f 00 00 call 10e8a0 <_Workspace_Free> 10d8ca: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d8cd: 8b 45 e4 mov -0x1c(%ebp),%eax 10d8d0: 85 c0 test %eax,%eax 10d8d2: 74 0e je 10d8e2 <_Thread_Initialize+0x1a2> (void) _Workspace_Free( fp_area ); 10d8d4: 83 ec 0c sub $0xc,%esp 10d8d7: ff 75 e4 pushl -0x1c(%ebp) 10d8da: e8 c1 0f 00 00 call 10e8a0 <_Workspace_Free> 10d8df: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d8e2: 83 ec 0c sub $0xc,%esp 10d8e5: 53 push %ebx 10d8e6: e8 55 08 00 00 call 10e140 <_Thread_Stack_Free> return false; 10d8eb: 83 c4 10 add $0x10,%esp 10d8ee: 31 c0 xor %eax,%eax } 10d8f0: 8d 65 f4 lea -0xc(%ebp),%esp 10d8f3: 5b pop %ebx 10d8f4: 5e pop %esi 10d8f5: 5f pop %edi 10d8f6: c9 leave 10d8f7: c3 ret * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 10d8f8: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d8fa: 8d 65 f4 lea -0xc(%ebp),%esp 10d8fd: 5b pop %ebx 10d8fe: 5e pop %esi 10d8ff: 5f pop %edi 10d900: c9 leave 10d901: c3 ret 10d902: 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 ); 10d904: 83 ec 0c sub $0xc,%esp 10d907: 6a 6c push $0x6c 10d909: e8 76 0f 00 00 call 10e884 <_Workspace_Allocate> 10d90e: 89 45 e4 mov %eax,-0x1c(%ebp) if ( !fp_area ) 10d911: 83 c4 10 add $0x10,%esp 10d914: 85 c0 test %eax,%eax 10d916: 0f 85 8e fe ff ff jne 10d7aa <_Thread_Initialize+0x6a> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10d91c: 31 f6 xor %esi,%esi 10d91e: e9 58 ff ff ff jmp 10d87b <_Thread_Initialize+0x13b> 10d923: 90 nop <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d924: 83 ec 0c sub $0xc,%esp 10d927: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d92e: 50 push %eax 10d92f: e8 50 0f 00 00 call 10e884 <_Workspace_Allocate> 10d934: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d936: 83 c4 10 add $0x10,%esp 10d939: 85 c0 test %eax,%eax 10d93b: 0f 84 3a ff ff ff je 10d87b <_Thread_Initialize+0x13b> goto failed; } the_thread->extensions = (void **) extensions_area; 10d941: 89 83 fc 00 00 00 mov %eax,0xfc(%ebx) 10d947: 8b 0d 70 65 12 00 mov 0x126570,%ecx * 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++ ) 10d94d: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d94f: 31 c0 xor %eax,%eax 10d951: 8d 76 00 lea 0x0(%esi),%esi * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 10d954: c7 04 96 00 00 00 00 movl $0x0,(%esi,%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++ ) 10d95b: 40 inc %eax 10d95c: 89 c2 mov %eax,%edx 10d95e: 39 c1 cmp %eax,%ecx 10d960: 73 f2 jae 10d954 <_Thread_Initialize+0x214> 10d962: e9 84 fe ff ff jmp 10d7eb <_Thread_Initialize+0xab> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10d967: 83 ec 08 sub $0x8,%esp 10d96a: 56 push %esi 10d96b: 53 push %ebx 10d96c: 88 55 dc mov %dl,-0x24(%ebp) 10d96f: e8 68 07 00 00 call 10e0dc <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d974: 83 c4 10 add $0x10,%esp 10d977: 85 c0 test %eax,%eax 10d979: 8a 55 dc mov -0x24(%ebp),%dl 10d97c: 74 16 je 10d994 <_Thread_Initialize+0x254> 10d97e: 39 c6 cmp %eax,%esi 10d980: 77 12 ja 10d994 <_Thread_Initialize+0x254><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10d982: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10d988: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10d98f: e9 f9 fd ff ff jmp 10d78d <_Thread_Initialize+0x4d> stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 10d994: 31 c0 xor %eax,%eax 10d996: e9 55 ff ff ff jmp 10d8f0 <_Thread_Initialize+0x1b0> =============================================================================== 001124d0 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 1124d0: 55 push %ebp 1124d1: 89 e5 mov %esp,%ebp 1124d3: 53 push %ebx 1124d4: 83 ec 10 sub $0x10,%esp 1124d7: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 1124da: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 1124e1: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 1124e7: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 1124ea: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 1124f0: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 1124f3: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 1124f9: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 1124ff: 8b 45 0c mov 0xc(%ebp),%eax 112502: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 112508: 8b 45 10 mov 0x10(%ebp),%eax 11250b: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 112511: 53 push %ebx 112512: e8 e5 c3 ff ff call 10e8fc <_Thread_queue_Extract_with_proxy> 112517: 83 c4 10 add $0x10,%esp 11251a: 84 c0 test %al,%al 11251c: 75 06 jne 112524 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 11251e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112522: 74 28 je 11254c <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 112524: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 11252a: 39 43 14 cmp %eax,0x14(%ebx) 11252d: 74 15 je 112544 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 11252f: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 112532: 89 45 0c mov %eax,0xc(%ebp) 112535: 89 5d 08 mov %ebx,0x8(%ebp) } } 112538: 8b 5d fc mov -0x4(%ebp),%ebx 11253b: 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 ); 11253c: e9 97 c5 ff ff jmp 10ead8 <_Thread_Set_priority> 112541: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 112544: 8b 5d fc mov -0x4(%ebp),%ebx 112547: c9 leave 112548: c3 ret 112549: 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 ); 11254c: 83 ec 0c sub $0xc,%esp 11254f: 8d 43 48 lea 0x48(%ebx),%eax 112552: 50 push %eax 112553: e8 04 ce ff ff call 10f35c <_Watchdog_Remove> 112558: 83 c4 10 add $0x10,%esp 11255b: eb c7 jmp 112524 <_Thread_Reset+0x54> =============================================================================== 0010ea50 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10ea50: 55 push %ebp 10ea51: 89 e5 mov %esp,%ebp 10ea53: 53 push %ebx 10ea54: 83 ec 04 sub $0x4,%esp 10ea57: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10ea5a: f6 43 10 01 testb $0x1,0x10(%ebx) 10ea5e: 74 08 je 10ea68 <_Thread_Restart+0x18> _Thread_Restart_self(); return true; } return false; 10ea60: 31 c0 xor %eax,%eax } 10ea62: 8b 5d fc mov -0x4(%ebp),%ebx 10ea65: c9 leave 10ea66: c3 ret 10ea67: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10ea68: 83 ec 0c sub $0xc,%esp 10ea6b: 53 push %ebx 10ea6c: e8 b3 01 00 00 call 10ec24 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10ea71: 83 c4 0c add $0xc,%esp 10ea74: ff 75 10 pushl 0x10(%ebp) 10ea77: ff 75 0c pushl 0xc(%ebp) 10ea7a: 53 push %ebx 10ea7b: e8 50 3a 00 00 call 1124d0 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10ea80: 89 1c 24 mov %ebx,(%esp) 10ea83: e8 30 37 00 00 call 1121b8 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10ea88: 89 1c 24 mov %ebx,(%esp) 10ea8b: e8 9c 39 00 00 call 11242c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10ea90: 89 1c 24 mov %ebx,(%esp) 10ea93: e8 cc 06 00 00 call 10f164 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10ea98: 83 c4 10 add $0x10,%esp 10ea9b: 3b 1d 38 9d 12 00 cmp 0x129d38,%ebx 10eaa1: 74 07 je 10eaaa <_Thread_Restart+0x5a> _Thread_Restart_self(); return true; 10eaa3: b0 01 mov $0x1,%al } return false; } 10eaa5: 8b 5d fc mov -0x4(%ebp),%ebx 10eaa8: c9 leave 10eaa9: 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 ) 10eaaa: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10eab1: 74 12 je 10eac5 <_Thread_Restart+0x75> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10eab3: 83 ec 0c sub $0xc,%esp 10eab6: 81 c3 ec 00 00 00 add $0xec,%ebx 10eabc: 53 push %ebx 10eabd: e8 6c 0a 00 00 call 10f52e <_CPU_Context_restore_fp> 10eac2: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10eac5: 83 ec 0c sub $0xc,%esp 10eac8: a1 38 9d 12 00 mov 0x129d38,%eax 10eacd: 05 d4 00 00 00 add $0xd4,%eax 10ead2: 50 push %eax 10ead3: e8 45 0a 00 00 call 10f51d <_CPU_Context_restore> =============================================================================== 0011122c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 11122c: 55 push %ebp 11122d: 89 e5 mov %esp,%ebp 11122f: 53 push %ebx 111230: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 111233: 9c pushf 111234: fa cli 111235: 59 pop %ecx current_state = the_thread->current_state; 111236: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111239: f6 c2 02 test $0x2,%dl 11123c: 74 6e je 1112ac <_Thread_Resume+0x80> <== NEVER TAKEN 11123e: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 111241: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 111244: 85 d2 test %edx,%edx 111246: 75 64 jne 1112ac <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 111248: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 11124e: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111255: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111258: 66 8b 15 20 af 12 00 mov 0x12af20,%dx 11125f: 0b 90 94 00 00 00 or 0x94(%eax),%edx 111265: 66 89 15 20 af 12 00 mov %dx,0x12af20 _Priority_bit_map_Add( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 11126c: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111272: 8d 5a 04 lea 0x4(%edx),%ebx 111275: 89 18 mov %ebx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 111277: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 11127a: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 11127d: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 11127f: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 111282: 51 push %ecx 111283: 9d popf 111284: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111285: 8b 50 14 mov 0x14(%eax),%edx 111288: 8b 1d 3c b4 12 00 mov 0x12b43c,%ebx 11128e: 3b 53 14 cmp 0x14(%ebx),%edx 111291: 73 19 jae 1112ac <_Thread_Resume+0x80> _Thread_Heir = the_thread; 111293: a3 3c b4 12 00 mov %eax,0x12b43c if ( _Thread_Executing->is_preemptible || 111298: a1 38 b4 12 00 mov 0x12b438,%eax 11129d: 80 78 74 00 cmpb $0x0,0x74(%eax) 1112a1: 74 11 je 1112b4 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 1112a3: c6 05 44 b4 12 00 01 movb $0x1,0x12b444 1112aa: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1112ac: 51 push %ecx 1112ad: 9d popf } 1112ae: 5b pop %ebx 1112af: c9 leave 1112b0: c3 ret 1112b1: 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 || 1112b4: 85 d2 test %edx,%edx 1112b6: 74 eb je 1112a3 <_Thread_Resume+0x77> <== NEVER TAKEN 1112b8: eb f2 jmp 1112ac <_Thread_Resume+0x80> =============================================================================== 0010df84 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10df84: 55 push %ebp 10df85: 89 e5 mov %esp,%ebp 10df87: 56 push %esi 10df88: 53 push %ebx 10df89: 8b 45 08 mov 0x8(%ebp),%eax 10df8c: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10df8f: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10df95: 9c pushf 10df96: fa cli 10df97: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10df98: 8b 58 10 mov 0x10(%eax),%ebx 10df9b: 85 db test %ebx,%ebx 10df9d: 75 2d jne 10dfcc <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10df9f: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10dfa2: 8b 5a 08 mov 0x8(%edx),%ebx 10dfa5: 39 1a cmp %ebx,(%edx) 10dfa7: 74 3b je 10dfe4 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dfa9: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10dfab: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10dfae: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10dfb1: 89 1a mov %ebx,(%edx) _Priority_bit_map_Remove( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10dfb3: 51 push %ecx 10dfb4: 9d popf 10dfb5: fa cli if ( _Thread_Is_heir( the_thread ) ) 10dfb6: 3b 05 9c 6a 12 00 cmp 0x126a9c,%eax 10dfbc: 74 66 je 10e024 <_Thread_Set_state+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10dfbe: 3b 05 98 6a 12 00 cmp 0x126a98,%eax 10dfc4: 74 12 je 10dfd8 <_Thread_Set_state+0x54> _Thread_Dispatch_necessary = true; _ISR_Enable( level ); 10dfc6: 51 push %ecx 10dfc7: 9d popf } 10dfc8: 5b pop %ebx 10dfc9: 5e pop %esi 10dfca: c9 leave 10dfcb: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Set ( States_Control states_to_set, States_Control current_state ) { return (current_state | states_to_set); 10dfcc: 09 f3 or %esi,%ebx 10dfce: 89 58 10 mov %ebx,0x10(%eax) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10dfd1: 51 push %ecx 10dfd2: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10dfd3: 5b pop %ebx 10dfd4: 5e pop %esi 10dfd5: c9 leave 10dfd6: c3 ret 10dfd7: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 10dfd8: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 10dfdf: eb e5 jmp 10dfc6 <_Thread_Set_state+0x42> 10dfe1: 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; 10dfe4: 8d 5a 04 lea 0x4(%edx),%ebx 10dfe7: 89 1a mov %ebx,(%edx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dfe9: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10dff0: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10dff3: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 10dff9: 66 8b 13 mov (%ebx),%dx 10dffc: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10e003: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10e006: 66 85 d2 test %dx,%dx 10e009: 75 a8 jne 10dfb3 <_Thread_Set_state+0x2f> _Priority_Major_bit_map &= the_priority_map->block_major; 10e00b: 66 8b 15 80 65 12 00 mov 0x126580,%dx 10e012: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e018: 66 89 15 80 65 12 00 mov %dx,0x126580 10e01f: eb 92 jmp 10dfb3 <_Thread_Set_state+0x2f> 10e021: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10e024: 66 8b 35 80 65 12 00 mov 0x126580,%si 10e02b: 31 d2 xor %edx,%edx 10e02d: 89 d3 mov %edx,%ebx 10e02f: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10e033: 0f b7 db movzwl %bx,%ebx 10e036: 66 8b b4 1b 00 66 12 mov 0x126600(%ebx,%ebx,1),%si 10e03d: 00 10e03e: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 10e042: c1 e3 04 shl $0x4,%ebx 10e045: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 10e048: 8d 14 13 lea (%ebx,%edx,1),%edx 10e04b: 8d 14 52 lea (%edx,%edx,2),%edx 10e04e: c1 e2 02 shl $0x2,%edx 10e051: 03 15 a0 64 12 00 add 0x1264a0,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10e057: 8b 12 mov (%edx),%edx 10e059: 89 15 9c 6a 12 00 mov %edx,0x126a9c 10e05f: e9 5a ff ff ff jmp 10dfbe <_Thread_Set_state+0x3a> =============================================================================== 0010e064 <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10e064: 55 push %ebp 10e065: 89 e5 mov %esp,%ebp 10e067: 56 push %esi 10e068: 53 push %ebx 10e069: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10e06c: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10e072: 9c pushf 10e073: fa cli 10e074: 5b pop %ebx old_state = the_thread->current_state; 10e075: 8b 50 10 mov 0x10(%eax),%edx 10e078: 89 d6 mov %edx,%esi 10e07a: 83 ce 04 or $0x4,%esi 10e07d: 89 70 10 mov %esi,0x10(%eax) the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); if ( _States_Is_ready( old_state ) ) { 10e080: 85 d2 test %edx,%edx 10e082: 75 11 jne 10e095 <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10e084: 8b 51 08 mov 0x8(%ecx),%edx 10e087: 39 11 cmp %edx,(%ecx) 10e089: 74 11 je 10e09c <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e08b: 8b 10 mov (%eax),%edx previous = the_node->previous; 10e08d: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10e090: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10e093: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10e095: 53 push %ebx 10e096: 9d popf } 10e097: 5b pop %ebx 10e098: 5e pop %esi 10e099: c9 leave 10e09a: c3 ret 10e09b: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e09c: 8d 51 04 lea 0x4(%ecx),%edx 10e09f: 89 11 mov %edx,(%ecx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10e0a1: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10e0a8: 89 49 08 mov %ecx,0x8(%ecx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10e0ab: 8b 88 90 00 00 00 mov 0x90(%eax),%ecx 10e0b1: 66 8b 11 mov (%ecx),%dx 10e0b4: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10e0bb: 66 89 11 mov %dx,(%ecx) if ( *the_priority_map->minor == 0 ) 10e0be: 66 85 d2 test %dx,%dx 10e0c1: 75 d2 jne 10e095 <_Thread_Set_transient+0x31> _Priority_Major_bit_map &= the_priority_map->block_major; 10e0c3: 66 8b 15 80 65 12 00 mov 0x126580,%dx 10e0ca: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e0d0: 66 89 15 80 65 12 00 mov %dx,0x126580 10e0d7: eb bc jmp 10e095 <_Thread_Set_transient+0x31> =============================================================================== 0010e0dc <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e0dc: 55 push %ebp 10e0dd: 89 e5 mov %esp,%ebp 10e0df: 53 push %ebx 10e0e0: 83 ec 04 sub $0x4,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10e0e3: a1 10 22 12 00 mov 0x122210,%eax 10e0e8: 8b 5d 0c mov 0xc(%ebp),%ebx 10e0eb: 39 c3 cmp %eax,%ebx 10e0ed: 73 02 jae 10e0f1 <_Thread_Stack_Allocate+0x15> 10e0ef: 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 ) { 10e0f1: a1 40 22 12 00 mov 0x122240,%eax 10e0f6: 85 c0 test %eax,%eax 10e0f8: 74 32 je 10e12c <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e0fa: 83 ec 0c sub $0xc,%esp 10e0fd: 53 push %ebx 10e0fe: ff d0 call *%eax 10e100: 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 ) 10e103: 85 c0 test %eax,%eax 10e105: 74 11 je 10e118 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e107: 8b 55 08 mov 0x8(%ebp),%edx 10e10a: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10e110: 89 d8 mov %ebx,%eax 10e112: 8b 5d fc mov -0x4(%ebp),%ebx 10e115: c9 leave 10e116: c3 ret 10e117: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10e118: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10e11a: 8b 55 08 mov 0x8(%ebp),%edx 10e11d: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10e123: 89 d8 mov %ebx,%eax 10e125: 8b 5d fc mov -0x4(%ebp),%ebx 10e128: c9 leave 10e129: c3 ret 10e12a: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e12c: 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 ); 10e12f: 83 ec 0c sub $0xc,%esp 10e132: 53 push %ebx 10e133: e8 4c 07 00 00 call 10e884 <_Workspace_Allocate> 10e138: 83 c4 10 add $0x10,%esp 10e13b: eb c6 jmp 10e103 <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e140 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e140: 55 push %ebp 10e141: 89 e5 mov %esp,%ebp 10e143: 83 ec 08 sub $0x8,%esp 10e146: 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 ) 10e149: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10e150: 74 16 je 10e168 <_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 ) 10e152: 8b 15 44 22 12 00 mov 0x122244,%edx 10e158: 85 d2 test %edx,%edx 10e15a: 74 10 je 10e16c <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e15c: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e162: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e165: 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 ); 10e166: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e168: c9 leave 10e169: c3 ret 10e16a: 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 ); 10e16c: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e172: 89 45 08 mov %eax,0x8(%ebp) } 10e175: 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 ); 10e176: e9 25 07 00 00 jmp 10e8a0 <_Workspace_Free> =============================================================================== 0010e1d8 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e1d8: 55 push %ebp 10e1d9: 89 e5 mov %esp,%ebp 10e1db: 53 push %ebx 10e1dc: 83 ec 04 sub $0x4,%esp 10e1df: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10e1e2: f6 43 10 01 testb $0x1,0x10(%ebx) 10e1e6: 75 08 jne 10e1f0 <_Thread_Start+0x18> _User_extensions_Thread_start( the_thread ); return true; } return false; 10e1e8: 31 c0 xor %eax,%eax } 10e1ea: 8b 5d fc mov -0x4(%ebp),%ebx 10e1ed: c9 leave 10e1ee: c3 ret 10e1ef: 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; 10e1f0: 8b 45 10 mov 0x10(%ebp),%eax 10e1f3: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10e1f9: 8b 45 0c mov 0xc(%ebp),%eax 10e1fc: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10e202: 8b 45 14 mov 0x14(%ebp),%eax 10e205: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10e20b: 8b 45 18 mov 0x18(%ebp),%eax 10e20e: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e214: 83 ec 0c sub $0xc,%esp 10e217: 53 push %ebx 10e218: e8 13 33 00 00 call 111530 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e21d: 89 1c 24 mov %ebx,(%esp) 10e220: e8 7f 35 00 00 call 1117a4 <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e225: 89 1c 24 mov %ebx,(%esp) 10e228: e8 77 03 00 00 call 10e5a4 <_User_extensions_Thread_start> return true; 10e22d: 83 c4 10 add $0x10,%esp 10e230: b0 01 mov $0x1,%al } return false; } 10e232: 8b 5d fc mov -0x4(%ebp),%ebx 10e235: c9 leave 10e236: c3 ret =============================================================================== 00111848 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 111848: 55 push %ebp 111849: 89 e5 mov %esp,%ebp 11184b: 56 push %esi 11184c: 53 push %ebx 11184d: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 111850: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111856: 9c pushf 111857: fa cli 111858: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 111859: 8b 58 10 mov 0x10(%eax),%ebx 11185c: 85 db test %ebx,%ebx 11185e: 75 34 jne 111894 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 111860: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 111867: 8b 5a 08 mov 0x8(%edx),%ebx 11186a: 39 1a cmp %ebx,(%edx) 11186c: 74 3e je 1118ac <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11186e: 8b 18 mov (%eax),%ebx previous = the_node->previous; 111870: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 111873: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 111876: 89 1a mov %ebx,(%edx) _Priority_bit_map_Remove( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 111878: 51 push %ecx 111879: 9d popf 11187a: fa cli if ( _Thread_Is_heir( the_thread ) ) 11187b: 3b 05 9c 6a 12 00 cmp 0x126a9c,%eax 111881: 74 69 je 1118ec <_Thread_Suspend+0xa4> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 111883: 3b 05 98 6a 12 00 cmp 0x126a98,%eax 111889: 74 15 je 1118a0 <_Thread_Suspend+0x58> _Thread_Dispatch_necessary = true; _ISR_Enable( level ); 11188b: 51 push %ecx 11188c: 9d popf } 11188d: 5b pop %ebx 11188e: 5e pop %esi 11188f: c9 leave 111890: c3 ret 111891: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 111894: 83 cb 02 or $0x2,%ebx 111897: 89 58 10 mov %ebx,0x10(%eax) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 11189a: 51 push %ecx 11189b: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 11189c: 5b pop %ebx 11189d: 5e pop %esi 11189e: c9 leave 11189f: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 1118a0: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 1118a7: eb e2 jmp 11188b <_Thread_Suspend+0x43> 1118a9: 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; 1118ac: 8d 5a 04 lea 0x4(%edx),%ebx 1118af: 89 1a mov %ebx,(%edx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 1118b1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 1118b8: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 1118bb: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 1118c1: 66 8b 13 mov (%ebx),%dx 1118c4: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 1118cb: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 1118ce: 66 85 d2 test %dx,%dx 1118d1: 75 a5 jne 111878 <_Thread_Suspend+0x30> _Priority_Major_bit_map &= the_priority_map->block_major; 1118d3: 66 8b 15 80 65 12 00 mov 0x126580,%dx 1118da: 23 90 98 00 00 00 and 0x98(%eax),%edx 1118e0: 66 89 15 80 65 12 00 mov %dx,0x126580 1118e7: eb 8f jmp 111878 <_Thread_Suspend+0x30> 1118e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 1118ec: 66 8b 35 80 65 12 00 mov 0x126580,%si 1118f3: 31 d2 xor %edx,%edx 1118f5: 89 d3 mov %edx,%ebx 1118f7: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 1118fb: 0f b7 db movzwl %bx,%ebx 1118fe: 66 8b b4 1b 00 66 12 mov 0x126600(%ebx,%ebx,1),%si 111905: 00 111906: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 11190a: c1 e3 04 shl $0x4,%ebx 11190d: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 111910: 8d 14 13 lea (%ebx,%edx,1),%edx 111913: 8d 14 52 lea (%edx,%edx,2),%edx 111916: c1 e2 02 shl $0x2,%edx 111919: 03 15 a0 64 12 00 add 0x1264a0,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 11191f: 8b 12 mov (%edx),%edx 111921: 89 15 9c 6a 12 00 mov %edx,0x126a9c 111927: e9 57 ff ff ff jmp 111883 <_Thread_Suspend+0x3b> =============================================================================== 0010e238 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10e238: 55 push %ebp 10e239: 89 e5 mov %esp,%ebp 10e23b: 53 push %ebx 10e23c: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10e23f: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10e245: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10e249: 74 19 je 10e264 <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10e24b: 8b 43 10 mov 0x10(%ebx),%eax 10e24e: 85 c0 test %eax,%eax 10e250: 75 12 jne 10e264 <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10e252: 8b 43 7c mov 0x7c(%ebx),%eax 10e255: 83 f8 01 cmp $0x1,%eax 10e258: 72 0a jb 10e264 <_Thread_Tickle_timeslice+0x2c> 10e25a: 83 f8 02 cmp $0x2,%eax 10e25d: 76 29 jbe 10e288 <_Thread_Tickle_timeslice+0x50> 10e25f: 83 f8 03 cmp $0x3,%eax 10e262: 74 08 je 10e26c <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10e264: 8b 5d fc mov -0x4(%ebp),%ebx 10e267: c9 leave 10e268: c3 ret 10e269: 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 ) 10e26c: 8b 43 78 mov 0x78(%ebx),%eax 10e26f: 48 dec %eax 10e270: 89 43 78 mov %eax,0x78(%ebx) 10e273: 85 c0 test %eax,%eax 10e275: 75 ed jne 10e264 <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10e277: 83 ec 0c sub $0xc,%esp 10e27a: 53 push %ebx 10e27b: ff 93 80 00 00 00 call *0x80(%ebx) 10e281: 83 c4 10 add $0x10,%esp 10e284: eb de jmp 10e264 <_Thread_Tickle_timeslice+0x2c> 10e286: 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 ) { 10e288: 8b 43 78 mov 0x78(%ebx),%eax 10e28b: 48 dec %eax 10e28c: 89 43 78 mov %eax,0x78(%ebx) 10e28f: 85 c0 test %eax,%eax 10e291: 7f d1 jg 10e264 <_Thread_Tickle_timeslice+0x2c> * at the priority of the currently executing thread, then the * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Thread_Yield_processor(); 10e293: e8 0c 00 00 00 call 10e2a4 <_Thread_Yield_processor> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e298: a1 a4 64 12 00 mov 0x1264a4,%eax 10e29d: 89 43 78 mov %eax,0x78(%ebx) 10e2a0: eb c2 jmp 10e264 <_Thread_Tickle_timeslice+0x2c> =============================================================================== 0010e2a4 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e2a4: 55 push %ebp 10e2a5: 89 e5 mov %esp,%ebp 10e2a7: 57 push %edi 10e2a8: 56 push %esi 10e2a9: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e2aa: a1 98 6a 12 00 mov 0x126a98,%eax ready = executing->ready; 10e2af: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e2b5: 9c pushf 10e2b6: fa cli 10e2b7: 5b pop %ebx } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10e2b8: 8b 4a 08 mov 0x8(%edx),%ecx Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { 10e2bb: 39 0a cmp %ecx,(%edx) 10e2bd: 74 3d je 10e2fc <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e2bf: 8b 38 mov (%eax),%edi previous = the_node->previous; 10e2c1: 8b 70 04 mov 0x4(%eax),%esi next->previous = previous; 10e2c4: 89 77 04 mov %esi,0x4(%edi) previous->next = next; 10e2c7: 89 3e mov %edi,(%esi) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e2c9: 8d 72 04 lea 0x4(%edx),%esi 10e2cc: 89 30 mov %esi,(%eax) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 10e2ce: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e2d1: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10e2d3: 89 48 04 mov %ecx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e2d6: 53 push %ebx 10e2d7: 9d popf 10e2d8: fa cli if ( _Thread_Is_heir( executing ) ) 10e2d9: 3b 05 9c 6a 12 00 cmp 0x126a9c,%eax 10e2df: 74 0f je 10e2f0 <_Thread_Yield_processor+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 10e2e1: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 _ISR_Enable( level ); 10e2e8: 53 push %ebx 10e2e9: 9d popf } 10e2ea: 5b pop %ebx 10e2eb: 5e pop %esi 10e2ec: 5f pop %edi 10e2ed: c9 leave 10e2ee: c3 ret 10e2ef: 90 nop <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e2f0: 8b 02 mov (%edx),%eax 10e2f2: a3 9c 6a 12 00 mov %eax,0x126a9c 10e2f7: eb e8 jmp 10e2e1 <_Thread_Yield_processor+0x3d> 10e2f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e2fc: 3b 05 9c 6a 12 00 cmp 0x126a9c,%eax 10e302: 75 dd jne 10e2e1 <_Thread_Yield_processor+0x3d> 10e304: eb e2 jmp 10e2e8 <_Thread_Yield_processor+0x44> =============================================================================== 0010d158 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10d158: 55 push %ebp 10d159: 89 e5 mov %esp,%ebp 10d15b: 53 push %ebx 10d15c: 83 ec 04 sub $0x4,%esp 10d15f: 8b 5d 0c mov 0xc(%ebp),%ebx 10d162: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10d165: 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 ) ) { 10d16c: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d170: 74 16 je 10d188 <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10d172: 50 push %eax 10d173: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d174: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10d17b: 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 } 10d17e: 8b 5d fc mov -0x4(%ebp),%ebx 10d181: c9 leave 10d182: e9 5d 01 00 00 jmp 10d2e4 <_Thread_Clear_state> 10d187: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d188: 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 ); 10d18f: 50 push %eax 10d190: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d191: 83 ec 0c sub $0xc,%esp 10d194: 8d 43 48 lea 0x48(%ebx),%eax 10d197: 50 push %eax 10d198: e8 bf 15 00 00 call 10e75c <_Watchdog_Remove> 10d19d: 83 c4 10 add $0x10,%esp 10d1a0: eb d2 jmp 10d174 <_Thread_blocking_operation_Cancel+0x1c> =============================================================================== 0010da6c <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10da6c: 55 push %ebp 10da6d: 89 e5 mov %esp,%ebp 10da6f: 53 push %ebx 10da70: 83 ec 04 sub $0x4,%esp 10da73: 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 ) 10da76: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10da7a: 74 1c je 10da98 <_Thread_queue_Dequeue+0x2c> dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; 10da7c: b8 bc 15 11 00 mov $0x1115bc,%eax the_thread = (*dequeue_p)( the_thread_queue ); 10da81: 83 ec 0c sub $0xc,%esp 10da84: 53 push %ebx 10da85: ff d0 call *%eax _ISR_Disable( level ); 10da87: 9c pushf 10da88: fa cli 10da89: 5a pop %edx if ( !the_thread ) { 10da8a: 83 c4 10 add $0x10,%esp 10da8d: 85 c0 test %eax,%eax 10da8f: 74 0f je 10daa0 <_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 ); 10da91: 52 push %edx 10da92: 9d popf return the_thread; } 10da93: 8b 5d fc mov -0x4(%ebp),%ebx 10da96: c9 leave 10da97: c3 ret Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) dequeue_p = _Thread_queue_Dequeue_priority; 10da98: b8 b8 da 10 00 mov $0x10dab8,%eax 10da9d: eb e2 jmp 10da81 <_Thread_queue_Dequeue+0x15> 10da9f: 90 nop <== NOT EXECUTED the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10daa0: 8b 4b 30 mov 0x30(%ebx),%ecx 10daa3: 49 dec %ecx 10daa4: 83 f9 01 cmp $0x1,%ecx 10daa7: 77 e8 ja 10da91 <_Thread_queue_Dequeue+0x25> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10daa9: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10dab0: a1 98 6a 12 00 mov 0x126a98,%eax 10dab5: eb da jmp 10da91 <_Thread_queue_Dequeue+0x25> =============================================================================== 0010dab8 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10dab8: 55 push %ebp 10dab9: 89 e5 mov %esp,%ebp 10dabb: 57 push %edi 10dabc: 56 push %esi 10dabd: 53 push %ebx 10dabe: 83 ec 2c sub $0x2c,%esp 10dac1: 8b 7d 08 mov 0x8(%ebp),%edi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10dac4: 9c pushf 10dac5: fa cli 10dac6: 58 pop %eax 10dac7: 89 f9 mov %edi,%ecx for( index=0 ; 10dac9: 31 d2 xor %edx,%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10dacb: 8b 19 mov (%ecx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dacd: 8d 34 52 lea (%edx,%edx,2),%esi 10dad0: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 10dad4: 39 f3 cmp %esi,%ebx 10dad6: 75 18 jne 10daf0 <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10dad8: 42 inc %edx 10dad9: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10dadc: 83 fa 04 cmp $0x4,%edx 10dadf: 75 ea jne 10dacb <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10dae1: 50 push %eax 10dae2: 9d popf return NULL; 10dae3: 31 f6 xor %esi,%esi #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10dae5: 89 f0 mov %esi,%eax 10dae7: 8d 65 f4 lea -0xc(%ebp),%esp 10daea: 5b pop %ebx 10daeb: 5e pop %esi 10daec: 5f pop %edi 10daed: c9 leave 10daee: c3 ret 10daef: 90 nop <== 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 *) 10daf0: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10daf2: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10daf9: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10dafc: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10dafe: 8b 7b 04 mov 0x4(%ebx),%edi 10db01: 89 7d d4 mov %edi,-0x2c(%ebp) 10db04: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10db07: 39 fa cmp %edi,%edx 10db09: 74 7b je 10db86 <_Thread_queue_Dequeue_priority+0xce> last_node = the_thread->Wait.Block2n.last; 10db0b: 8b 7b 40 mov 0x40(%ebx),%edi 10db0e: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10db11: 8b 3a mov (%edx),%edi 10db13: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10db16: 8b 7d d4 mov -0x2c(%ebp),%edi 10db19: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10db1b: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10db1e: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10db20: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10db23: 3b 55 e4 cmp -0x1c(%ebp),%edx 10db26: 74 17 je 10db3f <_Thread_queue_Dequeue_priority+0x87> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 10db28: 8d 4a 38 lea 0x38(%edx),%ecx 10db2b: 8b 7d e0 mov -0x20(%ebp),%edi 10db2e: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 10db31: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10db34: 8b 4d e4 mov -0x1c(%ebp),%ecx 10db37: 89 4a 40 mov %ecx,0x40(%edx) 10db3a: 83 c2 3c add $0x3c,%edx 10db3d: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10db3f: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10db43: 74 17 je 10db5c <_Thread_queue_Dequeue_priority+0xa4> _ISR_Enable( level ); 10db45: 50 push %eax 10db46: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10db47: 83 ec 08 sub $0x8,%esp 10db4a: 68 f8 ff 03 10 push $0x1003fff8 10db4f: 53 push %ebx 10db50: e8 8f f7 ff ff call 10d2e4 <_Thread_Clear_state> 10db55: 83 c4 10 add $0x10,%esp 10db58: eb 8b jmp 10dae5 <_Thread_queue_Dequeue_priority+0x2d> 10db5a: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10db5c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10db63: 50 push %eax 10db64: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10db65: 83 ec 0c sub $0xc,%esp 10db68: 8d 43 48 lea 0x48(%ebx),%eax 10db6b: 50 push %eax 10db6c: e8 eb 0b 00 00 call 10e75c <_Watchdog_Remove> 10db71: 58 pop %eax 10db72: 5a pop %edx 10db73: 68 f8 ff 03 10 push $0x1003fff8 10db78: 53 push %ebx 10db79: e8 66 f7 ff ff call 10d2e4 <_Thread_Clear_state> 10db7e: 83 c4 10 add $0x10,%esp 10db81: e9 5f ff ff ff jmp 10dae5 <_Thread_queue_Dequeue_priority+0x2d> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10db86: 8b 7d d4 mov -0x2c(%ebp),%edi 10db89: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10db8b: 89 79 04 mov %edi,0x4(%ecx) 10db8e: eb af jmp 10db3f <_Thread_queue_Dequeue_priority+0x87> =============================================================================== 00111634 <_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 ) { 111634: 55 push %ebp 111635: 89 e5 mov %esp,%ebp 111637: 56 push %esi 111638: 53 push %ebx 111639: 8b 55 08 mov 0x8(%ebp),%edx 11163c: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 11163f: 9c pushf 111640: fa cli 111641: 59 pop %ecx sync_state = the_thread_queue->sync_state; 111642: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 111645: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 11164c: 83 f8 01 cmp $0x1,%eax 11164f: 74 0b je 11165c <_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; 111651: 8b 55 10 mov 0x10(%ebp),%edx 111654: 89 0a mov %ecx,(%edx) return sync_state; } 111656: 5b pop %ebx 111657: 5e pop %esi 111658: c9 leave 111659: c3 ret 11165a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11165c: 8d 72 04 lea 0x4(%edx),%esi 11165f: 89 33 mov %esi,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 111661: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 111664: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 111667: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 111669: 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; 11166c: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 11166f: 51 push %ecx 111670: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 111671: 5b pop %ebx 111672: 5e pop %esi 111673: c9 leave 111674: c3 ret =============================================================================== 0010dc28 <_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 ) { 10dc28: 55 push %ebp 10dc29: 89 e5 mov %esp,%ebp 10dc2b: 57 push %edi 10dc2c: 56 push %esi 10dc2d: 53 push %ebx 10dc2e: 83 ec 10 sub $0x10,%esp 10dc31: 8b 7d 0c mov 0xc(%ebp),%edi 10dc34: 8d 47 3c lea 0x3c(%edi),%eax 10dc37: 89 47 38 mov %eax,0x38(%edi) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dc3a: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) Chain_Node *previous_node; Chain_Node *search_node; Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); 10dc41: 8d 47 38 lea 0x38(%edi),%eax 10dc44: 89 47 40 mov %eax,0x40(%edi) priority = the_thread->current_priority; 10dc47: 8b 57 14 mov 0x14(%edi),%edx RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 10dc4a: 89 d0 mov %edx,%eax 10dc4c: c1 e8 06 shr $0x6,%eax header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 10dc4f: 8b 4d 08 mov 0x8(%ebp),%ecx 10dc52: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10dc55: f6 c2 20 test $0x20,%dl 10dc58: 75 66 jne 10dcc0 <_Thread_queue_Enqueue_priority+0x98> goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 10dc5a: 8d 04 40 lea (%eax,%eax,2),%eax 10dc5d: 8d 04 81 lea (%ecx,%eax,4),%eax 10dc60: 89 45 f0 mov %eax,-0x10(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dc63: 83 c0 04 add $0x4,%eax 10dc66: 89 7d e8 mov %edi,-0x18(%ebp) 10dc69: 89 c7 mov %eax,%edi if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10dc6b: 9c pushf 10dc6c: fa cli 10dc6d: 5e pop %esi 10dc6e: 89 75 ec mov %esi,-0x14(%ebp) search_thread = (Thread_Control *) header->first; 10dc71: 8b 4d f0 mov -0x10(%ebp),%ecx 10dc74: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10dc76: 39 f8 cmp %edi,%eax 10dc78: 75 18 jne 10dc92 <_Thread_queue_Enqueue_priority+0x6a> 10dc7a: e9 32 01 00 00 jmp 10ddb1 <_Thread_queue_Enqueue_priority+0x189> 10dc7f: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10dc80: 56 push %esi 10dc81: 9d popf 10dc82: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dc83: 85 58 10 test %ebx,0x10(%eax) 10dc86: 0f 84 d0 00 00 00 je 10dd5c <_Thread_queue_Enqueue_priority+0x134> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10dc8c: 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 ) ) { 10dc8e: 39 f8 cmp %edi,%eax 10dc90: 74 07 je 10dc99 <_Thread_queue_Enqueue_priority+0x71> search_priority = search_thread->current_priority; 10dc92: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10dc95: 39 ca cmp %ecx,%edx 10dc97: 77 e7 ja 10dc80 <_Thread_queue_Enqueue_priority+0x58> 10dc99: 8b 7d e8 mov -0x18(%ebp),%edi 10dc9c: 89 75 f0 mov %esi,-0x10(%ebp) } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10dc9f: 8b 75 08 mov 0x8(%ebp),%esi 10dca2: 8b 5e 30 mov 0x30(%esi),%ebx 10dca5: 83 fb 01 cmp $0x1,%ebx 10dca8: 0f 84 b6 00 00 00 je 10dd64 <_Thread_queue_Enqueue_priority+0x13c> * 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; 10dcae: 8b 45 10 mov 0x10(%ebp),%eax 10dcb1: 8b 55 ec mov -0x14(%ebp),%edx 10dcb4: 89 10 mov %edx,(%eax) return the_thread_queue->sync_state; } 10dcb6: 89 d8 mov %ebx,%eax 10dcb8: 83 c4 10 add $0x10,%esp 10dcbb: 5b pop %ebx 10dcbc: 5e pop %esi 10dcbd: 5f pop %edi 10dcbe: c9 leave 10dcbf: c3 ret _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10dcc0: 8d 04 40 lea (%eax,%eax,2),%eax 10dcc3: 8b 4d 08 mov 0x8(%ebp),%ecx 10dcc6: 8d 34 81 lea (%ecx,%eax,4),%esi restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 10dcc9: 89 75 f0 mov %esi,-0x10(%ebp) 10dccc: 89 75 e4 mov %esi,-0x1c(%ebp) 10dccf: 89 7d e8 mov %edi,-0x18(%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; 10dcd2: 0f b6 0d 14 22 12 00 movzbl 0x122214,%ecx 10dcd9: 41 inc %ecx _ISR_Disable( level ); 10dcda: 9c pushf 10dcdb: fa cli 10dcdc: 5f pop %edi 10dcdd: 89 7d ec mov %edi,-0x14(%ebp) search_thread = (Thread_Control *) header->last; 10dce0: 8b 75 f0 mov -0x10(%ebp),%esi 10dce3: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dce6: 3b 45 e4 cmp -0x1c(%ebp),%eax 10dce9: 74 2b je 10dd16 <_Thread_queue_Enqueue_priority+0xee> search_priority = search_thread->current_priority; 10dceb: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dcee: 39 ca cmp %ecx,%edx 10dcf0: 73 24 jae 10dd16 <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dcf2: 57 push %edi 10dcf3: 9d popf 10dcf4: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dcf5: 85 58 10 test %ebx,0x10(%eax) 10dcf8: 74 59 je 10dd53 <_Thread_queue_Enqueue_priority+0x12b> 10dcfa: 8b 75 e4 mov -0x1c(%ebp),%esi 10dcfd: eb 10 jmp 10dd0f <_Thread_queue_Enqueue_priority+0xe7> 10dcff: 90 nop <== NOT EXECUTED search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 10dd00: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dd03: 39 ca cmp %ecx,%edx 10dd05: 73 0f jae 10dd16 <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dd07: 57 push %edi 10dd08: 9d popf 10dd09: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dd0a: 85 58 10 test %ebx,0x10(%eax) 10dd0d: 74 41 je 10dd50 <_Thread_queue_Enqueue_priority+0x128><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 10dd0f: 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 ) ) { 10dd12: 39 f0 cmp %esi,%eax 10dd14: 75 ea jne 10dd00 <_Thread_queue_Enqueue_priority+0xd8> 10dd16: 89 7d f0 mov %edi,-0x10(%ebp) 10dd19: 8b 7d e8 mov -0x18(%ebp),%edi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10dd1c: 8b 75 08 mov 0x8(%ebp),%esi 10dd1f: 8b 5e 30 mov 0x30(%esi),%ebx 10dd22: 83 fb 01 cmp $0x1,%ebx 10dd25: 75 87 jne 10dcae <_Thread_queue_Enqueue_priority+0x86> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dd27: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dd2e: 39 ca cmp %ecx,%edx 10dd30: 74 5b je 10dd8d <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10dd32: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10dd34: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10dd36: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10dd39: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10dd3b: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10dd3e: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dd41: ff 75 f0 pushl -0x10(%ebp) 10dd44: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dd45: 89 d8 mov %ebx,%eax 10dd47: 83 c4 10 add $0x10,%esp 10dd4a: 5b pop %ebx 10dd4b: 5e pop %esi 10dd4c: 5f pop %edi 10dd4d: c9 leave 10dd4e: c3 ret 10dd4f: 90 nop <== NOT EXECUTED 10dd50: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dd53: 57 push %edi 10dd54: 9d popf goto restart_reverse_search; 10dd55: e9 78 ff ff ff jmp 10dcd2 <_Thread_queue_Enqueue_priority+0xaa> 10dd5a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dd5c: 56 push %esi 10dd5d: 9d popf goto restart_forward_search; 10dd5e: e9 08 ff ff ff jmp 10dc6b <_Thread_queue_Enqueue_priority+0x43> 10dd63: 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; 10dd64: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dd6b: 39 ca cmp %ecx,%edx 10dd6d: 74 1e je 10dd8d <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10dd6f: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dd72: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dd74: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dd77: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dd79: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dd7c: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dd7f: ff 75 f0 pushl -0x10(%ebp) 10dd82: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dd83: 89 d8 mov %ebx,%eax 10dd85: 83 c4 10 add $0x10,%esp 10dd88: 5b pop %ebx 10dd89: 5e pop %esi 10dd8a: 5f pop %edi 10dd8b: c9 leave 10dd8c: c3 ret 10dd8d: 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; 10dd90: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dd93: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dd95: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dd98: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dd9a: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dd9d: 8b 45 08 mov 0x8(%ebp),%eax 10dda0: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dda3: ff 75 ec pushl -0x14(%ebp) 10dda6: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dda7: bb 01 00 00 00 mov $0x1,%ebx 10ddac: e9 05 ff ff ff jmp 10dcb6 <_Thread_queue_Enqueue_priority+0x8e> 10ddb1: 8b 7d e8 mov -0x18(%ebp),%edi 10ddb4: 89 75 f0 mov %esi,-0x10(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 10ddb7: b9 ff ff ff ff mov $0xffffffff,%ecx 10ddbc: e9 de fe ff ff jmp 10dc9f <_Thread_queue_Enqueue_priority+0x77> =============================================================================== 0010db90 <_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 ) { 10db90: 55 push %ebp 10db91: 89 e5 mov %esp,%ebp 10db93: 57 push %edi 10db94: 56 push %esi 10db95: 53 push %ebx 10db96: 83 ec 24 sub $0x24,%esp 10db99: 8b 75 08 mov 0x8(%ebp),%esi 10db9c: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10db9f: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10dba5: ff 76 38 pushl 0x38(%esi) 10dba8: 53 push %ebx 10dba9: e8 d6 03 00 00 call 10df84 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10dbae: 83 c4 10 add $0x10,%esp 10dbb1: 85 ff test %edi,%edi 10dbb3: 75 33 jne 10dbe8 <_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 ) 10dbb5: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dbb9: 74 64 je 10dc1f <_Thread_queue_Enqueue_with_handler+0x8f> enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; 10dbbb: b8 34 16 11 00 mov $0x111634,%eax sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10dbc0: 51 push %ecx 10dbc1: 8d 55 e4 lea -0x1c(%ebp),%edx 10dbc4: 52 push %edx 10dbc5: 53 push %ebx 10dbc6: 56 push %esi 10dbc7: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10dbc9: 83 c4 10 add $0x10,%esp 10dbcc: 83 f8 01 cmp $0x1,%eax 10dbcf: 74 0e je 10dbdf <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10dbd1: 52 push %edx 10dbd2: ff 75 e4 pushl -0x1c(%ebp) 10dbd5: 53 push %ebx 10dbd6: 50 push %eax 10dbd7: e8 7c f5 ff ff call 10d158 <_Thread_blocking_operation_Cancel> 10dbdc: 83 c4 10 add $0x10,%esp } 10dbdf: 8d 65 f4 lea -0xc(%ebp),%esp 10dbe2: 5b pop %ebx 10dbe3: 5e pop %esi 10dbe4: 5f pop %edi 10dbe5: c9 leave 10dbe6: c3 ret 10dbe7: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10dbe8: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dbeb: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10dbf2: 8b 55 10 mov 0x10(%ebp),%edx 10dbf5: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10dbf8: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10dbfb: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10dc02: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10dc05: 83 ec 08 sub $0x8,%esp handler, the_thread->Object.id, NULL ); _Watchdog_Insert_ticks( &the_thread->Timer, timeout ); 10dc08: 8d 43 48 lea 0x48(%ebx),%eax 10dc0b: 50 push %eax 10dc0c: 68 a4 65 12 00 push $0x1265a4 10dc11: e8 0e 0a 00 00 call 10e624 <_Watchdog_Insert> 10dc16: 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 ) 10dc19: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dc1d: 75 9c jne 10dbbb <_Thread_queue_Enqueue_with_handler+0x2b> enqueue_p = _Thread_queue_Enqueue_priority; 10dc1f: b8 28 dc 10 00 mov $0x10dc28,%eax 10dc24: eb 9a jmp 10dbc0 <_Thread_queue_Enqueue_with_handler+0x30> =============================================================================== 00111678 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 111678: 55 push %ebp 111679: 89 e5 mov %esp,%ebp 11167b: 83 ec 08 sub $0x8,%esp 11167e: 8b 45 08 mov 0x8(%ebp),%eax 111681: 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 ) 111684: 83 78 34 01 cmpl $0x1,0x34(%eax) 111688: 74 0e je 111698 <_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 ); 11168a: 89 55 0c mov %edx,0xc(%ebp) 11168d: 89 45 08 mov %eax,0x8(%ebp) } 111690: 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 ); 111691: e9 0e 1b 00 00 jmp 1131a4 <_Thread_queue_Extract_fifo> 111696: 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 ); 111698: 51 push %ecx 111699: 6a 00 push $0x0 11169b: 52 push %edx 11169c: 50 push %eax 11169d: e8 06 00 00 00 call 1116a8 <_Thread_queue_Extract_priority_helper> 1116a2: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 1116a5: c9 leave 1116a6: c3 ret =============================================================================== 001131a4 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 1131a4: 55 push %ebp 1131a5: 89 e5 mov %esp,%ebp 1131a7: 53 push %ebx 1131a8: 83 ec 04 sub $0x4,%esp 1131ab: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 1131ae: 9c pushf 1131af: fa cli 1131b0: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1131b1: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 1131b8: 74 2e je 1131e8 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1131ba: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 1131bc: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 1131bf: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 1131c2: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 1131c4: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 1131cb: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1131cf: 74 1f je 1131f0 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 1131d1: 50 push %eax 1131d2: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1131d3: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 1131da: 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 } 1131dd: 8b 5d fc mov -0x4(%ebp),%ebx 1131e0: c9 leave 1131e1: e9 fe a0 ff ff jmp 10d2e4 <_Thread_Clear_state> 1131e6: 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 ); 1131e8: 50 push %eax 1131e9: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 1131ea: 8b 5d fc mov -0x4(%ebp),%ebx 1131ed: c9 leave 1131ee: c3 ret 1131ef: 90 nop <== NOT EXECUTED 1131f0: 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 ); 1131f7: 50 push %eax 1131f8: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 1131f9: 83 ec 0c sub $0xc,%esp 1131fc: 8d 43 48 lea 0x48(%ebx),%eax 1131ff: 50 push %eax 113200: e8 57 b5 ff ff call 10e75c <_Watchdog_Remove> 113205: 83 c4 10 add $0x10,%esp 113208: eb c9 jmp 1131d3 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 001116a8 <_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 ) { 1116a8: 55 push %ebp 1116a9: 89 e5 mov %esp,%ebp 1116ab: 57 push %edi 1116ac: 56 push %esi 1116ad: 53 push %ebx 1116ae: 83 ec 1c sub $0x1c,%esp 1116b1: 8b 5d 0c mov 0xc(%ebp),%ebx 1116b4: 8a 45 10 mov 0x10(%ebp),%al 1116b7: 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 ); 1116ba: 9c pushf 1116bb: fa cli 1116bc: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1116bf: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 1116c6: 74 68 je 111730 <_Thread_queue_Extract_priority_helper+0x88> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 1116c8: 8b 0b mov (%ebx),%ecx previous_node = the_node->previous; 1116ca: 8b 73 04 mov 0x4(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1116cd: 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; 1116d0: 8d 53 3c lea 0x3c(%ebx),%edx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 1116d3: 39 d0 cmp %edx,%eax 1116d5: 74 65 je 11173c <_Thread_queue_Extract_priority_helper+0x94> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 1116d7: 8b 53 40 mov 0x40(%ebx),%edx new_second_node = new_first_node->next; 1116da: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 1116dc: 89 06 mov %eax,(%esi) next_node->previous = new_first_node; 1116de: 89 41 04 mov %eax,0x4(%ecx) new_first_node->next = next_node; 1116e1: 89 08 mov %ecx,(%eax) new_first_node->previous = previous_node; 1116e3: 89 70 04 mov %esi,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 1116e6: 39 c2 cmp %eax,%edx 1116e8: 74 11 je 1116fb <_Thread_queue_Extract_priority_helper+0x53> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 1116ea: 8d 48 38 lea 0x38(%eax),%ecx 1116ed: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 1116f0: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 1116f3: 89 50 40 mov %edx,0x40(%eax) 1116f6: 83 c0 3c add $0x3c,%eax 1116f9: 89 02 mov %eax,(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 1116fb: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 1116ff: 75 23 jne 111724 <_Thread_queue_Extract_priority_helper+0x7c> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111701: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111705: 74 3d je 111744 <_Thread_queue_Extract_priority_helper+0x9c> _ISR_Enable( level ); 111707: ff 75 e4 pushl -0x1c(%ebp) 11170a: 9d popf 11170b: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111712: 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 } 111715: 8d 65 f4 lea -0xc(%ebp),%esp 111718: 5b pop %ebx 111719: 5e pop %esi 11171a: 5f pop %edi 11171b: c9 leave 11171c: e9 c3 bb ff ff jmp 10d2e4 <_Thread_Clear_state> 111721: 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 ); 111724: ff 75 e4 pushl -0x1c(%ebp) 111727: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111728: 8d 65 f4 lea -0xc(%ebp),%esp 11172b: 5b pop %ebx 11172c: 5e pop %esi 11172d: 5f pop %edi 11172e: c9 leave 11172f: 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 ); 111730: ff 75 e4 pushl -0x1c(%ebp) 111733: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111734: 8d 65 f4 lea -0xc(%ebp),%esp 111737: 5b pop %ebx 111738: 5e pop %esi 111739: 5f pop %edi 11173a: c9 leave 11173b: 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; 11173c: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 11173e: 89 71 04 mov %esi,0x4(%ecx) 111741: eb b8 jmp 1116fb <_Thread_queue_Extract_priority_helper+0x53> 111743: 90 nop <== NOT EXECUTED 111744: 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 ); 11174b: ff 75 e4 pushl -0x1c(%ebp) 11174e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 11174f: 83 ec 0c sub $0xc,%esp 111752: 8d 43 48 lea 0x48(%ebx),%eax 111755: 50 push %eax 111756: e8 01 d0 ff ff call 10e75c <_Watchdog_Remove> 11175b: 83 c4 10 add $0x10,%esp 11175e: eb ab jmp 11170b <_Thread_queue_Extract_priority_helper+0x63> =============================================================================== 0010ddc4 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10ddc4: 55 push %ebp 10ddc5: 89 e5 mov %esp,%ebp 10ddc7: 83 ec 08 sub $0x8,%esp 10ddca: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10ddcd: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10ddd4: 75 06 jne 10dddc <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10ddd6: 31 c0 xor %eax,%eax } 10ddd8: c9 leave 10ddd9: c3 ret 10ddda: 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 ); 10dddc: 83 ec 08 sub $0x8,%esp 10dddf: 50 push %eax 10dde0: ff 70 44 pushl 0x44(%eax) 10dde3: e8 90 38 00 00 call 111678 <_Thread_queue_Extract> return true; 10dde8: 83 c4 10 add $0x10,%esp 10ddeb: b0 01 mov $0x1,%al } return false; } 10dded: c9 leave 10ddee: c3 ret =============================================================================== 0010fc1c <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 10fc1c: 55 push %ebp 10fc1d: 89 e5 mov %esp,%ebp 10fc1f: 83 ec 08 sub $0x8,%esp 10fc22: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10fc25: 83 78 34 01 cmpl $0x1,0x34(%eax) 10fc29: 74 0d je 10fc38 <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 10fc2b: ba f4 35 11 00 mov $0x1135f4,%edx return (*first_p)( the_thread_queue ); 10fc30: 89 45 08 mov %eax,0x8(%ebp) } 10fc33: 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 ); 10fc34: ff e2 jmp *%edx 10fc36: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; 10fc38: ba 44 fc 10 00 mov $0x10fc44,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 10fc3d: 89 45 08 mov %eax,0x8(%ebp) } 10fc40: 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 ); 10fc41: ff e2 jmp *%edx =============================================================================== 001135f4 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1135f4: 55 push %ebp 1135f5: 89 e5 mov %esp,%ebp 1135f7: 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)); 1135fa: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1135fc: 83 c2 04 add $0x4,%edx if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) 1135ff: 39 d0 cmp %edx,%eax 113601: 74 05 je 113608 <_Thread_queue_First_fifo+0x14> return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 113603: c9 leave 113604: c3 ret 113605: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; 113608: 31 c0 xor %eax,%eax } 11360a: c9 leave 11360b: c3 ret =============================================================================== 0010ddf0 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10ddf0: 55 push %ebp 10ddf1: 89 e5 mov %esp,%ebp 10ddf3: 56 push %esi 10ddf4: 53 push %ebx 10ddf5: 8b 5d 08 mov 0x8(%ebp),%ebx 10ddf8: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10ddfb: eb 06 jmp 10de03 <_Thread_queue_Flush+0x13> 10ddfd: 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; 10de00: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10de03: 83 ec 0c sub $0xc,%esp 10de06: 53 push %ebx 10de07: e8 60 fc ff ff call 10da6c <_Thread_queue_Dequeue> 10de0c: 83 c4 10 add $0x10,%esp 10de0f: 85 c0 test %eax,%eax 10de11: 75 ed jne 10de00 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10de13: 8d 65 f8 lea -0x8(%ebp),%esp 10de16: 5b pop %ebx 10de17: 5e pop %esi 10de18: c9 leave 10de19: c3 ret =============================================================================== 0010de1c <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10de1c: 55 push %ebp 10de1d: 89 e5 mov %esp,%ebp 10de1f: 56 push %esi 10de20: 53 push %ebx 10de21: 8b 45 08 mov 0x8(%ebp),%eax 10de24: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10de27: 8b 4d 10 mov 0x10(%ebp),%ecx 10de2a: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10de2d: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10de30: 8b 4d 14 mov 0x14(%ebp),%ecx 10de33: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10de36: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10de3d: 83 fa 01 cmp $0x1,%edx 10de40: 74 16 je 10de58 <_Thread_queue_Initialize+0x3c> 10de42: 8d 50 04 lea 0x4(%eax),%edx 10de45: 89 10 mov %edx,(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10de47: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10de4e: 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 ); } } 10de51: 5b pop %ebx 10de52: 5e pop %esi 10de53: c9 leave 10de54: c3 ret 10de55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10de58: 89 c1 mov %eax,%ecx 10de5a: 30 d2 xor %dl,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10de5c: 8d 1c 52 lea (%edx,%edx,2),%ebx 10de5f: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10de62: 8d 73 04 lea 0x4(%ebx),%esi 10de65: 89 31 mov %esi,(%ecx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10de67: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 10de6e: 89 59 08 mov %ebx,0x8(%ecx) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 10de71: 42 inc %edx 10de72: 83 c1 0c add $0xc,%ecx the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 10de75: 83 fa 04 cmp $0x4,%edx 10de78: 75 e2 jne 10de5c <_Thread_queue_Initialize+0x40> _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10de7a: 5b pop %ebx 10de7b: 5e pop %esi 10de7c: c9 leave 10de7d: c3 ret =============================================================================== 00111760 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 111760: 55 push %ebp 111761: 89 e5 mov %esp,%ebp 111763: 83 ec 08 sub $0x8,%esp 111766: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 111769: 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 && 11176c: 8b 4a 30 mov 0x30(%edx),%ecx 11176f: 85 c9 test %ecx,%ecx 111771: 74 08 je 11177b <_Thread_queue_Process_timeout+0x1b> 111773: 3b 05 98 6a 12 00 cmp 0x126a98,%eax 111779: 74 15 je 111790 <_Thread_queue_Process_timeout+0x30><== ALWAYS TAKEN 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; 11177b: 8b 4a 3c mov 0x3c(%edx),%ecx 11177e: 89 48 34 mov %ecx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 111781: 83 ec 08 sub $0x8,%esp 111784: 50 push %eax 111785: 52 push %edx 111786: e8 ed fe ff ff call 111678 <_Thread_queue_Extract> 11178b: 83 c4 10 add $0x10,%esp } } 11178e: c9 leave 11178f: c3 ret * 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 ) { 111790: 83 f9 03 cmp $0x3,%ecx 111793: 74 f9 je 11178e <_Thread_queue_Process_timeout+0x2e> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111795: 8b 4a 3c mov 0x3c(%edx),%ecx 111798: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 11179b: 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 ); } } 1117a2: c9 leave 1117a3: c3 ret =============================================================================== 0010de80 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10de80: 55 push %ebp 10de81: 89 e5 mov %esp,%ebp 10de83: 57 push %edi 10de84: 56 push %esi 10de85: 53 push %ebx 10de86: 83 ec 1c sub $0x1c,%esp 10de89: 8b 75 08 mov 0x8(%ebp),%esi 10de8c: 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 ) 10de8f: 85 f6 test %esi,%esi 10de91: 74 06 je 10de99 <_Thread_queue_Requeue+0x19><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10de93: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10de97: 74 0b je 10dea4 <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10de99: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10de9c: 5b pop %ebx <== NOT EXECUTED 10de9d: 5e pop %esi <== NOT EXECUTED 10de9e: 5f pop %edi <== NOT EXECUTED 10de9f: c9 leave <== NOT EXECUTED 10dea0: c3 ret <== NOT EXECUTED 10dea1: 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 ); 10dea4: 9c pushf 10dea5: fa cli 10dea6: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10dea7: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10deae: 75 0c jne 10debc <_Thread_queue_Requeue+0x3c><== ALWAYS 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 ); 10deb0: 53 push %ebx 10deb1: 9d popf } } 10deb2: 8d 65 f4 lea -0xc(%ebp),%esp 10deb5: 5b pop %ebx 10deb6: 5e pop %esi 10deb7: 5f pop %edi 10deb8: c9 leave 10deb9: c3 ret 10deba: 66 90 xchg %ax,%ax <== 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; 10debc: 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 ); 10dec3: 50 push %eax 10dec4: 6a 01 push $0x1 10dec6: 57 push %edi 10dec7: 56 push %esi 10dec8: e8 db 37 00 00 call 1116a8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10decd: 83 c4 0c add $0xc,%esp 10ded0: 8d 45 e4 lea -0x1c(%ebp),%eax 10ded3: 50 push %eax 10ded4: 57 push %edi 10ded5: 56 push %esi 10ded6: e8 4d fd ff ff call 10dc28 <_Thread_queue_Enqueue_priority> 10dedb: 83 c4 10 add $0x10,%esp 10dede: eb d0 jmp 10deb0 <_Thread_queue_Requeue+0x30> =============================================================================== 0010dee0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10dee0: 55 push %ebp 10dee1: 89 e5 mov %esp,%ebp 10dee3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10dee6: 8d 45 f4 lea -0xc(%ebp),%eax 10dee9: 50 push %eax 10deea: ff 75 08 pushl 0x8(%ebp) 10deed: e8 da f7 ff ff call 10d6cc <_Thread_Get> switch ( location ) { 10def2: 83 c4 10 add $0x10,%esp 10def5: 8b 55 f4 mov -0xc(%ebp),%edx 10def8: 85 d2 test %edx,%edx 10defa: 75 17 jne 10df13 <_Thread_queue_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10defc: 83 ec 0c sub $0xc,%esp 10deff: 50 push %eax 10df00: e8 5b 38 00 00 call 111760 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10df05: a1 d4 64 12 00 mov 0x1264d4,%eax 10df0a: 48 dec %eax 10df0b: a3 d4 64 12 00 mov %eax,0x1264d4 10df10: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10df13: c9 leave 10df14: c3 ret =============================================================================== 00118d94 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118d94: 55 push %ebp 118d95: 89 e5 mov %esp,%ebp 118d97: 57 push %edi 118d98: 56 push %esi 118d99: 53 push %ebx 118d9a: 83 ec 4c sub $0x4c,%esp 118d9d: 8b 5d 08 mov 0x8(%ebp),%ebx 118da0: 8d 45 e0 lea -0x20(%ebp),%eax 118da3: 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); 118da6: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118da9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) Timer_server_Control *ts = (Timer_server_Control *) arg; Chain_Control insert_chain; Chain_Control fire_chain; _Chain_Initialize_empty( &insert_chain ); 118db0: 8d 4d dc lea -0x24(%ebp),%ecx 118db3: 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; 118db6: 8d 7d d0 lea -0x30(%ebp),%edi 118db9: 8d 45 d4 lea -0x2c(%ebp),%eax 118dbc: 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); 118dbf: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118dc2: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118dc9: 89 7d d8 mov %edi,-0x28(%ebp) 118dcc: 8d 73 30 lea 0x30(%ebx),%esi 118dcf: 8d 4b 68 lea 0x68(%ebx),%ecx 118dd2: 89 4d c4 mov %ecx,-0x3c(%ebp) 118dd5: 8d 43 08 lea 0x8(%ebx),%eax 118dd8: 89 45 c0 mov %eax,-0x40(%ebp) 118ddb: 8d 53 40 lea 0x40(%ebx),%edx 118dde: 89 55 bc mov %edx,-0x44(%ebp) 118de1: 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; 118de4: 8d 4d dc lea -0x24(%ebp),%ecx 118de7: 89 4b 78 mov %ecx,0x78(%ebx) 118dea: 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; 118dec: a1 64 22 14 00 mov 0x142264,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118df1: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118df4: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118df7: 51 push %ecx 118df8: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118df9: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118dfb: 50 push %eax 118dfc: 56 push %esi 118dfd: e8 86 3f 00 00 call 11cd88 <_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(); 118e02: a1 a8 21 14 00 mov 0x1421a8,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118e07: 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 ) { 118e0a: 83 c4 10 add $0x10,%esp 118e0d: 39 d0 cmp %edx,%eax 118e0f: 77 63 ja 118e74 <_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 ) { 118e11: 72 7d jb 118e90 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118e13: 89 43 74 mov %eax,0x74(%ebx) 118e16: 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 ); 118e18: 8b 43 78 mov 0x78(%ebx),%eax 118e1b: 83 ec 0c sub $0xc,%esp 118e1e: 50 push %eax 118e1f: e8 ec 09 00 00 call 119810 <_Chain_Get> if ( timer == NULL ) { 118e24: 83 c4 10 add $0x10,%esp 118e27: 85 c0 test %eax,%eax 118e29: 74 35 je 118e60 <_Timer_server_Body+0xcc><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118e2b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118e2e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118e31: 74 19 je 118e4c <_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 ) { 118e33: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118e36: 75 e0 jne 118e18 <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118e38: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e3b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e3e: 50 push %eax <== NOT EXECUTED 118e3f: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118e42: e8 cd 3f 00 00 call 11ce14 <_Watchdog_Insert> <== NOT EXECUTED 118e47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e4a: eb cc jmp 118e18 <_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 ); 118e4c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e4f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e52: 50 push %eax <== NOT EXECUTED 118e53: 56 push %esi <== NOT EXECUTED 118e54: e8 bb 3f 00 00 call 11ce14 <_Watchdog_Insert> <== NOT EXECUTED 118e59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e5c: eb ba jmp 118e18 <_Timer_server_Body+0x84><== NOT EXECUTED 118e5e: 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 ); 118e60: 9c pushf 118e61: fa cli 118e62: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118e63: 8b 55 b4 mov -0x4c(%ebp),%edx 118e66: 3b 55 dc cmp -0x24(%ebp),%edx 118e69: 74 41 je 118eac <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118e6b: 50 push %eax <== NOT EXECUTED 118e6c: 9d popf <== NOT EXECUTED 118e6d: e9 7a ff ff ff jmp 118dec <_Timer_server_Body+0x58><== NOT EXECUTED 118e72: 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 ); 118e74: 51 push %ecx 118e75: 57 push %edi if ( snapshot > last_snapshot ) { /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; 118e76: 89 c1 mov %eax,%ecx 118e78: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118e7a: 51 push %ecx 118e7b: ff 75 c4 pushl -0x3c(%ebp) 118e7e: 89 45 b8 mov %eax,-0x48(%ebp) 118e81: e8 02 3f 00 00 call 11cd88 <_Watchdog_Adjust_to_chain> 118e86: 83 c4 10 add $0x10,%esp 118e89: 8b 45 b8 mov -0x48(%ebp),%eax 118e8c: eb 85 jmp 118e13 <_Timer_server_Body+0x7f> 118e8e: 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 ); 118e90: 51 push %ecx } else if ( snapshot < last_snapshot ) { /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; 118e91: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118e93: 52 push %edx 118e94: 6a 01 push $0x1 118e96: ff 75 c4 pushl -0x3c(%ebp) 118e99: 89 45 b8 mov %eax,-0x48(%ebp) 118e9c: e8 6f 3e 00 00 call 11cd10 <_Watchdog_Adjust> 118ea1: 83 c4 10 add $0x10,%esp 118ea4: 8b 45 b8 mov -0x48(%ebp),%eax 118ea7: e9 67 ff ff ff jmp 118e13 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118eac: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118eb3: 50 push %eax 118eb4: 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 ) ) { 118eb5: 8b 4d b0 mov -0x50(%ebp),%ecx 118eb8: 3b 4d d0 cmp -0x30(%ebp),%ecx 118ebb: 75 23 jne 118ee0 <_Timer_server_Body+0x14c> 118ebd: eb 33 jmp 118ef2 <_Timer_server_Body+0x15e> 118ebf: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 118ec0: 8b 10 mov (%eax),%edx the_chain->first = new_first; 118ec2: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 118ec5: 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; 118ec8: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 118ecf: 51 push %ecx 118ed0: 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 ); 118ed1: 83 ec 08 sub $0x8,%esp 118ed4: ff 70 24 pushl 0x24(%eax) 118ed7: ff 70 20 pushl 0x20(%eax) 118eda: ff 50 1c call *0x1c(%eax) } 118edd: 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 ); 118ee0: 9c pushf 118ee1: fa cli 118ee2: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118ee3: 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)) 118ee6: 39 45 b0 cmp %eax,-0x50(%ebp) 118ee9: 75 d5 jne 118ec0 <_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 ); 118eeb: 51 push %ecx 118eec: 9d popf 118eed: e9 f2 fe ff ff jmp 118de4 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 118ef2: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118ef6: a1 14 21 14 00 mov 0x142114,%eax 118efb: 40 inc %eax 118efc: a3 14 21 14 00 mov %eax,0x142114 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 118f01: 83 ec 08 sub $0x8,%esp 118f04: 6a 08 push $0x8 118f06: ff 33 pushl (%ebx) 118f08: e8 f7 35 00 00 call 11c504 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118f0d: 89 d8 mov %ebx,%eax 118f0f: e8 e0 fd ff ff call 118cf4 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 118f14: 89 d8 mov %ebx,%eax 118f16: e8 29 fe ff ff call 118d44 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 118f1b: e8 f0 2b 00 00 call 11bb10 <_Thread_Enable_dispatch> ts->active = true; 118f20: 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 ); 118f24: 5a pop %edx 118f25: ff 75 c0 pushl -0x40(%ebp) 118f28: e8 1f 40 00 00 call 11cf4c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118f2d: 58 pop %eax 118f2e: ff 75 bc pushl -0x44(%ebp) 118f31: e8 16 40 00 00 call 11cf4c <_Watchdog_Remove> 118f36: 83 c4 10 add $0x10,%esp 118f39: e9 a6 fe ff ff jmp 118de4 <_Timer_server_Body+0x50> =============================================================================== 00118cf4 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118cf4: 55 push %ebp 118cf5: 89 e5 mov %esp,%ebp 118cf7: 56 push %esi 118cf8: 53 push %ebx 118cf9: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118cfb: 8d 70 08 lea 0x8(%eax),%esi 118cfe: 83 ec 0c sub $0xc,%esp 118d01: 56 push %esi 118d02: e8 45 42 00 00 call 11cf4c <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118d07: 9c pushf 118d08: fa cli 118d09: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d0a: 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; 118d0d: 8d 53 34 lea 0x34(%ebx),%edx if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 118d10: 83 c4 10 add $0x10,%esp 118d13: 39 d0 cmp %edx,%eax 118d15: 74 21 je 118d38 <_Timer_server_Reset_interval_system_watchdog+0x44> Watchdog_Interval delta_interval = 118d17: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118d1a: 51 push %ecx 118d1b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118d1c: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118d1f: 83 ec 08 sub $0x8,%esp 118d22: 56 push %esi 118d23: 68 e4 21 14 00 push $0x1421e4 118d28: e8 e7 40 00 00 call 11ce14 <_Watchdog_Insert> 118d2d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118d30: 8d 65 f8 lea -0x8(%ebp),%esp 118d33: 5b pop %ebx 118d34: 5e pop %esi 118d35: c9 leave 118d36: c3 ret 118d37: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118d38: 51 push %ecx 118d39: 9d popf } } 118d3a: 8d 65 f8 lea -0x8(%ebp),%esp 118d3d: 5b pop %ebx 118d3e: 5e pop %esi 118d3f: c9 leave 118d40: c3 ret =============================================================================== 00118d44 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118d44: 55 push %ebp 118d45: 89 e5 mov %esp,%ebp 118d47: 56 push %esi 118d48: 53 push %ebx 118d49: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118d4b: 8d 70 40 lea 0x40(%eax),%esi 118d4e: 83 ec 0c sub $0xc,%esp 118d51: 56 push %esi 118d52: e8 f5 41 00 00 call 11cf4c <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118d57: 9c pushf 118d58: fa cli 118d59: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d5a: 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; 118d5d: 8d 53 6c lea 0x6c(%ebx),%edx if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118d60: 83 c4 10 add $0x10,%esp 118d63: 39 d0 cmp %edx,%eax 118d65: 74 21 je 118d88 <_Timer_server_Reset_tod_system_watchdog+0x44> Watchdog_Interval delta_interval = 118d67: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118d6a: 51 push %ecx 118d6b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118d6c: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118d6f: 83 ec 08 sub $0x8,%esp 118d72: 56 push %esi 118d73: 68 d8 21 14 00 push $0x1421d8 118d78: e8 97 40 00 00 call 11ce14 <_Watchdog_Insert> 118d7d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118d80: 8d 65 f8 lea -0x8(%ebp),%esp 118d83: 5b pop %ebx 118d84: 5e pop %esi 118d85: c9 leave 118d86: c3 ret 118d87: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118d88: 51 push %ecx 118d89: 9d popf } } 118d8a: 8d 65 f8 lea -0x8(%ebp),%esp 118d8d: 5b pop %ebx 118d8e: 5e pop %esi 118d8f: c9 leave 118d90: c3 ret =============================================================================== 00118f40 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 118f40: 55 push %ebp 118f41: 89 e5 mov %esp,%ebp 118f43: 57 push %edi 118f44: 56 push %esi 118f45: 53 push %ebx 118f46: 83 ec 2c sub $0x2c,%esp 118f49: 8b 5d 08 mov 0x8(%ebp),%ebx 118f4c: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 118f4f: 8b 53 78 mov 0x78(%ebx),%edx 118f52: 85 d2 test %edx,%edx 118f54: 74 16 je 118f6c <_Timer_server_Schedule_operation_method+0x2c><== ALWAYS 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 ); 118f56: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 118f59: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 118f5c: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 118f5f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118f62: 5b pop %ebx <== NOT EXECUTED 118f63: 5e pop %esi <== NOT EXECUTED 118f64: 5f pop %edi <== NOT EXECUTED 118f65: 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 ); 118f66: e9 69 08 00 00 jmp 1197d4 <_Chain_Append> <== NOT EXECUTED 118f6b: 90 nop <== NOT EXECUTED 118f6c: 8b 15 14 21 14 00 mov 0x142114,%edx 118f72: 42 inc %edx 118f73: 89 15 14 21 14 00 mov %edx,0x142114 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118f79: 8b 50 38 mov 0x38(%eax),%edx 118f7c: 83 fa 01 cmp $0x1,%edx 118f7f: 74 7b je 118ffc <_Timer_server_Schedule_operation_method+0xbc> _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 ) { 118f81: 83 fa 03 cmp $0x3,%edx 118f84: 74 0e je 118f94 <_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 ); } } 118f86: 8d 65 f4 lea -0xc(%ebp),%esp 118f89: 5b pop %ebx 118f8a: 5e pop %esi 118f8b: 5f pop %edi 118f8c: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 118f8d: e9 7e 2b 00 00 jmp 11bb10 <_Thread_Enable_dispatch> 118f92: 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 ); 118f94: 9c pushf 118f95: fa cli 118f96: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118f99: 8b 0d a8 21 14 00 mov 0x1421a8,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 118f9f: 8b 53 74 mov 0x74(%ebx),%edx 118fa2: 89 55 d4 mov %edx,-0x2c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118fa5: 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; 118fa8: 8d 7b 6c lea 0x6c(%ebx),%edi if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118fab: 39 fa cmp %edi,%edx 118fad: 74 21 je 118fd0 <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 118faf: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 118fb2: 3b 4d d4 cmp -0x2c(%ebp),%ecx 118fb5: 0f 86 a1 00 00 00 jbe 11905c <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118fbb: 89 ce mov %ecx,%esi 118fbd: 2b 75 d4 sub -0x2c(%ebp),%esi 118fc0: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 118fc3: 39 f7 cmp %esi,%edi 118fc5: 0f 86 9b 00 00 00 jbe 119066 <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 118fcb: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 118fcd: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 118fd0: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 118fd3: ff 75 e4 pushl -0x1c(%ebp) 118fd6: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118fd7: 83 ec 08 sub $0x8,%esp 118fda: 83 c0 10 add $0x10,%eax 118fdd: 50 push %eax 118fde: 8d 43 68 lea 0x68(%ebx),%eax 118fe1: 50 push %eax 118fe2: e8 2d 3e 00 00 call 11ce14 <_Watchdog_Insert> if ( !ts->active ) { 118fe7: 8a 43 7c mov 0x7c(%ebx),%al 118fea: 83 c4 10 add $0x10,%esp 118fed: 84 c0 test %al,%al 118fef: 75 95 jne 118f86 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 118ff1: 89 d8 mov %ebx,%eax 118ff3: e8 4c fd ff ff call 118d44 <_Timer_server_Reset_tod_system_watchdog> 118ff8: eb 8c jmp 118f86 <_Timer_server_Schedule_operation_method+0x46> 118ffa: 66 90 xchg %ax,%ax <== NOT EXECUTED 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 ); 118ffc: 9c pushf 118ffd: fa cli 118ffe: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119001: 8b 0d 64 22 14 00 mov 0x142264,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119007: 8b 7b 3c mov 0x3c(%ebx),%edi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11900a: 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; 11900d: 8d 73 34 lea 0x34(%ebx),%esi if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 119010: 39 f2 cmp %esi,%edx 119012: 74 10 je 119024 <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119014: 89 ce mov %ecx,%esi 119016: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 119018: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 11901b: 39 fe cmp %edi,%esi 11901d: 73 39 jae 119058 <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 11901f: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119021: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119024: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119027: ff 75 e4 pushl -0x1c(%ebp) 11902a: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11902b: 83 ec 08 sub $0x8,%esp 11902e: 83 c0 10 add $0x10,%eax 119031: 50 push %eax 119032: 8d 43 30 lea 0x30(%ebx),%eax 119035: 50 push %eax 119036: e8 d9 3d 00 00 call 11ce14 <_Watchdog_Insert> if ( !ts->active ) { 11903b: 8a 43 7c mov 0x7c(%ebx),%al 11903e: 83 c4 10 add $0x10,%esp 119041: 84 c0 test %al,%al 119043: 0f 85 3d ff ff ff jne 118f86 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119049: 89 d8 mov %ebx,%eax 11904b: e8 a4 fc ff ff call 118cf4 <_Timer_server_Reset_interval_system_watchdog> 119050: e9 31 ff ff ff jmp 118f86 <_Timer_server_Schedule_operation_method+0x46> 119055: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 119058: 31 ff xor %edi,%edi 11905a: eb c5 jmp 119021 <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 11905c: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 11905f: 29 cf sub %ecx,%edi 119061: e9 67 ff ff ff jmp 118fcd <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 119066: 31 ff xor %edi,%edi <== NOT EXECUTED 119068: e9 60 ff ff ff jmp 118fcd <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010fc24 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10fc24: 55 push %ebp 10fc25: 89 e5 mov %esp,%ebp 10fc27: 57 push %edi 10fc28: 56 push %esi 10fc29: 53 push %ebx 10fc2a: 83 ec 2c sub $0x2c,%esp 10fc2d: 8b 45 08 mov 0x8(%ebp),%eax 10fc30: 8b 4d 0c mov 0xc(%ebp),%ecx /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fc33: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10fc35: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fc38: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10fc3d: 8b 01 mov (%ecx),%eax 10fc3f: f7 eb imul %ebx 10fc41: 89 45 e0 mov %eax,-0x20(%ebp) 10fc44: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10fc47: 8b 41 04 mov 0x4(%ecx),%eax 10fc4a: 99 cltd 10fc4b: 01 45 e0 add %eax,-0x20(%ebp) 10fc4e: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10fc51: 8b 55 e4 mov -0x1c(%ebp),%edx 10fc54: 0b 55 e0 or -0x20(%ebp),%edx 10fc57: 74 73 je 10fccc <_Timespec_Divide+0xa8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fc59: 89 f8 mov %edi,%eax 10fc5b: f7 eb imul %ebx 10fc5d: 89 45 d0 mov %eax,-0x30(%ebp) 10fc60: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10fc63: 89 f7 mov %esi,%edi 10fc65: c1 ff 1f sar $0x1f,%edi 10fc68: 01 75 d0 add %esi,-0x30(%ebp) 10fc6b: 11 7d d4 adc %edi,-0x2c(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10fc6e: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10fc75: bb a0 86 01 00 mov $0x186a0,%ebx 10fc7a: 8b 45 d0 mov -0x30(%ebp),%eax 10fc7d: f7 e3 mul %ebx 10fc7f: 8d 34 11 lea (%ecx,%edx,1),%esi 10fc82: ff 75 e4 pushl -0x1c(%ebp) 10fc85: ff 75 e0 pushl -0x20(%ebp) 10fc88: 56 push %esi 10fc89: 50 push %eax 10fc8a: e8 cd 09 01 00 call 12065c <__udivdi3> 10fc8f: 83 c4 10 add $0x10,%esp 10fc92: 89 c3 mov %eax,%ebx 10fc94: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fc96: 6a 00 push $0x0 10fc98: 68 e8 03 00 00 push $0x3e8 10fc9d: 52 push %edx 10fc9e: 50 push %eax 10fc9f: e8 b8 09 01 00 call 12065c <__udivdi3> 10fca4: 83 c4 10 add $0x10,%esp 10fca7: 8b 55 10 mov 0x10(%ebp),%edx 10fcaa: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fcac: 6a 00 push $0x0 10fcae: 68 e8 03 00 00 push $0x3e8 10fcb3: 56 push %esi 10fcb4: 53 push %ebx 10fcb5: e8 b2 0a 01 00 call 12076c <__umoddi3> 10fcba: 83 c4 10 add $0x10,%esp 10fcbd: 8b 55 14 mov 0x14(%ebp),%edx 10fcc0: 89 02 mov %eax,(%edx) } 10fcc2: 8d 65 f4 lea -0xc(%ebp),%esp 10fcc5: 5b pop %ebx 10fcc6: 5e pop %esi 10fcc7: 5f pop %edi 10fcc8: c9 leave 10fcc9: c3 ret 10fcca: 66 90 xchg %ax,%ax <== 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; 10fccc: 8b 45 10 mov 0x10(%ebp),%eax 10fccf: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fcd5: 8b 55 14 mov 0x14(%ebp),%edx 10fcd8: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fcde: 8d 65 f4 lea -0xc(%ebp),%esp 10fce1: 5b pop %ebx 10fce2: 5e pop %esi 10fce3: 5f pop %edi 10fce4: c9 leave 10fce5: c3 ret =============================================================================== 0011f6f0 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 11f6f0: 55 push %ebp 11f6f1: 89 e5 mov %esp,%ebp 11f6f3: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 11f6f6: 85 c0 test %eax,%eax 11f6f8: 74 1a je 11f714 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 11f6fa: 8b 10 mov (%eax),%edx 11f6fc: 85 d2 test %edx,%edx 11f6fe: 78 14 js 11f714 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 11f700: 8b 40 04 mov 0x4(%eax),%eax 11f703: 85 c0 test %eax,%eax 11f705: 78 0d js 11f714 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 11f707: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 11f70c: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 11f70f: c9 leave 11f710: c3 ret 11f711: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 11f714: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 11f716: c9 leave 11f717: c3 ret =============================================================================== 0010e344 <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10e344: 55 push %ebp 10e345: 89 e5 mov %esp,%ebp 10e347: 56 push %esi 10e348: 53 push %ebx 10e349: 8b 5d 08 mov 0x8(%ebp),%ebx 10e34c: 8b 75 0c mov 0xc(%ebp),%esi 10e34f: 8b 45 10 mov 0x10(%ebp),%eax if (end->tv_nsec < start->tv_nsec) { 10e352: 8b 4e 04 mov 0x4(%esi),%ecx 10e355: 8b 53 04 mov 0x4(%ebx),%edx 10e358: 39 d1 cmp %edx,%ecx 10e35a: 7c 10 jl 10e36c <_Timespec_Subtract+0x28> result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 10e35c: 8b 36 mov (%esi),%esi 10e35e: 2b 33 sub (%ebx),%esi 10e360: 89 30 mov %esi,(%eax) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10e362: 29 d1 sub %edx,%ecx 10e364: 89 48 04 mov %ecx,0x4(%eax) } } 10e367: 5b pop %ebx 10e368: 5e pop %esi 10e369: c9 leave 10e36a: c3 ret 10e36b: 90 nop <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 10e36c: 8b 36 mov (%esi),%esi 10e36e: 4e dec %esi 10e36f: 2b 33 sub (%ebx),%esi 10e371: 89 30 mov %esi,(%eax) result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 10e373: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10e379: 29 d1 sub %edx,%ecx 10e37b: 89 48 04 mov %ecx,0x4(%eax) } else { result->tv_sec = end->tv_sec - start->tv_sec; result->tv_nsec = end->tv_nsec - start->tv_nsec; } } 10e37e: 5b pop %ebx 10e37f: 5e pop %esi 10e380: c9 leave 10e381: c3 ret =============================================================================== 0011192c <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 11192c: 55 push %ebp 11192d: 89 e5 mov %esp,%ebp 11192f: 56 push %esi 111930: 53 push %ebx 111931: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 111934: 8b 33 mov (%ebx),%esi 111936: 85 f6 test %esi,%esi 111938: 75 07 jne 111941 <_Timespec_To_ticks+0x15> 11193a: 8b 43 04 mov 0x4(%ebx),%eax 11193d: 85 c0 test %eax,%eax 11193f: 74 37 je 111978 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 111941: e8 76 17 00 00 call 1130bc 111946: 89 c1 mov %eax,%ecx 111948: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 11194b: a1 2c 22 12 00 mov 0x12222c,%eax 111950: 8d 04 80 lea (%eax,%eax,4),%eax 111953: 8d 04 80 lea (%eax,%eax,4),%eax 111956: 8d 34 80 lea (%eax,%eax,4),%esi 111959: c1 e6 03 shl $0x3,%esi 11195c: 8b 43 04 mov 0x4(%ebx),%eax 11195f: 31 d2 xor %edx,%edx 111961: f7 f6 div %esi if (ticks) 111963: 01 c8 add %ecx,%eax 111965: 74 05 je 11196c <_Timespec_To_ticks+0x40> return ticks; return 1; } 111967: 5b pop %ebx 111968: 5e pop %esi 111969: c9 leave 11196a: c3 ret 11196b: 90 nop <== NOT EXECUTED ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 11196c: b8 01 00 00 00 mov $0x1,%eax } 111971: 5b pop %ebx 111972: 5e pop %esi 111973: c9 leave 111974: c3 ret 111975: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 111978: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 11197a: 5b pop %ebx 11197b: 5e pop %esi 11197c: c9 leave 11197d: c3 ret =============================================================================== 0010e4c0 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e4c0: 55 push %ebp 10e4c1: 89 e5 mov %esp,%ebp 10e4c3: 57 push %edi 10e4c4: 56 push %esi 10e4c5: 53 push %ebx 10e4c6: 83 ec 1c sub $0x1c,%esp 10e4c9: 8b 75 08 mov 0x8(%ebp),%esi 10e4cc: 8b 7d 10 mov 0x10(%ebp),%edi 10e4cf: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e4d2: 8b 1d 14 67 12 00 mov 0x126714,%ebx 10e4d8: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e4de: 74 25 je 10e505 <_User_extensions_Fatal+0x45><== NEVER 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 ); 10e4e0: 0f b6 c0 movzbl %al,%eax 10e4e3: 89 45 e4 mov %eax,-0x1c(%ebp) 10e4e6: 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 ) 10e4e8: 8b 43 30 mov 0x30(%ebx),%eax 10e4eb: 85 c0 test %eax,%eax 10e4ed: 74 0b je 10e4fa <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e4ef: 52 push %edx 10e4f0: 57 push %edi 10e4f1: ff 75 e4 pushl -0x1c(%ebp) 10e4f4: 56 push %esi 10e4f5: ff d0 call *%eax 10e4f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e4fa: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e4fd: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e503: 75 e3 jne 10e4e8 <_User_extensions_Fatal+0x28><== ALWAYS TAKEN the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e505: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e508: 5b pop %ebx <== NOT EXECUTED 10e509: 5e pop %esi <== NOT EXECUTED 10e50a: 5f pop %edi <== NOT EXECUTED 10e50b: c9 leave <== NOT EXECUTED 10e50c: c3 ret <== NOT EXECUTED =============================================================================== 0010e384 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e384: 55 push %ebp 10e385: 89 e5 mov %esp,%ebp 10e387: 57 push %edi 10e388: 56 push %esi 10e389: 53 push %ebx 10e38a: 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; 10e38d: a1 58 22 12 00 mov 0x122258,%eax 10e392: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e395: 8b 35 5c 22 12 00 mov 0x12225c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e39b: c7 05 0c 67 12 00 10 movl $0x126710,0x12670c 10e3a2: 67 12 00 the_chain->permanent_null = NULL; 10e3a5: c7 05 10 67 12 00 00 movl $0x0,0x126710 10e3ac: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e3af: c7 05 14 67 12 00 0c movl $0x12670c,0x126714 10e3b6: 67 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e3b9: c7 05 d8 64 12 00 dc movl $0x1264dc,0x1264d8 10e3c0: 64 12 00 the_chain->permanent_null = NULL; 10e3c3: c7 05 dc 64 12 00 00 movl $0x0,0x1264dc 10e3ca: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e3cd: c7 05 e0 64 12 00 d8 movl $0x1264d8,0x1264e0 10e3d4: 64 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e3d7: 85 f6 test %esi,%esi 10e3d9: 74 64 je 10e43f <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10e3db: 89 c2 mov %eax,%edx 10e3dd: 8d 04 40 lea (%eax,%eax,2),%eax 10e3e0: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e3e3: c1 e1 02 shl $0x2,%ecx 10e3e6: 83 ec 0c sub $0xc,%esp 10e3e9: 51 push %ecx 10e3ea: 89 4d d8 mov %ecx,-0x28(%ebp) 10e3ed: e8 c6 04 00 00 call 10e8b8 <_Workspace_Allocate_or_fatal_error> 10e3f2: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e3f4: 31 c0 xor %eax,%eax 10e3f6: 8b 4d d8 mov -0x28(%ebp),%ecx 10e3f9: 89 df mov %ebx,%edi 10e3fb: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e3fd: 83 c4 10 add $0x10,%esp 10e400: 8b 45 dc mov -0x24(%ebp),%eax 10e403: 85 c0 test %eax,%eax 10e405: 74 38 je 10e43f <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e407: 89 75 e4 mov %esi,-0x1c(%ebp) 10e40a: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e411: 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; 10e414: 8d 7b 14 lea 0x14(%ebx),%edi 10e417: 8b 75 e4 mov -0x1c(%ebp),%esi 10e41a: b9 08 00 00 00 mov $0x8,%ecx 10e41f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e421: 83 ec 0c sub $0xc,%esp 10e424: 53 push %ebx 10e425: e8 56 35 00 00 call 111980 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e42a: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e42d: ff 45 e0 incl -0x20(%ebp) 10e430: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e434: 83 c4 10 add $0x10,%esp 10e437: 8b 45 e0 mov -0x20(%ebp),%eax 10e43a: 39 45 dc cmp %eax,-0x24(%ebp) 10e43d: 77 d5 ja 10e414 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e43f: 8d 65 f4 lea -0xc(%ebp),%esp 10e442: 5b pop %ebx 10e443: 5e pop %esi 10e444: 5f pop %edi 10e445: c9 leave 10e446: c3 ret =============================================================================== 0010f9fc <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10f9fc: 55 push %ebp 10f9fd: 89 e5 mov %esp,%ebp 10f9ff: 53 push %ebx 10fa00: 83 ec 10 sub $0x10,%esp 10fa03: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10fa06: 53 push %ebx 10fa07: e8 5c d9 ff ff call 10d368 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10fa0c: 83 c4 10 add $0x10,%esp 10fa0f: 8b 43 24 mov 0x24(%ebx),%eax 10fa12: 85 c0 test %eax,%eax 10fa14: 74 12 je 10fa28 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10fa16: 83 c3 08 add $0x8,%ebx 10fa19: 89 5d 08 mov %ebx,0x8(%ebp) } 10fa1c: 8b 5d fc mov -0x4(%ebp),%ebx 10fa1f: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10fa20: e9 43 d9 ff ff jmp 10d368 <_Chain_Extract> 10fa25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 10fa28: 8b 5d fc mov -0x4(%ebp),%ebx 10fa2b: c9 leave 10fa2c: c3 ret =============================================================================== 0010e448 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 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 0c 67 12 00 mov 0x12670c,%ebx 10e456: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e45c: 74 1c je 10e47a <_User_extensions_Thread_begin+0x32><== NEVER 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_begin != NULL ) 10e460: 8b 43 28 mov 0x28(%ebx),%eax 10e463: 85 c0 test %eax,%eax 10e465: 74 09 je 10e470 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e467: 83 ec 0c sub $0xc,%esp 10e46a: 56 push %esi 10e46b: ff d0 call *%eax 10e46d: 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 ) { 10e470: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e472: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e478: 75 e6 jne 10e460 <_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 ); } } 10e47a: 8d 65 f8 lea -0x8(%ebp),%esp 10e47d: 5b pop %ebx 10e47e: 5e pop %esi 10e47f: c9 leave 10e480: c3 ret =============================================================================== 0010e510 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e510: 55 push %ebp 10e511: 89 e5 mov %esp,%ebp 10e513: 56 push %esi 10e514: 53 push %ebx 10e515: 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 ; 10e518: 8b 1d 0c 67 12 00 mov 0x12670c,%ebx 10e51e: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e524: 74 26 je 10e54c <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e526: 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 ) { 10e528: 8b 43 14 mov 0x14(%ebx),%eax 10e52b: 85 c0 test %eax,%eax 10e52d: 74 13 je 10e542 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e52f: 83 ec 08 sub $0x8,%esp 10e532: 56 push %esi 10e533: ff 35 98 6a 12 00 pushl 0x126a98 10e539: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e53b: 83 c4 10 add $0x10,%esp 10e53e: 84 c0 test %al,%al 10e540: 74 16 je 10e558 <_User_extensions_Thread_create+0x48> 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 ) { 10e542: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e544: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e54a: 75 dc jne 10e528 <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10e54c: b0 01 mov $0x1,%al } 10e54e: 8d 65 f8 lea -0x8(%ebp),%esp 10e551: 5b pop %ebx 10e552: 5e pop %esi 10e553: c9 leave 10e554: c3 ret 10e555: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10e558: 31 c0 xor %eax,%eax } } return true; } 10e55a: 8d 65 f8 lea -0x8(%ebp),%esp 10e55d: 5b pop %ebx 10e55e: 5e pop %esi 10e55f: c9 leave 10e560: c3 ret =============================================================================== 0010e564 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e564: 55 push %ebp 10e565: 89 e5 mov %esp,%ebp 10e567: 56 push %esi 10e568: 53 push %ebx 10e569: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e56c: 8b 1d 14 67 12 00 mov 0x126714,%ebx 10e572: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e578: 74 23 je 10e59d <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e57a: 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 ) 10e57c: 8b 43 20 mov 0x20(%ebx),%eax 10e57f: 85 c0 test %eax,%eax 10e581: 74 0f je 10e592 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e583: 83 ec 08 sub $0x8,%esp 10e586: 56 push %esi 10e587: ff 35 98 6a 12 00 pushl 0x126a98 10e58d: ff d0 call *%eax 10e58f: 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 ) { 10e592: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e595: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e59b: 75 df jne 10e57c <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e59d: 8d 65 f8 lea -0x8(%ebp),%esp 10e5a0: 5b pop %ebx 10e5a1: 5e pop %esi 10e5a2: c9 leave 10e5a3: c3 ret =============================================================================== 0010e484 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e484: 55 push %ebp 10e485: 89 e5 mov %esp,%ebp 10e487: 56 push %esi 10e488: 53 push %ebx 10e489: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e48c: 8b 1d 14 67 12 00 mov 0x126714,%ebx 10e492: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e498: 74 1d je 10e4b7 <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e49a: 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 ) 10e49c: 8b 43 2c mov 0x2c(%ebx),%eax 10e49f: 85 c0 test %eax,%eax 10e4a1: 74 09 je 10e4ac <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e4a3: 83 ec 0c sub $0xc,%esp 10e4a6: 56 push %esi 10e4a7: ff d0 call *%eax 10e4a9: 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 ) { 10e4ac: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e4af: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e4b5: 75 e5 jne 10e49c <_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 ); } } 10e4b7: 8d 65 f8 lea -0x8(%ebp),%esp 10e4ba: 5b pop %ebx 10e4bb: 5e pop %esi 10e4bc: c9 leave 10e4bd: c3 ret =============================================================================== 0010f164 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f164: 55 push %ebp 10f165: 89 e5 mov %esp,%ebp 10f167: 56 push %esi 10f168: 53 push %ebx 10f169: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f16c: 8b 1d ac 99 12 00 mov 0x1299ac,%ebx 10f172: 81 fb b0 99 12 00 cmp $0x1299b0,%ebx 10f178: 74 22 je 10f19c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f17a: 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 ) 10f17c: 8b 43 1c mov 0x1c(%ebx),%eax 10f17f: 85 c0 test %eax,%eax 10f181: 74 0f je 10f192 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f183: 83 ec 08 sub $0x8,%esp 10f186: 56 push %esi 10f187: ff 35 38 9d 12 00 pushl 0x129d38 10f18d: ff d0 call *%eax 10f18f: 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 ) { 10f192: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f194: 81 fb b0 99 12 00 cmp $0x1299b0,%ebx 10f19a: 75 e0 jne 10f17c <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f19c: 8d 65 f8 lea -0x8(%ebp),%esp 10f19f: 5b pop %ebx 10f1a0: 5e pop %esi 10f1a1: c9 leave 10f1a2: c3 ret =============================================================================== 0010e5a4 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e5a4: 55 push %ebp 10e5a5: 89 e5 mov %esp,%ebp 10e5a7: 56 push %esi 10e5a8: 53 push %ebx 10e5a9: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e5ac: 8b 1d 0c 67 12 00 mov 0x12670c,%ebx 10e5b2: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e5b8: 74 22 je 10e5dc <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10e5ba: 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 ) 10e5bc: 8b 43 18 mov 0x18(%ebx),%eax 10e5bf: 85 c0 test %eax,%eax 10e5c1: 74 0f je 10e5d2 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e5c3: 83 ec 08 sub $0x8,%esp 10e5c6: 56 push %esi 10e5c7: ff 35 98 6a 12 00 pushl 0x126a98 10e5cd: ff d0 call *%eax 10e5cf: 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 ) { 10e5d2: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e5d4: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e5da: 75 e0 jne 10e5bc <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e5dc: 8d 65 f8 lea -0x8(%ebp),%esp 10e5df: 5b pop %ebx 10e5e0: 5e pop %esi 10e5e1: c9 leave 10e5e2: c3 ret =============================================================================== 0010e5e4 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e5e4: 55 push %ebp 10e5e5: 89 e5 mov %esp,%ebp 10e5e7: 57 push %edi 10e5e8: 56 push %esi 10e5e9: 53 push %ebx 10e5ea: 83 ec 0c sub $0xc,%esp 10e5ed: 8b 7d 08 mov 0x8(%ebp),%edi 10e5f0: 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 ; 10e5f3: 8b 1d d8 64 12 00 mov 0x1264d8,%ebx 10e5f9: 81 fb dc 64 12 00 cmp $0x1264dc,%ebx 10e5ff: 74 18 je 10e619 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10e601: 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 ); 10e604: 83 ec 08 sub $0x8,%esp 10e607: 56 push %esi 10e608: 57 push %edi 10e609: 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 ) { 10e60c: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e60e: 83 c4 10 add $0x10,%esp 10e611: 81 fb dc 64 12 00 cmp $0x1264dc,%ebx 10e617: 75 eb jne 10e604 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e619: 8d 65 f4 lea -0xc(%ebp),%esp 10e61c: 5b pop %ebx 10e61d: 5e pop %esi 10e61e: 5f pop %edi 10e61f: c9 leave 10e620: c3 ret =============================================================================== 00110004 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 110004: 55 push %ebp 110005: 89 e5 mov %esp,%ebp 110007: 57 push %edi 110008: 56 push %esi 110009: 53 push %ebx 11000a: 83 ec 1c sub $0x1c,%esp 11000d: 8b 75 08 mov 0x8(%ebp),%esi 110010: 8b 4d 0c mov 0xc(%ebp),%ecx 110013: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 110016: 9c pushf 110017: fa cli 110018: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110019: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11001b: 8d 7e 04 lea 0x4(%esi),%edi 11001e: 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 ) ) { 110021: 39 fa cmp %edi,%edx 110023: 74 3d je 110062 <_Watchdog_Adjust+0x5e> switch ( direction ) { 110025: 85 c9 test %ecx,%ecx 110027: 75 43 jne 11006c <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110029: 85 db test %ebx,%ebx 11002b: 74 35 je 110062 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 11002d: 8b 7a 10 mov 0x10(%edx),%edi 110030: 39 fb cmp %edi,%ebx 110032: 73 0f jae 110043 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 110034: eb 3e jmp 110074 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 110036: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110038: 29 fb sub %edi,%ebx 11003a: 74 26 je 110062 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 11003c: 8b 7a 10 mov 0x10(%edx),%edi 11003f: 39 df cmp %ebx,%edi 110041: 77 31 ja 110074 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 110043: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 11004a: 50 push %eax 11004b: 9d popf _Watchdog_Tickle( header ); 11004c: 83 ec 0c sub $0xc,%esp 11004f: 56 push %esi 110050: e8 cb 01 00 00 call 110220 <_Watchdog_Tickle> _ISR_Disable( level ); 110055: 9c pushf 110056: fa cli 110057: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110058: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 11005a: 83 c4 10 add $0x10,%esp 11005d: 39 55 e4 cmp %edx,-0x1c(%ebp) 110060: 75 d6 jne 110038 <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 110062: 50 push %eax 110063: 9d popf } 110064: 8d 65 f4 lea -0xc(%ebp),%esp 110067: 5b pop %ebx 110068: 5e pop %esi 110069: 5f pop %edi 11006a: c9 leave 11006b: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 11006c: 49 dec %ecx 11006d: 75 f3 jne 110062 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 11006f: 01 5a 10 add %ebx,0x10(%edx) break; 110072: eb ee jmp 110062 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 110074: 29 df sub %ebx,%edi 110076: 89 7a 10 mov %edi,0x10(%edx) break; 110079: eb e7 jmp 110062 <_Watchdog_Adjust+0x5e> =============================================================================== 0010e624 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e624: 55 push %ebp 10e625: 89 e5 mov %esp,%ebp 10e627: 57 push %edi 10e628: 56 push %esi 10e629: 53 push %ebx 10e62a: 83 ec 04 sub $0x4,%esp 10e62d: 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; 10e630: 8b 3d 94 6a 12 00 mov 0x126a94,%edi _ISR_Disable( level ); 10e636: 9c pushf 10e637: fa cli 10e638: 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 ) { 10e63b: 8b 43 08 mov 0x8(%ebx),%eax 10e63e: 85 c0 test %eax,%eax 10e640: 0f 85 9e 00 00 00 jne 10e6e4 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e646: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e64d: a1 20 66 12 00 mov 0x126620,%eax 10e652: 40 inc %eax 10e653: a3 20 66 12 00 mov %eax,0x126620 restart: delta_interval = the_watchdog->initial; 10e658: 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 ; 10e65b: 8b 4d 08 mov 0x8(%ebp),%ecx 10e65e: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e660: 85 c0 test %eax,%eax 10e662: 74 5d je 10e6c1 <_Watchdog_Insert+0x9d> 10e664: 8b 32 mov (%edx),%esi 10e666: 85 f6 test %esi,%esi 10e668: 74 57 je 10e6c1 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e66a: 8b 4a 10 mov 0x10(%edx),%ecx 10e66d: 39 c8 cmp %ecx,%eax 10e66f: 73 22 jae 10e693 <_Watchdog_Insert+0x6f> 10e671: eb 49 jmp 10e6bc <_Watchdog_Insert+0x98> 10e673: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e674: 8b 35 88 65 12 00 mov 0x126588,%esi 10e67a: 39 f7 cmp %esi,%edi 10e67c: 72 72 jb 10e6f0 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e67e: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e680: 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 ) ) 10e682: 85 c0 test %eax,%eax 10e684: 74 3b je 10e6c1 <_Watchdog_Insert+0x9d> 10e686: 8b 0a mov (%edx),%ecx 10e688: 85 c9 test %ecx,%ecx 10e68a: 74 35 je 10e6c1 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e68c: 8b 4a 10 mov 0x10(%edx),%ecx 10e68f: 39 c1 cmp %eax,%ecx 10e691: 77 29 ja 10e6bc <_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 ); 10e693: ff 75 f0 pushl -0x10(%ebp) 10e696: 9d popf 10e697: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e698: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e69c: 74 d6 je 10e674 <_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; 10e69e: 89 3d 88 65 12 00 mov %edi,0x126588 _Watchdog_Sync_count--; 10e6a4: a1 20 66 12 00 mov 0x126620,%eax 10e6a9: 48 dec %eax 10e6aa: a3 20 66 12 00 mov %eax,0x126620 _ISR_Enable( level ); 10e6af: ff 75 f0 pushl -0x10(%ebp) 10e6b2: 9d popf } 10e6b3: 58 pop %eax 10e6b4: 5b pop %ebx 10e6b5: 5e pop %esi 10e6b6: 5f pop %edi 10e6b7: c9 leave 10e6b8: c3 ret 10e6b9: 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; 10e6bc: 29 c1 sub %eax,%ecx 10e6be: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e6c1: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e6c8: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e6cb: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e6ce: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e6d1: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e6d3: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e6d5: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e6d7: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e6da: a1 24 66 12 00 mov 0x126624,%eax 10e6df: 89 43 14 mov %eax,0x14(%ebx) 10e6e2: eb ba jmp 10e69e <_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 ); 10e6e4: ff 75 f0 pushl -0x10(%ebp) 10e6e7: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e6e8: 58 pop %eax 10e6e9: 5b pop %ebx 10e6ea: 5e pop %esi 10e6eb: 5f pop %edi 10e6ec: c9 leave 10e6ed: c3 ret 10e6ee: 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; 10e6f0: 89 3d 88 65 12 00 mov %edi,0x126588 goto restart; 10e6f6: e9 5d ff ff ff jmp 10e658 <_Watchdog_Insert+0x34> =============================================================================== 0010e75c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e75c: 55 push %ebp 10e75d: 89 e5 mov %esp,%ebp 10e75f: 56 push %esi 10e760: 53 push %ebx 10e761: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e764: 9c pushf 10e765: fa cli 10e766: 59 pop %ecx previous_state = the_watchdog->state; 10e767: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e76a: 83 f8 01 cmp $0x1,%eax 10e76d: 74 4d je 10e7bc <_Watchdog_Remove+0x60> 10e76f: 73 0f jae 10e780 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e771: 8b 1d 24 66 12 00 mov 0x126624,%ebx 10e777: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e77a: 51 push %ecx 10e77b: 9d popf return( previous_state ); } 10e77c: 5b pop %ebx 10e77d: 5e pop %esi 10e77e: c9 leave 10e77f: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e780: 83 f8 03 cmp $0x3,%eax 10e783: 77 ec ja 10e771 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e785: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 10e78c: 8b 1a mov (%edx),%ebx case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e78e: 8b 33 mov (%ebx),%esi 10e790: 85 f6 test %esi,%esi 10e792: 74 06 je 10e79a <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e794: 8b 72 10 mov 0x10(%edx),%esi 10e797: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e79a: 8b 35 20 66 12 00 mov 0x126620,%esi 10e7a0: 85 f6 test %esi,%esi 10e7a2: 74 0c je 10e7b0 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e7a4: 8b 35 94 6a 12 00 mov 0x126a94,%esi 10e7aa: 89 35 88 65 12 00 mov %esi,0x126588 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e7b0: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e7b3: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e7b6: 89 1e mov %ebx,(%esi) 10e7b8: eb b7 jmp 10e771 <_Watchdog_Remove+0x15> 10e7ba: 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; 10e7bc: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e7c3: eb ac jmp 10e771 <_Watchdog_Remove+0x15> =============================================================================== 0010fbf0 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10fbf0: 55 push %ebp 10fbf1: 89 e5 mov %esp,%ebp 10fbf3: 57 push %edi 10fbf4: 56 push %esi 10fbf5: 53 push %ebx 10fbf6: 83 ec 2c sub $0x2c,%esp 10fbf9: 8b 55 08 mov 0x8(%ebp),%edx 10fbfc: 8b 45 0c mov 0xc(%ebp),%eax printk( 10fbff: 8b 78 24 mov 0x24(%eax),%edi 10fc02: 8b 70 20 mov 0x20(%eax),%esi 10fc05: 8b 58 1c mov 0x1c(%eax),%ebx 10fc08: 8b 48 0c mov 0xc(%eax),%ecx 10fc0b: 89 4d d4 mov %ecx,-0x2c(%ebp) 10fc0e: 8b 48 10 mov 0x10(%eax),%ecx 10fc11: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fc14: 85 d2 test %edx,%edx 10fc16: 74 2c je 10fc44 <_Watchdog_Report+0x54> 10fc18: b9 03 2c 12 00 mov $0x122c03,%ecx 10fc1d: 83 ec 0c sub $0xc,%esp 10fc20: 57 push %edi 10fc21: 56 push %esi 10fc22: 53 push %ebx 10fc23: 50 push %eax 10fc24: ff 75 d4 pushl -0x2c(%ebp) 10fc27: ff 75 e4 pushl -0x1c(%ebp) 10fc2a: 51 push %ecx 10fc2b: 52 push %edx 10fc2c: 68 66 36 12 00 push $0x123666 10fc31: e8 2e 9e ff ff call 109a64 10fc36: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fc39: 8d 65 f4 lea -0xc(%ebp),%esp 10fc3c: 5b pop %ebx 10fc3d: 5e pop %esi 10fc3e: 5f pop %edi 10fc3f: c9 leave 10fc40: c3 ret 10fc41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fc44: b9 c9 34 12 00 mov $0x1234c9,%ecx 10fc49: 89 ca mov %ecx,%edx 10fc4b: eb d0 jmp 10fc1d <_Watchdog_Report+0x2d> =============================================================================== 0010fb80 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10fb80: 55 push %ebp 10fb81: 89 e5 mov %esp,%ebp 10fb83: 57 push %edi 10fb84: 56 push %esi 10fb85: 53 push %ebx 10fb86: 83 ec 20 sub $0x20,%esp 10fb89: 8b 7d 08 mov 0x8(%ebp),%edi 10fb8c: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10fb8f: 9c pushf 10fb90: fa cli 10fb91: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10fb94: 56 push %esi 10fb95: 57 push %edi 10fb96: 68 30 36 12 00 push $0x123630 10fb9b: e8 c4 9e ff ff call 109a64 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fba0: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fba2: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10fba5: 83 c4 10 add $0x10,%esp 10fba8: 39 f3 cmp %esi,%ebx 10fbaa: 74 31 je 10fbdd <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fbac: 83 ec 08 sub $0x8,%esp 10fbaf: 53 push %ebx 10fbb0: 6a 00 push $0x0 10fbb2: e8 39 00 00 00 call 10fbf0 <_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 ) 10fbb7: 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 ; 10fbb9: 83 c4 10 add $0x10,%esp 10fbbc: 39 f3 cmp %esi,%ebx 10fbbe: 75 ec jne 10fbac <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10fbc0: 83 ec 08 sub $0x8,%esp 10fbc3: 57 push %edi 10fbc4: 68 47 36 12 00 push $0x123647 10fbc9: e8 96 9e ff ff call 109a64 10fbce: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fbd1: ff 75 e4 pushl -0x1c(%ebp) 10fbd4: 9d popf } 10fbd5: 8d 65 f4 lea -0xc(%ebp),%esp 10fbd8: 5b pop %ebx 10fbd9: 5e pop %esi 10fbda: 5f pop %edi 10fbdb: c9 leave 10fbdc: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10fbdd: 83 ec 0c sub $0xc,%esp 10fbe0: 68 56 36 12 00 push $0x123656 10fbe5: e8 7a 9e ff ff call 109a64 10fbea: 83 c4 10 add $0x10,%esp 10fbed: eb e2 jmp 10fbd1 <_Watchdog_Report_chain+0x51> =============================================================================== 0010e7c8 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e7c8: 55 push %ebp 10e7c9: 89 e5 mov %esp,%ebp 10e7cb: 57 push %edi 10e7cc: 56 push %esi 10e7cd: 53 push %ebx 10e7ce: 83 ec 1c sub $0x1c,%esp 10e7d1: 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 ); 10e7d4: 9c pushf 10e7d5: fa cli 10e7d6: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e7d7: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e7d9: 8d 47 04 lea 0x4(%edi),%eax 10e7dc: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10e7df: 39 c3 cmp %eax,%ebx 10e7e1: 74 11 je 10e7f4 <_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) { 10e7e3: 8b 43 10 mov 0x10(%ebx),%eax 10e7e6: 85 c0 test %eax,%eax 10e7e8: 74 34 je 10e81e <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e7ea: 48 dec %eax 10e7eb: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e7ee: 85 c0 test %eax,%eax 10e7f0: 74 2c je 10e81e <_Watchdog_Tickle+0x56> 10e7f2: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e7f4: 56 push %esi 10e7f5: 9d popf } 10e7f6: 8d 65 f4 lea -0xc(%ebp),%esp 10e7f9: 5b pop %ebx 10e7fa: 5e pop %esi 10e7fb: 5f pop %edi 10e7fc: c9 leave 10e7fd: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e7fe: 83 ec 08 sub $0x8,%esp 10e801: ff 73 24 pushl 0x24(%ebx) 10e804: ff 73 20 pushl 0x20(%ebx) 10e807: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10e80a: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e80d: 9c pushf 10e80e: fa cli 10e80f: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10e810: 8b 1f mov (%edi),%ebx _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e812: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10e815: 74 dd je 10e7f4 <_Watchdog_Tickle+0x2c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10e817: 8b 43 10 mov 0x10(%ebx),%eax 10e81a: 85 c0 test %eax,%eax 10e81c: 75 d6 jne 10e7f4 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e81e: 83 ec 0c sub $0xc,%esp 10e821: 53 push %ebx 10e822: e8 35 ff ff ff call 10e75c <_Watchdog_Remove> _ISR_Enable( level ); 10e827: 56 push %esi 10e828: 9d popf switch( watchdog_state ) { 10e829: 83 c4 10 add $0x10,%esp 10e82c: 83 f8 02 cmp $0x2,%eax 10e82f: 75 dc jne 10e80d <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10e831: eb cb jmp 10e7fe <_Watchdog_Tickle+0x36> =============================================================================== 0010e834 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e834: 55 push %ebp 10e835: 89 e5 mov %esp,%ebp 10e837: 57 push %edi 10e838: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e839: 8b 1d 20 22 12 00 mov 0x122220,%ebx uintptr_t size = Configuration.work_space_size; 10e83f: 8b 15 24 22 12 00 mov 0x122224,%edx if ( Configuration.do_zero_of_workspace ) 10e845: 80 3d 48 22 12 00 00 cmpb $0x0,0x122248 10e84c: 75 1e jne 10e86c <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e84e: 6a 04 push $0x4 10e850: 52 push %edx 10e851: 53 push %ebx 10e852: 68 00 65 12 00 push $0x126500 10e857: e8 6c de ff ff call 10c6c8 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e85c: 83 c4 10 add $0x10,%esp 10e85f: 85 c0 test %eax,%eax 10e861: 74 13 je 10e876 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e863: 8d 65 f8 lea -0x8(%ebp),%esp 10e866: 5b pop %ebx 10e867: 5f pop %edi 10e868: c9 leave 10e869: c3 ret 10e86a: 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 ); 10e86c: 31 c0 xor %eax,%eax 10e86e: 89 df mov %ebx,%edi 10e870: 89 d1 mov %edx,%ecx 10e872: f3 aa rep stos %al,%es:(%edi) 10e874: eb d8 jmp 10e84e <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e876: 50 push %eax 10e877: 6a 02 push $0x2 10e879: 6a 01 push $0x1 10e87b: 6a 00 push $0x0 10e87d: e8 4e e0 ff ff call 10c8d0 <_Internal_error_Occurred> =============================================================================== 0010c47c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 10c47c: 55 push %ebp 10c47d: 89 e5 mov %esp,%ebp 10c47f: 57 push %edi 10c480: 56 push %esi 10c481: 53 push %ebx 10c482: 83 ec 78 sub $0x78,%esp 10c485: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 10c488: 53 push %ebx 10c489: e8 52 ea ff ff call 10aee0 if ( old_parent_pathlen == 0 ) 10c48e: 83 c4 10 add $0x10,%esp 10c491: 85 c0 test %eax,%eax 10c493: 0f 85 57 01 00 00 jne 10c5f0 <_rename_r+0x174> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 10c499: 52 push %edx 10c49a: 8d 45 b8 lea -0x48(%ebp),%eax 10c49d: 89 45 94 mov %eax,-0x6c(%ebp) 10c4a0: 50 push %eax 10c4a1: 8d 45 e4 lea -0x1c(%ebp),%eax 10c4a4: 50 push %eax 10c4a5: 53 push %ebx 10c4a6: e8 e1 03 00 00 call 10c88c 10c4ab: 83 c4 10 add $0x10,%esp 10c4ae: 31 d2 xor %edx,%edx rtems_filesystem_location_info_t old_parent_loc; rtems_filesystem_location_info_t new_parent_loc; int i; int result; const char *name; bool free_old_parentloc = false; 10c4b0: c6 45 93 00 movb $0x0,-0x6d(%ebp) /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 10c4b4: 8d 7d cc lea -0x34(%ebp),%edi 10c4b7: b9 05 00 00 00 mov $0x5,%ecx 10c4bc: 8b 75 94 mov -0x6c(%ebp),%esi 10c4bf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 10c4c1: 01 d3 add %edx,%ebx 10c4c3: 89 5d e0 mov %ebx,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10c4c6: be ff ff ff ff mov $0xffffffff,%esi 10c4cb: 89 f1 mov %esi,%ecx 10c4cd: 89 df mov %ebx,%edi 10c4cf: 31 c0 xor %eax,%eax 10c4d1: f2 ae repnz scas %es:(%edi),%al 10c4d3: f7 d1 not %ecx 10c4d5: 49 dec %ecx 10c4d6: 83 ec 08 sub $0x8,%esp 10c4d9: 51 push %ecx 10c4da: 53 push %ebx 10c4db: e8 44 ea ff ff call 10af24 10c4e0: 01 c3 add %eax,%ebx 10c4e2: 89 5d e0 mov %ebx,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10c4e5: 89 f1 mov %esi,%ecx 10c4e7: 89 df mov %ebx,%edi 10c4e9: 31 c0 xor %eax,%eax 10c4eb: f2 ae repnz scas %es:(%edi),%al 10c4ed: f7 d1 not %ecx 10c4ef: 49 dec %ecx 10c4f0: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c4f7: 8d 75 cc lea -0x34(%ebp),%esi 10c4fa: 56 push %esi 10c4fb: 6a 00 push $0x0 10c4fd: 51 push %ecx 10c4fe: 53 push %ebx 10c4ff: e8 30 e9 ff ff call 10ae34 0, &old_loc, false ); if ( result != 0 ) { 10c504: 83 c4 20 add $0x20,%esp 10c507: 85 c0 test %eax,%eax 10c509: 0f 85 c9 00 00 00 jne 10c5d8 <_rename_r+0x15c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 10c50f: 50 push %eax 10c510: 8d 5d a4 lea -0x5c(%ebp),%ebx 10c513: 53 push %ebx 10c514: 8d 45 e4 lea -0x1c(%ebp),%eax 10c517: 50 push %eax 10c518: ff 75 10 pushl 0x10(%ebp) 10c51b: e8 6c 03 00 00 call 10c88c result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 10c520: 83 c4 0c add $0xc,%esp 10c523: 8d 45 e0 lea -0x20(%ebp),%eax 10c526: 50 push %eax 10c527: 53 push %ebx 10c528: 8b 45 10 mov 0x10(%ebp),%eax 10c52b: 03 45 e4 add -0x1c(%ebp),%eax 10c52e: 50 push %eax 10c52f: 8b 45 b0 mov -0x50(%ebp),%eax 10c532: ff 50 04 call *0x4(%eax) if ( result != 0 ) { 10c535: 83 c4 10 add $0x10,%esp 10c538: 85 c0 test %eax,%eax 10c53a: 0f 85 e0 00 00 00 jne 10c620 <_rename_r+0x1a4> /* * 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 ) { 10c540: 8b 45 b4 mov -0x4c(%ebp),%eax 10c543: 39 45 c8 cmp %eax,-0x38(%ebp) 10c546: 75 48 jne 10c590 <_rename_r+0x114> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 10c548: ff 75 e0 pushl -0x20(%ebp) 10c54b: 53 push %ebx 10c54c: 56 push %esi 10c54d: ff 75 94 pushl -0x6c(%ebp) 10c550: 8b 45 b0 mov -0x50(%ebp),%eax 10c553: ff 50 40 call *0x40(%eax) 10c556: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &new_parent_loc ); 10c558: 89 1c 24 mov %ebx,(%esp) 10c55b: e8 f0 eb ff ff call 10b150 if ( free_old_parentloc ) 10c560: 83 c4 10 add $0x10,%esp 10c563: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c567: 75 17 jne 10c580 <_rename_r+0x104> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 10c569: 83 ec 0c sub $0xc,%esp 10c56c: 56 push %esi 10c56d: e8 de eb ff ff call 10b150 return result; 10c572: 83 c4 10 add $0x10,%esp } 10c575: 89 f8 mov %edi,%eax 10c577: 8d 65 f4 lea -0xc(%ebp),%esp 10c57a: 5b pop %ebx 10c57b: 5e pop %esi 10c57c: 5f pop %edi 10c57d: c9 leave 10c57e: c3 ret 10c57f: 90 nop <== 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 ); 10c580: 83 ec 0c sub $0xc,%esp 10c583: ff 75 94 pushl -0x6c(%ebp) 10c586: e8 c5 eb ff ff call 10b150 10c58b: 83 c4 10 add $0x10,%esp 10c58e: eb d9 jmp 10c569 <_rename_r+0xed> * 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 ); 10c590: 83 ec 0c sub $0xc,%esp 10c593: 53 push %ebx 10c594: e8 b7 eb ff ff call 10b150 if ( free_old_parentloc ) 10c599: 83 c4 10 add $0x10,%esp 10c59c: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c5a0: 74 0e je 10c5b0 <_rename_r+0x134> rtems_filesystem_freenode( &old_parent_loc ); 10c5a2: 83 ec 0c sub $0xc,%esp 10c5a5: ff 75 94 pushl -0x6c(%ebp) 10c5a8: e8 a3 eb ff ff call 10b150 10c5ad: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c5b0: 83 ec 0c sub $0xc,%esp 10c5b3: 56 push %esi 10c5b4: e8 97 eb ff ff call 10b150 rtems_set_errno_and_return_minus_one( EXDEV ); 10c5b9: e8 0a a9 00 00 call 116ec8 <__errno> 10c5be: c7 00 12 00 00 00 movl $0x12,(%eax) 10c5c4: 83 c4 10 add $0x10,%esp 10c5c7: bf ff ff ff ff mov $0xffffffff,%edi if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 10c5cc: 89 f8 mov %edi,%eax 10c5ce: 8d 65 f4 lea -0xc(%ebp),%esp 10c5d1: 5b pop %ebx 10c5d2: 5e pop %esi 10c5d3: 5f pop %edi 10c5d4: c9 leave 10c5d5: c3 ret 10c5d6: 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 ) 10c5d8: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c5dc: 75 78 jne 10c656 <_rename_r+0x1da> <== ALWAYS TAKEN rtems_filesystem_freenode( &old_parent_loc ); return -1; 10c5de: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 10c5e3: 89 f8 mov %edi,%eax <== NOT EXECUTED 10c5e5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10c5e8: 5b pop %ebx <== NOT EXECUTED 10c5e9: 5e pop %esi <== NOT EXECUTED 10c5ea: 5f pop %edi <== NOT EXECUTED 10c5eb: c9 leave <== NOT EXECUTED 10c5ec: c3 ret <== NOT EXECUTED 10c5ed: 8d 76 00 lea 0x0(%esi),%esi <== 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, 10c5f0: 89 c2 mov %eax,%edx 10c5f2: 83 ec 0c sub $0xc,%esp 10c5f5: 6a 00 push $0x0 10c5f7: 8d 45 b8 lea -0x48(%ebp),%eax 10c5fa: 89 45 94 mov %eax,-0x6c(%ebp) 10c5fd: 50 push %eax 10c5fe: 6a 02 push $0x2 10c600: 52 push %edx 10c601: 53 push %ebx 10c602: 89 55 8c mov %edx,-0x74(%ebp) 10c605: e8 92 e8 ff ff call 10ae9c RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10c60a: 83 c4 20 add $0x20,%esp 10c60d: 85 c0 test %eax,%eax 10c60f: 8b 55 8c mov -0x74(%ebp),%edx 10c612: 75 ca jne 10c5de <_rename_r+0x162> <== NEVER TAKEN return -1; free_old_parentloc = true; 10c614: c6 45 93 01 movb $0x1,-0x6d(%ebp) 10c618: e9 97 fe ff ff jmp 10c4b4 <_rename_r+0x38> 10c61d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 10c620: 83 ec 0c sub $0xc,%esp 10c623: 53 push %ebx 10c624: e8 27 eb ff ff call 10b150 if ( free_old_parentloc ) 10c629: 83 c4 10 add $0x10,%esp 10c62c: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c630: 74 0e je 10c640 <_rename_r+0x1c4> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10c632: 83 ec 0c sub $0xc,%esp 10c635: ff 75 94 pushl -0x6c(%ebp) 10c638: e8 13 eb ff ff call 10b150 10c63d: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c640: 83 ec 0c sub $0xc,%esp 10c643: 56 push %esi 10c644: e8 07 eb ff ff call 10b150 return -1; 10c649: 83 c4 10 add $0x10,%esp 10c64c: bf ff ff ff ff mov $0xffffffff,%edi 10c651: e9 1f ff ff ff jmp 10c575 <_rename_r+0xf9> result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 10c656: 83 ec 0c sub $0xc,%esp 10c659: ff 75 94 pushl -0x6c(%ebp) 10c65c: e8 ef ea ff ff call 10b150 10c661: 83 c4 10 add $0x10,%esp return -1; 10c664: bf ff ff ff ff mov $0xffffffff,%edi 10c669: e9 07 ff ff ff jmp 10c575 <_rename_r+0xf9> =============================================================================== 0010ad4c <_times>: #endif clock_t _times( struct tms *ptms ) { 10ad4c: 55 push %ebp 10ad4d: 89 e5 mov %esp,%ebp 10ad4f: 56 push %esi 10ad50: 53 push %ebx 10ad51: 83 ec 10 sub $0x10,%esp 10ad54: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_interval ticks; if ( !ptms ) 10ad57: 85 db test %ebx,%ebx 10ad59: 74 75 je 10add0 <_times+0x84> /* * This call does not depend on TOD being initialized and can't fail. */ ticks = rtems_clock_get_ticks_since_boot(); 10ad5b: e8 88 04 00 00 call 10b1e8 10ad60: 89 c6 mov %eax,%esi { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 10ad62: 8b 0d ec 34 12 00 mov 0x1234ec,%ecx 10ad68: ba 83 de 1b 43 mov $0x431bde83,%edx 10ad6d: 89 c8 mov %ecx,%eax 10ad6f: f7 e2 mul %edx 10ad71: c1 ea 12 shr $0x12,%edx 10ad74: 89 55 e8 mov %edx,-0x18(%ebp) 10ad77: 8d 04 89 lea (%ecx,%ecx,4),%eax 10ad7a: 8d 04 80 lea (%eax,%eax,4),%eax 10ad7d: 8d 04 80 lea (%eax,%eax,4),%eax 10ad80: c1 e0 03 shl $0x3,%eax 10ad83: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10ad88: 31 d2 xor %edx,%edx 10ad8a: f7 f1 div %ecx 10ad8c: 89 55 ec mov %edx,-0x14(%ebp) TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 10ad8f: 8d 45 f0 lea -0x10(%ebp),%eax 10ad92: 50 push %eax 10ad93: 8d 45 f4 lea -0xc(%ebp),%eax 10ad96: 50 push %eax 10ad97: 8d 45 e8 lea -0x18(%ebp),%eax 10ad9a: 50 push %eax 10ad9b: a1 58 7d 12 00 mov 0x127d58,%eax 10ada0: 05 84 00 00 00 add $0x84,%eax 10ada5: 50 push %eax 10ada6: e8 b1 37 00 00 call 10e55c <_Timespec_Divide> &_Thread_Executing->cpu_time_used, &per_tick, &ticks, &fractional_ticks ); ptms->tms_utime = ticks; 10adab: 8b 45 f4 mov -0xc(%ebp),%eax 10adae: 89 03 mov %eax,(%ebx) } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; 10adb0: 89 73 04 mov %esi,0x4(%ebx) ptms->tms_cutime = 0; 10adb3: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) ptms->tms_cstime = 0; 10adba: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) return ticks; 10adc1: 83 c4 10 add $0x10,%esp } 10adc4: 89 f0 mov %esi,%eax 10adc6: 8d 65 f8 lea -0x8(%ebp),%esp 10adc9: 5b pop %ebx 10adca: 5e pop %esi 10adcb: c9 leave 10adcc: c3 ret 10adcd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_interval ticks; if ( !ptms ) rtems_set_errno_and_return_minus_one( EFAULT ); 10add0: e8 93 87 00 00 call 113568 <__errno> 10add5: c7 00 0e 00 00 00 movl $0xe,(%eax) 10addb: be ff ff ff ff mov $0xffffffff,%esi ptms->tms_stime = ticks; ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; } 10ade0: 89 f0 mov %esi,%eax 10ade2: 8d 65 f8 lea -0x8(%ebp),%esp 10ade5: 5b pop %ebx 10ade6: 5e pop %esi 10ade7: c9 leave 10ade8: c3 ret =============================================================================== 00109b0c : int access( const char *path, int amode ) { 109b0c: 55 push %ebp 109b0d: 89 e5 mov %esp,%ebp 109b0f: 53 push %ebx 109b10: 83 ec 5c sub $0x5c,%esp 109b13: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 109b16: 8d 45 b0 lea -0x50(%ebp),%eax 109b19: 50 push %eax 109b1a: ff 75 08 pushl 0x8(%ebp) 109b1d: e8 42 17 00 00 call 10b264 109b22: 83 c4 10 add $0x10,%esp 109b25: 85 c0 test %eax,%eax 109b27: 75 1f jne 109b48 return -1; if ( amode & R_OK ) { 109b29: f6 c3 04 test $0x4,%bl 109b2c: 75 26 jne 109b54 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 109b2e: f6 c3 02 test $0x2,%bl 109b31: 75 0d jne 109b40 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 109b33: 83 e3 01 and $0x1,%ebx 109b36: 75 24 jne 109b5c if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; 109b38: 31 c0 xor %eax,%eax } 109b3a: 8b 5d fc mov -0x4(%ebp),%ebx 109b3d: c9 leave 109b3e: c3 ret 109b3f: 90 nop <== NOT EXECUTED if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 109b40: f6 45 bc 80 testb $0x80,-0x44(%ebp) 109b44: 75 ed jne 109b33 109b46: 66 90 xchg %ax,%ax return -1; 109b48: b8 ff ff ff ff mov $0xffffffff,%eax if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; } 109b4d: 8b 5d fc mov -0x4(%ebp),%ebx 109b50: c9 leave 109b51: c3 ret 109b52: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 109b54: f6 45 bd 01 testb $0x1,-0x43(%ebp) 109b58: 75 d4 jne 109b2e 109b5a: eb ec jmp 109b48 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 109b5c: 8b 45 bc mov -0x44(%ebp),%eax 109b5f: 83 e0 40 and $0x40,%eax return -1; } return 0; 109b62: 83 f8 01 cmp $0x1,%eax 109b65: 19 c0 sbb %eax,%eax 109b67: eb d1 jmp 109b3a =============================================================================== 0010b5b4 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10b5b4: 55 push %ebp 10b5b5: 89 e5 mov %esp,%ebp 10b5b7: 57 push %edi 10b5b8: 56 push %esi 10b5b9: 53 push %ebx 10b5ba: 83 ec 1c sub $0x1c,%esp 10b5bd: 8b 5d 08 mov 0x8(%ebp),%ebx 10b5c0: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10b5c3: 85 db test %ebx,%ebx 10b5c5: 0f 84 f1 00 00 00 je 10b6bc rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10b5cb: 8b 53 04 mov 0x4(%ebx),%edx 10b5ce: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10b5d4: 0f 87 e2 00 00 00 ja 10b6bc rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10b5da: 85 f6 test %esi,%esi 10b5dc: 74 10 je 10b5ee olddelta->tv_sec = 0; 10b5de: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10b5e4: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10b5eb: 8b 53 04 mov 0x4(%ebx),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10b5ee: 8b 03 mov (%ebx),%eax 10b5f0: 8d 04 80 lea (%eax,%eax,4),%eax 10b5f3: 8d 04 80 lea (%eax,%eax,4),%eax 10b5f6: 8d 04 80 lea (%eax,%eax,4),%eax 10b5f9: 8d 04 80 lea (%eax,%eax,4),%eax 10b5fc: 8d 04 80 lea (%eax,%eax,4),%eax 10b5ff: 8d 04 80 lea (%eax,%eax,4),%eax 10b602: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; 10b605: 8d 04 02 lea (%edx,%eax,1),%eax /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10b608: 3b 05 ac 46 12 00 cmp 0x1246ac,%eax 10b60e: 73 0c jae 10b61c /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; 10b610: 31 c0 xor %eax,%eax } 10b612: 8d 65 f4 lea -0xc(%ebp),%esp 10b615: 5b pop %ebx 10b616: 5e pop %esi 10b617: 5f pop %edi 10b618: c9 leave 10b619: c3 ret 10b61a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b61c: a1 b4 8a 12 00 mov 0x128ab4,%eax 10b621: 40 inc %eax 10b622: a3 b4 8a 12 00 mov %eax,0x128ab4 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10b627: 83 ec 0c sub $0xc,%esp 10b62a: 8d 7d e0 lea -0x20(%ebp),%edi 10b62d: 57 push %edi 10b62e: e8 79 17 00 00 call 10cdac <_TOD_Get> ts.tv_sec += delta->tv_sec; 10b633: 8b 03 mov (%ebx),%eax 10b635: 01 45 e0 add %eax,-0x20(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10b638: 8b 43 04 mov 0x4(%ebx),%eax 10b63b: 8d 04 80 lea (%eax,%eax,4),%eax 10b63e: 8d 04 80 lea (%eax,%eax,4),%eax 10b641: 8d 04 80 lea (%eax,%eax,4),%eax 10b644: c1 e0 03 shl $0x3,%eax 10b647: 03 45 e4 add -0x1c(%ebp),%eax 10b64a: 89 45 e4 mov %eax,-0x1c(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10b64d: 83 c4 10 add $0x10,%esp 10b650: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b655: 76 18 jbe 10b66f 10b657: 8b 55 e0 mov -0x20(%ebp),%edx 10b65a: 66 90 xchg %ax,%ax ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10b65c: 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( 10b661: 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 ) { 10b662: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b667: 77 f3 ja 10b65c <== NEVER TAKEN 10b669: 89 45 e4 mov %eax,-0x1c(%ebp) 10b66c: 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) ) { 10b66f: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b674: 77 19 ja 10b68f <== NEVER TAKEN 10b676: 8b 55 e0 mov -0x20(%ebp),%edx 10b679: 8d 76 00 lea 0x0(%esi),%esi ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10b67c: 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( 10b681: 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) ) { 10b682: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b687: 76 f3 jbe 10b67c 10b689: 89 45 e4 mov %eax,-0x1c(%ebp) 10b68c: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10b68f: 83 ec 0c sub $0xc,%esp 10b692: 57 push %edi 10b693: e8 a4 17 00 00 call 10ce3c <_TOD_Set> _Thread_Enable_dispatch(); 10b698: e8 c3 29 00 00 call 10e060 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10b69d: 83 c4 10 add $0x10,%esp 10b6a0: 85 f6 test %esi,%esi 10b6a2: 0f 84 68 ff ff ff je 10b610 *olddelta = *delta; 10b6a8: 8b 03 mov (%ebx),%eax 10b6aa: 8b 53 04 mov 0x4(%ebx),%edx 10b6ad: 89 06 mov %eax,(%esi) 10b6af: 89 56 04 mov %edx,0x4(%esi) return 0; 10b6b2: 31 c0 xor %eax,%eax } 10b6b4: 8d 65 f4 lea -0xc(%ebp),%esp 10b6b7: 5b pop %ebx 10b6b8: 5e pop %esi 10b6b9: 5f pop %edi 10b6ba: c9 leave 10b6bb: 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 ); 10b6bc: e8 8b 86 00 00 call 113d4c <__errno> 10b6c1: c7 00 16 00 00 00 movl $0x16,(%eax) 10b6c7: b8 ff ff ff ff mov $0xffffffff,%eax 10b6cc: e9 41 ff ff ff jmp 10b612 =============================================================================== 001092d0 : int cfsetospeed( struct termios *tp, speed_t speed ) { 1092d0: 55 push %ebp 1092d1: 89 e5 mov %esp,%ebp 1092d3: 83 ec 08 sub $0x8,%esp 1092d6: 8b 4d 08 mov 0x8(%ebp),%ecx 1092d9: 8b 55 0c mov 0xc(%ebp),%edx if ( speed & ~CBAUD ) 1092dc: f7 c2 f0 ef ff ff test $0xffffeff0,%edx 1092e2: 75 14 jne 1092f8 rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 1092e4: 8b 41 08 mov 0x8(%ecx),%eax 1092e7: 25 f0 ef ff ff and $0xffffeff0,%eax 1092ec: 09 d0 or %edx,%eax 1092ee: 89 41 08 mov %eax,0x8(%ecx) return 0; 1092f1: 31 c0 xor %eax,%eax } 1092f3: c9 leave 1092f4: c3 ret 1092f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 1092f8: e8 03 bb 00 00 call 114e00 <__errno> 1092fd: c7 00 16 00 00 00 movl $0x16,(%eax) 109303: b8 ff ff ff ff mov $0xffffffff,%eax tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; return 0; } 109308: c9 leave 109309: c3 ret =============================================================================== 001105b4 : #include int chdir( const char *pathname ) { 1105b4: 55 push %ebp 1105b5: 89 e5 mov %esp,%ebp 1105b7: 57 push %edi 1105b8: 56 push %esi 1105b9: 83 ec 20 sub $0x20,%esp 1105bc: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 1105bf: 85 d2 test %edx,%edx 1105c1: 74 75 je 110638 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 1105c3: 31 c0 xor %eax,%eax 1105c5: b9 ff ff ff ff mov $0xffffffff,%ecx 1105ca: 89 d7 mov %edx,%edi 1105cc: f2 ae repnz scas %es:(%edi),%al 1105ce: f7 d1 not %ecx 1105d0: 49 dec %ecx 1105d1: 83 ec 0c sub $0xc,%esp 1105d4: 6a 01 push $0x1 1105d6: 8d 75 e4 lea -0x1c(%ebp),%esi 1105d9: 56 push %esi 1105da: 6a 01 push $0x1 1105dc: 51 push %ecx 1105dd: 52 push %edx 1105de: e8 f5 7d ff ff call 1083d8 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 1105e3: 83 c4 20 add $0x20,%esp 1105e6: 85 c0 test %eax,%eax 1105e8: 74 0e je 1105f8 return -1; 1105ea: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 1105ef: 8d 65 f8 lea -0x8(%ebp),%esp 1105f2: 5e pop %esi 1105f3: 5f pop %edi 1105f4: c9 leave 1105f5: c3 ret 1105f6: 66 90 xchg %ax,%ax <== NOT EXECUTED return -1; /* * Verify you can change directory into this node. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1105f8: 83 ec 0c sub $0xc,%esp 1105fb: 56 push %esi 1105fc: 8b 45 f0 mov -0x10(%ebp),%eax 1105ff: ff 50 10 call *0x10(%eax) 110602: 83 c4 10 add $0x10,%esp 110605: 48 dec %eax 110606: 75 48 jne 110650 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 110608: 83 ec 0c sub $0xc,%esp 11060b: a1 d0 59 12 00 mov 0x1259d0,%eax 110610: 83 c0 04 add $0x4,%eax 110613: 50 push %eax 110614: e8 97 7e ff ff call 1084b0 rtems_filesystem_current = loc; 110619: 8b 3d d0 59 12 00 mov 0x1259d0,%edi 11061f: 83 c7 04 add $0x4,%edi 110622: b9 05 00 00 00 mov $0x5,%ecx 110627: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 110629: 83 c4 10 add $0x10,%esp 11062c: 31 c0 xor %eax,%eax } 11062e: 8d 65 f8 lea -0x8(%ebp),%esp 110631: 5e pop %esi 110632: 5f pop %edi 110633: c9 leave 110634: c3 ret 110635: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 110638: e8 e7 34 00 00 call 113b24 <__errno> 11063d: c7 00 0e 00 00 00 movl $0xe,(%eax) 110643: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 110648: 8d 65 f8 lea -0x8(%ebp),%esp 11064b: 5e pop %esi 11064c: 5f pop %edi 11064d: c9 leave 11064e: c3 ret 11064f: 90 nop <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 110650: 83 ec 0c sub $0xc,%esp 110653: 56 push %esi 110654: e8 57 7e ff ff call 1084b0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 110659: e8 c6 34 00 00 call 113b24 <__errno> 11065e: c7 00 14 00 00 00 movl $0x14,(%eax) 110664: 83 c4 10 add $0x10,%esp 110667: b8 ff ff ff ff mov $0xffffffff,%eax 11066c: eb 81 jmp 1105ef =============================================================================== 00109748 : int chmod( const char *path, mode_t mode ) { 109748: 55 push %ebp 109749: 89 e5 mov %esp,%ebp 10974b: 57 push %edi 10974c: 53 push %ebx 10974d: 83 ec 3c sub $0x3c,%esp 109750: 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 ); 109753: 31 c0 xor %eax,%eax 109755: b9 ff ff ff ff mov $0xffffffff,%ecx 10975a: 89 d7 mov %edx,%edi 10975c: f2 ae repnz scas %es:(%edi),%al 10975e: f7 d1 not %ecx 109760: 49 dec %ecx 109761: 6a 01 push $0x1 109763: 8d 5d e4 lea -0x1c(%ebp),%ebx 109766: 53 push %ebx 109767: 6a 00 push $0x0 109769: 51 push %ecx 10976a: 52 push %edx 10976b: e8 30 01 00 00 call 1098a0 if ( status != 0 ) 109770: 83 c4 20 add $0x20,%esp 109773: 85 c0 test %eax,%eax 109775: 74 0d je 109784 return -1; 109777: b8 ff ff ff ff mov $0xffffffff,%eax result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 10977c: 8d 65 f8 lea -0x8(%ebp),%esp 10977f: 5b pop %ebx 109780: 5f pop %edi 109781: c9 leave 109782: c3 ret 109783: 90 nop <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; result = (*loc.handlers->fchmod_h)( &loc, mode ); 109784: 83 ec 08 sub $0x8,%esp 109787: ff 75 0c pushl 0xc(%ebp) 10978a: 53 push %ebx 10978b: 8b 45 ec mov -0x14(%ebp),%eax 10978e: ff 50 1c call *0x1c(%eax) rtems_filesystem_freenode( &loc ); 109791: 89 1c 24 mov %ebx,(%esp) 109794: 89 45 d4 mov %eax,-0x2c(%ebp) 109797: e8 dc 01 00 00 call 109978 return result; 10979c: 83 c4 10 add $0x10,%esp 10979f: 8b 45 d4 mov -0x2c(%ebp),%eax } 1097a2: 8d 65 f8 lea -0x8(%ebp),%esp 1097a5: 5b pop %ebx 1097a6: 5f pop %edi 1097a7: c9 leave 1097a8: c3 ret =============================================================================== 00108240 : #include int chroot( const char *pathname ) { 108240: 55 push %ebp 108241: 89 e5 mov %esp,%ebp 108243: 57 push %edi 108244: 56 push %esi 108245: 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) { 108248: 81 3d d0 59 12 00 60 cmpl $0x127c60,0x1259d0 10824f: 7c 12 00 108252: 74 60 je 1082b4 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); 108254: 83 ec 0c sub $0xc,%esp 108257: ff 75 08 pushl 0x8(%ebp) 10825a: e8 55 83 00 00 call 1105b4 if (result) { 10825f: 83 c4 10 add $0x10,%esp 108262: 85 c0 test %eax,%eax 108264: 75 72 jne 1082d8 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 108266: 83 ec 0c sub $0xc,%esp 108269: 6a 00 push $0x0 10826b: 8d 75 e4 lea -0x1c(%ebp),%esi 10826e: 56 push %esi 10826f: 6a 00 push $0x0 108271: 6a 01 push $0x1 108273: 68 d6 18 12 00 push $0x1218d6 108278: e8 5b 01 00 00 call 1083d8 10827d: 83 c4 20 add $0x20,%esp 108280: 85 c0 test %eax,%eax 108282: 75 54 jne 1082d8 <== NEVER TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 108284: 83 ec 0c sub $0xc,%esp 108287: a1 d0 59 12 00 mov 0x1259d0,%eax 10828c: 83 c0 18 add $0x18,%eax 10828f: 50 push %eax 108290: e8 1b 02 00 00 call 1084b0 rtems_filesystem_root = loc; 108295: 8b 3d d0 59 12 00 mov 0x1259d0,%edi 10829b: 83 c7 18 add $0x18,%edi 10829e: b9 05 00 00 00 mov $0x5,%ecx 1082a3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 1082a5: 83 c4 10 add $0x10,%esp 1082a8: 31 c0 xor %eax,%eax } 1082aa: 8d 65 f8 lea -0x8(%ebp),%esp 1082ad: 5e pop %esi 1082ae: 5f pop %edi 1082af: c9 leave 1082b0: c3 ret 1082b1: 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*/ 1082b4: e8 a7 12 00 00 call 109560 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 1082b9: 81 3d d0 59 12 00 60 cmpl $0x127c60,0x1259d0 1082c0: 7c 12 00 1082c3: 75 8f jne 108254 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1082c5: e8 5a b8 00 00 call 113b24 <__errno> 1082ca: c7 00 86 00 00 00 movl $0x86,(%eax) 1082d0: 83 c8 ff or $0xffffffff,%eax 1082d3: eb d5 jmp 1082aa 1082d5: 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 ); 1082d8: e8 47 b8 00 00 call 113b24 <__errno> 1082dd: 89 c6 mov %eax,%esi 1082df: e8 40 b8 00 00 call 113b24 <__errno> 1082e4: 8b 00 mov (%eax),%eax 1082e6: 89 06 mov %eax,(%esi) 1082e8: b8 ff ff ff ff mov $0xffffffff,%eax 1082ed: eb bb jmp 1082aa =============================================================================== 0010b424 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10b424: 55 push %ebp 10b425: 89 e5 mov %esp,%ebp 10b427: 83 ec 08 sub $0x8,%esp 10b42a: 8b 45 08 mov 0x8(%ebp),%eax 10b42d: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10b430: 85 d2 test %edx,%edx 10b432: 74 14 je 10b448 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10b434: 83 f8 01 cmp $0x1,%eax 10b437: 74 47 je 10b480 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10b439: 83 f8 04 cmp $0x4,%eax 10b43c: 74 32 je 10b470 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 10b43e: 83 f8 02 cmp $0x2,%eax 10b441: 74 2d je 10b470 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 10b443: 83 f8 03 cmp $0x3,%eax 10b446: 74 14 je 10b45c rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b448: e8 37 8e 00 00 call 114284 <__errno> 10b44d: c7 00 16 00 00 00 movl $0x16,(%eax) 10b453: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10b458: c9 leave 10b459: c3 ret 10b45a: 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 ); 10b45c: e8 23 8e 00 00 call 114284 <__errno> 10b461: c7 00 58 00 00 00 movl $0x58,(%eax) 10b467: b8 ff ff ff ff mov $0xffffffff,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b46c: c9 leave 10b46d: c3 ret 10b46e: 66 90 xchg %ax,%ax <== NOT EXECUTED } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 10b470: 83 ec 0c sub $0xc,%esp 10b473: 52 push %edx 10b474: e8 8f 1e 00 00 call 10d308 <_TOD_Get_uptime_as_timespec> return 0; 10b479: 83 c4 10 add $0x10,%esp 10b47c: 31 c0 xor %eax,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b47e: c9 leave 10b47f: c3 ret { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 10b480: 83 ec 0c sub $0xc,%esp 10b483: 52 push %edx 10b484: e8 23 1e 00 00 call 10d2ac <_TOD_Get> return 0; 10b489: 83 c4 10 add $0x10,%esp 10b48c: 31 c0 xor %eax,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b48e: c9 leave 10b48f: c3 ret =============================================================================== 0010b490 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 10b490: 55 push %ebp 10b491: 89 e5 mov %esp,%ebp 10b493: 83 ec 08 sub $0x8,%esp 10b496: 8b 45 08 mov 0x8(%ebp),%eax 10b499: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10b49c: 85 d2 test %edx,%edx 10b49e: 74 0f je 10b4af <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10b4a0: 83 f8 01 cmp $0x1,%eax 10b4a3: 74 1f je 10b4c4 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 10b4a5: 83 f8 02 cmp $0x2,%eax 10b4a8: 74 42 je 10b4ec rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 10b4aa: 83 f8 03 cmp $0x3,%eax 10b4ad: 74 3d je 10b4ec rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 10b4af: e8 d0 8d 00 00 call 114284 <__errno> 10b4b4: c7 00 16 00 00 00 movl $0x16,(%eax) 10b4ba: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10b4bf: c9 leave 10b4c0: c3 ret 10b4c1: 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 ) 10b4c4: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 10b4ca: 76 e3 jbe 10b4af rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b4cc: a1 54 85 12 00 mov 0x128554,%eax 10b4d1: 40 inc %eax 10b4d2: a3 54 85 12 00 mov %eax,0x128554 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 10b4d7: 83 ec 0c sub $0xc,%esp 10b4da: 52 push %edx 10b4db: e8 80 1e 00 00 call 10d360 <_TOD_Set> _Thread_Enable_dispatch(); 10b4e0: e8 9f 30 00 00 call 10e584 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 10b4e5: 83 c4 10 add $0x10,%esp 10b4e8: 31 c0 xor %eax,%eax } 10b4ea: c9 leave 10b4eb: 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 ); 10b4ec: e8 93 8d 00 00 call 114284 <__errno> 10b4f1: c7 00 58 00 00 00 movl $0x58,(%eax) 10b4f7: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b4fc: c9 leave 10b4fd: c3 ret =============================================================================== 0010fb38 : #include int close( int fd ) { 10fb38: 55 push %ebp 10fb39: 89 e5 mov %esp,%ebp 10fb3b: 53 push %ebx 10fb3c: 83 ec 14 sub $0x14,%esp 10fb3f: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10fb42: 3b 05 4c 21 12 00 cmp 0x12214c,%eax 10fb48: 73 46 jae 10fb90 iop = rtems_libio_iop(fd); 10fb4a: c1 e0 03 shl $0x3,%eax 10fb4d: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 10fb54: 29 c3 sub %eax,%ebx 10fb56: 03 1d 60 63 12 00 add 0x126360,%ebx rtems_libio_check_is_open(iop); 10fb5c: f6 43 15 01 testb $0x1,0x15(%ebx) 10fb60: 74 2e je 10fb90 rc = RTEMS_SUCCESSFUL; rc = (*iop->pathinfo.handlers->close_h)( iop ); 10fb62: 83 ec 0c sub $0xc,%esp 10fb65: 8b 43 20 mov 0x20(%ebx),%eax 10fb68: 53 push %ebx 10fb69: ff 50 04 call *0x4(%eax) rtems_filesystem_freenode( &iop->pathinfo ); 10fb6c: 8d 53 18 lea 0x18(%ebx),%edx 10fb6f: 89 14 24 mov %edx,(%esp) 10fb72: 89 45 f4 mov %eax,-0xc(%ebp) 10fb75: e8 06 85 ff ff call 108080 rtems_libio_free( iop ); 10fb7a: 89 1c 24 mov %ebx,(%esp) 10fb7d: e8 26 02 00 00 call 10fda8 return rc; 10fb82: 83 c4 10 add $0x10,%esp 10fb85: 8b 45 f4 mov -0xc(%ebp),%eax } 10fb88: 8b 5d fc mov -0x4(%ebp),%ebx 10fb8b: c9 leave 10fb8c: c3 ret 10fb8d: 8d 76 00 lea 0x0(%esi),%esi <== 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); 10fb90: e8 03 37 00 00 call 113298 <__errno> 10fb95: c7 00 09 00 00 00 movl $0x9,(%eax) 10fb9b: b8 ff ff ff ff mov $0xffffffff,%eax 10fba0: eb e6 jmp 10fb88 =============================================================================== 001081dc : static char *ctermid_name = "/dev/console"; char *ctermid( char *s ) { 1081dc: 55 push %ebp 1081dd: 89 e5 mov %esp,%ebp 1081df: 57 push %edi 1081e0: 56 push %esi 1081e1: 8b 45 08 mov 0x8(%ebp),%eax if ( !s ) 1081e4: 85 c0 test %eax,%eax 1081e6: 74 14 je 1081fc /* * We have no way of knowing the length of the user provided buffer. * It may not be large enough but there is no way to know that. :( * So this is a potential buffer owerrun that we can do nothing about. */ strcpy( s, ctermid_name ); 1081e8: be a3 d5 11 00 mov $0x11d5a3,%esi 1081ed: b9 0d 00 00 00 mov $0xd,%ecx 1081f2: 89 c7 mov %eax,%edi 1081f4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) return s; } 1081f6: 5e pop %esi 1081f7: 5f pop %edi 1081f8: c9 leave 1081f9: c3 ret 1081fa: 66 90 xchg %ax,%ax <== NOT EXECUTED char *ctermid( char *s ) { if ( !s ) return ctermid_name; 1081fc: b8 a3 d5 11 00 mov $0x11d5a3,%eax * It may not be large enough but there is no way to know that. :( * So this is a potential buffer owerrun that we can do nothing about. */ strcpy( s, ctermid_name ); return s; } 108201: 5e pop %esi 108202: 5f pop %edi 108203: c9 leave 108204: c3 ret =============================================================================== 0010ed68 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10ed68: 55 push %ebp 10ed69: 89 e5 mov %esp,%ebp 10ed6b: 57 push %edi 10ed6c: 56 push %esi 10ed6d: 53 push %ebx 10ed6e: 83 ec 1c sub $0x1c,%esp int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 10ed71: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10ed78: 0f 85 96 00 00 00 jne 10ee14 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10ed7e: 8b 45 14 mov 0x14(%ebp),%eax 10ed81: 8b 00 mov (%eax),%eax 10ed83: 89 45 e4 mov %eax,-0x1c(%ebp) if (!device_name_table) 10ed86: 85 c0 test %eax,%eax 10ed88: 0f 84 98 00 00 00 je 10ee26 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10ed8e: 8b 15 d0 0b 12 00 mov 0x120bd0,%edx 10ed94: 89 55 e0 mov %edx,-0x20(%ebp) 10ed97: 85 d2 test %edx,%edx 10ed99: 74 38 je 10edd3 <== NEVER TAKEN 10ed9b: 31 c0 xor %eax,%eax 10ed9d: 31 db xor %ebx,%ebx if (!device_name_table[i].device_name) 10ed9f: 8d 04 80 lea (%eax,%eax,4),%eax 10eda2: 8b 55 e4 mov -0x1c(%ebp),%edx 10eda5: 8d 3c 82 lea (%edx,%eax,4),%edi 10eda8: 8b 37 mov (%edi),%esi 10edaa: 85 f6 test %esi,%esi 10edac: 74 1d je 10edcb continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10edae: 50 push %eax 10edaf: ff 75 0c pushl 0xc(%ebp) 10edb2: 56 push %esi 10edb3: ff 75 08 pushl 0x8(%ebp) 10edb6: e8 b9 32 00 00 call 112074 10edbb: 83 c4 10 add $0x10,%esp 10edbe: 85 c0 test %eax,%eax 10edc0: 75 09 jne 10edcb continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10edc2: 8b 45 0c mov 0xc(%ebp),%eax 10edc5: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1) 10edc9: 74 21 je 10edec <== ALWAYS TAKEN /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10edcb: 43 inc %ebx 10edcc: 89 d8 mov %ebx,%eax 10edce: 39 5d e0 cmp %ebx,-0x20(%ebp) 10edd1: 77 cc ja 10ed9f pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10edd3: e8 60 26 00 00 call 111438 <__errno> 10edd8: c7 00 02 00 00 00 movl $0x2,(%eax) 10edde: b8 ff ff ff ff mov $0xffffffff,%eax } 10ede3: 8d 65 f4 lea -0xc(%ebp),%esp 10ede6: 5b pop %ebx 10ede7: 5e pop %esi 10ede8: 5f pop %edi 10ede9: c9 leave 10edea: c3 ret 10edeb: 90 nop <== 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]; 10edec: 8b 55 14 mov 0x14(%ebp),%edx 10edef: 89 3a mov %edi,(%edx) pathloc->handlers = &devFS_file_handlers; 10edf1: c7 42 08 00 2b 12 00 movl $0x122b00,0x8(%edx) pathloc->ops = &devFS_ops; 10edf8: c7 42 0c a0 2a 12 00 movl $0x122aa0,0xc(%edx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10edff: a1 70 2c 12 00 mov 0x122c70,%eax 10ee04: 8b 40 28 mov 0x28(%eax),%eax 10ee07: 89 42 10 mov %eax,0x10(%edx) return 0; 10ee0a: 31 c0 xor %eax,%eax } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 10ee0c: 8d 65 f4 lea -0xc(%ebp),%esp 10ee0f: 5b pop %ebx 10ee10: 5e pop %esi 10ee11: 5f pop %edi 10ee12: c9 leave 10ee13: c3 ret int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10ee14: e8 1f 26 00 00 call 111438 <__errno> <== NOT EXECUTED 10ee19: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10ee1f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10ee24: eb e6 jmp 10ee0c <== NOT EXECUTED /* 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 ); 10ee26: e8 0d 26 00 00 call 111438 <__errno> 10ee2b: c7 00 0e 00 00 00 movl $0xe,(%eax) 10ee31: 83 c8 ff or $0xffffffff,%eax 10ee34: eb d6 jmp 10ee0c =============================================================================== 00107ab0 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 107ab0: 55 push %ebp 107ab1: 89 e5 mov %esp,%ebp 107ab3: 83 ec 1c sub $0x1c,%esp 107ab6: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 107ab9: 8b 42 18 mov 0x18(%edx),%eax args.iop = iop; 107abc: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 107abf: 8b 55 0c mov 0xc(%ebp),%edx 107ac2: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 107ac5: 8b 55 10 mov 0x10(%ebp),%edx 107ac8: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( np->major, np->minor, (void *) &args 107acb: 8d 55 e8 lea -0x18(%ebp),%edx args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 107ace: 52 push %edx 107acf: ff 70 0c pushl 0xc(%eax) 107ad2: ff 70 08 pushl 0x8(%eax) 107ad5: e8 12 40 00 00 call 10baec np->major, np->minor, (void *) &args ); if ( status ) 107ada: 83 c4 10 add $0x10,%esp 107add: 85 c0 test %eax,%eax 107adf: 75 07 jne 107ae8 return rtems_deviceio_errno(status); return args.ioctl_return; 107ae1: 8b 45 f4 mov -0xc(%ebp),%eax } 107ae4: c9 leave 107ae5: c3 ret 107ae6: 66 90 xchg %ax,%ax <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107ae8: 83 ec 0c sub $0xc,%esp 107aeb: 50 push %eax 107aec: e8 57 73 00 00 call 10ee48 107af1: 83 c4 10 add $0x10,%esp return args.ioctl_return; } 107af4: c9 leave 107af5: c3 ret =============================================================================== 001078f4 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 1078f4: 55 push %ebp 1078f5: 89 e5 mov %esp,%ebp 1078f7: 57 push %edi 1078f8: 56 push %esi 1078f9: 53 push %ebx 1078fa: 83 ec 1c sub $0x1c,%esp 1078fd: 8b 7d 08 mov 0x8(%ebp),%edi 107900: 8b 4d 10 mov 0x10(%ebp),%ecx 107903: 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') && 107906: 80 3f 64 cmpb $0x64,(%edi) 107909: 0f 84 dd 00 00 00 je 1079ec (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 10790f: 8b 45 0c mov 0xc(%ebp),%eax 107912: 25 00 f0 00 00 and $0xf000,%eax 107917: 3d 00 60 00 00 cmp $0x6000,%eax 10791c: 74 0b je 107929 10791e: 3d 00 20 00 00 cmp $0x2000,%eax 107923: 0f 85 e5 00 00 00 jne 107a0e ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 107929: 89 4d dc mov %ecx,-0x24(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 10792c: 89 55 d8 mov %edx,-0x28(%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; 10792f: 8b 45 18 mov 0x18(%ebp),%eax 107932: 8b 30 mov (%eax),%esi if (!device_name_table) 107934: 85 f6 test %esi,%esi 107936: 0f 84 f4 00 00 00 je 107a30 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 10793c: 8b 15 d0 0b 12 00 mov 0x120bd0,%edx 107942: 85 d2 test %edx,%edx 107944: 0f 84 d6 00 00 00 je 107a20 10794a: 31 c0 xor %eax,%eax 10794c: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 107953: 31 db xor %ebx,%ebx 107955: 89 7d e4 mov %edi,-0x1c(%ebp) 107958: 89 d7 mov %edx,%edi 10795a: eb 1a jmp 107976 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 10795c: 83 ec 08 sub $0x8,%esp 10795f: 50 push %eax 107960: ff 75 e4 pushl -0x1c(%ebp) 107963: e8 b4 a6 00 00 call 11201c 107968: 83 c4 10 add $0x10,%esp 10796b: 85 c0 test %eax,%eax 10796d: 74 65 je 1079d4 /* 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++){ 10796f: 43 inc %ebx 107970: 89 d8 mov %ebx,%eax 107972: 39 fb cmp %edi,%ebx 107974: 73 16 jae 10798c if (device_name_table[i].device_name == NULL) 107976: 8d 04 80 lea (%eax,%eax,4),%eax 107979: 8b 04 86 mov (%esi,%eax,4),%eax 10797c: 85 c0 test %eax,%eax 10797e: 75 dc jne 10795c 107980: 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++){ 107983: 43 inc %ebx 107984: 89 d8 mov %ebx,%eax 107986: 39 fb cmp %edi,%ebx 107988: 72 ec jb 107976 10798a: 66 90 xchg %ax,%ax 10798c: 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) 10798f: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp) 107993: 0f 84 87 00 00 00 je 107a20 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 107999: 9c pushf 10799a: fa cli 10799b: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 10799c: 8b 55 e0 mov -0x20(%ebp),%edx 10799f: 8d 04 92 lea (%edx,%edx,4),%eax 1079a2: 8d 14 86 lea (%esi,%eax,4),%edx 1079a5: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 1079a7: 31 c0 xor %eax,%eax 1079a9: b9 ff ff ff ff mov $0xffffffff,%ecx 1079ae: f2 ae repnz scas %es:(%edi),%al 1079b0: f7 d1 not %ecx 1079b2: 49 dec %ecx 1079b3: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 1079b6: 8b 45 dc mov -0x24(%ebp),%eax 1079b9: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 1079bc: 8b 45 d8 mov -0x28(%ebp),%eax 1079bf: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 1079c2: 8b 45 0c mov 0xc(%ebp),%eax 1079c5: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 1079c8: 53 push %ebx 1079c9: 9d popf return 0; 1079ca: 31 c0 xor %eax,%eax } 1079cc: 8d 65 f4 lea -0xc(%ebp),%esp 1079cf: 5b pop %ebx 1079d0: 5e pop %esi 1079d1: 5f pop %edi 1079d2: c9 leave 1079d3: 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 ); 1079d4: e8 5f 9a 00 00 call 111438 <__errno> 1079d9: c7 00 11 00 00 00 movl $0x11,(%eax) 1079df: b8 ff ff ff ff mov $0xffffffff,%eax device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 1079e4: 8d 65 f4 lea -0xc(%ebp),%esp 1079e7: 5b pop %ebx 1079e8: 5e pop %esi 1079e9: 5f pop %edi 1079ea: c9 leave 1079eb: c3 ret * 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') && 1079ec: 80 7f 01 65 cmpb $0x65,0x1(%edi) 1079f0: 0f 85 19 ff ff ff jne 10790f <== NEVER TAKEN 1079f6: 80 7f 02 76 cmpb $0x76,0x2(%edi) 1079fa: 0f 85 0f ff ff ff jne 10790f <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 107a00: 80 7f 03 00 cmpb $0x0,0x3(%edi) 107a04: 0f 85 05 ff ff ff jne 10790f return 0; 107a0a: 31 c0 xor %eax,%eax 107a0c: eb be jmp 1079cc /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 107a0e: e8 25 9a 00 00 call 111438 <__errno> 107a13: c7 00 16 00 00 00 movl $0x16,(%eax) 107a19: b8 ff ff ff ff mov $0xffffffff,%eax 107a1e: eb ac jmp 1079cc 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 ); 107a20: e8 13 9a 00 00 call 111438 <__errno> 107a25: c7 00 0c 00 00 00 movl $0xc,(%eax) 107a2b: 83 c8 ff or $0xffffffff,%eax 107a2e: eb 9c jmp 1079cc 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 ); 107a30: e8 03 9a 00 00 call 111438 <__errno> 107a35: c7 00 0e 00 00 00 movl $0xe,(%eax) 107a3b: 83 c8 ff or $0xffffffff,%eax 107a3e: eb 8c jmp 1079cc =============================================================================== 00107b2c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 107b2c: 55 push %ebp 107b2d: 89 e5 mov %esp,%ebp 107b2f: 53 push %ebx 107b30: 83 ec 28 sub $0x28,%esp 107b33: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 107b36: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 107b39: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107b3c: 8b 48 0c mov 0xc(%eax),%ecx 107b3f: 8b 58 10 mov 0x10(%eax),%ebx 107b42: 89 4d e0 mov %ecx,-0x20(%ebp) 107b45: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = buffer; 107b48: 8b 4d 0c mov 0xc(%ebp),%ecx 107b4b: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107b4e: 8b 4d 10 mov 0x10(%ebp),%ecx 107b51: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107b54: 8b 40 14 mov 0x14(%eax),%eax 107b57: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107b5a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_read( np->major, np->minor, (void *) &args 107b61: 8d 45 dc lea -0x24(%ebp),%eax args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 107b64: 50 push %eax 107b65: ff 72 0c pushl 0xc(%edx) 107b68: ff 72 08 pushl 0x8(%edx) 107b6b: e8 c4 40 00 00 call 10bc34 np->major, np->minor, (void *) &args ); if ( status ) 107b70: 83 c4 10 add $0x10,%esp 107b73: 85 c0 test %eax,%eax 107b75: 75 09 jne 107b80 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107b77: 8b 45 f4 mov -0xc(%ebp),%eax } 107b7a: 8b 5d fc mov -0x4(%ebp),%ebx 107b7d: c9 leave 107b7e: c3 ret 107b7f: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107b80: 83 ec 0c sub $0xc,%esp 107b83: 50 push %eax 107b84: e8 bf 72 00 00 call 10ee48 107b89: 83 c4 10 add $0x10,%esp return (ssize_t) args.bytes_moved; } 107b8c: 8b 5d fc mov -0x4(%ebp),%ebx 107b8f: c9 leave 107b90: c3 ret =============================================================================== 00107bb8 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 107bb8: 55 push %ebp 107bb9: 89 e5 mov %esp,%ebp 107bbb: 53 push %ebx 107bbc: 83 ec 28 sub $0x28,%esp 107bbf: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 107bc2: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 107bc5: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107bc8: 8b 48 0c mov 0xc(%eax),%ecx 107bcb: 8b 58 10 mov 0x10(%eax),%ebx 107bce: 89 4d e0 mov %ecx,-0x20(%ebp) 107bd1: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107bd4: 8b 4d 0c mov 0xc(%ebp),%ecx 107bd7: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107bda: 8b 4d 10 mov 0x10(%ebp),%ecx 107bdd: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107be0: 8b 40 14 mov 0x14(%eax),%eax 107be3: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107be6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( np->major, np->minor, (void *) &args 107bed: 8d 45 dc lea -0x24(%ebp),%eax args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 107bf0: 50 push %eax 107bf1: ff 72 0c pushl 0xc(%edx) 107bf4: ff 72 08 pushl 0x8(%edx) 107bf7: e8 78 40 00 00 call 10bc74 np->major, np->minor, (void *) &args ); if ( status ) 107bfc: 83 c4 10 add $0x10,%esp 107bff: 85 c0 test %eax,%eax 107c01: 75 09 jne 107c0c return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107c03: 8b 45 f4 mov -0xc(%ebp),%eax } 107c06: 8b 5d fc mov -0x4(%ebp),%ebx 107c09: c9 leave 107c0a: c3 ret 107c0b: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107c0c: 83 ec 0c sub $0xc,%esp 107c0f: 50 push %eax 107c10: e8 33 72 00 00 call 10ee48 107c15: 83 c4 10 add $0x10,%esp return (ssize_t) args.bytes_moved; } 107c18: 8b 5d fc mov -0x4(%ebp),%ebx 107c1b: c9 leave 107c1c: c3 ret =============================================================================== 00112690 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 112690: 55 push %ebp 112691: 89 e5 mov %esp,%ebp 112693: 83 ec 1c sub $0x1c,%esp 112696: 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; 112699: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 11269c: 8b 55 0c mov 0xc(%ebp),%edx 11269f: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 1126a2: 8b 55 10 mov 0x10(%ebp),%edx 1126a5: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->pathinfo.node_access; 1126a8: 8b 40 18 mov 0x18(%eax),%eax status = rtems_io_control( the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args 1126ab: 8d 55 e8 lea -0x18(%ebp),%edx args.command = command; args.buffer = buffer; the_jnode = iop->pathinfo.node_access; status = rtems_io_control( 1126ae: 52 push %edx 1126af: ff 70 54 pushl 0x54(%eax) 1126b2: ff 70 50 pushl 0x50(%eax) 1126b5: e8 02 09 00 00 call 112fbc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1126ba: 83 c4 10 add $0x10,%esp 1126bd: 85 c0 test %eax,%eax 1126bf: 75 07 jne 1126c8 return rtems_deviceio_errno(status); return args.ioctl_return; 1126c1: 8b 45 f4 mov -0xc(%ebp),%eax } 1126c4: c9 leave 1126c5: c3 ret 1126c6: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1126c8: 83 ec 0c sub $0xc,%esp 1126cb: 50 push %eax 1126cc: e8 3b 0b 00 00 call 11320c 1126d1: 83 c4 10 add $0x10,%esp return args.ioctl_return; } 1126d4: c9 leave 1126d5: c3 ret =============================================================================== 001125c0 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1125c0: 55 push %ebp 1125c1: 89 e5 mov %esp,%ebp 1125c3: 53 push %ebx 1125c4: 83 ec 28 sub $0x28,%esp 1125c7: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 1125ca: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 1125cd: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 1125d0: 8b 48 0c mov 0xc(%eax),%ecx 1125d3: 8b 58 10 mov 0x10(%eax),%ebx 1125d6: 89 4d e0 mov %ecx,-0x20(%ebp) 1125d9: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = buffer; 1125dc: 8b 4d 0c mov 0xc(%ebp),%ecx 1125df: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 1125e2: 8b 4d 10 mov 0x10(%ebp),%ecx 1125e5: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 1125e8: 8b 40 14 mov 0x14(%eax),%eax 1125eb: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 1125ee: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_read( the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args 1125f5: 8d 45 dc lea -0x24(%ebp),%eax args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 1125f8: 50 push %eax 1125f9: ff 72 54 pushl 0x54(%edx) 1125fc: ff 72 50 pushl 0x50(%edx) 1125ff: e8 38 0a 00 00 call 11303c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 112604: 83 c4 10 add $0x10,%esp 112607: 85 c0 test %eax,%eax 112609: 75 09 jne 112614 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 11260b: 8b 45 f4 mov -0xc(%ebp),%eax } 11260e: 8b 5d fc mov -0x4(%ebp),%ebx 112611: c9 leave 112612: c3 ret 112613: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 112614: 83 ec 0c sub $0xc,%esp 112617: 50 push %eax 112618: e8 ef 0b 00 00 call 11320c 11261d: 83 c4 10 add $0x10,%esp return (ssize_t) args.bytes_moved; } 112620: 8b 5d fc mov -0x4(%ebp),%ebx 112623: c9 leave 112624: c3 ret =============================================================================== 00112628 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 112628: 55 push %ebp 112629: 89 e5 mov %esp,%ebp 11262b: 53 push %ebx 11262c: 83 ec 28 sub $0x28,%esp 11262f: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 112632: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 112635: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 112638: 8b 48 0c mov 0xc(%eax),%ecx 11263b: 8b 58 10 mov 0x10(%eax),%ebx 11263e: 89 4d e0 mov %ecx,-0x20(%ebp) 112641: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 112644: 8b 4d 0c mov 0xc(%ebp),%ecx 112647: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 11264a: 8b 4d 10 mov 0x10(%ebp),%ecx 11264d: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 112650: 8b 40 14 mov 0x14(%eax),%eax 112653: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 112656: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args 11265d: 8d 45 dc lea -0x24(%ebp),%eax args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 112660: 50 push %eax 112661: ff 72 54 pushl 0x54(%edx) 112664: ff 72 50 pushl 0x50(%edx) 112667: e8 10 0a 00 00 call 11307c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 11266c: 83 c4 10 add $0x10,%esp 11266f: 85 c0 test %eax,%eax 112671: 75 09 jne 11267c return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 112673: 8b 45 f4 mov -0xc(%ebp),%eax } 112676: 8b 5d fc mov -0x4(%ebp),%ebx 112679: c9 leave 11267a: c3 ret 11267b: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 11267c: 83 ec 0c sub $0xc,%esp 11267f: 50 push %eax 112680: e8 87 0b 00 00 call 11320c 112685: 83 c4 10 add $0x10,%esp return (ssize_t) args.bytes_moved; } 112688: 8b 5d fc mov -0x4(%ebp),%ebx 11268b: c9 leave 11268c: c3 ret =============================================================================== 00108f84 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 108f84: 55 push %ebp 108f85: 89 e5 mov %esp,%ebp 108f87: 53 push %ebx 108f88: 83 ec 04 sub $0x4,%esp 108f8b: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 108f8d: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx 108f93: 85 d2 test %edx,%edx 108f95: 74 4d je 108fe4 rtems_interrupt_disable (level); 108f97: 9c pushf 108f98: fa cli 108f99: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 108f9a: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 108fa0: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 108fa6: 39 d1 cmp %edx,%ecx 108fa8: 74 38 je 108fe2 108faa: 66 90 xchg %ax,%ax tty->rawOutBufState = rob_wait; 108fac: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 108fb3: 00 00 00 rtems_interrupt_enable (level); 108fb6: 50 push %eax 108fb7: 9d popf sc = rtems_semaphore_obtain( 108fb8: 50 push %eax 108fb9: 6a 00 push $0x0 108fbb: 6a 00 push $0x0 108fbd: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108fc3: e8 c8 26 00 00 call 10b690 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 108fc8: 83 c4 10 add $0x10,%esp 108fcb: 85 c0 test %eax,%eax 108fcd: 75 1a jne 108fe9 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 108fcf: 9c pushf 108fd0: fa cli 108fd1: 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) { 108fd2: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 108fd8: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 108fde: 39 d1 cmp %edx,%ecx 108fe0: 75 ca jne 108fac <== NEVER TAKEN tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 108fe2: 50 push %eax 108fe3: 9d popf } } 108fe4: 8b 5d fc mov -0x4(%ebp),%ebx 108fe7: c9 leave 108fe8: c3 ret tty->rawOutBufState = rob_wait; 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); 108fe9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108fec: 50 push %eax <== NOT EXECUTED 108fed: e8 de 2c 00 00 call 10bcd0 <== NOT EXECUTED =============================================================================== 00109d1c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 109d1c: 55 push %ebp 109d1d: 89 e5 mov %esp,%ebp 109d1f: 53 push %ebx 109d20: 83 ec 24 sub $0x24,%esp if ((tty->termios.c_lflag & ECHOCTL) && 109d23: f6 42 3d 02 testb $0x2,0x3d(%edx) 109d27: 74 1b je 109d44 <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 109d29: 0f b6 c8 movzbl %al,%ecx * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 109d2c: 8b 1d 14 42 12 00 mov 0x124214,%ebx 109d32: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) 109d37: 74 0b je 109d44 iscntrl(c) && (c != '\t') && (c != '\n')) { 109d39: 3c 09 cmp $0x9,%al 109d3b: 74 07 je 109d44 109d3d: 3c 0a cmp $0xa,%al 109d3f: 75 13 jne 109d54 109d41: 8d 76 00 lea 0x0(%esi),%esi echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 109d44: 0f b6 c0 movzbl %al,%eax 109d47: e8 94 fe ff ff call 109be0 } } 109d4c: 8b 5d fc mov -0x4(%ebp),%ebx 109d4f: c9 leave 109d50: c3 ret 109d51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 109d54: c6 45 f6 5e movb $0x5e,-0xa(%ebp) echobuf[1] = c ^ 0x40; 109d58: 83 f0 40 xor $0x40,%eax 109d5b: 88 45 f7 mov %al,-0x9(%ebp) rtems_termios_puts (echobuf, 2, tty); 109d5e: 53 push %ebx 109d5f: 52 push %edx 109d60: 6a 02 push $0x2 109d62: 8d 45 f6 lea -0xa(%ebp),%eax 109d65: 50 push %eax 109d66: 89 55 e4 mov %edx,-0x1c(%ebp) 109d69: e8 3e fd ff ff call 109aac tty->column += 2; 109d6e: 8b 55 e4 mov -0x1c(%ebp),%edx 109d71: 83 42 28 02 addl $0x2,0x28(%edx) */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 109d75: 83 c4 10 add $0x10,%esp rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); } } 109d78: 8b 5d fc mov -0x4(%ebp),%ebx 109d7b: c9 leave 109d7c: c3 ret =============================================================================== 00108f44 : void endgrent(void) { 108f44: 55 push %ebp 108f45: 89 e5 mov %esp,%ebp 108f47: 83 ec 08 sub $0x8,%esp if (group_fp != NULL) 108f4a: a1 c0 89 12 00 mov 0x1289c0,%eax 108f4f: 85 c0 test %eax,%eax 108f51: 74 0c je 108f5f <== NEVER TAKEN fclose(group_fp); 108f53: 83 ec 0c sub $0xc,%esp 108f56: 50 push %eax 108f57: e8 e4 b2 00 00 call 114240 108f5c: 83 c4 10 add $0x10,%esp } 108f5f: c9 leave 108f60: c3 ret =============================================================================== 00108dec : void endpwent(void) { 108dec: 55 push %ebp 108ded: 89 e5 mov %esp,%ebp 108def: 83 ec 08 sub $0x8,%esp if (passwd_fp != NULL) 108df2: a1 a8 8a 12 00 mov 0x128aa8,%eax 108df7: 85 c0 test %eax,%eax 108df9: 74 0c je 108e07 <== NEVER TAKEN fclose(passwd_fp); 108dfb: 83 ec 0c sub $0xc,%esp 108dfe: 50 push %eax 108dff: e8 3c b4 00 00 call 114240 108e04: 83 c4 10 add $0x10,%esp } 108e07: c9 leave 108e08: c3 ret =============================================================================== 00109d80 : * 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) { 109d80: 55 push %ebp 109d81: 89 e5 mov %esp,%ebp 109d83: 57 push %edi 109d84: 56 push %esi 109d85: 53 push %ebx 109d86: 83 ec 1c sub $0x1c,%esp 109d89: 89 c3 mov %eax,%ebx 109d8b: 89 d7 mov %edx,%edi if (tty->ccount == 0) 109d8d: 8b 48 20 mov 0x20(%eax),%ecx 109d90: 85 c9 test %ecx,%ecx 109d92: 0f 84 84 00 00 00 je 109e1c return; if (lineFlag) { 109d98: 85 d2 test %edx,%edx 109d9a: 0f 85 84 00 00 00 jne 109e24 echo ('\n', tty); return; } } while (tty->ccount) { 109da0: 8b 50 3c mov 0x3c(%eax),%edx 109da3: 89 7d e4 mov %edi,-0x1c(%ebp) 109da6: eb 1d jmp 109dc5 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109da8: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 109dab: 0f 85 37 01 00 00 jne 109ee8 <== NOT EXECUTED 109db1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 109db4: 8b 75 e4 mov -0x1c(%ebp),%esi 109db7: 85 f6 test %esi,%esi 109db9: 74 61 je 109e1c <== NEVER TAKEN echo ('\n', tty); return; } } while (tty->ccount) { 109dbb: 8b 4b 20 mov 0x20(%ebx),%ecx 109dbe: 85 c9 test %ecx,%ecx 109dc0: 74 5a je 109e1c } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 109dc2: 8b 53 3c mov 0x3c(%ebx),%edx return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 109dc5: 8b 7b 1c mov 0x1c(%ebx),%edi 109dc8: 49 dec %ecx 109dc9: 89 4b 20 mov %ecx,0x20(%ebx) 109dcc: 8a 04 0f mov (%edi,%ecx,1),%al if (tty->termios.c_lflag & ECHO) { 109dcf: f6 c2 08 test $0x8,%dl 109dd2: 74 e0 je 109db4 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 109dd4: 8b 75 e4 mov -0x1c(%ebp),%esi 109dd7: 85 f6 test %esi,%esi 109dd9: 75 09 jne 109de4 109ddb: f6 c2 10 test $0x10,%dl 109dde: 0f 84 f0 00 00 00 je 109ed4 <== NEVER TAKEN echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 109de4: 3c 09 cmp $0x9,%al 109de6: 74 58 je 109e40 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109de8: 0f b6 c0 movzbl %al,%eax 109deb: 8d 70 01 lea 0x1(%eax),%esi 109dee: a1 14 42 12 00 mov 0x124214,%eax 109df3: f6 04 30 20 testb $0x20,(%eax,%esi,1) 109df7: 75 af jne 109da8 <== NEVER TAKEN 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); 109df9: 57 push %edi 109dfa: 53 push %ebx 109dfb: 6a 03 push $0x3 109dfd: 68 26 0b 12 00 push $0x120b26 109e02: e8 a5 fc ff ff call 109aac if (tty->column) 109e07: 8b 43 28 mov 0x28(%ebx),%eax 109e0a: 83 c4 10 add $0x10,%esp 109e0d: 85 c0 test %eax,%eax 109e0f: 74 a3 je 109db4 <== NEVER TAKEN tty->column--; 109e11: 48 dec %eax 109e12: 89 43 28 mov %eax,0x28(%ebx) } } } if (!lineFlag) 109e15: 8b 75 e4 mov -0x1c(%ebp),%esi 109e18: 85 f6 test %esi,%esi 109e1a: 75 9f jne 109dbb break; } } 109e1c: 8d 65 f4 lea -0xc(%ebp),%esp 109e1f: 5b pop %ebx 109e20: 5e pop %esi 109e21: 5f pop %edi 109e22: c9 leave 109e23: c3 ret erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 109e24: 8b 50 3c mov 0x3c(%eax),%edx 109e27: f6 c2 08 test $0x8,%dl 109e2a: 0f 84 94 00 00 00 je 109ec4 <== NEVER TAKEN tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 109e30: f6 c2 10 test $0x10,%dl 109e33: 0f 84 eb 00 00 00 je 109f24 <== NEVER TAKEN 109e39: 89 7d e4 mov %edi,-0x1c(%ebp) 109e3c: eb 87 jmp 109dc5 109e3e: 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; 109e40: 8b 73 2c mov 0x2c(%ebx),%esi int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109e43: 85 c9 test %ecx,%ecx 109e45: 74 46 je 109e8d c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 109e47: a1 14 42 12 00 mov 0x124214,%eax 109e4c: 89 45 dc mov %eax,-0x24(%ebp) 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; int i = 0; 109e4f: 31 c0 xor %eax,%eax while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 109e51: 81 e2 00 02 00 00 and $0x200,%edx 109e57: 89 55 e0 mov %edx,-0x20(%ebp) 109e5a: 89 5d d8 mov %ebx,-0x28(%ebp) 109e5d: 8b 5d dc mov -0x24(%ebp),%ebx 109e60: eb 10 jmp 109e72 109e62: 66 90 xchg %ax,%ax <== NOT EXECUTED 109e64: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109e67: 85 d2 test %edx,%edx <== NOT EXECUTED 109e69: 74 03 je 109e6e <== NOT EXECUTED col += 2; 109e6b: 83 c6 02 add $0x2,%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109e6e: 39 c1 cmp %eax,%ecx 109e70: 74 18 je 109e8a <== NEVER TAKEN c = tty->cbuf[i++]; 109e72: 8a 14 07 mov (%edi,%eax,1),%dl 109e75: 40 inc %eax if (c == '\t') { 109e76: 80 fa 09 cmp $0x9,%dl 109e79: 74 41 je 109ebc col = (col | 7) + 1; } else if (iscntrl (c)) { 109e7b: 0f b6 d2 movzbl %dl,%edx 109e7e: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) 109e83: 75 df jne 109e64 <== NEVER TAKEN if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 109e85: 46 inc %esi int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109e86: 39 c1 cmp %eax,%ecx 109e88: 75 e8 jne 109e72 109e8a: 8b 5d d8 mov -0x28(%ebp),%ebx } /* * Back up over the tab */ while (tty->column > col) { 109e8d: 3b 73 28 cmp 0x28(%ebx),%esi 109e90: 0f 8d 1e ff ff ff jge 109db4 <== NEVER TAKEN 109e96: 66 90 xchg %ax,%ax rtems_termios_puts ("\b", 1, tty); 109e98: 52 push %edx 109e99: 53 push %ebx 109e9a: 6a 01 push $0x1 109e9c: 68 28 0b 12 00 push $0x120b28 109ea1: e8 06 fc ff ff call 109aac tty->column--; 109ea6: 8b 43 28 mov 0x28(%ebx),%eax 109ea9: 48 dec %eax 109eaa: 89 43 28 mov %eax,0x28(%ebx) } /* * Back up over the tab */ while (tty->column > col) { 109ead: 83 c4 10 add $0x10,%esp 109eb0: 39 f0 cmp %esi,%eax 109eb2: 7f e4 jg 109e98 109eb4: e9 fb fe ff ff jmp 109db4 109eb9: 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; 109ebc: 83 ce 07 or $0x7,%esi 109ebf: 46 inc %esi 109ec0: eb ac jmp 109e6e 109ec2: 66 90 xchg %ax,%ax <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 109ec4: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED } } if (!lineFlag) break; } } 109ecb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109ece: 5b pop %ebx <== NOT EXECUTED 109ecf: 5e pop %esi <== NOT EXECUTED 109ed0: 5f pop %edi <== NOT EXECUTED 109ed1: c9 leave <== NOT EXECUTED 109ed2: c3 ret <== NOT EXECUTED 109ed3: 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); 109ed4: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 109ed8: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 109eda: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109edd: 5b pop %ebx <== NOT EXECUTED 109ede: 5e pop %esi <== NOT EXECUTED 109edf: 5f pop %edi <== NOT EXECUTED 109ee0: 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); 109ee1: e9 36 fe ff ff jmp 109d1c <== NOT EXECUTED 109ee6: 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); 109ee8: 50 push %eax <== NOT EXECUTED 109ee9: 53 push %ebx <== NOT EXECUTED 109eea: 6a 03 push $0x3 <== NOT EXECUTED 109eec: 68 26 0b 12 00 push $0x120b26 <== NOT EXECUTED 109ef1: e8 b6 fb ff ff call 109aac <== NOT EXECUTED if (tty->column) 109ef6: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109ef9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109efc: 85 c0 test %eax,%eax <== NOT EXECUTED 109efe: 74 04 je 109f04 <== NOT EXECUTED tty->column--; 109f00: 48 dec %eax <== NOT EXECUTED 109f01: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 109f04: a1 14 42 12 00 mov 0x124214,%eax <== NOT EXECUTED 109f09: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 109f0d: 0f 84 e6 fe ff ff je 109df9 <== NOT EXECUTED 109f13: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 109f17: 0f 85 dc fe ff ff jne 109df9 <== NOT EXECUTED 109f1d: e9 92 fe ff ff jmp 109db4 <== NOT EXECUTED 109f22: 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; 109f24: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 109f2b: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED 109f2f: 89 da mov %ebx,%edx <== NOT EXECUTED 109f31: e8 e6 fd ff ff call 109d1c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 109f36: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 109f3a: 0f 84 dc fe ff ff je 109e1c <== NOT EXECUTED echo ('\n', tty); 109f40: 89 da mov %ebx,%edx <== NOT EXECUTED 109f42: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 109f47: eb 91 jmp 109eda <== NOT EXECUTED =============================================================================== 00108b10 : #include int fchdir( int fd ) { 108b10: 55 push %ebp 108b11: 89 e5 mov %esp,%ebp 108b13: 57 push %edi 108b14: 56 push %esi 108b15: 53 push %ebx 108b16: 83 ec 4c sub $0x4c,%esp 108b19: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 108b1c: 3b 05 2c 45 12 00 cmp 0x12452c,%eax 108b22: 0f 83 d0 00 00 00 jae 108bf8 iop = rtems_libio_iop( fd ); 108b28: c1 e0 03 shl $0x3,%eax 108b2b: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 108b32: 29 c3 sub %eax,%ebx 108b34: 03 1d 40 87 12 00 add 0x128740,%ebx rtems_libio_check_is_open(iop); 108b3a: 8b 43 14 mov 0x14(%ebx),%eax 108b3d: f6 c4 01 test $0x1,%ah 108b40: 0f 84 b2 00 00 00 je 108bf8 /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108b46: a8 02 test $0x2,%al 108b48: 0f 84 be 00 00 00 je 108c0c /* * Verify you can change directory into this node. */ if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 108b4e: 83 ec 0c sub $0xc,%esp 108b51: 8b 43 24 mov 0x24(%ebx),%eax 108b54: 83 c3 18 add $0x18,%ebx 108b57: 53 push %ebx 108b58: ff 50 10 call *0x10(%eax) 108b5b: 83 c4 10 add $0x10,%esp 108b5e: 48 dec %eax 108b5f: 75 67 jne 108bc8 * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 108b61: a1 10 65 12 00 mov 0x126510,%eax 108b66: 8d 55 c0 lea -0x40(%ebp),%edx 108b69: 89 55 b4 mov %edx,-0x4c(%ebp) 108b6c: 8d 70 04 lea 0x4(%eax),%esi 108b6f: b9 05 00 00 00 mov $0x5,%ecx 108b74: 89 d7 mov %edx,%edi 108b76: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_current = iop->pathinfo; 108b78: 8d 78 04 lea 0x4(%eax),%edi 108b7b: b1 05 mov $0x5,%cl 108b7d: 89 de mov %ebx,%esi 108b7f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 108b81: 83 ec 0c sub $0xc,%esp 108b84: 6a 00 push $0x0 108b86: 8d 75 d4 lea -0x2c(%ebp),%esi 108b89: 56 push %esi 108b8a: 6a 00 push $0x0 108b8c: 6a 01 push $0x1 108b8e: 68 16 24 12 00 push $0x122416 108b93: e8 a0 fe ff ff call 108a38 108b98: 83 c4 20 add $0x20,%esp 108b9b: 85 c0 test %eax,%eax 108b9d: 75 3d jne 108bdc /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 108b9f: 83 ec 0c sub $0xc,%esp 108ba2: 8d 45 c0 lea -0x40(%ebp),%eax 108ba5: 50 push %eax 108ba6: e8 61 01 00 00 call 108d0c rtems_filesystem_current = loc; 108bab: 8b 3d 10 65 12 00 mov 0x126510,%edi 108bb1: 83 c7 04 add $0x4,%edi 108bb4: b9 05 00 00 00 mov $0x5,%ecx 108bb9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 108bbb: 83 c4 10 add $0x10,%esp 108bbe: 31 c0 xor %eax,%eax } 108bc0: 8d 65 f4 lea -0xc(%ebp),%esp 108bc3: 5b pop %ebx 108bc4: 5e pop %esi 108bc5: 5f pop %edi 108bc6: c9 leave 108bc7: c3 ret * Verify you can change directory into this node. */ if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 108bc8: e8 7b b5 00 00 call 114148 <__errno> 108bcd: c7 00 14 00 00 00 movl $0x14,(%eax) 108bd3: b8 ff ff ff ff mov $0xffffffff,%eax 108bd8: eb e6 jmp 108bc0 108bda: 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; 108bdc: 8b 3d 10 65 12 00 mov 0x126510,%edi 108be2: 83 c7 04 add $0x4,%edi 108be5: b9 05 00 00 00 mov $0x5,%ecx 108bea: 8b 75 b4 mov -0x4c(%ebp),%esi 108bed: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return -1; 108bef: b8 ff ff ff ff mov $0xffffffff,%eax 108bf4: eb ca jmp 108bc0 108bf6: 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); 108bf8: e8 4b b5 00 00 call 114148 <__errno> 108bfd: c7 00 09 00 00 00 movl $0x9,(%eax) 108c03: b8 ff ff ff ff mov $0xffffffff,%eax 108c08: eb b6 jmp 108bc0 108c0a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108c0c: e8 37 b5 00 00 call 114148 <__errno> 108c11: c7 00 16 00 00 00 movl $0x16,(%eax) 108c17: b8 ff ff ff ff mov $0xffffffff,%eax 108c1c: eb a2 jmp 108bc0 =============================================================================== 00108c20 : int fchmod( int fd, mode_t mode ) { 108c20: 55 push %ebp 108c21: 89 e5 mov %esp,%ebp 108c23: 83 ec 08 sub $0x8,%esp 108c26: 8b 45 08 mov 0x8(%ebp),%eax 108c29: 8b 4d 0c mov 0xc(%ebp),%ecx rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108c2c: 3b 05 2c 45 12 00 cmp 0x12452c,%eax 108c32: 73 38 jae 108c6c iop = rtems_libio_iop( fd ); 108c34: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 108c3b: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 108c42: 29 d0 sub %edx,%eax 108c44: 03 05 40 87 12 00 add 0x128740,%eax rtems_libio_check_is_open(iop); 108c4a: 8b 50 14 mov 0x14(%eax),%edx 108c4d: f6 c6 01 test $0x1,%dh 108c50: 74 1a je 108c6c /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108c52: 83 e2 04 and $0x4,%edx 108c55: 74 29 je 108c80 return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 108c57: 8b 50 20 mov 0x20(%eax),%edx 108c5a: 89 4d 0c mov %ecx,0xc(%ebp) 108c5d: 83 c0 18 add $0x18,%eax 108c60: 89 45 08 mov %eax,0x8(%ebp) 108c63: 8b 42 1c mov 0x1c(%edx),%eax } 108c66: c9 leave * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 108c67: ff e0 jmp *%eax 108c69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108c6c: e8 d7 b4 00 00 call 114148 <__errno> 108c71: c7 00 09 00 00 00 movl $0x9,(%eax) */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 108c77: b8 ff ff ff ff mov $0xffffffff,%eax 108c7c: c9 leave 108c7d: c3 ret 108c7e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108c80: e8 c3 b4 00 00 call 114148 <__errno> 108c85: c7 00 16 00 00 00 movl $0x16,(%eax) 108c8b: eb ea jmp 108c77 =============================================================================== 00108ac0 : int fcntl( int fd, int cmd, ... ) { 108ac0: 55 push %ebp 108ac1: 89 e5 mov %esp,%ebp 108ac3: 57 push %edi 108ac4: 56 push %esi 108ac5: 53 push %ebx 108ac6: 83 ec 1c sub $0x1c,%esp 108ac9: 8b 5d 08 mov 0x8(%ebp),%ebx 108acc: 8b 55 0c mov 0xc(%ebp),%edx int ret; va_list ap; va_start( ap, cmd ); 108acf: 8d 7d 10 lea 0x10(%ebp),%edi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 108ad2: 8b 0d 2c 4d 12 00 mov 0x124d2c,%ecx 108ad8: 39 cb cmp %ecx,%ebx 108ada: 0f 83 5c 01 00 00 jae 108c3c iop = rtems_libio_iop( fd ); 108ae0: a1 40 8f 12 00 mov 0x128f40,%eax 108ae5: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 108aec: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx 108af3: 29 f3 sub %esi,%ebx 108af5: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 108af8: 8b 73 14 mov 0x14(%ebx),%esi 108afb: f7 c6 00 01 00 00 test $0x100,%esi 108b01: 0f 84 35 01 00 00 je 108c3c /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 108b07: 83 fa 09 cmp $0x9,%edx 108b0a: 76 10 jbe 108b1c errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 108b0c: e8 e7 b8 00 00 call 1143f8 <__errno> 108b11: c7 00 16 00 00 00 movl $0x16,(%eax) 108b17: eb 16 jmp 108b2f 108b19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 108b1c: ff 24 95 30 26 12 00 jmp *0x122630(,%edx,4) 108b23: 90 nop <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 108b24: e8 cf b8 00 00 call 1143f8 <__errno> 108b29: c7 00 86 00 00 00 movl $0x86,(%eax) if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; ret = -1; 108b2f: 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; } 108b34: 89 f0 mov %esi,%eax 108b36: 8d 65 f4 lea -0xc(%ebp),%esp 108b39: 5b pop %ebx 108b3a: 5e pop %esi 108b3b: 5f pop %edi 108b3c: c9 leave 108b3d: c3 ret 108b3e: 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 ) ); 108b40: 83 ec 0c sub $0xc,%esp 108b43: ff 37 pushl (%edi) 108b45: 89 55 e0 mov %edx,-0x20(%ebp) 108b48: e8 33 05 00 00 call 109080 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 108b4d: 25 01 02 00 00 and $0x201,%eax 108b52: 8b 4b 14 mov 0x14(%ebx),%ecx 108b55: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 108b5b: 09 c8 or %ecx,%eax 108b5d: 89 43 14 mov %eax,0x14(%ebx) 108b60: 83 c4 10 add $0x10,%esp rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108b63: 31 f6 xor %esi,%esi 108b65: 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) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 108b68: 83 ec 08 sub $0x8,%esp 108b6b: 8b 43 20 mov 0x20(%ebx),%eax 108b6e: 53 push %ebx 108b6f: 52 push %edx 108b70: ff 50 30 call *0x30(%eax) 108b73: 89 c3 mov %eax,%ebx if (err) { 108b75: 83 c4 10 add $0x10,%esp 108b78: 85 c0 test %eax,%eax 108b7a: 74 b8 je 108b34 <== ALWAYS TAKEN errno = err; 108b7c: e8 77 b8 00 00 call 1143f8 <__errno> <== NOT EXECUTED 108b81: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 108b83: eb aa jmp 108b2f <== NOT EXECUTED 108b85: 8d 76 00 lea 0x0(%esi),%esi <== 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 ); 108b88: 83 ec 0c sub $0xc,%esp 108b8b: 56 push %esi 108b8c: 89 55 e0 mov %edx,-0x20(%ebp) 108b8f: e8 24 05 00 00 call 1090b8 108b94: 89 c6 mov %eax,%esi 108b96: 83 c4 10 add $0x10,%esp 108b99: 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) { 108b9c: 85 f6 test %esi,%esi 108b9e: 79 c8 jns 108b68 <== ALWAYS TAKEN 108ba0: eb 92 jmp 108b34 <== NOT EXECUTED 108ba2: 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 ) ) 108ba4: 8b 07 mov (%edi),%eax 108ba6: 85 c0 test %eax,%eax 108ba8: 74 6a je 108c14 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 108baa: 81 ce 00 08 00 00 or $0x800,%esi 108bb0: 89 73 14 mov %esi,0x14(%ebx) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108bb3: 31 f6 xor %esi,%esi 108bb5: eb b1 jmp 108b68 108bb7: 90 nop <== NOT EXECUTED 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); 108bb8: 31 c0 xor %eax,%eax 108bba: f7 c6 00 08 00 00 test $0x800,%esi 108bc0: 0f 95 c0 setne %al 108bc3: 89 c6 mov %eax,%esi 108bc5: eb a1 jmp 108b68 108bc7: 90 nop <== NOT EXECUTED * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 108bc8: 8b 3f mov (%edi),%edi if ( fd2 ) 108bca: 85 ff test %edi,%edi 108bcc: 0f 84 82 00 00 00 je 108c54 diop = rtems_libio_iop( fd2 ); 108bd2: 39 f9 cmp %edi,%ecx 108bd4: 77 4e ja 108c24 <== ALWAYS TAKEN 108bd6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108bdd: 31 ff xor %edi,%edi <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 108bdf: 89 77 14 mov %esi,0x14(%edi) diop->pathinfo = iop->pathinfo; 108be2: 83 c7 18 add $0x18,%edi 108be5: 8d 73 18 lea 0x18(%ebx),%esi 108be8: b9 05 00 00 00 mov $0x5,%ecx 108bed: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 108bef: 8b 4d e4 mov -0x1c(%ebp),%ecx 108bf2: 29 c1 sub %eax,%ecx 108bf4: 89 c8 mov %ecx,%eax 108bf6: c1 f8 03 sar $0x3,%eax 108bf9: 8d 0c c0 lea (%eax,%eax,8),%ecx 108bfc: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108bff: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108c02: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108c05: 89 ce mov %ecx,%esi 108c07: c1 e6 0f shl $0xf,%esi 108c0a: 01 f1 add %esi,%ecx 108c0c: 8d 34 c8 lea (%eax,%ecx,8),%esi 108c0f: f7 de neg %esi 108c11: eb 89 jmp 108b9c 108c13: 90 nop <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 108c14: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi 108c1a: 89 73 14 mov %esi,0x14(%ebx) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108c1d: 31 f6 xor %esi,%esi 108c1f: e9 44 ff ff ff jmp 108b68 switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 108c24: 8d 0c fd 00 00 00 00 lea 0x0(,%edi,8),%ecx 108c2b: 8d 3c cd 00 00 00 00 lea 0x0(,%ecx,8),%edi 108c32: 29 cf sub %ecx,%edi 108c34: 8d 3c 38 lea (%eax,%edi,1),%edi 108c37: 89 7d e4 mov %edi,-0x1c(%ebp) 108c3a: eb a3 jmp 108bdf int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108c3c: e8 b7 b7 00 00 call 1143f8 <__errno> 108c41: c7 00 09 00 00 00 movl $0x9,(%eax) 108c47: be ff ff ff ff mov $0xffffffff,%esi 108c4c: e9 e3 fe ff ff jmp 108b34 108c51: 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(); 108c54: 89 55 e0 mov %edx,-0x20(%ebp) 108c57: e8 a0 04 00 00 call 1090fc 108c5c: 89 c7 mov %eax,%edi if ( diop == 0 ) { 108c5e: 85 c0 test %eax,%eax 108c60: 8b 55 e0 mov -0x20(%ebp),%edx 108c63: 0f 84 c6 fe ff ff je 108b2f <== NEVER TAKEN 108c69: 8b 73 14 mov 0x14(%ebx),%esi 108c6c: 89 45 e4 mov %eax,-0x1c(%ebp) 108c6f: a1 40 8f 12 00 mov 0x128f40,%eax 108c74: e9 66 ff ff ff jmp 108bdf =============================================================================== 00108c9c : #include int fdatasync( int fd ) { 108c9c: 55 push %ebp 108c9d: 89 e5 mov %esp,%ebp 108c9f: 83 ec 08 sub $0x8,%esp 108ca2: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108ca5: 3b 05 2c 4d 12 00 cmp 0x124d2c,%eax 108cab: 73 2f jae 108cdc iop = rtems_libio_iop( fd ); 108cad: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 108cb4: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 108cbb: 29 d0 sub %edx,%eax 108cbd: 03 05 40 8f 12 00 add 0x128f40,%eax rtems_libio_check_is_open(iop); 108cc3: 8b 50 14 mov 0x14(%eax),%edx 108cc6: f6 c6 01 test $0x1,%dh 108cc9: 74 11 je 108cdc rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108ccb: 83 e2 04 and $0x4,%edx 108cce: 74 20 je 108cf0 /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); 108cd0: 8b 50 20 mov 0x20(%eax),%edx 108cd3: 89 45 08 mov %eax,0x8(%ebp) 108cd6: 8b 42 2c mov 0x2c(%edx),%eax } 108cd9: c9 leave /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); 108cda: ff e0 jmp *%eax { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108cdc: e8 17 b7 00 00 call 1143f8 <__errno> 108ce1: c7 00 09 00 00 00 movl $0x9,(%eax) /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); } 108ce7: b8 ff ff ff ff mov $0xffffffff,%eax 108cec: c9 leave 108ced: c3 ret 108cee: 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 ); 108cf0: e8 03 b7 00 00 call 1143f8 <__errno> 108cf5: c7 00 16 00 00 00 movl $0x16,(%eax) 108cfb: eb ea jmp 108ce7 =============================================================================== 0011197c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 11197c: 55 push %ebp 11197d: 89 e5 mov %esp,%ebp 11197f: 57 push %edi 111980: 56 push %esi 111981: 53 push %ebx 111982: 83 ec 2c sub $0x2c,%esp 111985: 8b 75 08 mov 0x8(%ebp),%esi static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 111988: a1 ec 9a 12 00 mov 0x129aec,%eax 11198d: 85 c0 test %eax,%eax 11198f: 0f 84 8b 00 00 00 je 111a20 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 111995: 53 push %ebx 111996: 6a 00 push $0x0 111998: 6a 00 push $0x0 11199a: 50 push %eax 11199b: e8 f0 ba ff ff call 10d490 } if (sc == RTEMS_SUCCESSFUL) { 1119a0: 83 c4 10 add $0x10,%esp 1119a3: 85 c0 test %eax,%eax 1119a5: 0f 85 4c 03 00 00 jne 111cf7 <== NEVER TAKEN err = pipe_lock(); if (err) return err; pipe = *pipep; 1119ab: 8b 1e mov (%esi),%ebx if (pipe == NULL) { 1119ad: 85 db test %ebx,%ebx 1119af: 0f 84 df 01 00 00 je 111b94 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 1119b5: 52 push %edx 1119b6: 6a 00 push $0x0 1119b8: 6a 00 push $0x0 1119ba: ff 73 28 pushl 0x28(%ebx) 1119bd: e8 ce ba ff ff call 10d490 1119c2: 83 c4 10 add $0x10,%esp 1119c5: 83 f8 01 cmp $0x1,%eax 1119c8: 19 ff sbb %edi,%edi 1119ca: f7 d7 not %edi 1119cc: 83 e7 fc and $0xfffffffc,%edi err = -EINTR; if (*pipep == NULL) { 1119cf: 8b 06 mov (%esi),%eax 1119d1: 85 c0 test %eax,%eax 1119d3: 0f 84 d7 02 00 00 je 111cb0 else *pipep = pipe; } out: pipe_unlock(); 1119d9: e8 aa fe ff ff call 111888 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 1119de: 85 ff test %edi,%edi 1119e0: 75 32 jne 111a14 <== NEVER TAKEN return err; pipe = *pipep; 1119e2: 8b 1e mov (%esi),%ebx switch (LIBIO_ACCMODE(iop)) { 1119e4: 8b 55 0c mov 0xc(%ebp),%edx 1119e7: 8b 42 14 mov 0x14(%edx),%eax 1119ea: 83 e0 06 and $0x6,%eax 1119ed: 83 f8 04 cmp $0x4,%eax 1119f0: 74 6a je 111a5c 1119f2: 83 f8 06 cmp $0x6,%eax 1119f5: 0f 84 59 01 00 00 je 111b54 1119fb: 83 f8 02 cmp $0x2,%eax 1119fe: 0f 84 dc 00 00 00 je 111ae0 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 111a04: 83 ec 0c sub $0xc,%esp 111a07: ff 73 28 pushl 0x28(%ebx) 111a0a: e8 7d bb ff ff call 10d58c return 0; 111a0f: 83 c4 10 add $0x10,%esp 111a12: 31 ff xor %edi,%edi out_error: pipe_release(pipep, iop); return err; } 111a14: 89 f8 mov %edi,%eax 111a16: 8d 65 f4 lea -0xc(%ebp),%esp 111a19: 5b pop %ebx 111a1a: 5e pop %esi 111a1b: 5f pop %edi 111a1c: c9 leave 111a1d: c3 ret 111a1e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 111a20: 50 push %eax 111a21: 6a 00 push $0x0 111a23: 6a 00 push $0x0 111a25: ff 35 08 9d 12 00 pushl 0x129d08 111a2b: e8 60 ba ff ff call 10d490 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 111a30: 83 c4 10 add $0x10,%esp 111a33: 8b 3d ec 9a 12 00 mov 0x129aec,%edi 111a39: 85 ff test %edi,%edi 111a3b: 0f 84 83 02 00 00 je 111cc4 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 111a41: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111a44: ff 35 08 9d 12 00 pushl 0x129d08 <== NOT EXECUTED 111a4a: e8 3d bb ff ff call 10d58c <== NOT EXECUTED 111a4f: a1 ec 9a 12 00 mov 0x129aec,%eax <== NOT EXECUTED 111a54: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111a57: e9 39 ff ff ff jmp 111995 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 111a5c: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 111a5f: 8b 43 14 mov 0x14(%ebx),%eax 111a62: 8d 50 01 lea 0x1(%eax),%edx 111a65: 89 53 14 mov %edx,0x14(%ebx) 111a68: 85 c0 test %eax,%eax 111a6a: 0f 84 c4 02 00 00 je 111d34 <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 111a70: 8b 4b 10 mov 0x10(%ebx),%ecx 111a73: 85 c9 test %ecx,%ecx 111a75: 75 8d jne 111a04 111a77: 8b 55 0c mov 0xc(%ebp),%edx 111a7a: f6 42 14 01 testb $0x1,0x14(%edx) 111a7e: 0f 85 04 03 00 00 jne 111d88 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 111a84: 8b 7b 20 mov 0x20(%ebx),%edi 111a87: eb 20 jmp 111aa9 111a89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 111a8c: 51 push %ecx 111a8d: 6a 00 push $0x0 111a8f: 6a 00 push $0x0 111a91: ff 73 28 pushl 0x28(%ebx) 111a94: e8 f7 b9 ff ff call 10d490 111a99: 83 c4 10 add $0x10,%esp 111a9c: 85 c0 test %eax,%eax 111a9e: 75 27 jne 111ac7 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 111aa0: 39 7b 20 cmp %edi,0x20(%ebx) 111aa3: 0f 85 5b ff ff ff jne 111a04 <== ALWAYS TAKEN if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 111aa9: 83 ec 0c sub $0xc,%esp 111aac: ff 73 28 pushl 0x28(%ebx) 111aaf: e8 d8 ba ff ff call 10d58c if (! PIPE_WRITEWAIT(pipe)) 111ab4: 58 pop %eax 111ab5: 5a pop %edx 111ab6: 6a 00 push $0x0 111ab8: ff 73 30 pushl 0x30(%ebx) 111abb: e8 c4 1c 00 00 call 113784 111ac0: 83 c4 10 add $0x10,%esp 111ac3: 85 c0 test %eax,%eax 111ac5: 74 c5 je 111a8c <== ALWAYS TAKEN goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 111ac7: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 111acc: 83 ec 08 sub $0x8,%esp 111acf: ff 75 0c pushl 0xc(%ebp) 111ad2: 56 push %esi 111ad3: e8 c8 fd ff ff call 1118a0 return err; 111ad8: 83 c4 10 add $0x10,%esp 111adb: e9 34 ff ff ff jmp 111a14 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 111ae0: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 111ae3: 8b 43 10 mov 0x10(%ebx),%eax 111ae6: 8d 50 01 lea 0x1(%eax),%edx 111ae9: 89 53 10 mov %edx,0x10(%ebx) 111aec: 85 c0 test %eax,%eax 111aee: 0f 84 10 02 00 00 je 111d04 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 111af4: 8b 7b 14 mov 0x14(%ebx),%edi 111af7: 85 ff test %edi,%edi 111af9: 0f 85 05 ff ff ff jne 111a04 /* Not an error */ if (LIBIO_NODELAY(iop)) 111aff: 8b 45 0c mov 0xc(%ebp),%eax 111b02: f6 40 14 01 testb $0x1,0x14(%eax) 111b06: 0f 85 f8 fe ff ff jne 111a04 break; prevCounter = pipe->writerCounter; 111b0c: 8b 7b 24 mov 0x24(%ebx),%edi 111b0f: eb 20 jmp 111b31 111b11: 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)) 111b14: 50 push %eax 111b15: 6a 00 push $0x0 111b17: 6a 00 push $0x0 111b19: ff 73 28 pushl 0x28(%ebx) 111b1c: e8 6f b9 ff ff call 10d490 111b21: 83 c4 10 add $0x10,%esp 111b24: 85 c0 test %eax,%eax 111b26: 75 9f jne 111ac7 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); 111b28: 39 7b 24 cmp %edi,0x24(%ebx) 111b2b: 0f 85 d3 fe ff ff jne 111a04 <== ALWAYS TAKEN prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 111b31: 83 ec 0c sub $0xc,%esp 111b34: ff 73 28 pushl 0x28(%ebx) 111b37: e8 50 ba ff ff call 10d58c if (! PIPE_READWAIT(pipe)) 111b3c: 5a pop %edx 111b3d: 59 pop %ecx 111b3e: 6a 00 push $0x0 111b40: ff 73 2c pushl 0x2c(%ebx) 111b43: e8 3c 1c 00 00 call 113784 111b48: 83 c4 10 add $0x10,%esp 111b4b: 85 c0 test %eax,%eax 111b4d: 74 c5 je 111b14 <== ALWAYS TAKEN 111b4f: e9 73 ff ff ff jmp 111ac7 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 111b54: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 111b57: 8b 43 10 mov 0x10(%ebx),%eax 111b5a: 8d 50 01 lea 0x1(%eax),%edx 111b5d: 89 53 10 mov %edx,0x10(%ebx) 111b60: 85 c0 test %eax,%eax 111b62: 0f 84 b4 01 00 00 je 111d1c <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 111b68: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 111b6b: 8b 43 14 mov 0x14(%ebx),%eax 111b6e: 8d 50 01 lea 0x1(%eax),%edx 111b71: 89 53 14 mov %edx,0x14(%ebx) 111b74: 85 c0 test %eax,%eax 111b76: 0f 85 88 fe ff ff jne 111a04 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 111b7c: 83 ec 08 sub $0x8,%esp 111b7f: 8d 45 e4 lea -0x1c(%ebp),%eax 111b82: 50 push %eax 111b83: ff 73 2c pushl 0x2c(%ebx) 111b86: e8 95 1b 00 00 call 113720 111b8b: 83 c4 10 add $0x10,%esp 111b8e: e9 71 fe ff ff jmp 111a04 111b93: 90 nop <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 111b94: 83 ec 0c sub $0xc,%esp 111b97: 6a 34 push $0x34 111b99: e8 de 84 ff ff call 10a07c 111b9e: 89 c3 mov %eax,%ebx 111ba0: 89 45 d4 mov %eax,-0x2c(%ebp) if (pipe == NULL) 111ba3: 83 c4 10 add $0x10,%esp 111ba6: 85 c0 test %eax,%eax 111ba8: 0f 84 32 02 00 00 je 111de0 return err; memset(pipe, 0, sizeof(pipe_control_t)); 111bae: b9 34 00 00 00 mov $0x34,%ecx 111bb3: 31 c0 xor %eax,%eax 111bb5: 89 df mov %ebx,%edi 111bb7: f3 aa rep stos %al,%es:(%edi) pipe->Size = PIPE_BUF; 111bb9: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) pipe->Buffer = malloc(pipe->Size); 111bc0: 83 ec 0c sub $0xc,%esp 111bc3: 68 00 02 00 00 push $0x200 111bc8: e8 af 84 ff ff call 10a07c 111bcd: 89 03 mov %eax,(%ebx) if (! pipe->Buffer) 111bcf: 83 c4 10 add $0x10,%esp 111bd2: 85 c0 test %eax,%eax 111bd4: 0f 84 f8 01 00 00 je 111dd2 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 111bda: 8d 43 2c lea 0x2c(%ebx),%eax 111bdd: 50 push %eax 111bde: 6a 00 push $0x0 111be0: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'r', c), 111be2: 0f be 05 b4 7a 12 00 movsbl 0x127ab4,%eax if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 111be9: 0d 00 72 49 50 or $0x50497200,%eax 111bee: 50 push %eax 111bef: e8 b0 19 00 00 call 1135a4 111bf4: 83 c4 10 add $0x10,%esp 111bf7: 85 c0 test %eax,%eax 111bf9: 0f 85 c3 01 00 00 jne 111dc2 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 111bff: 8d 43 30 lea 0x30(%ebx),%eax 111c02: 50 push %eax 111c03: 6a 00 push $0x0 111c05: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'w', c), 111c07: 0f be 05 b4 7a 12 00 movsbl 0x127ab4,%eax if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 111c0e: 0d 00 77 49 50 or $0x50497700,%eax 111c13: 50 push %eax 111c14: e8 8b 19 00 00 call 1135a4 111c19: 83 c4 10 add $0x10,%esp 111c1c: 85 c0 test %eax,%eax 111c1e: 0f 85 8d 01 00 00 jne 111db1 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 111c24: 83 ec 0c sub $0xc,%esp 111c27: 8d 43 28 lea 0x28(%ebx),%eax 111c2a: 50 push %eax 111c2b: 6a 00 push $0x0 111c2d: 6a 10 push $0x10 111c2f: 6a 01 push $0x1 rtems_build_name ('P', 'I', 's', c), 1, 111c31: 0f be 05 b4 7a 12 00 movsbl 0x127ab4,%eax if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 111c38: 0d 00 73 49 50 or $0x50497300,%eax 111c3d: 50 push %eax 111c3e: e8 d1 b5 ff ff call 10d214 111c43: 83 c4 20 add $0x20,%esp 111c46: 85 c0 test %eax,%eax 111c48: 0f 85 52 01 00 00 jne 111da0 Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 111c4e: 51 push %ecx /* 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 111c4f: 8d 7d e0 lea -0x20(%ebp),%edi 111c52: 57 push %edi 111c53: ff 73 2c pushl 0x2c(%ebx) 111c56: 68 40 a8 12 00 push $0x12a840 111c5b: e8 70 cf ff ff call 10ebd0 <_Objects_Get> |= STATES_INTERRUPTIBLE_BY_SIGNAL; 111c60: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) _Thread_Enable_dispatch(); 111c67: e8 24 d8 ff ff call 10f490 <_Thread_Enable_dispatch> 111c6c: 83 c4 0c add $0xc,%esp 111c6f: 57 push %edi 111c70: ff 73 30 pushl 0x30(%ebx) 111c73: 68 40 a8 12 00 push $0x12a840 111c78: e8 53 cf ff ff call 10ebd0 <_Objects_Get> _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 111c7d: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) _Thread_Enable_dispatch(); 111c84: e8 07 d8 ff ff call 10f490 <_Thread_Enable_dispatch> #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 111c89: a0 b4 7a 12 00 mov 0x127ab4,%al 111c8e: 8d 50 01 lea 0x1(%eax),%edx 111c91: 88 15 b4 7a 12 00 mov %dl,0x127ab4 111c97: 83 c4 10 add $0x10,%esp 111c9a: 3c 7a cmp $0x7a,%al 111c9c: 0f 85 13 fd ff ff jne 1119b5 c = 'a'; 111ca2: c6 05 b4 7a 12 00 61 movb $0x61,0x127ab4 111ca9: e9 07 fd ff ff jmp 1119b5 111cae: 66 90 xchg %ax,%ax <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 111cb0: 85 ff test %edi,%edi 111cb2: 0f 85 94 00 00 00 jne 111d4c <== NEVER TAKEN pipe_free(pipe); else *pipep = pipe; 111cb8: 89 1e mov %ebx,(%esi) } out: pipe_unlock(); 111cba: e8 c9 fb ff ff call 111888 111cbf: e9 1e fd ff ff jmp 1119e2 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( 111cc4: 83 ec 0c sub $0xc,%esp 111cc7: 68 ec 9a 12 00 push $0x129aec 111ccc: 6a 00 push $0x0 111cce: 6a 54 push $0x54 111cd0: 6a 01 push $0x1 111cd2: 68 45 50 49 50 push $0x50495045 111cd7: e8 38 b5 ff ff call 10d214 111cdc: 89 c3 mov %eax,%ebx 111cde: 83 c4 14 add $0x14,%esp 111ce1: ff 35 08 9d 12 00 pushl 0x129d08 111ce7: e8 a0 b8 ff ff call 10d58c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 111cec: 83 c4 10 add $0x10,%esp 111cef: 85 db test %ebx,%ebx 111cf1: 0f 84 f0 00 00 00 je 111de7 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 111cf7: bf f4 ff ff ff mov $0xfffffff4,%edi 111cfc: e9 13 fd ff ff jmp 111a14 111d01: 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); 111d04: 83 ec 08 sub $0x8,%esp 111d07: 8d 45 e4 lea -0x1c(%ebp),%eax 111d0a: 50 push %eax 111d0b: ff 73 30 pushl 0x30(%ebx) 111d0e: e8 0d 1a 00 00 call 113720 111d13: 83 c4 10 add $0x10,%esp 111d16: e9 d9 fd ff ff jmp 111af4 111d1b: 90 nop <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 111d1c: 83 ec 08 sub $0x8,%esp 111d1f: 8d 45 e4 lea -0x1c(%ebp),%eax 111d22: 50 push %eax 111d23: ff 73 30 pushl 0x30(%ebx) 111d26: e8 f5 19 00 00 call 113720 111d2b: 83 c4 10 add $0x10,%esp 111d2e: e9 35 fe ff ff jmp 111b68 111d33: 90 nop <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 111d34: 83 ec 08 sub $0x8,%esp 111d37: 8d 45 e4 lea -0x1c(%ebp),%eax 111d3a: 50 push %eax 111d3b: ff 73 2c pushl 0x2c(%ebx) 111d3e: e8 dd 19 00 00 call 113720 111d43: 83 c4 10 add $0x10,%esp 111d46: e9 25 fd ff ff jmp 111a70 111d4b: 90 nop <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 111d4c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111d4f: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111d52: e8 39 19 00 00 call 113690 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 111d57: 59 pop %ecx <== NOT EXECUTED 111d58: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111d5b: e8 30 19 00 00 call 113690 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 111d60: 5a pop %edx <== NOT EXECUTED 111d61: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111d64: e8 83 b6 ff ff call 10d3ec <== NOT EXECUTED free(pipe->Buffer); 111d69: 58 pop %eax <== NOT EXECUTED 111d6a: ff 33 pushl (%ebx) <== NOT EXECUTED 111d6c: e8 1b 7c ff ff call 10998c <== NOT EXECUTED free(pipe); 111d71: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 111d74: e8 13 7c ff ff call 10998c <== NOT EXECUTED 111d79: 83 c4 10 add $0x10,%esp <== NOT EXECUTED else *pipep = pipe; } out: pipe_unlock(); 111d7c: e8 07 fb ff ff call 111888 111d81: e9 8e fc ff ff jmp 111a14 111d86: 66 90 xchg %ax,%ax <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 111d88: 83 ec 0c sub $0xc,%esp 111d8b: ff 73 28 pushl 0x28(%ebx) 111d8e: e8 f9 b7 ff ff call 10d58c err = -ENXIO; goto out_error; 111d93: 83 c4 10 add $0x10,%esp if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); err = -ENXIO; 111d96: bf fa ff ff ff mov $0xfffffffa,%edi goto out_error; 111d9b: e9 2c fd ff ff jmp 111acc if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 111da0: 83 ec 0c sub $0xc,%esp 111da3: 8b 45 d4 mov -0x2c(%ebp),%eax 111da6: ff 70 30 pushl 0x30(%eax) 111da9: e8 e2 18 00 00 call 113690 111dae: 83 c4 10 add $0x10,%esp err_wbar: rtems_barrier_delete(pipe->readBarrier); 111db1: 83 ec 0c sub $0xc,%esp 111db4: 8b 55 d4 mov -0x2c(%ebp),%edx 111db7: ff 72 2c pushl 0x2c(%edx) 111dba: e8 d1 18 00 00 call 113690 111dbf: 83 c4 10 add $0x10,%esp err_rbar: free(pipe->Buffer); 111dc2: 83 ec 0c sub $0xc,%esp 111dc5: 8b 45 d4 mov -0x2c(%ebp),%eax 111dc8: ff 30 pushl (%eax) 111dca: e8 bd 7b ff ff call 10998c 111dcf: 83 c4 10 add $0x10,%esp err_buf: free(pipe); 111dd2: 83 ec 0c sub $0xc,%esp 111dd5: ff 75 d4 pushl -0x2c(%ebp) 111dd8: e8 af 7b ff ff call 10998c 111ddd: 83 c4 10 add $0x10,%esp ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 111de0: bf f4 ff ff ff mov $0xfffffff4,%edi 111de5: eb 95 jmp 111d7c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 111de7: a1 ec 9a 12 00 mov 0x129aec,%eax 111dec: e9 a4 fb ff ff jmp 111995 =============================================================================== 0010fec8 : const char *type; rtems_filesystem_fsmount_me_t mount_h; } find_arg; static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { 10fec8: 55 push %ebp 10fec9: 89 e5 mov %esp,%ebp 10fecb: 56 push %esi 10fecc: 53 push %ebx 10fecd: 8b 75 08 mov 0x8(%ebp),%esi 10fed0: 8b 5d 0c mov 0xc(%ebp),%ebx find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 10fed3: 83 ec 08 sub $0x8,%esp 10fed6: ff 33 pushl (%ebx) 10fed8: ff 36 pushl (%esi) 10feda: e8 2d 40 00 00 call 113f0c 10fedf: 83 c4 10 add $0x10,%esp 10fee2: 85 c0 test %eax,%eax 10fee4: 75 12 jne 10fef8 return false; } else { fa->mount_h = entry->mount_h; 10fee6: 8b 46 04 mov 0x4(%esi),%eax 10fee9: 89 43 04 mov %eax,0x4(%ebx) return true; 10feec: b0 01 mov $0x1,%al } } 10feee: 8d 65 f8 lea -0x8(%ebp),%esp 10fef1: 5b pop %ebx 10fef2: 5e pop %esi 10fef3: c9 leave 10fef4: c3 ret 10fef5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { return false; 10fef8: 31 c0 xor %eax,%eax } else { fa->mount_h = entry->mount_h; return true; } } 10fefa: 8d 65 f8 lea -0x8(%ebp),%esp 10fefd: 5b pop %ebx 10fefe: 5e pop %esi 10feff: c9 leave 10ff00: c3 ret =============================================================================== 00108d00 : long fpathconf( int fd, int name ) { 108d00: 55 push %ebp 108d01: 89 e5 mov %esp,%ebp 108d03: 83 ec 08 sub $0x8,%esp 108d06: 8b 45 08 mov 0x8(%ebp),%eax 108d09: 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); 108d0c: 3b 05 2c 4d 12 00 cmp 0x124d2c,%eax 108d12: 0f 83 ac 00 00 00 jae 108dc4 iop = rtems_libio_iop(fd); 108d18: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx 108d1f: 8d 04 cd 00 00 00 00 lea 0x0(,%ecx,8),%eax 108d26: 29 c8 sub %ecx,%eax 108d28: 03 05 40 8f 12 00 add 0x128f40,%eax rtems_libio_check_is_open(iop); 108d2e: 8b 48 14 mov 0x14(%eax),%ecx 108d31: f6 c5 01 test $0x1,%ch 108d34: 0f 84 8a 00 00 00 je 108dc4 <== NEVER TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 108d3a: 83 e1 02 and $0x2,%ecx 108d3d: 74 08 je 108d47 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 108d3f: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 108d42: 83 fa 0b cmp $0xb,%edx 108d45: 76 15 jbe 108d5c break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 108d47: e8 ac b6 00 00 call 1143f8 <__errno> 108d4c: c7 00 16 00 00 00 movl $0x16,(%eax) 108d52: b8 ff ff ff ff mov $0xffffffff,%eax break; } return return_value; } 108d57: c9 leave 108d58: c3 ret 108d59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 108d5c: ff 24 95 58 26 12 00 jmp *0x122658(,%edx,4) 108d63: 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; 108d64: 8b 40 5c mov 0x5c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d67: c9 leave 108d68: c3 ret 108d69: 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; 108d6c: 8b 40 50 mov 0x50(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d6f: c9 leave 108d70: c3 ret 108d71: 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; 108d74: 8b 40 64 mov 0x64(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d77: c9 leave 108d78: c3 ret 108d79: 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; 108d7c: 8b 40 58 mov 0x58(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d7f: c9 leave 108d80: c3 ret 108d81: 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; 108d84: 8b 40 54 mov 0x54(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d87: c9 leave 108d88: c3 ret 108d89: 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; 108d8c: 8b 40 4c mov 0x4c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d8f: c9 leave 108d90: c3 ret 108d91: 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; 108d94: 8b 40 48 mov 0x48(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d97: c9 leave 108d98: c3 ret 108d99: 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; 108d9c: 8b 40 44 mov 0x44(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d9f: c9 leave 108da0: c3 ret 108da1: 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; 108da4: 8b 40 40 mov 0x40(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108da7: c9 leave 108da8: c3 ret 108da9: 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; 108dac: 8b 40 3c mov 0x3c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108daf: c9 leave 108db0: c3 ret 108db1: 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; 108db4: 8b 40 38 mov 0x38(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108db7: c9 leave 108db8: c3 ret 108db9: 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; 108dbc: 8b 40 60 mov 0x60(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108dbf: c9 leave 108dc0: c3 ret 108dc1: 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); 108dc4: e8 2f b6 00 00 call 1143f8 <__errno> 108dc9: c7 00 09 00 00 00 movl $0x9,(%eax) 108dcf: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108dd4: c9 leave 108dd5: c3 ret =============================================================================== 00108094 : #include void free( void *ptr ) { 108094: 55 push %ebp 108095: 89 e5 mov %esp,%ebp 108097: 53 push %ebx 108098: 83 ec 04 sub $0x4,%esp 10809b: 8b 5d 08 mov 0x8(%ebp),%ebx MSBUMP(free_calls, 1); 10809e: ff 05 8c 63 12 00 incl 0x12638c if ( !ptr ) 1080a4: 85 db test %ebx,%ebx 1080a6: 74 4b je 1080f3 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1080a8: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 1080af: 74 47 je 1080f8 <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1080b1: a1 28 47 12 00 mov 0x124728,%eax 1080b6: 85 c0 test %eax,%eax 1080b8: 74 0a je 1080c4 (*rtems_malloc_statistics_helpers->at_free)(ptr); 1080ba: 83 ec 0c sub $0xc,%esp 1080bd: 53 push %ebx 1080be: ff 50 08 call *0x8(%eax) 1080c1: 83 c4 10 add $0x10,%esp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1080c4: 83 ec 08 sub $0x8,%esp 1080c7: 53 push %ebx 1080c8: ff 35 58 21 12 00 pushl 0x122158 1080ce: e8 45 50 00 00 call 10d118 <_Protected_heap_Free> 1080d3: 83 c4 10 add $0x10,%esp 1080d6: 84 c0 test %al,%al 1080d8: 75 19 jne 1080f3 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 1080da: a1 58 21 12 00 mov 0x122158,%eax */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 1080df: ff 70 1c pushl 0x1c(%eax) 1080e2: ff 70 18 pushl 0x18(%eax) 1080e5: 53 push %ebx 1080e6: 68 30 0a 12 00 push $0x120a30 1080eb: e8 8c 0d 00 00 call 108e7c 1080f0: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1080f3: 8b 5d fc mov -0x4(%ebp),%ebx 1080f6: c9 leave 1080f7: c3 ret /* * 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() ) { 1080f8: e8 3b 01 00 00 call 108238 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1080fd: 84 c0 test %al,%al 1080ff: 75 b0 jne 1080b1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 108101: 89 5d 08 mov %ebx,0x8(%ebp) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 108104: 8b 5d fc mov -0x4(%ebp),%ebx 108107: c9 leave /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 108108: e9 97 01 00 00 jmp 1082a4 =============================================================================== 00109520 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 109520: 55 push %ebp 109521: 89 e5 mov %esp,%ebp 109523: 53 push %ebx 109524: 83 ec 04 sub $0x4,%esp 109527: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 10952a: 81 fb 60 7c 12 00 cmp $0x127c60,%ebx 109530: 74 26 je 109558 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 109532: 83 ec 0c sub $0xc,%esp 109535: 8d 43 04 lea 0x4(%ebx),%eax 109538: 50 push %eax 109539: e8 72 ef ff ff call 1084b0 rtems_filesystem_freenode( &env->root_directory); 10953e: 8d 43 18 lea 0x18(%ebx),%eax 109541: 89 04 24 mov %eax,(%esp) 109544: e8 67 ef ff ff call 1084b0 free(env); 109549: 83 c4 10 add $0x10,%esp 10954c: 89 5d 08 mov %ebx,0x8(%ebp) } } 10954f: 8b 5d fc mov -0x4(%ebp),%ebx 109552: c9 leave && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 109553: e9 6c ef ff ff jmp 1084c4 } } 109558: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10955b: c9 leave <== NOT EXECUTED 10955c: c3 ret <== NOT EXECUTED =============================================================================== 0011e71c : int fstat( int fd, struct stat *sbuf ) { 11e71c: 55 push %ebp 11e71d: 89 e5 mov %esp,%ebp 11e71f: 57 push %edi 11e720: 53 push %ebx 11e721: 8b 45 08 mov 0x8(%ebp),%eax 11e724: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11e727: 85 db test %ebx,%ebx 11e729: 74 55 je 11e780 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11e72b: 3b 05 4c 21 12 00 cmp 0x12214c,%eax 11e731: 73 39 jae 11e76c 11e733: c1 e0 03 shl $0x3,%eax 11e736: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 11e73d: 29 c2 sub %eax,%edx 11e73f: 03 15 60 63 12 00 add 0x126360,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11e745: f6 42 15 01 testb $0x1,0x15(%edx) 11e749: 74 21 je 11e76c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11e74b: b9 48 00 00 00 mov $0x48,%ecx 11e750: 31 c0 xor %eax,%eax 11e752: 89 df mov %ebx,%edi 11e754: f3 aa rep stos %al,%es:(%edi) return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 11e756: 8b 42 20 mov 0x20(%edx),%eax 11e759: 89 5d 0c mov %ebx,0xc(%ebp) 11e75c: 83 c2 18 add $0x18,%edx 11e75f: 89 55 08 mov %edx,0x8(%ebp) 11e762: 8b 40 18 mov 0x18(%eax),%eax } 11e765: 5b pop %ebx 11e766: 5f pop %edi 11e767: 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->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 11e768: ff e0 jmp *%eax 11e76a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11e76c: e8 27 4b ff ff call 113298 <__errno> 11e771: c7 00 09 00 00 00 movl $0x9,(%eax) * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 11e777: b8 ff ff ff ff mov $0xffffffff,%eax 11e77c: 5b pop %ebx 11e77d: 5f pop %edi 11e77e: c9 leave 11e77f: c3 ret /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 11e780: e8 13 4b ff ff call 113298 <__errno> 11e785: c7 00 0e 00 00 00 movl $0xe,(%eax) 11e78b: eb ea jmp 11e777 =============================================================================== 00108ef4 : #include int fsync( int fd ) { 108ef4: 55 push %ebp 108ef5: 89 e5 mov %esp,%ebp 108ef7: 83 ec 08 sub $0x8,%esp 108efa: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108efd: 3b 05 2c 4d 12 00 cmp 0x124d2c,%eax 108f03: 73 2f jae 108f34 iop = rtems_libio_iop( fd ); 108f05: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 108f0c: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 108f13: 29 d0 sub %edx,%eax 108f15: 03 05 40 8f 12 00 add 0x128f40,%eax rtems_libio_check_is_open(iop); 108f1b: 8b 50 14 mov 0x14(%eax),%edx 108f1e: f6 c6 01 test $0x1,%dh 108f21: 74 11 je 108f34 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108f23: 83 e2 04 and $0x4,%edx 108f26: 74 20 je 108f48 /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); 108f28: 8b 50 20 mov 0x20(%eax),%edx 108f2b: 89 45 08 mov %eax,0x8(%ebp) 108f2e: 8b 42 28 mov 0x28(%edx),%eax } 108f31: c9 leave /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); 108f32: ff e0 jmp *%eax { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108f34: e8 bf b4 00 00 call 1143f8 <__errno> 108f39: c7 00 09 00 00 00 movl $0x9,(%eax) /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); } 108f3f: b8 ff ff ff ff mov $0xffffffff,%eax 108f44: c9 leave 108f45: c3 ret 108f46: 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 ); 108f48: e8 ab b4 00 00 call 1143f8 <__errno> 108f4d: c7 00 16 00 00 00 movl $0x16,(%eax) 108f53: eb ea jmp 108f3f =============================================================================== 0010fbb8 : int ftruncate( int fd, off_t length ) { 10fbb8: 55 push %ebp 10fbb9: 89 e5 mov %esp,%ebp 10fbbb: 57 push %edi 10fbbc: 56 push %esi 10fbbd: 53 push %ebx 10fbbe: 83 ec 3c sub $0x3c,%esp 10fbc1: 8b 45 08 mov 0x8(%ebp),%eax 10fbc4: 8b 55 0c mov 0xc(%ebp),%edx 10fbc7: 8b 4d 10 mov 0x10(%ebp),%ecx 10fbca: 89 55 c0 mov %edx,-0x40(%ebp) 10fbcd: 89 4d c4 mov %ecx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10fbd0: 3b 05 4c 21 12 00 cmp 0x12214c,%eax 10fbd6: 73 58 jae 10fc30 iop = rtems_libio_iop( fd ); 10fbd8: c1 e0 03 shl $0x3,%eax 10fbdb: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 10fbe2: 29 c3 sub %eax,%ebx 10fbe4: 03 1d 60 63 12 00 add 0x126360,%ebx rtems_libio_check_is_open(iop); 10fbea: f6 43 15 01 testb $0x1,0x15(%ebx) 10fbee: 74 40 je 10fc30 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10fbf0: 8d 7d d4 lea -0x2c(%ebp),%edi 10fbf3: 8d 73 18 lea 0x18(%ebx),%esi 10fbf6: b9 05 00 00 00 mov $0x5,%ecx 10fbfb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10fbfd: 83 ec 0c sub $0xc,%esp 10fc00: 8d 45 d4 lea -0x2c(%ebp),%eax 10fc03: 50 push %eax 10fc04: 8b 45 e0 mov -0x20(%ebp),%eax 10fc07: ff 50 10 call *0x10(%eax) 10fc0a: 83 c4 10 add $0x10,%esp 10fc0d: 48 dec %eax 10fc0e: 74 46 je 10fc56 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10fc10: f6 43 14 04 testb $0x4,0x14(%ebx) 10fc14: 74 2e je 10fc44 return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); 10fc16: 50 push %eax 10fc17: 8b 43 20 mov 0x20(%ebx),%eax 10fc1a: ff 75 c4 pushl -0x3c(%ebp) 10fc1d: ff 75 c0 pushl -0x40(%ebp) 10fc20: 53 push %ebx 10fc21: ff 50 20 call *0x20(%eax) 10fc24: 83 c4 10 add $0x10,%esp } 10fc27: 8d 65 f4 lea -0xc(%ebp),%esp 10fc2a: 5b pop %ebx 10fc2b: 5e pop %esi 10fc2c: 5f pop %edi 10fc2d: c9 leave 10fc2e: c3 ret 10fc2f: 90 nop <== 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); 10fc30: e8 63 36 00 00 call 113298 <__errno> 10fc35: c7 00 09 00 00 00 movl $0x9,(%eax) 10fc3b: b8 ff ff ff ff mov $0xffffffff,%eax 10fc40: eb e5 jmp 10fc27 10fc42: 66 90 xchg %ax,%ax <== NOT EXECUTED loc = iop->pathinfo; 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 ); 10fc44: e8 4f 36 00 00 call 113298 <__errno> 10fc49: c7 00 16 00 00 00 movl $0x16,(%eax) 10fc4f: b8 ff ff ff ff mov $0xffffffff,%eax 10fc54: eb d1 jmp 10fc27 * Make sure we are not working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 10fc56: e8 3d 36 00 00 call 113298 <__errno> 10fc5b: c7 00 15 00 00 00 movl $0x15,(%eax) 10fc61: b8 ff ff ff ff mov $0xffffffff,%eax 10fc66: eb bf jmp 10fc27 =============================================================================== 001082d0 : #include #include int getchark(void) { 1082d0: 55 push %ebp 1082d1: 89 e5 mov %esp,%ebp 1082d3: 83 ec 08 sub $0x8,%esp if ( BSP_poll_char ) 1082d6: a1 88 35 12 00 mov 0x123588,%eax 1082db: 85 c0 test %eax,%eax 1082dd: 74 05 je 1082e4 return (*BSP_poll_char)(); return -1; } 1082df: c9 leave #include int getchark(void) { if ( BSP_poll_char ) return (*BSP_poll_char)(); 1082e0: ff e0 jmp *%eax 1082e2: 66 90 xchg %ax,%ax <== NOT EXECUTED return -1; } 1082e4: b8 ff ff ff ff mov $0xffffffff,%eax 1082e9: c9 leave 1082ea: c3 ret =============================================================================== 00120110 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 120110: 55 push %ebp 120111: 89 e5 mov %esp,%ebp 120113: 57 push %edi 120114: 56 push %esi 120115: 53 push %ebx 120116: 83 ec 2c sub $0x2c,%esp 120119: 8b 45 08 mov 0x8(%ebp),%eax rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 12011c: 3b 05 ec 5b 12 00 cmp 0x125bec,%eax 120122: 73 4c jae 120170 <== NEVER TAKEN 120124: c1 e0 03 shl $0x3,%eax 120127: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 12012e: 29 c3 sub %eax,%ebx 120130: 03 1d 40 9f 12 00 add 0x129f40,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 120136: 8d 7d d4 lea -0x2c(%ebp),%edi 120139: 8d 73 18 lea 0x18(%ebx),%esi 12013c: b9 05 00 00 00 mov $0x5,%ecx 120141: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 120143: 83 ec 0c sub $0xc,%esp 120146: 8d 45 d4 lea -0x2c(%ebp),%eax 120149: 50 push %eax 12014a: 8b 45 e0 mov -0x20(%ebp),%eax 12014d: ff 50 10 call *0x10(%eax) 120150: 83 c4 10 add $0x10,%esp 120153: 48 dec %eax 120154: 75 1e jne 120174 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); 120156: 50 push %eax 120157: 8b 43 20 mov 0x20(%ebx),%eax 12015a: ff 75 10 pushl 0x10(%ebp) 12015d: ff 75 0c pushl 0xc(%ebp) 120160: 53 push %ebx 120161: ff 50 08 call *0x8(%eax) 120164: 83 c4 10 add $0x10,%esp } 120167: 8d 65 f4 lea -0xc(%ebp),%esp 12016a: 5b pop %ebx 12016b: 5e pop %esi 12016c: 5f pop %edi 12016d: c9 leave 12016e: c3 ret 12016f: 90 nop <== NOT EXECUTED rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 120170: 31 db xor %ebx,%ebx <== NOT EXECUTED 120172: eb c2 jmp 120136 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 120174: e8 5f 41 ff ff call 1142d8 <__errno> 120179: c7 00 14 00 00 00 movl $0x14,(%eax) 12017f: b8 ff ff ff ff mov $0xffffffff,%eax 120184: eb e1 jmp 120167 =============================================================================== 00108b14 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 108b14: 55 push %ebp 108b15: 89 e5 mov %esp,%ebp 108b17: 57 push %edi 108b18: 56 push %esi 108b19: 53 push %ebx 108b1a: 83 ec 1c sub $0x1c,%esp 108b1d: 89 c3 mov %eax,%ebx 108b1f: 89 55 e4 mov %edx,-0x1c(%ebp) 108b22: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108b24: e8 eb fe ff ff call 108a14 if ((fp = fopen("/etc/group", "r")) == NULL) 108b29: 83 ec 08 sub $0x8,%esp 108b2c: 68 f2 0e 12 00 push $0x120ef2 108b31: 68 d9 23 12 00 push $0x1223d9 108b36: e8 09 be 00 00 call 114944 108b3b: 89 c7 mov %eax,%edi 108b3d: 83 c4 10 add $0x10,%esp 108b40: 85 c0 test %eax,%eax 108b42: 75 22 jne 108b66 108b44: e9 8b 00 00 00 jmp 108bd4 108b49: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for(;;) { if (!scangr(fp, grp, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(grp->gr_name, name) == 0); 108b4c: 83 ec 08 sub $0x8,%esp 108b4f: 53 push %ebx 108b50: ff 36 pushl (%esi) 108b52: e8 65 cc 00 00 call 1157bc 108b57: 83 c4 10 add $0x10,%esp 108b5a: 85 c0 test %eax,%eax 108b5c: 0f 94 c0 sete %al 108b5f: 0f b6 c0 movzbl %al,%eax } else { match = (grp->gr_gid == gid); } if (match) { 108b62: 85 c0 test %eax,%eax 108b64: 75 2e jne 108b94 if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scangr(fp, grp, buffer, bufsize)) 108b66: 83 ec 0c sub $0xc,%esp 108b69: ff 75 0c pushl 0xc(%ebp) 108b6c: 8b 4d 08 mov 0x8(%ebp),%ecx 108b6f: 89 f2 mov %esi,%edx 108b71: 89 f8 mov %edi,%eax 108b73: e8 88 fc ff ff call 108800 108b78: 83 c4 10 add $0x10,%esp 108b7b: 85 c0 test %eax,%eax 108b7d: 74 31 je 108bb0 goto error_einval; if (name) { 108b7f: 85 db test %ebx,%ebx 108b81: 75 c9 jne 108b4c match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 108b83: 0f b7 46 08 movzwl 0x8(%esi),%eax 108b87: 3b 45 e4 cmp -0x1c(%ebp),%eax 108b8a: 0f 94 c0 sete %al 108b8d: 0f b6 c0 movzbl %al,%eax } if (match) { 108b90: 85 c0 test %eax,%eax 108b92: 74 d2 je 108b66 fclose(fp); 108b94: 83 ec 0c sub $0xc,%esp 108b97: 57 push %edi 108b98: e8 a3 b6 00 00 call 114240 *result = grp; 108b9d: 8b 45 10 mov 0x10(%ebp),%eax 108ba0: 89 30 mov %esi,(%eax) return 0; 108ba2: 83 c4 10 add $0x10,%esp 108ba5: 31 c0 xor %eax,%eax } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 108ba7: 8d 65 f4 lea -0xc(%ebp),%esp 108baa: 5b pop %ebx 108bab: 5e pop %esi 108bac: 5f pop %edi 108bad: c9 leave 108bae: c3 ret 108baf: 90 nop <== NOT EXECUTED *result = grp; return 0; } } error_einval: fclose(fp); 108bb0: 83 ec 0c sub $0xc,%esp 108bb3: 57 push %edi 108bb4: e8 87 b6 00 00 call 114240 rtems_set_errno_and_return_minus_one( EINVAL ); 108bb9: e8 2a b5 00 00 call 1140e8 <__errno> 108bbe: c7 00 16 00 00 00 movl $0x16,(%eax) 108bc4: 83 c4 10 add $0x10,%esp 108bc7: b8 ff ff ff ff mov $0xffffffff,%eax } 108bcc: 8d 65 f4 lea -0xc(%ebp),%esp 108bcf: 5b pop %ebx 108bd0: 5e pop %esi 108bd1: 5f pop %edi 108bd2: c9 leave 108bd3: c3 ret int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 108bd4: e8 0f b5 00 00 call 1140e8 <__errno> 108bd9: c7 00 16 00 00 00 movl $0x16,(%eax) 108bdf: 83 c8 ff or $0xffffffff,%eax 108be2: eb c3 jmp 108ba7 =============================================================================== 00108ecc : struct group *getgrent(void) { 108ecc: 55 push %ebp 108ecd: 89 e5 mov %esp,%ebp 108ecf: 83 ec 08 sub $0x8,%esp if (group_fp == NULL) 108ed2: a1 c0 89 12 00 mov 0x1289c0,%eax 108ed7: 85 c0 test %eax,%eax 108ed9: 75 05 jne 108ee0 return NULL; 108edb: 31 c0 xor %eax,%eax if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) return NULL; return &grent; } 108edd: c9 leave 108ede: c3 ret 108edf: 90 nop <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 108ee0: 83 ec 0c sub $0xc,%esp 108ee3: 68 c8 00 00 00 push $0xc8 108ee8: b9 e0 89 12 00 mov $0x1289e0,%ecx 108eed: ba c4 89 12 00 mov $0x1289c4,%edx 108ef2: e8 09 f9 ff ff call 108800 108ef7: 83 c4 10 add $0x10,%esp 108efa: 85 c0 test %eax,%eax 108efc: 74 df je 108edd return NULL; return &grent; 108efe: b8 c4 89 12 00 mov $0x1289c4,%eax } 108f03: c9 leave 108f04: c3 ret =============================================================================== 00108e98 : } struct group *getgrgid( gid_t gid ) { 108e98: 55 push %ebp 108e99: 89 e5 mov %esp,%ebp 108e9b: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 108e9e: 8d 45 f4 lea -0xc(%ebp),%eax 108ea1: 50 push %eax 108ea2: 68 c8 00 00 00 push $0xc8 108ea7: 68 e0 89 12 00 push $0x1289e0 108eac: 68 c4 89 12 00 push $0x1289c4 108eb1: 0f b7 45 08 movzwl 0x8(%ebp),%eax 108eb5: 50 push %eax 108eb6: e8 b1 ff ff ff call 108e6c 108ebb: 83 c4 20 add $0x20,%esp 108ebe: 85 c0 test %eax,%eax 108ec0: 75 06 jne 108ec8 return NULL; return p; 108ec2: 8b 45 f4 mov -0xc(%ebp),%eax } 108ec5: c9 leave 108ec6: c3 ret 108ec7: 90 nop <== NOT EXECUTED ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) return NULL; 108ec8: 31 c0 xor %eax,%eax return p; } 108eca: c9 leave 108ecb: c3 ret =============================================================================== 00108e38 : } struct group *getgrnam( const char *name ) { 108e38: 55 push %ebp 108e39: 89 e5 mov %esp,%ebp 108e3b: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 108e3e: 8d 45 f4 lea -0xc(%ebp),%eax 108e41: 50 push %eax 108e42: 68 c8 00 00 00 push $0xc8 108e47: 68 e0 89 12 00 push $0x1289e0 108e4c: 68 c4 89 12 00 push $0x1289c4 108e51: ff 75 08 pushl 0x8(%ebp) 108e54: e8 b3 ff ff ff call 108e0c 108e59: 83 c4 20 add $0x20,%esp 108e5c: 85 c0 test %eax,%eax 108e5e: 75 08 jne 108e68 return NULL; return p; 108e60: 8b 45 f4 mov -0xc(%ebp),%eax } 108e63: c9 leave 108e64: c3 ret 108e65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) return NULL; 108e68: 31 c0 xor %eax,%eax return p; } 108e6a: c9 leave 108e6b: c3 ret =============================================================================== 0010b214 : int getitimer( int which, struct itimerval *value ) { 10b214: 55 push %ebp 10b215: 89 e5 mov %esp,%ebp 10b217: 83 ec 08 sub $0x8,%esp if ( !value ) 10b21a: 8b 45 0c mov 0xc(%ebp),%eax 10b21d: 85 c0 test %eax,%eax 10b21f: 74 2f je 10b250 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b221: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b225: 76 15 jbe 10b23c case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b227: e8 7c 87 00 00 call 1139a8 <__errno> 10b22c: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b232: b8 ff ff ff ff mov $0xffffffff,%eax 10b237: c9 leave 10b238: c3 ret 10b239: 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 ); 10b23c: e8 67 87 00 00 call 1139a8 <__errno> 10b241: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b247: b8 ff ff ff ff mov $0xffffffff,%eax 10b24c: c9 leave 10b24d: c3 ret 10b24e: 66 90 xchg %ax,%ax <== NOT EXECUTED int which, struct itimerval *value ) { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b250: e8 53 87 00 00 call 1139a8 <__errno> 10b255: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b25b: eb d5 jmp 10b232 =============================================================================== 001085d8 : */ int getlogin_r( char *name, size_t namesize ) { 1085d8: 55 push %ebp 1085d9: 89 e5 mov %esp,%ebp 1085db: 53 push %ebx 1085dc: 83 ec 04 sub $0x4,%esp 1085df: 8b 5d 08 mov 0x8(%ebp),%ebx struct passwd *pw; char *pname; if ( !name ) 1085e2: 85 db test %ebx,%ebx 1085e4: 74 42 je 108628 return EFAULT; if ( namesize < LOGIN_NAME_MAX ) 1085e6: 83 7d 0c 08 cmpl $0x8,0xc(%ebp) 1085ea: 77 0c ja 1085f8 return ERANGE; 1085ec: b8 22 00 00 00 mov $0x22,%eax if ( pw ) pname = pw->pw_name; strncpy( name, pname, LOGIN_NAME_MAX ); return 0; } 1085f1: 8b 5d fc mov -0x4(%ebp),%ebx 1085f4: c9 leave 1085f5: c3 ret 1085f6: 66 90 xchg %ax,%ax <== NOT EXECUTED return ERANGE; /* Set the pointer to a default name */ pname = ""; pw = getpwuid(getuid()); 1085f8: e8 e7 09 00 00 call 108fe4 1085fd: 83 ec 0c sub $0xc,%esp 108600: 0f b7 c0 movzwl %ax,%eax 108603: 50 push %eax 108604: e8 37 07 00 00 call 108d40 if ( pw ) 108609: 83 c4 10 add $0x10,%esp 10860c: 85 c0 test %eax,%eax 10860e: 74 20 je 108630 pname = pw->pw_name; 108610: 8b 00 mov (%eax),%eax strncpy( name, pname, LOGIN_NAME_MAX ); 108612: 52 push %edx 108613: 6a 09 push $0x9 108615: 50 push %eax 108616: 53 push %ebx 108617: e8 20 d3 00 00 call 11593c return 0; 10861c: 83 c4 10 add $0x10,%esp 10861f: 31 c0 xor %eax,%eax } 108621: 8b 5d fc mov -0x4(%ebp),%ebx 108624: c9 leave 108625: c3 ret 108626: 66 90 xchg %ax,%ax <== NOT EXECUTED { struct passwd *pw; char *pname; if ( !name ) return EFAULT; 108628: b8 0e 00 00 00 mov $0xe,%eax 10862d: eb c2 jmp 1085f1 10862f: 90 nop <== NOT EXECUTED if ( namesize < LOGIN_NAME_MAX ) return ERANGE; /* Set the pointer to a default name */ pname = ""; 108630: b8 29 25 12 00 mov $0x122529,%eax 108635: eb db jmp 108612 =============================================================================== 00108be4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 108be4: 55 push %ebp 108be5: 89 e5 mov %esp,%ebp 108be7: 57 push %edi 108be8: 56 push %esi 108be9: 53 push %ebx 108bea: 83 ec 1c sub $0x1c,%esp 108bed: 89 c3 mov %eax,%ebx 108bef: 89 55 e4 mov %edx,-0x1c(%ebp) 108bf2: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108bf4: e8 1b fe ff ff call 108a14 if ((fp = fopen("/etc/passwd", "r")) == NULL) 108bf9: 83 ec 08 sub $0x8,%esp 108bfc: 68 f2 0e 12 00 push $0x120ef2 108c01: 68 cd 23 12 00 push $0x1223cd 108c06: e8 39 bd 00 00 call 114944 108c0b: 89 c7 mov %eax,%edi 108c0d: 83 c4 10 add $0x10,%esp 108c10: 85 c0 test %eax,%eax 108c12: 75 22 jne 108c36 108c14: e9 8b 00 00 00 jmp 108ca4 108c19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(pwd->pw_name, name) == 0); 108c1c: 83 ec 08 sub $0x8,%esp 108c1f: 53 push %ebx 108c20: ff 36 pushl (%esi) 108c22: e8 95 cb 00 00 call 1157bc 108c27: 83 c4 10 add $0x10,%esp 108c2a: 85 c0 test %eax,%eax 108c2c: 0f 94 c0 sete %al 108c2f: 0f b6 c0 movzbl %al,%eax } else { match = (pwd->pw_uid == uid); } if (match) { 108c32: 85 c0 test %eax,%eax 108c34: 75 2e jne 108c64 if ((fp = fopen("/etc/passwd", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) 108c36: 83 ec 0c sub $0xc,%esp 108c39: ff 75 0c pushl 0xc(%ebp) 108c3c: 8b 4d 08 mov 0x8(%ebp),%ecx 108c3f: 89 f2 mov %esi,%edx 108c41: 89 f8 mov %edi,%eax 108c43: e8 d0 fc ff ff call 108918 108c48: 83 c4 10 add $0x10,%esp 108c4b: 85 c0 test %eax,%eax 108c4d: 74 31 je 108c80 goto error_einval; if (name) { 108c4f: 85 db test %ebx,%ebx 108c51: 75 c9 jne 108c1c match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 108c53: 0f b7 46 08 movzwl 0x8(%esi),%eax 108c57: 3b 45 e4 cmp -0x1c(%ebp),%eax 108c5a: 0f 94 c0 sete %al 108c5d: 0f b6 c0 movzbl %al,%eax } if (match) { 108c60: 85 c0 test %eax,%eax 108c62: 74 d2 je 108c36 fclose(fp); 108c64: 83 ec 0c sub $0xc,%esp 108c67: 57 push %edi 108c68: e8 d3 b5 00 00 call 114240 *result = pwd; 108c6d: 8b 45 10 mov 0x10(%ebp),%eax 108c70: 89 30 mov %esi,(%eax) return 0; 108c72: 83 c4 10 add $0x10,%esp 108c75: 31 c0 xor %eax,%eax } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 108c77: 8d 65 f4 lea -0xc(%ebp),%esp 108c7a: 5b pop %ebx 108c7b: 5e pop %esi 108c7c: 5f pop %edi 108c7d: c9 leave 108c7e: c3 ret 108c7f: 90 nop <== NOT EXECUTED *result = pwd; return 0; } } error_einval: fclose(fp); 108c80: 83 ec 0c sub $0xc,%esp 108c83: 57 push %edi 108c84: e8 b7 b5 00 00 call 114240 rtems_set_errno_and_return_minus_one( EINVAL ); 108c89: e8 5a b4 00 00 call 1140e8 <__errno> 108c8e: c7 00 16 00 00 00 movl $0x16,(%eax) 108c94: 83 c4 10 add $0x10,%esp 108c97: b8 ff ff ff ff mov $0xffffffff,%eax } 108c9c: 8d 65 f4 lea -0xc(%ebp),%esp 108c9f: 5b pop %ebx 108ca0: 5e pop %esi 108ca1: 5f pop %edi 108ca2: c9 leave 108ca3: c3 ret int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 108ca4: e8 3f b4 00 00 call 1140e8 <__errno> 108ca9: c7 00 16 00 00 00 movl $0x16,(%eax) 108caf: 83 c8 ff or $0xffffffff,%eax 108cb2: eb c3 jmp 108c77 =============================================================================== 00108d74 : struct passwd *getpwent(void) { 108d74: 55 push %ebp 108d75: 89 e5 mov %esp,%ebp 108d77: 83 ec 08 sub $0x8,%esp if (passwd_fp == NULL) 108d7a: a1 a8 8a 12 00 mov 0x128aa8,%eax 108d7f: 85 c0 test %eax,%eax 108d81: 75 05 jne 108d88 return NULL; 108d83: 31 c0 xor %eax,%eax if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) return NULL; return &pwent; } 108d85: c9 leave 108d86: c3 ret 108d87: 90 nop <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 108d88: 83 ec 0c sub $0xc,%esp 108d8b: 68 c8 00 00 00 push $0xc8 108d90: b9 e0 8a 12 00 mov $0x128ae0,%ecx 108d95: ba ac 8a 12 00 mov $0x128aac,%edx 108d9a: e8 79 fb ff ff call 108918 108d9f: 83 c4 10 add $0x10,%esp 108da2: 85 c0 test %eax,%eax 108da4: 74 df je 108d85 return NULL; return &pwent; 108da6: b8 ac 8a 12 00 mov $0x128aac,%eax } 108dab: c9 leave 108dac: c3 ret =============================================================================== 00108ce0 : } struct passwd *getpwnam( const char *name ) { 108ce0: 55 push %ebp 108ce1: 89 e5 mov %esp,%ebp 108ce3: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108ce6: 8d 45 f4 lea -0xc(%ebp),%eax 108ce9: 50 push %eax 108cea: 68 c8 00 00 00 push $0xc8 108cef: 68 e0 8a 12 00 push $0x128ae0 108cf4: 68 ac 8a 12 00 push $0x128aac 108cf9: ff 75 08 pushl 0x8(%ebp) 108cfc: e8 b3 ff ff ff call 108cb4 108d01: 83 c4 20 add $0x20,%esp 108d04: 85 c0 test %eax,%eax 108d06: 75 08 jne 108d10 return NULL; return p; 108d08: 8b 45 f4 mov -0xc(%ebp),%eax } 108d0b: c9 leave 108d0c: c3 ret 108d0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) return NULL; 108d10: 31 c0 xor %eax,%eax return p; } 108d12: c9 leave 108d13: c3 ret =============================================================================== 00108d40 : } struct passwd *getpwuid( uid_t uid ) { 108d40: 55 push %ebp 108d41: 89 e5 mov %esp,%ebp 108d43: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 108d46: 8d 45 f4 lea -0xc(%ebp),%eax 108d49: 50 push %eax 108d4a: 68 c8 00 00 00 push $0xc8 108d4f: 68 e0 8a 12 00 push $0x128ae0 108d54: 68 ac 8a 12 00 push $0x128aac 108d59: 0f b7 45 08 movzwl 0x8(%ebp),%eax 108d5d: 50 push %eax 108d5e: e8 b1 ff ff ff call 108d14 108d63: 83 c4 20 add $0x20,%esp 108d66: 85 c0 test %eax,%eax 108d68: 75 06 jne 108d70 return NULL; return p; 108d6a: 8b 45 f4 mov -0xc(%ebp),%eax } 108d6d: c9 leave 108d6e: c3 ret 108d6f: 90 nop <== NOT EXECUTED ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) return NULL; 108d70: 31 c0 xor %eax,%eax return p; } 108d72: c9 leave 108d73: c3 ret =============================================================================== 001082b0 : #include #include int getrusage(int who, struct rusage *usage) { 1082b0: 55 push %ebp 1082b1: 89 e5 mov %esp,%ebp 1082b3: 56 push %esi 1082b4: 53 push %ebx 1082b5: 83 ec 10 sub $0x10,%esp 1082b8: 8b 45 08 mov 0x8(%ebp),%eax 1082bb: 8b 5d 0c mov 0xc(%ebp),%ebx struct timespec uptime; struct timeval rtime; if ( !usage ) 1082be: 85 db test %ebx,%ebx 1082c0: 74 70 je 108332 * RTEMS only has a single process so there are no children. * The single process has been running since the system * was booted and since there is no distinction between system * and user time, we will just report the uptime. */ if (who == RUSAGE_SELF) { 1082c2: 85 c0 test %eax,%eax 1082c4: 74 32 je 1082f8 usage->ru_stime = rtime; return 0; } if (who == RUSAGE_CHILDREN) { 1082c6: 40 inc %eax 1082c7: 74 17 je 1082e0 rtems_set_errno_and_return_minus_one( ENOSYS ); } rtems_set_errno_and_return_minus_one( EINVAL ); 1082c9: e8 fa b1 00 00 call 1134c8 <__errno> 1082ce: c7 00 16 00 00 00 movl $0x16,(%eax) 1082d4: b8 ff ff ff ff mov $0xffffffff,%eax } 1082d9: 8d 65 f8 lea -0x8(%ebp),%esp 1082dc: 5b pop %ebx 1082dd: 5e pop %esi 1082de: c9 leave 1082df: c3 ret return 0; } if (who == RUSAGE_CHILDREN) { rtems_set_errno_and_return_minus_one( ENOSYS ); 1082e0: e8 e3 b1 00 00 call 1134c8 <__errno> 1082e5: c7 00 58 00 00 00 movl $0x58,(%eax) 1082eb: b8 ff ff ff ff mov $0xffffffff,%eax } rtems_set_errno_and_return_minus_one( EINVAL ); } 1082f0: 8d 65 f8 lea -0x8(%ebp),%esp 1082f3: 5b pop %ebx 1082f4: 5e pop %esi 1082f5: c9 leave 1082f6: c3 ret 1082f7: 90 nop <== NOT EXECUTED * The single process has been running since the system * was booted and since there is no distinction between system * and user time, we will just report the uptime. */ if (who == RUSAGE_SELF) { rtems_clock_get_uptime( &uptime ); 1082f8: 83 ec 0c sub $0xc,%esp 1082fb: 8d 45 f0 lea -0x10(%ebp),%eax 1082fe: 50 push %eax 1082ff: e8 c4 2e 00 00 call 10b1c8 rtime.tv_sec = uptime.tv_sec; 108304: 8b 4d f0 mov -0x10(%ebp),%ecx rtime.tv_usec = uptime.tv_nsec / 1000; 108307: 8b 75 f4 mov -0xc(%ebp),%esi 10830a: b8 d3 4d 62 10 mov $0x10624dd3,%eax 10830f: f7 ee imul %esi 108311: 89 d0 mov %edx,%eax 108313: c1 f8 06 sar $0x6,%eax 108316: c1 fe 1f sar $0x1f,%esi 108319: 29 f0 sub %esi,%eax 10831b: 89 0b mov %ecx,(%ebx) 10831d: 89 43 04 mov %eax,0x4(%ebx) 108320: 89 4b 08 mov %ecx,0x8(%ebx) 108323: 89 43 0c mov %eax,0xc(%ebx) usage->ru_utime = rtime; usage->ru_stime = rtime; return 0; 108326: 83 c4 10 add $0x10,%esp 108329: 31 c0 xor %eax,%eax if (who == RUSAGE_CHILDREN) { rtems_set_errno_and_return_minus_one( ENOSYS ); } rtems_set_errno_and_return_minus_one( EINVAL ); } 10832b: 8d 65 f8 lea -0x8(%ebp),%esp 10832e: 5b pop %ebx 10832f: 5e pop %esi 108330: c9 leave 108331: c3 ret { struct timespec uptime; struct timeval rtime; if ( !usage ) rtems_set_errno_and_return_minus_one( EFAULT ); 108332: e8 91 b1 00 00 call 1134c8 <__errno> 108337: c7 00 0e 00 00 00 movl $0xe,(%eax) 10833d: b8 ff ff ff ff mov $0xffffffff,%eax 108342: eb 95 jmp 1082d9 =============================================================================== 00112888 : rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 112888: 55 push %ebp 112889: 89 e5 mov %esp,%ebp 11288b: 57 push %edi 11288c: 56 push %esi 11288d: 53 push %ebx 11288e: 83 ec 1c sub $0x1c,%esp 112891: 8b 5d 08 mov 0x8(%ebp),%ebx switch( whence ) { 112894: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 112898: 76 1e jbe 1128b8 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 ); 11289a: e8 f9 09 00 00 call 113298 <__errno> 11289f: c7 00 16 00 00 00 movl $0x16,(%eax) 1128a5: b8 ff ff ff ff mov $0xffffffff,%eax 1128aa: ba ff ff ff ff mov $0xffffffff,%edx break; } return 0; } 1128af: 8d 65 f4 lea -0xc(%ebp),%esp 1128b2: 5b pop %ebx 1128b3: 5e pop %esi 1128b4: 5f pop %edi 1128b5: c9 leave 1128b6: c3 ret 1128b7: 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)) * 1128b8: 6a 00 push $0x0 1128ba: 68 10 01 00 00 push $0x110 1128bf: ff 73 10 pushl 0x10(%ebx) 1128c2: ff 73 0c pushl 0xc(%ebx) 1128c5: e8 06 b9 00 00 call 11e1d0 <__divdi3> 1128ca: 83 c4 10 add $0x10,%esp 1128cd: 69 ca 10 01 00 00 imul $0x110,%edx,%ecx 1128d3: be 10 01 00 00 mov $0x110,%esi 1128d8: f7 e6 mul %esi 1128da: 89 45 e0 mov %eax,-0x20(%ebp) 1128dd: 01 ca add %ecx,%edx 1128df: 89 55 e4 mov %edx,-0x1c(%ebp) 1128e2: 8b 45 e0 mov -0x20(%ebp),%eax 1128e5: 8b 55 e4 mov -0x1c(%ebp),%edx 1128e8: 89 43 0c mov %eax,0xc(%ebx) 1128eb: 89 53 10 mov %edx,0x10(%ebx) default: rtems_set_errno_and_return_minus_one( EINVAL ); break; } return 0; 1128ee: 31 c0 xor %eax,%eax 1128f0: 31 d2 xor %edx,%edx } 1128f2: 8d 65 f4 lea -0xc(%ebp),%esp 1128f5: 5b pop %ebx 1128f6: 5e pop %esi 1128f7: 5f pop %edi 1128f8: c9 leave 1128f9: c3 ret =============================================================================== 001126ec : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1126ec: 55 push %ebp 1126ed: 89 e5 mov %esp,%ebp 1126ef: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 1126f2: 8b 50 18 mov 0x18(%eax),%edx 1126f5: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 1126f9: 74 09 je 112704 return -1; /* It wasn't a directory --> return error */ 1126fb: b8 ff ff ff ff mov $0xffffffff,%eax iop->offset = 0; return 0; } 112700: c9 leave 112701: c3 ret 112702: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 112704: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 11270b: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) return 0; 112712: 31 c0 xor %eax,%eax } 112714: c9 leave 112715: c3 ret =============================================================================== 00112718 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 112718: 55 push %ebp 112719: 89 e5 mov %esp,%ebp 11271b: 57 push %edi 11271c: 56 push %esi 11271d: 53 push %ebx 11271e: 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->pathinfo.node_access; 112724: 8b 55 08 mov 0x8(%ebp),%edx 112727: 8b 42 18 mov 0x18(%edx),%eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11272a: 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; 11272d: 83 c0 54 add $0x54,%eax 112730: 89 85 cc fe ff ff mov %eax,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 112736: 39 c3 cmp %eax,%ebx 112738: 0f 84 2a 01 00 00 je 112868 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 11273e: 8b 42 0c mov 0xc(%edx),%eax 112741: 89 85 d4 fe ff ff mov %eax,-0x12c(%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); 112747: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx 11274c: 8b 45 10 mov 0x10(%ebp),%eax 11274f: f7 e2 mul %edx 112751: c1 ea 08 shr $0x8,%edx 112754: 89 d0 mov %edx,%eax 112756: c1 e0 04 shl $0x4,%eax 112759: c1 e2 08 shl $0x8,%edx 11275c: 8d 14 10 lea (%eax,%edx,1),%edx 11275f: 03 95 d4 fe ff ff add -0x12c(%ebp),%edx 112765: 89 95 d0 fe ff ff mov %edx,-0x130(%ebp) /* The directory was not empty so try to move to the desired entry in chain*/ for ( 11276b: 85 d2 test %edx,%edx 11276d: 0f 8e f5 00 00 00 jle 112868 <== NEVER TAKEN 112773: 31 d2 xor %edx,%edx 112775: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 11277c: 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 ); 11277f: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax 112785: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) 11278b: eb 23 jmp 1127b0 11278d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 112790: 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( 112792: 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 ( 112798: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 11279e: 0f 8e b4 00 00 00 jle 112858 <== NEVER TAKEN current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 1127a4: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 1127aa: 0f 84 a8 00 00 00 je 112858 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 1127b0: 39 95 d4 fe ff ff cmp %edx,-0x12c(%ebp) 1127b6: 7f d8 jg 112790 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 1127b8: 89 95 dc fe ff ff mov %edx,-0x124(%ebp) 1127be: 89 d0 mov %edx,%eax 1127c0: c1 f8 1f sar $0x1f,%eax 1127c3: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 1127c9: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 1127d0: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 1127d2: 8b 43 38 mov 0x38(%ebx),%eax 1127d5: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 1127db: 8d 73 0c lea 0xc(%ebx),%esi 1127de: 31 c0 xor %eax,%eax 1127e0: b9 ff ff ff ff mov $0xffffffff,%ecx 1127e5: 89 f7 mov %esi,%edi 1127e7: f2 ae repnz scas %es:(%edi),%al 1127e9: f7 d1 not %ecx 1127eb: 49 dec %ecx 1127ec: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 1127f3: 83 ec 08 sub $0x8,%esp 1127f6: 56 push %esi 1127f7: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax 1127fd: 50 push %eax 1127fe: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp) 112804: e8 5b 17 00 00 call 113f64 memcpy( 112809: 8b 45 0c mov 0xc(%ebp),%eax 11280c: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 112812: b9 44 00 00 00 mov $0x44,%ecx 112817: 89 c7 mov %eax,%edi 112819: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 11281f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 112821: 8b 45 08 mov 0x8(%ebp),%eax 112824: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax) 11282b: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 11282f: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp) 112836: 01 00 00 112839: 83 c4 10 add $0x10,%esp 11283c: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx } the_node = the_node->next; 112842: 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( 112844: 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 ( 11284a: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 112850: 0f 8f 4e ff ff ff jg 1127a4 <== NEVER TAKEN 112856: 66 90 xchg %ax,%ax the_node = the_node->next; } /* Success */ return bytes_transferred; } 112858: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 11285e: 8d 65 f4 lea -0xc(%ebp),%esp 112861: 5b pop %ebx 112862: 5e pop %esi 112863: 5f pop %edi 112864: c9 leave 112865: c3 ret 112866: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) return 0; 112868: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 11286f: 00 00 00 the_node = the_node->next; } /* Success */ return bytes_transferred; } 112872: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 112878: 8d 65 f4 lea -0xc(%ebp),%esp 11287b: 5b pop %ebx 11287c: 5e pop %esi 11287d: 5f pop %edi 11287e: c9 leave 11287f: c3 ret =============================================================================== 001129b0 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1129b0: 55 push %ebp 1129b1: 89 e5 mov %esp,%ebp 1129b3: 53 push %ebx 1129b4: 83 ec 04 sub $0x4,%esp 1129b7: 8b 45 0c mov 0xc(%ebp),%eax IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1129ba: 8b 18 mov (%eax),%ebx 1129bc: 8d 53 54 lea 0x54(%ebx),%edx /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) 1129bf: 39 53 50 cmp %edx,0x50(%ebx) 1129c2: 75 44 jne 112a08 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 1129c4: 8b 40 10 mov 0x10(%eax),%eax 1129c7: 3b 58 1c cmp 0x1c(%eax),%ebx 1129ca: 74 24 je 1129f0 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 1129cc: 8b 4b 5c mov 0x5c(%ebx),%ecx 1129cf: 85 c9 test %ecx,%ecx 1129d1: 75 1d jne 1129f0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 1129d3: 83 ec 0c sub $0xc,%esp 1129d6: 53 push %ebx 1129d7: e8 3c cf ff ff call 10f918 IMFS_check_node_remove( the_jnode ); 1129dc: 89 1c 24 mov %ebx,(%esp) 1129df: e8 78 cf ff ff call 10f95c return 0; 1129e4: 83 c4 10 add $0x10,%esp 1129e7: 31 c0 xor %eax,%eax } 1129e9: 8b 5d fc mov -0x4(%ebp),%ebx 1129ec: c9 leave 1129ed: c3 ret 1129ee: 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 ); 1129f0: e8 a3 08 00 00 call 113298 <__errno> 1129f5: c7 00 10 00 00 00 movl $0x10,(%eax) 1129fb: b8 ff ff ff ff mov $0xffffffff,%eax IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 112a00: 8b 5d fc mov -0x4(%ebp),%ebx 112a03: c9 leave 112a04: c3 ret 112a05: 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 ); 112a08: e8 8b 08 00 00 call 113298 <__errno> 112a0d: c7 00 5a 00 00 00 movl $0x5a,(%eax) 112a13: b8 ff ff ff ff mov $0xffffffff,%eax 112a18: eb cf jmp 1129e9 =============================================================================== 00108a14 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 108a14: 55 push %ebp 108a15: 89 e5 mov %esp,%ebp 108a17: 53 push %ebx 108a18: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 108a1b: 80 3d a8 8b 12 00 00 cmpb $0x0,0x128ba8 108a22: 74 08 je 108a2c fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 108a24: 8b 5d fc mov -0x4(%ebp),%ebx 108a27: c9 leave 108a28: c3 ret 108a29: 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; 108a2c: c6 05 a8 8b 12 00 01 movb $0x1,0x128ba8 mkdir("/etc", 0777); 108a33: 83 ec 08 sub $0x8,%esp 108a36: 68 ff 01 00 00 push $0x1ff 108a3b: 68 c8 23 12 00 push $0x1223c8 108a40: e8 37 08 00 00 call 10927c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 108a45: 59 pop %ecx 108a46: 5b pop %ebx 108a47: 68 f2 0e 12 00 push $0x120ef2 108a4c: 68 cd 23 12 00 push $0x1223cd 108a51: e8 ee be 00 00 call 114944 108a56: 83 c4 10 add $0x10,%esp 108a59: 85 c0 test %eax,%eax 108a5b: 74 77 je 108ad4 fclose(fp); 108a5d: 83 ec 0c sub $0xc,%esp 108a60: 50 push %eax 108a61: e8 da b7 00 00 call 114240 108a66: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 108a69: 83 ec 08 sub $0x8,%esp 108a6c: 68 f2 0e 12 00 push $0x120ef2 108a71: 68 d9 23 12 00 push $0x1223d9 108a76: e8 c9 be 00 00 call 114944 108a7b: 83 c4 10 add $0x10,%esp 108a7e: 85 c0 test %eax,%eax 108a80: 74 12 je 108a94 fclose(fp); 108a82: 83 ec 0c sub $0xc,%esp 108a85: 50 push %eax 108a86: e8 b5 b7 00 00 call 114240 108a8b: 83 c4 10 add $0x10,%esp fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 108a8e: 8b 5d fc mov -0x4(%ebp),%ebx 108a91: c9 leave 108a92: c3 ret 108a93: 90 nop <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 108a94: 83 ec 08 sub $0x8,%esp 108a97: 68 d4 0d 12 00 push $0x120dd4 108a9c: 68 d9 23 12 00 push $0x1223d9 108aa1: e8 9e be 00 00 call 114944 108aa6: 89 c3 mov %eax,%ebx 108aa8: 83 c4 10 add $0x10,%esp 108aab: 85 c0 test %eax,%eax 108aad: 0f 84 71 ff ff ff je 108a24 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 108ab3: 50 push %eax 108ab4: 6a 2a push $0x2a 108ab6: 6a 01 push $0x1 108ab8: 68 4c 24 12 00 push $0x12244c 108abd: e8 56 c6 00 00 call 115118 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 108ac2: 89 1c 24 mov %ebx,(%esp) 108ac5: e8 76 b7 00 00 call 114240 108aca: 83 c4 10 add $0x10,%esp 108acd: e9 52 ff ff ff jmp 108a24 108ad2: 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) { 108ad4: 83 ec 08 sub $0x8,%esp 108ad7: 68 d4 0d 12 00 push $0x120dd4 108adc: 68 cd 23 12 00 push $0x1223cd 108ae1: e8 5e be 00 00 call 114944 108ae6: 89 c3 mov %eax,%ebx 108ae8: 83 c4 10 add $0x10,%esp 108aeb: 85 c0 test %eax,%eax 108aed: 0f 84 76 ff ff ff je 108a69 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 108af3: 50 push %eax 108af4: 6a 66 push $0x66 108af6: 6a 01 push $0x1 108af8: 68 e4 23 12 00 push $0x1223e4 108afd: e8 16 c6 00 00 call 115118 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 108b02: 89 1c 24 mov %ebx,(%esp) 108b05: e8 36 b7 00 00 call 114240 108b0a: 83 c4 10 add $0x10,%esp 108b0d: e9 57 ff ff ff jmp 108a69 =============================================================================== 00109f4c : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 109f4c: 55 push %ebp 109f4d: 89 e5 mov %esp,%ebp 109f4f: 56 push %esi 109f50: 53 push %ebx 109f51: 89 d6 mov %edx,%esi 109f53: 88 c3 mov %al,%bl if (tty->termios.c_iflag & ISTRIP) 109f55: 8b 42 30 mov 0x30(%edx),%eax 109f58: a8 20 test $0x20,%al 109f5a: 74 03 je 109f5f <== ALWAYS TAKEN c &= 0x7f; 109f5c: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 109f5f: f6 c4 02 test $0x2,%ah 109f62: 74 18 je 109f7c c = tolower (c); 109f64: 0f b6 db movzbl %bl,%ebx 109f67: 8b 15 14 42 12 00 mov 0x124214,%edx 109f6d: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx 109f72: 83 e2 03 and $0x3,%edx 109f75: 4a dec %edx 109f76: 0f 84 9c 00 00 00 je 10a018 if (c == '\r') { 109f7c: 80 fb 0d cmp $0xd,%bl 109f7f: 74 33 je 109fb4 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)) { 109f81: 80 fb 0a cmp $0xa,%bl 109f84: 0f 84 86 00 00 00 je 10a010 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 109f8a: 84 db test %bl,%bl 109f8c: 75 3a jne 109fc8 <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 109f8e: 8b 46 20 mov 0x20(%esi),%eax 109f91: 8b 15 20 41 12 00 mov 0x124120,%edx 109f97: 4a dec %edx 109f98: 39 d0 cmp %edx,%eax 109f9a: 7d 1c jge 109fb8 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 109f9c: f6 46 3c 08 testb $0x8,0x3c(%esi) 109fa0: 75 7e jne 10a020 <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; 109fa2: 8b 56 1c mov 0x1c(%esi),%edx 109fa5: 88 1c 02 mov %bl,(%edx,%eax,1) 109fa8: 40 inc %eax 109fa9: 89 46 20 mov %eax,0x20(%esi) } return 0; 109fac: 31 c0 xor %eax,%eax } 109fae: 5b pop %ebx 109faf: 5e pop %esi 109fb0: c9 leave 109fb1: c3 ret 109fb2: 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) 109fb4: a8 80 test $0x80,%al 109fb6: 74 08 je 109fc0 <== ALWAYS TAKEN if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 109fb8: 31 c0 xor %eax,%eax <== NOT EXECUTED } 109fba: 5b pop %ebx <== NOT EXECUTED 109fbb: 5e pop %esi <== NOT EXECUTED 109fbc: c9 leave <== NOT EXECUTED 109fbd: c3 ret <== NOT EXECUTED 109fbe: 66 90 xchg %ax,%ax <== NOT EXECUTED c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 109fc0: f6 c4 01 test $0x1,%ah 109fc3: 74 03 je 109fc8 <== NEVER TAKEN c = '\n'; 109fc5: b3 0a mov $0xa,%bl 109fc7: 90 nop } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 109fc8: 8b 46 3c mov 0x3c(%esi),%eax 109fcb: a8 02 test $0x2,%al 109fcd: 74 bf je 109f8e if (c == tty->termios.c_cc[VERASE]) { 109fcf: 38 5e 43 cmp %bl,0x43(%esi) 109fd2: 0f 84 b0 00 00 00 je 10a088 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 109fd8: 38 5e 44 cmp %bl,0x44(%esi) 109fdb: 74 63 je 10a040 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 109fdd: 38 5e 45 cmp %bl,0x45(%esi) 109fe0: 0f 84 96 00 00 00 je 10a07c <== NEVER TAKEN return 1; } else if (c == '\n') { 109fe6: 80 fb 0a cmp $0xa,%bl 109fe9: 74 69 je 10a054 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]) || 109feb: 38 5e 4c cmp %bl,0x4c(%esi) 109fee: 74 05 je 109ff5 <== NEVER TAKEN 109ff0: 38 5e 51 cmp %bl,0x51(%esi) 109ff3: 75 99 jne 109f8e <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 109ff5: a8 08 test $0x8,%al <== NOT EXECUTED 109ff7: 75 3b jne 10a034 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 109ff9: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 109ffc: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 109fff: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a002: 40 inc %eax <== NOT EXECUTED 10a003: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED return 1; 10a006: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10a00b: eb a1 jmp 109fae <== NOT EXECUTED 10a00d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (c == '\r') { 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)) { 10a010: a8 40 test $0x40,%al 10a012: 74 b4 je 109fc8 <== ALWAYS TAKEN c = '\r'; 10a014: b3 0d mov $0xd,%bl <== NOT EXECUTED 10a016: eb b0 jmp 109fc8 <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 10a018: 83 c3 20 add $0x20,%ebx 10a01b: e9 5c ff ff ff jmp 109f7c /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a020: 0f b6 c3 movzbl %bl,%eax 10a023: 89 f2 mov %esi,%edx 10a025: e8 f2 fc ff ff call 109d1c 10a02a: 8b 46 20 mov 0x20(%esi),%eax 10a02d: e9 70 ff ff ff jmp 109fa2 10a032: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 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); 10a034: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a037: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a039: e8 de fc ff ff call 109d1c <== NOT EXECUTED 10a03e: eb b9 jmp 109ff9 <== 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); 10a040: ba 01 00 00 00 mov $0x1,%edx 10a045: 89 f0 mov %esi,%eax 10a047: e8 34 fd ff ff call 109d80 return 0; 10a04c: 31 c0 xor %eax,%eax 10a04e: e9 5b ff ff ff jmp 109fae 10a053: 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)) 10a054: a8 48 test $0x48,%al 10a056: 74 0c je 10a064 <== NEVER TAKEN echo (c, tty); 10a058: 89 f2 mov %esi,%edx 10a05a: b8 0a 00 00 00 mov $0xa,%eax 10a05f: e8 b8 fc ff ff call 109d1c tty->cbuf[tty->ccount++] = c; 10a064: 8b 46 20 mov 0x20(%esi),%eax 10a067: 8b 56 1c mov 0x1c(%esi),%edx 10a06a: c6 04 02 0a movb $0xa,(%edx,%eax,1) 10a06e: 40 inc %eax 10a06f: 89 46 20 mov %eax,0x20(%esi) return 1; 10a072: b8 01 00 00 00 mov $0x1,%eax 10a077: e9 32 ff ff ff jmp 109fae else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 10a07c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10a081: e9 28 ff ff ff jmp 109fae <== NOT EXECUTED 10a086: 66 90 xchg %ax,%ax <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 10a088: 31 d2 xor %edx,%edx 10a08a: 89 f0 mov %esi,%eax 10a08c: e8 ef fc ff ff call 109d80 return 0; 10a091: 31 c0 xor %eax,%eax 10a093: e9 16 ff ff ff jmp 109fae =============================================================================== 001240d0 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 1240d0: 55 push %ebp 1240d1: 89 e5 mov %esp,%ebp 1240d3: 57 push %edi 1240d4: 56 push %esi 1240d5: 53 push %ebx 1240d6: 83 ec 3c sub $0x3c,%esp 1240d9: 8b 75 0c mov 0xc(%ebp),%esi 1240dc: 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() ) 1240df: e8 00 fd ff ff call 123de4 1240e4: 3b 45 08 cmp 0x8(%ebp),%eax 1240e7: 0f 85 3f 02 00 00 jne 12432c rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 1240ed: 85 f6 test %esi,%esi 1240ef: 0f 84 4c 02 00 00 je 124341 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1240f5: 8d 4e ff lea -0x1(%esi),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1240f8: 83 f9 1f cmp $0x1f,%ecx 1240fb: 0f 87 40 02 00 00 ja 124341 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 ) 124101: 8d 04 76 lea (%esi,%esi,2),%eax 124104: 83 3c 85 88 e7 12 00 cmpl $0x1,0x12e788(,%eax,4) 12410b: 01 12410c: 0f 84 e6 01 00 00 je 1242f8 /* * 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 ) ) 124112: 83 fe 08 cmp $0x8,%esi 124115: 0f 84 c9 00 00 00 je 1241e4 12411b: 83 fe 04 cmp $0x4,%esi 12411e: 0f 84 c0 00 00 00 je 1241e4 124124: 83 fe 0b cmp $0xb,%esi 124127: 0f 84 b7 00 00 00 je 1241e4 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 12412d: bb 01 00 00 00 mov $0x1,%ebx 124132: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 124134: 89 75 dc mov %esi,-0x24(%ebp) siginfo->si_code = SI_USER; 124137: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 12413e: 85 ff test %edi,%edi 124140: 0f 84 ba 01 00 00 je 124300 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 124146: 8b 07 mov (%edi),%eax 124148: 89 45 e4 mov %eax,-0x1c(%ebp) 12414b: a1 94 e1 12 00 mov 0x12e194,%eax 124150: 40 inc %eax 124151: a3 94 e1 12 00 mov %eax,0x12e194 /* * 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; 124156: 8b 0d 58 e7 12 00 mov 0x12e758,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 12415c: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax 124162: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 124168: f7 d0 not %eax 12416a: 85 c3 test %eax,%ebx 12416c: 75 34 jne 1241a2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 12416e: a1 20 e9 12 00 mov 0x12e920,%eax 124173: 3d 24 e9 12 00 cmp $0x12e924,%eax 124178: 75 1b jne 124195 12417a: e9 81 00 00 00 jmp 124200 12417f: 90 nop <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 124180: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx 124186: f7 d2 not %edx 124188: 85 d3 test %edx,%ebx 12418a: 75 16 jne 1241a2 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 ) { 12418c: 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 ; 12418e: 3d 24 e9 12 00 cmp $0x12e924,%eax 124193: 74 6b je 124200 <== ALWAYS TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 124195: 89 c1 mov %eax,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 124197: 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) 12419d: 85 58 30 test %ebx,0x30(%eax) 1241a0: 74 de je 124180 /* * 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 ) ) { 1241a2: 50 push %eax mask = signo_to_mask( sig ); /* * Build up a siginfo structure */ siginfo = &siginfo_struct; 1241a3: 8d 45 dc lea -0x24(%ebp),%eax /* * 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 ) ) { 1241a6: 50 push %eax 1241a7: 56 push %esi 1241a8: 51 push %ecx 1241a9: e8 d6 01 00 00 call 124384 <_POSIX_signals_Unblock_thread> 1241ae: 83 c4 10 add $0x10,%esp 1241b1: 84 c0 test %al,%al 1241b3: 75 1f jne 1241d4 /* * 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 ); 1241b5: 83 ec 0c sub $0xc,%esp 1241b8: 53 push %ebx 1241b9: e8 b2 01 00 00 call 124370 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 1241be: 8d 1c 76 lea (%esi,%esi,2),%ebx 1241c1: c1 e3 02 shl $0x2,%ebx 1241c4: 83 c4 10 add $0x10,%esp 1241c7: 83 bb 80 e7 12 00 02 cmpl $0x2,0x12e780(%ebx) 1241ce: 0f 84 e4 00 00 00 je 1242b8 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 1241d4: e8 af e5 fe ff call 112788 <_Thread_Enable_dispatch> return 0; 1241d9: 31 c0 xor %eax,%eax } 1241db: 8d 65 f4 lea -0xc(%ebp),%esp 1241de: 5b pop %ebx 1241df: 5e pop %esi 1241e0: 5f pop %edi 1241e1: c9 leave 1241e2: c3 ret 1241e3: 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 ); 1241e4: e8 7b 03 00 00 call 124564 1241e9: 83 ec 08 sub $0x8,%esp 1241ec: 56 push %esi 1241ed: 50 push %eax 1241ee: e8 b1 02 00 00 call 1244a4 1241f3: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 1241f6: 8d 65 f4 lea -0xc(%ebp),%esp 1241f9: 5b pop %ebx 1241fa: 5e pop %esi 1241fb: 5f pop %edi 1241fc: c9 leave 1241fd: c3 ret 1241fe: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 124200: 0f b6 05 34 9d 12 00 movzbl 0x129d34,%eax 124207: 40 inc %eax 124208: 89 45 d4 mov %eax,-0x2c(%ebp) * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 12420b: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 124212: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp) 124219: 89 5d d0 mov %ebx,-0x30(%ebp) 12421c: 89 75 c0 mov %esi,-0x40(%ebp) /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 12421f: 8b 55 cc mov -0x34(%ebp),%edx 124222: 8b 04 95 6c e1 12 00 mov 0x12e16c(,%edx,4),%eax 124229: 85 c0 test %eax,%eax 12422b: 74 68 je 124295 <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 12422d: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 124230: 0f b7 70 10 movzwl 0x10(%eax),%esi object_table = the_info->local_table; 124234: 8b 78 1c mov 0x1c(%eax),%edi for ( index = 1 ; index <= maximum ; index++ ) { 124237: 85 f6 test %esi,%esi 124239: 74 5a je 124295 12423b: b8 01 00 00 00 mov $0x1,%eax the_thread = (Thread_Control *) object_table[ index ]; 124240: 8b 14 87 mov (%edi,%eax,4),%edx if ( !the_thread ) 124243: 85 d2 test %edx,%edx 124245: 74 49 je 124290 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 124247: 8b 4a 14 mov 0x14(%edx),%ecx 12424a: 3b 4d d4 cmp -0x2c(%ebp),%ecx 12424d: 77 41 ja 124290 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 12424f: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx 124255: 8b 9b d0 00 00 00 mov 0xd0(%ebx),%ebx 12425b: f7 d3 not %ebx 12425d: 85 5d d0 test %ebx,-0x30(%ebp) 124260: 74 2e je 124290 * * 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 ) { 124262: 3b 4d d4 cmp -0x2c(%ebp),%ecx 124265: 72 21 jb 124288 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 124267: 8b 5d c8 mov -0x38(%ebp),%ebx 12426a: 85 db test %ebx,%ebx 12426c: 74 22 je 124290 <== NEVER TAKEN 12426e: 8b 5d c8 mov -0x38(%ebp),%ebx 124271: 8b 5b 10 mov 0x10(%ebx),%ebx 124274: 89 5d c4 mov %ebx,-0x3c(%ebp) 124277: 85 db test %ebx,%ebx 124279: 74 15 je 124290 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 12427b: 8b 5a 10 mov 0x10(%edx),%ebx 12427e: 85 db test %ebx,%ebx 124280: 0f 85 86 00 00 00 jne 12430c 124286: 66 90 xchg %ax,%ax 124288: 89 4d d4 mov %ecx,-0x2c(%ebp) 12428b: 89 55 c8 mov %edx,-0x38(%ebp) 12428e: 66 90 xchg %ax,%ax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 124290: 40 inc %eax 124291: 39 c6 cmp %eax,%esi 124293: 73 ab jae 124240 * + 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++) { 124295: ff 45 cc incl -0x34(%ebp) 124298: 83 7d cc 04 cmpl $0x4,-0x34(%ebp) 12429c: 75 81 jne 12421f 12429e: 8b 5d d0 mov -0x30(%ebp),%ebx 1242a1: 8b 75 c0 mov -0x40(%ebp),%esi } } } } if ( interested ) { 1242a4: 8b 55 c8 mov -0x38(%ebp),%edx 1242a7: 85 d2 test %edx,%edx 1242a9: 0f 84 06 ff ff ff je 1241b5 1242af: 8b 4d c8 mov -0x38(%ebp),%ecx 1242b2: e9 eb fe ff ff jmp 1241a2 1242b7: 90 nop <== NOT EXECUTED _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); 1242b8: 83 ec 0c sub $0xc,%esp 1242bb: 68 00 e9 12 00 push $0x12e900 1242c0: e8 63 cd fe ff call 111028 <_Chain_Get> if ( !psiginfo ) { 1242c5: 83 c4 10 add $0x10,%esp 1242c8: 85 c0 test %eax,%eax 1242ca: 0f 84 86 00 00 00 je 124356 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 1242d0: 8d 78 08 lea 0x8(%eax),%edi 1242d3: 8d 75 dc lea -0x24(%ebp),%esi 1242d6: b9 03 00 00 00 mov $0x3,%ecx 1242db: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 1242dd: 83 ec 08 sub $0x8,%esp 1242e0: 50 push %eax 1242e1: 81 c3 a0 e9 12 00 add $0x12e9a0,%ebx 1242e7: 53 push %ebx 1242e8: e8 ff cc fe ff call 110fec <_Chain_Append> 1242ed: 83 c4 10 add $0x10,%esp 1242f0: e9 df fe ff ff jmp 1241d4 1242f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) return 0; 1242f8: 31 c0 xor %eax,%eax 1242fa: e9 f7 fe ff ff jmp 1241f6 1242ff: 90 nop <== NOT EXECUTED */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 124300: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 124307: e9 3f fe ff ff jmp 12414b continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 12430c: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp) 124313: 0f 85 77 ff ff ff jne 124290 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 124319: 81 e3 00 00 00 10 and $0x10000000,%ebx 12431f: 0f 84 6b ff ff ff je 124290 124325: e9 5e ff ff ff jmp 124288 12432a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 12432c: e8 ef 40 ff ff call 118420 <__errno> 124331: c7 00 03 00 00 00 movl $0x3,(%eax) 124337: b8 ff ff ff ff mov $0xffffffff,%eax 12433c: e9 b5 fe ff ff jmp 1241f6 */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 124341: e8 da 40 ff ff call 118420 <__errno> 124346: c7 00 16 00 00 00 movl $0x16,(%eax) 12434c: b8 ff ff ff ff mov $0xffffffff,%eax 124351: e9 a0 fe ff ff jmp 1241f6 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(); 124356: e8 2d e4 fe ff call 112788 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 12435b: e8 c0 40 ff ff call 118420 <__errno> 124360: c7 00 0b 00 00 00 movl $0xb,(%eax) 124366: 83 c8 ff or $0xffffffff,%eax 124369: e9 88 fe ff ff jmp 1241f6 =============================================================================== 0011e8e4 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11e8e4: 55 push %ebp 11e8e5: 89 e5 mov %esp,%ebp 11e8e7: 53 push %ebx 11e8e8: 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())) 11e8eb: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 11e8f2: 74 08 je 11e8fc <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } 11e8f4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11e8f7: c9 leave <== NOT EXECUTED 11e8f8: c3 ret <== NOT EXECUTED 11e8f9: 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) { 11e8fc: 8b 1d 00 16 12 00 mov 0x121600,%ebx 11e902: 39 1d 20 42 12 00 cmp %ebx,0x124220 11e908: 74 12 je 11e91c _wrapup_reent(_global_impure_ptr); 11e90a: 83 ec 0c sub $0xc,%esp 11e90d: 53 push %ebx 11e90e: e8 f5 05 00 00 call 11ef08 <_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; 11e913: 89 1d 20 42 12 00 mov %ebx,0x124220 11e919: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11e91c: 83 ec 0c sub $0xc,%esp 11e91f: ff 73 04 pushl 0x4(%ebx) 11e922: e8 c9 4a ff ff call 1133f0 fclose (stdout); 11e927: 5a pop %edx 11e928: a1 20 42 12 00 mov 0x124220,%eax 11e92d: ff 70 08 pushl 0x8(%eax) 11e930: e8 bb 4a ff ff call 1133f0 fclose (stderr); 11e935: 58 pop %eax 11e936: a1 20 42 12 00 mov 0x124220,%eax 11e93b: ff 70 0c pushl 0xc(%eax) 11e93e: e8 ad 4a ff ff call 1133f0 11e943: 83 c4 10 add $0x10,%esp } 11e946: 8b 5d fc mov -0x4(%ebp),%ebx 11e949: c9 leave 11e94a: c3 ret =============================================================================== 0010b548 : int link( const char *existing, const char *new ) { 10b548: 55 push %ebp 10b549: 89 e5 mov %esp,%ebp 10b54b: 57 push %edi 10b54c: 56 push %esi 10b54d: 53 push %ebx 10b54e: 83 ec 58 sub $0x58,%esp 10b551: 8b 55 08 mov 0x8(%ebp),%edx 10b554: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 10b557: 31 c0 xor %eax,%eax 10b559: b9 ff ff ff ff mov $0xffffffff,%ecx 10b55e: 89 d7 mov %edx,%edi 10b560: f2 ae repnz scas %es:(%edi),%al 10b562: f7 d1 not %ecx 10b564: 49 dec %ecx 10b565: 6a 01 push $0x1 10b567: 8d 75 cc lea -0x34(%ebp),%esi 10b56a: 56 push %esi 10b56b: 6a 00 push $0x0 10b56d: 51 push %ecx 10b56e: 52 push %edx 10b56f: e8 28 f9 ff ff call 10ae9c 0, &existing_loc, true ); if ( result != 0 ) 10b574: 83 c4 20 add $0x20,%esp 10b577: 85 c0 test %eax,%eax 10b579: 74 0d je 10b588 return -1; 10b57b: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 10b580: 8d 65 f4 lea -0xc(%ebp),%esp 10b583: 5b pop %ebx 10b584: 5e pop %esi 10b585: 5f pop %edi 10b586: c9 leave 10b587: c3 ret /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 10b588: 52 push %edx 10b589: 8d 7d b8 lea -0x48(%ebp),%edi 10b58c: 57 push %edi 10b58d: 8d 45 e4 lea -0x1c(%ebp),%eax 10b590: 50 push %eax 10b591: 53 push %ebx 10b592: e8 f5 12 00 00 call 10c88c result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 10b597: 83 c4 0c add $0xc,%esp 10b59a: 8d 45 e0 lea -0x20(%ebp),%eax 10b59d: 50 push %eax 10b59e: 57 push %edi 10b59f: 03 5d e4 add -0x1c(%ebp),%ebx 10b5a2: 53 push %ebx 10b5a3: 8b 45 c4 mov -0x3c(%ebp),%eax 10b5a6: ff 50 04 call *0x4(%eax) if ( result != 0 ) { 10b5a9: 83 c4 10 add $0x10,%esp 10b5ac: 85 c0 test %eax,%eax 10b5ae: 75 61 jne 10b611 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 10b5b0: 8b 45 dc mov -0x24(%ebp),%eax 10b5b3: 39 45 c8 cmp %eax,-0x38(%ebp) 10b5b6: 75 30 jne 10b5e8 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 10b5b8: 50 push %eax 10b5b9: ff 75 e0 pushl -0x20(%ebp) 10b5bc: 57 push %edi 10b5bd: 56 push %esi 10b5be: 8b 45 c4 mov -0x3c(%ebp),%eax 10b5c1: ff 50 08 call *0x8(%eax) rtems_filesystem_freenode( &existing_loc ); 10b5c4: 89 34 24 mov %esi,(%esp) 10b5c7: 89 45 b4 mov %eax,-0x4c(%ebp) 10b5ca: e8 81 fb ff ff call 10b150 rtems_filesystem_freenode( &parent_loc ); 10b5cf: 89 3c 24 mov %edi,(%esp) 10b5d2: e8 79 fb ff ff call 10b150 return result; 10b5d7: 83 c4 10 add $0x10,%esp 10b5da: 8b 45 b4 mov -0x4c(%ebp),%eax } 10b5dd: 8d 65 f4 lea -0xc(%ebp),%esp 10b5e0: 5b pop %ebx 10b5e1: 5e pop %esi 10b5e2: 5f pop %edi 10b5e3: c9 leave 10b5e4: c3 ret 10b5e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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 ); 10b5e8: 83 ec 0c sub $0xc,%esp 10b5eb: 56 push %esi 10b5ec: e8 5f fb ff ff call 10b150 rtems_filesystem_freenode( &parent_loc ); 10b5f1: 89 3c 24 mov %edi,(%esp) 10b5f4: e8 57 fb ff ff call 10b150 rtems_set_errno_and_return_minus_one( EXDEV ); 10b5f9: e8 ca b8 00 00 call 116ec8 <__errno> 10b5fe: c7 00 12 00 00 00 movl $0x12,(%eax) 10b604: 83 c4 10 add $0x10,%esp 10b607: b8 ff ff ff ff mov $0xffffffff,%eax 10b60c: e9 6f ff ff ff jmp 10b580 rtems_filesystem_get_start_loc( new, &i, &parent_loc ); result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 10b611: 83 ec 0c sub $0xc,%esp 10b614: 56 push %esi 10b615: e8 36 fb ff ff call 10b150 return -1; 10b61a: 83 c4 10 add $0x10,%esp 10b61d: b8 ff ff ff ff mov $0xffffffff,%eax 10b622: e9 59 ff ff ff jmp 10b580 =============================================================================== 0011e7bc : off_t lseek( int fd, off_t offset, int whence ) { 11e7bc: 55 push %ebp 11e7bd: 89 e5 mov %esp,%ebp 11e7bf: 57 push %edi 11e7c0: 56 push %esi 11e7c1: 53 push %ebx 11e7c2: 83 ec 1c sub $0x1c,%esp 11e7c5: 8b 5d 08 mov 0x8(%ebp),%ebx 11e7c8: 8b 55 0c mov 0xc(%ebp),%edx 11e7cb: 8b 4d 10 mov 0x10(%ebp),%ecx 11e7ce: 8b 45 14 mov 0x14(%ebp),%eax rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11e7d1: 3b 1d 4c 21 12 00 cmp 0x12214c,%ebx 11e7d7: 0f 83 b3 00 00 00 jae 11e890 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11e7dd: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 11e7e4: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx 11e7eb: 29 f3 sub %esi,%ebx 11e7ed: 03 1d 60 63 12 00 add 0x126360,%ebx rtems_libio_check_is_open(iop); 11e7f3: f6 43 15 01 testb $0x1,0x15(%ebx) 11e7f7: 0f 84 93 00 00 00 je 11e890 <== NEVER TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; 11e7fd: 8b 73 0c mov 0xc(%ebx),%esi 11e800: 8b 7b 10 mov 0x10(%ebx),%edi 11e803: 89 75 e0 mov %esi,-0x20(%ebp) 11e806: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11e809: 83 f8 01 cmp $0x1,%eax 11e80c: 74 6e je 11e87c 11e80e: 83 f8 02 cmp $0x2,%eax 11e811: 74 35 je 11e848 11e813: 85 c0 test %eax,%eax 11e815: 75 45 jne 11e85c case SEEK_SET: iop->offset = offset; 11e817: 89 53 0c mov %edx,0xc(%ebx) 11e81a: 89 4b 10 mov %ecx,0x10(%ebx) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); 11e81d: 8b 73 20 mov 0x20(%ebx),%esi 11e820: 50 push %eax 11e821: 51 push %ecx 11e822: 52 push %edx 11e823: 53 push %ebx 11e824: ff 56 14 call *0x14(%esi) if ( status == (off_t) -1 ) 11e827: 83 c4 10 add $0x10,%esp 11e82a: 89 c1 mov %eax,%ecx 11e82c: 21 d1 and %edx,%ecx 11e82e: 41 inc %ecx 11e82f: 75 0c jne 11e83d iop->offset = old_offset; 11e831: 8b 75 e0 mov -0x20(%ebp),%esi 11e834: 8b 7d e4 mov -0x1c(%ebp),%edi 11e837: 89 73 0c mov %esi,0xc(%ebx) 11e83a: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11e83d: 8d 65 f4 lea -0xc(%ebp),%esp 11e840: 5b pop %ebx 11e841: 5e pop %esi 11e842: 5f pop %edi 11e843: c9 leave 11e844: c3 ret 11e845: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 11e848: 89 d6 mov %edx,%esi 11e84a: 89 cf mov %ecx,%edi 11e84c: 03 73 04 add 0x4(%ebx),%esi 11e84f: 13 7b 08 adc 0x8(%ebx),%edi 11e852: 89 73 0c mov %esi,0xc(%ebx) 11e855: 89 7b 10 mov %edi,0x10(%ebx) break; 11e858: eb c3 jmp 11e81d 11e85a: 66 90 xchg %ax,%ax <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); 11e85c: e8 37 4a ff ff call 113298 <__errno> 11e861: c7 00 16 00 00 00 movl $0x16,(%eax) 11e867: b8 ff ff ff ff mov $0xffffffff,%eax 11e86c: ba ff ff ff ff mov $0xffffffff,%edx /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11e871: 8d 65 f4 lea -0xc(%ebp),%esp 11e874: 5b pop %ebx 11e875: 5e pop %esi 11e876: 5f pop %edi 11e877: c9 leave 11e878: c3 ret 11e879: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 11e87c: 8b 75 e0 mov -0x20(%ebp),%esi 11e87f: 8b 7d e4 mov -0x1c(%ebp),%edi 11e882: 01 d6 add %edx,%esi 11e884: 11 cf adc %ecx,%edi 11e886: 89 73 0c mov %esi,0xc(%ebx) 11e889: 89 7b 10 mov %edi,0x10(%ebx) break; 11e88c: eb 8f jmp 11e81d 11e88e: 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); 11e890: e8 03 4a ff ff call 113298 <__errno> 11e895: c7 00 09 00 00 00 movl $0x9,(%eax) 11e89b: b8 ff ff ff ff mov $0xffffffff,%eax 11e8a0: ba ff ff ff ff mov $0xffffffff,%edx 11e8a5: eb 96 jmp 11e83d =============================================================================== 00109e88 : int _STAT_NAME( const char *path, struct stat *buf ) { 109e88: 55 push %ebp 109e89: 89 e5 mov %esp,%ebp 109e8b: 57 push %edi 109e8c: 56 push %esi 109e8d: 53 push %ebx 109e8e: 83 ec 3c sub $0x3c,%esp 109e91: 8b 55 08 mov 0x8(%ebp),%edx 109e94: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 109e97: 85 f6 test %esi,%esi 109e99: 74 65 je 109f00 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 109e9b: b9 ff ff ff ff mov $0xffffffff,%ecx 109ea0: 89 d7 mov %edx,%edi 109ea2: 31 c0 xor %eax,%eax 109ea4: f2 ae repnz scas %es:(%edi),%al 109ea6: f7 d1 not %ecx 109ea8: 49 dec %ecx 109ea9: 83 ec 0c sub $0xc,%esp 109eac: 6a 00 push $0x0 109eae: 8d 5d d4 lea -0x2c(%ebp),%ebx 109eb1: 53 push %ebx 109eb2: 6a 00 push $0x0 109eb4: 51 push %ecx 109eb5: 52 push %edx 109eb6: e8 e5 f9 ff ff call 1098a0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 109ebb: 83 c4 20 add $0x20,%esp 109ebe: 85 c0 test %eax,%eax 109ec0: 74 0e je 109ed0 return -1; 109ec2: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 109ec7: 8d 65 f4 lea -0xc(%ebp),%esp 109eca: 5b pop %ebx 109ecb: 5e pop %esi 109ecc: 5f pop %edi 109ecd: c9 leave 109ece: c3 ret 109ecf: 90 nop <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 109ed0: b9 48 00 00 00 mov $0x48,%ecx 109ed5: 89 f7 mov %esi,%edi 109ed7: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 109ed9: 83 ec 08 sub $0x8,%esp 109edc: 56 push %esi 109edd: 53 push %ebx 109ede: 8b 45 dc mov -0x24(%ebp),%eax 109ee1: ff 50 18 call *0x18(%eax) rtems_filesystem_freenode( &loc ); 109ee4: 89 1c 24 mov %ebx,(%esp) 109ee7: 89 45 c4 mov %eax,-0x3c(%ebp) 109eea: e8 89 fa ff ff call 109978 return status; 109eef: 83 c4 10 add $0x10,%esp 109ef2: 8b 45 c4 mov -0x3c(%ebp),%eax } 109ef5: 8d 65 f4 lea -0xc(%ebp),%esp 109ef8: 5b pop %ebx 109ef9: 5e pop %esi 109efa: 5f pop %edi 109efb: c9 leave 109efc: c3 ret 109efd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 109f00: e8 67 b5 00 00 call 11546c <__errno> 109f05: c7 00 0e 00 00 00 movl $0xe,(%eax) 109f0b: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 109f10: 8d 65 f4 lea -0xc(%ebp),%esp 109f13: 5b pop %ebx 109f14: 5e pop %esi 109f15: 5f pop %edi 109f16: c9 leave 109f17: c3 ret =============================================================================== 00108368 : #include "malloc_p.h" void *malloc( size_t size ) { 108368: 55 push %ebp 108369: 89 e5 mov %esp,%ebp 10836b: 56 push %esi 10836c: 53 push %ebx 10836d: 8b 75 08 mov 0x8(%ebp),%esi void *return_this; MSBUMP(malloc_calls, 1); 108370: ff 05 84 63 12 00 incl 0x126384 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 108376: e8 fd fe ff ff call 108278 /* * Validate the parameters */ if ( !size ) 10837b: 85 f6 test %esi,%esi 10837d: 74 5d je 1083dc return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 10837f: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 108386: 74 48 je 1083d0 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 108388: 6a 00 push $0x0 10838a: 6a 00 push $0x0 10838c: 56 push %esi 10838d: ff 35 58 21 12 00 pushl 0x122158 108393: e8 48 4d 00 00 call 10d0e0 <_Protected_heap_Allocate_aligned_with_boundary> 108398: 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 ) { 10839a: 83 c4 10 add $0x10,%esp 10839d: 85 c0 test %eax,%eax 10839f: 74 47 je 1083e8 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1083a1: a1 30 47 12 00 mov 0x124730,%eax 1083a6: 85 c0 test %eax,%eax 1083a8: 74 0a je 1083b4 (*rtems_malloc_dirty_helper)( return_this, size ); 1083aa: 83 ec 08 sub $0x8,%esp 1083ad: 56 push %esi 1083ae: 53 push %ebx 1083af: ff d0 call *%eax 1083b1: 83 c4 10 add $0x10,%esp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1083b4: a1 28 47 12 00 mov 0x124728,%eax 1083b9: 85 c0 test %eax,%eax 1083bb: 74 0a je 1083c7 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1083bd: 83 ec 0c sub $0xc,%esp 1083c0: 53 push %ebx 1083c1: ff 50 04 call *0x4(%eax) 1083c4: 83 c4 10 add $0x10,%esp return return_this; } 1083c7: 89 d8 mov %ebx,%eax 1083c9: 8d 65 f8 lea -0x8(%ebp),%esp 1083cc: 5b pop %ebx 1083cd: 5e pop %esi 1083ce: c9 leave 1083cf: c3 ret /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) 1083d0: e8 63 fe ff ff call 108238 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1083d5: 84 c0 test %al,%al 1083d7: 75 af jne 108388 <== ALWAYS TAKEN 1083d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED !malloc_is_system_state_OK() ) return NULL; 1083dc: 31 db xor %ebx,%ebx */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 1083de: 89 d8 mov %ebx,%eax 1083e0: 8d 65 f8 lea -0x8(%ebp),%esp 1083e3: 5b pop %ebx 1083e4: 5e pop %esi 1083e5: c9 leave 1083e6: c3 ret 1083e7: 90 nop <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 1083e8: a1 2c 47 12 00 mov 0x12472c,%eax 1083ed: 85 c0 test %eax,%eax 1083ef: 74 12 je 108403 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 1083f1: 83 ec 0c sub $0xc,%esp 1083f4: 56 push %esi 1083f5: ff 50 04 call *0x4(%eax) if ( !return_this ) { 1083f8: 83 c4 10 add $0x10,%esp 1083fb: 85 c0 test %eax,%eax 1083fd: 74 04 je 108403 1083ff: 89 c3 mov %eax,%ebx 108401: eb 9e jmp 1083a1 errno = ENOMEM; 108403: e8 90 ae 00 00 call 113298 <__errno> 108408: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 10840e: eb b7 jmp 1083c7 =============================================================================== 001082dc : #include "malloc_p.h" int malloc_get_statistics( rtems_malloc_statistics_t *stats ) { 1082dc: 55 push %ebp 1082dd: 89 e5 mov %esp,%ebp 1082df: 57 push %edi 1082e0: 56 push %esi 1082e1: 53 push %ebx 1082e2: 83 ec 0c sub $0xc,%esp 1082e5: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !stats ) 1082e8: 85 db test %ebx,%ebx 1082ea: 74 38 je 108324 return -1; _RTEMS_Lock_allocator(); 1082ec: 83 ec 0c sub $0xc,%esp 1082ef: ff 35 84 65 12 00 pushl 0x126584 1082f5: e8 6a 3c 00 00 call 10bf64 <_API_Mutex_Lock> *stats = rtems_malloc_statistics; 1082fa: be 80 63 12 00 mov $0x126380,%esi 1082ff: b9 0b 00 00 00 mov $0xb,%ecx 108304: 89 df mov %ebx,%edi 108306: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _RTEMS_Unlock_allocator(); 108308: 58 pop %eax 108309: ff 35 84 65 12 00 pushl 0x126584 10830f: e8 98 3c 00 00 call 10bfac <_API_Mutex_Unlock> return 0; 108314: 83 c4 10 add $0x10,%esp 108317: 31 c0 xor %eax,%eax } 108319: 8d 65 f4 lea -0xc(%ebp),%esp 10831c: 5b pop %ebx 10831d: 5e pop %esi 10831e: 5f pop %edi 10831f: c9 leave 108320: c3 ret 108321: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int malloc_get_statistics( rtems_malloc_statistics_t *stats ) { if ( !stats ) return -1; 108324: b8 ff ff ff ff mov $0xffffffff,%eax _RTEMS_Lock_allocator(); *stats = rtems_malloc_statistics; _RTEMS_Unlock_allocator(); return 0; } 108329: 8d 65 f4 lea -0xc(%ebp),%esp 10832c: 5b pop %ebx 10832d: 5e pop %esi 10832e: 5f pop %edi 10832f: c9 leave 108330: c3 ret =============================================================================== 0010ac6c : */ int malloc_info( Heap_Information_block *the_info ) { 10ac6c: 55 push %ebp 10ac6d: 89 e5 mov %esp,%ebp 10ac6f: 83 ec 08 sub $0x8,%esp 10ac72: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_info ) 10ac75: 85 c0 test %eax,%eax 10ac77: 74 17 je 10ac90 return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 10ac79: 83 ec 08 sub $0x8,%esp 10ac7c: 50 push %eax 10ac7d: ff 35 58 91 12 00 pushl 0x129158 10ac83: e8 98 5e 00 00 call 110b20 <_Protected_heap_Get_information> return 0; 10ac88: 83 c4 10 add $0x10,%esp 10ac8b: 31 c0 xor %eax,%eax } 10ac8d: c9 leave 10ac8e: c3 ret 10ac8f: 90 nop <== NOT EXECUTED int malloc_info( Heap_Information_block *the_info ) { if ( !the_info ) return -1; 10ac90: b8 ff ff ff ff mov $0xffffffff,%eax _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); return 0; } 10ac95: c9 leave 10ac96: c3 ret =============================================================================== 001086fc : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 1086fc: 55 push %ebp 1086fd: 89 e5 mov %esp,%ebp 1086ff: 56 push %esi 108700: 53 push %ebx 108701: 8b 75 08 mov 0x8(%ebp),%esi * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; 108704: 8b 0d 0c 7b 12 00 mov 0x127b0c,%ecx if ( sbrk_amount == 0 ) 10870a: 85 c9 test %ecx,%ecx 10870c: 75 0a jne 108718 <== ALWAYS TAKEN the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); if ( starting_address == (void*) -1 ) return (void *) 0; 10870e: 31 c0 xor %eax,%eax MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 108710: 8d 65 f8 lea -0x8(%ebp),%esp 108713: 5b pop %ebx 108714: 5e pop %esi 108715: c9 leave 108716: c3 ret 108717: 90 nop <== NOT EXECUTED sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 108718: 8d 04 0e lea (%esi,%ecx,1),%eax 10871b: 31 d2 xor %edx,%edx 10871d: f7 f1 div %ecx 10871f: 89 c3 mov %eax,%ebx 108721: 0f af d9 imul %ecx,%ebx starting_address = (void *) sbrk(the_size); 108724: 83 ec 0c sub $0xc,%esp 108727: 53 push %ebx 108728: e8 2f 7d ff ff call 10045c if ( starting_address == (void*) -1 ) 10872d: 83 c4 10 add $0x10,%esp 108730: 83 f8 ff cmp $0xffffffff,%eax 108733: 74 d9 je 10870e return (void *) 0; if ( !_Protected_heap_Extend( 108735: 52 push %edx 108736: 53 push %ebx 108737: 50 push %eax 108738: ff 35 58 37 12 00 pushl 0x123758 10873e: e8 51 4d 00 00 call 10d494 <_Protected_heap_Extend> 108743: 83 c4 10 add $0x10,%esp 108746: 84 c0 test %al,%al 108748: 74 1b je 108765 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); 10874a: 01 1d e0 7a 12 00 add %ebx,0x127ae0 108750: 6a 00 push $0x0 108752: 6a 00 push $0x0 108754: 56 push %esi 108755: ff 35 58 37 12 00 pushl 0x123758 10875b: e8 fc 4c 00 00 call 10d45c <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 108760: 83 c4 10 add $0x10,%esp 108763: eb ab jmp 108710 if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 108765: 83 ec 0c sub $0xc,%esp 108768: f7 db neg %ebx 10876a: 53 push %ebx 10876b: e8 ec 7c ff ff call 10045c errno = ENOMEM; 108770: e8 7b b1 00 00 call 1138f0 <__errno> 108775: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 10877b: 83 c4 10 add $0x10,%esp 10877e: 31 c0 xor %eax,%eax 108780: eb 8e jmp 108710 =============================================================================== 00111e38 : */ void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 111e38: 55 push %ebp 111e39: 89 e5 mov %esp,%ebp 111e3b: 57 push %edi 111e3c: 56 push %esi 111e3d: 53 push %ebx 111e3e: 83 ec 0c sub $0xc,%esp 111e41: 8b 7d 0c mov 0xc(%ebp),%edi IMFS_assert( block_table ); /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 111e44: 8b 45 08 mov 0x8(%ebp),%eax 111e47: 8b 30 mov (%eax),%esi for ( i=0 ; i<== NEVER TAKEN 111e4d: 31 db xor %ebx,%ebx 111e4f: 90 nop if ( b[i] ) { 111e50: 8b 04 9e mov (%esi,%ebx,4),%eax 111e53: 85 c0 test %eax,%eax 111e55: 74 13 je 111e6a memfile_free_block( b[i] ); 111e57: 83 ec 0c sub $0xc,%esp 111e5a: 50 push %eax 111e5b: e8 bc ff ff ff call 111e1c b[i] = 0; 111e60: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4) 111e67: 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 111e6f: 8b 45 08 mov 0x8(%ebp),%eax 111e72: 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 ); 111e74: 83 ec 0c sub $0xc,%esp 111e77: 56 push %esi 111e78: e8 9f ff ff ff call 111e1c *block_table = 0; 111e7d: 8b 45 08 mov 0x8(%ebp),%eax 111e80: c7 00 00 00 00 00 movl $0x0,(%eax) 111e86: 83 c4 10 add $0x10,%esp } 111e89: 8d 65 f4 lea -0xc(%ebp),%esp 111e8c: 5b pop %ebx 111e8d: 5e pop %esi 111e8e: 5f pop %edi 111e8f: c9 leave 111e90: c3 ret =============================================================================== 001123c0 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 1123c0: 55 push %ebp 1123c1: 89 e5 mov %esp,%ebp 1123c3: 53 push %ebx 1123c4: 83 ec 14 sub $0x14,%esp 1123c7: 8b 4d 08 mov 0x8(%ebp),%ecx 1123ca: 8b 45 0c mov 0xc(%ebp),%eax 1123cd: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 1123d0: 8b 59 18 mov 0x18(%ecx),%ebx * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 1123d3: 39 53 54 cmp %edx,0x54(%ebx) 1123d6: 7f 19 jg 1123f1 <== NEVER TAKEN 1123d8: 7d 12 jge 1123ec <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 1123da: 51 push %ecx 1123db: 52 push %edx 1123dc: 50 push %eax 1123dd: 53 push %ebx 1123de: e8 39 fc ff ff call 11201c 1123e3: 83 c4 10 add $0x10,%esp iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 1123e6: 8b 5d fc mov -0x4(%ebp),%ebx 1123e9: c9 leave 1123ea: c3 ret 1123eb: 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 ) 1123ec: 39 43 50 cmp %eax,0x50(%ebx) 1123ef: 72 e9 jb 1123da /* * 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; 1123f1: 89 43 50 mov %eax,0x50(%ebx) 1123f4: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 1123f7: 89 41 04 mov %eax,0x4(%ecx) 1123fa: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 1123fd: 83 ec 08 sub $0x8,%esp 112400: 6a 00 push $0x0 112402: 8d 45 f0 lea -0x10(%ebp),%eax 112405: 50 push %eax 112406: e8 05 5d ff ff call 108110 11240b: 8b 45 f0 mov -0x10(%ebp),%eax 11240e: 89 43 40 mov %eax,0x40(%ebx) return 0; 112411: 83 c4 10 add $0x10,%esp 112414: 31 c0 xor %eax,%eax } 112416: 8b 5d fc mov -0x4(%ebp),%ebx 112419: c9 leave 11241a: c3 ret =============================================================================== 0011241c : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 11241c: 55 push %ebp 11241d: 89 e5 mov %esp,%ebp 11241f: 57 push %edi 112420: 56 push %esi 112421: 53 push %ebx 112422: 83 ec 0c sub $0xc,%esp 112425: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 112428: 8b 73 18 mov 0x18(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 11242b: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 11242f: 74 2f je 112460 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 )) 112431: 57 push %edi 112432: ff 73 10 pushl 0x10(%ebx) 112435: ff 73 0c pushl 0xc(%ebx) 112438: 56 push %esi 112439: e8 de fb ff ff call 11201c 11243e: 83 c4 10 add $0x10,%esp 112441: 85 c0 test %eax,%eax 112443: 75 45 jne 11248a rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 112445: 8b 46 50 mov 0x50(%esi),%eax 112448: 8b 56 54 mov 0x54(%esi),%edx 11244b: 89 43 04 mov %eax,0x4(%ebx) 11244e: 89 53 08 mov %edx,0x8(%ebx) 112451: 8b 43 0c mov 0xc(%ebx),%eax 112454: 8b 53 10 mov 0x10(%ebx),%edx } return iop->offset; } 112457: 8d 65 f4 lea -0xc(%ebp),%esp 11245a: 5b pop %ebx 11245b: 5e pop %esi 11245c: 5f pop %edi 11245d: c9 leave 11245e: c3 ret 11245f: 90 nop <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 112460: 8b 43 0c mov 0xc(%ebx),%eax 112463: 8b 53 10 mov 0x10(%ebx),%edx 112466: 8b 7e 50 mov 0x50(%esi),%edi 112469: 8b 4e 54 mov 0x54(%esi),%ecx 11246c: 39 ca cmp %ecx,%edx 11246e: 7c e7 jl 112457 <== NEVER TAKEN 112470: 7e 12 jle 112484 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; 112472: 89 7b 0c mov %edi,0xc(%ebx) <== NOT EXECUTED 112475: 89 4b 10 mov %ecx,0x10(%ebx) <== NOT EXECUTED 112478: 89 f8 mov %edi,%eax <== NOT EXECUTED 11247a: 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; } 11247c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11247f: 5b pop %ebx <== NOT EXECUTED 112480: 5e pop %esi <== NOT EXECUTED 112481: 5f pop %edi <== NOT EXECUTED 112482: c9 leave <== NOT EXECUTED 112483: c3 ret <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 112484: 39 f8 cmp %edi,%eax 112486: 76 cf jbe 112457 <== ALWAYS TAKEN 112488: eb e8 jmp 112472 <== NOT EXECUTED 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 ); 11248a: e8 09 0e 00 00 call 113298 <__errno> 11248f: c7 00 1c 00 00 00 movl $0x1c,(%eax) 112495: b8 ff ff ff ff mov $0xffffffff,%eax 11249a: ba ff ff ff ff mov $0xffffffff,%edx 11249f: eb b6 jmp 112457 =============================================================================== 00112318 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 112318: 55 push %ebp 112319: 89 e5 mov %esp,%ebp 11231b: 56 push %esi 11231c: 53 push %ebx 11231d: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 112320: 8b 73 18 mov 0x18(%ebx),%esi /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 112323: 8b 43 14 mov 0x14(%ebx),%eax 112326: a9 04 02 00 00 test $0x204,%eax 11232b: 74 06 je 112333 && (the_jnode->type == IMFS_LINEAR_FILE)) { 11232d: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 112331: 74 2d je 112360 <== NEVER TAKEN the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 112333: 8b 56 50 mov 0x50(%esi),%edx 112336: 8b 4e 54 mov 0x54(%esi),%ecx return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 112339: f6 c4 02 test $0x2,%ah 11233c: 75 12 jne 112350 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 11233e: 89 53 04 mov %edx,0x4(%ebx) 112341: 89 4b 08 mov %ecx,0x8(%ebx) return 0; 112344: 31 c0 xor %eax,%eax } 112346: 8d 65 f8 lea -0x8(%ebp),%esp 112349: 5b pop %ebx 11234a: 5e pop %esi 11234b: c9 leave 11234c: c3 ret 11234d: 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; 112350: 89 53 0c mov %edx,0xc(%ebx) 112353: 89 4b 10 mov %ecx,0x10(%ebx) 112356: 8b 56 50 mov 0x50(%esi),%edx 112359: 8b 4e 54 mov 0x54(%esi),%ecx 11235c: eb e0 jmp 11233e 11235e: 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; 112360: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 112363: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 112366: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED the_jnode->info.file.size = 0; 11236d: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED 112374: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 11237b: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 112382: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 112389: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED if ((count != 0) 112390: 85 c0 test %eax,%eax <== NOT EXECUTED 112392: 75 09 jne 11239d <== NOT EXECUTED 112394: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 112397: 31 d2 xor %edx,%edx <== NOT EXECUTED 112399: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 11239b: eb 9c jmp 112339 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 11239d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1123a0: 50 push %eax <== NOT EXECUTED 1123a1: 52 push %edx <== NOT EXECUTED 1123a2: 6a 00 push $0x0 <== NOT EXECUTED 1123a4: 6a 00 push $0x0 <== NOT EXECUTED 1123a6: 56 push %esi <== NOT EXECUTED 1123a7: e8 88 fd ff ff call 112134 <== NOT EXECUTED 1123ac: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1123af: 40 inc %eax <== NOT EXECUTED 1123b0: 74 08 je 1123ba <== NOT EXECUTED 1123b2: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 1123b5: e9 79 ff ff ff jmp 112333 <== NOT EXECUTED return -1; 1123ba: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1123bd: eb 87 jmp 112346 <== NOT EXECUTED =============================================================================== 0010842c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 10842c: 55 push %ebp 10842d: 89 e5 mov %esp,%ebp 10842f: 57 push %edi 108430: 56 push %esi 108431: 53 push %ebx 108432: 83 ec 3c sub $0x3c,%esp 108435: 8b 7d 08 mov 0x8(%ebp),%edi 108438: 8b 5d 0c mov 0xc(%ebp),%ebx 10843b: 8b 55 10 mov 0x10(%ebp),%edx 10843e: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 108441: f6 c7 f0 test $0xf0,%bh 108444: 75 1a jne 108460 rtems_set_errno_and_return_minus_one( EINVAL ); 108446: e8 4d ae 00 00 call 113298 <__errno> 10844b: c7 00 16 00 00 00 movl $0x16,(%eax) 108451: b8 ff ff ff ff mov $0xffffffff,%eax result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 108456: 8d 65 f4 lea -0xc(%ebp),%esp 108459: 5b pop %ebx 10845a: 5e pop %esi 10845b: 5f pop %edi 10845c: c9 leave 10845d: c3 ret 10845e: 66 90 xchg %ax,%ax <== NOT EXECUTED 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 ); 108460: 50 push %eax 108461: 8d 75 cc lea -0x34(%ebp),%esi 108464: 56 push %esi 108465: 8d 45 e4 lea -0x1c(%ebp),%eax 108468: 50 push %eax 108469: 57 push %edi 10846a: 89 55 c4 mov %edx,-0x3c(%ebp) 10846d: 89 4d c0 mov %ecx,-0x40(%ebp) 108470: e8 1f 0a 00 00 call 108e94 result = (*temp_loc.ops->evalformake_h)( 108475: 83 c4 0c add $0xc,%esp 108478: 8d 45 e0 lea -0x20(%ebp),%eax 10847b: 50 push %eax 10847c: 56 push %esi 10847d: 03 7d e4 add -0x1c(%ebp),%edi 108480: 57 push %edi 108481: 8b 45 d8 mov -0x28(%ebp),%eax 108484: ff 50 04 call *0x4(%eax) &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 108487: 83 c4 10 add $0x10,%esp 10848a: 85 c0 test %eax,%eax 10848c: 8b 55 c4 mov -0x3c(%ebp),%edx 10848f: 8b 4d c0 mov -0x40(%ebp),%ecx 108492: 74 10 je 1084a4 return -1; 108494: b8 ff ff ff ff mov $0xffffffff,%eax result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 108499: 8d 65 f4 lea -0xc(%ebp),%esp 10849c: 5b pop %ebx 10849d: 5e pop %esi 10849e: 5f pop %edi 10849f: c9 leave 1084a0: c3 ret 1084a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED &name_start ); if ( result != 0 ) return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1084a4: 83 ec 0c sub $0xc,%esp 1084a7: 56 push %esi 1084a8: 51 push %ecx 1084a9: 52 push %edx 1084aa: 53 push %ebx 1084ab: ff 75 e0 pushl -0x20(%ebp) 1084ae: 8b 45 d8 mov -0x28(%ebp),%eax 1084b1: ff 50 14 call *0x14(%eax) rtems_filesystem_freenode( &temp_loc ); 1084b4: 83 c4 14 add $0x14,%esp 1084b7: 56 push %esi 1084b8: 89 45 c4 mov %eax,-0x3c(%ebp) 1084bb: e8 c0 fb ff ff call 108080 return result; 1084c0: 83 c4 10 add $0x10,%esp 1084c3: 8b 45 c4 mov -0x3c(%ebp),%eax } 1084c6: 8d 65 f4 lea -0xc(%ebp),%esp 1084c9: 5b pop %ebx 1084ca: 5e pop %esi 1084cb: 5f pop %edi 1084cc: c9 leave 1084cd: c3 ret =============================================================================== 00108554 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 108554: 55 push %ebp 108555: 89 e5 mov %esp,%ebp 108557: 57 push %edi 108558: 56 push %esi 108559: 53 push %ebx 10855a: 83 ec 4c sub $0x4c,%esp 10855d: 8b 75 10 mov 0x10(%ebp),%esi /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 108560: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 108564: 0f 87 36 02 00 00 ja 1087a0 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 10856a: 83 ec 0c sub $0xc,%esp 10856d: 56 push %esi 10856e: e8 35 7a 00 00 call 10ffa8 108573: 89 45 b8 mov %eax,-0x48(%ebp) if ( !mount_h ) 108576: 83 c4 10 add $0x10,%esp 108579: 85 c0 test %eax,%eax 10857b: 0f 84 1f 02 00 00 je 1087a0 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 108581: 8b 45 0c mov 0xc(%ebp),%eax 108584: 85 c0 test %eax,%eax const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108586: 0f 95 45 b7 setne -0x49(%ebp) 10858a: 0f 84 e8 01 00 00 je 108778 * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 108590: 31 c0 xor %eax,%eax 108592: b9 ff ff ff ff mov $0xffffffff,%ecx 108597: 8b 7d 0c mov 0xc(%ebp),%edi 10859a: f2 ae repnz scas %es:(%edi),%al 10859c: f7 d1 not %ecx 10859e: 8d 41 ff lea -0x1(%ecx),%eax 1085a1: 89 45 ac mov %eax,-0x54(%ebp) 1085a4: 89 4d bc mov %ecx,-0x44(%ebp) 1085a7: 8b 55 0c mov 0xc(%ebp),%edx 1085aa: 89 55 b0 mov %edx,-0x50(%ebp) const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 1085ad: ba ff ff ff ff mov $0xffffffff,%edx 1085b2: 31 c0 xor %eax,%eax 1085b4: 89 d1 mov %edx,%ecx 1085b6: 89 f7 mov %esi,%edi 1085b8: f2 ae repnz scas %es:(%edi),%al 1085ba: f7 d1 not %ecx 1085bc: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 1085bf: 8b 7d 08 mov 0x8(%ebp),%edi 1085c2: 85 ff test %edi,%edi 1085c4: 0f 84 ca 01 00 00 je 108794 1085ca: 89 d1 mov %edx,%ecx 1085cc: 8b 7d 08 mov 0x8(%ebp),%edi 1085cf: f2 ae repnz scas %es:(%edi),%al 1085d1: f7 d1 not %ecx 1085d3: 89 4d c0 mov %ecx,-0x40(%ebp) size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 1085d6: 83 ec 08 sub $0x8,%esp size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 1085d9: 8b 55 bc mov -0x44(%ebp),%edx 1085dc: 8b 7d c4 mov -0x3c(%ebp),%edi 1085df: 8d 44 3a 74 lea 0x74(%edx,%edi,1),%eax const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) 1085e3: 03 45 c0 add -0x40(%ebp),%eax + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 1085e6: 50 push %eax 1085e7: 6a 01 push $0x1 1085e9: e8 16 f9 ff ff call 107f04 1085ee: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 1085f0: 83 c4 10 add $0x10,%esp 1085f3: 85 c0 test %eax,%eax 1085f5: 0f 84 65 01 00 00 je 108760 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 1085fb: 8d 40 74 lea 0x74(%eax),%eax memcpy( str, filesystemtype, filesystemtype_size ); 1085fe: 89 c7 mov %eax,%edi 108600: 8b 4d c4 mov -0x3c(%ebp),%ecx 108603: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 108605: 89 fa mov %edi,%edx mt_entry->type = str; 108607: 89 43 6c mov %eax,0x6c(%ebx) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 10860a: 8b 75 08 mov 0x8(%ebp),%esi 10860d: 8b 4d c0 mov -0x40(%ebp),%ecx 108610: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 108612: 89 f8 mov %edi,%eax mt_entry->dev = str; 108614: 89 53 70 mov %edx,0x70(%ebx) str += source_size; memcpy( str, target, target_size ); 108617: 8b 75 b0 mov -0x50(%ebp),%esi 10861a: 8b 4d bc mov -0x44(%ebp),%ecx 10861d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) mt_entry->target = str; 10861f: 89 43 68 mov %eax,0x68(%ebx) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 108622: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 108625: 8b 45 14 mov 0x14(%ebp),%eax 108628: 89 43 30 mov %eax,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 10862b: 8d 7b 38 lea 0x38(%ebx),%edi 10862e: be 80 0a 12 00 mov $0x120a80,%esi 108633: b1 0c mov $0xc,%cl 108635: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 108637: 80 7d b7 00 cmpb $0x0,-0x49(%ebp) 10863b: 0f 85 83 00 00 00 jne 1086c4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 108641: 81 3d 04 40 12 00 08 cmpl $0x124008,0x124004 108648: 40 12 00 10864b: 0f 85 67 01 00 00 jne 1087b8 <== NEVER TAKEN ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 108651: 31 f6 xor %esi,%esi * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 108653: 83 ec 08 sub $0x8,%esp 108656: ff 75 18 pushl 0x18(%ebp) 108659: 53 push %ebx 10865a: ff 55 b8 call *-0x48(%ebp) 10865d: 83 c4 10 add $0x10,%esp 108660: 85 c0 test %eax,%eax 108662: 0f 85 74 01 00 00 jne 1087dc 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 ); 108668: 56 push %esi 108669: 6a 00 push $0x0 10866b: 6a 00 push $0x0 10866d: ff 35 68 63 12 00 pushl 0x126368 108673: e8 18 30 00 00 call 10b690 108678: 5a pop %edx 108679: 59 pop %ecx 10867a: 53 push %ebx 10867b: 68 04 40 12 00 push $0x124004 108680: e8 27 39 00 00 call 10bfac <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 108685: 58 pop %eax 108686: ff 35 68 63 12 00 pushl 0x126368 10868c: e8 fb 30 00 00 call 10b78c */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 108691: 83 c4 10 add $0x10,%esp 108694: 80 7d b7 00 cmpb $0x0,-0x49(%ebp) 108698: 74 0a je 1086a4 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 10869a: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 10869c: 8d 65 f4 lea -0xc(%ebp),%esp 10869f: 5b pop %ebx 1086a0: 5e pop %esi 1086a1: 5f pop %edi 1086a2: c9 leave 1086a3: c3 ret rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; 1086a4: 8b 3d 30 41 12 00 mov 0x124130,%edi 1086aa: 83 c7 18 add $0x18,%edi 1086ad: 8d 73 1c lea 0x1c(%ebx),%esi 1086b0: b9 05 00 00 00 mov $0x5,%ecx 1086b5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 1086b7: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 1086b9: 8d 65 f4 lea -0xc(%ebp),%esp 1086bc: 5b pop %ebx 1086bd: 5e pop %esi 1086be: 5f pop %edi 1086bf: c9 leave 1086c0: c3 ret 1086c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 1086c4: 83 ec 0c sub $0xc,%esp 1086c7: 6a 01 push $0x1 1086c9: 8d 75 d4 lea -0x2c(%ebp),%esi 1086cc: 56 push %esi 1086cd: 6a 07 push $0x7 1086cf: ff 75 ac pushl -0x54(%ebp) 1086d2: ff 75 0c pushl 0xc(%ebp) 1086d5: e8 ce f8 ff ff call 107fa8 1086da: 83 c4 20 add $0x20,%esp 1086dd: 40 inc %eax 1086de: 0f 84 df 00 00 00 je 1087c3 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1086e4: 83 ec 0c sub $0xc,%esp 1086e7: 56 push %esi 1086e8: 8b 45 e0 mov -0x20(%ebp),%eax 1086eb: ff 50 10 call *0x10(%eax) 1086ee: 83 c4 10 add $0x10,%esp 1086f1: 48 dec %eax 1086f2: 0f 85 0c 01 00 00 jne 108804 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 1086f8: 83 ec 08 sub $0x8,%esp 1086fb: ff 75 d4 pushl -0x2c(%ebp) 1086fe: 68 d0 84 10 00 push $0x1084d0 108703: e8 dc fd ff ff call 1084e4 108708: 83 c4 10 add $0x10,%esp 10870b: 84 c0 test %al,%al 10870d: 0f 85 01 01 00 00 jne 108814 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 108713: 8b 45 d4 mov -0x2c(%ebp),%eax 108716: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 108719: 8b 45 dc mov -0x24(%ebp),%eax 10871c: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 10871f: 8b 45 e0 mov -0x20(%ebp),%eax 108722: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 108725: 8b 55 e4 mov -0x1c(%ebp),%edx 108728: 89 53 18 mov %edx,0x18(%ebx) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 10872b: 83 ec 0c sub $0xc,%esp 10872e: 53 push %ebx 10872f: ff 50 20 call *0x20(%eax) 108732: 83 c4 10 add $0x10,%esp 108735: 85 c0 test %eax,%eax 108737: 0f 84 16 ff ff ff je 108653 <== ALWAYS TAKEN return 0; cleanup_and_bail: free( mt_entry ); 10873d: 83 ec 0c sub $0xc,%esp 108740: 53 push %ebx 108741: e8 4e f9 ff ff call 108094 108746: 83 c4 10 add $0x10,%esp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 108749: 83 ec 0c sub $0xc,%esp 10874c: 56 push %esi 10874d: e8 2e f9 ff ff call 108080 108752: 83 c4 10 add $0x10,%esp return -1; 108755: b8 ff ff ff ff mov $0xffffffff,%eax 10875a: e9 3d ff ff ff jmp 10869c 10875f: 90 nop <== NOT EXECUTED target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 108760: e8 33 ab 00 00 call 113298 <__errno> <== NOT EXECUTED 108765: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10876b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108770: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108773: 5b pop %ebx <== NOT EXECUTED 108774: 5e pop %esi <== NOT EXECUTED 108775: 5f pop %edi <== NOT EXECUTED 108776: c9 leave <== NOT EXECUTED 108777: c3 ret <== NOT EXECUTED const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108778: c7 45 bc 02 00 00 00 movl $0x2,-0x44(%ebp) 10877f: c7 45 ac 01 00 00 00 movl $0x1,-0x54(%ebp) 108786: c7 45 b0 27 0a 12 00 movl $0x120a27,-0x50(%ebp) 10878d: e9 1b fe ff ff jmp 1085ad 108792: 66 90 xchg %ax,%ax <== NOT EXECUTED size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108794: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 10879b: e9 36 fe ff ff jmp 1085d6 /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 1087a0: e8 f3 aa 00 00 call 113298 <__errno> 1087a5: c7 00 16 00 00 00 movl $0x16,(%eax) 1087ab: b8 ff ff ff ff mov $0xffffffff,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 1087b0: 8d 65 f4 lea -0xc(%ebp),%esp 1087b3: 5b pop %ebx 1087b4: 5e pop %esi 1087b5: 5f pop %edi 1087b6: c9 leave 1087b7: c3 ret } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 1087b8: e8 db aa 00 00 call 113298 <__errno> <== NOT EXECUTED 1087bd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 1087c3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087c6: 53 push %ebx <== NOT EXECUTED 1087c7: e8 c8 f8 ff ff call 108094 <== NOT EXECUTED 1087cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 1087cf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1087d4: e9 c3 fe ff ff jmp 10869c <== NOT EXECUTED 1087d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 1087dc: 83 ec 0c sub $0xc,%esp 1087df: 53 push %ebx 1087e0: 8b 45 e0 mov -0x20(%ebp),%eax 1087e3: ff 50 28 call *0x28(%eax) return 0; cleanup_and_bail: free( mt_entry ); 1087e6: 89 1c 24 mov %ebx,(%esp) 1087e9: e8 a6 f8 ff ff call 108094 if ( loc_to_free ) 1087ee: 83 c4 10 add $0x10,%esp 1087f1: 85 f6 test %esi,%esi 1087f3: 0f 85 50 ff ff ff jne 108749 <== ALWAYS TAKEN rtems_filesystem_freenode( loc_to_free ); return -1; 1087f9: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1087fe: e9 99 fe ff ff jmp 10869c <== NOT EXECUTED 108803: 90 nop <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 108804: e8 8f aa 00 00 call 113298 <__errno> 108809: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 10880f: e9 29 ff ff ff jmp 10873d /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; 108814: e8 7f aa 00 00 call 113298 <__errno> 108819: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 10881f: e9 19 ff ff ff jmp 10873d =============================================================================== 00108b48 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 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 1c sub $0x1c,%esp 108b51: 8b 45 08 mov 0x8(%ebp),%eax 108b54: 89 45 e4 mov %eax,-0x1c(%ebp) 108b57: 8b 5d 0c mov 0xc(%ebp),%ebx 108b5a: 8b 75 10 mov 0x10(%ebp),%esi 108b5d: 8b 7d 14 mov 0x14(%ebp),%edi 108b60: 8b 45 18 mov 0x18(%ebp),%eax 108b63: 89 45 e0 mov %eax,-0x20(%ebp) int rv = -1; if (target != NULL) { 108b66: 85 db test %ebx,%ebx 108b68: 74 3f je 108ba9 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 108b6a: 83 ec 08 sub $0x8,%esp 108b6d: 68 ff 01 00 00 push $0x1ff 108b72: 53 push %ebx 108b73: e8 08 0a 00 00 call 109580 if (rv == 0) { 108b78: 83 c4 10 add $0x10,%esp 108b7b: 85 c0 test %eax,%eax 108b7d: 74 09 je 108b88 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } 108b7f: 8d 65 f4 lea -0xc(%ebp),%esp 108b82: 5b pop %ebx 108b83: 5e pop %esi 108b84: 5f pop %edi 108b85: c9 leave 108b86: c3 ret 108b87: 90 nop <== NOT EXECUTED int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 108b88: 8b 45 e0 mov -0x20(%ebp),%eax 108b8b: 89 45 18 mov %eax,0x18(%ebp) 108b8e: 89 7d 14 mov %edi,0x14(%ebp) 108b91: 89 75 10 mov %esi,0x10(%ebp) 108b94: 89 5d 0c mov %ebx,0xc(%ebp) 108b97: 8b 45 e4 mov -0x1c(%ebp),%eax 108b9a: 89 45 08 mov %eax,0x8(%ebp) } else { errno = EINVAL; } return rv; } 108b9d: 8d 65 f4 lea -0xc(%ebp),%esp 108ba0: 5b pop %ebx 108ba1: 5e pop %esi 108ba2: 5f pop %edi 108ba3: c9 leave int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 108ba4: e9 97 00 00 00 jmp 108c40 options, data ); } } else { errno = EINVAL; 108ba9: e8 ae ad 00 00 call 11395c <__errno> 108bae: c7 00 16 00 00 00 movl $0x16,(%eax) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 108bb4: b8 ff ff ff ff mov $0xffffffff,%eax 108bb9: eb c4 jmp 108b7f =============================================================================== 0010fa48 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 10fa48: 55 push %ebp 10fa49: 89 e5 mov %esp,%ebp 10fa4b: 57 push %edi 10fa4c: 56 push %esi 10fa4d: 83 ec 14 sub $0x14,%esp 10fa50: 8b 75 0c mov 0xc(%ebp),%esi 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 ); 10fa53: 8d 45 f4 lea -0xc(%ebp),%eax 10fa56: 50 push %eax 10fa57: ff 75 08 pushl 0x8(%ebp) 10fa5a: 68 e0 ff 12 00 push $0x12ffe0 10fa5f: e8 d4 31 00 00 call 112c38 <_Objects_Get> switch ( location ) { 10fa64: 83 c4 10 add $0x10,%esp 10fa67: 8b 4d f4 mov -0xc(%ebp),%ecx 10fa6a: 85 c9 test %ecx,%ecx 10fa6c: 74 1a je 10fa88 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fa6e: e8 ad 9d 00 00 call 119820 <__errno> 10fa73: c7 00 09 00 00 00 movl $0x9,(%eax) 10fa79: b8 ff ff ff ff mov $0xffffffff,%eax 10fa7e: 66 90 xchg %ax,%ax } 10fa80: 8d 65 f8 lea -0x8(%ebp),%esp 10fa83: 5e pop %esi 10fa84: 5f pop %edi 10fa85: c9 leave 10fa86: c3 ret 10fa87: 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; 10fa88: 8b 40 10 mov 0x10(%eax),%eax if ( notification ) { 10fa8b: 85 f6 test %esi,%esi 10fa8d: 74 39 je 10fac8 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 10fa8f: 8b 50 7c mov 0x7c(%eax),%edx 10fa92: 85 d2 test %edx,%edx 10fa94: 75 46 jne 10fadc 10fa96: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10fa9d: 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; 10faa0: 8d b8 90 00 00 00 lea 0x90(%eax),%edi 10faa6: b9 05 00 00 00 mov $0x5,%ecx 10faab: 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; 10faad: c7 40 7c 10 fa 10 00 movl $0x10fa10,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10fab4: 89 80 80 00 00 00 mov %eax,0x80(%eax) _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 10faba: e8 89 3a 00 00 call 113548 <_Thread_Enable_dispatch> return 0; 10fabf: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fac1: 8d 65 f8 lea -0x8(%ebp),%esp 10fac4: 5e pop %esi 10fac5: 5f pop %edi 10fac6: c9 leave 10fac7: 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; 10fac8: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10facf: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10fad6: 00 00 00 10fad9: eb df jmp 10faba 10fadb: 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(); 10fadc: e8 67 3a 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 10fae1: e8 3a 9d 00 00 call 119820 <__errno> 10fae6: c7 00 10 00 00 00 movl $0x10,(%eax) 10faec: b8 ff ff ff ff mov $0xffffffff,%eax 10faf1: eb 8d jmp 10fa80 =============================================================================== 0010faf4 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10faf4: 55 push %ebp 10faf5: 89 e5 mov %esp,%ebp 10faf7: 57 push %edi 10faf8: 56 push %esi 10faf9: 53 push %ebx 10fafa: 83 ec 2c sub $0x2c,%esp 10fafd: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10fb00: a1 94 fa 12 00 mov 0x12fa94,%eax 10fb05: 40 inc %eax 10fb06: a3 94 fa 12 00 mov %eax,0x12fa94 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10fb0b: 89 f0 mov %esi,%eax 10fb0d: 25 00 02 00 00 and $0x200,%eax 10fb12: 89 45 d4 mov %eax,-0x2c(%ebp) 10fb15: 0f 85 c9 00 00 00 jne 10fbe4 /* struct mq_attr attr */ ) { va_list arg; mode_t mode; struct mq_attr *attr = NULL; 10fb1b: 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 *) _Objects_Allocate( &_POSIX_Message_queue_Information_fds ); 10fb22: 83 ec 0c sub $0xc,%esp 10fb25: 68 e0 ff 12 00 push $0x12ffe0 10fb2a: e8 51 2c 00 00 call 112780 <_Objects_Allocate> 10fb2f: 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 ) { 10fb31: 83 c4 10 add $0x10,%esp 10fb34: 85 c0 test %eax,%eax 10fb36: 0f 84 b4 00 00 00 je 10fbf0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 10fb3c: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10fb3f: 83 ec 08 sub $0x8,%esp 10fb42: 8d 45 e4 lea -0x1c(%ebp),%eax 10fb45: 50 push %eax 10fb46: ff 75 08 pushl 0x8(%ebp) 10fb49: e8 ca 68 00 00 call 116418 <_POSIX_Message_queue_Name_to_id> 10fb4e: 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 ) { 10fb50: 83 c4 10 add $0x10,%esp 10fb53: 85 c0 test %eax,%eax 10fb55: 75 59 jne 10fbb0 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10fb57: 81 e6 00 0a 00 00 and $0xa00,%esi 10fb5d: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10fb63: 0f 84 a7 00 00 00 je 10fc10 Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) _Objects_Get( &_POSIX_Message_queue_Information, id, location ); 10fb69: 50 push %eax /* * 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 ); 10fb6a: 8d 45 dc lea -0x24(%ebp),%eax 10fb6d: 50 push %eax 10fb6e: ff 75 e4 pushl -0x1c(%ebp) 10fb71: 68 40 fe 12 00 push $0x12fe40 10fb76: e8 bd 30 00 00 call 112c38 <_Objects_Get> 10fb7b: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 10fb7e: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10fb81: 89 43 10 mov %eax,0x10(%ebx) Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 10fb84: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10fb88: a1 fc ff 12 00 mov 0x12fffc,%eax 10fb8d: 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; 10fb90: 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(); 10fb97: e8 ac 39 00 00 call 113548 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10fb9c: e8 a7 39 00 00 call 113548 <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10fba1: 8b 43 08 mov 0x8(%ebx),%eax 10fba4: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fba7: 8d 65 f4 lea -0xc(%ebp),%esp 10fbaa: 5b pop %ebx 10fbab: 5e pop %esi 10fbac: 5f pop %edi 10fbad: c9 leave 10fbae: c3 ret 10fbaf: 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) ) ) { 10fbb0: 83 f8 02 cmp $0x2,%eax 10fbb3: 0f 84 87 00 00 00 je 10fc40 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 ); 10fbb9: 83 ec 08 sub $0x8,%esp 10fbbc: 53 push %ebx 10fbbd: 68 e0 ff 12 00 push $0x12ffe0 10fbc2: e8 31 2f 00 00 call 112af8 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10fbc7: e8 7c 39 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10fbcc: e8 4f 9c 00 00 call 119820 <__errno> 10fbd1: 89 38 mov %edi,(%eax) 10fbd3: 83 c4 10 add $0x10,%esp 10fbd6: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fbdb: 8d 65 f4 lea -0xc(%ebp),%esp 10fbde: 5b pop %ebx 10fbdf: 5e pop %esi 10fbe0: 5f pop %edi 10fbe1: c9 leave 10fbe2: c3 ret 10fbe3: 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 * ); 10fbe4: 8b 45 14 mov 0x14(%ebp),%eax 10fbe7: 89 45 d0 mov %eax,-0x30(%ebp) 10fbea: e9 33 ff ff ff jmp 10fb22 10fbef: 90 nop <== NOT EXECUTED va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 10fbf0: e8 53 39 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10fbf5: e8 26 9c 00 00 call 119820 <__errno> 10fbfa: c7 00 17 00 00 00 movl $0x17,(%eax) 10fc00: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fc05: 8d 65 f4 lea -0xc(%ebp),%esp 10fc08: 5b pop %ebx 10fc09: 5e pop %esi 10fc0a: 5f pop %edi 10fc0b: c9 leave 10fc0c: c3 ret 10fc0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10fc10: 83 ec 08 sub $0x8,%esp 10fc13: 53 push %ebx 10fc14: 68 e0 ff 12 00 push $0x12ffe0 10fc19: e8 da 2e 00 00 call 112af8 <_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(); 10fc1e: e8 25 39 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10fc23: e8 f8 9b 00 00 call 119820 <__errno> 10fc28: c7 00 11 00 00 00 movl $0x11,(%eax) 10fc2e: 83 c4 10 add $0x10,%esp 10fc31: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fc36: 8d 65 f4 lea -0xc(%ebp),%esp 10fc39: 5b pop %ebx 10fc3a: 5e pop %esi 10fc3b: 5f pop %edi 10fc3c: c9 leave 10fc3d: c3 ret 10fc3e: 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) ) ) { 10fc40: 8b 55 d4 mov -0x2c(%ebp),%edx 10fc43: 85 d2 test %edx,%edx 10fc45: 0f 84 6e ff ff ff je 10fbb9 /* * 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( 10fc4b: 8d 45 e0 lea -0x20(%ebp),%eax 10fc4e: 50 push %eax 10fc4f: ff 75 d0 pushl -0x30(%ebp) 10fc52: 6a 01 push $0x1 10fc54: ff 75 08 pushl 0x8(%ebp) 10fc57: e8 34 66 00 00 call 116290 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10fc5c: 83 c4 10 add $0x10,%esp 10fc5f: 40 inc %eax 10fc60: 74 26 je 10fc88 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10fc62: 8b 45 e0 mov -0x20(%ebp),%eax 10fc65: 89 43 10 mov %eax,0x10(%ebx) Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 10fc68: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10fc6c: a1 fc ff 12 00 mov 0x12fffc,%eax 10fc71: 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; 10fc74: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10fc7b: e8 c8 38 00 00 call 113548 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10fc80: 8b 43 08 mov 0x8(%ebx),%eax 10fc83: e9 1f ff ff ff jmp 10fba7 10fc88: 83 ec 08 sub $0x8,%esp 10fc8b: 53 push %ebx 10fc8c: 68 e0 ff 12 00 push $0x12ffe0 10fc91: e8 62 2e 00 00 call 112af8 <_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(); 10fc96: e8 ad 38 00 00 call 113548 <_Thread_Enable_dispatch> return (mqd_t) -1; 10fc9b: 83 c4 10 add $0x10,%esp 10fc9e: b8 ff ff ff ff mov $0xffffffff,%eax 10fca3: e9 ff fe ff ff jmp 10fba7 =============================================================================== 0010fef4 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 10fef4: 55 push %ebp 10fef5: 89 e5 mov %esp,%ebp 10fef7: 56 push %esi 10fef8: 53 push %ebx 10fef9: 83 ec 10 sub $0x10,%esp 10fefc: 8b 75 0c mov 0xc(%ebp),%esi 10feff: 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 ) 10ff02: 85 f6 test %esi,%esi 10ff04: 74 60 je 10ff66 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( 10ff06: 51 push %ecx rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10ff07: 8d 45 f4 lea -0xc(%ebp),%eax 10ff0a: 50 push %eax 10ff0b: ff 75 08 pushl 0x8(%ebp) 10ff0e: 68 e0 ff 12 00 push $0x12ffe0 10ff13: e8 20 2d 00 00 call 112c38 <_Objects_Get> switch ( location ) { 10ff18: 83 c4 10 add $0x10,%esp 10ff1b: 8b 55 f4 mov -0xc(%ebp),%edx 10ff1e: 85 d2 test %edx,%edx 10ff20: 75 32 jne 10ff54 case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 10ff22: 8b 50 10 mov 0x10(%eax),%edx /* * Return the old values. */ if ( omqstat ) { 10ff25: 85 db test %ebx,%ebx 10ff27: 74 17 je 10ff40 omqstat->mq_flags = the_mq_fd->oflag; 10ff29: 8b 48 14 mov 0x14(%eax),%ecx 10ff2c: 89 0b mov %ecx,(%ebx) omqstat->mq_msgsize = the_core_mq->maximum_message_size; 10ff2e: 8b 4a 68 mov 0x68(%edx),%ecx 10ff31: 89 4b 08 mov %ecx,0x8(%ebx) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 10ff34: 8b 4a 60 mov 0x60(%edx),%ecx 10ff37: 89 4b 04 mov %ecx,0x4(%ebx) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 10ff3a: 8b 52 64 mov 0x64(%edx),%edx 10ff3d: 89 53 0c mov %edx,0xc(%ebx) } the_mq_fd->oflag = mqstat->mq_flags; 10ff40: 8b 16 mov (%esi),%edx 10ff42: 89 50 14 mov %edx,0x14(%eax) _Thread_Enable_dispatch(); 10ff45: e8 fe 35 00 00 call 113548 <_Thread_Enable_dispatch> return 0; 10ff4a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10ff4c: 8d 65 f8 lea -0x8(%ebp),%esp 10ff4f: 5b pop %ebx 10ff50: 5e pop %esi 10ff51: c9 leave 10ff52: c3 ret 10ff53: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10ff54: e8 c7 98 00 00 call 119820 <__errno> 10ff59: c7 00 09 00 00 00 movl $0x9,(%eax) 10ff5f: b8 ff ff ff ff mov $0xffffffff,%eax 10ff64: eb e6 jmp 10ff4c 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 ); 10ff66: e8 b5 98 00 00 call 119820 <__errno> 10ff6b: c7 00 16 00 00 00 movl $0x16,(%eax) 10ff71: b8 ff ff ff ff mov $0xffffffff,%eax 10ff76: eb d4 jmp 10ff4c =============================================================================== 00108888 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 108888: 55 push %ebp 108889: 89 e5 mov %esp,%ebp 10888b: 57 push %edi 10888c: 56 push %esi 10888d: 53 push %ebx 10888e: 83 ec 0c sub $0xc,%esp struct _reent *ptr; if (_Thread_libc_reent == 0) 108891: a1 64 65 12 00 mov 0x126564,%eax 108896: 85 c0 test %eax,%eax 108898: 0f 84 52 02 00 00 je 108af0 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)); 10889e: 83 ec 0c sub $0xc,%esp 1088a1: 68 24 04 00 00 push $0x424 1088a6: e8 d9 5f 00 00 call 10e884 <_Workspace_Allocate> 1088ab: 89 c2 mov %eax,%edx #endif if (ptr) { 1088ad: 83 c4 10 add $0x10,%esp 1088b0: 85 c0 test %eax,%eax 1088b2: 0f 84 2c 02 00 00 je 108ae4 _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 1088b8: c7 00 00 00 00 00 movl $0x0,(%eax) 1088be: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx 1088c4: 89 58 04 mov %ebx,0x4(%eax) 1088c7: 8d 80 54 03 00 00 lea 0x354(%eax),%eax 1088cd: 89 42 08 mov %eax,0x8(%edx) 1088d0: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax 1088d6: 89 42 0c mov %eax,0xc(%edx) 1088d9: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 1088e0: 8d 72 14 lea 0x14(%edx),%esi 1088e3: 31 c0 xor %eax,%eax 1088e5: b9 19 00 00 00 mov $0x19,%ecx 1088ea: 89 f7 mov %esi,%edi 1088ec: f3 aa rep stos %al,%es:(%edi) 1088ee: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 1088f5: c7 42 34 aa 07 12 00 movl $0x1207aa,0x34(%edx) 1088fc: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) 108903: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx) 10890a: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx) 108911: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx) 108918: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx) 10891f: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx) 108926: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) 10892d: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) 108934: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) 10893b: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) 108942: c6 42 60 00 movb $0x0,0x60(%edx) 108946: 8d 72 7c lea 0x7c(%edx),%esi 108949: b1 24 mov $0x24,%cl 10894b: 89 f7 mov %esi,%edi 10894d: f3 aa rep stos %al,%es:(%edi) 10894f: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx) 108956: 00 00 00 108959: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx) 108960: 00 00 00 108963: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx) 10896a: 00 00 00 10896d: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx) 108974: 0e 33 108976: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx) 10897d: cd ab 10897f: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx) 108986: 34 12 108988: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx) 10898f: 6d e6 108991: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx) 108998: ec de 10899a: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx) 1089a1: 05 00 1089a3: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx) 1089aa: 0b 00 1089ac: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx) 1089b3: 00 00 00 1089b6: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx) 1089bd: 00 00 00 1089c0: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx) 1089c7: 00 00 00 1089ca: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx) 1089d1: 00 00 00 1089d4: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx) 1089db: 00 00 00 1089de: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx) 1089e5: 00 00 00 1089e8: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx) 1089ef: 00 00 00 1089f2: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx) 1089f9: 00 00 00 1089fc: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx) 108a03: 00 00 00 108a06: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx) 108a0d: 00 00 00 108a10: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx) 108a17: 00 00 00 108a1a: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx) 108a21: 00 00 00 108a24: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx) 108a2b: 00 00 00 108a2e: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx) 108a35: 00 00 00 108a38: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx) 108a3f: 00 00 00 108a42: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx) 108a49: 00 00 00 108a4c: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx) 108a53: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx) 108a5a: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx) 108a61: 00 00 00 108a64: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx) 108a6b: 00 00 00 108a6e: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx) 108a75: 00 00 00 108a78: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx) 108a7f: 00 00 00 108a82: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx) 108a89: 00 00 00 108a8c: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx) 108a93: 00 00 00 108a96: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx) 108a9d: 00 00 00 108aa0: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx) 108aa7: 00 00 00 108aaa: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx) 108ab1: 00 00 00 108ab4: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx) 108abb: 00 00 00 108abe: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx) 108ac5: 00 00 00 108ac8: 66 b9 38 01 mov $0x138,%cx 108acc: 89 df mov %ebx,%edi 108ace: f3 aa rep stos %al,%es:(%edi) creating_task->libc_reent = ptr; 108ad0: 8b 45 0c mov 0xc(%ebp),%eax 108ad3: 89 90 f0 00 00 00 mov %edx,0xf0(%eax) return TRUE; 108ad9: b0 01 mov $0x1,%al } return FALSE; } 108adb: 8d 65 f4 lea -0xc(%ebp),%esp 108ade: 5b pop %ebx 108adf: 5e pop %esi 108ae0: 5f pop %edi 108ae1: c9 leave 108ae2: c3 ret 108ae3: 90 nop <== NOT EXECUTED _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ creating_task->libc_reent = ptr; return TRUE; } return FALSE; 108ae4: 31 c0 xor %eax,%eax } 108ae6: 8d 65 f4 lea -0xc(%ebp),%esp 108ae9: 5b pop %ebx 108aea: 5e pop %esi 108aeb: 5f pop %edi 108aec: c9 leave 108aed: c3 ret 108aee: 66 90 xchg %ax,%ax <== NOT EXECUTED { struct _reent *ptr; if (_Thread_libc_reent == 0) { _REENT = _global_impure_ptr; 108af0: a1 00 16 12 00 mov 0x121600,%eax 108af5: a3 20 42 12 00 mov %eax,0x124220 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 108afa: c7 05 64 65 12 00 20 movl $0x124220,0x126564 108b01: 42 12 00 108b04: e9 95 fd ff ff jmp 10889e =============================================================================== 00108b0c : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 108b0c: 55 push %ebp 108b0d: 89 e5 mov %esp,%ebp 108b0f: 57 push %edi 108b10: 56 push %esi 108b11: 53 push %ebx 108b12: 83 ec 0c sub $0xc,%esp 108b15: 8b 7d 08 mov 0x8(%ebp),%edi 108b18: 8b 5d 0c mov 0xc(%ebp),%ebx /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 108b1b: 39 df cmp %ebx,%edi 108b1d: 74 55 je 108b74 ptr = _REENT; } else { ptr = deleted_task->libc_reent; 108b1f: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi } if (ptr && ptr != _global_impure_ptr) { 108b25: 85 f6 test %esi,%esi 108b27: 74 21 je 108b4a <== NEVER TAKEN 108b29: 3b 35 00 16 12 00 cmp 0x121600,%esi 108b2f: 74 19 je 108b4a _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 108b31: 83 ec 08 sub $0x8,%esp 108b34: 68 2c 88 10 00 push $0x10882c 108b39: 56 push %esi 108b3a: e8 41 af 00 00 call 113a80 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 108b3f: 89 34 24 mov %esi,(%esp) 108b42: e8 59 5d 00 00 call 10e8a0 <_Workspace_Free> 108b47: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 108b4a: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 108b51: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 108b54: 39 df cmp %ebx,%edi 108b56: 74 08 je 108b60 _REENT = 0; } } 108b58: 8d 65 f4 lea -0xc(%ebp),%esp 108b5b: 5b pop %ebx 108b5c: 5e pop %esi 108b5d: 5f pop %edi 108b5e: c9 leave 108b5f: c3 ret /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 108b60: c7 05 20 42 12 00 00 movl $0x0,0x124220 108b67: 00 00 00 } } 108b6a: 8d 65 f4 lea -0xc(%ebp),%esp 108b6d: 5b pop %ebx 108b6e: 5e pop %esi 108b6f: 5f pop %edi 108b70: c9 leave 108b71: c3 ret 108b72: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 108b74: 8b 35 20 42 12 00 mov 0x124220,%esi 108b7a: eb a9 jmp 108b25 =============================================================================== 0010882c : */ int newlib_free_buffers( FILE *fp ) { 10882c: 55 push %ebp 10882d: 89 e5 mov %esp,%ebp 10882f: 53 push %ebx 108830: 83 ec 10 sub $0x10,%esp 108833: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 108836: 53 push %ebx 108837: e8 30 ae 00 00 call 11366c 10883c: 83 c4 10 add $0x10,%esp 10883f: 83 f8 02 cmp $0x2,%eax 108842: 76 14 jbe 108858 <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 108844: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108847: 53 push %ebx <== NOT EXECUTED 108848: e8 a3 ab 00 00 call 1133f0 <== NOT EXECUTED 10884d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 108850: 31 c0 xor %eax,%eax 108852: 8b 5d fc mov -0x4(%ebp),%ebx 108855: c9 leave 108856: c3 ret 108857: 90 nop <== NOT EXECUTED { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 108858: f6 43 0c 80 testb $0x80,0xc(%ebx) 10885c: 74 f2 je 108850 <== ALWAYS TAKEN free( fp->_bf._base ); 10885e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108861: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108864: e8 2b f8 ff ff call 108094 <== NOT EXECUTED fp->_flags &= ~__SMBF; 108869: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 10886f: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 108875: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 10887c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; default: fclose(fp); } return 0; } 10887f: 31 c0 xor %eax,%eax <== NOT EXECUTED 108881: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108884: c9 leave <== NOT EXECUTED 108885: c3 ret <== NOT EXECUTED =============================================================================== 00107ca4 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 107ca4: 55 push %ebp 107ca5: 89 e5 mov %esp,%ebp 107ca7: 53 push %ebx 107ca8: 83 ec 04 sub $0x4,%esp 107cab: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 107cae: 80 3d 60 4f 12 00 00 cmpb $0x0,0x124f60 107cb5: 74 09 je 107cc0 NULL_major = major; } return RTEMS_SUCCESSFUL; } 107cb7: 31 c0 xor %eax,%eax 107cb9: 8b 5d fc mov -0x4(%ebp),%ebx 107cbc: c9 leave 107cbd: c3 ret 107cbe: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 107cc0: c6 05 60 4f 12 00 01 movb $0x1,0x124f60 status = rtems_io_register_name( 107cc7: 50 push %eax 107cc8: 6a 00 push $0x0 107cca: 53 push %ebx 107ccb: 68 5a d0 11 00 push $0x11d05a 107cd0: e8 7b 01 00 00 call 107e50 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 107cd5: 83 c4 10 add $0x10,%esp 107cd8: 85 c0 test %eax,%eax 107cda: 75 0d jne 107ce9 rtems_fatal_error_occurred(status); NULL_major = major; 107cdc: 89 1d a0 52 12 00 mov %ebx,0x1252a0 } return RTEMS_SUCCESSFUL; } 107ce2: 31 c0 xor %eax,%eax 107ce4: 8b 5d fc mov -0x4(%ebp),%ebx 107ce7: c9 leave 107ce8: c3 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 107ce9: 83 ec 0c sub $0xc,%esp 107cec: 50 push %eax 107ced: e8 aa 41 00 00 call 10be9c =============================================================================== 00108bdc : int open( const char *pathname, int flags, ... ) { 108bdc: 55 push %ebp 108bdd: 89 e5 mov %esp,%ebp 108bdf: 57 push %edi 108be0: 56 push %esi 108be1: 53 push %ebx 108be2: 83 ec 4c sub $0x4c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 108be5: 8b 45 0c mov 0xc(%ebp),%eax 108be8: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 108be9: 89 c3 mov %eax,%ebx 108beb: 83 e3 01 and $0x1,%ebx eval_flags |= RTEMS_LIBIO_PERMS_READ; 108bee: f7 db neg %ebx 108bf0: 83 e3 04 and $0x4,%ebx if ( ( status & _FWRITE ) == _FWRITE ) 108bf3: a8 02 test $0x2,%al 108bf5: 74 03 je 108bfa eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 108bf7: 83 cb 02 or $0x2,%ebx va_start(ap, flags); mode = va_arg( ap, int ); 108bfa: 8b 45 10 mov 0x10(%ebp),%eax 108bfd: 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(); 108c00: e8 ff 70 00 00 call 10fd04 108c05: 89 c2 mov %eax,%edx if ( iop == 0 ) { 108c07: 85 c0 test %eax,%eax 108c09: 0f 84 c5 00 00 00 je 108cd4 } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 108c0f: 31 f6 xor %esi,%esi 108c11: b9 ff ff ff ff mov $0xffffffff,%ecx 108c16: 8b 7d 08 mov 0x8(%ebp),%edi 108c19: 89 f0 mov %esi,%eax 108c1b: f2 ae repnz scas %es:(%edi),%al 108c1d: f7 d1 not %ecx 108c1f: 49 dec %ecx 108c20: 83 ec 0c sub $0xc,%esp 108c23: 6a 01 push $0x1 108c25: 8d 45 d4 lea -0x2c(%ebp),%eax 108c28: 89 45 b4 mov %eax,-0x4c(%ebp) 108c2b: 50 push %eax 108c2c: 53 push %ebx 108c2d: 51 push %ecx 108c2e: ff 75 08 pushl 0x8(%ebp) 108c31: 89 55 c0 mov %edx,-0x40(%ebp) 108c34: e8 6f f3 ff ff call 107fa8 108c39: 89 c3 mov %eax,%ebx pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 108c3b: 83 c4 20 add $0x20,%esp 108c3e: 83 f8 ff cmp $0xffffffff,%eax 108c41: 8b 55 c0 mov -0x40(%ebp),%edx 108c44: 0f 84 de 00 00 00 je 108d28 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 108c4a: 8b 45 0c mov 0xc(%ebp),%eax 108c4d: 25 00 0a 00 00 and $0xa00,%eax 108c52: 3d 00 0a 00 00 cmp $0xa00,%eax 108c57: 0f 84 8b 00 00 00 je 108ce8 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 108c5d: 8b 5a 14 mov 0x14(%edx),%ebx 108c60: 83 ec 0c sub $0xc,%esp 108c63: ff 75 0c pushl 0xc(%ebp) 108c66: 89 55 c0 mov %edx,-0x40(%ebp) 108c69: e8 1a 70 00 00 call 10fc88 108c6e: 09 d8 or %ebx,%eax 108c70: 8b 55 c0 mov -0x40(%ebp),%edx 108c73: 89 42 14 mov %eax,0x14(%edx) iop->pathinfo = loc; 108c76: 8d 7a 18 lea 0x18(%edx),%edi 108c79: b9 05 00 00 00 mov $0x5,%ecx 108c7e: 8b 75 b4 mov -0x4c(%ebp),%esi 108c81: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 108c83: 8b 42 20 mov 0x20(%edx),%eax 108c86: ff 75 c4 pushl -0x3c(%ebp) 108c89: ff 75 0c pushl 0xc(%ebp) 108c8c: ff 75 08 pushl 0x8(%ebp) 108c8f: 52 push %edx 108c90: ff 10 call *(%eax) if ( rc ) { 108c92: 83 c4 20 add $0x20,%esp 108c95: 85 c0 test %eax,%eax 108c97: 8b 55 c0 mov -0x40(%ebp),%edx 108c9a: 75 78 jne 108d14 } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 108c9c: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 108ca3: 0f 85 9f 00 00 00 jne 108d48 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 108ca9: 2b 15 60 63 12 00 sub 0x126360,%edx 108caf: c1 fa 03 sar $0x3,%edx 108cb2: 8d 04 d2 lea (%edx,%edx,8),%eax 108cb5: 8d 04 c2 lea (%edx,%eax,8),%eax 108cb8: 8d 04 c2 lea (%edx,%eax,8),%eax 108cbb: 8d 04 c2 lea (%edx,%eax,8),%eax 108cbe: 89 c1 mov %eax,%ecx 108cc0: c1 e1 0f shl $0xf,%ecx 108cc3: 01 c8 add %ecx,%eax 108cc5: 8d 04 c2 lea (%edx,%eax,8),%eax 108cc8: f7 d8 neg %eax } 108cca: 8d 65 f4 lea -0xc(%ebp),%esp 108ccd: 5b pop %ebx 108cce: 5e pop %esi 108ccf: 5f pop %edi 108cd0: c9 leave 108cd1: c3 ret 108cd2: 66 90 xchg %ax,%ax <== NOT EXECUTED */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; 108cd4: bb 17 00 00 00 mov $0x17,%ebx 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 ); 108cd9: e8 ba a5 00 00 call 113298 <__errno> 108cde: 89 18 mov %ebx,(%eax) 108ce0: b8 ff ff ff ff mov $0xffffffff,%eax 108ce5: eb e3 jmp 108cca 108ce7: 90 nop <== NOT EXECUTED } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { /* We were trying to create a file that already exists */ rc = EEXIST; loc_to_free = &loc; 108ce8: 8d 75 d4 lea -0x2c(%ebp),%esi goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { /* We were trying to create a file that already exists */ rc = EEXIST; 108ceb: bb 11 00 00 00 mov $0x11,%ebx */ done: va_end(ap); if ( rc ) { if ( iop ) 108cf0: 85 d2 test %edx,%edx 108cf2: 74 0c je 108d00 rtems_libio_free( iop ); 108cf4: 83 ec 0c sub $0xc,%esp 108cf7: 52 push %edx 108cf8: e8 ab 70 00 00 call 10fda8 108cfd: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 108d00: 85 f6 test %esi,%esi 108d02: 74 d5 je 108cd9 rtems_filesystem_freenode( loc_to_free ); 108d04: 83 ec 0c sub $0xc,%esp 108d07: 56 push %esi 108d08: e8 73 f3 ff ff call 108080 108d0d: 83 c4 10 add $0x10,%esp 108d10: eb c7 jmp 108cd9 108d12: 66 90 xchg %ax,%ax <== NOT EXECUTED iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 108d14: e8 7f a5 00 00 call 113298 <__errno> 108d19: 8b 18 mov (%eax),%ebx rc = EEXIST; loc_to_free = &loc; goto done; } loc_to_free = &loc; 108d1b: 8d 75 d4 lea -0x2c(%ebp),%esi iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; goto done; 108d1e: 8b 55 c0 mov -0x40(%ebp),%edx * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { 108d21: 85 db test %ebx,%ebx 108d23: 74 84 je 108ca9 <== NEVER TAKEN 108d25: eb c9 jmp 108cf0 108d27: 90 nop <== NOT EXECUTED */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 108d28: e8 6b a5 00 00 call 113298 <__errno> 108d2d: 83 38 02 cmpl $0x2,(%eax) 108d30: 8b 55 c0 mov -0x40(%ebp),%edx 108d33: 0f 84 9b 00 00 00 je 108dd4 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 108d39: e8 5a a5 00 00 call 113298 <__errno> 108d3e: 8b 18 mov (%eax),%ebx int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 108d40: 31 f6 xor %esi,%esi /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; goto done; 108d42: 8b 55 c0 mov -0x40(%ebp),%edx 108d45: eb da jmp 108d21 108d47: 90 nop <== NOT EXECUTED /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 108d48: 51 push %ecx 108d49: 6a 00 push $0x0 108d4b: 6a 00 push $0x0 108d4d: 89 d0 mov %edx,%eax 108d4f: 2b 05 60 63 12 00 sub 0x126360,%eax 108d55: c1 f8 03 sar $0x3,%eax 108d58: 8d 0c c0 lea (%eax,%eax,8),%ecx 108d5b: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108d5e: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108d61: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108d64: 89 cb mov %ecx,%ebx 108d66: c1 e3 0f shl $0xf,%ebx 108d69: 01 d9 add %ebx,%ecx 108d6b: 8d 04 c8 lea (%eax,%ecx,8),%eax 108d6e: f7 d8 neg %eax 108d70: 50 push %eax 108d71: 89 55 c0 mov %edx,-0x40(%ebp) 108d74: e8 3f 6e 00 00 call 10fbb8 108d79: 89 c3 mov %eax,%ebx if ( rc ) { 108d7b: 83 c4 10 add $0x10,%esp 108d7e: 85 c0 test %eax,%eax 108d80: 8b 55 c0 mov -0x40(%ebp),%edx 108d83: 0f 84 20 ff ff ff je 108ca9 if(errno) rc = errno; 108d89: e8 0a a5 00 00 call 113298 <__errno> 108d8e: 8b 00 mov (%eax),%eax 108d90: 85 c0 test %eax,%eax 108d92: 8b 55 c0 mov -0x40(%ebp),%edx 108d95: 0f 85 b2 00 00 00 jne 108e4d <== ALWAYS TAKEN close( iop - rtems_libio_iops ); 108d9b: 83 ec 0c sub $0xc,%esp 108d9e: 2b 15 60 63 12 00 sub 0x126360,%edx 108da4: c1 fa 03 sar $0x3,%edx 108da7: 8d 04 d2 lea (%edx,%edx,8),%eax 108daa: 8d 04 c2 lea (%edx,%eax,8),%eax 108dad: 8d 04 c2 lea (%edx,%eax,8),%eax 108db0: 8d 04 c2 lea (%edx,%eax,8),%eax 108db3: 89 c1 mov %eax,%ecx 108db5: c1 e1 0f shl $0xf,%ecx 108db8: 01 c8 add %ecx,%eax 108dba: 8d 04 c2 lea (%edx,%eax,8),%eax 108dbd: f7 d8 neg %eax 108dbf: 50 push %eax 108dc0: e8 73 6d 00 00 call 10fb38 108dc5: 83 c4 10 add $0x10,%esp /* those are released by close(): */ iop = 0; loc_to_free = NULL; 108dc8: 31 f6 xor %esi,%esi rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; close( iop - rtems_libio_iops ); /* those are released by close(): */ iop = 0; 108dca: 31 d2 xor %edx,%edx 108dcc: e9 50 ff ff ff jmp 108d21 108dd1: 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) ) { 108dd4: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 108ddb: 75 0f jne 108dec int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 108ddd: 31 f6 xor %esi,%esi goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { rc = ENOENT; 108ddf: bb 02 00 00 00 mov $0x2,%ebx 108de4: e9 07 ff ff ff jmp 108cf0 108de9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 108dec: 6a 00 push $0x0 108dee: 6a 00 push $0x0 108df0: 8b 45 c4 mov -0x3c(%ebp),%eax 108df3: 80 cc 80 or $0x80,%ah 108df6: 50 push %eax 108df7: ff 75 08 pushl 0x8(%ebp) 108dfa: 89 55 c0 mov %edx,-0x40(%ebp) 108dfd: e8 2a f6 ff ff call 10842c if ( rc ) { 108e02: 83 c4 10 add $0x10,%esp 108e05: 85 c0 test %eax,%eax 108e07: 8b 55 c0 mov -0x40(%ebp),%edx 108e0a: 0f 85 29 ff ff ff jne 108d39 <== NEVER TAKEN /* * After we do the mknod(), we have to evaluate the path to get the * "loc" structure needed to actually have the file itself open. * So we created it, and then we need to have "look it up." */ status = rtems_filesystem_evaluate_path( 108e10: 89 d9 mov %ebx,%ecx 108e12: 8b 7d 08 mov 0x8(%ebp),%edi 108e15: 89 f0 mov %esi,%eax 108e17: f2 ae repnz scas %es:(%edi),%al 108e19: f7 d1 not %ecx 108e1b: 49 dec %ecx 108e1c: 83 ec 0c sub $0xc,%esp 108e1f: 6a 01 push $0x1 108e21: 8d 45 d4 lea -0x2c(%ebp),%eax 108e24: 50 push %eax 108e25: 6a 00 push $0x0 108e27: 51 push %ecx 108e28: ff 75 08 pushl 0x8(%ebp) 108e2b: 89 55 c0 mov %edx,-0x40(%ebp) 108e2e: e8 75 f1 ff ff call 107fa8 pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ 108e33: 83 c4 20 add $0x20,%esp 108e36: 85 c0 test %eax,%eax 108e38: 8b 55 c0 mov -0x40(%ebp),%edx 108e3b: 0f 84 1c fe ff ff je 108c5d <== ALWAYS TAKEN int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 108e41: 31 f6 xor %esi,%esi <== NOT EXECUTED * So we created it, and then we need to have "look it up." */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ rc = EACCES; 108e43: bb 0d 00 00 00 mov $0xd,%ebx <== NOT EXECUTED 108e48: e9 a3 fe ff ff jmp 108cf0 <== NOT EXECUTED * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 108e4d: e8 46 a4 00 00 call 113298 <__errno> 108e52: 8b 18 mov (%eax),%ebx 108e54: 8b 55 c0 mov -0x40(%ebp),%edx 108e57: e9 3f ff ff ff jmp 108d9b =============================================================================== 00109be0 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 109be0: 55 push %ebp 109be1: 89 e5 mov %esp,%ebp 109be3: 56 push %esi 109be4: 53 push %ebx 109be5: 83 ec 10 sub $0x10,%esp 109be8: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 109beb: 8b 4a 34 mov 0x34(%edx),%ecx 109bee: f6 c1 01 test $0x1,%cl 109bf1: 74 31 je 109c24 <== NEVER TAKEN switch (c) { 109bf3: 3c 09 cmp $0x9,%al 109bf5: 0f 84 b1 00 00 00 je 109cac 109bfb: 76 3f jbe 109c3c <== NEVER TAKEN 109bfd: 3c 0a cmp $0xa,%al 109bff: 74 4f je 109c50 109c01: 3c 0d cmp $0xd,%al 109c03: 74 7f je 109c84 <== NEVER TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 109c05: 83 e1 02 and $0x2,%ecx 109c08: 0f 85 c6 00 00 00 jne 109cd4 <== NEVER TAKEN 109c0e: 8b 0d 14 42 12 00 mov 0x124214,%ecx c = toupper(c); if (!iscntrl(c)) 109c14: 0f b6 c0 movzbl %al,%eax 109c17: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) 109c1c: 75 06 jne 109c24 <== NEVER TAKEN tty->column++; 109c1e: ff 42 28 incl 0x28(%edx) 109c21: 8d 76 00 lea 0x0(%esi),%esi break; } } rtems_termios_puts (&c, 1, tty); 109c24: 53 push %ebx 109c25: 52 push %edx 109c26: 6a 01 push $0x1 109c28: 8d 45 f4 lea -0xc(%ebp),%eax 109c2b: 50 push %eax 109c2c: e8 7b fe ff ff call 109aac 109c31: 83 c4 10 add $0x10,%esp } 109c34: 8d 65 f8 lea -0x8(%ebp),%esp 109c37: 5b pop %ebx 109c38: 5e pop %esi 109c39: c9 leave 109c3a: c3 ret 109c3b: 90 nop <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 109c3c: 3c 08 cmp $0x8,%al <== NOT EXECUTED 109c3e: 75 c5 jne 109c05 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 109c40: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 109c43: 85 c0 test %eax,%eax <== NOT EXECUTED 109c45: 7e dd jle 109c24 <== NOT EXECUTED tty->column--; 109c47: 48 dec %eax <== NOT EXECUTED 109c48: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED 109c4b: eb d7 jmp 109c24 <== NOT EXECUTED 109c4d: 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) 109c50: f6 c1 20 test $0x20,%cl 109c53: 74 07 je 109c5c <== ALWAYS TAKEN tty->column = 0; 109c55: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 109c5c: 83 e1 04 and $0x4,%ecx 109c5f: 74 c3 je 109c24 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 109c61: 51 push %ecx 109c62: 52 push %edx 109c63: 6a 01 push $0x1 109c65: 68 24 0b 12 00 push $0x120b24 109c6a: 89 55 f0 mov %edx,-0x10(%ebp) 109c6d: e8 3a fe ff ff call 109aac tty->column = 0; 109c72: 8b 55 f0 mov -0x10(%ebp),%edx 109c75: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) 109c7c: 83 c4 10 add $0x10,%esp 109c7f: eb a3 jmp 109c24 109c81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 109c84: f6 c1 10 test $0x10,%cl <== NOT EXECUTED 109c87: 74 07 je 109c90 <== NOT EXECUTED 109c89: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 109c8c: 85 c0 test %eax,%eax <== NOT EXECUTED 109c8e: 74 a4 je 109c34 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 109c90: f6 c1 08 test $0x8,%cl <== NOT EXECUTED 109c93: 74 09 je 109c9e <== NOT EXECUTED c = '\n'; 109c95: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 109c99: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED 109c9c: 74 86 je 109c24 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 109c9e: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED break; 109ca5: e9 7a ff ff ff jmp 109c24 <== NOT EXECUTED 109caa: 66 90 xchg %ax,%ax <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 109cac: 8b 5a 28 mov 0x28(%edx),%ebx 109caf: 89 de mov %ebx,%esi 109cb1: 83 e6 07 and $0x7,%esi 109cb4: b8 08 00 00 00 mov $0x8,%eax 109cb9: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 109cbb: 81 e1 00 18 00 00 and $0x1800,%ecx 109cc1: 81 f9 00 18 00 00 cmp $0x1800,%ecx 109cc7: 74 37 je 109d00 <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 109cc9: 01 d8 add %ebx,%eax <== NOT EXECUTED 109ccb: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED break; 109cce: e9 51 ff ff ff jmp 109c24 <== NOT EXECUTED 109cd3: 90 nop <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 109cd4: 8b 0d 14 42 12 00 mov 0x124214,%ecx <== NOT EXECUTED 109cda: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109cdd: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED 109ce2: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED 109ce5: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED 109ce8: 74 0e je 109cf8 <== NOT EXECUTED 109cea: 89 c3 mov %eax,%ebx <== NOT EXECUTED 109cec: 88 d8 mov %bl,%al <== NOT EXECUTED 109cee: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED 109cf1: e9 1e ff ff ff jmp 109c14 <== NOT EXECUTED 109cf6: 66 90 xchg %ax,%ax <== NOT EXECUTED 109cf8: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED 109cfb: eb ef jmp 109cec <== NOT EXECUTED 109cfd: 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; 109d00: 8d 1c 18 lea (%eax,%ebx,1),%ebx 109d03: 89 5a 28 mov %ebx,0x28(%edx) rtems_termios_puts ( " ", i, tty); 109d06: 56 push %esi 109d07: 52 push %edx 109d08: 50 push %eax 109d09: 68 bc 06 12 00 push $0x1206bc 109d0e: e8 99 fd ff ff call 109aac return; 109d13: 83 c4 10 add $0x10,%esp 109d16: e9 19 ff ff ff jmp 109c34 =============================================================================== 0010a018 : long pathconf( const char *path, int name ) { 10a018: 55 push %ebp 10a019: 89 e5 mov %esp,%ebp 10a01b: 56 push %esi 10a01c: 53 push %ebx int status; int fd; fd = open( path, O_RDONLY ); 10a01d: 83 ec 08 sub $0x8,%esp 10a020: 6a 00 push $0x0 10a022: ff 75 08 pushl 0x8(%ebp) 10a025: e8 4e fd ff ff call 109d78 10a02a: 89 c3 mov %eax,%ebx if ( fd == -1 ) 10a02c: 83 c4 10 add $0x10,%esp 10a02f: 83 f8 ff cmp $0xffffffff,%eax 10a032: 74 24 je 10a058 return -1; status = fpathconf( fd, name ); 10a034: 83 ec 08 sub $0x8,%esp 10a037: ff 75 0c pushl 0xc(%ebp) 10a03a: 50 push %eax 10a03b: e8 c0 ec ff ff call 108d00 10a040: 89 c6 mov %eax,%esi (void) close( fd ); 10a042: 89 1c 24 mov %ebx,(%esp) 10a045: e8 56 e8 ff ff call 1088a0 return status; 10a04a: 83 c4 10 add $0x10,%esp } 10a04d: 89 f0 mov %esi,%eax 10a04f: 8d 65 f8 lea -0x8(%ebp),%esp 10a052: 5b pop %ebx 10a053: 5e pop %esi 10a054: c9 leave 10a055: c3 ret 10a056: 66 90 xchg %ax,%ax <== NOT EXECUTED int status; int fd; fd = open( path, O_RDONLY ); if ( fd == -1 ) return -1; 10a058: be ff ff ff ff mov $0xffffffff,%esi status = fpathconf( fd, name ); (void) close( fd ); return status; } 10a05d: 89 f0 mov %esi,%eax 10a05f: 8d 65 f8 lea -0x8(%ebp),%esp 10a062: 5b pop %ebx 10a063: 5e pop %esi 10a064: c9 leave 10a065: c3 ret =============================================================================== 00110c78 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 110c78: 55 push %ebp 110c79: 89 e5 mov %esp,%ebp 110c7b: 57 push %edi 110c7c: 56 push %esi 110c7d: 53 push %ebx 110c7e: 83 ec 24 sub $0x24,%esp rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 110c81: 68 ff 01 00 00 push $0x1ff 110c86: 68 ac 2c 12 00 push $0x122cac 110c8b: e8 4c 17 00 00 call 1123dc 110c90: 83 c4 10 add $0x10,%esp 110c93: 85 c0 test %eax,%eax 110c95: 74 0d je 110ca4 <== ALWAYS TAKEN return -1; 110c97: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED unlink(fifopath); } if(err != 0) rtems_set_errno_and_return_minus_one(err); return 0; } 110c9c: 8d 65 f4 lea -0xc(%ebp),%esp 110c9f: 5b pop %ebx 110ca0: 5e pop %esi 110ca1: 5f pop %edi 110ca2: c9 leave 110ca3: c3 ret if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 110ca4: 8d 5d d9 lea -0x27(%ebp),%ebx 110ca7: be b1 2c 12 00 mov $0x122cb1,%esi 110cac: b9 0a 00 00 00 mov $0xa,%ecx 110cb1: 89 df mov %ebx,%edi 110cb3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 110cb5: 0f b7 05 6c 8d 12 00 movzwl 0x128d6c,%eax 110cbc: 8d 50 01 lea 0x1(%eax),%edx 110cbf: 66 89 15 6c 8d 12 00 mov %dx,0x128d6c 110cc6: 51 push %ecx 110cc7: 50 push %eax 110cc8: 68 bc 2c 12 00 push $0x122cbc 110ccd: 8d 45 e3 lea -0x1d(%ebp),%eax 110cd0: 50 push %eax 110cd1: e8 fe 4a 00 00 call 1157d4 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 110cd6: 58 pop %eax 110cd7: 5a pop %edx 110cd8: 68 80 01 00 00 push $0x180 110cdd: 53 push %ebx 110cde: e8 41 14 00 00 call 112124 110ce3: 83 c4 10 add $0x10,%esp 110ce6: 85 c0 test %eax,%eax 110ce8: 0f 85 a6 00 00 00 jne 110d94 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); 110cee: 83 ec 08 sub $0x8,%esp 110cf1: 68 00 40 00 00 push $0x4000 110cf6: 53 push %ebx 110cf7: e8 a0 91 ff ff call 109e9c 110cfc: 8b 55 08 mov 0x8(%ebp),%edx 110cff: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 110d01: 83 c4 10 add $0x10,%esp 110d04: 85 c0 test %eax,%eax 110d06: 78 58 js 110d60 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]); 110d08: 3b 05 2c 4d 12 00 cmp 0x124d2c,%eax 110d0e: 72 3c jb 110d4c <== ALWAYS TAKEN 110d10: 31 d2 xor %edx,%edx <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 110d12: 83 62 14 fe andl $0xfffffffe,0x14(%edx) filsdes[1] = open(fifopath, O_WRONLY); 110d16: 83 ec 08 sub $0x8,%esp 110d19: 6a 01 push $0x1 110d1b: 53 push %ebx 110d1c: e8 7b 91 ff ff call 109e9c 110d21: 8b 55 08 mov 0x8(%ebp),%edx 110d24: 89 42 04 mov %eax,0x4(%edx) if (filsdes[1] < 0) { 110d27: 83 c4 10 add $0x10,%esp 110d2a: 85 c0 test %eax,%eax 110d2c: 78 4a js 110d78 int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; 110d2e: 31 f6 xor %esi,%esi if (filsdes[1] < 0) { err = errno; close(filsdes[0]); } unlink(fifopath); 110d30: 83 ec 0c sub $0xc,%esp 110d33: 53 push %ebx 110d34: e8 af b1 ff ff call 10bee8 110d39: 83 c4 10 add $0x10,%esp } if(err != 0) 110d3c: 85 f6 test %esi,%esi 110d3e: 75 63 jne 110da3 rtems_set_errno_and_return_minus_one(err); return 0; 110d40: 31 c0 xor %eax,%eax } 110d42: 8d 65 f4 lea -0xc(%ebp),%esp 110d45: 5b pop %ebx 110d46: 5e pop %esi 110d47: 5f pop %edi 110d48: c9 leave 110d49: c3 ret 110d4a: 66 90 xchg %ax,%ax <== 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]); 110d4c: c1 e0 03 shl $0x3,%eax 110d4f: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 110d56: 29 c2 sub %eax,%edx 110d58: 03 15 a0 8f 12 00 add 0x128fa0,%edx 110d5e: eb b2 jmp 110d12 } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 110d60: e8 d7 40 00 00 call 114e3c <__errno> 110d65: 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); 110d67: 83 ec 0c sub $0xc,%esp 110d6a: 53 push %ebx 110d6b: e8 78 b1 ff ff call 10bee8 110d70: 83 c4 10 add $0x10,%esp 110d73: eb c7 jmp 110d3c 110d75: 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; 110d78: e8 bf 40 00 00 call 114e3c <__errno> 110d7d: 8b 30 mov (%eax),%esi close(filsdes[0]); 110d7f: 83 ec 0c sub $0xc,%esp 110d82: 8b 45 08 mov 0x8(%ebp),%eax 110d85: ff 30 pushl (%eax) 110d87: e8 78 81 ff ff call 108f04 110d8c: 83 c4 10 add $0x10,%esp 110d8f: eb 9f jmp 110d30 110d91: 8d 76 00 lea 0x0(%esi),%esi <== 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){ 110d94: e8 a3 40 00 00 call 114e3c <__errno> return -1; 110d99: b8 ff ff ff ff mov $0xffffffff,%eax 110d9e: e9 f9 fe ff ff jmp 110c9c close(filsdes[0]); } unlink(fifopath); } if(err != 0) rtems_set_errno_and_return_minus_one(err); 110da3: e8 94 40 00 00 call 114e3c <__errno> 110da8: 89 30 mov %esi,(%eax) 110daa: b8 ff ff ff ff mov $0xffffffff,%eax 110daf: e9 e8 fe ff ff jmp 110c9c =============================================================================== 001121b4 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 1121b4: 55 push %ebp 1121b5: 89 e5 mov %esp,%ebp 1121b7: 56 push %esi 1121b8: 53 push %ebx 1121b9: 8b 75 08 mov 0x8(%ebp),%esi 1121bc: 8b 5d 10 mov 0x10(%ebp),%ebx if (cmd == FIONREAD) { 1121bf: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) 1121c6: 74 0c je 1121d4 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; 1121c8: b8 ea ff ff ff mov $0xffffffea,%eax } 1121cd: 8d 65 f8 lea -0x8(%ebp),%esp 1121d0: 5b pop %ebx 1121d1: 5e pop %esi 1121d2: c9 leave 1121d3: c3 ret void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 1121d4: 85 db test %ebx,%ebx 1121d6: 75 07 jne 1121df return -EFAULT; 1121d8: b8 f2 ff ff ff mov $0xfffffff2,%eax 1121dd: eb ee jmp 1121cd if (! PIPE_LOCK(pipe)) 1121df: 50 push %eax 1121e0: 6a 00 push $0x0 1121e2: 6a 00 push $0x0 1121e4: ff 76 28 pushl 0x28(%esi) 1121e7: e8 a4 b2 ff ff call 10d490 1121ec: 83 c4 10 add $0x10,%esp 1121ef: 85 c0 test %eax,%eax 1121f1: 74 07 je 1121fa <== ALWAYS TAKEN return -EINTR; 1121f3: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 1121f8: eb d3 jmp 1121cd <== NOT EXECUTED /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 1121fa: 8b 46 0c mov 0xc(%esi),%eax 1121fd: 89 03 mov %eax,(%ebx) PIPE_UNLOCK(pipe); 1121ff: 83 ec 0c sub $0xc,%esp 112202: ff 76 28 pushl 0x28(%esi) 112205: e8 82 b3 ff ff call 10d58c return 0; 11220a: 83 c4 10 add $0x10,%esp 11220d: 31 c0 xor %eax,%eax 11220f: eb bc jmp 1121cd =============================================================================== 00111df4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 111df4: 55 push %ebp 111df5: 89 e5 mov %esp,%ebp 111df7: 57 push %edi 111df8: 56 push %esi 111df9: 53 push %ebx 111dfa: 83 ec 30 sub $0x30,%esp 111dfd: 8b 5d 08 mov 0x8(%ebp),%ebx int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 111e00: 6a 00 push $0x0 111e02: 6a 00 push $0x0 111e04: ff 73 28 pushl 0x28(%ebx) 111e07: e8 84 b6 ff ff call 10d490 111e0c: 83 c4 10 add $0x10,%esp 111e0f: 85 c0 test %eax,%eax 111e11: 0f 85 b1 00 00 00 jne 111ec8 <== NEVER TAKEN return -EINTR; while (read < count) { 111e17: 8b 55 10 mov 0x10(%ebp),%edx 111e1a: 85 d2 test %edx,%edx 111e1c: 0f 84 82 01 00 00 je 111fa4 <== NEVER TAKEN 111e22: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) 111e29: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) while (PIPE_EMPTY(pipe)) { 111e30: 8b 53 0c mov 0xc(%ebx),%edx 111e33: 85 d2 test %edx,%edx 111e35: 0f 85 a1 00 00 00 jne 111edc /* Not an error */ if (pipe->Writers == 0) 111e3b: 8b 43 14 mov 0x14(%ebx),%eax 111e3e: 85 c0 test %eax,%eax 111e40: 0f 84 06 01 00 00 je 111f4c goto out_locked; if (LIBIO_NODELAY(iop)) { 111e46: 8b 45 14 mov 0x14(%ebp),%eax 111e49: f6 40 14 01 testb $0x1,0x14(%eax) 111e4d: 0f 85 01 01 00 00 jne 111f54 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 111e53: ff 43 18 incl 0x18(%ebx) PIPE_UNLOCK(pipe); 111e56: 83 ec 0c sub $0xc,%esp 111e59: ff 73 28 pushl 0x28(%ebx) 111e5c: e8 2b b7 ff ff call 10d58c if (! PIPE_READWAIT(pipe)) 111e61: 5e pop %esi 111e62: 5f pop %edi 111e63: 6a 00 push $0x0 111e65: ff 73 2c pushl 0x2c(%ebx) 111e68: e8 17 19 00 00 call 113784 111e6d: 83 c4 0c add $0xc,%esp 111e70: 83 f8 01 cmp $0x1,%eax 111e73: 19 f6 sbb %esi,%esi 111e75: f7 d6 not %esi 111e77: 83 e6 fc and $0xfffffffc,%esi ret = -EINTR; if (! PIPE_LOCK(pipe)) { 111e7a: 6a 00 push $0x0 111e7c: 6a 00 push $0x0 111e7e: ff 73 28 pushl 0x28(%ebx) 111e81: e8 0a b6 ff ff call 10d490 111e86: 83 c4 10 add $0x10,%esp 111e89: 85 c0 test %eax,%eax 111e8b: 0f 85 cf 00 00 00 jne 111f60 <== NEVER TAKEN /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 111e91: ff 4b 18 decl 0x18(%ebx) if (ret != 0) 111e94: 85 f6 test %esi,%esi 111e96: 74 98 je 111e30 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 111e98: 83 ec 0c sub $0xc,%esp 111e9b: ff 73 28 pushl 0x28(%ebx) 111e9e: e8 e9 b6 ff ff call 10d58c 111ea3: 83 c4 10 add $0x10,%esp out_nolock: if (read > 0) 111ea6: 8b 55 d4 mov -0x2c(%ebp),%edx 111ea9: 85 d2 test %edx,%edx 111eab: 7e 0b jle 111eb8 return read; return ret; } 111ead: 8b 45 d4 mov -0x2c(%ebp),%eax 111eb0: 8d 65 f4 lea -0xc(%ebp),%esp 111eb3: 5b pop %ebx 111eb4: 5e pop %esi 111eb5: 5f pop %edi 111eb6: c9 leave 111eb7: c3 ret PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; 111eb8: 89 75 d4 mov %esi,-0x2c(%ebp) } 111ebb: 8b 45 d4 mov -0x2c(%ebp),%eax 111ebe: 8d 65 f4 lea -0xc(%ebp),%esp 111ec1: 5b pop %ebx 111ec2: 5e pop %esi 111ec3: 5f pop %edi 111ec4: c9 leave 111ec5: c3 ret 111ec6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; 111ec8: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 111ecf: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111ed2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111ed5: 5b pop %ebx <== NOT EXECUTED 111ed6: 5e pop %esi <== NOT EXECUTED 111ed7: 5f pop %edi <== NOT EXECUTED 111ed8: c9 leave <== NOT EXECUTED 111ed9: c3 ret <== NOT EXECUTED 111eda: 66 90 xchg %ax,%ax <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 111edc: 8b 45 10 mov 0x10(%ebp),%eax 111edf: 2b 45 d0 sub -0x30(%ebp),%eax 111ee2: 89 55 cc mov %edx,-0x34(%ebp) 111ee5: 39 c2 cmp %eax,%edx 111ee7: 76 03 jbe 111eec 111ee9: 89 45 cc mov %eax,-0x34(%ebp) chunk1 = pipe->Size - pipe->Start; 111eec: 8b 73 08 mov 0x8(%ebx),%esi 111eef: 8b 43 04 mov 0x4(%ebx),%eax 111ef2: 29 f0 sub %esi,%eax if (chunk > chunk1) { 111ef4: 39 45 cc cmp %eax,-0x34(%ebp) 111ef7: 7f 71 jg 111f6a 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); 111ef9: 8b 45 0c mov 0xc(%ebp),%eax 111efc: 03 45 d0 add -0x30(%ebp),%eax 111eff: 03 33 add (%ebx),%esi 111f01: 89 c7 mov %eax,%edi 111f03: 8b 4d cc mov -0x34(%ebp),%ecx 111f06: f3 a4 rep movsb %ds:(%esi),%es:(%edi) pipe->Start += chunk; 111f08: 8b 45 cc mov -0x34(%ebp),%eax 111f0b: 03 43 08 add 0x8(%ebx),%eax pipe->Start %= pipe->Size; 111f0e: 31 d2 xor %edx,%edx 111f10: f7 73 04 divl 0x4(%ebx) 111f13: 89 53 08 mov %edx,0x8(%ebx) pipe->Length -= chunk; 111f16: 8b 43 0c mov 0xc(%ebx),%eax 111f19: 2b 45 cc sub -0x34(%ebp),%eax 111f1c: 89 43 0c mov %eax,0xc(%ebx) /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 111f1f: 85 c0 test %eax,%eax 111f21: 75 07 jne 111f2a pipe->Start = 0; 111f23: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) if (pipe->waitingWriters > 0) 111f2a: 8b 4b 1c mov 0x1c(%ebx),%ecx 111f2d: 85 c9 test %ecx,%ecx 111f2f: 75 5f jne 111f90 PIPE_WAKEUPWRITERS(pipe); read += chunk; 111f31: 8b 45 cc mov -0x34(%ebp),%eax 111f34: 01 45 d4 add %eax,-0x2c(%ebp) int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 111f37: 8b 45 d4 mov -0x2c(%ebp),%eax 111f3a: 89 45 d0 mov %eax,-0x30(%ebp) 111f3d: 8b 45 10 mov 0x10(%ebp),%eax 111f40: 39 45 d4 cmp %eax,-0x2c(%ebp) 111f43: 0f 82 e7 fe ff ff jb 111e30 <== NEVER TAKEN 111f49: 8d 76 00 lea 0x0(%esi),%esi while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 111f4c: 31 f6 xor %esi,%esi 111f4e: e9 45 ff ff ff jmp 111e98 111f53: 90 nop <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 111f54: be f5 ff ff ff mov $0xfffffff5,%esi 111f59: e9 3a ff ff ff jmp 111e98 111f5e: 66 90 xchg %ax,%ax <== NOT EXECUTED PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; 111f60: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 111f65: e9 3c ff ff ff jmp 111ea6 <== 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); 111f6a: 8b 55 0c mov 0xc(%ebp),%edx 111f6d: 03 55 d0 add -0x30(%ebp),%edx 111f70: 03 33 add (%ebx),%esi 111f72: 89 d7 mov %edx,%edi 111f74: 89 c1 mov %eax,%ecx 111f76: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 111f78: 8b 55 d0 mov -0x30(%ebp),%edx 111f7b: 01 c2 add %eax,%edx 111f7d: 03 55 0c add 0xc(%ebp),%edx 111f80: 8b 4d cc mov -0x34(%ebp),%ecx 111f83: 29 c1 sub %eax,%ecx 111f85: 8b 33 mov (%ebx),%esi 111f87: 89 d7 mov %edx,%edi 111f89: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 111f8b: e9 78 ff ff ff jmp 111f08 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 111f90: 83 ec 08 sub $0x8,%esp 111f93: 8d 45 e4 lea -0x1c(%ebp),%eax 111f96: 50 push %eax 111f97: ff 73 30 pushl 0x30(%ebx) 111f9a: e8 81 17 00 00 call 113720 111f9f: 83 c4 10 add $0x10,%esp 111fa2: eb 8d jmp 111f31 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 111fa4: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 111fab: 31 f6 xor %esi,%esi <== NOT EXECUTED 111fad: e9 e6 fe ff ff jmp 111e98 <== NOT EXECUTED =============================================================================== 001118a0 : */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 1118a0: 55 push %ebp 1118a1: 89 e5 mov %esp,%ebp 1118a3: 57 push %edi 1118a4: 56 push %esi 1118a5: 53 push %ebx 1118a6: 83 ec 1c sub $0x1c,%esp 1118a9: 8b 7d 08 mov 0x8(%ebp),%edi pipe_control_t *pipe = *pipep; 1118ac: 8b 1f mov (%edi),%ebx /* WARN pipe not released! */ if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); 1118ae: 8b 45 0c mov 0xc(%ebp),%eax 1118b1: 8b 40 14 mov 0x14(%eax),%eax 1118b4: 89 c6 mov %eax,%esi 1118b6: 83 e6 06 and $0x6,%esi if (mode & LIBIO_FLAGS_READ) 1118b9: a8 02 test $0x2,%al 1118bb: 74 03 je 1118c0 pipe->Readers --; 1118bd: ff 4b 10 decl 0x10(%ebx) if (mode & LIBIO_FLAGS_WRITE) 1118c0: f7 c6 04 00 00 00 test $0x4,%esi 1118c6: 74 03 je 1118cb pipe->Writers --; 1118c8: ff 4b 14 decl 0x14(%ebx) PIPE_UNLOCK(pipe); 1118cb: 83 ec 0c sub $0xc,%esp 1118ce: ff 73 28 pushl 0x28(%ebx) 1118d1: e8 b6 bc ff ff call 10d58c if (pipe->Readers == 0 && pipe->Writers == 0) { 1118d6: 83 c4 10 add $0x10,%esp 1118d9: 8b 53 10 mov 0x10(%ebx),%edx 1118dc: 85 d2 test %edx,%edx 1118de: 74 2c je 11190c *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) 1118e0: 8b 43 14 mov 0x14(%ebx),%eax 1118e3: 85 c0 test %eax,%eax 1118e5: 75 17 jne 1118fe <== NEVER TAKEN 1118e7: 83 fe 02 cmp $0x2,%esi 1118ea: 74 12 je 1118fe <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 1118ec: 83 ec 08 sub $0x8,%esp 1118ef: 8d 45 e4 lea -0x1c(%ebp),%eax 1118f2: 50 push %eax 1118f3: ff 73 2c pushl 0x2c(%ebx) 1118f6: e8 25 1e 00 00 call 113720 1118fb: 83 c4 10 add $0x10,%esp pipe_unlock(); 1118fe: e8 85 ff ff ff call 111888 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 111903: 8d 65 f4 lea -0xc(%ebp),%esp 111906: 5b pop %ebx 111907: 5e pop %esi 111908: 5f pop %edi 111909: c9 leave 11190a: c3 ret 11190b: 90 nop <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 11190c: 8b 43 14 mov 0x14(%ebx),%eax 11190f: 85 c0 test %eax,%eax 111911: 74 25 je 111938 delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 111913: 83 fe 04 cmp $0x4,%esi 111916: 74 e6 je 1118fe <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 111918: 83 ec 08 sub $0x8,%esp 11191b: 8d 45 e4 lea -0x1c(%ebp),%eax 11191e: 50 push %eax 11191f: ff 73 30 pushl 0x30(%ebx) 111922: e8 f9 1d 00 00 call 113720 111927: 83 c4 10 add $0x10,%esp else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); pipe_unlock(); 11192a: e8 59 ff ff ff call 111888 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 11192f: 8d 65 f4 lea -0xc(%ebp),%esp 111932: 5b pop %ebx 111933: 5e pop %esi 111934: 5f pop %edi 111935: c9 leave 111936: c3 ret 111937: 90 nop <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 111938: 83 ec 0c sub $0xc,%esp 11193b: ff 73 2c pushl 0x2c(%ebx) 11193e: e8 4d 1d 00 00 call 113690 rtems_barrier_delete(pipe->writeBarrier); 111943: 5e pop %esi 111944: ff 73 30 pushl 0x30(%ebx) 111947: e8 44 1d 00 00 call 113690 rtems_semaphore_delete(pipe->Semaphore); 11194c: 59 pop %ecx 11194d: ff 73 28 pushl 0x28(%ebx) 111950: e8 97 ba ff ff call 10d3ec free(pipe->Buffer); 111955: 5a pop %edx 111956: ff 33 pushl (%ebx) 111958: e8 2f 80 ff ff call 10998c free(pipe); 11195d: 89 1c 24 mov %ebx,(%esp) 111960: e8 27 80 ff ff call 10998c /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 111965: c7 07 00 00 00 00 movl $0x0,(%edi) 11196b: 83 c4 10 add $0x10,%esp /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); pipe_unlock(); 11196e: e8 15 ff ff ff call 111888 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 111973: 8d 65 f4 lea -0xc(%ebp),%esp 111976: 5b pop %ebx 111977: 5e pop %esi 111978: 5f pop %edi 111979: c9 leave 11197a: c3 ret =============================================================================== 00111fb4 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 111fb4: 55 push %ebp 111fb5: 89 e5 mov %esp,%ebp 111fb7: 57 push %edi 111fb8: 56 push %esi 111fb9: 53 push %ebx 111fba: 83 ec 2c sub $0x2c,%esp int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 111fbd: 8b 75 10 mov 0x10(%ebp),%esi 111fc0: 85 f6 test %esi,%esi 111fc2: 75 0c jne 111fd0 <== ALWAYS TAKEN return 0; 111fc4: 31 db xor %ebx,%ebx <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 111fc6: 89 d8 mov %ebx,%eax 111fc8: 8d 65 f4 lea -0xc(%ebp),%esp 111fcb: 5b pop %ebx 111fcc: 5e pop %esi 111fcd: 5f pop %edi 111fce: c9 leave 111fcf: c3 ret /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 111fd0: 53 push %ebx 111fd1: 6a 00 push $0x0 111fd3: 6a 00 push $0x0 111fd5: 8b 45 08 mov 0x8(%ebp),%eax 111fd8: ff 70 28 pushl 0x28(%eax) 111fdb: e8 b0 b4 ff ff call 10d490 111fe0: 83 c4 10 add $0x10,%esp 111fe3: 85 c0 test %eax,%eax 111fe5: 0f 85 1d 01 00 00 jne 112108 <== NEVER TAKEN return -EINTR; if (pipe->Readers == 0) { 111feb: 8b 45 08 mov 0x8(%ebp),%eax 111fee: 8b 48 10 mov 0x10(%eax),%ecx 111ff1: 85 c9 test %ecx,%ecx 111ff3: 0f 84 50 01 00 00 je 112149 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 111ff9: 8b 48 04 mov 0x4(%eax),%ecx 111ffc: 39 4d 10 cmp %ecx,0x10(%ebp) 111fff: 0f 87 3a 01 00 00 ja 11213f <== NEVER TAKEN 112005: 8b 7d 10 mov 0x10(%ebp),%edi 112008: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) 11200f: 31 db xor %ebx,%ebx else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 112011: 89 5d d4 mov %ebx,-0x2c(%ebp) 112014: 8b 5d 08 mov 0x8(%ebp),%ebx /* 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) { 112017: 8b 43 0c mov 0xc(%ebx),%eax 11201a: 89 ca mov %ecx,%edx 11201c: 29 c2 sub %eax,%edx 11201e: 39 fa cmp %edi,%edx 112020: 73 6f jae 112091 if (LIBIO_NODELAY(iop)) { 112022: 8b 45 14 mov 0x14(%ebp),%eax 112025: f6 40 14 01 testb $0x1,0x14(%eax) 112029: 0f 85 47 01 00 00 jne 112176 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 11202f: ff 43 1c incl 0x1c(%ebx) PIPE_UNLOCK(pipe); 112032: 83 ec 0c sub $0xc,%esp 112035: ff 73 28 pushl 0x28(%ebx) 112038: e8 4f b5 ff ff call 10d58c if (! PIPE_WRITEWAIT(pipe)) 11203d: 58 pop %eax 11203e: 5a pop %edx 11203f: 6a 00 push $0x0 112041: ff 73 30 pushl 0x30(%ebx) 112044: e8 3b 17 00 00 call 113784 112049: 83 c4 0c add $0xc,%esp 11204c: 83 f8 01 cmp $0x1,%eax 11204f: 19 f6 sbb %esi,%esi 112051: f7 d6 not %esi 112053: 83 e6 fc and $0xfffffffc,%esi ret = -EINTR; if (! PIPE_LOCK(pipe)) { 112056: 6a 00 push $0x0 112058: 6a 00 push $0x0 11205a: ff 73 28 pushl 0x28(%ebx) 11205d: e8 2e b4 ff ff call 10d490 112062: 83 c4 10 add $0x10,%esp 112065: 85 c0 test %eax,%eax 112067: 0f 85 ff 00 00 00 jne 11216c <== NEVER TAKEN /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 11206d: ff 4b 1c decl 0x1c(%ebx) if (ret != 0) 112070: 85 f6 test %esi,%esi 112072: 0f 85 ef 00 00 00 jne 112167 <== NEVER TAKEN goto out_locked; if (pipe->Readers == 0) { 112078: 8b 73 10 mov 0x10(%ebx),%esi 11207b: 85 f6 test %esi,%esi 11207d: 0f 84 8f 00 00 00 je 112112 <== NEVER TAKEN 112083: 8b 4b 04 mov 0x4(%ebx),%ecx /* 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) { 112086: 8b 43 0c mov 0xc(%ebx),%eax 112089: 89 ca mov %ecx,%edx 11208b: 29 c2 sub %eax,%edx 11208d: 39 fa cmp %edi,%edx 11208f: 72 91 jb 112022 <== NEVER TAKEN ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 112091: 8b 75 10 mov 0x10(%ebp),%esi 112094: 2b 75 d0 sub -0x30(%ebp),%esi 112097: 89 55 cc mov %edx,-0x34(%ebp) 11209a: 39 f2 cmp %esi,%edx 11209c: 76 03 jbe 1120a1 11209e: 89 75 cc mov %esi,-0x34(%ebp) chunk1 = pipe->Size - PIPE_WSTART(pipe); 1120a1: 03 43 08 add 0x8(%ebx),%eax 1120a4: 31 d2 xor %edx,%edx 1120a6: f7 f1 div %ecx 1120a8: 89 c8 mov %ecx,%eax 1120aa: 29 d0 sub %edx,%eax if (chunk > chunk1) { 1120ac: 39 45 cc cmp %eax,-0x34(%ebp) 1120af: 0f 8e cb 00 00 00 jle 112180 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 1120b5: 03 13 add (%ebx),%edx 1120b7: 8b 75 0c mov 0xc(%ebp),%esi 1120ba: 03 75 d0 add -0x30(%ebp),%esi 1120bd: 89 d7 mov %edx,%edi 1120bf: 89 c1 mov %eax,%ecx 1120c1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 1120c3: 8b 13 mov (%ebx),%edx 1120c5: 8b 4d cc mov -0x34(%ebp),%ecx 1120c8: 29 c1 sub %eax,%ecx 1120ca: 03 45 d0 add -0x30(%ebp),%eax 1120cd: 8b 75 0c mov 0xc(%ebp),%esi 1120d0: 01 c6 add %eax,%esi 1120d2: 89 d7 mov %edx,%edi 1120d4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 1120d6: 8b 45 cc mov -0x34(%ebp),%eax 1120d9: 01 43 0c add %eax,0xc(%ebx) if (pipe->waitingReaders > 0) 1120dc: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 1120e0: 0f 85 ae 00 00 00 jne 112194 PIPE_WAKEUPREADERS(pipe); written += chunk; 1120e6: 8b 45 cc mov -0x34(%ebp),%eax 1120e9: 01 45 d4 add %eax,-0x2c(%ebp) } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 1120ec: 8b 45 d4 mov -0x2c(%ebp),%eax 1120ef: 89 45 d0 mov %eax,-0x30(%ebp) 1120f2: 39 45 10 cmp %eax,0x10(%ebp) 1120f5: 0f 86 af 00 00 00 jbe 1121aa <== ALWAYS TAKEN 1120fb: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); written += chunk; /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; 1120fe: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 112103: e9 0f ff ff ff jmp 112017 <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) return -EINTR; 112108: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED 11210d: e9 b4 fe ff ff jmp 111fc6 <== NOT EXECUTED 112112: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; 112115: 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); 11211a: 83 ec 0c sub $0xc,%esp 11211d: 8b 45 08 mov 0x8(%ebp),%eax 112120: ff 70 28 pushl 0x28(%eax) 112123: e8 64 b4 ff ff call 10d58c 112128: 83 c4 10 add $0x10,%esp out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 11212b: 83 fe e0 cmp $0xffffffe0,%esi 11212e: 74 22 je 112152 kill(getpid(), SIGPIPE); #endif if (written > 0) 112130: 85 db test %ebx,%ebx 112132: 0f 8f 8e fe ff ff jg 111fc6 112138: 89 f3 mov %esi,%ebx 11213a: e9 87 fe ff ff jmp 111fc6 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 11213f: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 112144: e9 bf fe ff ff jmp 112008 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; 112149: be e0 ff ff ff mov $0xffffffe0,%esi const void *buffer, size_t count, rtems_libio_t *iop ) { int chunk, chunk1, written = 0, ret = 0; 11214e: 31 db xor %ebx,%ebx 112150: eb c8 jmp 11211a out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); 112152: e8 39 08 00 00 call 112990 112157: 83 ec 08 sub $0x8,%esp 11215a: 6a 0d push $0xd 11215c: 50 push %eax 11215d: e8 32 0b 00 00 call 112c94 112162: 83 c4 10 add $0x10,%esp 112165: eb c9 jmp 112130 112167: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED 11216a: eb ae jmp 11211a <== NOT EXECUTED 11216c: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; 11216f: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 112174: eb ba jmp 112130 <== NOT EXECUTED 112176: 8b 5d d4 mov -0x2c(%ebp),%ebx chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 112179: be f5 ff ff ff mov $0xfffffff5,%esi 11217e: eb 9a jmp 11211a 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); 112180: 03 13 add (%ebx),%edx 112182: 8b 75 0c mov 0xc(%ebp),%esi 112185: 03 75 d0 add -0x30(%ebp),%esi 112188: 89 d7 mov %edx,%edi 11218a: 8b 4d cc mov -0x34(%ebp),%ecx 11218d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 11218f: e9 42 ff ff ff jmp 1120d6 pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 112194: 51 push %ecx 112195: 51 push %ecx 112196: 8d 45 e4 lea -0x1c(%ebp),%eax 112199: 50 push %eax 11219a: ff 73 2c pushl 0x2c(%ebx) 11219d: e8 7e 15 00 00 call 113720 1121a2: 83 c4 10 add $0x10,%esp 1121a5: e9 3c ff ff ff jmp 1120e6 1121aa: 8b 5d d4 mov -0x2c(%ebp),%ebx } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 1121ad: 31 f6 xor %esi,%esi 1121af: e9 66 ff ff ff jmp 11211a =============================================================================== 0010baac : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10baac: 55 push %ebp 10baad: 89 e5 mov %esp,%ebp 10baaf: 53 push %ebx 10bab0: 83 ec 04 sub $0x4,%esp 10bab3: 8b 45 0c mov 0xc(%ebp),%eax /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10bab6: ff 05 c8 dc 12 00 incl 0x12dcc8 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10babc: 8d 50 ff lea -0x1(%eax),%edx 10babf: 85 c2 test %eax,%edx 10bac1: 75 05 jne 10bac8 <== NEVER TAKEN 10bac3: 83 f8 03 cmp $0x3,%eax 10bac6: 77 0c ja 10bad4 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10bac8: b8 16 00 00 00 mov $0x16,%eax 10bacd: 5a pop %edx 10bace: 5b pop %ebx 10bacf: c9 leave 10bad0: c3 ret 10bad1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10bad4: 59 pop %ecx 10bad5: 5b pop %ebx 10bad6: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10bad7: e9 78 01 00 00 jmp 10bc54 =============================================================================== 0011091c : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 11091c: 55 push %ebp 11091d: 89 e5 mov %esp,%ebp 11091f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 110922: 85 c0 test %eax,%eax 110924: 74 12 je 110938 110926: 8b 10 mov (%eax),%edx 110928: 85 d2 test %edx,%edx 11092a: 74 0c je 110938 return EINVAL; attr->is_initialized = false; 11092c: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 110932: 31 c0 xor %eax,%eax } 110934: c9 leave 110935: c3 ret 110936: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_attr_destroy( pthread_attr_t *attr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110938: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 11093d: c9 leave 11093e: c3 ret =============================================================================== 001109b8 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 1109b8: 55 push %ebp 1109b9: 89 e5 mov %esp,%ebp 1109bb: 57 push %edi 1109bc: 56 push %esi 1109bd: 8b 75 08 mov 0x8(%ebp),%esi 1109c0: 8b 45 0c mov 0xc(%ebp),%eax if ( !attr || !attr->is_initialized || !param ) 1109c3: 85 f6 test %esi,%esi 1109c5: 74 1d je 1109e4 1109c7: 8b 16 mov (%esi),%edx 1109c9: 85 d2 test %edx,%edx 1109cb: 74 17 je 1109e4 1109cd: 85 c0 test %eax,%eax 1109cf: 74 13 je 1109e4 return EINVAL; *param = attr->schedparam; 1109d1: 83 c6 18 add $0x18,%esi 1109d4: b9 07 00 00 00 mov $0x7,%ecx 1109d9: 89 c7 mov %eax,%edi 1109db: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 1109dd: 31 c0 xor %eax,%eax } 1109df: 5e pop %esi 1109e0: 5f pop %edi 1109e1: c9 leave 1109e2: c3 ret 1109e3: 90 nop <== NOT EXECUTED const pthread_attr_t *attr, struct sched_param *param ) { if ( !attr || !attr->is_initialized || !param ) return EINVAL; 1109e4: b8 16 00 00 00 mov $0x16,%eax *param = attr->schedparam; return 0; } 1109e9: 5e pop %esi 1109ea: 5f pop %edi 1109eb: c9 leave 1109ec: c3 ret =============================================================================== 00110a68 : int pthread_attr_getstack( const pthread_attr_t *attr, void **stackaddr, size_t *stacksize ) { 110a68: 55 push %ebp 110a69: 89 e5 mov %esp,%ebp 110a6b: 53 push %ebx 110a6c: 8b 45 08 mov 0x8(%ebp),%eax 110a6f: 8b 55 0c mov 0xc(%ebp),%edx 110a72: 8b 4d 10 mov 0x10(%ebp),%ecx if ( !attr || !attr->is_initialized || !stackaddr || !stacksize ) 110a75: 85 c0 test %eax,%eax 110a77: 74 1f je 110a98 110a79: 8b 18 mov (%eax),%ebx 110a7b: 85 db test %ebx,%ebx 110a7d: 74 19 je 110a98 110a7f: 85 d2 test %edx,%edx 110a81: 74 15 je 110a98 110a83: 85 c9 test %ecx,%ecx 110a85: 74 11 je 110a98 return EINVAL; *stackaddr = attr->stackaddr; 110a87: 8b 58 04 mov 0x4(%eax),%ebx 110a8a: 89 1a mov %ebx,(%edx) *stacksize = attr->stacksize; 110a8c: 8b 40 08 mov 0x8(%eax),%eax 110a8f: 89 01 mov %eax,(%ecx) return 0; 110a91: 31 c0 xor %eax,%eax } 110a93: 5b pop %ebx 110a94: c9 leave 110a95: c3 ret 110a96: 66 90 xchg %ax,%ax <== NOT EXECUTED void **stackaddr, size_t *stacksize ) { if ( !attr || !attr->is_initialized || !stackaddr || !stacksize ) return EINVAL; 110a98: b8 16 00 00 00 mov $0x16,%eax *stackaddr = attr->stackaddr; *stacksize = attr->stacksize; return 0; } 110a9d: 5b pop %ebx 110a9e: c9 leave 110a9f: c3 ret =============================================================================== 001114c8 : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 1114c8: 55 push %ebp 1114c9: 89 e5 mov %esp,%ebp 1114cb: 8b 45 08 mov 0x8(%ebp),%eax 1114ce: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 1114d1: 85 c0 test %eax,%eax 1114d3: 74 0b je 1114e0 1114d5: 8b 08 mov (%eax),%ecx 1114d7: 85 c9 test %ecx,%ecx 1114d9: 74 05 je 1114e0 return EINVAL; switch ( clock_allowed ) { 1114db: 83 fa 01 cmp $0x1,%edx 1114de: 76 08 jbe 1114e8 case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; return 0; default: return EINVAL; 1114e0: b8 16 00 00 00 mov $0x16,%eax } } 1114e5: c9 leave 1114e6: c3 ret 1114e7: 90 nop <== NOT EXECUTED return EINVAL; switch ( clock_allowed ) { case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 1114e8: 89 50 38 mov %edx,0x38(%eax) return 0; 1114eb: 31 c0 xor %eax,%eax default: return EINVAL; } } 1114ed: c9 leave 1114ee: c3 ret =============================================================================== 00110af4 : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 110af4: 55 push %ebp 110af5: 89 e5 mov %esp,%ebp 110af7: 8b 45 08 mov 0x8(%ebp),%eax 110afa: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 110afd: 85 c0 test %eax,%eax 110aff: 74 0b je 110b0c 110b01: 8b 08 mov (%eax),%ecx 110b03: 85 c9 test %ecx,%ecx 110b05: 74 05 je 110b0c return EINVAL; switch ( detachstate ) { 110b07: 83 fa 01 cmp $0x1,%edx 110b0a: 76 08 jbe 110b14 case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; return 0; default: return EINVAL; 110b0c: b8 16 00 00 00 mov $0x16,%eax } } 110b11: c9 leave 110b12: c3 ret 110b13: 90 nop <== NOT EXECUTED return EINVAL; switch ( detachstate ) { case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 110b14: 89 50 3c mov %edx,0x3c(%eax) return 0; 110b17: 31 c0 xor %eax,%eax default: return EINVAL; } } 110b19: c9 leave 110b1a: c3 ret =============================================================================== 00110b1c : int pthread_attr_setguardsize( pthread_attr_t *attr, size_t guardsize ) { 110b1c: 55 push %ebp 110b1d: 89 e5 mov %esp,%ebp 110b1f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 110b22: 85 c0 test %eax,%eax 110b24: 74 12 je 110b38 110b26: 8b 10 mov (%eax),%edx 110b28: 85 d2 test %edx,%edx 110b2a: 74 0c je 110b38 return EINVAL; attr->guardsize = guardsize; 110b2c: 8b 55 0c mov 0xc(%ebp),%edx 110b2f: 89 50 34 mov %edx,0x34(%eax) return 0; 110b32: 31 c0 xor %eax,%eax } 110b34: c9 leave 110b35: c3 ret 110b36: 66 90 xchg %ax,%ax <== NOT EXECUTED pthread_attr_t *attr, size_t guardsize ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110b38: b8 16 00 00 00 mov $0x16,%eax attr->guardsize = guardsize; return 0; } 110b3d: c9 leave 110b3e: c3 ret =============================================================================== 00111a64 : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 111a64: 55 push %ebp 111a65: 89 e5 mov %esp,%ebp 111a67: 8b 45 08 mov 0x8(%ebp),%eax 111a6a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111a6d: 85 c0 test %eax,%eax 111a6f: 74 1f je 111a90 111a71: 8b 08 mov (%eax),%ecx 111a73: 85 c9 test %ecx,%ecx 111a75: 74 19 je 111a90 return EINVAL; switch ( inheritsched ) { 111a77: 8d 4a ff lea -0x1(%edx),%ecx 111a7a: 83 f9 01 cmp $0x1,%ecx 111a7d: 76 09 jbe 111a88 case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; return 0; default: return ENOTSUP; 111a7f: b8 86 00 00 00 mov $0x86,%eax } } 111a84: c9 leave 111a85: c3 ret 111a86: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 111a88: 89 50 10 mov %edx,0x10(%eax) return 0; 111a8b: 31 c0 xor %eax,%eax default: return ENOTSUP; } } 111a8d: c9 leave 111a8e: c3 ret 111a8f: 90 nop <== NOT EXECUTED pthread_attr_t *attr, int inheritsched ) { if ( !attr || !attr->is_initialized ) return EINVAL; 111a90: b8 16 00 00 00 mov $0x16,%eax return 0; default: return ENOTSUP; } } 111a95: c9 leave 111a96: c3 ret =============================================================================== 00110b74 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 110b74: 55 push %ebp 110b75: 89 e5 mov %esp,%ebp 110b77: 57 push %edi 110b78: 56 push %esi 110b79: 8b 7d 08 mov 0x8(%ebp),%edi 110b7c: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 110b7f: 85 ff test %edi,%edi 110b81: 74 1d je 110ba0 110b83: 8b 07 mov (%edi),%eax 110b85: 85 c0 test %eax,%eax 110b87: 74 17 je 110ba0 110b89: 85 f6 test %esi,%esi 110b8b: 74 13 je 110ba0 return EINVAL; attr->schedparam = *param; 110b8d: 83 c7 18 add $0x18,%edi 110b90: b9 07 00 00 00 mov $0x7,%ecx 110b95: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 110b97: 31 c0 xor %eax,%eax } 110b99: 5e pop %esi 110b9a: 5f pop %edi 110b9b: c9 leave 110b9c: c3 ret 110b9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED pthread_attr_t *attr, const struct sched_param *param ) { if ( !attr || !attr->is_initialized || !param ) return EINVAL; 110ba0: b8 16 00 00 00 mov $0x16,%eax attr->schedparam = *param; return 0; } 110ba5: 5e pop %esi 110ba6: 5f pop %edi 110ba7: c9 leave 110ba8: c3 ret =============================================================================== 00110bac : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 110bac: 55 push %ebp 110bad: 89 e5 mov %esp,%ebp 110baf: 8b 45 08 mov 0x8(%ebp),%eax 110bb2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 110bb5: 85 c0 test %eax,%eax 110bb7: 74 23 je 110bdc 110bb9: 8b 08 mov (%eax),%ecx 110bbb: 85 c9 test %ecx,%ecx 110bbd: 74 1d je 110bdc return EINVAL; switch ( policy ) { 110bbf: 85 d2 test %edx,%edx 110bc1: 78 0a js 110bcd 110bc3: 83 fa 02 cmp $0x2,%edx 110bc6: 7e 0c jle 110bd4 110bc8: 83 fa 04 cmp $0x4,%edx 110bcb: 74 07 je 110bd4 <== ALWAYS TAKEN case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 110bcd: b8 86 00 00 00 mov $0x86,%eax } } 110bd2: c9 leave 110bd3: c3 ret switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 110bd4: 89 50 14 mov %edx,0x14(%eax) return 0; 110bd7: 31 c0 xor %eax,%eax default: return ENOTSUP; } } 110bd9: c9 leave 110bda: c3 ret 110bdb: 90 nop <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110bdc: b8 16 00 00 00 mov $0x16,%eax return 0; default: return ENOTSUP; } } 110be1: c9 leave 110be2: c3 ret =============================================================================== 00110be4 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 110be4: 55 push %ebp 110be5: 89 e5 mov %esp,%ebp 110be7: 8b 45 08 mov 0x8(%ebp),%eax 110bea: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 110bed: 85 c0 test %eax,%eax 110bef: 74 1a je 110c0b 110bf1: 8b 08 mov (%eax),%ecx 110bf3: 85 c9 test %ecx,%ecx 110bf5: 74 14 je 110c0b return EINVAL; switch ( contentionscope ) { 110bf7: 85 d2 test %edx,%edx 110bf9: 75 0d jne 110c08 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 110bfb: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) return 0; 110c02: 31 c0 xor %eax,%eax return ENOTSUP; default: return EINVAL; } } 110c04: c9 leave 110c05: c3 ret 110c06: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 110c08: 4a dec %edx 110c09: 74 09 je 110c14 case PTHREAD_SCOPE_SYSTEM: return ENOTSUP; default: return EINVAL; 110c0b: b8 16 00 00 00 mov $0x16,%eax } } 110c10: c9 leave 110c11: c3 ret 110c12: 66 90 xchg %ax,%ax <== NOT EXECUTED case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; case PTHREAD_SCOPE_SYSTEM: return ENOTSUP; 110c14: b8 86 00 00 00 mov $0x86,%eax default: return EINVAL; } } 110c19: c9 leave 110c1a: c3 ret =============================================================================== 00110c40 : int pthread_attr_setstack( pthread_attr_t *attr, void *stackaddr, size_t stacksize ) { 110c40: 55 push %ebp 110c41: 89 e5 mov %esp,%ebp 110c43: 8b 45 08 mov 0x8(%ebp),%eax 110c46: 8b 55 10 mov 0x10(%ebp),%edx if ( !attr || !attr->is_initialized ) 110c49: 85 c0 test %eax,%eax 110c4b: 74 27 je 110c74 110c4d: 8b 08 mov (%eax),%ecx 110c4f: 85 c9 test %ecx,%ecx 110c51: 74 21 je 110c74 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 110c53: 8b 0d 18 db 12 00 mov 0x12db18,%ecx 110c59: d1 e1 shl %ecx 110c5b: 39 d1 cmp %edx,%ecx 110c5d: 77 0d ja 110c6c attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 110c5f: 89 50 08 mov %edx,0x8(%eax) attr->stackaddr = stackaddr; 110c62: 8b 55 0c mov 0xc(%ebp),%edx 110c65: 89 50 04 mov %edx,0x4(%eax) return 0; 110c68: 31 c0 xor %eax,%eax } 110c6a: c9 leave 110c6b: c3 ret { if ( !attr || !attr->is_initialized ) return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 110c6c: 89 48 08 mov %ecx,0x8(%eax) 110c6f: eb f1 jmp 110c62 110c71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *stackaddr, size_t stacksize ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110c74: b8 16 00 00 00 mov $0x16,%eax else attr->stacksize = stacksize; attr->stackaddr = stackaddr; return 0; } 110c79: c9 leave 110c7a: c3 ret =============================================================================== 00110c1c : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 110c1c: 55 push %ebp 110c1d: 89 e5 mov %esp,%ebp 110c1f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 110c22: 85 c0 test %eax,%eax 110c24: 74 12 je 110c38 110c26: 8b 10 mov (%eax),%edx 110c28: 85 d2 test %edx,%edx 110c2a: 74 0c je 110c38 return EINVAL; attr->stackaddr = stackaddr; 110c2c: 8b 55 0c mov 0xc(%ebp),%edx 110c2f: 89 50 04 mov %edx,0x4(%eax) return 0; 110c32: 31 c0 xor %eax,%eax } 110c34: c9 leave 110c35: c3 ret 110c36: 66 90 xchg %ax,%ax <== NOT EXECUTED pthread_attr_t *attr, void *stackaddr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110c38: b8 16 00 00 00 mov $0x16,%eax attr->stackaddr = stackaddr; return 0; } 110c3d: c9 leave 110c3e: c3 ret =============================================================================== 00111a98 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 111a98: 55 push %ebp 111a99: 89 e5 mov %esp,%ebp 111a9b: 8b 45 08 mov 0x8(%ebp),%eax 111a9e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111aa1: 85 c0 test %eax,%eax 111aa3: 74 23 je 111ac8 111aa5: 8b 08 mov (%eax),%ecx 111aa7: 85 c9 test %ecx,%ecx 111aa9: 74 1d je 111ac8 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 111aab: 8b 0d b8 44 12 00 mov 0x1244b8,%ecx 111ab1: d1 e1 shl %ecx 111ab3: 39 d1 cmp %edx,%ecx 111ab5: 77 09 ja 111ac0 attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 111ab7: 89 50 08 mov %edx,0x8(%eax) return 0; 111aba: 31 c0 xor %eax,%eax } 111abc: c9 leave 111abd: c3 ret 111abe: 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; 111ac0: 89 48 08 mov %ecx,0x8(%eax) else attr->stacksize = stacksize; return 0; 111ac3: 31 c0 xor %eax,%eax } 111ac5: c9 leave 111ac6: c3 ret 111ac7: 90 nop <== NOT EXECUTED pthread_attr_t *attr, size_t stacksize ) { if ( !attr || !attr->is_initialized ) return EINVAL; 111ac8: b8 16 00 00 00 mov $0x16,%eax if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; return 0; } 111acd: c9 leave 111ace: c3 ret =============================================================================== 0010b8f8 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 10b8f8: 55 push %ebp 10b8f9: 89 e5 mov %esp,%ebp 10b8fb: 83 ec 28 sub $0x28,%esp 10b8fe: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b901: 85 c0 test %eax,%eax 10b903: 74 2f je 10b934 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b905: 51 push %ecx return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); 10b906: 8d 55 f4 lea -0xc(%ebp),%edx 10b909: 52 push %edx 10b90a: ff 30 pushl (%eax) 10b90c: 68 20 90 12 00 push $0x129020 10b911: e8 56 26 00 00 call 10df6c <_Objects_Get> switch ( location ) { 10b916: 83 c4 10 add $0x10,%esp 10b919: 8b 55 f4 mov -0xc(%ebp),%edx 10b91c: 85 d2 test %edx,%edx 10b91e: 75 14 jne 10b934 case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 10b920: 8b 48 58 mov 0x58(%eax),%ecx 10b923: 85 c9 test %ecx,%ecx 10b925: 74 15 je 10b93c _Thread_Enable_dispatch(); 10b927: e8 d0 2e 00 00 call 10e7fc <_Thread_Enable_dispatch> return EBUSY; 10b92c: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b931: c9 leave 10b932: c3 ret 10b933: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10b934: b8 16 00 00 00 mov $0x16,%eax } 10b939: c9 leave 10b93a: c3 ret 10b93b: 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 ); 10b93c: 83 ec 08 sub $0x8,%esp 10b93f: 50 push %eax 10b940: 68 20 90 12 00 push $0x129020 10b945: 89 45 e4 mov %eax,-0x1c(%ebp) 10b948: e8 e3 21 00 00 call 10db30 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 10b94d: 58 pop %eax 10b94e: 5a pop %edx 10b94f: 8b 45 e4 mov -0x1c(%ebp),%eax 10b952: 50 push %eax 10b953: 68 20 90 12 00 push $0x129020 10b958: e8 cf 24 00 00 call 10de2c <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10b95d: e8 9a 2e 00 00 call 10e7fc <_Thread_Enable_dispatch> return 0; 10b962: 83 c4 10 add $0x10,%esp 10b965: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b967: c9 leave 10b968: c3 ret =============================================================================== 0010b96c : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10b96c: 55 push %ebp 10b96d: 89 e5 mov %esp,%ebp 10b96f: 57 push %edi 10b970: 56 push %esi 10b971: 53 push %ebx 10b972: 83 ec 2c sub $0x2c,%esp 10b975: 8b 5d 08 mov 0x8(%ebp),%ebx 10b978: 8b 7d 0c mov 0xc(%ebp),%edi 10b97b: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10b97e: 85 db test %ebx,%ebx 10b980: 0f 84 82 00 00 00 je 10ba08 return EINVAL; if ( count == 0 ) 10b986: 85 f6 test %esi,%esi 10b988: 74 7e je 10ba08 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10b98a: 85 ff test %edi,%edi 10b98c: 0f 84 92 00 00 00 je 10ba24 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10b992: 8b 17 mov (%edi),%edx 10b994: 85 d2 test %edx,%edx 10b996: 74 70 je 10ba08 return EINVAL; switch ( the_attr->process_shared ) { 10b998: 8b 47 04 mov 0x4(%edi),%eax 10b99b: 85 c0 test %eax,%eax 10b99d: 75 69 jne 10ba08 <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10b99f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10b9a6: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b9a9: a1 f4 8b 12 00 mov 0x128bf4,%eax 10b9ae: 40 inc %eax 10b9af: a3 f4 8b 12 00 mov %eax,0x128bf4 * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) _Objects_Allocate( &_POSIX_Barrier_Information ); 10b9b4: 83 ec 0c sub $0xc,%esp 10b9b7: 68 20 90 12 00 push $0x129020 10b9bc: e8 f3 20 00 00 call 10dab4 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10b9c1: 83 c4 10 add $0x10,%esp 10b9c4: 85 c0 test %eax,%eax 10b9c6: 74 50 je 10ba18 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10b9c8: 83 ec 08 sub $0x8,%esp 10b9cb: 8d 55 e0 lea -0x20(%ebp),%edx 10b9ce: 52 push %edx 10b9cf: 8d 50 10 lea 0x10(%eax),%edx 10b9d2: 52 push %edx 10b9d3: 89 45 d4 mov %eax,-0x2c(%ebp) 10b9d6: e8 cd 16 00 00 call 10d0a8 <_CORE_barrier_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b9db: 8b 45 d4 mov -0x2c(%ebp),%eax 10b9de: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b9e1: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b9e4: 8b 0d 3c 90 12 00 mov 0x12903c,%ecx 10b9ea: 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; 10b9ed: 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; 10b9f4: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10b9f6: e8 01 2e 00 00 call 10e7fc <_Thread_Enable_dispatch> return 0; 10b9fb: 83 c4 10 add $0x10,%esp 10b9fe: 31 c0 xor %eax,%eax } 10ba00: 8d 65 f4 lea -0xc(%ebp),%esp 10ba03: 5b pop %ebx 10ba04: 5e pop %esi 10ba05: 5f pop %edi 10ba06: c9 leave 10ba07: c3 ret switch ( the_attr->process_shared ) { case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 10ba08: b8 16 00 00 00 mov $0x16,%eax * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 10ba0d: 8d 65 f4 lea -0xc(%ebp),%esp 10ba10: 5b pop %ebx 10ba11: 5e pop %esi 10ba12: 5f pop %edi 10ba13: c9 leave 10ba14: c3 ret 10ba15: 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(); 10ba18: e8 df 2d 00 00 call 10e7fc <_Thread_Enable_dispatch> return EAGAIN; 10ba1d: b8 0b 00 00 00 mov $0xb,%eax 10ba22: eb e9 jmp 10ba0d * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10ba24: 83 ec 0c sub $0xc,%esp 10ba27: 8d 7d d8 lea -0x28(%ebp),%edi 10ba2a: 57 push %edi 10ba2b: e8 7c fe ff ff call 10b8ac 10ba30: 83 c4 10 add $0x10,%esp 10ba33: e9 5a ff ff ff jmp 10b992 =============================================================================== 0010ba38 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10ba38: 55 push %ebp 10ba39: 89 e5 mov %esp,%ebp 10ba3b: 83 ec 18 sub $0x18,%esp 10ba3e: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10ba41: 85 c0 test %eax,%eax 10ba43: 74 4f je 10ba94 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10ba45: 51 push %ecx return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); 10ba46: 8d 55 f4 lea -0xc(%ebp),%edx 10ba49: 52 push %edx 10ba4a: ff 30 pushl (%eax) 10ba4c: 68 20 90 12 00 push $0x129020 10ba51: e8 16 25 00 00 call 10df6c <_Objects_Get> switch ( location ) { 10ba56: 83 c4 10 add $0x10,%esp 10ba59: 8b 55 f4 mov -0xc(%ebp),%edx 10ba5c: 85 d2 test %edx,%edx 10ba5e: 75 34 jne 10ba94 case OBJECTS_LOCAL: _CORE_barrier_Wait( 10ba60: 83 ec 0c sub $0xc,%esp 10ba63: 6a 00 push $0x0 10ba65: 6a 00 push $0x0 10ba67: 6a 01 push $0x1 10ba69: ff 70 08 pushl 0x8(%eax) 10ba6c: 83 c0 10 add $0x10,%eax 10ba6f: 50 push %eax 10ba70: e8 67 16 00 00 call 10d0dc <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10ba75: 83 c4 20 add $0x20,%esp 10ba78: e8 7f 2d 00 00 call 10e7fc <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10ba7d: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10ba80: a1 b8 91 12 00 mov 0x1291b8,%eax true, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 10ba85: ff 70 34 pushl 0x34(%eax) 10ba88: e8 1f 5b 00 00 call 1115ac <_POSIX_Barrier_Translate_core_barrier_return_code> 10ba8d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10ba90: c9 leave 10ba91: c3 ret 10ba92: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10ba94: b8 16 00 00 00 mov $0x16,%eax } 10ba99: c9 leave 10ba9a: c3 ret =============================================================================== 0010b864 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10b864: 55 push %ebp 10b865: 89 e5 mov %esp,%ebp 10b867: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10b86a: 85 c0 test %eax,%eax 10b86c: 74 12 je 10b880 10b86e: 8b 10 mov (%eax),%edx 10b870: 85 d2 test %edx,%edx 10b872: 74 0c je 10b880 return EINVAL; attr->is_initialized = false; 10b874: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10b87a: 31 c0 xor %eax,%eax } 10b87c: c9 leave 10b87d: c3 ret 10b87e: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10b880: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10b885: c9 leave 10b886: c3 ret =============================================================================== 0010b8ac : */ int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { 10b8ac: 55 push %ebp 10b8ad: 89 e5 mov %esp,%ebp 10b8af: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b8b2: 85 c0 test %eax,%eax 10b8b4: 74 12 je 10b8c8 return EINVAL; attr->is_initialized = true; 10b8b6: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10b8bc: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) return 0; 10b8c3: 31 c0 xor %eax,%eax } 10b8c5: c9 leave 10b8c6: c3 ret 10b8c7: 90 nop <== NOT EXECUTED int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { if ( !attr ) return EINVAL; 10b8c8: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10b8cd: c9 leave 10b8ce: c3 ret =============================================================================== 0010b8d0 : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 10b8d0: 55 push %ebp 10b8d1: 89 e5 mov %esp,%ebp 10b8d3: 8b 45 08 mov 0x8(%ebp),%eax 10b8d6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b8d9: 85 c0 test %eax,%eax 10b8db: 74 0b je 10b8e8 return EINVAL; if ( !attr->is_initialized ) 10b8dd: 8b 08 mov (%eax),%ecx 10b8df: 85 c9 test %ecx,%ecx 10b8e1: 74 05 je 10b8e8 return EINVAL; switch ( pshared ) { 10b8e3: 83 fa 01 cmp $0x1,%edx 10b8e6: 76 08 jbe 10b8f0 case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10b8e8: b8 16 00 00 00 mov $0x16,%eax } } 10b8ed: c9 leave 10b8ee: c3 ret 10b8ef: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b8f0: 89 50 04 mov %edx,0x4(%eax) return 0; 10b8f3: 31 c0 xor %eax,%eax default: return EINVAL; } } 10b8f5: c9 leave 10b8f6: c3 ret =============================================================================== 0010b114 : */ int pthread_cancel( pthread_t thread ) { 10b114: 55 push %ebp 10b115: 89 e5 mov %esp,%ebp 10b117: 83 ec 18 sub $0x18,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 10b11a: a1 54 8d 12 00 mov 0x128d54,%eax 10b11f: 85 c0 test %eax,%eax 10b121: 74 09 je 10b12c return EPROTO; 10b123: b8 47 00 00 00 mov $0x47,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b128: c9 leave 10b129: c3 ret 10b12a: 66 90 xchg %ax,%ax <== NOT EXECUTED pthread_t id, Objects_Locations *location ) { return (Thread_Control *) _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); 10b12c: 51 push %ecx */ if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); 10b12d: 8d 45 f4 lea -0xc(%ebp),%eax 10b130: 50 push %eax 10b131: ff 75 08 pushl 0x8(%ebp) 10b134: 68 40 8a 12 00 push $0x128a40 10b139: e8 22 21 00 00 call 10d260 <_Objects_Get> switch ( location ) { 10b13e: 83 c4 10 add $0x10,%esp 10b141: 8b 55 f4 mov -0xc(%ebp),%edx 10b144: 85 d2 test %edx,%edx 10b146: 75 20 jne 10b168 case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 10b148: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 10b14e: c7 82 e0 00 00 00 01 movl $0x1,0xe0(%edx) 10b155: 00 00 00 /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 10b158: 83 ec 0c sub $0xc,%esp 10b15b: 50 push %eax 10b15c: e8 97 54 00 00 call 1105f8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> return 0; 10b161: 83 c4 10 add $0x10,%esp 10b164: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b166: c9 leave 10b167: c3 ret #endif case OBJECTS_ERROR: break; } return EINVAL; 10b168: b8 16 00 00 00 mov $0x16,%eax } 10b16d: c9 leave 10b16e: c3 ret =============================================================================== 0010af84 : */ void pthread_cleanup_pop( int execute ) { 10af84: 55 push %ebp 10af85: 89 e5 mov %esp,%ebp 10af87: 57 push %edi 10af88: 56 push %esi 10af89: 53 push %ebx 10af8a: 83 ec 0c sub $0xc,%esp 10af8d: 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 ]; 10af90: a1 58 7e 12 00 mov 0x127e58,%eax 10af95: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10af9b: 8b 15 94 78 12 00 mov 0x127894,%edx 10afa1: 42 inc %edx 10afa2: 89 15 94 78 12 00 mov %edx,0x127894 * 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 ); 10afa8: 9c pushf 10afa9: fa cli 10afaa: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10afab: 8d 90 e8 00 00 00 lea 0xe8(%eax),%edx if ( _Chain_Is_empty( handler_stack ) ) { 10afb1: 39 90 e4 00 00 00 cmp %edx,0xe4(%eax) 10afb7: 74 43 je 10affc _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 10afb9: 8b 42 04 mov 0x4(%edx),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10afbc: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10afbe: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10afc1: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10afc4: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10afc6: 56 push %esi 10afc7: 9d popf 10afc8: 8b 70 08 mov 0x8(%eax),%esi 10afcb: 8b 78 0c mov 0xc(%eax),%edi tmp_handler = *handler; _Workspace_Free( handler ); 10afce: 83 ec 0c sub $0xc,%esp 10afd1: 50 push %eax 10afd2: e8 7d 39 00 00 call 10e954 <_Workspace_Free> _Thread_Enable_dispatch(); 10afd7: e8 80 27 00 00 call 10d75c <_Thread_Enable_dispatch> if ( execute ) 10afdc: 83 c4 10 add $0x10,%esp 10afdf: 85 db test %ebx,%ebx 10afe1: 75 09 jne 10afec (*tmp_handler.routine)( tmp_handler.arg ); } 10afe3: 8d 65 f4 lea -0xc(%ebp),%esp 10afe6: 5b pop %ebx 10afe7: 5e pop %esi 10afe8: 5f pop %edi 10afe9: c9 leave 10afea: c3 ret 10afeb: 90 nop <== NOT EXECUTED _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10afec: 89 7d 08 mov %edi,0x8(%ebp) 10afef: 89 f0 mov %esi,%eax } 10aff1: 8d 65 f4 lea -0xc(%ebp),%esp 10aff4: 5b pop %ebx 10aff5: 5e pop %esi 10aff6: 5f pop %edi 10aff7: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10aff8: ff e0 jmp *%eax 10affa: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10affc: e8 5b 27 00 00 call 10d75c <_Thread_Enable_dispatch> _ISR_Enable( level ); 10b001: 56 push %esi 10b002: 9d popf _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); } 10b003: 8d 65 f4 lea -0xc(%ebp),%esp 10b006: 5b pop %ebx 10b007: 5e pop %esi 10b008: 5f pop %edi 10b009: c9 leave 10b00a: c3 ret =============================================================================== 0010b340 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10b340: 55 push %ebp 10b341: 89 e5 mov %esp,%ebp 10b343: 56 push %esi 10b344: 53 push %ebx 10b345: 8b 5d 08 mov 0x8(%ebp),%ebx 10b348: 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 ) 10b34b: 85 db test %ebx,%ebx 10b34d: 74 4d je 10b39c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b34f: a1 14 8f 12 00 mov 0x128f14,%eax 10b354: 40 inc %eax 10b355: a3 14 8f 12 00 mov %eax,0x128f14 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10b35a: 83 ec 0c sub $0xc,%esp 10b35d: 6a 10 push $0x10 10b35f: e8 44 41 00 00 call 10f4a8 <_Workspace_Allocate> if ( handler ) { 10b364: 83 c4 10 add $0x10,%esp 10b367: 85 c0 test %eax,%eax 10b369: 74 25 je 10b390 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b36b: 8b 15 d8 94 12 00 mov 0x1294d8,%edx handler_stack = &thread_support->Cancellation_Handlers; 10b371: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 10b377: 81 c2 e4 00 00 00 add $0xe4,%edx handler->routine = routine; 10b37d: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10b380: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10b383: 83 ec 08 sub $0x8,%esp 10b386: 50 push %eax 10b387: 52 push %edx 10b388: e8 b3 17 00 00 call 10cb40 <_Chain_Append> 10b38d: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10b390: 8d 65 f8 lea -0x8(%ebp),%esp 10b393: 5b pop %ebx 10b394: 5e pop %esi 10b395: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10b396: e9 a1 2e 00 00 jmp 10e23c <_Thread_Enable_dispatch> 10b39b: 90 nop <== NOT EXECUTED } 10b39c: 8d 65 f8 lea -0x8(%ebp),%esp 10b39f: 5b pop %ebx 10b3a0: 5e pop %esi 10b3a1: c9 leave 10b3a2: c3 ret =============================================================================== 0010c034 : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10c034: 55 push %ebp 10c035: 89 e5 mov %esp,%ebp 10c037: 53 push %ebx 10c038: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c03b: 8d 45 f4 lea -0xc(%ebp),%eax 10c03e: 50 push %eax 10c03f: ff 75 08 pushl 0x8(%ebp) 10c042: e8 65 00 00 00 call 10c0ac <_POSIX_Condition_variables_Get> 10c047: 89 c3 mov %eax,%ebx switch ( location ) { 10c049: 83 c4 10 add $0x10,%esp 10c04c: 8b 4d f4 mov -0xc(%ebp),%ecx 10c04f: 85 c9 test %ecx,%ecx 10c051: 75 25 jne 10c078 case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10c053: 83 ec 0c sub $0xc,%esp 10c056: 8d 40 18 lea 0x18(%eax),%eax 10c059: 50 push %eax 10c05a: e8 bd 3b 00 00 call 10fc1c <_Thread_queue_First> 10c05f: 83 c4 10 add $0x10,%esp 10c062: 85 c0 test %eax,%eax 10c064: 74 1e je 10c084 _Thread_Enable_dispatch(); 10c066: e8 69 34 00 00 call 10f4d4 <_Thread_Enable_dispatch> return EBUSY; 10c06b: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c070: 8b 5d fc mov -0x4(%ebp),%ebx 10c073: c9 leave 10c074: c3 ret 10c075: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10c078: b8 16 00 00 00 mov $0x16,%eax } 10c07d: 8b 5d fc mov -0x4(%ebp),%ebx 10c080: c9 leave 10c081: c3 ret 10c082: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( 10c084: 83 ec 08 sub $0x8,%esp 10c087: 53 push %ebx 10c088: 68 60 a0 12 00 push $0x12a060 10c08d: e8 76 27 00 00 call 10e808 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10c092: 58 pop %eax 10c093: 5a pop %edx 10c094: 53 push %ebx 10c095: 68 60 a0 12 00 push $0x12a060 10c09a: e8 65 2a 00 00 call 10eb04 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10c09f: e8 30 34 00 00 call 10f4d4 <_Thread_Enable_dispatch> return 0; 10c0a4: 83 c4 10 add $0x10,%esp 10c0a7: 31 c0 xor %eax,%eax 10c0a9: eb d2 jmp 10c07d =============================================================================== 0010c100 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10c100: 55 push %ebp 10c101: 89 e5 mov %esp,%ebp 10c103: 53 push %ebx 10c104: 83 ec 14 sub $0x14,%esp 10c107: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c10a: 85 db test %ebx,%ebx 10c10c: 0f 84 86 00 00 00 je 10c198 else the_attr = &_POSIX_Condition_variables_Default_attributes; /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10c112: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10c116: 74 06 je 10c11e <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10c118: 8b 03 mov (%ebx),%eax 10c11a: 85 c0 test %eax,%eax 10c11c: 75 0a jne 10c128 return EINVAL; 10c11e: b8 16 00 00 00 mov $0x16,%eax *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 10c123: 8b 5d fc mov -0x4(%ebp),%ebx 10c126: c9 leave 10c127: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c128: a1 94 9b 12 00 mov 0x129b94,%eax 10c12d: 40 inc %eax 10c12e: a3 94 9b 12 00 mov %eax,0x129b94 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) _Objects_Allocate( &_POSIX_Condition_variables_Information ); 10c133: 83 ec 0c sub $0xc,%esp 10c136: 68 60 a0 12 00 push $0x12a060 10c13b: e8 4c 26 00 00 call 10e78c <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10c140: 83 c4 10 add $0x10,%esp 10c143: 85 c0 test %eax,%eax 10c145: 74 5d je 10c1a4 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 10c147: 8b 53 04 mov 0x4(%ebx),%edx 10c14a: 89 50 10 mov %edx,0x10(%eax) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c14d: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) _Thread_queue_Initialize( 10c154: 6a 74 push $0x74 10c156: 68 00 08 00 10 push $0x10000800 10c15b: 6a 00 push $0x0 10c15d: 8d 50 18 lea 0x18(%eax),%edx 10c160: 52 push %edx 10c161: 89 45 f4 mov %eax,-0xc(%ebp) 10c164: e8 2f 3b 00 00 call 10fc98 <_Thread_queue_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c169: 8b 45 f4 mov -0xc(%ebp),%eax 10c16c: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10c16f: 0f b7 da movzwl %dx,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c172: 8b 0d 7c a0 12 00 mov 0x12a07c,%ecx 10c178: 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; 10c17b: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10c182: 8b 45 08 mov 0x8(%ebp),%eax 10c185: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c187: e8 48 33 00 00 call 10f4d4 <_Thread_Enable_dispatch> return 0; 10c18c: 83 c4 10 add $0x10,%esp 10c18f: 31 c0 xor %eax,%eax } 10c191: 8b 5d fc mov -0x4(%ebp),%ebx 10c194: c9 leave 10c195: c3 ret 10c196: 66 90 xchg %ax,%ax <== NOT EXECUTED { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; else the_attr = &_POSIX_Condition_variables_Default_attributes; 10c198: bb 3c 32 12 00 mov $0x12323c,%ebx 10c19d: e9 70 ff ff ff jmp 10c112 10c1a2: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 10c1a4: e8 2b 33 00 00 call 10f4d4 <_Thread_Enable_dispatch> return ENOMEM; 10c1a9: b8 0c 00 00 00 mov $0xc,%eax 10c1ae: e9 70 ff ff ff jmp 10c123 =============================================================================== 0010c238 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 10c238: 55 push %ebp 10c239: 89 e5 mov %esp,%ebp 10c23b: 83 ec 20 sub $0x20,%esp * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ already_timedout = false; status = _POSIX_Absolute_timeout_to_ticks(abstime, &ticks); 10c23e: 8d 45 f4 lea -0xc(%ebp),%eax 10c241: 50 push %eax 10c242: ff 75 10 pushl 0x10(%ebp) 10c245: e8 8a 04 00 00 call 10c6d4 <_POSIX_Absolute_timeout_to_ticks> if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10c24a: 83 c4 10 add $0x10,%esp 10c24d: 85 c0 test %eax,%eax 10c24f: 74 1f je 10c270 return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10c251: 48 dec %eax status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) already_timedout = true; return _POSIX_Condition_variables_Wait_support( 10c252: 83 f8 01 cmp $0x1,%eax 10c255: 0f 96 c0 setbe %al 10c258: 0f b6 c0 movzbl %al,%eax 10c25b: 50 push %eax 10c25c: ff 75 f4 pushl -0xc(%ebp) 10c25f: ff 75 0c pushl 0xc(%ebp) 10c262: ff 75 08 pushl 0x8(%ebp) 10c265: e8 26 00 00 00 call 10c290 <_POSIX_Condition_variables_Wait_support> 10c26a: 83 c4 10 add $0x10,%esp cond, mutex, ticks, already_timedout ); } 10c26d: c9 leave 10c26e: c3 ret 10c26f: 90 nop <== NOT EXECUTED * status into the appropriate error. */ already_timedout = false; status = _POSIX_Absolute_timeout_to_ticks(abstime, &ticks); if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 10c270: b8 16 00 00 00 mov $0x16,%eax cond, mutex, ticks, already_timedout ); } 10c275: c9 leave 10c276: c3 ret =============================================================================== 0010bf90 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10bf90: 55 push %ebp 10bf91: 89 e5 mov %esp,%ebp 10bf93: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10bf96: 85 c0 test %eax,%eax 10bf98: 74 12 je 10bfac 10bf9a: 8b 10 mov (%eax),%edx 10bf9c: 85 d2 test %edx,%edx 10bf9e: 74 0c je 10bfac <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 10bfa0: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10bfa6: 31 c0 xor %eax,%eax } 10bfa8: c9 leave 10bfa9: c3 ret 10bfaa: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10bfac: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10bfb1: c9 leave 10bfb2: c3 ret =============================================================================== 0010bfb4 : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 10bfb4: 55 push %ebp 10bfb5: 89 e5 mov %esp,%ebp 10bfb7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10bfba: 85 c0 test %eax,%eax 10bfbc: 74 0e je 10bfcc return EINVAL; *pshared = attr->process_shared; 10bfbe: 8b 50 04 mov 0x4(%eax),%edx 10bfc1: 8b 45 0c mov 0xc(%ebp),%eax 10bfc4: 89 10 mov %edx,(%eax) return 0; 10bfc6: 31 c0 xor %eax,%eax } 10bfc8: c9 leave 10bfc9: c3 ret 10bfca: 66 90 xchg %ax,%ax <== NOT EXECUTED const pthread_condattr_t *attr, int *pshared ) { if ( !attr ) return EINVAL; 10bfcc: b8 16 00 00 00 mov $0x16,%eax *pshared = attr->process_shared; return 0; } 10bfd1: c9 leave 10bfd2: c3 ret =============================================================================== 0010bfd4 : */ int pthread_condattr_init( pthread_condattr_t *attr ) { 10bfd4: 55 push %ebp 10bfd5: 89 e5 mov %esp,%ebp 10bfd7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10bfda: 85 c0 test %eax,%eax 10bfdc: 74 16 je 10bff4 return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; 10bfde: 8b 15 3c 32 12 00 mov 0x12323c,%edx 10bfe4: 8b 0d 40 32 12 00 mov 0x123240,%ecx 10bfea: 89 10 mov %edx,(%eax) 10bfec: 89 48 04 mov %ecx,0x4(%eax) return 0; 10bfef: 31 c0 xor %eax,%eax } 10bff1: c9 leave 10bff2: c3 ret 10bff3: 90 nop <== NOT EXECUTED int pthread_condattr_init( pthread_condattr_t *attr ) { if ( !attr ) return EINVAL; 10bff4: b8 16 00 00 00 mov $0x16,%eax *attr = _POSIX_Condition_variables_Default_attributes; return 0; } 10bff9: c9 leave 10bffa: c3 ret =============================================================================== 0010bffc : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10bffc: 55 push %ebp 10bffd: 89 e5 mov %esp,%ebp 10bfff: 8b 45 08 mov 0x8(%ebp),%eax 10c002: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10c005: 85 c0 test %eax,%eax 10c007: 74 05 je 10c00e return EINVAL; switch ( pshared ) { 10c009: 83 fa 01 cmp $0x1,%edx 10c00c: 76 0a jbe 10c018 case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10c00e: b8 16 00 00 00 mov $0x16,%eax } } 10c013: c9 leave 10c014: c3 ret 10c015: 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; 10c018: 89 50 04 mov %edx,0x4(%eax) return 0; 10c01b: 31 c0 xor %eax,%eax default: return EINVAL; } } 10c01d: c9 leave 10c01e: c3 ret =============================================================================== 0010b6b8 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10b6b8: 55 push %ebp 10b6b9: 89 e5 mov %esp,%ebp 10b6bb: 57 push %edi 10b6bc: 56 push %esi 10b6bd: 53 push %ebx 10b6be: 83 ec 5c sub $0x5c,%esp 10b6c1: 8b 5d 0c mov 0xc(%ebp),%ebx int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b6c4: 8b 75 10 mov 0x10(%ebp),%esi 10b6c7: 85 f6 test %esi,%esi 10b6c9: 0f 84 8d 01 00 00 je 10b85c return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b6cf: 85 db test %ebx,%ebx 10b6d1: 74 65 je 10b738 if ( !the_attr->is_initialized ) 10b6d3: 8b 0b mov (%ebx),%ecx 10b6d5: 85 c9 test %ecx,%ecx 10b6d7: 74 1e je 10b6f7 * 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) ) 10b6d9: 8b 53 04 mov 0x4(%ebx),%edx 10b6dc: 85 d2 test %edx,%edx 10b6de: 74 0a je 10b6ea 10b6e0: a1 b8 44 12 00 mov 0x1244b8,%eax 10b6e5: 39 43 08 cmp %eax,0x8(%ebx) 10b6e8: 72 0d jb 10b6f7 * 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 ) { 10b6ea: 8b 43 10 mov 0x10(%ebx),%eax 10b6ed: 83 f8 01 cmp $0x1,%eax 10b6f0: 74 4e je 10b740 10b6f2: 83 f8 02 cmp $0x2,%eax 10b6f5: 74 11 je 10b708 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; 10b6f7: ba 16 00 00 00 mov $0x16,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10b6fc: 89 d0 mov %edx,%eax 10b6fe: 8d 65 f4 lea -0xc(%ebp),%esp 10b701: 5b pop %ebx 10b702: 5e pop %esi 10b703: 5f pop %edi 10b704: c9 leave 10b705: c3 ret 10b706: 66 90 xchg %ax,%ax <== NOT EXECUTED schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10b708: 8b 4b 14 mov 0x14(%ebx),%ecx 10b70b: 89 4d b0 mov %ecx,-0x50(%ebp) schedparam = the_attr->schedparam; 10b70e: 8d 45 c4 lea -0x3c(%ebp),%eax 10b711: 89 45 b4 mov %eax,-0x4c(%ebp) 10b714: 8d 73 18 lea 0x18(%ebx),%esi 10b717: b9 07 00 00 00 mov $0x7,%ecx 10b71c: 89 c7 mov %eax,%edi 10b71e: 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 ) 10b720: 8b 43 0c mov 0xc(%ebx),%eax 10b723: 85 c0 test %eax,%eax 10b725: 74 49 je 10b770 <== ALWAYS TAKEN return ENOTSUP; 10b727: ba 86 00 00 00 mov $0x86,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10b72c: 89 d0 mov %edx,%eax 10b72e: 8d 65 f4 lea -0xc(%ebp),%esp 10b731: 5b pop %ebx 10b732: 5e pop %esi 10b733: 5f pop %edi 10b734: c9 leave 10b735: c3 ret 10b736: 66 90 xchg %ax,%ax <== NOT EXECUTED int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b738: bb 20 1e 12 00 mov $0x121e20,%ebx 10b73d: eb 94 jmp 10b6d3 10b73f: 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 ]; 10b740: a1 18 8d 12 00 mov 0x128d18,%eax 10b745: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10b74b: 8b 8e 84 00 00 00 mov 0x84(%esi),%ecx 10b751: 89 4d b0 mov %ecx,-0x50(%ebp) schedparam = api->schedparam; 10b754: 8d 45 c4 lea -0x3c(%ebp),%eax 10b757: 89 45 b4 mov %eax,-0x4c(%ebp) 10b75a: 81 c6 88 00 00 00 add $0x88,%esi 10b760: b9 07 00 00 00 mov $0x7,%ecx 10b765: 89 c7 mov %eax,%edi 10b767: 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 ) 10b769: 8b 43 0c mov 0xc(%ebx),%eax 10b76c: 85 c0 test %eax,%eax 10b76e: 75 b7 jne 10b727 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10b770: 83 ec 0c sub $0xc,%esp 10b773: ff 75 c4 pushl -0x3c(%ebp) 10b776: e8 bd 61 00 00 call 111938 <_POSIX_Priority_Is_valid> 10b77b: 83 c4 10 add $0x10,%esp 10b77e: 84 c0 test %al,%al 10b780: 0f 84 71 ff ff ff je 10b6f7 <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10b786: 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); 10b789: 0f b6 35 bc 44 12 00 movzbl 0x1244bc,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10b790: 8d 45 e0 lea -0x20(%ebp),%eax 10b793: 50 push %eax 10b794: 8d 45 e4 lea -0x1c(%ebp),%eax 10b797: 50 push %eax 10b798: ff 75 b4 pushl -0x4c(%ebp) 10b79b: ff 75 b0 pushl -0x50(%ebp) 10b79e: e8 b1 61 00 00 call 111954 <_POSIX_Thread_Translate_sched_param> 10b7a3: 89 c2 mov %eax,%edx schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10b7a5: 83 c4 10 add $0x10,%esp 10b7a8: 85 c0 test %eax,%eax 10b7aa: 0f 85 4c ff ff ff jne 10b6fc #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b7b0: 83 ec 0c sub $0xc,%esp 10b7b3: ff 35 04 88 12 00 pushl 0x128804 10b7b9: 89 45 a0 mov %eax,-0x60(%ebp) 10b7bc: e8 a7 17 00 00 call 10cf68 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10b7c1: c7 04 24 00 8a 12 00 movl $0x128a00,(%esp) 10b7c8: e8 c7 21 00 00 call 10d994 <_Objects_Allocate> 10b7cd: 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 ) { 10b7d0: 83 c4 10 add $0x10,%esp 10b7d3: 85 c0 test %eax,%eax 10b7d5: 8b 55 a0 mov -0x60(%ebp),%edx 10b7d8: 0f 84 0f 01 00 00 je 10b8ed /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10b7de: 8b 4d e0 mov -0x20(%ebp),%ecx 10b7e1: 8b 45 e4 mov -0x1c(%ebp),%eax 10b7e4: 89 45 a4 mov %eax,-0x5c(%ebp) 10b7e7: 8b 43 08 mov 0x8(%ebx),%eax 10b7ea: 89 45 a8 mov %eax,-0x58(%ebp) 10b7ed: a1 b8 44 12 00 mov 0x1244b8,%eax 10b7f2: d1 e0 shl %eax 10b7f4: 3b 45 a8 cmp -0x58(%ebp),%eax 10b7f7: 73 03 jae 10b7fc 10b7f9: 8b 45 a8 mov -0x58(%ebp),%eax 10b7fc: 83 ec 04 sub $0x4,%esp 10b7ff: 6a 00 push $0x0 10b801: 6a 00 push $0x0 10b803: 51 push %ecx 10b804: ff 75 a4 pushl -0x5c(%ebp) 10b807: 6a 01 push $0x1 10b809: 81 e6 ff 00 00 00 and $0xff,%esi 10b80f: 29 fe sub %edi,%esi 10b811: 56 push %esi 10b812: 6a 01 push $0x1 10b814: 50 push %eax 10b815: ff 73 04 pushl 0x4(%ebx) 10b818: ff 75 ac pushl -0x54(%ebp) 10b81b: 68 00 8a 12 00 push $0x128a00 10b820: 89 55 a0 mov %edx,-0x60(%ebp) 10b823: e8 4c 2f 00 00 call 10e774 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10b828: 83 c4 30 add $0x30,%esp 10b82b: 84 c0 test %al,%al 10b82d: 8b 55 a0 mov -0x60(%ebp),%edx 10b830: 75 34 jne 10b866 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10b832: 83 ec 08 sub $0x8,%esp 10b835: ff 75 ac pushl -0x54(%ebp) 10b838: 68 00 8a 12 00 push $0x128a00 10b83d: e8 ca 24 00 00 call 10dd0c <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b842: 59 pop %ecx 10b843: ff 35 04 88 12 00 pushl 0x128804 10b849: e8 62 17 00 00 call 10cfb0 <_API_Mutex_Unlock> return EAGAIN; 10b84e: 83 c4 10 add $0x10,%esp 10b851: ba 0b 00 00 00 mov $0xb,%edx 10b856: e9 a1 fe ff ff jmp 10b6fc 10b85b: 90 nop <== NOT EXECUTED struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) return EFAULT; 10b85c: ba 0e 00 00 00 mov $0xe,%edx 10b861: e9 96 fe ff ff jmp 10b6fc } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b866: 8b 4d ac mov -0x54(%ebp),%ecx 10b869: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx 10b86f: 89 4d a8 mov %ecx,-0x58(%ebp) api->Attributes = *the_attr; 10b872: b9 10 00 00 00 mov $0x10,%ecx 10b877: 8b 7d a8 mov -0x58(%ebp),%edi 10b87a: 89 de mov %ebx,%esi 10b87c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10b87e: 8b 43 3c mov 0x3c(%ebx),%eax 10b881: 8b 4d a8 mov -0x58(%ebp),%ecx 10b884: 89 41 40 mov %eax,0x40(%ecx) api->schedpolicy = schedpolicy; 10b887: 8b 45 b0 mov -0x50(%ebp),%eax 10b88a: 89 81 84 00 00 00 mov %eax,0x84(%ecx) api->schedparam = schedparam; 10b890: 89 cf mov %ecx,%edi 10b892: 81 c7 88 00 00 00 add $0x88,%edi 10b898: b9 07 00 00 00 mov $0x7,%ecx 10b89d: 8b 75 b4 mov -0x4c(%ebp),%esi 10b8a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10b8a2: 83 ec 0c sub $0xc,%esp 10b8a5: 6a 00 push $0x0 10b8a7: ff 75 14 pushl 0x14(%ebp) 10b8aa: ff 75 10 pushl 0x10(%ebp) 10b8ad: 6a 01 push $0x1 10b8af: ff 75 ac pushl -0x54(%ebp) 10b8b2: 89 55 a0 mov %edx,-0x60(%ebp) 10b8b5: e8 52 39 00 00 call 10f20c <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10b8ba: 83 c4 20 add $0x20,%esp 10b8bd: 83 7d b0 04 cmpl $0x4,-0x50(%ebp) 10b8c1: 8b 55 a0 mov -0x60(%ebp),%edx 10b8c4: 74 42 je 10b908 } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10b8c6: 8b 45 ac mov -0x54(%ebp),%eax 10b8c9: 8b 48 08 mov 0x8(%eax),%ecx 10b8cc: 8b 45 08 mov 0x8(%ebp),%eax 10b8cf: 89 08 mov %ecx,(%eax) _RTEMS_Unlock_allocator(); 10b8d1: 83 ec 0c sub $0xc,%esp 10b8d4: ff 35 04 88 12 00 pushl 0x128804 10b8da: 89 55 a0 mov %edx,-0x60(%ebp) 10b8dd: e8 ce 16 00 00 call 10cfb0 <_API_Mutex_Unlock> return 0; 10b8e2: 83 c4 10 add $0x10,%esp 10b8e5: 8b 55 a0 mov -0x60(%ebp),%edx 10b8e8: e9 0f fe ff ff jmp 10b6fc * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b8ed: 83 ec 0c sub $0xc,%esp 10b8f0: ff 35 04 88 12 00 pushl 0x128804 10b8f6: e8 b5 16 00 00 call 10cfb0 <_API_Mutex_Unlock> return EAGAIN; 10b8fb: 83 c4 10 add $0x10,%esp 10b8fe: ba 0b 00 00 00 mov $0xb,%edx 10b903: e9 f4 fd ff ff jmp 10b6fc return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10b908: 83 ec 0c sub $0xc,%esp &api->Sporadic_timer, _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ) 10b90b: 8b 45 a8 mov -0x58(%ebp),%eax 10b90e: 05 90 00 00 00 add $0x90,%eax return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10b913: 50 push %eax 10b914: e8 e7 3a 00 00 call 10f400 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b919: 8b 4d a8 mov -0x58(%ebp),%ecx 10b91c: 89 81 b4 00 00 00 mov %eax,0xb4(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b922: 58 pop %eax 10b923: 5a pop %edx 10b924: 89 c8 mov %ecx,%eax 10b926: 05 a8 00 00 00 add $0xa8,%eax 10b92b: 50 push %eax 10b92c: 68 24 88 12 00 push $0x128824 10b931: e8 fa 3d 00 00 call 10f730 <_Watchdog_Insert> 10b936: 83 c4 10 add $0x10,%esp 10b939: 8b 55 a0 mov -0x60(%ebp),%edx 10b93c: eb 88 jmp 10b8c6 =============================================================================== 0010b7cc : #include int pthread_detach( pthread_t thread ) { 10b7cc: 55 push %ebp 10b7cd: 89 e5 mov %esp,%ebp 10b7cf: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); 10b7d2: 8d 45 f4 lea -0xc(%ebp),%eax pthread_t id, Objects_Locations *location ) { return (Thread_Control *) _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); 10b7d5: 50 push %eax 10b7d6: ff 75 08 pushl 0x8(%ebp) 10b7d9: 68 80 95 12 00 push $0x129580 10b7de: e8 55 23 00 00 call 10db38 <_Objects_Get> switch ( location ) { 10b7e3: 83 c4 10 add $0x10,%esp 10b7e6: 8b 55 f4 mov -0xc(%ebp),%edx 10b7e9: 85 d2 test %edx,%edx 10b7eb: 75 17 jne 10b804 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 10b7ed: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b7f3: c7 40 40 00 00 00 00 movl $0x0,0x40(%eax) _Thread_Enable_dispatch(); 10b7fa: e8 c9 2b 00 00 call 10e3c8 <_Thread_Enable_dispatch> return 0; 10b7ff: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b801: c9 leave 10b802: c3 ret 10b803: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return ESRCH; 10b804: b8 03 00 00 00 mov $0x3,%eax } 10b809: c9 leave 10b80a: c3 ret =============================================================================== 00112dfc : } void pthread_exit( void *value_ptr ) { 112dfc: 55 push %ebp 112dfd: 89 e5 mov %esp,%ebp 112dff: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 112e02: ff 75 08 pushl 0x8(%ebp) 112e05: ff 35 98 6a 12 00 pushl 0x126a98 112e0b: e8 88 ff ff ff call 112d98 <_POSIX_Thread_Exit> 112e10: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 112e13: c9 leave <== NOT EXECUTED 112e14: c3 ret <== NOT EXECUTED =============================================================================== 0010d8a0 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10d8a0: 55 push %ebp 10d8a1: 89 e5 mov %esp,%ebp 10d8a3: 57 push %edi 10d8a4: 56 push %esi 10d8a5: 53 push %ebx 10d8a6: 83 ec 1c sub $0x1c,%esp 10d8a9: 8b 7d 0c mov 0xc(%ebp),%edi 10d8ac: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10d8af: 85 ff test %edi,%edi 10d8b1: 74 69 je 10d91c <== NEVER TAKEN 10d8b3: 85 db test %ebx,%ebx 10d8b5: 74 65 je 10d91c <== NEVER TAKEN pthread_t id, Objects_Locations *location ) { return (Thread_Control *) _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); 10d8b7: 51 push %ecx return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); 10d8b8: 8d 45 e4 lea -0x1c(%ebp),%eax 10d8bb: 50 push %eax 10d8bc: ff 75 08 pushl 0x8(%ebp) 10d8bf: 68 40 c6 12 00 push $0x12c640 10d8c4: e8 ff 23 00 00 call 10fcc8 <_Objects_Get> switch ( location ) { 10d8c9: 83 c4 10 add $0x10,%esp 10d8cc: 8b 55 e4 mov -0x1c(%ebp),%edx 10d8cf: 85 d2 test %edx,%edx 10d8d1: 75 39 jne 10d90c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10d8d3: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10d8d9: 8b 96 84 00 00 00 mov 0x84(%esi),%edx 10d8df: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10d8e1: 81 c6 88 00 00 00 add $0x88,%esi 10d8e7: b9 07 00 00 00 mov $0x7,%ecx 10d8ec: 89 df mov %ebx,%edi 10d8ee: f3 a5 rep movsl %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d8f0: 0f b6 15 9c 80 12 00 movzbl 0x12809c,%edx 10d8f7: 2b 50 14 sub 0x14(%eax),%edx 10d8fa: 89 13 mov %edx,(%ebx) param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10d8fc: e8 57 2c 00 00 call 110558 <_Thread_Enable_dispatch> return 0; 10d901: 31 c0 xor %eax,%eax break; } return ESRCH; } 10d903: 8d 65 f4 lea -0xc(%ebp),%esp 10d906: 5b pop %ebx 10d907: 5e pop %esi 10d908: 5f pop %edi 10d909: c9 leave 10d90a: c3 ret 10d90b: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return ESRCH; 10d90c: b8 03 00 00 00 mov $0x3,%eax } 10d911: 8d 65 f4 lea -0xc(%ebp),%esp 10d914: 5b pop %ebx 10d915: 5e pop %esi 10d916: 5f pop %edi 10d917: c9 leave 10d918: c3 ret 10d919: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) return EINVAL; 10d91c: b8 16 00 00 00 mov $0x16,%eax break; } return ESRCH; } 10d921: 8d 65 f4 lea -0xc(%ebp),%esp 10d924: 5b pop %ebx 10d925: 5e pop %esi 10d926: 5f pop %edi 10d927: c9 leave 10d928: c3 ret =============================================================================== 0010b698 : */ void *pthread_getspecific( pthread_key_t key ) { 10b698: 55 push %ebp 10b699: 89 e5 mov %esp,%ebp 10b69b: 83 ec 2c sub $0x2c,%esp uint32_t api; uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); 10b69e: 8d 45 f4 lea -0xc(%ebp),%eax pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) _Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location ); 10b6a1: 50 push %eax 10b6a2: ff 75 08 pushl 0x8(%ebp) 10b6a5: 68 e0 97 12 00 push $0x1297e0 10b6aa: e8 9d 25 00 00 call 10dc4c <_Objects_Get> switch ( location ) { 10b6af: 83 c4 10 add $0x10,%esp 10b6b2: 8b 55 f4 mov -0xc(%ebp),%edx 10b6b5: 85 d2 test %edx,%edx 10b6b7: 75 2b jne 10b6e4 case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 10b6b9: 8b 15 18 99 12 00 mov 0x129918,%edx 10b6bf: 8b 4a 08 mov 0x8(%edx),%ecx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10b6c2: 89 ca mov %ecx,%edx 10b6c4: c1 ea 18 shr $0x18,%edx 10b6c7: 83 e2 07 and $0x7,%edx index = _Objects_Get_index( _Thread_Executing->Object.id ); 10b6ca: 0f b7 c9 movzwl %cx,%ecx key_data = (void *) the_key->Values[ api ][ index ]; 10b6cd: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax 10b6d1: 8b 04 88 mov (%eax,%ecx,4),%eax _Thread_Enable_dispatch(); 10b6d4: 89 45 e4 mov %eax,-0x1c(%ebp) 10b6d7: e8 00 2e 00 00 call 10e4dc <_Thread_Enable_dispatch> return key_data; 10b6dc: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return NULL; } 10b6df: c9 leave 10b6e0: c3 ret 10b6e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return NULL; 10b6e4: 31 c0 xor %eax,%eax } 10b6e6: c9 leave 10b6e7: c3 ret =============================================================================== 001110e4 : int pthread_join( pthread_t thread, void **value_ptr ) { 1110e4: 55 push %ebp 1110e5: 89 e5 mov %esp,%ebp 1110e7: 53 push %ebx 1110e8: 83 ec 18 sub $0x18,%esp 1110eb: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); 1110ee: 8d 45 f4 lea -0xc(%ebp),%eax 1110f1: 50 push %eax 1110f2: ff 75 08 pushl 0x8(%ebp) 1110f5: 68 00 21 13 00 push $0x132100 1110fa: e8 09 24 00 00 call 113508 <_Objects_Get> switch ( location ) { 1110ff: 83 c4 10 add $0x10,%esp 111102: 8b 55 f4 mov -0xc(%ebp),%edx 111105: 85 d2 test %edx,%edx 111107: 74 0b je 111114 #endif case OBJECTS_ERROR: break; } return ESRCH; 111109: b8 03 00 00 00 mov $0x3,%eax } 11110e: 8b 5d fc mov -0x4(%ebp),%ebx 111111: c9 leave 111112: c3 ret 111113: 90 nop <== NOT EXECUTED the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 111114: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 11111a: 8b 4a 40 mov 0x40(%edx),%ecx 11111d: 85 c9 test %ecx,%ecx 11111f: 74 43 je 111164 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 111121: 8b 0d 18 24 13 00 mov 0x132418,%ecx _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 111127: 39 c8 cmp %ecx,%eax 111129: 74 49 je 111174 /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 11112b: 8d 45 f0 lea -0x10(%ebp),%eax 11112e: 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; 111131: c7 42 74 01 00 00 00 movl $0x1,0x74(%edx) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 111138: 50 push %eax 111139: 68 d0 45 11 00 push $0x1145d0 11113e: 6a 00 push $0x0 111140: 83 c2 44 add $0x44,%edx 111143: 52 push %edx 111144: e8 37 31 00 00 call 114280 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 111149: e8 4a 2c 00 00 call 113d98 <_Thread_Enable_dispatch> if ( value_ptr ) 11114e: 83 c4 10 add $0x10,%esp 111151: 85 db test %ebx,%ebx 111153: 74 2b je 111180 *value_ptr = return_pointer; 111155: 8b 45 f0 mov -0x10(%ebp),%eax 111158: 89 03 mov %eax,(%ebx) return 0; 11115a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 11115c: 8b 5d fc mov -0x4(%ebp),%ebx 11115f: c9 leave 111160: c3 ret 111161: 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(); 111164: e8 2f 2c 00 00 call 113d98 <_Thread_Enable_dispatch> return EINVAL; 111169: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 11116e: 8b 5d fc mov -0x4(%ebp),%ebx 111171: c9 leave 111172: c3 ret 111173: 90 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); 111174: e8 1f 2c 00 00 call 113d98 <_Thread_Enable_dispatch> return EDEADLK; 111179: b8 2d 00 00 00 mov $0x2d,%eax 11117e: eb 8e jmp 11110e _Thread_Enable_dispatch(); if ( value_ptr ) *value_ptr = return_pointer; return 0; 111180: 31 c0 xor %eax,%eax 111182: eb 8a jmp 11110e =============================================================================== 0010b524 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 10b524: 55 push %ebp 10b525: 89 e5 mov %esp,%ebp 10b527: 57 push %edi 10b528: 56 push %esi 10b529: 53 push %ebx 10b52a: 83 ec 28 sub $0x28,%esp 10b52d: a1 54 93 12 00 mov 0x129354,%eax 10b532: 40 inc %eax 10b533: a3 54 93 12 00 mov %eax,0x129354 * 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 ); 10b538: 68 e0 97 12 00 push $0x1297e0 10b53d: e8 52 22 00 00 call 10d794 <_Objects_Allocate> 10b542: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 10b544: 83 c4 10 add $0x10,%esp 10b547: 85 c0 test %eax,%eax 10b549: 74 79 je 10b5c4 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 10b54b: 8b 45 0c mov 0xc(%ebp),%eax 10b54e: 89 46 10 mov %eax,0x10(%esi) * This is a bit more complex than one might initially expect because * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 10b551: bb 01 00 00 00 mov $0x1,%ebx the_key->Values[ the_api ] = NULL; 10b556: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4) 10b55d: 00 INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); 10b55e: 8b 04 9d 2c 93 12 00 mov 0x12932c(,%ebx,4),%eax 10b565: 8b 40 04 mov 0x4(%eax),%eax 10b568: 0f b7 40 10 movzwl 0x10(%eax),%eax true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 10b56c: 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 ); 10b573: 83 ec 0c sub $0xc,%esp 10b576: 51 push %ecx 10b577: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b57a: e8 41 42 00 00 call 10f7c0 <_Workspace_Allocate> if ( !table ) { 10b57f: 83 c4 10 add $0x10,%esp 10b582: 85 c0 test %eax,%eax 10b584: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b587: 74 4f je 10b5d8 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 10b589: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4) memset( table, '\0', bytes_to_allocate ); 10b58d: 89 c7 mov %eax,%edi 10b58f: 31 c0 xor %eax,%eax 10b591: f3 aa rep stos %al,%es:(%edi) * This is a bit more complex than one might initially expect because * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 10b593: 43 inc %ebx 10b594: 83 fb 04 cmp $0x4,%ebx 10b597: 75 bd jne 10b556 uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b599: 8b 46 08 mov 0x8(%esi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b59c: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b59f: 8b 15 fc 97 12 00 mov 0x1297fc,%edx 10b5a5: 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; 10b5a8: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 10b5af: 8b 55 08 mov 0x8(%ebp),%edx 10b5b2: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10b5b4: e8 23 2f 00 00 call 10e4dc <_Thread_Enable_dispatch> return 0; 10b5b9: 31 c0 xor %eax,%eax } 10b5bb: 8d 65 f4 lea -0xc(%ebp),%esp 10b5be: 5b pop %ebx 10b5bf: 5e pop %esi 10b5c0: 5f pop %edi 10b5c1: c9 leave 10b5c2: c3 ret 10b5c3: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 10b5c4: e8 13 2f 00 00 call 10e4dc <_Thread_Enable_dispatch> return EAGAIN; 10b5c9: b8 0b 00 00 00 mov $0xb,%eax _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10b5ce: 8d 65 f4 lea -0xc(%ebp),%esp 10b5d1: 5b pop %ebx 10b5d2: 5e pop %esi 10b5d3: 5f pop %edi 10b5d4: c9 leave 10b5d5: c3 ret 10b5d6: 66 90 xchg %ax,%ax <== NOT EXECUTED bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { _POSIX_Keys_Free_memory( the_key ); 10b5d8: 83 ec 0c sub $0xc,%esp 10b5db: 56 push %esi 10b5dc: e8 87 00 00 00 call 10b668 <_POSIX_Keys_Free_memory> */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10b5e1: 58 pop %eax 10b5e2: 5a pop %edx 10b5e3: 56 push %esi 10b5e4: 68 e0 97 12 00 push $0x1297e0 10b5e9: e8 1e 25 00 00 call 10db0c <_Objects_Free> _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10b5ee: e8 e9 2e 00 00 call 10e4dc <_Thread_Enable_dispatch> return ENOMEM; 10b5f3: 83 c4 10 add $0x10,%esp 10b5f6: b8 0c 00 00 00 mov $0xc,%eax _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10b5fb: 8d 65 f4 lea -0xc(%ebp),%esp 10b5fe: 5b pop %ebx 10b5ff: 5e pop %esi 10b600: 5f pop %edi 10b601: c9 leave 10b602: c3 ret =============================================================================== 0010b604 : * 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */ int pthread_key_delete( pthread_key_t key ) { 10b604: 55 push %ebp 10b605: 89 e5 mov %esp,%ebp 10b607: 53 push %ebx 10b608: 83 ec 18 sub $0x18,%esp POSIX_Keys_Control *the_key; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); 10b60b: 8d 45 f4 lea -0xc(%ebp),%eax pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) _Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location ); 10b60e: 50 push %eax 10b60f: ff 75 08 pushl 0x8(%ebp) 10b612: 68 e0 97 12 00 push $0x1297e0 10b617: e8 30 26 00 00 call 10dc4c <_Objects_Get> 10b61c: 89 c3 mov %eax,%ebx switch ( location ) { 10b61e: 83 c4 10 add $0x10,%esp 10b621: 8b 4d f4 mov -0xc(%ebp),%ecx 10b624: 85 c9 test %ecx,%ecx 10b626: 75 34 jne 10b65c case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 10b628: 83 ec 08 sub $0x8,%esp 10b62b: 50 push %eax 10b62c: 68 e0 97 12 00 push $0x1297e0 10b631: e8 da 21 00 00 call 10d810 <_Objects_Close> _POSIX_Keys_Free_memory( the_key ); 10b636: 89 1c 24 mov %ebx,(%esp) 10b639: e8 2a 00 00 00 call 10b668 <_POSIX_Keys_Free_memory> */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10b63e: 58 pop %eax 10b63f: 5a pop %edx 10b640: 53 push %ebx 10b641: 68 e0 97 12 00 push $0x1297e0 10b646: e8 c1 24 00 00 call 10db0c <_Objects_Free> /* * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10b64b: e8 8c 2e 00 00 call 10e4dc <_Thread_Enable_dispatch> return 0; 10b650: 83 c4 10 add $0x10,%esp 10b653: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b655: 8b 5d fc mov -0x4(%ebp),%ebx 10b658: c9 leave 10b659: c3 ret 10b65a: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10b65c: b8 16 00 00 00 mov $0x16,%eax } 10b661: 8b 5d fc mov -0x4(%ebp),%ebx 10b664: c9 leave 10b665: c3 ret =============================================================================== 001244a4 : int pthread_kill( pthread_t thread, int sig ) { 1244a4: 55 push %ebp 1244a5: 89 e5 mov %esp,%ebp 1244a7: 57 push %edi 1244a8: 56 push %esi 1244a9: 53 push %ebx 1244aa: 83 ec 1c sub $0x1c,%esp 1244ad: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 1244b0: 85 db test %ebx,%ebx 1244b2: 0f 84 84 00 00 00 je 12453c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1244b8: 8d 7b ff lea -0x1(%ebx),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1244bb: 83 ff 1f cmp $0x1f,%edi 1244be: 77 7c ja 12453c pthread_t id, Objects_Locations *location ) { return (Thread_Control *) _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); 1244c0: 56 push %esi rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); 1244c1: 8d 45 e4 lea -0x1c(%ebp),%eax 1244c4: 50 push %eax 1244c5: ff 75 08 pushl 0x8(%ebp) 1244c8: 68 40 e4 12 00 push $0x12e440 1244cd: e8 a6 d9 fe ff call 111e78 <_Objects_Get> 1244d2: 89 c6 mov %eax,%esi switch ( location ) { 1244d4: 83 c4 10 add $0x10,%esp 1244d7: 8b 4d e4 mov -0x1c(%ebp),%ecx 1244da: 85 c9 test %ecx,%ecx 1244dc: 75 72 jne 124550 case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1244de: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1244e4: 8d 04 5b lea (%ebx,%ebx,2),%eax 1244e7: 83 3c 85 88 e7 12 00 cmpl $0x1,0x12e788(,%eax,4) 1244ee: 01 1244ef: 74 2d je 12451e static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1244f1: b8 01 00 00 00 mov $0x1,%eax 1244f6: 89 f9 mov %edi,%ecx 1244f8: d3 e0 shl %cl,%eax return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 1244fa: 09 82 d4 00 00 00 or %eax,0xd4(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 124500: 52 push %edx 124501: 6a 00 push $0x0 124503: 53 push %ebx 124504: 56 push %esi 124505: e8 7a fe ff ff call 124384 <_POSIX_signals_Unblock_thread> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 12450a: 83 c4 10 add $0x10,%esp 12450d: a1 54 e7 12 00 mov 0x12e754,%eax 124512: 85 c0 test %eax,%eax 124514: 74 08 je 12451e 124516: 3b 35 58 e7 12 00 cmp 0x12e758,%esi 12451c: 74 12 je 124530 _Thread_Dispatch_necessary = true; } _Thread_Enable_dispatch(); 12451e: e8 65 e2 fe ff call 112788 <_Thread_Enable_dispatch> return 0; 124523: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 124525: 8d 65 f4 lea -0xc(%ebp),%esp 124528: 5b pop %ebx 124529: 5e pop %esi 12452a: 5f pop %edi 12452b: c9 leave 12452c: c3 ret 12452d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED api->signals_pending |= signo_to_mask( sig ); (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 124530: c6 05 64 e7 12 00 01 movb $0x1,0x12e764 124537: eb e5 jmp 12451e 124539: 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 ); 12453c: e8 df 3e ff ff call 118420 <__errno> 124541: c7 00 16 00 00 00 movl $0x16,(%eax) 124547: b8 ff ff ff ff mov $0xffffffff,%eax 12454c: eb d7 jmp 124525 12454e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 124550: e8 cb 3e ff ff call 118420 <__errno> 124555: c7 00 03 00 00 00 movl $0x3,(%eax) 12455b: b8 ff ff ff ff mov $0xffffffff,%eax 124560: eb c3 jmp 124525 =============================================================================== 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 66 00 00 00 call 10d0c4 <_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 #endif case OBJECTS_ERROR: break; } return EINVAL; 10d068: b8 16 00 00 00 mov $0x16,%eax } 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 dc 34 00 00 call 110558 <_Thread_Enable_dispatch> return EBUSY; 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 80 c7 12 00 push $0x12c780 10d08d: 89 45 e4 mov %eax,-0x1c(%ebp) 10d090: e8 f7 27 00 00 call 10f88c <_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 e0 1e 00 00 call 10ef88 <_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 80 c7 12 00 push $0x12c780 10d0b3: e8 d0 2a 00 00 call 10fb88 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 10d0b8: e8 9b 34 00 00 call 110558 <_Thread_Enable_dispatch> return 0; 10d0bd: 83 c4 10 add $0x10,%esp 10d0c0: 31 c0 xor %eax,%eax 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 3b ff ff ff call 10d0c4 <_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 #endif case OBJECTS_ERROR: break; } return EINVAL; 10d193: b8 16 00 00 00 mov $0x16,%eax } 10d198: 8b 5d fc mov -0x4(%ebp),%ebx 10d19b: c9 leave 10d19c: c3 ret 10d19d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d1a0: 0f b6 15 9c 80 12 00 movzbl 0x12809c,%edx 10d1a7: 2b 50 60 sub 0x60(%eax),%edx 10d1aa: 89 13 mov %edx,(%ebx) case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10d1ac: e8 a7 33 00 00 call 110558 <_Thread_Enable_dispatch> return 0; 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 eb 00 00 00 je 10d2ec 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 case PTHREAD_PRIO_NONE: the_discipline = CORE_MUTEX_DISCIPLINES_FIFO; 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 58 03 00 00 call 10d57c <_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 94 c3 12 00 mov 0x12c394,%eax 10d23e: 40 inc %eax 10d23f: a3 94 c3 12 00 mov %eax,0x12c394 * _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 80 c7 12 00 push $0x12c780 10d24c: e8 bf 25 00 00 call 10f810 <_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 9a 00 00 00 je 10d2f8 _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; 10d264: 8d 57 54 lea 0x54(%edi),%edx if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10d267: 31 c0 xor %eax,%eax 10d269: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10d26d: 0f 94 c0 sete %al 10d270: 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; 10d273: c6 47 58 01 movb $0x1,0x58(%edi) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d277: 0f b6 05 9c 80 12 00 movzbl 0x12809c,%eax 10d27e: 2b 43 08 sub 0x8(%ebx),%eax 10d281: 89 47 60 mov %eax,0x60(%edi) the_mutex_attr->priority_ceiling = _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10d284: 8b 45 e4 mov -0x1c(%ebp),%eax 10d287: 89 47 5c mov %eax,0x5c(%edi) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10d28a: 50 push %eax 10d28b: 6a 01 push $0x1 10d28d: 52 push %edx 10d28e: 8d 47 14 lea 0x14(%edi),%eax 10d291: 50 push %eax 10d292: e8 fd 1c 00 00 call 10ef94 <_CORE_mutex_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10d297: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10d29a: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d29d: 8b 15 9c c7 12 00 mov 0x12c79c,%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 a4 32 00 00 call 110558 <_Thread_Enable_dispatch> return 0; 10d2b4: 83 c4 10 add $0x10,%esp 10d2b7: 31 c0 xor %eax,%eax 10d2b9: eb 06 jmp 10d2c1 10d2bb: 90 nop <== NOT EXECUTED case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: break; default: return EINVAL; 10d2bc: b8 16 00 00 00 mov $0x16,%eax *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 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 break; case PTHREAD_PRIO_INHERIT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; break; case PTHREAD_PRIO_PROTECT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10d2cc: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) break; 10d2d3: e9 41 ff ff ff jmp 10d219 CORE_mutex_Attributes *the_mutex_attr; const pthread_mutexattr_t *the_attr; CORE_mutex_Disciplines the_discipline; if ( attr ) the_attr = attr; else the_attr = &_POSIX_Mutex_Default_attributes; 10d2d8: bb 00 c8 12 00 mov $0x12c800,%ebx 10d2dd: e9 ed fe ff ff jmp 10d1cf 10d2e2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return ENOSYS; 10d2e4: b8 58 00 00 00 mov $0x58,%eax 10d2e9: eb d6 jmp 10d2c1 10d2eb: 90 nop <== NOT EXECUTED switch ( the_attr->protocol ) { case PTHREAD_PRIO_NONE: the_discipline = CORE_MUTEX_DISCIPLINES_FIFO; break; case PTHREAD_PRIO_INHERIT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10d2ec: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 10d2f3: e9 21 ff ff ff jmp 10d219 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 10d2f8: e8 5b 32 00 00 call 110558 <_Thread_Enable_dispatch> return EAGAIN; 10d2fd: b8 0b 00 00 00 mov $0xb,%eax 10d302: eb bd jmp 10d2c1 =============================================================================== 0010d37c : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10d37c: 55 push %ebp 10d37d: 89 e5 mov %esp,%ebp 10d37f: 57 push %edi 10d380: 56 push %esi 10d381: 53 push %ebx 10d382: 83 ec 2c sub $0x2c,%esp 10d385: 8b 7d 08 mov 0x8(%ebp),%edi 10d388: 8b 75 0c mov 0xc(%ebp),%esi 10d38b: 8b 5d 10 mov 0x10(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 10d38e: 85 db test %ebx,%ebx 10d390: 74 10 je 10d3a2 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10d392: 83 ec 0c sub $0xc,%esp 10d395: 56 push %esi 10d396: e8 e1 01 00 00 call 10d57c <_POSIX_Priority_Is_valid> 10d39b: 83 c4 10 add $0x10,%esp 10d39e: 84 c0 test %al,%al 10d3a0: 75 0e jne 10d3b0 #endif case OBJECTS_ERROR: break; } return EINVAL; 10d3a2: b8 16 00 00 00 mov $0x16,%eax } 10d3a7: 8d 65 f4 lea -0xc(%ebp),%esp 10d3aa: 5b pop %ebx 10d3ab: 5e pop %esi 10d3ac: 5f pop %edi 10d3ad: c9 leave 10d3ae: c3 ret 10d3af: 90 nop <== NOT EXECUTED 10d3b0: a0 9c 80 12 00 mov 0x12809c,%al 10d3b5: 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 ); 10d3b8: 83 ec 0c sub $0xc,%esp 10d3bb: 57 push %edi 10d3bc: e8 43 ff ff ff call 10d304 * 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 ); 10d3c1: 58 pop %eax 10d3c2: 5a pop %edx 10d3c3: 8d 45 e4 lea -0x1c(%ebp),%eax 10d3c6: 50 push %eax 10d3c7: 57 push %edi 10d3c8: e8 f7 fc ff ff call 10d0c4 <_POSIX_Mutex_Get> switch ( location ) { 10d3cd: 83 c4 10 add $0x10,%esp 10d3d0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d3d3: 85 c9 test %ecx,%ecx 10d3d5: 75 cb jne 10d3a2 RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d3d7: 0f b6 15 9c 80 12 00 movzbl 0x12809c,%edx 10d3de: 2b 50 60 sub 0x60(%eax),%edx 10d3e1: 89 13 mov %edx,(%ebx) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d3e3: 0f b6 55 d7 movzbl -0x29(%ebp),%edx 10d3e7: 29 f2 sub %esi,%edx 10d3e9: 89 50 60 mov %edx,0x60(%eax) ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; /* * We are required to unlock the mutex before we return. */ _CORE_mutex_Surrender( 10d3ec: 52 push %edx 10d3ed: 6a 00 push $0x0 10d3ef: ff 70 08 pushl 0x8(%eax) 10d3f2: 83 c0 14 add $0x14,%eax 10d3f5: 50 push %eax 10d3f6: e8 31 1d 00 00 call 10f12c <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d3fb: e8 58 31 00 00 call 110558 <_Thread_Enable_dispatch> return 0; 10d400: 83 c4 10 add $0x10,%esp 10d403: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d405: 8d 65 f4 lea -0xc(%ebp),%esp 10d408: 5b pop %ebx 10d409: 5e pop %esi 10d40a: 5f pop %edi 10d40b: c9 leave 10d40c: c3 ret =============================================================================== 0010d410 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10d410: 55 push %ebp 10d411: 89 e5 mov %esp,%ebp 10d413: 56 push %esi 10d414: 53 push %ebx 10d415: 83 ec 18 sub $0x18,%esp 10d418: 8b 75 08 mov 0x8(%ebp),%esi * * 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 ); 10d41b: 8d 45 f4 lea -0xc(%ebp),%eax 10d41e: 50 push %eax 10d41f: ff 75 0c pushl 0xc(%ebp) 10d422: e8 cd 00 00 00 call 10d4f4 <_POSIX_Absolute_timeout_to_ticks> 10d427: 89 c3 mov %eax,%ebx if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10d429: 83 c4 10 add $0x10,%esp 10d42c: 83 f8 03 cmp $0x3,%eax 10d42f: 74 2f je 10d460 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10d431: 50 push %eax 10d432: ff 75 f4 pushl -0xc(%ebp) 10d435: 6a 00 push $0x0 10d437: 56 push %esi 10d438: e8 db fe ff ff call 10d318 <_POSIX_Mutex_Lock_support> * This service only gives us the option to block. We used a polling * attempt to lock if the abstime was not in the future. If we did * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { 10d43d: 83 c4 10 add $0x10,%esp 10d440: 83 f8 10 cmp $0x10,%eax 10d443: 74 07 je 10d44c <== ALWAYS TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 10d445: 8d 65 f8 lea -0x8(%ebp),%esp 10d448: 5b pop %ebx 10d449: 5e pop %esi 10d44a: c9 leave 10d44b: c3 ret * attempt to lock if the abstime was not in the future. If we did * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10d44c: 85 db test %ebx,%ebx 10d44e: 74 28 je 10d478 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10d450: 4b dec %ebx 10d451: 83 fb 01 cmp $0x1,%ebx 10d454: 77 ef ja 10d445 <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10d456: b8 74 00 00 00 mov $0x74,%eax 10d45b: eb e8 jmp 10d445 10d45d: 8d 76 00 lea 0x0(%esi),%esi <== 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 ); 10d460: 52 push %edx 10d461: ff 75 f4 pushl -0xc(%ebp) 10d464: 6a 01 push $0x1 10d466: 56 push %esi 10d467: e8 ac fe ff ff call 10d318 <_POSIX_Mutex_Lock_support> 10d46c: 83 c4 10 add $0x10,%esp status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 10d46f: 8d 65 f8 lea -0x8(%ebp),%esp 10d472: 5b pop %ebx 10d473: 5e pop %esi 10d474: c9 leave 10d475: c3 ret 10d476: 66 90 xchg %ax,%ax <== NOT EXECUTED * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 10d478: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED 10d47d: eb c6 jmp 10d445 <== NOT EXECUTED =============================================================================== 0010d4a4 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 10d4a4: 55 push %ebp 10d4a5: 89 e5 mov %esp,%ebp 10d4a7: 53 push %ebx 10d4a8: 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 ); 10d4ab: 8d 45 f4 lea -0xc(%ebp),%eax 10d4ae: 50 push %eax 10d4af: ff 75 08 pushl 0x8(%ebp) 10d4b2: e8 0d fc ff ff call 10d0c4 <_POSIX_Mutex_Get> switch ( location ) { 10d4b7: 83 c4 10 add $0x10,%esp 10d4ba: 8b 4d f4 mov -0xc(%ebp),%ecx 10d4bd: 85 c9 test %ecx,%ecx 10d4bf: 75 27 jne 10d4e8 case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 10d4c1: 52 push %edx 10d4c2: 6a 00 push $0x0 10d4c4: ff 70 08 pushl 0x8(%eax) 10d4c7: 83 c0 14 add $0x14,%eax 10d4ca: 50 push %eax 10d4cb: e8 5c 1c 00 00 call 10f12c <_CORE_mutex_Surrender> 10d4d0: 89 c3 mov %eax,%ebx &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d4d2: e8 81 30 00 00 call 110558 <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 10d4d7: 89 1c 24 mov %ebx,(%esp) 10d4da: e8 a1 ff ff ff call 10d480 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d4df: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d4e2: 8b 5d fc mov -0x4(%ebp),%ebx 10d4e5: c9 leave 10d4e6: c3 ret 10d4e7: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10d4e8: b8 16 00 00 00 mov $0x16,%eax } 10d4ed: 8b 5d fc mov -0x4(%ebp),%ebx 10d4f0: c9 leave 10d4f1: c3 ret =============================================================================== 0010cef4 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10cef4: 55 push %ebp 10cef5: 89 e5 mov %esp,%ebp 10cef7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10cefa: 85 c0 test %eax,%eax 10cefc: 74 12 je 10cf10 10cefe: 8b 10 mov (%eax),%edx 10cf00: 85 d2 test %edx,%edx 10cf02: 74 0c je 10cf10 return EINVAL; attr->is_initialized = false; 10cf04: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10cf0a: 31 c0 xor %eax,%eax } 10cf0c: c9 leave 10cf0d: c3 ret 10cf0e: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 10cf10: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10cf15: c9 leave 10cf16: 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 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; 10cfd1: b8 16 00 00 00 mov $0x16,%eax attr->prio_ceiling = prioceiling; return 0; } 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 93 05 00 00 call 10d57c <_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) return 0; 10cff3: 31 c0 xor %eax,%eax } 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_PROTECT: attr->protocol = protocol; return 0; default: return EINVAL; 10d014: b8 16 00 00 00 mov $0x16,%eax } } 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) return 0; 10d01f: 31 c0 xor %eax,%eax 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 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10d03c: b8 16 00 00 00 mov $0x16,%eax } } 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) return 0; 10d047: 31 c0 xor %eax,%eax default: return EINVAL; } } 10d049: c9 leave 10d04a: c3 ret =============================================================================== 0010b208 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10b208: 55 push %ebp 10b209: 89 e5 mov %esp,%ebp 10b20b: 8b 45 08 mov 0x8(%ebp),%eax 10b20e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b211: 85 c0 test %eax,%eax 10b213: 74 0b je 10b220 10b215: 8b 08 mov (%eax),%ecx 10b217: 85 c9 test %ecx,%ecx 10b219: 74 05 je 10b220 <== NEVER TAKEN return EINVAL; switch ( type ) { 10b21b: 83 fa 03 cmp $0x3,%edx 10b21e: 76 08 jbe 10b228 case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; default: return EINVAL; 10b220: b8 16 00 00 00 mov $0x16,%eax } } 10b225: c9 leave 10b226: c3 ret 10b227: 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; 10b228: 89 50 10 mov %edx,0x10(%eax) return 0; 10b22b: 31 c0 xor %eax,%eax default: return EINVAL; } } 10b22d: c9 leave 10b22e: c3 ret =============================================================================== 0010bd7c : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10bd7c: 55 push %ebp 10bd7d: 89 e5 mov %esp,%ebp 10bd7f: 57 push %edi 10bd80: 56 push %esi 10bd81: 53 push %ebx 10bd82: 83 ec 1c sub $0x1c,%esp 10bd85: 8b 5d 08 mov 0x8(%ebp),%ebx 10bd88: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10bd8b: 85 db test %ebx,%ebx 10bd8d: 74 51 je 10bde0 10bd8f: 85 f6 test %esi,%esi 10bd91: 74 4d je 10bde0 return EINVAL; if ( !once_control->init_executed ) { 10bd93: 8b 7b 04 mov 0x4(%ebx),%edi 10bd96: 85 ff test %edi,%edi 10bd98: 74 0a je 10bda4 once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; 10bd9a: 31 c0 xor %eax,%eax } 10bd9c: 8d 65 f4 lea -0xc(%ebp),%esp 10bd9f: 5b pop %ebx 10bda0: 5e pop %esi 10bda1: 5f pop %edi 10bda2: c9 leave 10bda3: 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); 10bda4: 51 push %ecx 10bda5: 8d 7d e4 lea -0x1c(%ebp),%edi 10bda8: 57 push %edi 10bda9: 68 00 01 00 00 push $0x100 10bdae: 68 00 01 00 00 push $0x100 10bdb3: e8 ec 0b 00 00 call 10c9a4 if ( !once_control->init_executed ) { 10bdb8: 83 c4 10 add $0x10,%esp 10bdbb: 8b 53 04 mov 0x4(%ebx),%edx 10bdbe: 85 d2 test %edx,%edx 10bdc0: 74 2e je 10bdf0 <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10bdc2: 50 push %eax 10bdc3: 57 push %edi 10bdc4: 68 00 01 00 00 push $0x100 10bdc9: ff 75 e4 pushl -0x1c(%ebp) 10bdcc: e8 d3 0b 00 00 call 10c9a4 10bdd1: 83 c4 10 add $0x10,%esp } return 0; 10bdd4: 31 c0 xor %eax,%eax } 10bdd6: 8d 65 f4 lea -0xc(%ebp),%esp 10bdd9: 5b pop %ebx 10bdda: 5e pop %esi 10bddb: 5f pop %edi 10bddc: c9 leave 10bddd: c3 ret 10bdde: 66 90 xchg %ax,%ax <== NOT EXECUTED pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) return EINVAL; 10bde0: b8 16 00 00 00 mov $0x16,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10bde5: 8d 65 f4 lea -0xc(%ebp),%esp 10bde8: 5b pop %ebx 10bde9: 5e pop %esi 10bdea: 5f pop %edi 10bdeb: c9 leave 10bdec: c3 ret 10bded: 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; 10bdf0: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10bdf6: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10bdfd: ff d6 call *%esi 10bdff: eb c1 jmp 10bdc2 =============================================================================== 0010c2a0 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10c2a0: 55 push %ebp 10c2a1: 89 e5 mov %esp,%ebp 10c2a3: 53 push %ebx 10c2a4: 83 ec 14 sub $0x14,%esp 10c2a7: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10c2aa: 85 c0 test %eax,%eax 10c2ac: 74 42 je 10c2f0 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c2ae: 53 push %ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c2af: 8d 55 f4 lea -0xc(%ebp),%edx 10c2b2: 52 push %edx 10c2b3: ff 30 pushl (%eax) 10c2b5: 68 40 a3 12 00 push $0x12a340 10c2ba: e8 d9 2b 00 00 call 10ee98 <_Objects_Get> 10c2bf: 89 c3 mov %eax,%ebx switch ( location ) { 10c2c1: 83 c4 10 add $0x10,%esp 10c2c4: 8b 4d f4 mov -0xc(%ebp),%ecx 10c2c7: 85 c9 test %ecx,%ecx 10c2c9: 75 25 jne 10c2f0 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 ) { 10c2cb: 83 ec 0c sub $0xc,%esp 10c2ce: 8d 40 10 lea 0x10(%eax),%eax 10c2d1: 50 push %eax 10c2d2: e8 81 3c 00 00 call 10ff58 <_Thread_queue_First> 10c2d7: 83 c4 10 add $0x10,%esp 10c2da: 85 c0 test %eax,%eax 10c2dc: 74 1e je 10c2fc _Thread_Enable_dispatch(); 10c2de: e8 45 34 00 00 call 10f728 <_Thread_Enable_dispatch> return EBUSY; 10c2e3: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c2e8: 8b 5d fc mov -0x4(%ebp),%ebx 10c2eb: c9 leave 10c2ec: c3 ret 10c2ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10c2f0: b8 16 00 00 00 mov $0x16,%eax } 10c2f5: 8b 5d fc mov -0x4(%ebp),%ebx 10c2f8: c9 leave 10c2f9: c3 ret 10c2fa: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10c2fc: 83 ec 08 sub $0x8,%esp 10c2ff: 53 push %ebx 10c300: 68 40 a3 12 00 push $0x12a340 10c305: e8 52 27 00 00 call 10ea5c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10c30a: 58 pop %eax 10c30b: 5a pop %edx 10c30c: 53 push %ebx 10c30d: 68 40 a3 12 00 push $0x12a340 10c312: e8 41 2a 00 00 call 10ed58 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10c317: e8 0c 34 00 00 call 10f728 <_Thread_Enable_dispatch> return 0; 10c31c: 83 c4 10 add $0x10,%esp 10c31f: 31 c0 xor %eax,%eax 10c321: eb d2 jmp 10c2f5 =============================================================================== 0010c324 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10c324: 55 push %ebp 10c325: 89 e5 mov %esp,%ebp 10c327: 56 push %esi 10c328: 53 push %ebx 10c329: 83 ec 20 sub $0x20,%esp 10c32c: 8b 5d 08 mov 0x8(%ebp),%ebx 10c32f: 8b 75 0c mov 0xc(%ebp),%esi const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10c332: 85 db test %ebx,%ebx 10c334: 74 15 je 10c34b return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10c336: 85 f6 test %esi,%esi 10c338: 0f 84 8e 00 00 00 je 10c3cc } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10c33e: 8b 16 mov (%esi),%edx 10c340: 85 d2 test %edx,%edx 10c342: 74 07 je 10c34b <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10c344: 8b 46 04 mov 0x4(%esi),%eax 10c347: 85 c0 test %eax,%eax 10c349: 74 0d je 10c358 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 10c34b: b8 16 00 00 00 mov $0x16,%eax *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 10c350: 8d 65 f8 lea -0x8(%ebp),%esp 10c353: 5b pop %ebx 10c354: 5e pop %esi 10c355: c9 leave 10c356: c3 ret 10c357: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes( CORE_RWLock_Attributes *the_attributes ) { the_attributes->XXX = 0; 10c358: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c35f: a1 d4 a0 12 00 mov 0x12a0d4,%eax 10c364: 40 inc %eax 10c365: a3 d4 a0 12 00 mov %eax,0x12a0d4 * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) _Objects_Allocate( &_POSIX_RWLock_Information ); 10c36a: 83 ec 0c sub $0xc,%esp 10c36d: 68 40 a3 12 00 push $0x12a340 10c372: e8 69 26 00 00 call 10e9e0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10c377: 83 c4 10 add $0x10,%esp 10c37a: 85 c0 test %eax,%eax 10c37c: 74 42 je 10c3c0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10c37e: 83 ec 08 sub $0x8,%esp 10c381: 8d 55 f4 lea -0xc(%ebp),%edx 10c384: 52 push %edx 10c385: 8d 50 10 lea 0x10(%eax),%edx 10c388: 52 push %edx 10c389: 89 45 e4 mov %eax,-0x1c(%ebp) 10c38c: e8 2f 1e 00 00 call 10e1c0 <_CORE_RWLock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c391: 8b 45 e4 mov -0x1c(%ebp),%eax 10c394: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10c397: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c39a: 8b 0d 5c a3 12 00 mov 0x12a35c,%ecx 10c3a0: 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; 10c3a3: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10c3aa: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10c3ac: e8 77 33 00 00 call 10f728 <_Thread_Enable_dispatch> return 0; 10c3b1: 83 c4 10 add $0x10,%esp 10c3b4: 31 c0 xor %eax,%eax } 10c3b6: 8d 65 f8 lea -0x8(%ebp),%esp 10c3b9: 5b pop %ebx 10c3ba: 5e pop %esi 10c3bb: c9 leave 10c3bc: c3 ret 10c3bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 10c3c0: e8 63 33 00 00 call 10f728 <_Thread_Enable_dispatch> return EAGAIN; 10c3c5: b8 0b 00 00 00 mov $0xb,%eax 10c3ca: eb 84 jmp 10c350 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10c3cc: 83 ec 0c sub $0xc,%esp 10c3cf: 8d 75 ec lea -0x14(%ebp),%esi 10c3d2: 56 push %esi 10c3d3: e8 84 09 00 00 call 10cd5c 10c3d8: 83 c4 10 add $0x10,%esp 10c3db: e9 5e ff ff ff jmp 10c33e =============================================================================== 0010c3e0 : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 10c3e0: 55 push %ebp 10c3e1: 89 e5 mov %esp,%ebp 10c3e3: 53 push %ebx 10c3e4: 83 ec 14 sub $0x14,%esp 10c3e7: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c3ea: 85 db test %ebx,%ebx 10c3ec: 74 1b je 10c409 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c3ee: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c3ef: 8d 45 f4 lea -0xc(%ebp),%eax 10c3f2: 50 push %eax 10c3f3: ff 33 pushl (%ebx) 10c3f5: 68 40 a3 12 00 push $0x12a340 10c3fa: e8 99 2a 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c3ff: 83 c4 10 add $0x10,%esp 10c402: 8b 55 f4 mov -0xc(%ebp),%edx 10c405: 85 d2 test %edx,%edx 10c407: 74 0b je 10c414 #endif case OBJECTS_ERROR: break; } return EINVAL; 10c409: b8 16 00 00 00 mov $0x16,%eax } 10c40e: 8b 5d fc mov -0x4(%ebp),%ebx 10c411: c9 leave 10c412: c3 ret 10c413: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c414: 83 ec 0c sub $0xc,%esp 10c417: 6a 00 push $0x0 10c419: 6a 00 push $0x0 10c41b: 6a 01 push $0x1 10c41d: ff 33 pushl (%ebx) 10c41f: 83 c0 10 add $0x10,%eax 10c422: 50 push %eax 10c423: e8 cc 1d 00 00 call 10e1f4 <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c428: 83 c4 20 add $0x20,%esp 10c42b: e8 f8 32 00 00 call 10f728 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c430: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c433: a1 98 a6 12 00 mov 0x12a698,%eax 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c438: ff 70 34 pushl 0x34(%eax) 10c43b: e8 78 01 00 00 call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c440: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c443: 8b 5d fc mov -0x4(%ebp),%ebx 10c446: c9 leave 10c447: c3 ret =============================================================================== 0010c448 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c448: 55 push %ebp 10c449: 89 e5 mov %esp,%ebp 10c44b: 56 push %esi 10c44c: 53 push %ebx 10c44d: 83 ec 20 sub $0x20,%esp 10c450: 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 ) 10c453: 85 db test %ebx,%ebx 10c455: 74 7d je 10c4d4 * * 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 ); 10c457: 83 ec 08 sub $0x8,%esp 10c45a: 8d 45 f0 lea -0x10(%ebp),%eax 10c45d: 50 push %eax 10c45e: ff 75 0c pushl 0xc(%ebp) 10c461: e8 e6 61 00 00 call 11264c <_POSIX_Absolute_timeout_to_ticks> 10c466: 89 c6 mov %eax,%esi 10c468: 83 c4 0c add $0xc,%esp if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c46b: 8d 45 f4 lea -0xc(%ebp),%eax 10c46e: 50 push %eax 10c46f: ff 33 pushl (%ebx) 10c471: 68 40 a3 12 00 push $0x12a340 10c476: e8 1d 2a 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c47b: 83 c4 10 add $0x10,%esp 10c47e: 8b 55 f4 mov -0xc(%ebp),%edx 10c481: 85 d2 test %edx,%edx 10c483: 75 4f jne 10c4d4 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, 10c485: 83 fe 03 cmp $0x3,%esi 10c488: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c48b: 83 ec 0c sub $0xc,%esp 10c48e: 6a 00 push $0x0 10c490: ff 75 f0 pushl -0x10(%ebp) 10c493: 0f b6 ca movzbl %dl,%ecx 10c496: 51 push %ecx 10c497: ff 33 pushl (%ebx) 10c499: 83 c0 10 add $0x10,%eax 10c49c: 50 push %eax 10c49d: 88 55 e4 mov %dl,-0x1c(%ebp) 10c4a0: e8 4f 1d 00 00 call 10e1f4 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c4a5: 83 c4 20 add $0x20,%esp 10c4a8: e8 7b 32 00 00 call 10f728 <_Thread_Enable_dispatch> if ( !do_wait ) { 10c4ad: 8a 55 e4 mov -0x1c(%ebp),%dl 10c4b0: 84 d2 test %dl,%dl 10c4b2: 75 40 jne 10c4f4 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10c4b4: a1 98 a6 12 00 mov 0x12a698,%eax 10c4b9: 8b 40 34 mov 0x34(%eax),%eax 10c4bc: 83 f8 02 cmp $0x2,%eax 10c4bf: 74 1f je 10c4e0 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c4c1: 83 ec 0c sub $0xc,%esp 10c4c4: 50 push %eax 10c4c5: e8 ee 00 00 00 call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c4ca: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c4cd: 8d 65 f8 lea -0x8(%ebp),%esp 10c4d0: 5b pop %ebx 10c4d1: 5e pop %esi 10c4d2: c9 leave 10c4d3: c3 ret _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 10c4d4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c4d9: 8d 65 f8 lea -0x8(%ebp),%esp 10c4dc: 5b pop %ebx 10c4dd: 5e pop %esi 10c4de: c9 leave 10c4df: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10c4e0: 85 f6 test %esi,%esi 10c4e2: 74 f0 je 10c4d4 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10c4e4: 4e dec %esi 10c4e5: 83 fe 01 cmp $0x1,%esi 10c4e8: 77 d7 ja 10c4c1 <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10c4ea: b8 74 00 00 00 mov $0x74,%eax 10c4ef: eb e8 jmp 10c4d9 10c4f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait ) { 10c4f4: a1 98 a6 12 00 mov 0x12a698,%eax 10c4f9: 8b 40 34 mov 0x34(%eax),%eax 10c4fc: eb c3 jmp 10c4c1 =============================================================================== 0010c500 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c500: 55 push %ebp 10c501: 89 e5 mov %esp,%ebp 10c503: 56 push %esi 10c504: 53 push %ebx 10c505: 83 ec 20 sub $0x20,%esp 10c508: 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 ) 10c50b: 85 db test %ebx,%ebx 10c50d: 74 7d je 10c58c * * 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 ); 10c50f: 83 ec 08 sub $0x8,%esp 10c512: 8d 45 f0 lea -0x10(%ebp),%eax 10c515: 50 push %eax 10c516: ff 75 0c pushl 0xc(%ebp) 10c519: e8 2e 61 00 00 call 11264c <_POSIX_Absolute_timeout_to_ticks> 10c51e: 89 c6 mov %eax,%esi 10c520: 83 c4 0c add $0xc,%esp if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c523: 8d 45 f4 lea -0xc(%ebp),%eax 10c526: 50 push %eax 10c527: ff 33 pushl (%ebx) 10c529: 68 40 a3 12 00 push $0x12a340 10c52e: e8 65 29 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c533: 83 c4 10 add $0x10,%esp 10c536: 8b 55 f4 mov -0xc(%ebp),%edx 10c539: 85 d2 test %edx,%edx 10c53b: 75 4f jne 10c58c (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, 10c53d: 83 fe 03 cmp $0x3,%esi 10c540: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c543: 83 ec 0c sub $0xc,%esp 10c546: 6a 00 push $0x0 10c548: ff 75 f0 pushl -0x10(%ebp) 10c54b: 0f b6 ca movzbl %dl,%ecx 10c54e: 51 push %ecx 10c54f: ff 33 pushl (%ebx) 10c551: 83 c0 10 add $0x10,%eax 10c554: 50 push %eax 10c555: 88 55 e4 mov %dl,-0x1c(%ebp) 10c558: e8 5f 1d 00 00 call 10e2bc <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c55d: 83 c4 20 add $0x20,%esp 10c560: e8 c3 31 00 00 call 10f728 <_Thread_Enable_dispatch> if ( !do_wait && 10c565: 8a 55 e4 mov -0x1c(%ebp),%dl 10c568: 84 d2 test %dl,%dl 10c56a: 75 40 jne 10c5ac (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10c56c: a1 98 a6 12 00 mov 0x12a698,%eax 10c571: 8b 40 34 mov 0x34(%eax),%eax ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10c574: 83 f8 02 cmp $0x2,%eax 10c577: 74 1f je 10c598 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c579: 83 ec 0c sub $0xc,%esp 10c57c: 50 push %eax 10c57d: e8 36 00 00 00 call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c582: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c585: 8d 65 f8 lea -0x8(%ebp),%esp 10c588: 5b pop %ebx 10c589: 5e pop %esi 10c58a: c9 leave 10c58b: c3 ret _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 10c58c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c591: 8d 65 f8 lea -0x8(%ebp),%esp 10c594: 5b pop %ebx 10c595: 5e pop %esi 10c596: c9 leave 10c597: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10c598: 85 f6 test %esi,%esi 10c59a: 74 f0 je 10c58c <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10c59c: 4e dec %esi 10c59d: 83 fe 01 cmp $0x1,%esi 10c5a0: 77 d7 ja 10c579 <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10c5a2: b8 74 00 00 00 mov $0x74,%eax 10c5a7: eb e8 jmp 10c591 10c5a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10c5ac: a1 98 a6 12 00 mov 0x12a698,%eax 10c5b1: 8b 40 34 mov 0x34(%eax),%eax 10c5b4: eb c3 jmp 10c579 =============================================================================== 0010c5c8 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 10c5c8: 55 push %ebp 10c5c9: 89 e5 mov %esp,%ebp 10c5cb: 53 push %ebx 10c5cc: 83 ec 14 sub $0x14,%esp 10c5cf: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c5d2: 85 db test %ebx,%ebx 10c5d4: 74 1b je 10c5f1 10c5d6: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c5d7: 8d 45 f4 lea -0xc(%ebp),%eax 10c5da: 50 push %eax 10c5db: ff 33 pushl (%ebx) 10c5dd: 68 40 a3 12 00 push $0x12a340 10c5e2: e8 b1 28 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c5e7: 83 c4 10 add $0x10,%esp 10c5ea: 8b 55 f4 mov -0xc(%ebp),%edx 10c5ed: 85 d2 test %edx,%edx 10c5ef: 74 0b je 10c5fc #endif case OBJECTS_ERROR: break; } return EINVAL; 10c5f1: b8 16 00 00 00 mov $0x16,%eax } 10c5f6: 8b 5d fc mov -0x4(%ebp),%ebx 10c5f9: c9 leave 10c5fa: c3 ret 10c5fb: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c5fc: 83 ec 0c sub $0xc,%esp 10c5ff: 6a 00 push $0x0 10c601: 6a 00 push $0x0 10c603: 6a 00 push $0x0 10c605: ff 33 pushl (%ebx) 10c607: 83 c0 10 add $0x10,%eax 10c60a: 50 push %eax 10c60b: e8 e4 1b 00 00 call 10e1f4 <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 10c610: 83 c4 20 add $0x20,%esp 10c613: e8 10 31 00 00 call 10f728 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c618: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c61b: a1 98 a6 12 00 mov 0x12a698,%eax NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c620: ff 70 34 pushl 0x34(%eax) 10c623: e8 90 ff ff ff call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c628: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c62b: 8b 5d fc mov -0x4(%ebp),%ebx 10c62e: c9 leave 10c62f: c3 ret =============================================================================== 0010c630 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 10c630: 55 push %ebp 10c631: 89 e5 mov %esp,%ebp 10c633: 53 push %ebx 10c634: 83 ec 14 sub $0x14,%esp 10c637: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c63a: 85 db test %ebx,%ebx 10c63c: 74 1b je 10c659 10c63e: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c63f: 8d 45 f4 lea -0xc(%ebp),%eax 10c642: 50 push %eax 10c643: ff 33 pushl (%ebx) 10c645: 68 40 a3 12 00 push $0x12a340 10c64a: e8 49 28 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c64f: 83 c4 10 add $0x10,%esp 10c652: 8b 55 f4 mov -0xc(%ebp),%edx 10c655: 85 d2 test %edx,%edx 10c657: 74 0b je 10c664 #endif case OBJECTS_ERROR: break; } return EINVAL; 10c659: b8 16 00 00 00 mov $0x16,%eax } 10c65e: 8b 5d fc mov -0x4(%ebp),%ebx 10c661: c9 leave 10c662: c3 ret 10c663: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c664: 83 ec 0c sub $0xc,%esp 10c667: 6a 00 push $0x0 10c669: 6a 00 push $0x0 10c66b: 6a 00 push $0x0 10c66d: ff 33 pushl (%ebx) 10c66f: 83 c0 10 add $0x10,%eax 10c672: 50 push %eax 10c673: e8 44 1c 00 00 call 10e2bc <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 10c678: 83 c4 20 add $0x20,%esp 10c67b: e8 a8 30 00 00 call 10f728 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c680: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c683: a1 98 a6 12 00 mov 0x12a698,%eax 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c688: ff 70 34 pushl 0x34(%eax) 10c68b: e8 28 ff ff ff call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c690: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c693: 8b 5d fc mov -0x4(%ebp),%ebx 10c696: c9 leave 10c697: c3 ret =============================================================================== 0010c698 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 10c698: 55 push %ebp 10c699: 89 e5 mov %esp,%ebp 10c69b: 53 push %ebx 10c69c: 83 ec 14 sub $0x14,%esp 10c69f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 10c6a2: 85 c0 test %eax,%eax 10c6a4: 74 1b je 10c6c1 10c6a6: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c6a7: 8d 55 f4 lea -0xc(%ebp),%edx 10c6aa: 52 push %edx 10c6ab: ff 30 pushl (%eax) 10c6ad: 68 40 a3 12 00 push $0x12a340 10c6b2: e8 e1 27 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c6b7: 83 c4 10 add $0x10,%esp 10c6ba: 8b 55 f4 mov -0xc(%ebp),%edx 10c6bd: 85 d2 test %edx,%edx 10c6bf: 74 0b je 10c6cc #endif case OBJECTS_ERROR: break; } return EINVAL; 10c6c1: b8 16 00 00 00 mov $0x16,%eax } 10c6c6: 8b 5d fc mov -0x4(%ebp),%ebx 10c6c9: c9 leave 10c6ca: c3 ret 10c6cb: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 10c6cc: 83 ec 0c sub $0xc,%esp 10c6cf: 83 c0 10 add $0x10,%eax 10c6d2: 50 push %eax 10c6d3: e8 70 1c 00 00 call 10e348 <_CORE_RWLock_Release> 10c6d8: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10c6da: e8 49 30 00 00 call 10f728 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c6df: 89 1c 24 mov %ebx,(%esp) 10c6e2: e8 d1 fe ff ff call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c6e7: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c6ea: 8b 5d fc mov -0x4(%ebp),%ebx 10c6ed: c9 leave 10c6ee: c3 ret =============================================================================== 0010c6f0 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 10c6f0: 55 push %ebp 10c6f1: 89 e5 mov %esp,%ebp 10c6f3: 53 push %ebx 10c6f4: 83 ec 14 sub $0x14,%esp 10c6f7: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c6fa: 85 db test %ebx,%ebx 10c6fc: 74 1b je 10c719 10c6fe: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c6ff: 8d 45 f4 lea -0xc(%ebp),%eax 10c702: 50 push %eax 10c703: ff 33 pushl (%ebx) 10c705: 68 40 a3 12 00 push $0x12a340 10c70a: e8 89 27 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c70f: 83 c4 10 add $0x10,%esp 10c712: 8b 55 f4 mov -0xc(%ebp),%edx 10c715: 85 d2 test %edx,%edx 10c717: 74 0b je 10c724 #endif case OBJECTS_ERROR: break; } return EINVAL; 10c719: b8 16 00 00 00 mov $0x16,%eax } 10c71e: 8b 5d fc mov -0x4(%ebp),%ebx 10c721: c9 leave 10c722: c3 ret 10c723: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c724: 83 ec 0c sub $0xc,%esp 10c727: 6a 00 push $0x0 10c729: 6a 00 push $0x0 10c72b: 6a 01 push $0x1 10c72d: ff 33 pushl (%ebx) 10c72f: 83 c0 10 add $0x10,%eax 10c732: 50 push %eax 10c733: e8 84 1b 00 00 call 10e2bc <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c738: 83 c4 20 add $0x20,%esp 10c73b: e8 e8 2f 00 00 call 10f728 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c740: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c743: a1 98 a6 12 00 mov 0x12a698,%eax 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c748: ff 70 34 pushl 0x34(%eax) 10c74b: e8 68 fe ff ff call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c750: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c753: 8b 5d fc mov -0x4(%ebp),%ebx 10c756: c9 leave 10c757: c3 ret =============================================================================== 0010cd14 : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10cd14: 55 push %ebp 10cd15: 89 e5 mov %esp,%ebp 10cd17: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10cd1a: 85 c0 test %eax,%eax 10cd1c: 74 12 je 10cd30 10cd1e: 8b 10 mov (%eax),%edx 10cd20: 85 d2 test %edx,%edx 10cd22: 74 0c je 10cd30 return EINVAL; attr->is_initialized = false; 10cd24: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10cd2a: 31 c0 xor %eax,%eax } 10cd2c: c9 leave 10cd2d: c3 ret 10cd2e: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10cd30: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10cd35: c9 leave 10cd36: c3 ret =============================================================================== 0010cd5c : */ int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { 10cd5c: 55 push %ebp 10cd5d: 89 e5 mov %esp,%ebp 10cd5f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10cd62: 85 c0 test %eax,%eax 10cd64: 74 12 je 10cd78 return EINVAL; attr->is_initialized = true; 10cd66: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10cd6c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) return 0; 10cd73: 31 c0 xor %eax,%eax } 10cd75: c9 leave 10cd76: c3 ret 10cd77: 90 nop <== NOT EXECUTED int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { if ( !attr ) return EINVAL; 10cd78: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10cd7d: c9 leave 10cd7e: c3 ret =============================================================================== 0010cd80 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10cd80: 55 push %ebp 10cd81: 89 e5 mov %esp,%ebp 10cd83: 8b 45 08 mov 0x8(%ebp),%eax 10cd86: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10cd89: 85 c0 test %eax,%eax 10cd8b: 74 0b je 10cd98 return EINVAL; if ( !attr->is_initialized ) 10cd8d: 8b 08 mov (%eax),%ecx 10cd8f: 85 c9 test %ecx,%ecx 10cd91: 74 05 je 10cd98 return EINVAL; switch ( pshared ) { 10cd93: 83 fa 01 cmp $0x1,%edx 10cd96: 76 08 jbe 10cda0 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10cd98: b8 16 00 00 00 mov $0x16,%eax } } 10cd9d: c9 leave 10cd9e: c3 ret 10cd9f: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10cda0: 89 50 04 mov %edx,0x4(%eax) return 0; 10cda3: 31 c0 xor %eax,%eax default: return EINVAL; } } 10cda5: c9 leave 10cda6: c3 ret =============================================================================== 0010b1f4 : int pthread_setcancelstate( int state, int *oldstate ) { 10b1f4: 55 push %ebp 10b1f5: 89 e5 mov %esp,%ebp 10b1f7: 53 push %ebx 10b1f8: 83 ec 04 sub $0x4,%esp 10b1fb: 8b 55 08 mov 0x8(%ebp),%edx 10b1fe: 8b 45 0c mov 0xc(%ebp),%eax * 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() ) 10b201: 8b 0d 54 8d 12 00 mov 0x128d54,%ecx 10b207: 85 c9 test %ecx,%ecx 10b209: 75 15 jne 10b220 return EPROTO; if ( !oldstate ) 10b20b: 85 c0 test %eax,%eax 10b20d: 74 05 je 10b214 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 10b20f: 83 fa 01 cmp $0x1,%edx 10b212: 76 18 jbe 10b22c return EINVAL; 10b214: b8 16 00 00 00 mov $0x16,%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 * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) return EPROTO; 10b220: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b225: 8b 5d fc mov -0x4(%ebp),%ebx 10b228: c9 leave 10b229: c3 ret 10b22a: 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 ]; 10b22c: 8b 0d 58 8d 12 00 mov 0x128d58,%ecx 10b232: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b238: 8b 1d 94 87 12 00 mov 0x128794,%ebx 10b23e: 43 inc %ebx 10b23f: 89 1d 94 87 12 00 mov %ebx,0x128794 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10b245: 8b 99 d8 00 00 00 mov 0xd8(%ecx),%ebx 10b24b: 89 18 mov %ebx,(%eax) thread_support->cancelability_state = state; 10b24d: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b253: 83 ec 0c sub $0xc,%esp 10b256: ff 35 58 8d 12 00 pushl 0x128d58 10b25c: e8 97 53 00 00 call 1105f8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b261: 83 c4 10 add $0x10,%esp 10b264: 31 c0 xor %eax,%eax } 10b266: 8b 5d fc mov -0x4(%ebp),%ebx 10b269: c9 leave 10b26a: c3 ret =============================================================================== 0010b26c : int pthread_setcanceltype( int type, int *oldtype ) { 10b26c: 55 push %ebp 10b26d: 89 e5 mov %esp,%ebp 10b26f: 53 push %ebx 10b270: 83 ec 04 sub $0x4,%esp 10b273: 8b 55 08 mov 0x8(%ebp),%edx 10b276: 8b 45 0c mov 0xc(%ebp),%eax * 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() ) 10b279: 8b 0d 54 8d 12 00 mov 0x128d54,%ecx 10b27f: 85 c9 test %ecx,%ecx 10b281: 75 15 jne 10b298 return EPROTO; if ( !oldtype ) 10b283: 85 c0 test %eax,%eax 10b285: 74 05 je 10b28c return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 10b287: 83 fa 01 cmp $0x1,%edx 10b28a: 76 18 jbe 10b2a4 return EINVAL; 10b28c: b8 16 00 00 00 mov $0x16,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b291: 8b 5d fc mov -0x4(%ebp),%ebx 10b294: c9 leave 10b295: c3 ret 10b296: 66 90 xchg %ax,%ax <== NOT EXECUTED * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) return EPROTO; 10b298: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b29d: 8b 5d fc mov -0x4(%ebp),%ebx 10b2a0: c9 leave 10b2a1: c3 ret 10b2a2: 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 ]; 10b2a4: 8b 0d 58 8d 12 00 mov 0x128d58,%ecx 10b2aa: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx 10b2b0: 8b 1d 94 87 12 00 mov 0x128794,%ebx 10b2b6: 43 inc %ebx 10b2b7: 89 1d 94 87 12 00 mov %ebx,0x128794 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10b2bd: 8b 99 dc 00 00 00 mov 0xdc(%ecx),%ebx 10b2c3: 89 18 mov %ebx,(%eax) thread_support->cancelability_type = type; 10b2c5: 89 91 dc 00 00 00 mov %edx,0xdc(%ecx) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b2cb: 83 ec 0c sub $0xc,%esp 10b2ce: ff 35 58 8d 12 00 pushl 0x128d58 10b2d4: e8 1f 53 00 00 call 1105f8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b2d9: 83 c4 10 add $0x10,%esp 10b2dc: 31 c0 xor %eax,%eax } 10b2de: 8b 5d fc mov -0x4(%ebp),%ebx 10b2e1: c9 leave 10b2e2: c3 ret =============================================================================== 0010dce4 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10dce4: 55 push %ebp 10dce5: 89 e5 mov %esp,%ebp 10dce7: 57 push %edi 10dce8: 56 push %esi 10dce9: 53 push %ebx 10dcea: 83 ec 2c sub $0x2c,%esp 10dced: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10dcf0: 85 f6 test %esi,%esi 10dcf2: 0f 84 cc 00 00 00 je 10ddc4 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10dcf8: 8d 45 e0 lea -0x20(%ebp),%eax 10dcfb: 50 push %eax 10dcfc: 8d 45 e4 lea -0x1c(%ebp),%eax 10dcff: 50 push %eax 10dd00: 56 push %esi 10dd01: ff 75 0c pushl 0xc(%ebp) 10dd04: e8 2f 5b 00 00 call 113838 <_POSIX_Thread_Translate_sched_param> 10dd09: 89 c3 mov %eax,%ebx policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10dd0b: 83 c4 10 add $0x10,%esp 10dd0e: 85 c0 test %eax,%eax 10dd10: 74 0a je 10dd1c case OBJECTS_ERROR: break; } return ESRCH; } 10dd12: 89 d8 mov %ebx,%eax 10dd14: 8d 65 f4 lea -0xc(%ebp),%esp 10dd17: 5b pop %ebx 10dd18: 5e pop %esi 10dd19: 5f pop %edi 10dd1a: c9 leave 10dd1b: c3 ret 10dd1c: 50 push %eax return rc; /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); 10dd1d: 8d 45 dc lea -0x24(%ebp),%eax 10dd20: 50 push %eax 10dd21: ff 75 08 pushl 0x8(%ebp) 10dd24: 68 40 c6 12 00 push $0x12c640 10dd29: e8 9a 1f 00 00 call 10fcc8 <_Objects_Get> 10dd2e: 89 c2 mov %eax,%edx switch ( location ) { 10dd30: 83 c4 10 add $0x10,%esp 10dd33: 8b 7d dc mov -0x24(%ebp),%edi 10dd36: 85 ff test %edi,%edi 10dd38: 0f 85 96 00 00 00 jne 10ddd4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10dd3e: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10dd44: 89 45 d4 mov %eax,-0x2c(%ebp) if ( api->schedpolicy == SCHED_SPORADIC ) 10dd47: 83 b8 84 00 00 00 04 cmpl $0x4,0x84(%eax) 10dd4e: 0f 84 cc 00 00 00 je 10de20 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 10dd54: 8b 45 0c mov 0xc(%ebp),%eax 10dd57: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dd5a: 89 81 84 00 00 00 mov %eax,0x84(%ecx) api->schedparam = *param; 10dd60: 89 cf mov %ecx,%edi 10dd62: 81 c7 88 00 00 00 add $0x88,%edi 10dd68: b9 07 00 00 00 mov $0x7,%ecx 10dd6d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10dd6f: 8b 45 e4 mov -0x1c(%ebp),%eax 10dd72: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10dd75: 8b 45 e0 mov -0x20(%ebp),%eax 10dd78: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10dd7e: 8b 75 0c mov 0xc(%ebp),%esi 10dd81: 85 f6 test %esi,%esi 10dd83: 78 2e js 10ddb3 <== NEVER TAKEN 10dd85: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10dd89: 7f 59 jg 10dde4 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10dd8b: a1 64 c3 12 00 mov 0x12c364,%eax 10dd90: 89 42 78 mov %eax,0x78(%edx) 10dd93: 0f b6 05 9c 80 12 00 movzbl 0x12809c,%eax 10dd9a: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dd9d: 2b 81 88 00 00 00 sub 0x88(%ecx),%eax the_thread->real_priority = 10dda3: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10dda6: 51 push %ecx 10dda7: 6a 01 push $0x1 10dda9: 50 push %eax 10ddaa: 52 push %edx 10ddab: e8 a4 22 00 00 call 110054 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 10ddb0: 83 c4 10 add $0x10,%esp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 10ddb3: e8 a0 27 00 00 call 110558 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10ddb8: 89 d8 mov %ebx,%eax 10ddba: 8d 65 f4 lea -0xc(%ebp),%esp 10ddbd: 5b pop %ebx 10ddbe: 5e pop %esi 10ddbf: 5f pop %edi 10ddc0: c9 leave 10ddc1: c3 ret 10ddc2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Check all the parameters */ if ( !param ) return EINVAL; 10ddc4: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return ESRCH; } 10ddc9: 89 d8 mov %ebx,%eax 10ddcb: 8d 65 f4 lea -0xc(%ebp),%esp 10ddce: 5b pop %ebx 10ddcf: 5e pop %esi 10ddd0: 5f pop %edi 10ddd1: c9 leave 10ddd2: c3 ret 10ddd3: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return ESRCH; 10ddd4: bb 03 00 00 00 mov $0x3,%ebx } 10ddd9: 89 d8 mov %ebx,%eax 10dddb: 8d 65 f4 lea -0xc(%ebp),%esp 10ddde: 5b pop %ebx 10dddf: 5e pop %esi 10dde0: 5f pop %edi 10dde1: c9 leave 10dde2: c3 ret 10dde3: 90 nop <== NOT EXECUTED api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 10dde4: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10dde8: 75 c9 jne 10ddb3 <== NEVER TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10ddea: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dded: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 10ddf3: 89 81 a4 00 00 00 mov %eax,0xa4(%ecx) _Watchdog_Remove( &api->Sporadic_timer ); 10ddf9: 83 ec 0c sub $0xc,%esp 10ddfc: 89 c8 mov %ecx,%eax 10ddfe: 05 a8 00 00 00 add $0xa8,%eax 10de03: 50 push %eax 10de04: 89 55 d0 mov %edx,-0x30(%ebp) 10de07: e8 54 39 00 00 call 111760 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10de0c: 58 pop %eax 10de0d: 5a pop %edx 10de0e: 8b 55 d0 mov -0x30(%ebp),%edx 10de11: 52 push %edx 10de12: 6a 00 push $0x0 10de14: e8 af fd ff ff call 10dbc8 <_POSIX_Threads_Sporadic_budget_TSR> break; 10de19: 83 c4 10 add $0x10,%esp 10de1c: eb 95 jmp 10ddb3 10de1e: 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 ); 10de20: 83 ec 0c sub $0xc,%esp 10de23: 05 a8 00 00 00 add $0xa8,%eax 10de28: 50 push %eax 10de29: 89 55 d0 mov %edx,-0x30(%ebp) 10de2c: e8 2f 39 00 00 call 111760 <_Watchdog_Remove> 10de31: 83 c4 10 add $0x10,%esp 10de34: 8b 55 d0 mov -0x30(%ebp),%edx 10de37: e9 18 ff ff ff jmp 10dd54 =============================================================================== 00111bfc : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 111bfc: 55 push %ebp 111bfd: 89 e5 mov %esp,%ebp 111bff: 56 push %esi 111c00: 53 push %ebx 111c01: 8b 4d 08 mov 0x8(%ebp),%ecx 111c04: 8b 55 0c mov 0xc(%ebp),%edx 111c07: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 111c0a: 85 d2 test %edx,%edx 111c0c: 0f 84 8a 00 00 00 je 111c9c rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111c12: a1 18 8b 12 00 mov 0x128b18,%eax 111c17: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax if ( oset ) 111c1d: 85 db test %ebx,%ebx 111c1f: 74 0c je 111c2d *oset = api->signals_blocked; 111c21: 8b b0 d0 00 00 00 mov 0xd0(%eax),%esi 111c27: 89 33 mov %esi,(%ebx) if ( !set ) 111c29: 85 d2 test %edx,%edx 111c2b: 74 3b je 111c68 return 0; switch ( how ) { 111c2d: 83 f9 01 cmp $0x1,%ecx 111c30: 74 5e je 111c90 111c32: 83 f9 02 cmp $0x2,%ecx 111c35: 74 39 je 111c70 111c37: 85 c9 test %ecx,%ecx 111c39: 75 41 jne 111c7c break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 111c3b: 8b 12 mov (%edx),%edx 111c3d: 89 90 d0 00 00 00 mov %edx,0xd0(%eax) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 111c43: 8b 15 48 8d 12 00 mov 0x128d48,%edx 111c49: 0b 90 d4 00 00 00 or 0xd4(%eax),%edx /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 111c4f: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 111c55: f7 d0 not %eax 111c57: 85 c2 test %eax,%edx 111c59: 74 0d je 111c68 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); 111c5b: e8 ac c7 ff ff call 10e40c <_Thread_Dispatch> } return 0; 111c60: 31 c0 xor %eax,%eax } 111c62: 5b pop %ebx 111c63: 5e pop %esi 111c64: c9 leave 111c65: c3 ret 111c66: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; 111c68: 31 c0 xor %eax,%eax } 111c6a: 5b pop %ebx 111c6b: 5e pop %esi 111c6c: c9 leave 111c6d: c3 ret 111c6e: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 111c70: 8b 12 mov (%edx),%edx 111c72: f7 d2 not %edx 111c74: 21 90 d0 00 00 00 and %edx,0xd0(%eax) break; 111c7a: eb c7 jmp 111c43 case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 111c7c: e8 03 26 00 00 call 114284 <__errno> 111c81: c7 00 16 00 00 00 movl $0x16,(%eax) 111c87: b8 ff ff ff ff mov $0xffffffff,%eax (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } 111c8c: 5b pop %ebx 111c8d: 5e pop %esi 111c8e: c9 leave 111c8f: c3 ret if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 111c90: 8b 12 mov (%edx),%edx 111c92: 09 90 d0 00 00 00 or %edx,0xd0(%eax) break; 111c98: eb a9 jmp 111c43 111c9a: 66 90 xchg %ax,%ax <== NOT EXECUTED sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 111c9c: 85 db test %ebx,%ebx 111c9e: 74 dc je 111c7c rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111ca0: a1 18 8b 12 00 mov 0x128b18,%eax 111ca5: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 111cab: e9 71 ff ff ff jmp 111c21 =============================================================================== 0010b6d4 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 10b6d4: 55 push %ebp 10b6d5: 89 e5 mov %esp,%ebp 10b6d7: 83 ec 28 sub $0x28,%esp 10b6da: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 10b6dd: 85 c0 test %eax,%eax 10b6df: 74 2f je 10b710 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b6e1: 52 push %edx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b6e2: 8d 55 f4 lea -0xc(%ebp),%edx 10b6e5: 52 push %edx 10b6e6: ff 30 pushl (%eax) 10b6e8: 68 40 88 12 00 push $0x128840 10b6ed: e8 72 21 00 00 call 10d864 <_Objects_Get> switch ( location ) { 10b6f2: 83 c4 10 add $0x10,%esp 10b6f5: 8b 4d f4 mov -0xc(%ebp),%ecx 10b6f8: 85 c9 test %ecx,%ecx 10b6fa: 75 14 jne 10b710 */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 10b6fc: 8b 50 18 mov 0x18(%eax),%edx case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 10b6ff: 85 d2 test %edx,%edx 10b701: 74 15 je 10b718 _Thread_Enable_dispatch(); 10b703: e8 ec 29 00 00 call 10e0f4 <_Thread_Enable_dispatch> return EBUSY; 10b708: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b70d: c9 leave 10b70e: c3 ret 10b70f: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10b710: b8 16 00 00 00 mov $0x16,%eax } 10b715: c9 leave 10b716: c3 ret 10b717: 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 ); 10b718: 83 ec 08 sub $0x8,%esp 10b71b: 50 push %eax 10b71c: 68 40 88 12 00 push $0x128840 10b721: 89 45 e4 mov %eax,-0x1c(%ebp) 10b724: e8 ff 1c 00 00 call 10d428 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10b729: 58 pop %eax 10b72a: 5a pop %edx 10b72b: 8b 45 e4 mov -0x1c(%ebp),%eax 10b72e: 50 push %eax 10b72f: 68 40 88 12 00 push $0x128840 10b734: e8 eb 1f 00 00 call 10d724 <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 10b739: e8 b6 29 00 00 call 10e0f4 <_Thread_Enable_dispatch> return 0; 10b73e: 83 c4 10 add $0x10,%esp 10b741: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b743: c9 leave 10b744: c3 ret =============================================================================== 0010b748 : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 10b748: 55 push %ebp 10b749: 89 e5 mov %esp,%ebp 10b74b: 56 push %esi 10b74c: 53 push %ebx 10b74d: 83 ec 20 sub $0x20,%esp 10b750: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 10b753: 85 db test %ebx,%ebx 10b755: 74 6d je 10b7c4 return EINVAL; switch ( pshared ) { 10b757: 8b 45 0c mov 0xc(%ebp),%eax 10b75a: 85 c0 test %eax,%eax 10b75c: 75 66 jne 10b7c4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b75e: a1 54 85 12 00 mov 0x128554,%eax 10b763: 40 inc %eax 10b764: a3 54 85 12 00 mov %eax,0x128554 * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) _Objects_Allocate( &_POSIX_Spinlock_Information ); 10b769: 83 ec 0c sub $0xc,%esp 10b76c: 68 40 88 12 00 push $0x128840 10b771: e8 36 1c 00 00 call 10d3ac <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 10b776: 83 c4 10 add $0x10,%esp 10b779: 85 c0 test %eax,%eax 10b77b: 74 53 je 10b7d0 */ RTEMS_INLINE_ROUTINE void _CORE_spinlock_Initialize_attributes( CORE_spinlock_Attributes *the_attributes ) { the_attributes->XXX = 0; 10b77d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) return EAGAIN; } _CORE_spinlock_Initialize_attributes( &attributes ); _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 10b784: 83 ec 08 sub $0x8,%esp 10b787: 8d 55 f4 lea -0xc(%ebp),%edx 10b78a: 52 push %edx 10b78b: 8d 50 10 lea 0x10(%eax),%edx 10b78e: 52 push %edx 10b78f: 89 45 e4 mov %eax,-0x1c(%ebp) 10b792: e8 09 16 00 00 call 10cda0 <_CORE_spinlock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b797: 8b 45 e4 mov -0x1c(%ebp),%eax 10b79a: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b79d: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b7a0: 8b 0d 5c 88 12 00 mov 0x12885c,%ecx 10b7a6: 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; 10b7a9: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 10b7b0: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10b7b2: e8 3d 29 00 00 call 10e0f4 <_Thread_Enable_dispatch> return 0; 10b7b7: 83 c4 10 add $0x10,%esp 10b7ba: 31 c0 xor %eax,%eax } 10b7bc: 8d 65 f8 lea -0x8(%ebp),%esp 10b7bf: 5b pop %ebx 10b7c0: 5e pop %esi 10b7c1: c9 leave 10b7c2: c3 ret 10b7c3: 90 nop <== NOT EXECUTED switch ( pshared ) { case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 10b7c4: b8 16 00 00 00 mov $0x16,%eax *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; } 10b7c9: 8d 65 f8 lea -0x8(%ebp),%esp 10b7cc: 5b pop %ebx 10b7cd: 5e pop %esi 10b7ce: c9 leave 10b7cf: c3 ret _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { _Thread_Enable_dispatch(); 10b7d0: e8 1f 29 00 00 call 10e0f4 <_Thread_Enable_dispatch> return EAGAIN; 10b7d5: b8 0b 00 00 00 mov $0xb,%eax 10b7da: eb ed jmp 10b7c9 =============================================================================== 0010b7dc : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 10b7dc: 55 push %ebp 10b7dd: 89 e5 mov %esp,%ebp 10b7df: 53 push %ebx 10b7e0: 83 ec 14 sub $0x14,%esp 10b7e3: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b7e6: 85 c0 test %eax,%eax 10b7e8: 74 1b je 10b805 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b7ea: 53 push %ebx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b7eb: 8d 55 f4 lea -0xc(%ebp),%edx 10b7ee: 52 push %edx 10b7ef: ff 30 pushl (%eax) 10b7f1: 68 40 88 12 00 push $0x128840 10b7f6: e8 69 20 00 00 call 10d864 <_Objects_Get> switch ( location ) { 10b7fb: 83 c4 10 add $0x10,%esp 10b7fe: 8b 4d f4 mov -0xc(%ebp),%ecx 10b801: 85 c9 test %ecx,%ecx 10b803: 74 0b je 10b810 #endif case OBJECTS_ERROR: break; } return EINVAL; 10b805: b8 16 00 00 00 mov $0x16,%eax } 10b80a: 8b 5d fc mov -0x4(%ebp),%ebx 10b80d: c9 leave 10b80e: c3 ret 10b80f: 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 ); 10b810: 52 push %edx 10b811: 6a 00 push $0x0 10b813: 6a 01 push $0x1 10b815: 83 c0 10 add $0x10,%eax 10b818: 50 push %eax 10b819: e8 f6 15 00 00 call 10ce14 <_CORE_spinlock_Wait> 10b81e: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b820: e8 cf 28 00 00 call 10e0f4 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b825: 89 1c 24 mov %ebx,(%esp) 10b828: e8 0b 00 00 00 call 10b838 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b82d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b830: 8b 5d fc mov -0x4(%ebp),%ebx 10b833: c9 leave 10b834: c3 ret =============================================================================== 0010b848 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 10b848: 55 push %ebp 10b849: 89 e5 mov %esp,%ebp 10b84b: 53 push %ebx 10b84c: 83 ec 14 sub $0x14,%esp 10b84f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b852: 85 c0 test %eax,%eax 10b854: 74 1b je 10b871 10b856: 53 push %ebx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b857: 8d 55 f4 lea -0xc(%ebp),%edx 10b85a: 52 push %edx 10b85b: ff 30 pushl (%eax) 10b85d: 68 40 88 12 00 push $0x128840 10b862: e8 fd 1f 00 00 call 10d864 <_Objects_Get> switch ( location ) { 10b867: 83 c4 10 add $0x10,%esp 10b86a: 8b 4d f4 mov -0xc(%ebp),%ecx 10b86d: 85 c9 test %ecx,%ecx 10b86f: 74 0b je 10b87c #endif case OBJECTS_ERROR: break; } return EINVAL; 10b871: b8 16 00 00 00 mov $0x16,%eax } 10b876: 8b 5d fc mov -0x4(%ebp),%ebx 10b879: c9 leave 10b87a: c3 ret 10b87b: 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 ); 10b87c: 52 push %edx 10b87d: 6a 00 push $0x0 10b87f: 6a 00 push $0x0 10b881: 83 c0 10 add $0x10,%eax 10b884: 50 push %eax 10b885: e8 8a 15 00 00 call 10ce14 <_CORE_spinlock_Wait> 10b88a: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b88c: e8 63 28 00 00 call 10e0f4 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b891: 89 1c 24 mov %ebx,(%esp) 10b894: e8 9f ff ff ff call 10b838 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b899: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b89c: 8b 5d fc mov -0x4(%ebp),%ebx 10b89f: c9 leave 10b8a0: c3 ret =============================================================================== 0010b8a4 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 10b8a4: 55 push %ebp 10b8a5: 89 e5 mov %esp,%ebp 10b8a7: 53 push %ebx 10b8a8: 83 ec 14 sub $0x14,%esp 10b8ab: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b8ae: 85 c0 test %eax,%eax 10b8b0: 74 1b je 10b8cd 10b8b2: 51 push %ecx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b8b3: 8d 55 f4 lea -0xc(%ebp),%edx 10b8b6: 52 push %edx 10b8b7: ff 30 pushl (%eax) 10b8b9: 68 40 88 12 00 push $0x128840 10b8be: e8 a1 1f 00 00 call 10d864 <_Objects_Get> switch ( location ) { 10b8c3: 83 c4 10 add $0x10,%esp 10b8c6: 8b 55 f4 mov -0xc(%ebp),%edx 10b8c9: 85 d2 test %edx,%edx 10b8cb: 74 0b je 10b8d8 #endif case OBJECTS_ERROR: break; } return EINVAL; 10b8cd: b8 16 00 00 00 mov $0x16,%eax } 10b8d2: 8b 5d fc mov -0x4(%ebp),%ebx 10b8d5: c9 leave 10b8d6: c3 ret 10b8d7: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 10b8d8: 83 ec 0c sub $0xc,%esp 10b8db: 83 c0 10 add $0x10,%eax 10b8de: 50 push %eax 10b8df: e8 e0 14 00 00 call 10cdc4 <_CORE_spinlock_Release> 10b8e4: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b8e6: e8 09 28 00 00 call 10e0f4 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b8eb: 89 1c 24 mov %ebx,(%esp) 10b8ee: e8 45 ff ff ff call 10b838 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b8f3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b8f6: 8b 5d fc mov -0x4(%ebp),%ebx 10b8f9: c9 leave 10b8fa: c3 ret =============================================================================== 0010bb64 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10bb64: 55 push %ebp 10bb65: 89 e5 mov %esp,%ebp 10bb67: 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() ) 10bb6a: 8b 0d d4 94 12 00 mov 0x1294d4,%ecx 10bb70: 85 c9 test %ecx,%ecx 10bb72: 75 44 jne 10bbb8 <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10bb74: a1 d8 94 12 00 mov 0x1294d8,%eax 10bb79: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10bb7f: 8b 15 14 8f 12 00 mov 0x128f14,%edx 10bb85: 42 inc %edx 10bb86: 89 15 14 8f 12 00 mov %edx,0x128f14 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10bb8c: 8b 90 d8 00 00 00 mov 0xd8(%eax),%edx 10bb92: 85 d2 test %edx,%edx 10bb94: 75 26 jne 10bbbc <== NEVER TAKEN 10bb96: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax 10bb9c: 85 c0 test %eax,%eax 10bb9e: 74 1c je 10bbbc thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10bba0: e8 97 26 00 00 call 10e23c <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10bba5: 83 ec 08 sub $0x8,%esp 10bba8: 6a ff push $0xffffffff 10bbaa: ff 35 d8 94 12 00 pushl 0x1294d8 10bbb0: e8 8b 5a 00 00 call 111640 <_POSIX_Thread_Exit> 10bbb5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10bbb8: c9 leave <== NOT EXECUTED 10bbb9: c3 ret <== NOT EXECUTED 10bbba: 66 90 xchg %ax,%ax <== NOT EXECUTED 10bbbc: c9 leave _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10bbbd: e9 7a 26 00 00 jmp 10e23c <_Thread_Enable_dispatch> =============================================================================== 0011e968 : ssize_t read( int fd, void *buffer, size_t count ) { 11e968: 55 push %ebp 11e969: 89 e5 mov %esp,%ebp 11e96b: 53 push %ebx 11e96c: 83 ec 04 sub $0x4,%esp 11e96f: 8b 4d 08 mov 0x8(%ebp),%ecx 11e972: 8b 45 0c mov 0xc(%ebp),%eax 11e975: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11e978: 3b 0d 4c 21 12 00 cmp 0x12214c,%ecx 11e97e: 73 50 jae 11e9d0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11e980: c1 e1 03 shl $0x3,%ecx 11e983: 8d 1c cd 00 00 00 00 lea 0x0(,%ecx,8),%ebx 11e98a: 29 cb sub %ecx,%ebx 11e98c: 03 1d 60 63 12 00 add 0x126360,%ebx rtems_libio_check_is_open( iop ); 11e992: 8b 4b 14 mov 0x14(%ebx),%ecx 11e995: f6 c5 01 test $0x1,%ch 11e998: 74 36 je 11e9d0 rtems_libio_check_buffer( buffer ); 11e99a: 85 c0 test %eax,%eax 11e99c: 74 46 je 11e9e4 <== NEVER TAKEN rtems_libio_check_count( count ); 11e99e: 85 d2 test %edx,%edx 11e9a0: 74 26 je 11e9c8 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11e9a2: 83 e1 02 and $0x2,%ecx 11e9a5: 74 3d je 11e9e4 /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 11e9a7: 51 push %ecx 11e9a8: 8b 4b 20 mov 0x20(%ebx),%ecx 11e9ab: 52 push %edx 11e9ac: 50 push %eax 11e9ad: 53 push %ebx 11e9ae: ff 51 08 call *0x8(%ecx) if ( rc > 0 ) 11e9b1: 83 c4 10 add $0x10,%esp 11e9b4: 85 c0 test %eax,%eax 11e9b6: 7e 0b jle 11e9c3 iop->offset += rc; 11e9b8: 89 c1 mov %eax,%ecx 11e9ba: c1 f9 1f sar $0x1f,%ecx 11e9bd: 01 43 0c add %eax,0xc(%ebx) 11e9c0: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11e9c3: 8b 5d fc mov -0x4(%ebp),%ebx 11e9c6: c9 leave 11e9c7: c3 ret 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 ); 11e9c8: 31 c0 xor %eax,%eax if ( rc > 0 ) iop->offset += rc; return rc; } 11e9ca: 8b 5d fc mov -0x4(%ebp),%ebx 11e9cd: c9 leave 11e9ce: c3 ret 11e9cf: 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 ); 11e9d0: e8 c3 48 ff ff call 113298 <__errno> 11e9d5: c7 00 09 00 00 00 movl $0x9,(%eax) 11e9db: b8 ff ff ff ff mov $0xffffffff,%eax 11e9e0: eb e1 jmp 11e9c3 11e9e2: 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 ); 11e9e4: e8 af 48 ff ff call 113298 <__errno> 11e9e9: c7 00 16 00 00 00 movl $0x16,(%eax) 11e9ef: b8 ff ff ff ff mov $0xffffffff,%eax 11e9f4: eb cd jmp 11e9c3 =============================================================================== 0010b038 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 10b038: 55 push %ebp 10b039: 89 e5 mov %esp,%ebp 10b03b: 57 push %edi 10b03c: 56 push %esi 10b03d: 53 push %ebx 10b03e: 83 ec 3c sub $0x3c,%esp 10b041: 8b 55 08 mov 0x8(%ebp),%edx 10b044: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 10b047: 85 db test %ebx,%ebx 10b049: 74 6d je 10b0b8 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 10b04b: 31 c0 xor %eax,%eax 10b04d: b9 ff ff ff ff mov $0xffffffff,%ecx 10b052: 89 d7 mov %edx,%edi 10b054: f2 ae repnz scas %es:(%edi),%al 10b056: f7 d1 not %ecx 10b058: 49 dec %ecx 10b059: 83 ec 0c sub $0xc,%esp 10b05c: 6a 00 push $0x0 10b05e: 8d 75 d4 lea -0x2c(%ebp),%esi 10b061: 56 push %esi 10b062: 6a 00 push $0x0 10b064: 51 push %ecx 10b065: 52 push %edx 10b066: e8 79 ee ff ff call 109ee4 0, &loc, false ); if ( result != 0 ) 10b06b: 83 c4 20 add $0x20,%esp 10b06e: 85 c0 test %eax,%eax 10b070: 74 0e je 10b080 <== ALWAYS TAKEN return -1; 10b072: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10b077: 8d 65 f4 lea -0xc(%ebp),%esp 10b07a: 5b pop %ebx 10b07b: 5e pop %esi 10b07c: 5f pop %edi 10b07d: c9 leave 10b07e: c3 ret 10b07f: 90 nop <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 10b080: 83 ec 0c sub $0xc,%esp 10b083: 56 push %esi 10b084: 8b 45 e0 mov -0x20(%ebp),%eax 10b087: ff 50 10 call *0x10(%eax) 10b08a: 83 c4 10 add $0x10,%esp 10b08d: 83 f8 04 cmp $0x4,%eax 10b090: 75 3e jne 10b0d0 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 10b092: 50 push %eax 10b093: ff 75 10 pushl 0x10(%ebp) 10b096: 53 push %ebx 10b097: 56 push %esi 10b098: 8b 45 e0 mov -0x20(%ebp),%eax 10b09b: ff 50 3c call *0x3c(%eax) rtems_filesystem_freenode( &loc ); 10b09e: 89 34 24 mov %esi,(%esp) 10b0a1: 89 45 c4 mov %eax,-0x3c(%ebp) 10b0a4: e8 13 ef ff ff call 109fbc return result; 10b0a9: 83 c4 10 add $0x10,%esp 10b0ac: 8b 45 c4 mov -0x3c(%ebp),%eax } 10b0af: 8d 65 f4 lea -0xc(%ebp),%esp 10b0b2: 5b pop %ebx 10b0b3: 5e pop %esi 10b0b4: 5f pop %edi 10b0b5: c9 leave 10b0b6: c3 ret 10b0b7: 90 nop <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 10b0b8: e8 e7 ac 00 00 call 115da4 <__errno> 10b0bd: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b0c3: b8 ff ff ff ff mov $0xffffffff,%eax result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10b0c8: 8d 65 f4 lea -0xc(%ebp),%esp 10b0cb: 5b pop %ebx 10b0cc: 5e pop %esi 10b0cd: 5f pop %edi 10b0ce: c9 leave 10b0cf: c3 ret 0, &loc, false ); if ( result != 0 ) return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 10b0d0: 83 ec 0c sub $0xc,%esp 10b0d3: 56 push %esi 10b0d4: e8 e3 ee ff ff call 109fbc rtems_set_errno_and_return_minus_one( EINVAL ); 10b0d9: e8 c6 ac 00 00 call 115da4 <__errno> 10b0de: c7 00 16 00 00 00 movl $0x16,(%eax) 10b0e4: 83 c4 10 add $0x10,%esp 10b0e7: b8 ff ff ff ff mov $0xffffffff,%eax 10b0ec: eb 89 jmp 10b077 =============================================================================== 00109cfc : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 109cfc: 55 push %ebp 109cfd: 89 e5 mov %esp,%ebp 109cff: 57 push %edi 109d00: 56 push %esi 109d01: 53 push %ebx 109d02: 83 ec 1c sub $0x1c,%esp 109d05: 8b 45 08 mov 0x8(%ebp),%eax 109d08: 8b 5d 0c mov 0xc(%ebp),%ebx int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 109d0b: 3b 05 0c 47 12 00 cmp 0x12470c,%eax 109d11: 0f 83 ef 00 00 00 jae 109e06 iop = rtems_libio_iop( fd ); 109d17: c1 e0 03 shl $0x3,%eax 109d1a: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi 109d21: 29 c6 sub %eax,%esi 109d23: 03 35 20 89 12 00 add 0x128920,%esi rtems_libio_check_is_open( iop ); 109d29: 8b 46 14 mov 0x14(%esi),%eax 109d2c: f6 c4 01 test $0x1,%ah 109d2f: 0f 84 d1 00 00 00 je 109e06 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 109d35: a8 02 test $0x2,%al 109d37: 0f 84 97 00 00 00 je 109dd4 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 109d3d: 85 db test %ebx,%ebx 109d3f: 0f 84 8f 00 00 00 je 109dd4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 109d45: 8b 7d 10 mov 0x10(%ebp),%edi 109d48: 85 ff test %edi,%edi 109d4a: 0f 8e 84 00 00 00 jle 109dd4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 109d50: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 109d57: 7f 7b jg 109dd4 <== NEVER TAKEN 109d59: c6 45 e4 01 movb $0x1,-0x1c(%ebp) 109d5d: 31 c0 xor %eax,%eax 109d5f: 31 d2 xor %edx,%edx 109d61: eb 03 jmp 109d66 109d63: 90 nop <== NOT EXECUTED if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109d64: 89 fa mov %edi,%edx /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) 109d66: 8b 0c c3 mov (%ebx,%eax,8),%ecx 109d69: 85 c9 test %ecx,%ecx 109d6b: 74 67 je 109dd4 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109d6d: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx 109d71: 8d 3c 0a lea (%edx,%ecx,1),%edi if ( total < old ) 109d74: 39 fa cmp %edi,%edx 109d76: 7f 5c jg 109dd4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 109d78: 85 c9 test %ecx,%ecx 109d7a: 74 04 je 109d80 all_zeros = false; 109d7c: 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++ ) { 109d80: 40 inc %eax 109d81: 39 45 10 cmp %eax,0x10(%ebp) 109d84: 7f de jg 109d64 /* * 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 ) { 109d86: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp) 109d8a: 75 68 jne 109df4 109d8c: 31 ff xor %edi,%edi 109d8e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 109d95: eb 1d jmp 109db4 109d97: 90 nop <== NOT EXECUTED ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 109d98: 74 0e je 109da8 <== NEVER TAKEN iop->offset += bytes; 109d9a: 89 c1 mov %eax,%ecx 109d9c: c1 f9 1f sar $0x1f,%ecx 109d9f: 01 46 0c add %eax,0xc(%esi) 109da2: 11 4e 10 adc %ecx,0x10(%esi) total += bytes; 109da5: 01 45 e4 add %eax,-0x1c(%ebp) } if (bytes != iov[ v ].iov_len) 109da8: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax 109dac: 75 38 jne 109de6 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109dae: 47 inc %edi 109daf: 39 7d 10 cmp %edi,0x10(%ebp) 109db2: 7e 32 jle 109de6 bytes = (*iop->pathinfo.handlers->read_h)( 109db4: 50 push %eax 109db5: 8b 46 20 mov 0x20(%esi),%eax 109db8: ff 74 fb 04 pushl 0x4(%ebx,%edi,8) 109dbc: ff 34 fb pushl (%ebx,%edi,8) 109dbf: 56 push %esi 109dc0: ff 50 08 call *0x8(%eax) iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 109dc3: 83 c4 10 add $0x10,%esp 109dc6: 83 f8 00 cmp $0x0,%eax 109dc9: 7d cd jge 109d98 <== ALWAYS TAKEN return -1; 109dcb: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109dd2: eb 12 jmp 109de6 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 109dd4: e8 3f a2 00 00 call 114018 <__errno> 109dd9: c7 00 16 00 00 00 movl $0x16,(%eax) 109ddf: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109de6: 8b 45 e4 mov -0x1c(%ebp),%eax 109de9: 8d 65 f4 lea -0xc(%ebp),%esp 109dec: 5b pop %ebx 109ded: 5e pop %esi 109dee: 5f pop %edi 109def: c9 leave 109df0: c3 ret 109df1: 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 ) { return 0; 109df4: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109dfb: 8b 45 e4 mov -0x1c(%ebp),%eax 109dfe: 8d 65 f4 lea -0xc(%ebp),%esp 109e01: 5b pop %ebx 109e02: 5e pop %esi 109e03: 5f pop %edi 109e04: c9 leave 109e05: 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 ); 109e06: e8 0d a2 00 00 call 114018 <__errno> 109e0b: c7 00 09 00 00 00 movl $0x9,(%eax) 109e11: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) 109e18: eb cc jmp 109de6 =============================================================================== 0011ea84 : void *realloc( void *ptr, size_t size ) { 11ea84: 55 push %ebp 11ea85: 89 e5 mov %esp,%ebp 11ea87: 57 push %edi 11ea88: 56 push %esi 11ea89: 53 push %ebx 11ea8a: 83 ec 2c sub $0x2c,%esp 11ea8d: 8b 5d 08 mov 0x8(%ebp),%ebx 11ea90: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 11ea93: ff 05 90 63 12 00 incl 0x126390 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11ea99: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 11eaa0: 74 72 je 11eb14 <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11eaa2: 85 db test %ebx,%ebx 11eaa4: 74 5e je 11eb04 return malloc( size ); if ( !size ) { 11eaa6: 85 f6 test %esi,%esi 11eaa8: 74 3a je 11eae4 <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11eaaa: 52 push %edx 11eaab: 8d 45 e4 lea -0x1c(%ebp),%eax 11eaae: 50 push %eax 11eaaf: 53 push %ebx 11eab0: ff 35 58 21 12 00 pushl 0x122158 11eab6: e8 49 01 00 00 call 11ec04 <_Protected_heap_Get_block_size> 11eabb: 83 c4 10 add $0x10,%esp 11eabe: 84 c0 test %al,%al 11eac0: 74 32 je 11eaf4 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 11eac2: 50 push %eax 11eac3: 56 push %esi 11eac4: 53 push %ebx 11eac5: ff 35 58 21 12 00 pushl 0x122158 11eacb: e8 6c 01 00 00 call 11ec3c <_Protected_heap_Resize_block> 11ead0: 83 c4 10 add $0x10,%esp 11ead3: 84 c0 test %al,%al 11ead5: 74 5d je 11eb34 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 11ead7: 89 d8 mov %ebx,%eax 11ead9: 8d 65 f4 lea -0xc(%ebp),%esp 11eadc: 5b pop %ebx 11eadd: 5e pop %esi 11eade: 5f pop %edi 11eadf: c9 leave 11eae0: c3 ret 11eae1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 11eae4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11eae7: 53 push %ebx <== NOT EXECUTED 11eae8: e8 a7 95 fe ff call 108094 <== NOT EXECUTED return (void *) 0; 11eaed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11eaf0: 31 db xor %ebx,%ebx <== NOT EXECUTED 11eaf2: eb e3 jmp 11ead7 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 11eaf4: e8 9f 47 ff ff call 113298 <__errno> 11eaf9: c7 00 16 00 00 00 movl $0x16,(%eax) return (void *) 0; 11eaff: 31 db xor %ebx,%ebx 11eb01: eb d4 jmp 11ead7 11eb03: 90 nop <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 11eb04: 83 ec 0c sub $0xc,%esp 11eb07: 56 push %esi 11eb08: e8 5b 98 fe ff call 108368 11eb0d: 89 c3 mov %eax,%ebx 11eb0f: 83 c4 10 add $0x10,%esp 11eb12: eb c3 jmp 11ead7 /* * 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) 11eb14: a1 d4 64 12 00 mov 0x1264d4,%eax 11eb19: 85 c0 test %eax,%eax 11eb1b: 74 04 je 11eb21 <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 11eb1d: 31 db xor %ebx,%ebx 11eb1f: eb b6 jmp 11ead7 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 11eb21: 8b 0d 94 6a 12 00 mov 0x126a94,%ecx 11eb27: 85 c9 test %ecx,%ecx 11eb29: 0f 84 73 ff ff ff je 11eaa2 <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 11eb2f: 31 db xor %ebx,%ebx <== NOT EXECUTED 11eb31: eb a4 jmp 11ead7 <== NOT EXECUTED 11eb33: 90 nop <== 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 ); 11eb34: 83 ec 0c sub $0xc,%esp 11eb37: 56 push %esi 11eb38: e8 2b 98 fe ff call 108368 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11eb3d: ff 0d 84 63 12 00 decl 0x126384 if ( !new_area ) { 11eb43: 83 c4 10 add $0x10,%esp 11eb46: 85 c0 test %eax,%eax 11eb48: 74 d3 je 11eb1d return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11eb4a: 8b 55 e4 mov -0x1c(%ebp),%edx 11eb4d: 89 f1 mov %esi,%ecx 11eb4f: 39 d6 cmp %edx,%esi 11eb51: 76 02 jbe 11eb55 <== NEVER TAKEN 11eb53: 89 d1 mov %edx,%ecx 11eb55: 89 c7 mov %eax,%edi 11eb57: 89 de mov %ebx,%esi 11eb59: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11eb5b: 83 ec 0c sub $0xc,%esp 11eb5e: 53 push %ebx 11eb5f: 89 45 d4 mov %eax,-0x2c(%ebp) 11eb62: e8 2d 95 fe ff call 108094 return new_area; 11eb67: 83 c4 10 add $0x10,%esp 11eb6a: 8b 45 d4 mov -0x2c(%ebp),%eax 11eb6d: 89 c3 mov %eax,%ebx 11eb6f: e9 63 ff ff ff jmp 11ead7 =============================================================================== 001092e0 : #include int rmdir( const char *pathname ) { 1092e0: 55 push %ebp 1092e1: 89 e5 mov %esp,%ebp 1092e3: 57 push %edi 1092e4: 56 push %esi 1092e5: 53 push %ebx 1092e6: 83 ec 58 sub $0x58,%esp 1092e9: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 1092ec: 53 push %ebx 1092ed: e8 46 f1 ff ff call 108438 if ( parentpathlen == 0 ) 1092f2: 83 c4 10 add $0x10,%esp 1092f5: 85 c0 test %eax,%eax 1092f7: 0f 85 0f 01 00 00 jne 10940c rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 1092fd: 50 push %eax 1092fe: 8d 45 d0 lea -0x30(%ebp),%eax 109301: 89 45 b4 mov %eax,-0x4c(%ebp) 109304: 50 push %eax 109305: 8d 45 e4 lea -0x1c(%ebp),%eax 109308: 50 push %eax 109309: 53 push %ebx 10930a: e8 45 01 00 00 call 109454 10930f: 83 c4 10 add $0x10,%esp 109312: 31 d2 xor %edx,%edx const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 109314: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 109318: 8d 7d bc lea -0x44(%ebp),%edi 10931b: b9 05 00 00 00 mov $0x5,%ecx 109320: 8b 75 b4 mov -0x4c(%ebp),%esi 109323: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 109325: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 109327: be ff ff ff ff mov $0xffffffff,%esi 10932c: 89 f1 mov %esi,%ecx 10932e: 89 df mov %ebx,%edi 109330: 31 c0 xor %eax,%eax 109332: f2 ae repnz scas %es:(%edi),%al 109334: f7 d1 not %ecx 109336: 49 dec %ecx 109337: 83 ec 08 sub $0x8,%esp 10933a: 51 push %ecx 10933b: 53 push %ebx 10933c: e8 3b f1 ff ff call 10847c 109341: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 109343: 89 f1 mov %esi,%ecx 109345: 89 df mov %ebx,%edi 109347: 31 c0 xor %eax,%eax 109349: f2 ae repnz scas %es:(%edi),%al 10934b: f7 d1 not %ecx 10934d: 49 dec %ecx 10934e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 109355: 8d 75 bc lea -0x44(%ebp),%esi 109358: 56 push %esi 109359: 6a 00 push $0x0 10935b: 51 push %ecx 10935c: 53 push %ebx 10935d: e8 2a f0 ff ff call 10838c 0, &loc, false ); if ( result != 0 ) { 109362: 83 c4 20 add $0x20,%esp 109365: 85 c0 test %eax,%eax 109367: 75 5b jne 1093c4 } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 109369: 83 ec 0c sub $0xc,%esp 10936c: 56 push %esi 10936d: 8b 45 c8 mov -0x38(%ebp),%eax 109370: ff 50 10 call *0x10(%eax) 109373: 83 c4 10 add $0x10,%esp 109376: 48 dec %eax 109377: 75 5f jne 1093d8 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 109379: 83 ec 08 sub $0x8,%esp 10937c: 56 push %esi 10937d: ff 75 b4 pushl -0x4c(%ebp) 109380: 8b 45 c4 mov -0x3c(%ebp),%eax 109383: ff 50 34 call *0x34(%eax) rtems_filesystem_freenode( &loc ); 109386: 89 34 24 mov %esi,(%esp) 109389: 89 45 ac mov %eax,-0x54(%ebp) 10938c: e8 3b f1 ff ff call 1084cc if ( free_parentloc ) 109391: 83 c4 10 add $0x10,%esp 109394: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 109398: 8b 45 ac mov -0x54(%ebp),%eax 10939b: 75 0b jne 1093a8 rtems_filesystem_freenode( &parentloc ); return result; } 10939d: 8d 65 f4 lea -0xc(%ebp),%esp 1093a0: 5b pop %ebx 1093a1: 5e pop %esi 1093a2: 5f pop %edi 1093a3: c9 leave 1093a4: c3 ret 1093a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 1093a8: 83 ec 0c sub $0xc,%esp 1093ab: ff 75 b4 pushl -0x4c(%ebp) 1093ae: e8 19 f1 ff ff call 1084cc 1093b3: 83 c4 10 add $0x10,%esp 1093b6: 8b 45 ac mov -0x54(%ebp),%eax return result; } 1093b9: 8d 65 f4 lea -0xc(%ebp),%esp 1093bc: 5b pop %ebx 1093bd: 5e pop %esi 1093be: 5f pop %edi 1093bf: c9 leave 1093c0: c3 ret 1093c1: 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 ) 1093c4: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 1093c8: 75 6f jne 109439 rtems_filesystem_freenode( &parentloc ); return -1; 1093ca: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 1093cf: 8d 65 f4 lea -0xc(%ebp),%esp 1093d2: 5b pop %ebx 1093d3: 5e pop %esi 1093d4: 5f pop %edi 1093d5: c9 leave 1093d6: c3 ret 1093d7: 90 nop <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 1093d8: 83 ec 0c sub $0xc,%esp 1093db: 56 push %esi 1093dc: e8 eb f0 ff ff call 1084cc if ( free_parentloc ) 1093e1: 83 c4 10 add $0x10,%esp 1093e4: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 1093e8: 74 0e je 1093f8 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 1093ea: 83 ec 0c sub $0xc,%esp 1093ed: ff 75 b4 pushl -0x4c(%ebp) 1093f0: e8 d7 f0 ff ff call 1084cc 1093f5: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 1093f8: e8 27 a7 00 00 call 113b24 <__errno> 1093fd: c7 00 14 00 00 00 movl $0x14,(%eax) 109403: b8 ff ff ff ff mov $0xffffffff,%eax 109408: eb 93 jmp 10939d 10940a: 66 90 xchg %ax,%ax <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 10940c: 89 c2 mov %eax,%edx 10940e: 83 ec 0c sub $0xc,%esp 109411: 6a 00 push $0x0 109413: 8d 45 d0 lea -0x30(%ebp),%eax 109416: 89 45 b4 mov %eax,-0x4c(%ebp) 109419: 50 push %eax 10941a: 6a 02 push $0x2 10941c: 52 push %edx 10941d: 53 push %ebx 10941e: 89 55 ac mov %edx,-0x54(%ebp) 109421: e8 ce ef ff ff call 1083f4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 109426: 83 c4 20 add $0x20,%esp 109429: 85 c0 test %eax,%eax 10942b: 8b 55 ac mov -0x54(%ebp),%edx 10942e: 75 9a jne 1093ca <== NEVER TAKEN return -1; free_parentloc = true; 109430: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 109434: e9 df fe ff ff jmp 109318 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 109439: 83 ec 0c sub $0xc,%esp 10943c: ff 75 b4 pushl -0x4c(%ebp) 10943f: e8 88 f0 ff ff call 1084cc 109444: 83 c4 10 add $0x10,%esp return -1; 109447: b8 ff ff ff ff mov $0xffffffff,%eax 10944c: e9 4c ff ff ff jmp 10939d =============================================================================== 001087cc : uint32_t rtems_assoc_local_by_name( const rtems_assoc_t *ap, const char *name ) { 1087cc: 55 push %ebp 1087cd: 89 e5 mov %esp,%ebp 1087cf: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_name(ap, name); 1087d2: ff 75 0c pushl 0xc(%ebp) 1087d5: ff 75 08 pushl 0x8(%ebp) 1087d8: e8 13 02 00 00 call 1089f0 if (nap) 1087dd: 83 c4 10 add $0x10,%esp 1087e0: 85 c0 test %eax,%eax 1087e2: 74 08 je 1087ec return nap->local_value; 1087e4: 8b 40 04 mov 0x4(%eax),%eax return 0; } 1087e7: c9 leave 1087e8: c3 ret 1087e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_name(ap, name); if (nap) return nap->local_value; return 0; 1087ec: 31 c0 xor %eax,%eax } 1087ee: c9 leave 1087ef: c3 ret =============================================================================== 0010fabc : uint32_t rtems_assoc_local_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 10fabc: 55 push %ebp 10fabd: 89 e5 mov %esp,%ebp 10fabf: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 10fac2: ff 75 0c pushl 0xc(%ebp) 10fac5: ff 75 08 pushl 0x8(%ebp) 10fac8: e8 13 00 00 00 call 10fae0 if (nap) 10facd: 83 c4 10 add $0x10,%esp 10fad0: 85 c0 test %eax,%eax 10fad2: 74 08 je 10fadc return nap->local_value; 10fad4: 8b 40 04 mov 0x4(%eax),%eax return 0; } 10fad7: c9 leave 10fad8: c3 ret 10fad9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_remote(ap, remote_value); if (nap) return nap->local_value; return 0; 10fadc: 31 c0 xor %eax,%eax } 10fade: c9 leave 10fadf: c3 ret =============================================================================== 00112a88 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 112a88: 55 push %ebp 112a89: 89 e5 mov %esp,%ebp 112a8b: 57 push %edi 112a8c: 56 push %esi 112a8d: 53 push %ebx 112a8e: 83 ec 1c sub $0x1c,%esp 112a91: 8b 7d 0c mov 0xc(%ebp),%edi 112a94: be 20 00 00 00 mov $0x20,%esi uint32_t b; uint32_t local_value = 0; 112a99: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) for (b = 1; b; b <<= 1) { 112aa0: bb 01 00 00 00 mov $0x1,%ebx 112aa5: eb 06 jmp 112aad 112aa7: 90 nop <== NOT EXECUTED 112aa8: d1 e3 shl %ebx 112aaa: 4e dec %esi 112aab: 74 1b je 112ac8 if (b & remote_value) 112aad: 85 fb test %edi,%ebx 112aaf: 74 f7 je 112aa8 local_value |= rtems_assoc_local_by_remote(ap, b); 112ab1: 83 ec 08 sub $0x8,%esp 112ab4: 53 push %ebx 112ab5: ff 75 08 pushl 0x8(%ebp) 112ab8: e8 ff cf ff ff call 10fabc 112abd: 09 45 e4 or %eax,-0x1c(%ebp) 112ac0: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 112ac3: d1 e3 shl %ebx 112ac5: 4e dec %esi 112ac6: 75 e5 jne 112aad <== ALWAYS TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 112ac8: 8b 45 e4 mov -0x1c(%ebp),%eax 112acb: 8d 65 f4 lea -0xc(%ebp),%esp 112ace: 5b pop %ebx 112acf: 5e pop %esi 112ad0: 5f pop %edi 112ad1: c9 leave 112ad2: c3 ret =============================================================================== 00114bc0 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 114bc0: 55 push %ebp 114bc1: 89 e5 mov %esp,%ebp 114bc3: 53 push %ebx 114bc4: 83 ec 0c sub $0xc,%esp 114bc7: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 114bca: 53 push %ebx 114bcb: ff 75 08 pushl 0x8(%ebp) 114bce: e8 1d 00 00 00 call 114bf0 if (nap) 114bd3: 83 c4 10 add $0x10,%esp 114bd6: 85 c0 test %eax,%eax 114bd8: 74 0a je 114be4 return nap->name; 114bda: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 114bdc: 8b 5d fc mov -0x4(%ebp),%ebx 114bdf: c9 leave 114be0: c3 ret 114be1: 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); 114be4: 89 5d 08 mov %ebx,0x8(%ebp) } 114be7: 8b 5d fc mov -0x4(%ebp),%ebx 114bea: c9 leave nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 114beb: e9 a8 31 00 00 jmp 117d98 =============================================================================== 00108860 : char *rtems_assoc_name_by_local_bitfield( const rtems_assoc_t *ap, uint32_t value, char *buffer ) { 108860: 55 push %ebp 108861: 89 e5 mov %esp,%ebp 108863: 57 push %edi 108864: 56 push %esi 108865: 53 push %ebx 108866: 83 ec 1c sub $0x1c,%esp 108869: 8b 75 10 mov 0x10(%ebp),%esi uint32_t b; *buffer = 0; 10886c: c6 06 00 movb $0x0,(%esi) 10886f: ba 20 00 00 00 mov $0x20,%edx for (b = 1; b; b <<= 1) { 108874: bb 01 00 00 00 mov $0x1,%ebx 108879: eb 24 jmp 10889f 10887b: 90 nop <== NOT EXECUTED if (b & value) { if (*buffer) strcat(buffer, " "); strcat(buffer, rtems_assoc_name_by_local(ap, b)); 10887c: 83 ec 08 sub $0x8,%esp 10887f: 53 push %ebx 108880: ff 75 08 pushl 0x8(%ebp) 108883: 89 55 e4 mov %edx,-0x1c(%ebp) 108886: e8 41 00 00 00 call 1088cc 10888b: 5a pop %edx 10888c: 59 pop %ecx 10888d: 50 push %eax 10888e: 56 push %esi 10888f: e8 14 c1 00 00 call 1149a8 108894: 83 c4 10 add $0x10,%esp 108897: 8b 55 e4 mov -0x1c(%ebp),%edx { uint32_t b; *buffer = 0; for (b = 1; b; b <<= 1) { 10889a: d1 e3 shl %ebx 10889c: 4a dec %edx 10889d: 74 21 je 1088c0 if (b & value) { 10889f: 85 5d 0c test %ebx,0xc(%ebp) 1088a2: 74 f6 je 10889a if (*buffer) 1088a4: 80 3e 00 cmpb $0x0,(%esi) 1088a7: 74 d3 je 10887c strcat(buffer, " "); 1088a9: b9 ff ff ff ff mov $0xffffffff,%ecx 1088ae: 89 f7 mov %esi,%edi 1088b0: 31 c0 xor %eax,%eax 1088b2: f2 ae repnz scas %es:(%edi),%al 1088b4: f7 d1 not %ecx 1088b6: 66 c7 44 0e ff 20 00 movw $0x20,-0x1(%esi,%ecx,1) 1088bd: eb bd jmp 10887c 1088bf: 90 nop <== NOT EXECUTED strcat(buffer, rtems_assoc_name_by_local(ap, b)); } } return buffer; } 1088c0: 89 f0 mov %esi,%eax 1088c2: 8d 65 f4 lea -0xc(%ebp),%esp 1088c5: 5b pop %ebx 1088c6: 5e pop %esi 1088c7: 5f pop %edi 1088c8: c9 leave 1088c9: c3 ret =============================================================================== 00108968 : const char *rtems_assoc_name_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 108968: 55 push %ebp 108969: 89 e5 mov %esp,%ebp 10896b: 53 push %ebx 10896c: 83 ec 0c sub $0xc,%esp 10896f: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 108972: 53 push %ebx 108973: ff 75 08 pushl 0x8(%ebp) 108976: e8 ed 00 00 00 call 108a68 if (nap) 10897b: 83 c4 10 add $0x10,%esp 10897e: 85 c0 test %eax,%eax 108980: 74 0a je 10898c return nap->name; 108982: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(remote_value); } 108984: 8b 5d fc mov -0x4(%ebp),%ebx 108987: c9 leave 108988: c3 ret 108989: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_remote(ap, remote_value); if (nap) return nap->name; return rtems_assoc_name_bad(remote_value); 10898c: 89 5d 08 mov %ebx,0x8(%ebp) } 10898f: 8b 5d fc mov -0x4(%ebp),%ebx 108992: c9 leave nap = rtems_assoc_ptr_by_remote(ap, remote_value); if (nap) return nap->name; return rtems_assoc_name_bad(remote_value); 108993: e9 14 7e 00 00 jmp 1107ac =============================================================================== 001088fc : char *rtems_assoc_name_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t value, char *buffer ) { 1088fc: 55 push %ebp 1088fd: 89 e5 mov %esp,%ebp 1088ff: 57 push %edi 108900: 56 push %esi 108901: 53 push %ebx 108902: 83 ec 1c sub $0x1c,%esp 108905: 8b 75 10 mov 0x10(%ebp),%esi uint32_t b; *buffer = 0; 108908: c6 06 00 movb $0x0,(%esi) 10890b: ba 20 00 00 00 mov $0x20,%edx for (b = 1; b; b <<= 1) { 108910: bb 01 00 00 00 mov $0x1,%ebx 108915: eb 24 jmp 10893b 108917: 90 nop <== NOT EXECUTED if (b & value) { if (*buffer) strcat(buffer, " "); strcat(buffer, rtems_assoc_name_by_remote(ap, b)); 108918: 83 ec 08 sub $0x8,%esp 10891b: 53 push %ebx 10891c: ff 75 08 pushl 0x8(%ebp) 10891f: 89 55 e4 mov %edx,-0x1c(%ebp) 108922: e8 41 00 00 00 call 108968 108927: 5a pop %edx 108928: 59 pop %ecx 108929: 50 push %eax 10892a: 56 push %esi 10892b: e8 78 c0 00 00 call 1149a8 108930: 83 c4 10 add $0x10,%esp 108933: 8b 55 e4 mov -0x1c(%ebp),%edx { uint32_t b; *buffer = 0; for (b = 1; b; b <<= 1) { 108936: d1 e3 shl %ebx 108938: 4a dec %edx 108939: 74 21 je 10895c if (b & value) { 10893b: 85 5d 0c test %ebx,0xc(%ebp) 10893e: 74 f6 je 108936 if (*buffer) 108940: 80 3e 00 cmpb $0x0,(%esi) 108943: 74 d3 je 108918 strcat(buffer, " "); 108945: b9 ff ff ff ff mov $0xffffffff,%ecx 10894a: 89 f7 mov %esi,%edi 10894c: 31 c0 xor %eax,%eax 10894e: f2 ae repnz scas %es:(%edi),%al 108950: f7 d1 not %ecx 108952: 66 c7 44 0e ff 20 00 movw $0x20,-0x1(%esi,%ecx,1) 108959: eb bd jmp 108918 10895b: 90 nop <== NOT EXECUTED strcat(buffer, rtems_assoc_name_by_remote(ap, b)); } } return buffer; } 10895c: 89 f0 mov %esi,%eax 10895e: 8d 65 f4 lea -0xc(%ebp),%esp 108961: 5b pop %ebx 108962: 5e pop %esi 108963: 5f pop %edi 108964: c9 leave 108965: c3 ret =============================================================================== 00114bf0 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 114bf0: 55 push %ebp 114bf1: 89 e5 mov %esp,%ebp 114bf3: 57 push %edi 114bf4: 56 push %esi 114bf5: 53 push %ebx 114bf6: 8b 45 08 mov 0x8(%ebp),%eax 114bf9: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 114bfc: 8b 30 mov (%eax),%esi 114bfe: 85 f6 test %esi,%esi 114c00: 74 3e je 114c40 114c02: bf 98 73 12 00 mov $0x127398,%edi 114c07: b9 0a 00 00 00 mov $0xa,%ecx 114c0c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 114c0e: 74 18 je 114c28 const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; 114c10: 31 c9 xor %ecx,%ecx 114c12: eb 09 jmp 114c1d if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 114c14: 83 c0 0c add $0xc,%eax 114c17: 8b 18 mov (%eax),%ebx 114c19: 85 db test %ebx,%ebx 114c1b: 74 1b je 114c38 if (ap->local_value == local_value) 114c1d: 39 50 04 cmp %edx,0x4(%eax) 114c20: 75 f2 jne 114c14 return ap; return default_ap; } 114c22: 5b pop %ebx 114c23: 5e pop %esi 114c24: 5f pop %edi 114c25: c9 leave 114c26: c3 ret 114c27: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 114c28: 8d 58 0c lea 0xc(%eax),%ebx for ( ; ap->name; ap++) 114c2b: 8b 70 0c mov 0xc(%eax),%esi 114c2e: 85 f6 test %esi,%esi 114c30: 74 f0 je 114c22 <== NEVER TAKEN 114c32: 89 c1 mov %eax,%ecx 114c34: 89 d8 mov %ebx,%eax 114c36: eb e5 jmp 114c1d 114c38: 89 c8 mov %ecx,%eax if (ap->local_value == local_value) return ap; return default_ap; } 114c3a: 5b pop %ebx 114c3b: 5e pop %esi 114c3c: 5f pop %edi 114c3d: c9 leave 114c3e: c3 ret 114c3f: 90 nop <== NOT EXECUTED const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; 114c40: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 114c42: 5b pop %ebx 114c43: 5e pop %esi 114c44: 5f pop %edi 114c45: c9 leave 114c46: c3 ret =============================================================================== 001089f0 : const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { 1089f0: 55 push %ebp 1089f1: 89 e5 mov %esp,%ebp 1089f3: 57 push %edi 1089f4: 56 push %esi 1089f5: 53 push %ebx 1089f6: 83 ec 0c sub $0xc,%esp 1089f9: 8b 5d 08 mov 0x8(%ebp),%ebx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 1089fc: 8b 03 mov (%ebx),%eax 1089fe: 85 c0 test %eax,%eax 108a00: 74 5a je 108a5c 108a02: bf dd 02 12 00 mov $0x1202dd,%edi 108a07: b9 0a 00 00 00 mov $0xa,%ecx 108a0c: 89 c6 mov %eax,%esi 108a0e: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 108a10: 74 2e je 108a40 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; 108a12: 31 f6 xor %esi,%esi 108a14: eb 0b jmp 108a21 108a16: 66 90 xchg %ax,%ax <== NOT EXECUTED if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 108a18: 83 c3 0c add $0xc,%ebx 108a1b: 8b 03 mov (%ebx),%eax 108a1d: 85 c0 test %eax,%eax 108a1f: 74 2f je 108a50 if (strcmp(ap->name, name) == 0) 108a21: 83 ec 08 sub $0x8,%esp 108a24: ff 75 0c pushl 0xc(%ebp) 108a27: 50 push %eax 108a28: e8 cf c0 00 00 call 114afc 108a2d: 83 c4 10 add $0x10,%esp 108a30: 85 c0 test %eax,%eax 108a32: 75 e4 jne 108a18 return ap; return default_ap; } 108a34: 89 d8 mov %ebx,%eax 108a36: 8d 65 f4 lea -0xc(%ebp),%esp 108a39: 5b pop %ebx 108a3a: 5e pop %esi 108a3b: 5f pop %edi 108a3c: c9 leave 108a3d: c3 ret 108a3e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 108a40: 8d 53 0c lea 0xc(%ebx),%edx for ( ; ap->name; ap++) 108a43: 8b 43 0c mov 0xc(%ebx),%eax 108a46: 85 c0 test %eax,%eax 108a48: 74 ea je 108a34 <== NEVER TAKEN 108a4a: 89 de mov %ebx,%esi 108a4c: 89 d3 mov %edx,%ebx 108a4e: eb d1 jmp 108a21 108a50: 89 f3 mov %esi,%ebx if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 108a52: 89 d8 mov %ebx,%eax 108a54: 8d 65 f4 lea -0xc(%ebp),%esp 108a57: 5b pop %ebx 108a58: 5e pop %esi 108a59: 5f pop %edi 108a5a: c9 leave 108a5b: c3 ret const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; 108a5c: 31 db xor %ebx,%ebx for ( ; ap->name; ap++) if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 108a5e: 89 d8 mov %ebx,%eax 108a60: 8d 65 f4 lea -0xc(%ebp),%esp 108a63: 5b pop %ebx 108a64: 5e pop %esi 108a65: 5f pop %edi 108a66: c9 leave 108a67: c3 ret =============================================================================== 0010fae0 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 10fae0: 55 push %ebp 10fae1: 89 e5 mov %esp,%ebp 10fae3: 57 push %edi 10fae4: 56 push %esi 10fae5: 53 push %ebx 10fae6: 8b 45 08 mov 0x8(%ebp),%eax 10fae9: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 10faec: 8b 30 mov (%eax),%esi 10faee: 85 f6 test %esi,%esi 10faf0: 74 3e je 10fb30 10faf2: bf 38 10 12 00 mov $0x121038,%edi 10faf7: b9 0a 00 00 00 mov $0xa,%ecx 10fafc: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10fafe: 74 18 je 10fb18 const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; 10fb00: 31 c9 xor %ecx,%ecx 10fb02: eb 09 jmp 10fb0d if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 10fb04: 83 c0 0c add $0xc,%eax 10fb07: 8b 18 mov (%eax),%ebx 10fb09: 85 db test %ebx,%ebx 10fb0b: 74 1b je 10fb28 if (ap->remote_value == remote_value) 10fb0d: 39 50 08 cmp %edx,0x8(%eax) 10fb10: 75 f2 jne 10fb04 return ap; return default_ap; } 10fb12: 5b pop %ebx 10fb13: 5e pop %esi 10fb14: 5f pop %edi 10fb15: c9 leave 10fb16: c3 ret 10fb17: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 10fb18: 8d 58 0c lea 0xc(%eax),%ebx for ( ; ap->name; ap++) 10fb1b: 8b 70 0c mov 0xc(%eax),%esi 10fb1e: 85 f6 test %esi,%esi 10fb20: 74 f0 je 10fb12 <== NEVER TAKEN 10fb22: 89 c1 mov %eax,%ecx 10fb24: 89 d8 mov %ebx,%eax 10fb26: eb e5 jmp 10fb0d 10fb28: 89 c8 mov %ecx,%eax if (ap->remote_value == remote_value) return ap; return default_ap; } 10fb2a: 5b pop %ebx 10fb2b: 5e pop %esi 10fb2c: 5f pop %edi 10fb2d: c9 leave 10fb2e: c3 ret 10fb2f: 90 nop <== NOT EXECUTED const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; 10fb30: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 10fb32: 5b pop %ebx 10fb33: 5e pop %esi 10fb34: 5f pop %edi 10fb35: c9 leave 10fb36: c3 ret =============================================================================== 00108b0c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 108b0c: 55 push %ebp 108b0d: 89 e5 mov %esp,%ebp 108b0f: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 108b12: ff 75 0c pushl 0xc(%ebp) 108b15: ff 75 08 pushl 0x8(%ebp) 108b18: e8 7b fe ff ff call 108998 if (nap) 108b1d: 83 c4 10 add $0x10,%esp 108b20: 85 c0 test %eax,%eax 108b22: 74 08 je 108b2c return nap->remote_value; 108b24: 8b 40 08 mov 0x8(%eax),%eax return 0; } 108b27: c9 leave 108b28: c3 ret 108b29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->remote_value; return 0; 108b2c: 31 c0 xor %eax,%eax } 108b2e: c9 leave 108b2f: c3 ret =============================================================================== 00108ac0 : uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { 108ac0: 55 push %ebp 108ac1: 89 e5 mov %esp,%ebp 108ac3: 57 push %edi 108ac4: 56 push %esi 108ac5: 53 push %ebx 108ac6: 83 ec 1c sub $0x1c,%esp 108ac9: 8b 7d 0c mov 0xc(%ebp),%edi 108acc: be 20 00 00 00 mov $0x20,%esi uint32_t b; uint32_t remote_value = 0; 108ad1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) for (b = 1; b; b <<= 1) 108ad8: bb 01 00 00 00 mov $0x1,%ebx 108add: eb 06 jmp 108ae5 108adf: 90 nop <== NOT EXECUTED 108ae0: d1 e3 shl %ebx 108ae2: 4e dec %esi 108ae3: 74 1b je 108b00 if (b & local_value) 108ae5: 85 fb test %edi,%ebx 108ae7: 74 f7 je 108ae0 remote_value |= rtems_assoc_remote_by_local(ap, b); 108ae9: 83 ec 08 sub $0x8,%esp 108aec: 53 push %ebx 108aed: ff 75 08 pushl 0x8(%ebp) 108af0: e8 17 00 00 00 call 108b0c 108af5: 09 45 e4 or %eax,-0x1c(%ebp) 108af8: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) 108afb: d1 e3 shl %ebx 108afd: 4e dec %esi 108afe: 75 e5 jne 108ae5 <== ALWAYS TAKEN if (b & local_value) remote_value |= rtems_assoc_remote_by_local(ap, b); return remote_value; } 108b00: 8b 45 e4 mov -0x1c(%ebp),%eax 108b03: 8d 65 f4 lea -0xc(%ebp),%esp 108b06: 5b pop %ebx 108b07: 5e pop %esi 108b08: 5f pop %edi 108b09: c9 leave 108b0a: c3 ret =============================================================================== 00108b30 : uint32_t rtems_assoc_remote_by_name( const rtems_assoc_t *ap, const char *name ) { 108b30: 55 push %ebp 108b31: 89 e5 mov %esp,%ebp 108b33: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_name(ap, name); 108b36: ff 75 0c pushl 0xc(%ebp) 108b39: ff 75 08 pushl 0x8(%ebp) 108b3c: e8 af fe ff ff call 1089f0 if (nap) 108b41: 83 c4 10 add $0x10,%esp 108b44: 85 c0 test %eax,%eax 108b46: 74 08 je 108b50 return nap->remote_value; 108b48: 8b 40 08 mov 0x8(%eax),%eax return 0; } 108b4b: c9 leave 108b4c: c3 ret 108b4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_name(ap, name); if (nap) return nap->remote_value; return 0; 108b50: 31 c0 xor %eax,%eax } 108b52: c9 leave 108b53: c3 ret =============================================================================== 001135a4 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 1135a4: 55 push %ebp 1135a5: 89 e5 mov %esp,%ebp 1135a7: 57 push %edi 1135a8: 56 push %esi 1135a9: 53 push %ebx 1135aa: 83 ec 2c sub $0x2c,%esp 1135ad: 8b 5d 08 mov 0x8(%ebp),%ebx 1135b0: 8b 7d 0c mov 0xc(%ebp),%edi 1135b3: 8b 45 10 mov 0x10(%ebp),%eax 1135b6: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1135b9: 85 db test %ebx,%ebx 1135bb: 0f 84 87 00 00 00 je 113648 return RTEMS_INVALID_NAME; if ( !id ) 1135c1: 85 f6 test %esi,%esi 1135c3: 0f 84 bf 00 00 00 je 113688 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 1135c9: f7 c7 10 00 00 00 test $0x10,%edi 1135cf: 0f 84 83 00 00 00 je 113658 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 1135d5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 1135dc: 85 c0 test %eax,%eax 1135de: 0f 84 80 00 00 00 je 113664 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 1135e4: 89 45 e4 mov %eax,-0x1c(%ebp) 1135e7: a1 74 9e 12 00 mov 0x129e74,%eax 1135ec: 40 inc %eax 1135ed: a3 74 9e 12 00 mov %eax,0x129e74 * 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 ); 1135f2: 83 ec 0c sub $0xc,%esp 1135f5: 68 40 a8 12 00 push $0x12a840 1135fa: e8 19 b1 ff ff call 10e718 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 1135ff: 83 c4 10 add $0x10,%esp 113602: 85 c0 test %eax,%eax 113604: 74 6e je 113674 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 113606: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 113609: 83 ec 08 sub $0x8,%esp 11360c: 8d 55 e0 lea -0x20(%ebp),%edx 11360f: 52 push %edx 113610: 8d 50 14 lea 0x14(%eax),%edx 113613: 52 push %edx 113614: 89 45 d4 mov %eax,-0x2c(%ebp) 113617: e8 b4 07 00 00 call 113dd0 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 11361c: 8b 45 d4 mov -0x2c(%ebp),%eax 11361f: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 113622: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113625: 8b 0d 5c a8 12 00 mov 0x12a85c,%ecx 11362b: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11362e: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 113631: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 113633: e8 58 be ff ff call 10f490 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 113638: 83 c4 10 add $0x10,%esp 11363b: 31 c0 xor %eax,%eax } 11363d: 8d 65 f4 lea -0xc(%ebp),%esp 113640: 5b pop %ebx 113641: 5e pop %esi 113642: 5f pop %edi 113643: c9 leave 113644: c3 ret 113645: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 113648: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11364d: 8d 65 f4 lea -0xc(%ebp),%esp 113650: 5b pop %ebx 113651: 5e pop %esi 113652: 5f pop %edi 113653: c9 leave 113654: c3 ret 113655: 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; 113658: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 11365f: eb 83 jmp 1135e4 113661: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; 113664: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113669: 8d 65 f4 lea -0xc(%ebp),%esp 11366c: 5b pop %ebx 11366d: 5e pop %esi 11366e: 5f pop %edi 11366f: c9 leave 113670: c3 ret 113671: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 113674: e8 17 be ff ff call 10f490 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 113679: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11367e: 8d 65 f4 lea -0xc(%ebp),%esp 113681: 5b pop %ebx 113682: 5e pop %esi 113683: 5f pop %edi 113684: c9 leave 113685: c3 ret 113686: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 113688: b8 09 00 00 00 mov $0x9,%eax 11368d: eb ae jmp 11363d =============================================================================== 00113690 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 113690: 55 push %ebp 113691: 89 e5 mov %esp,%ebp 113693: 53 push %ebx 113694: 83 ec 18 sub $0x18,%esp Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 113697: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 11369a: 50 push %eax 11369b: ff 75 08 pushl 0x8(%ebp) 11369e: 68 40 a8 12 00 push $0x12a840 1136a3: e8 28 b5 ff ff call 10ebd0 <_Objects_Get> 1136a8: 89 c3 mov %eax,%ebx switch ( location ) { 1136aa: 83 c4 10 add $0x10,%esp 1136ad: 8b 4d f4 mov -0xc(%ebp),%ecx 1136b0: 85 c9 test %ecx,%ecx 1136b2: 75 38 jne 1136ec case OBJECTS_LOCAL: _CORE_barrier_Flush( 1136b4: 52 push %edx 1136b5: 6a 02 push $0x2 1136b7: 6a 00 push $0x0 1136b9: 8d 40 14 lea 0x14(%eax),%eax 1136bc: 50 push %eax 1136bd: e8 16 c5 ff ff call 10fbd8 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 1136c2: 59 pop %ecx 1136c3: 58 pop %eax 1136c4: 53 push %ebx 1136c5: 68 40 a8 12 00 push $0x12a840 1136ca: e8 c5 b0 ff ff call 10e794 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 1136cf: 58 pop %eax 1136d0: 5a pop %edx 1136d1: 53 push %ebx 1136d2: 68 40 a8 12 00 push $0x12a840 1136d7: e8 b4 b3 ff ff call 10ea90 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 1136dc: e8 af bd ff ff call 10f490 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1136e1: 83 c4 10 add $0x10,%esp 1136e4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1136e6: 8b 5d fc mov -0x4(%ebp),%ebx 1136e9: c9 leave 1136ea: c3 ret 1136eb: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1136ec: b8 04 00 00 00 mov $0x4,%eax } 1136f1: 8b 5d fc mov -0x4(%ebp),%ebx 1136f4: c9 leave 1136f5: c3 ret =============================================================================== 00113784 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 113784: 55 push %ebp 113785: 89 e5 mov %esp,%ebp 113787: 53 push %ebx 113788: 83 ec 18 sub $0x18,%esp 11378b: 8b 5d 08 mov 0x8(%ebp),%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 11378e: 8d 45 f4 lea -0xc(%ebp),%eax 113791: 50 push %eax 113792: 53 push %ebx 113793: 68 40 a8 12 00 push $0x12a840 113798: e8 33 b4 ff ff call 10ebd0 <_Objects_Get> switch ( location ) { 11379d: 83 c4 10 add $0x10,%esp 1137a0: 8b 55 f4 mov -0xc(%ebp),%edx 1137a3: 85 d2 test %edx,%edx 1137a5: 75 35 jne 1137dc case OBJECTS_LOCAL: _CORE_barrier_Wait( 1137a7: 83 ec 0c sub $0xc,%esp 1137aa: 6a 00 push $0x0 1137ac: ff 75 0c pushl 0xc(%ebp) 1137af: 6a 01 push $0x1 1137b1: 53 push %ebx 1137b2: 83 c0 14 add $0x14,%eax 1137b5: 50 push %eax 1137b6: e8 79 06 00 00 call 113e34 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 1137bb: 83 c4 20 add $0x20,%esp 1137be: e8 cd bc ff ff call 10f490 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 1137c3: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 1137c6: a1 38 a4 12 00 mov 0x12a438,%eax true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 1137cb: ff 70 34 pushl 0x34(%eax) 1137ce: e8 69 19 00 00 call 11513c <_Barrier_Translate_core_barrier_return_code> 1137d3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1137d6: 8b 5d fc mov -0x4(%ebp),%ebx 1137d9: c9 leave 1137da: c3 ret 1137db: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1137dc: b8 04 00 00 00 mov $0x4,%eax } 1137e1: 8b 5d fc mov -0x4(%ebp),%ebx 1137e4: c9 leave 1137e5: c3 ret =============================================================================== 00107d1c : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 107d1c: 55 push %ebp 107d1d: 89 e5 mov %esp,%ebp 107d1f: 57 push %edi 107d20: 56 push %esi 107d21: 53 push %ebx 107d22: 83 ec 1c sub $0x1c,%esp 107d25: 8b 45 08 mov 0x8(%ebp),%eax 107d28: 8b 5d 0c mov 0xc(%ebp),%ebx 107d2b: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 107d2e: 85 c0 test %eax,%eax 107d30: 75 0e jne 107d40 value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p ) return NULL; 107d32: 31 db xor %ebx,%ebx copy_string( p, value, length ); return value; } 107d34: 89 d8 mov %ebx,%eax 107d36: 8d 65 f4 lea -0xc(%ebp),%esp 107d39: 5b pop %ebx 107d3a: 5e pop %esi 107d3b: 5f pop %edi 107d3c: c9 leave 107d3d: c3 ret 107d3e: 66 90 xchg %ax,%ax <== NOT EXECUTED const char *p; if ( !name ) return NULL; if ( !value ) 107d40: 85 db test %ebx,%ebx 107d42: 74 f0 je 107d34 return NULL; if ( !length ) 107d44: 85 f6 test %esi,%esi 107d46: 74 ea je 107d32 return NULL; value[0] = '\0'; 107d48: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 107d4b: 83 ec 0c sub $0xc,%esp 107d4e: 50 push %eax 107d4f: e8 48 00 00 00 call 107d9c if ( !p ) 107d54: 83 c4 10 add $0x10,%esp 107d57: 85 c0 test %eax,%eax 107d59: 74 d7 je 107d32 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN 107d61: 4e dec %esi 107d62: 89 75 e4 mov %esi,-0x1c(%ebp) 107d65: 74 cd je 107d34 <== NEVER TAKEN 107d67: 31 f6 xor %esi,%esi 107d69: 31 d2 xor %edx,%edx 107d6b: 31 ff xor %edi,%edi 107d6d: eb 24 jmp 107d93 107d6f: 90 nop <== NOT EXECUTED if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 107d70: f7 c7 01 00 00 00 test $0x1,%edi 107d76: 75 05 jne 107d7d 107d78: 80 f9 20 cmp $0x20,%cl 107d7b: 74 b7 je 107d34 break; value[i++] = *p++; 107d7d: 88 0c 33 mov %cl,(%ebx,%esi,1) 107d80: 42 inc %edx 107d81: 89 d6 mov %edx,%esi value[i] = '\0'; 107d83: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 107d8e: 3b 55 e4 cmp -0x1c(%ebp),%edx 107d91: 73 a1 jae 107d34 if ( *p == '\"' ) { 107d93: 80 f9 22 cmp $0x22,%cl 107d96: 75 d8 jne 107d70 quotes++; 107d98: 47 inc %edi 107d99: eb e2 jmp 107d7d =============================================================================== 00107d9c : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 107d9c: 55 push %ebp 107d9d: 89 e5 mov %esp,%ebp 107d9f: 83 ec 08 sub $0x8,%esp 107da2: 8b 45 08 mov 0x8(%ebp),%eax const char *p; if ( !name ) 107da5: 85 c0 test %eax,%eax 107da7: 75 07 jne 107db0 return NULL; if ( !bsp_boot_cmdline ) return NULL; 107da9: 31 c0 xor %eax,%eax p = strstr(bsp_boot_cmdline, name); /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 107dab: c9 leave 107dac: c3 ret 107dad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const char *p; if ( !name ) return NULL; if ( !bsp_boot_cmdline ) 107db0: 8b 15 f8 7b 12 00 mov 0x127bf8,%edx 107db6: 85 d2 test %edx,%edx 107db8: 74 ef je 107da9 return NULL; p = strstr(bsp_boot_cmdline, name); 107dba: 83 ec 08 sub $0x8,%esp 107dbd: 50 push %eax 107dbe: 52 push %edx 107dbf: e8 ec cd 00 00 call 114bb0 107dc4: 83 c4 10 add $0x10,%esp /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 107dc7: c9 leave 107dc8: c3 ret =============================================================================== 00107dcc : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 107dcc: 55 push %ebp 107dcd: 89 e5 mov %esp,%ebp 107dcf: 57 push %edi 107dd0: 53 push %ebx 107dd1: 8b 7d 08 mov 0x8(%ebp),%edi 107dd4: 8b 5d 0c mov 0xc(%ebp),%ebx const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 107dd7: 50 push %eax 107dd8: ff 75 10 pushl 0x10(%ebp) 107ddb: 53 push %ebx 107ddc: 57 push %edi 107ddd: e8 3a ff ff ff call 107d1c 107de2: 89 c2 mov %eax,%edx if ( !p ) 107de4: 83 c4 10 add $0x10,%esp 107de7: 85 c0 test %eax,%eax 107de9: 75 0d jne 107df8 return NULL; rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; 107deb: 31 db xor %ebx,%ebx if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; } 107ded: 89 d8 mov %ebx,%eax 107def: 8d 65 f8 lea -0x8(%ebp),%esp 107df2: 5b pop %ebx 107df3: 5f pop %edi 107df4: c9 leave 107df5: c3 ret 107df6: 66 90 xchg %ax,%ax <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 107df8: 31 c0 xor %eax,%eax 107dfa: b9 ff ff ff ff mov $0xffffffff,%ecx 107dff: f2 ae repnz scas %es:(%edi),%al 107e01: f7 d1 not %ecx 107e03: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax if ( *rhs != '=' ) 107e07: 80 38 3d cmpb $0x3d,(%eax) 107e0a: 75 df jne 107deb return NULL; rhs++; 107e0c: 8d 48 01 lea 0x1(%eax),%ecx if ( *rhs == '\"' ) 107e0f: 8a 50 01 mov 0x1(%eax),%dl 107e12: 80 fa 22 cmp $0x22,%dl 107e15: 74 29 je 107e40 rhs++; for ( d=value ; *rhs ; ) 107e17: 84 d2 test %dl,%dl 107e19: 74 31 je 107e4c 107e1b: 89 d8 mov %ebx,%eax 107e1d: 8d 76 00 lea 0x0(%esi),%esi *d++ = *rhs++; 107e20: 88 10 mov %dl,(%eax) 107e22: 40 inc %eax 107e23: 41 inc %ecx return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 107e24: 8a 11 mov (%ecx),%dl 107e26: 84 d2 test %dl,%dl 107e28: 75 f6 jne 107e20 *d++ = *rhs++; if ( *(d-1) == '\"' ) 107e2a: 8d 50 ff lea -0x1(%eax),%edx 107e2d: 80 78 ff 22 cmpb $0x22,-0x1(%eax) 107e31: 74 15 je 107e48 d--; *d = '\0'; 107e33: c6 00 00 movb $0x0,(%eax) return value; } 107e36: 89 d8 mov %ebx,%eax 107e38: 8d 65 f8 lea -0x8(%ebp),%esp 107e3b: 5b pop %ebx 107e3c: 5f pop %edi 107e3d: c9 leave 107e3e: c3 ret 107e3f: 90 nop <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 107e40: 8d 48 02 lea 0x2(%eax),%ecx 107e43: 8a 50 02 mov 0x2(%eax),%dl 107e46: eb cf jmp 107e17 for ( d=value ; *rhs ; ) *d++ = *rhs++; if ( *(d-1) == '\"' ) 107e48: 89 d0 mov %edx,%eax 107e4a: eb e7 jmp 107e33 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 107e4c: 89 d8 mov %ebx,%eax 107e4e: eb da jmp 107e2a =============================================================================== 0010bff0 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10bff0: 55 push %ebp 10bff1: 89 e5 mov %esp,%ebp 10bff3: 56 push %esi 10bff4: 53 push %ebx 10bff5: 8b 5d 10 mov 0x10(%ebp),%ebx 10bff8: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); 10bffb: 83 ec 08 sub $0x8,%esp 10bffe: ff 75 0c pushl 0xc(%ebp) 10c001: ff 75 08 pushl 0x8(%ebp) 10c004: e8 df 04 00 00 call 10c4e8 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { 10c009: 83 c4 10 add $0x10,%esp 10c00c: 84 c0 test %al,%al 10c00e: 75 0c jne 10c01c <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c010: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c012: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c015: 5b pop %ebx <== NOT EXECUTED 10c016: 5e pop %esi <== NOT EXECUTED 10c017: c9 leave <== NOT EXECUTED 10c018: c3 ret <== NOT EXECUTED 10c019: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10c01c: 89 75 0c mov %esi,0xc(%ebp) 10c01f: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c022: 8d 65 f8 lea -0x8(%ebp),%esp 10c025: 5b pop %ebx 10c026: 5e pop %esi 10c027: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10c028: e9 af f5 ff ff jmp 10b5dc =============================================================================== 0010c030 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { 10c030: 55 push %ebp 10c031: 89 e5 mov %esp,%ebp 10c033: 56 push %esi 10c034: 53 push %ebx 10c035: 8b 5d 0c mov 0xc(%ebp),%ebx 10c038: 8b 75 10 mov 0x10(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( rtems_chain_control *chain, rtems_chain_node **node ) { return _Chain_Get_with_empty_check( chain, node ); 10c03b: 83 ec 08 sub $0x8,%esp 10c03e: ff 75 14 pushl 0x14(%ebp) 10c041: ff 75 08 pushl 0x8(%ebp) 10c044: e8 07 05 00 00 call 10c550 <_Chain_Get_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { 10c049: 83 c4 10 add $0x10,%esp 10c04c: 84 c0 test %al,%al 10c04e: 75 0c jne 10c05c <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c050: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c052: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c055: 5b pop %ebx <== NOT EXECUTED 10c056: 5e pop %esi <== NOT EXECUTED 10c057: c9 leave <== NOT EXECUTED 10c058: c3 ret <== NOT EXECUTED 10c059: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 10c05c: 89 75 0c mov %esi,0xc(%ebp) 10c05f: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c062: 8d 65 f8 lea -0x8(%ebp),%esp 10c065: 5b pop %ebx 10c066: 5e pop %esi 10c067: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 10c068: e9 6f f5 ff ff jmp 10b5dc =============================================================================== 0010c070 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10c070: 55 push %ebp 10c071: 89 e5 mov %esp,%ebp 10c073: 57 push %edi 10c074: 56 push %esi 10c075: 53 push %ebx 10c076: 83 ec 1c sub $0x1c,%esp 10c079: 8b 75 08 mov 0x8(%ebp),%esi while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 10c07c: 8d 7d e4 lea -0x1c(%ebp),%edi 10c07f: 90 nop */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10c080: 83 ec 0c sub $0xc,%esp 10c083: 56 push %esi 10c084: e8 03 05 00 00 call 10c58c <_Chain_Get> 10c089: 89 c3 mov %eax,%ebx rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c08b: 83 c4 10 add $0x10,%esp 10c08e: 85 c0 test %eax,%eax 10c090: 75 22 jne 10c0b4 ) { rtems_event_set out; sc = rtems_event_receive( 10c092: 57 push %edi 10c093: ff 75 10 pushl 0x10(%ebp) 10c096: 6a 00 push $0x0 10c098: ff 75 0c pushl 0xc(%ebp) 10c09b: e8 b4 f3 ff ff call 10b454 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10c0a0: 83 c4 10 add $0x10,%esp 10c0a3: 85 c0 test %eax,%eax 10c0a5: 74 d9 je 10c080 <== NEVER TAKEN timeout, &out ); } *node_ptr = node; 10c0a7: 8b 55 14 mov 0x14(%ebp),%edx 10c0aa: 89 1a mov %ebx,(%edx) return sc; } 10c0ac: 8d 65 f4 lea -0xc(%ebp),%esp 10c0af: 5b pop %ebx 10c0b0: 5e pop %esi 10c0b1: 5f pop %edi 10c0b2: c9 leave 10c0b3: c3 ret rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c0b4: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10c0b6: 8b 55 14 mov 0x14(%ebp),%edx 10c0b9: 89 1a mov %ebx,(%edx) return sc; } 10c0bb: 8d 65 f4 lea -0xc(%ebp),%esp 10c0be: 5b pop %ebx 10c0bf: 5e pop %esi 10c0c0: 5f pop %edi 10c0c1: c9 leave 10c0c2: c3 ret =============================================================================== 0010c0c4 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10c0c4: 55 push %ebp 10c0c5: 89 e5 mov %esp,%ebp 10c0c7: 56 push %esi 10c0c8: 53 push %ebx 10c0c9: 8b 5d 10 mov 0x10(%ebp),%ebx 10c0cc: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); 10c0cf: 83 ec 08 sub $0x8,%esp 10c0d2: ff 75 0c pushl 0xc(%ebp) 10c0d5: ff 75 08 pushl 0x8(%ebp) 10c0d8: e8 f3 04 00 00 call 10c5d0 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { 10c0dd: 83 c4 10 add $0x10,%esp 10c0e0: 84 c0 test %al,%al 10c0e2: 75 0c jne 10c0f0 <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c0e4: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c0e6: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c0e9: 5b pop %ebx <== NOT EXECUTED 10c0ea: 5e pop %esi <== NOT EXECUTED 10c0eb: c9 leave <== NOT EXECUTED 10c0ec: c3 ret <== NOT EXECUTED 10c0ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10c0f0: 89 75 0c mov %esi,0xc(%ebp) 10c0f3: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c0f6: 8d 65 f8 lea -0x8(%ebp),%esp 10c0f9: 5b pop %ebx 10c0fa: 5e pop %esi 10c0fb: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10c0fc: e9 db f4 ff ff jmp 10b5dc =============================================================================== 00115a3c : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115a3c: 55 push %ebp 115a3d: 89 e5 mov %esp,%ebp 115a3f: 53 push %ebx 115a40: 83 ec 04 sub $0x4,%esp 115a43: 8b 45 08 mov 0x8(%ebp),%eax 115a46: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115a49: 85 db test %ebx,%ebx 115a4b: 74 3b je 115a88 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115a4d: 85 c0 test %eax,%eax 115a4f: 74 2b je 115a7c return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 115a51: 83 f8 01 cmp $0x1,%eax 115a54: 74 3e je 115a94 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 115a56: 83 f8 02 cmp $0x2,%eax 115a59: 74 45 je 115aa0 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 115a5b: 83 f8 03 cmp $0x3,%eax 115a5e: 74 4c je 115aac *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 115a60: 83 f8 04 cmp $0x4,%eax 115a63: 74 0b je 115a70 return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 115a65: b8 0a 00 00 00 mov $0xa,%eax } 115a6a: 5a pop %edx 115a6b: 5b pop %ebx 115a6c: c9 leave 115a6d: c3 ret 115a6e: 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 ); 115a70: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 115a73: 59 pop %ecx 115a74: 5b pop %ebx 115a75: 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 ); 115a76: e9 41 01 00 00 jmp 115bbc 115a7b: 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 ); 115a7c: 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; } 115a7f: 58 pop %eax 115a80: 5b pop %ebx 115a81: 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 ); 115a82: e9 81 00 00 00 jmp 115b08 115a87: 90 nop <== NOT EXECUTED rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 115a88: 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; } 115a8d: 5a pop %edx 115a8e: 5b pop %ebx 115a8f: c9 leave 115a90: c3 ret 115a91: 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); 115a94: 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; } 115a97: 5b pop %ebx 115a98: 5b pop %ebx 115a99: 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); 115a9a: e9 19 00 00 00 jmp 115ab8 115a9f: 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(); 115aa0: e8 57 00 00 00 call 115afc 115aa5: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115aa7: 31 c0 xor %eax,%eax 115aa9: eb bf jmp 115a6a 115aab: 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(); 115aac: e8 37 00 00 00 call 115ae8 115ab1: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115ab3: 31 c0 xor %eax,%eax 115ab5: eb b3 jmp 115a6a =============================================================================== 0010bfc8 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10bfc8: 55 push %ebp 10bfc9: 89 e5 mov %esp,%ebp 10bfcb: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10bfce: 85 c0 test %eax,%eax 10bfd0: 74 1e je 10bff0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10bfd2: 80 3d 68 23 13 00 00 cmpb $0x0,0x132368 10bfd9: 74 0d je 10bfe8 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10bfdb: 8b 15 e8 23 13 00 mov 0x1323e8,%edx 10bfe1: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10bfe3: 31 c0 xor %eax,%eax } 10bfe5: c9 leave 10bfe6: c3 ret 10bfe7: 90 nop <== NOT EXECUTED { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10bfe8: b8 0b 00 00 00 mov $0xb,%eax *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10bfed: c9 leave 10bfee: c3 ret 10bfef: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; 10bff0: b8 09 00 00 00 mov $0x9,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10bff5: c9 leave 10bff6: c3 ret =============================================================================== 00115bbc : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115bbc: 55 push %ebp 115bbd: 89 e5 mov %esp,%ebp 115bbf: 56 push %esi 115bc0: 53 push %ebx 115bc1: 83 ec 10 sub $0x10,%esp 115bc4: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115bc7: 85 db test %ebx,%ebx 115bc9: 74 51 je 115c1c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115bcb: 80 3d 28 21 14 00 00 cmpb $0x0,0x142128 115bd2: 75 0c jne 115be0 return RTEMS_NOT_DEFINED; 115bd4: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115bd9: 8d 65 f8 lea -0x8(%ebp),%esp 115bdc: 5b pop %ebx 115bdd: 5e pop %esi 115bde: c9 leave 115bdf: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 115be0: 9c pushf 115be1: fa cli 115be2: 5e pop %esi _TOD_Get( &now ); 115be3: 83 ec 0c sub $0xc,%esp 115be6: 8d 45 f0 lea -0x10(%ebp),%eax 115be9: 50 push %eax 115bea: e8 e9 43 00 00 call 119fd8 <_TOD_Get> _ISR_Enable(level); 115bef: 56 push %esi 115bf0: 9d popf useconds = (suseconds_t)now.tv_nsec; 115bf1: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115bf4: 8b 45 f0 mov -0x10(%ebp),%eax 115bf7: 89 03 mov %eax,(%ebx) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 115bf9: b8 d3 4d 62 10 mov $0x10624dd3,%eax 115bfe: f7 e9 imul %ecx 115c00: 89 d0 mov %edx,%eax 115c02: c1 f8 06 sar $0x6,%eax 115c05: c1 f9 1f sar $0x1f,%ecx 115c08: 29 c8 sub %ecx,%eax 115c0a: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115c0d: 83 c4 10 add $0x10,%esp 115c10: 31 c0 xor %eax,%eax } 115c12: 8d 65 f8 lea -0x8(%ebp),%esp 115c15: 5b pop %ebx 115c16: 5e pop %esi 115c17: c9 leave 115c18: c3 ret 115c19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) return RTEMS_INVALID_ADDRESS; 115c1c: b8 09 00 00 00 mov $0x9,%eax 115c21: eb b6 jmp 115bd9 =============================================================================== 0010b1b4 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b1b4: 55 push %ebp 10b1b5: 89 e5 mov %esp,%ebp 10b1b7: 83 ec 08 sub $0x8,%esp 10b1ba: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b1bd: 85 c0 test %eax,%eax 10b1bf: 74 13 je 10b1d4 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b1c1: 83 ec 0c sub $0xc,%esp 10b1c4: 50 push %eax 10b1c5: e8 72 16 00 00 call 10c83c <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10b1ca: 83 c4 10 add $0x10,%esp 10b1cd: 31 c0 xor %eax,%eax } 10b1cf: c9 leave 10b1d0: c3 ret 10b1d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; 10b1d4: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b1d9: c9 leave 10b1da: c3 ret =============================================================================== 0010c0e8 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c0e8: 55 push %ebp 10c0e9: 89 e5 mov %esp,%ebp 10c0eb: 53 push %ebx 10c0ec: 83 ec 14 sub $0x14,%esp 10c0ef: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c0f2: 85 db test %ebx,%ebx 10c0f4: 74 66 je 10c15c return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c0f6: 83 ec 0c sub $0xc,%esp 10c0f9: 53 push %ebx 10c0fa: e8 39 01 00 00 call 10c238 <_TOD_Validate> 10c0ff: 83 c4 10 add $0x10,%esp 10c102: 84 c0 test %al,%al 10c104: 75 0a jne 10c110 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10c106: b8 14 00 00 00 mov $0x14,%eax } 10c10b: 8b 5d fc mov -0x4(%ebp),%ebx 10c10e: c9 leave 10c10f: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c110: 83 ec 0c sub $0xc,%esp 10c113: 53 push %ebx 10c114: e8 93 00 00 00 call 10c1ac <_TOD_To_seconds> 10c119: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c11c: 8b 43 18 mov 0x18(%ebx),%eax 10c11f: 0f af 05 2c 62 12 00 imul 0x12622c,%eax 10c126: 8d 04 80 lea (%eax,%eax,4),%eax 10c129: 8d 04 80 lea (%eax,%eax,4),%eax 10c12c: 8d 04 80 lea (%eax,%eax,4),%eax 10c12f: c1 e0 03 shl $0x3,%eax 10c132: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c135: a1 54 23 13 00 mov 0x132354,%eax 10c13a: 40 inc %eax 10c13b: a3 54 23 13 00 mov %eax,0x132354 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c140: 8d 45 f0 lea -0x10(%ebp),%eax 10c143: 89 04 24 mov %eax,(%esp) 10c146: e8 59 19 00 00 call 10daa4 <_TOD_Set> _Thread_Enable_dispatch(); 10c14b: e8 c4 2c 00 00 call 10ee14 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c150: 83 c4 10 add $0x10,%esp 10c153: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10c155: 8b 5d fc mov -0x4(%ebp),%ebx 10c158: c9 leave 10c159: c3 ret 10c15a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10c15c: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c161: 8b 5d fc mov -0x4(%ebp),%ebx 10c164: c9 leave 10c165: c3 ret =============================================================================== 0010af94 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10af94: 55 push %ebp 10af95: 89 e5 mov %esp,%ebp 10af97: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10af9a: 85 c0 test %eax,%eax 10af9c: 74 0a je 10afa8 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10af9e: a3 84 66 12 00 mov %eax,0x126684 return RTEMS_SUCCESSFUL; 10afa3: 31 c0 xor %eax,%eax } 10afa5: c9 leave 10afa6: c3 ret 10afa7: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) return RTEMS_INVALID_ADDRESS; 10afa8: b8 09 00 00 00 mov $0x9,%eax _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10afad: c9 leave 10afae: c3 ret =============================================================================== 0010afb0 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10afb0: 55 push %ebp 10afb1: 89 e5 mov %esp,%ebp 10afb3: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10afb6: e8 35 15 00 00 call 10c4f0 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10afbb: 83 ec 0c sub $0xc,%esp 10afbe: 68 a4 65 12 00 push $0x1265a4 10afc3: e8 00 38 00 00 call 10e7c8 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10afc8: e8 6b 32 00 00 call 10e238 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Thread_Dispatch_necessary ); 10afcd: a0 a4 6a 12 00 mov 0x126aa4,%al if ( _Thread_Is_context_switch_necessary() && 10afd2: 83 c4 10 add $0x10,%esp 10afd5: 84 c0 test %al,%al 10afd7: 74 09 je 10afe2 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10afd9: a1 d4 64 12 00 mov 0x1264d4,%eax 10afde: 85 c0 test %eax,%eax 10afe0: 74 06 je 10afe8 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10afe2: 31 c0 xor %eax,%eax 10afe4: c9 leave 10afe5: c3 ret 10afe6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10afe8: e8 43 25 00 00 call 10d530 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10afed: 31 c0 xor %eax,%eax 10afef: c9 leave 10aff0: c3 ret =============================================================================== 001083e0 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1083e0: 55 push %ebp 1083e1: 89 e5 mov %esp,%ebp 1083e3: 57 push %edi 1083e4: 56 push %esi 1083e5: 53 push %ebx 1083e6: 83 ec 6c sub $0x6c,%esp 1083e9: 8b 7d 08 mov 0x8(%ebp),%edi Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1083ec: 8b 45 0c mov 0xc(%ebp),%eax 1083ef: 85 c0 test %eax,%eax 1083f1: 0f 84 57 01 00 00 je 10854e <== NEVER TAKEN * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 1083f7: 83 ec 0c sub $0xc,%esp 1083fa: 8d 45 d8 lea -0x28(%ebp),%eax 1083fd: 50 push %eax 1083fe: e8 11 56 00 00 call 10da14 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 108403: 83 c4 0c add $0xc,%esp 108406: 8d 55 d0 lea -0x30(%ebp),%edx 108409: 52 push %edx 10840a: 8d 4d d8 lea -0x28(%ebp),%ecx 10840d: 51 push %ecx 10840e: 68 68 29 13 00 push $0x132968 108413: e8 d0 78 00 00 call 10fce8 <_Timespec_Subtract> } } } #endif (*print)( 108418: 5b pop %ebx 108419: 5e pop %esi 10841a: 68 b0 31 12 00 push $0x1231b0 10841f: 57 push %edi 108420: ff 55 0c call *0xc(%ebp) 108423: 83 c4 10 add $0x10,%esp " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 108426: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp) #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10842d: 8b 5d a4 mov -0x5c(%ebp),%ebx 108430: 8b 04 9d 2c 23 13 00 mov 0x13232c(,%ebx,4),%eax 108437: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10843a: 85 f6 test %esi,%esi 10843c: 0f 84 e2 00 00 00 je 108524 <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 108442: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 108447: 0f 84 d7 00 00 00 je 108524 10844d: bb 01 00 00 00 mov $0x1,%ebx 108452: 89 5d 94 mov %ebx,-0x6c(%ebp) 108455: eb 4b jmp 1084a2 108457: 90 nop <== NOT EXECUTED _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 108458: 8d 45 e0 lea -0x20(%ebp),%eax 10845b: 50 push %eax 10845c: 8d 55 e4 lea -0x1c(%ebp),%edx 10845f: 52 push %edx 108460: 8d 4d d0 lea -0x30(%ebp),%ecx 108463: 51 push %ecx 108464: 8d 5d c8 lea -0x38(%ebp),%ebx 108467: 53 push %ebx 108468: e8 b7 77 00 00 call 10fc24 <_Timespec_Divide> /* * Print the information */ (*print)( context, 10846d: 58 pop %eax 10846e: 5a pop %edx 10846f: ff 75 e0 pushl -0x20(%ebp) 108472: ff 75 e4 pushl -0x1c(%ebp) 108475: ba d3 4d 62 10 mov $0x10624dd3,%edx 10847a: 8b 45 cc mov -0x34(%ebp),%eax 10847d: f7 e2 mul %edx 10847f: c1 ea 06 shr $0x6,%edx 108482: 52 push %edx 108483: ff 75 c8 pushl -0x38(%ebp) 108486: 68 23 34 12 00 push $0x123423 10848b: 57 push %edi 10848c: ff 55 0c call *0xc(%ebp) 10848f: 83 c4 20 add $0x20,%esp continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 108492: ff 45 94 incl -0x6c(%ebp) 108495: 0f b7 46 10 movzwl 0x10(%esi),%eax 108499: 3b 45 94 cmp -0x6c(%ebp),%eax 10849c: 0f 82 82 00 00 00 jb 108524 the_thread = (Thread_Control *)information->local_table[ i ]; 1084a2: 8b 46 1c mov 0x1c(%esi),%eax 1084a5: 8b 4d 94 mov -0x6c(%ebp),%ecx 1084a8: 8b 14 88 mov (%eax,%ecx,4),%edx if ( !the_thread ) 1084ab: 85 d2 test %edx,%edx 1084ad: 74 e3 je 108492 <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1084af: 51 push %ecx 1084b0: 8d 5d b3 lea -0x4d(%ebp),%ebx 1084b3: 53 push %ebx 1084b4: 6a 0d push $0xd 1084b6: ff 72 08 pushl 0x8(%edx) 1084b9: 89 55 a0 mov %edx,-0x60(%ebp) 1084bc: e8 0b 42 00 00 call 10c6cc (*print)( 1084c1: 53 push %ebx 1084c2: 8b 55 a0 mov -0x60(%ebp),%edx 1084c5: ff 72 08 pushl 0x8(%edx) 1084c8: 68 10 34 12 00 push $0x123410 1084cd: 57 push %edi 1084ce: 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; 1084d1: 8b 55 a0 mov -0x60(%ebp),%edx 1084d4: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx 1084da: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx 1084e0: 89 4d c8 mov %ecx,-0x38(%ebp) 1084e3: 89 5d cc mov %ebx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1084e6: 83 c4 20 add $0x20,%esp 1084e9: a1 58 29 13 00 mov 0x132958,%eax 1084ee: 8b 5a 08 mov 0x8(%edx),%ebx 1084f1: 39 58 08 cmp %ebx,0x8(%eax) 1084f4: 0f 85 5e ff ff ff jne 108458 Timestamp_Control used; _Timestamp_Subtract( 1084fa: 50 push %eax 1084fb: 8d 45 c0 lea -0x40(%ebp),%eax 1084fe: 50 push %eax 1084ff: 8d 55 d8 lea -0x28(%ebp),%edx 108502: 52 push %edx 108503: 68 10 24 13 00 push $0x132410 108508: e8 db 77 00 00 call 10fce8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 10850d: 59 pop %ecx 10850e: 5b pop %ebx 10850f: 8d 4d c0 lea -0x40(%ebp),%ecx 108512: 51 push %ecx 108513: 8d 5d c8 lea -0x38(%ebp),%ebx 108516: 53 push %ebx 108517: e8 cc 76 00 00 call 10fbe8 <_Timespec_Add_to> 10851c: 83 c4 10 add $0x10,%esp 10851f: e9 34 ff ff ff jmp 108458 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 108524: ff 45 a4 incl -0x5c(%ebp) 108527: 83 7d a4 04 cmpl $0x4,-0x5c(%ebp) 10852b: 0f 85 fc fe ff ff jne 10842d } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 108531: ba d3 4d 62 10 mov $0x10624dd3,%edx 108536: 8b 45 d4 mov -0x2c(%ebp),%eax 108539: f7 e2 mul %edx 10853b: c1 ea 06 shr $0x6,%edx 10853e: 52 push %edx 10853f: ff 75 d0 pushl -0x30(%ebp) 108542: 68 24 33 12 00 push $0x123324 108547: 57 push %edi 108548: ff 55 0c call *0xc(%ebp) 10854b: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 10854e: 8d 65 f4 lea -0xc(%ebp),%esp 108551: 5b pop %ebx 108552: 5e pop %esi 108553: 5f pop %edi 108554: c9 leave 108555: c3 ret =============================================================================== 0011320c : [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { 11320c: 55 push %ebp 11320d: 89 e5 mov %esp,%ebp 11320f: 53 push %ebx 113210: 83 ec 04 sub $0x4,%esp 113213: 8b 45 08 mov 0x8(%ebp),%eax if (sc == RTEMS_SUCCESSFUL) { 113216: 85 c0 test %eax,%eax 113218: 75 06 jne 113220 return 0; 11321a: 31 c0 xor %eax,%eax errno = eno; return -1; } } 11321c: 5a pop %edx 11321d: 5b pop %ebx 11321e: c9 leave 11321f: c3 ret if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { 113220: 83 f8 1c cmp $0x1c,%eax 113223: 77 17 ja 11323c <== NEVER TAKEN eno = status_code_to_errno [sc]; 113225: 8b 1c 85 e0 12 12 00 mov 0x1212e0(,%eax,4),%ebx } errno = eno; 11322c: e8 67 00 00 00 call 113298 <__errno> 113231: 89 18 mov %ebx,(%eax) return -1; 113233: b8 ff ff ff ff mov $0xffffffff,%eax 113238: eb e2 jmp 11321c 11323a: 66 90 xchg %ax,%ax <== NOT EXECUTED int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; 11323c: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED 113241: eb e9 jmp 11322c <== NOT EXECUTED =============================================================================== 0010b17c : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b17c: 55 push %ebp 10b17d: 89 e5 mov %esp,%ebp 10b17f: 53 push %ebx 10b180: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b183: 8d 45 f4 lea -0xc(%ebp),%eax 10b186: 50 push %eax 10b187: ff 75 08 pushl 0x8(%ebp) 10b18a: e8 3d 25 00 00 call 10d6cc <_Thread_Get> switch ( location ) { 10b18f: 83 c4 10 add $0x10,%esp 10b192: 8b 55 f4 mov -0xc(%ebp),%edx 10b195: 85 d2 test %edx,%edx 10b197: 75 2b jne 10b1c4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b199: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b19f: 9c pushf 10b1a0: fa cli 10b1a1: 59 pop %ecx *the_event_set |= the_new_events; 10b1a2: 8b 5d 0c mov 0xc(%ebp),%ebx 10b1a5: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b1a7: 51 push %ecx 10b1a8: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b1a9: 83 ec 0c sub $0xc,%esp 10b1ac: 50 push %eax 10b1ad: e8 1e 00 00 00 call 10b1d0 <_Event_Surrender> _Thread_Enable_dispatch(); 10b1b2: e8 f1 24 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b1b7: 83 c4 10 add $0x10,%esp 10b1ba: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b1bc: 8b 5d fc mov -0x4(%ebp),%ebx 10b1bf: c9 leave 10b1c0: c3 ret 10b1c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b1c4: b8 04 00 00 00 mov $0x4,%eax } 10b1c9: 8b 5d fc mov -0x4(%ebp),%ebx 10b1cc: c9 leave 10b1cd: c3 ret =============================================================================== 0010d15c : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d15c: 55 push %ebp 10d15d: 89 e5 mov %esp,%ebp 10d15f: 57 push %edi 10d160: 56 push %esi 10d161: 53 push %ebx 10d162: 83 ec 1c sub $0x1c,%esp 10d165: 8b 75 0c mov 0xc(%ebp),%esi 10d168: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10d16b: 85 db test %ebx,%ebx 10d16d: 0f 84 85 00 00 00 je 10d1f8 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d173: 8b 45 08 mov 0x8(%ebp),%eax 10d176: 85 c0 test %eax,%eax 10d178: 75 0e jne 10d188 return RTEMS_INVALID_NAME; 10d17a: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d17f: 8d 65 f4 lea -0xc(%ebp),%esp 10d182: 5b pop %ebx 10d183: 5e pop %esi 10d184: 5f pop %edi 10d185: c9 leave 10d186: c3 ret 10d187: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d188: a1 54 23 13 00 mov 0x132354,%eax 10d18d: 40 inc %eax 10d18e: a3 54 23 13 00 mov %eax,0x132354 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d193: 83 ec 0c sub $0xc,%esp 10d196: 68 c0 25 13 00 push $0x1325c0 10d19b: e8 44 0e 00 00 call 10dfe4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d1a0: 83 c4 10 add $0x10,%esp 10d1a3: 85 c0 test %eax,%eax 10d1a5: 74 45 je 10d1ec RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10d1a7: 8d 78 24 lea 0x24(%eax),%edi 10d1aa: b9 08 00 00 00 mov $0x8,%ecx 10d1af: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d1b1: 83 ec 0c sub $0xc,%esp _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set_with_table( &the_extension->Extension, extension_table ); 10d1b4: 8d 50 10 lea 0x10(%eax),%edx 10d1b7: 52 push %edx 10d1b8: 89 45 e4 mov %eax,-0x1c(%ebp) 10d1bb: e8 68 2b 00 00 call 10fd28 <_User_extensions_Add_set> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10d1c0: 8b 45 e4 mov -0x1c(%ebp),%eax 10d1c3: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d1c6: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d1c9: 8b 0d dc 25 13 00 mov 0x1325dc,%ecx 10d1cf: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d1d2: 8b 4d 08 mov 0x8(%ebp),%ecx 10d1d5: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10d1d8: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10d1da: e8 35 1c 00 00 call 10ee14 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d1df: 83 c4 10 add $0x10,%esp 10d1e2: 31 c0 xor %eax,%eax } 10d1e4: 8d 65 f4 lea -0xc(%ebp),%esp 10d1e7: 5b pop %ebx 10d1e8: 5e pop %esi 10d1e9: 5f pop %edi 10d1ea: c9 leave 10d1eb: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10d1ec: e8 23 1c 00 00 call 10ee14 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10d1f1: b8 05 00 00 00 mov $0x5,%eax 10d1f6: eb 87 jmp 10d17f ) { Extension_Control *the_extension; if ( !id ) return RTEMS_INVALID_ADDRESS; 10d1f8: b8 09 00 00 00 mov $0x9,%eax 10d1fd: eb 80 jmp 10d17f =============================================================================== 0010cfd8 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10cfd8: 55 push %ebp 10cfd9: 89 e5 mov %esp,%ebp 10cfdb: 53 push %ebx 10cfdc: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10cfdf: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10cfe2: 50 push %eax 10cfe3: ff 75 08 pushl 0x8(%ebp) 10cfe6: 68 c0 25 13 00 push $0x1325c0 10cfeb: e8 2c 12 00 00 call 10e21c <_Objects_Get> 10cff0: 89 c3 mov %eax,%ebx switch ( location ) { 10cff2: 83 c4 10 add $0x10,%esp 10cff5: 8b 55 f4 mov -0xc(%ebp),%edx 10cff8: 85 d2 test %edx,%edx 10cffa: 75 38 jne 10d034 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10cffc: 83 ec 0c sub $0xc,%esp 10cfff: 8d 40 10 lea 0x10(%eax),%eax 10d002: 50 push %eax 10d003: e8 f4 29 00 00 call 10f9fc <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d008: 59 pop %ecx 10d009: 58 pop %eax 10d00a: 53 push %ebx 10d00b: 68 c0 25 13 00 push $0x1325c0 10d010: e8 cb 0d 00 00 call 10dde0 <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d015: 58 pop %eax 10d016: 5a pop %edx 10d017: 53 push %ebx 10d018: 68 c0 25 13 00 push $0x1325c0 10d01d: e8 ba 10 00 00 call 10e0dc <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d022: e8 85 1a 00 00 call 10eaac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d027: 83 c4 10 add $0x10,%esp 10d02a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d02c: 8b 5d fc mov -0x4(%ebp),%ebx 10d02f: c9 leave 10d030: c3 ret 10d031: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d034: b8 04 00 00 00 mov $0x4,%eax } 10d039: 8b 5d fc mov -0x4(%ebp),%ebx 10d03c: c9 leave 10d03d: c3 ret =============================================================================== 00107fec : int rtems_filesystem_dirname( const char *pathname ) { 107fec: 55 push %ebp 107fed: 89 e5 mov %esp,%ebp 107fef: 57 push %edi 107ff0: 56 push %esi 107ff1: 53 push %ebx 107ff2: 83 ec 0c sub $0xc,%esp 107ff5: 8b 5d 08 mov 0x8(%ebp),%ebx int len = strlen( pathname ); 107ff8: 31 c0 xor %eax,%eax 107ffa: b9 ff ff ff ff mov $0xffffffff,%ecx 107fff: 89 df mov %ebx,%edi 108001: f2 ae repnz scas %es:(%edi),%al 108003: f7 d1 not %ecx while ( len ) { 108005: 89 ce mov %ecx,%esi 108007: 4e dec %esi 108008: 75 06 jne 108010 <== ALWAYS TAKEN 10800a: eb 19 jmp 108025 <== NOT EXECUTED 10800c: 85 f6 test %esi,%esi 10800e: 74 15 je 108025 len--; 108010: 4e dec %esi if ( rtems_filesystem_is_separator( pathname[len] ) ) 108011: 83 ec 0c sub $0xc,%esp 108014: 0f be 04 33 movsbl (%ebx,%esi,1),%eax 108018: 50 push %eax 108019: e8 da 0e 00 00 call 108ef8 10801e: 83 c4 10 add $0x10,%esp 108021: 85 c0 test %eax,%eax 108023: 74 e7 je 10800c break; } return len; } 108025: 89 f0 mov %esi,%eax 108027: 8d 65 f4 lea -0xc(%ebp),%esp 10802a: 5b pop %ebx 10802b: 5e pop %esi 10802c: 5f pop %edi 10802d: c9 leave 10802e: c3 ret =============================================================================== 0010ffa8 : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 10ffa8: 55 push %ebp 10ffa9: 89 e5 mov %esp,%ebp 10ffab: 83 ec 18 sub $0x18,%esp 10ffae: 8b 45 08 mov 0x8(%ebp),%eax find_arg fa = { 10ffb1: 89 45 f0 mov %eax,-0x10(%ebp) 10ffb4: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) .type = type, .mount_h = NULL }; if ( type != NULL ) { 10ffbb: 85 c0 test %eax,%eax 10ffbd: 74 19 je 10ffd8 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 10ffbf: 83 ec 08 sub $0x8,%esp 10ffc2: 8d 45 f0 lea -0x10(%ebp),%eax 10ffc5: 50 push %eax 10ffc6: 68 c8 fe 10 00 push $0x10fec8 10ffcb: e8 34 ff ff ff call 10ff04 10ffd0: 8b 45 f4 mov -0xc(%ebp),%eax 10ffd3: 83 c4 10 add $0x10,%esp } return fa.mount_h; } 10ffd6: c9 leave 10ffd7: c3 ret find_arg fa = { .type = type, .mount_h = NULL }; if ( type != NULL ) { 10ffd8: 31 c0 xor %eax,%eax <== NOT EXECUTED rtems_filesystem_iterate( find_handler, &fa ); } return fa.mount_h; } 10ffda: c9 leave <== NOT EXECUTED 10ffdb: c3 ret <== NOT EXECUTED =============================================================================== 00110164 : #include "rtems/libio_.h" void rtems_filesystem_get_sym_start_loc(const char *path, int *index, rtems_filesystem_location_info_t *loc) { 110164: 55 push %ebp 110165: 89 e5 mov %esp,%ebp 110167: 57 push %edi 110168: 56 push %esi 110169: 53 push %ebx 11016a: 83 ec 18 sub $0x18,%esp 11016d: 8b 5d 0c mov 0xc(%ebp),%ebx if (rtems_filesystem_is_separator(path[0])) { 110170: 8b 45 08 mov 0x8(%ebp),%eax 110173: 0f be 00 movsbl (%eax),%eax 110176: 50 push %eax 110177: e8 7c 8d ff ff call 108ef8 11017c: 83 c4 10 add $0x10,%esp 11017f: 85 c0 test %eax,%eax 110181: 75 11 jne 110194 *loc = rtems_filesystem_root; *index = 1; } else { *index = 0; 110183: c7 03 00 00 00 00 movl $0x0,(%ebx) } } 110189: 8d 65 f4 lea -0xc(%ebp),%esp 11018c: 5b pop %ebx 11018d: 5e pop %esi 11018e: 5f pop %edi 11018f: c9 leave 110190: c3 ret 110191: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void rtems_filesystem_get_sym_start_loc(const char *path, int *index, rtems_filesystem_location_info_t *loc) { if (rtems_filesystem_is_separator(path[0])) { *loc = rtems_filesystem_root; 110194: 8b 35 30 41 12 00 mov 0x124130,%esi 11019a: 83 c6 18 add $0x18,%esi 11019d: b9 05 00 00 00 mov $0x5,%ecx 1101a2: 8b 7d 10 mov 0x10(%ebp),%edi 1101a5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *index = 1; 1101a7: c7 03 01 00 00 00 movl $0x1,(%ebx) } else { *index = 0; } } 1101ad: 8d 65 f4 lea -0xc(%ebp),%esp 1101b0: 5b pop %ebx 1101b1: 5e pop %esi 1101b2: 5f pop %edi 1101b3: c9 leave 1101b4: c3 ret =============================================================================== 00107e1c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 107e1c: 55 push %ebp 107e1d: 89 e5 mov %esp,%ebp 107e1f: 57 push %edi 107e20: 56 push %esi 107e21: 53 push %ebx 107e22: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 107e25: a1 30 41 12 00 mov 0x124130,%eax 107e2a: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 107e31: a1 80 f0 11 00 mov 0x11f080,%eax 107e36: 85 c0 test %eax,%eax 107e38: 0f 84 9f 00 00 00 je 107edd <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 107e3e: a1 54 21 12 00 mov 0x122154,%eax status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 107e43: 83 ec 0c sub $0xc,%esp 107e46: 6a 00 push $0x0 107e48: ff 70 04 pushl 0x4(%eax) 107e4b: ff 30 pushl (%eax) 107e4d: ff 70 0c pushl 0xc(%eax) 107e50: ff 70 08 pushl 0x8(%eax) 107e53: e8 fc 06 00 00 call 108554 if ( status == -1 ) 107e58: 83 c4 20 add $0x20,%esp 107e5b: 40 inc %eax 107e5c: 0f 84 95 00 00 00 je 107ef7 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 107e62: a1 30 41 12 00 mov 0x124130,%eax 107e67: 66 c7 40 30 00 00 movw $0x0,0x30(%eax) * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107e6d: 83 ec 0c sub $0xc,%esp 107e70: 6a 00 push $0x0 107e72: 8d 5d d4 lea -0x2c(%ebp),%ebx 107e75: 53 push %ebx 107e76: 6a 00 push $0x0 107e78: 6a 01 push $0x1 107e7a: 68 27 0a 12 00 push $0x120a27 107e7f: e8 24 01 00 00 call 107fa8 rtems_filesystem_root = loc; 107e84: 8b 3d 30 41 12 00 mov 0x124130,%edi 107e8a: 83 c7 18 add $0x18,%edi 107e8d: b9 05 00 00 00 mov $0x5,%ecx 107e92: 89 de mov %ebx,%esi 107e94: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107e96: 83 c4 14 add $0x14,%esp 107e99: 6a 00 push $0x0 107e9b: 53 push %ebx 107e9c: 6a 00 push $0x0 107e9e: 6a 01 push $0x1 107ea0: 68 27 0a 12 00 push $0x120a27 107ea5: e8 fe 00 00 00 call 107fa8 rtems_filesystem_current = loc; 107eaa: 8b 3d 30 41 12 00 mov 0x124130,%edi 107eb0: 83 c7 04 add $0x4,%edi 107eb3: b9 05 00 00 00 mov $0x5,%ecx 107eb8: 89 de mov %ebx,%esi 107eba: 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); 107ebc: 83 c4 18 add $0x18,%esp 107ebf: 68 ff 01 00 00 push $0x1ff 107ec4: 68 29 0a 12 00 push $0x120a29 107ec9: e8 42 05 00 00 call 108410 if ( status != 0 ) 107ece: 83 c4 10 add $0x10,%esp 107ed1: 85 c0 test %eax,%eax 107ed3: 75 15 jne 107eea <== NEVER 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. */ } 107ed5: 8d 65 f4 lea -0xc(%ebp),%esp 107ed8: 5b pop %ebx 107ed9: 5e pop %esi 107eda: 5f pop %edi 107edb: c9 leave 107edc: c3 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 107edd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ee0: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 107ee5: e8 e6 3d 00 00 call 10bcd0 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 107eea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107eed: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 107ef2: e8 d9 3d 00 00 call 10bcd0 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 107ef7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107efa: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 107eff: e8 cc 3d 00 00 call 10bcd0 <== NOT EXECUTED =============================================================================== 0010ff04 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 10ff04: 55 push %ebp 10ff05: 89 e5 mov %esp,%ebp 10ff07: 57 push %edi 10ff08: 56 push %esi 10ff09: 53 push %ebx 10ff0a: 83 ec 1c sub $0x1c,%esp 10ff0d: 8b 75 08 mov 0x8(%ebp),%esi 10ff10: 8b 7d 0c mov 0xc(%ebp),%edi const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 10ff13: 8b 1d 60 f0 11 00 mov 0x11f060,%ebx 10ff19: 85 db test %ebx,%ebx 10ff1b: 74 24 je 10ff41 <== NEVER TAKEN 10ff1d: bb 60 f0 11 00 mov $0x11f060,%ebx 10ff22: eb 04 jmp 10ff28 10ff24: 84 c0 test %al,%al 10ff26: 75 70 jne 10ff98 stop = (*routine)( table_entry, routine_arg ); 10ff28: 83 ec 08 sub $0x8,%esp 10ff2b: 57 push %edi 10ff2c: 53 push %ebx 10ff2d: ff d6 call *%esi 10ff2f: 88 c2 mov %al,%dl ++table_entry; 10ff31: 83 c3 08 add $0x8,%ebx { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 10ff34: 83 c4 10 add $0x10,%esp 10ff37: 8b 0b mov (%ebx),%ecx 10ff39: 85 c9 test %ecx,%ecx 10ff3b: 75 e7 jne 10ff24 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 10ff3d: 84 c0 test %al,%al 10ff3f: 75 57 jne 10ff98 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 ); 10ff41: 50 push %eax 10ff42: 6a 00 push $0x0 10ff44: 6a 00 push $0x0 10ff46: ff 35 68 63 12 00 pushl 0x126368 10ff4c: e8 3f b7 ff ff call 10b690 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10ff51: 8b 1d 54 41 12 00 mov 0x124154,%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10ff57: 83 c4 10 add $0x10,%esp 10ff5a: 81 fb 58 41 12 00 cmp $0x124158,%ebx 10ff60: 75 06 jne 10ff68 10ff62: eb 3e jmp 10ffa2 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; 10ff64: 84 c0 test %al,%al 10ff66: 75 19 jne 10ff81 <== NEVER TAKEN node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 10ff68: 83 ec 08 sub $0x8,%esp 10ff6b: 57 push %edi 10ff6c: 8d 43 08 lea 0x8(%ebx),%eax 10ff6f: 50 push %eax 10ff70: ff d6 call *%esi 10ff72: 88 c2 mov %al,%dl } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10ff74: 8b 1b mov (%ebx),%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10ff76: 83 c4 10 add $0x10,%esp 10ff79: 81 fb 58 41 12 00 cmp $0x124158,%ebx 10ff7f: 75 e3 jne 10ff64 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10ff81: 83 ec 0c sub $0xc,%esp 10ff84: ff 35 68 63 12 00 pushl 0x126368 10ff8a: 88 55 e4 mov %dl,-0x1c(%ebp) 10ff8d: e8 fa b7 ff ff call 10b78c 10ff92: 83 c4 10 add $0x10,%esp 10ff95: 8a 55 e4 mov -0x1c(%ebp),%dl } rtems_libio_unlock(); } return stop; } 10ff98: 88 d0 mov %dl,%al 10ff9a: 8d 65 f4 lea -0xc(%ebp),%esp 10ff9d: 5b pop %ebx 10ff9e: 5e pop %esi 10ff9f: 5f pop %edi 10ffa0: c9 leave 10ffa1: c3 ret ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10ffa2: 31 d2 xor %edx,%edx 10ffa4: eb db jmp 10ff81 =============================================================================== 001084e4 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 1084e4: 55 push %ebp 1084e5: 89 e5 mov %esp,%ebp 1084e7: 57 push %edi 1084e8: 56 push %esi 1084e9: 53 push %ebx 1084ea: 83 ec 20 sub $0x20,%esp 1084ed: 8b 7d 08 mov 0x8(%ebp),%edi 1084f0: 8b 75 0c mov 0xc(%ebp),%esi 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 ); 1084f3: 6a 00 push $0x0 1084f5: 6a 00 push $0x0 1084f7: ff 35 68 63 12 00 pushl 0x126368 1084fd: e8 8e 31 00 00 call 10b690 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 108502: 8b 1d 04 40 12 00 mov 0x124004,%ebx { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 108508: 83 c4 10 add $0x10,%esp 10850b: 81 fb 08 40 12 00 cmp $0x124008,%ebx 108511: 75 09 jne 10851c <== ALWAYS TAKEN 108513: eb 3b jmp 108550 <== NOT EXECUTED 108515: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; 108518: 84 c0 test %al,%al 10851a: 75 16 jne 108532 <== NEVER TAKEN node = rtems_chain_next( node ) ) { const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); 10851c: 83 ec 08 sub $0x8,%esp 10851f: 56 push %esi 108520: 53 push %ebx 108521: ff d7 call *%edi 108523: 88 c2 mov %al,%dl } rtems_libio_unlock(); return stop; } 108525: 8b 1b mov (%ebx),%ebx { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 108527: 83 c4 10 add $0x10,%esp 10852a: 81 fb 08 40 12 00 cmp $0x124008,%ebx 108530: 75 e6 jne 108518 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 108532: 83 ec 0c sub $0xc,%esp 108535: ff 35 68 63 12 00 pushl 0x126368 10853b: 88 55 e4 mov %dl,-0x1c(%ebp) 10853e: e8 49 32 00 00 call 10b78c stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 108543: 8a 55 e4 mov -0x1c(%ebp),%dl 108546: 88 d0 mov %dl,%al 108548: 8d 65 f4 lea -0xc(%ebp),%esp 10854b: 5b pop %ebx 10854c: 5e pop %esi 10854d: 5f pop %edi 10854e: c9 leave 10854f: c3 ret rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; 108550: 31 d2 xor %edx,%edx <== NOT EXECUTED 108552: eb de jmp 108532 <== NOT EXECUTED =============================================================================== 00108030 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 108030: 55 push %ebp 108031: 89 e5 mov %esp,%ebp 108033: 57 push %edi 108034: 56 push %esi 108035: 53 push %ebx 108036: 83 ec 0c sub $0xc,%esp 108039: 8b 75 08 mov 0x8(%ebp),%esi 10803c: 8b 7d 0c mov 0xc(%ebp),%edi /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 10803f: 8a 06 mov (%esi),%al 108041: 84 c0 test %al,%al 108043: 74 34 je 108079 <== NEVER TAKEN 108045: 85 ff test %edi,%edi 108047: 74 30 je 108079 <== NEVER TAKEN 108049: 31 db xor %ebx,%ebx 10804b: eb 0f jmp 10805c 10804d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { pathname++; pathnamelen--; stripped++; 108050: 43 inc %ebx { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 108051: 8a 04 1e mov (%esi,%ebx,1),%al 108054: 84 c0 test %al,%al 108056: 74 17 je 10806f <== NEVER TAKEN 108058: 39 df cmp %ebx,%edi 10805a: 74 13 je 10806f <== NEVER TAKEN 10805c: 83 ec 0c sub $0xc,%esp 10805f: 0f be c0 movsbl %al,%eax 108062: 50 push %eax 108063: e8 90 0e 00 00 call 108ef8 108068: 83 c4 10 add $0x10,%esp 10806b: 85 c0 test %eax,%eax 10806d: 75 e1 jne 108050 pathname++; pathnamelen--; stripped++; } return stripped; } 10806f: 89 d8 mov %ebx,%eax 108071: 8d 65 f4 lea -0xc(%ebp),%esp 108074: 5b pop %ebx 108075: 5e pop %esi 108076: 5f pop %edi 108077: c9 leave 108078: c3 ret ) { /* * Eat any separators at start of the path. */ int stripped = 0; 108079: 31 db xor %ebx,%ebx <== NOT EXECUTED 10807b: eb f2 jmp 10806f <== NOT EXECUTED =============================================================================== 0010ffdc : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 10ffdc: 55 push %ebp 10ffdd: 89 e5 mov %esp,%ebp 10ffdf: 57 push %edi 10ffe0: 56 push %esi 10ffe1: 53 push %ebx 10ffe2: 83 ec 28 sub $0x28,%esp size_t type_size = strlen(type) + 1; 10ffe5: 31 c0 xor %eax,%eax 10ffe7: b9 ff ff ff ff mov $0xffffffff,%ecx 10ffec: 8b 7d 08 mov 0x8(%ebp),%edi 10ffef: f2 ae repnz scas %es:(%edi),%al 10fff1: f7 d1 not %ecx size_t fsn_size = sizeof( filesystem_node ) + type_size; 10fff3: 8d 41 10 lea 0x10(%ecx),%eax filesystem_node *fsn = malloc( fsn_size ); 10fff6: 50 push %eax 10fff7: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fffa: e8 69 83 ff ff call 108368 10ffff: 89 c3 mov %eax,%ebx char *type_storage = (char *) fsn + sizeof( *fsn ); if ( fsn == NULL ) 110001: 83 c4 10 add $0x10,%esp 110004: 85 c0 test %eax,%eax 110006: 8b 4d e4 mov -0x1c(%ebp),%ecx 110009: 0f 84 8e 00 00 00 je 11009d ) { size_t type_size = strlen(type) + 1; size_t fsn_size = sizeof( filesystem_node ) + type_size; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( *fsn ); 11000f: 8d 40 10 lea 0x10(%eax),%eax if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memcpy(type_storage, type, type_size); 110012: 89 c7 mov %eax,%edi 110014: 8b 75 08 mov 0x8(%ebp),%esi 110017: f3 a4 rep movsb %ds:(%esi),%es:(%edi) fsn->entry.type = type_storage; 110019: 89 43 08 mov %eax,0x8(%ebx) fsn->entry.mount_h = mount_h; 11001c: 8b 45 0c mov 0xc(%ebp),%eax 11001f: 89 43 0c mov %eax,0xc(%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 ); 110022: 50 push %eax 110023: 6a 00 push $0x0 110025: 6a 00 push $0x0 110027: ff 35 68 63 12 00 pushl 0x126368 11002d: e8 5e b6 ff ff call 10b690 rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 110032: 5f pop %edi 110033: ff 75 08 pushl 0x8(%ebp) 110036: e8 6d ff ff ff call 10ffa8 11003b: 83 c4 10 add $0x10,%esp 11003e: 85 c0 test %eax,%eax 110040: 75 2a jne 11006c 110042: 83 ec 08 sub $0x8,%esp 110045: 53 push %ebx 110046: 68 54 41 12 00 push $0x124154 11004b: e8 5c bf ff ff call 10bfac <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110050: 5e pop %esi 110051: ff 35 68 63 12 00 pushl 0x126368 110057: e8 30 b7 ff ff call 10b78c 11005c: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; 11005f: 31 c0 xor %eax,%eax } 110061: 8d 65 f4 lea -0xc(%ebp),%esp 110064: 5b pop %ebx 110065: 5e pop %esi 110066: 5f pop %edi 110067: c9 leave 110068: c3 ret 110069: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 11006c: 83 ec 0c sub $0xc,%esp 11006f: ff 35 68 63 12 00 pushl 0x126368 110075: e8 12 b7 ff ff call 10b78c rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); 11007a: 89 1c 24 mov %ebx,(%esp) 11007d: e8 12 80 ff ff call 108094 rtems_set_errno_and_return_minus_one( EINVAL ); 110082: e8 11 32 00 00 call 113298 <__errno> 110087: c7 00 16 00 00 00 movl $0x16,(%eax) 11008d: 83 c4 10 add $0x10,%esp 110090: b8 ff ff ff ff mov $0xffffffff,%eax } rtems_libio_unlock(); return 0; } 110095: 8d 65 f4 lea -0xc(%ebp),%esp 110098: 5b pop %ebx 110099: 5e pop %esi 11009a: 5f pop %edi 11009b: c9 leave 11009c: c3 ret size_t fsn_size = sizeof( filesystem_node ) + type_size; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( *fsn ); if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 11009d: e8 f6 31 00 00 call 113298 <__errno> 1100a2: c7 00 0c 00 00 00 movl $0xc,(%eax) 1100a8: b8 ff ff ff ff mov $0xffffffff,%eax 1100ad: eb b2 jmp 110061 =============================================================================== 001100b0 : int rtems_filesystem_unregister( const char *type ) { 1100b0: 55 push %ebp 1100b1: 89 e5 mov %esp,%ebp 1100b3: 56 push %esi 1100b4: 53 push %ebx 1100b5: 8b 75 08 mov 0x8(%ebp),%esi rtems_chain_node *node = NULL; if ( type == NULL ) { 1100b8: 85 f6 test %esi,%esi 1100ba: 0f 84 94 00 00 00 je 110154 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 ); 1100c0: 51 push %ecx 1100c1: 6a 00 push $0x0 1100c3: 6a 00 push $0x0 1100c5: ff 35 68 63 12 00 pushl 0x126368 1100cb: e8 c0 b5 ff ff call 10b690 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 1100d0: 8b 1d 54 41 12 00 mov 0x124154,%ebx if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 1100d6: 83 c4 10 add $0x10,%esp 1100d9: 81 fb 58 41 12 00 cmp $0x124158,%ebx 1100df: 75 0d jne 1100ee 1100e1: eb 49 jmp 11012c 1100e3: 90 nop <== NOT EXECUTED } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 1100e4: 8b 1b mov (%ebx),%ebx if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 1100e6: 81 fb 58 41 12 00 cmp $0x124158,%ebx 1100ec: 74 3e je 11012c <== ALWAYS TAKEN !rtems_chain_is_tail( &filesystem_chain, node ); node = rtems_chain_next( node ) ) { filesystem_node *fsn = (filesystem_node *) node; if ( strcmp( fsn->entry.type, type ) == 0 ) { 1100ee: 83 ec 08 sub $0x8,%esp 1100f1: 56 push %esi 1100f2: ff 73 08 pushl 0x8(%ebx) 1100f5: e8 12 3e 00 00 call 113f0c 1100fa: 83 c4 10 add $0x10,%esp 1100fd: 85 c0 test %eax,%eax 1100ff: 75 e3 jne 1100e4 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 110101: 83 ec 0c sub $0xc,%esp 110104: 53 push %ebx 110105: e8 c6 be ff ff call 10bfd0 <_Chain_Extract> rtems_chain_extract( node ); free( fsn ); 11010a: 89 1c 24 mov %ebx,(%esp) 11010d: e8 82 7f ff ff call 108094 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110112: 5a pop %edx 110113: ff 35 68 63 12 00 pushl 0x126368 110119: e8 6e b6 ff ff call 10b78c 11011e: 83 c4 10 add $0x10,%esp rtems_libio_unlock(); return 0; 110121: 31 c0 xor %eax,%eax } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 110123: 8d 65 f8 lea -0x8(%ebp),%esp 110126: 5b pop %ebx 110127: 5e pop %esi 110128: c9 leave 110129: c3 ret 11012a: 66 90 xchg %ax,%ax <== NOT EXECUTED 11012c: 83 ec 0c sub $0xc,%esp 11012f: ff 35 68 63 12 00 pushl 0x126368 110135: e8 52 b6 ff ff call 10b78c return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 11013a: e8 59 31 00 00 call 113298 <__errno> 11013f: c7 00 02 00 00 00 movl $0x2,(%eax) 110145: 83 c4 10 add $0x10,%esp 110148: b8 ff ff ff ff mov $0xffffffff,%eax } 11014d: 8d 65 f8 lea -0x8(%ebp),%esp 110150: 5b pop %ebx 110151: 5e pop %esi 110152: c9 leave 110153: c3 ret ) { rtems_chain_node *node = NULL; if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); 110154: e8 3f 31 00 00 call 113298 <__errno> 110159: c7 00 16 00 00 00 movl $0x16,(%eax) 11015f: 83 c8 ff or $0xffffffff,%eax 110162: eb e9 jmp 11014d =============================================================================== 001089dc : void *rtems_gxx_getspecific(__gthread_key_t key) { 1089dc: 55 push %ebp 1089dd: 89 e5 mov %esp,%ebp 1089df: 53 push %ebx 1089e0: 83 ec 18 sub $0x18,%esp 1089e3: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code status; void *p= 0; 1089e6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p ); 1089ed: 8d 45 f4 lea -0xc(%ebp),%eax 1089f0: 50 push %eax 1089f1: 53 push %ebx 1089f2: 6a 00 push $0x0 1089f4: e8 7f 3d 00 00 call 10c778 if ( status == RTEMS_SUCCESSFUL ) { 1089f9: 83 c4 10 add $0x10,%esp 1089fc: 85 c0 test %eax,%eax 1089fe: 75 08 jne 108a08 /* We do not have to do this, but what the heck ! */ p= key->val; 108a00: 8b 03 mov (%ebx),%eax p, rtems_task_self() ); #endif return p; } 108a02: 8b 5d fc mov -0x4(%ebp),%ebx 108a05: c9 leave 108a06: c3 ret 108a07: 90 nop <== NOT EXECUTED p= key->val; } else { /* fisrt time, always set to zero, it is unknown the value that the others * threads are using at the moment of this call */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); 108a08: 50 push %eax 108a09: ff 73 04 pushl 0x4(%ebx) 108a0c: 53 push %ebx 108a0d: 6a 00 push $0x0 108a0f: e8 04 3c 00 00 call 10c618 if ( status != RTEMS_SUCCESSFUL ) { 108a14: 83 c4 10 add $0x10,%esp 108a17: 85 c0 test %eax,%eax 108a19: 75 0e jne 108a29 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_GXX_KEY_ADD_FAILED ); } key->val = (void *)0; 108a1b: c7 03 00 00 00 00 movl $0x0,(%ebx) 108a21: 8b 45 f4 mov -0xc(%ebp),%eax p, rtems_task_self() ); #endif return p; } 108a24: 8b 5d fc mov -0x4(%ebp),%ebx 108a27: c9 leave 108a28: c3 ret /* fisrt time, always set to zero, it is unknown the value that the others * threads are using at the moment of this call */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); if ( status != RTEMS_SUCCESSFUL ) { _Internal_error_Occurred( 108a29: 53 push %ebx 108a2a: 6a 15 push $0x15 108a2c: 6a 01 push $0x1 108a2e: 6a 00 push $0x0 108a30: e8 93 4b 00 00 call 10d5c8 <_Internal_error_Occurred> =============================================================================== 001089a8 : int rtems_gxx_key_delete (__gthread_key_t key) { 1089a8: 55 push %ebp 1089a9: 89 e5 mov %esp,%ebp 1089ab: 53 push %ebx 1089ac: 83 ec 0c sub $0xc,%esp 1089af: 8b 5d 08 mov 0x8(%ebp),%ebx #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: delete key=%x\n", key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_delete( RTEMS_SELF, (void **)key ); 1089b2: 53 push %ebx 1089b3: 6a 00 push $0x0 1089b5: e8 22 3d 00 00 call 10c6dc if ( status == RTEMS_SUCCESSFUL ) { 1089ba: 83 c4 10 add $0x10,%esp 1089bd: 85 c0 test %eax,%eax 1089bf: 75 11 jne 1089d2 <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( *(void **)key ); 1089c1: 85 db test %ebx,%ebx 1089c3: 74 0d je 1089d2 <== NEVER TAKEN 1089c5: 83 ec 0c sub $0xc,%esp 1089c8: ff 33 pushl (%ebx) 1089ca: e8 15 fe ff ff call 1087e4 1089cf: 83 c4 10 add $0x10,%esp return 0; } key = NULL; return 0; } 1089d2: 31 c0 xor %eax,%eax 1089d4: 8b 5d fc mov -0x4(%ebp),%ebx 1089d7: c9 leave 1089d8: c3 ret =============================================================================== 001088e0 : /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { 1088e0: 55 push %ebp 1088e1: 89 e5 mov %esp,%ebp 1088e3: 56 push %esi 1088e4: 53 push %ebx 1088e5: 83 ec 10 sub $0x10,%esp 1088e8: 8b 5d 08 mov 0x8(%ebp),%ebx #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { 1088eb: 8b 03 mov (%ebx),%eax 1088ed: 85 c0 test %eax,%eax 1088ef: 74 0b je 1088fc rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); if ( o == 0 ) (*func)(); } return 0; } 1088f1: 31 c0 xor %eax,%eax 1088f3: 8d 65 f8 lea -0x8(%ebp),%esp 1088f6: 5b pop %ebx 1088f7: 5e pop %esi 1088f8: c9 leave 1088f9: c3 ret 1088fa: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( *(volatile __gthread_once_t *)once == 0 ) { rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 1088fc: 51 push %ecx 1088fd: 8d 75 f4 lea -0xc(%ebp),%esi 108900: 56 push %esi 108901: 68 00 01 00 00 push $0x100 108906: 68 00 01 00 00 push $0x100 10890b: e8 30 3b 00 00 call 10c440 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { 108910: 8b 03 mov (%ebx),%eax 108912: 83 c4 10 add $0x10,%esp 108915: 85 c0 test %eax,%eax 108917: 75 27 jne 108940 <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; 108919: c7 03 01 00 00 00 movl $0x1,(%ebx) } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10891f: 52 push %edx 108920: 56 push %esi 108921: 68 00 01 00 00 push $0x100 108926: ff 75 f4 pushl -0xc(%ebp) 108929: e8 12 3b 00 00 call 10c440 if ( o == 0 ) (*func)(); 10892e: ff 55 0c call *0xc(%ebp) 108931: 83 c4 10 add $0x10,%esp } return 0; } 108934: 31 c0 xor %eax,%eax 108936: 8d 65 f8 lea -0x8(%ebp),%esp 108939: 5b pop %ebx 10893a: 5e pop %esi 10893b: c9 leave 10893c: c3 ret 10893d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { *(volatile __gthread_once_t *)once = 1; } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 108940: 50 push %eax <== NOT EXECUTED 108941: 56 push %esi <== NOT EXECUTED 108942: 68 00 01 00 00 push $0x100 <== NOT EXECUTED 108947: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10894a: e8 f1 3a 00 00 call 10c440 <== NOT EXECUTED 10894f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( o == 0 ) (*func)(); } return 0; } 108952: 31 c0 xor %eax,%eax <== NOT EXECUTED 108954: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108957: 5b pop %ebx <== NOT EXECUTED 108958: 5e pop %esi <== NOT EXECUTED 108959: c9 leave <== NOT EXECUTED 10895a: c3 ret <== NOT EXECUTED =============================================================================== 00108a38 : #endif return p; } int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { 108a38: 55 push %ebp 108a39: 89 e5 mov %esp,%ebp 108a3b: 53 push %ebx 108a3c: 83 ec 08 sub $0x8,%esp 108a3f: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_task_self() ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); 108a42: ff 73 04 pushl 0x4(%ebx) 108a45: 53 push %ebx 108a46: 6a 00 push $0x0 108a48: e8 cb 3b 00 00 call 10c618 if ( status == RTEMS_SUCCESSFUL ) { 108a4d: 83 c4 10 add $0x10,%esp 108a50: 85 c0 test %eax,%eax 108a52: 75 0c jne 108a60 <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; 108a54: 8b 45 0c mov 0xc(%ebp),%eax 108a57: 89 03 mov %eax,(%ebx) return 0; 108a59: 31 c0 xor %eax,%eax } return -1; } 108a5b: 8b 5d fc mov -0x4(%ebp),%ebx 108a5e: c9 leave 108a5f: c3 ret if ( status == RTEMS_SUCCESSFUL ) { /* now let's set the proper value */ key->val = (void *)ptr; return 0; } return -1; 108a60: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED } 108a65: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108a68: c9 leave <== NOT EXECUTED 108a69: c3 ret <== NOT EXECUTED =============================================================================== 0010bc14 : void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { 10bc14: 55 push %ebp 10bc15: 89 e5 mov %esp,%ebp 10bc17: 83 ec 08 sub $0x8,%esp if ( 10bc1a: 83 3d c0 df 12 00 03 cmpl $0x3,0x12dfc0 10bc21: 74 21 je 10bc44 <== ALWAYS TAKEN && !malloc_is_system_state_OK() ) { return NULL; } malloc_deferred_frees_process(); 10bc23: e8 e4 ef ff ff call 10ac0c /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( 10bc28: ff 75 10 pushl 0x10(%ebp) 10bc2b: ff 75 0c pushl 0xc(%ebp) 10bc2e: ff 75 08 pushl 0x8(%ebp) 10bc31: ff 35 58 91 12 00 pushl 0x129158 10bc37: e8 d4 4d 00 00 call 110a10 <_Protected_heap_Allocate_aligned_with_boundary> 10bc3c: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap, size, alignment, boundary ); } 10bc3f: c9 leave 10bc40: c3 ret 10bc41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() 10bc44: e8 83 ef ff ff call 10abcc 10bc49: 84 c0 test %al,%al 10bc4b: 75 d6 jne 10bc23 ) { return NULL; 10bc4d: 31 c0 xor %eax,%eax RTEMS_Malloc_Heap, size, alignment, boundary ); } 10bc4f: c9 leave 10bc50: c3 ret =============================================================================== 00112f7c : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112f7c: 55 push %ebp 112f7d: 89 e5 mov %esp,%ebp 112f7f: 53 push %ebx 112f80: 83 ec 04 sub $0x4,%esp 112f83: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112f86: 39 05 20 6f 12 00 cmp %eax,0x126f20 112f8c: 76 1a jbe 112fa8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 112f8e: 8d 14 40 lea (%eax,%eax,2),%edx 112f91: c1 e2 03 shl $0x3,%edx 112f94: 03 15 24 6f 12 00 add 0x126f24,%edx 112f9a: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112f9d: 85 d2 test %edx,%edx 112f9f: 74 13 je 112fb4 } 112fa1: 59 pop %ecx 112fa2: 5b pop %ebx 112fa3: 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; 112fa4: ff e2 jmp *%edx 112fa6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112fa8: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112fad: 5a pop %edx 112fae: 5b pop %ebx 112faf: c9 leave 112fb0: c3 ret 112fb1: 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; 112fb4: 31 c0 xor %eax,%eax } 112fb6: 5a pop %edx 112fb7: 5b pop %ebx 112fb8: c9 leave 112fb9: c3 ret =============================================================================== 00112fbc : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112fbc: 55 push %ebp 112fbd: 89 e5 mov %esp,%ebp 112fbf: 53 push %ebx 112fc0: 83 ec 04 sub $0x4,%esp 112fc3: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112fc6: 39 05 20 6f 12 00 cmp %eax,0x126f20 112fcc: 76 1a jbe 112fe8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 112fce: 8d 14 40 lea (%eax,%eax,2),%edx 112fd1: c1 e2 03 shl $0x3,%edx 112fd4: 03 15 24 6f 12 00 add 0x126f24,%edx 112fda: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112fdd: 85 d2 test %edx,%edx 112fdf: 74 13 je 112ff4 } 112fe1: 59 pop %ecx 112fe2: 5b pop %ebx 112fe3: 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; 112fe4: ff e2 jmp *%edx 112fe6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112fe8: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112fed: 5a pop %edx 112fee: 5b pop %ebx 112fef: c9 leave 112ff0: c3 ret 112ff1: 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; 112ff4: 31 c0 xor %eax,%eax } 112ff6: 5a pop %edx 112ff7: 5b pop %ebx 112ff8: c9 leave 112ff9: c3 ret =============================================================================== 00110f40 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110f40: 55 push %ebp 110f41: 89 e5 mov %esp,%ebp 110f43: 53 push %ebx 110f44: 83 ec 04 sub $0x4,%esp 110f47: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 110f4a: 39 05 20 6f 12 00 cmp %eax,0x126f20 110f50: 76 1a jbe 110f6c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 110f52: 8d 14 40 lea (%eax,%eax,2),%edx 110f55: c1 e2 03 shl $0x3,%edx 110f58: 03 15 24 6f 12 00 add 0x126f24,%edx 110f5e: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110f60: 85 d2 test %edx,%edx 110f62: 74 14 je 110f78 } 110f64: 59 pop %ecx 110f65: 5b pop %ebx 110f66: 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; 110f67: ff e2 jmp *%edx 110f69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 110f6c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110f71: 5a pop %edx 110f72: 5b pop %ebx 110f73: c9 leave 110f74: c3 ret 110f75: 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; 110f78: 31 c0 xor %eax,%eax } 110f7a: 5a pop %edx 110f7b: 5b pop %ebx 110f7c: c9 leave 110f7d: c3 ret =============================================================================== 00107d40 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 107d40: 55 push %ebp 107d41: 89 e5 mov %esp,%ebp 107d43: 57 push %edi 107d44: 56 push %esi 107d45: 53 push %ebx 107d46: 83 ec 48 sub $0x48,%esp 107d49: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( 107d4c: b9 ff ff ff ff mov $0xffffffff,%ecx 107d51: 89 f7 mov %esi,%edi 107d53: 31 c0 xor %eax,%eax 107d55: f2 ae repnz scas %es:(%edi),%al 107d57: f7 d1 not %ecx 107d59: 49 dec %ecx 107d5a: 6a 01 push $0x1 107d5c: 8d 5d d4 lea -0x2c(%ebp),%ebx 107d5f: 53 push %ebx 107d60: 6a 00 push $0x0 107d62: 51 push %ecx 107d63: 56 push %esi 107d64: e8 3f 02 00 00 call 107fa8 107d69: 89 c7 mov %eax,%edi name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; 107d6b: 8b 55 d4 mov -0x2c(%ebp),%edx 107d6e: 89 55 c4 mov %edx,-0x3c(%ebp) node_type = (*loc.ops->node_type_h)( &loc ); 107d71: 83 c4 14 add $0x14,%esp 107d74: 53 push %ebx 107d75: 8b 45 e0 mov -0x20(%ebp),%eax 107d78: ff 50 10 call *0x10(%eax) if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 107d7b: 83 c4 10 add $0x10,%esp 107d7e: 85 ff test %edi,%edi 107d80: 75 05 jne 107d87 <== NEVER TAKEN 107d82: 83 f8 02 cmp $0x2,%eax 107d85: 74 19 je 107da0 rtems_filesystem_freenode( &loc ); 107d87: 83 ec 0c sub $0xc,%esp 107d8a: 53 push %ebx 107d8b: e8 f0 02 00 00 call 108080 return RTEMS_UNSATISFIED; 107d90: 83 c4 10 add $0x10,%esp 107d93: b8 0d 00 00 00 mov $0xd,%eax device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 107d98: 8d 65 f4 lea -0xc(%ebp),%esp 107d9b: 5b pop %ebx 107d9c: 5e pop %esi 107d9d: 5f pop %edi 107d9e: c9 leave 107d9f: c3 ret if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 107da0: 8b 7d 0c mov 0xc(%ebp),%edi 107da3: 89 37 mov %esi,(%edi) device_info->device_name_length = strlen( name ); 107da5: b9 ff ff ff ff mov $0xffffffff,%ecx 107daa: 89 f7 mov %esi,%edi 107dac: 31 c0 xor %eax,%eax 107dae: f2 ae repnz scas %es:(%edi),%al 107db0: f7 d1 not %ecx 107db2: 49 dec %ecx 107db3: 8b 45 0c mov 0xc(%ebp),%eax 107db6: 89 48 04 mov %ecx,0x4(%eax) device_info->major = the_jnode->info.device.major; 107db9: 8b 55 c4 mov -0x3c(%ebp),%edx 107dbc: 8b 42 50 mov 0x50(%edx),%eax 107dbf: 8b 7d 0c mov 0xc(%ebp),%edi 107dc2: 89 47 08 mov %eax,0x8(%edi) device_info->minor = the_jnode->info.device.minor; 107dc5: 8b 42 54 mov 0x54(%edx),%eax 107dc8: 89 47 0c mov %eax,0xc(%edi) rtems_filesystem_freenode( &loc ); 107dcb: 83 ec 0c sub $0xc,%esp 107dce: 53 push %ebx 107dcf: e8 ac 02 00 00 call 108080 return RTEMS_SUCCESSFUL; 107dd4: 83 c4 10 add $0x10,%esp 107dd7: 31 c0 xor %eax,%eax 107dd9: eb bd jmp 107d98 =============================================================================== 00112ffc : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112ffc: 55 push %ebp 112ffd: 89 e5 mov %esp,%ebp 112fff: 53 push %ebx 113000: 83 ec 04 sub $0x4,%esp 113003: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113006: 39 05 20 6f 12 00 cmp %eax,0x126f20 11300c: 76 1a jbe 113028 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 11300e: 8d 14 40 lea (%eax,%eax,2),%edx 113011: c1 e2 03 shl $0x3,%edx 113014: 03 15 24 6f 12 00 add 0x126f24,%edx 11301a: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11301d: 85 d2 test %edx,%edx 11301f: 74 13 je 113034 } 113021: 59 pop %ecx 113022: 5b pop %ebx 113023: 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; 113024: ff e2 jmp *%edx 113026: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 113028: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 11302d: 5a pop %edx 11302e: 5b pop %ebx 11302f: c9 leave 113030: c3 ret 113031: 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; 113034: 31 c0 xor %eax,%eax } 113036: 5a pop %edx 113037: 5b pop %ebx 113038: c9 leave 113039: c3 ret =============================================================================== 0011303c : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 11303c: 55 push %ebp 11303d: 89 e5 mov %esp,%ebp 11303f: 53 push %ebx 113040: 83 ec 04 sub $0x4,%esp 113043: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113046: 39 05 20 6f 12 00 cmp %eax,0x126f20 11304c: 76 1a jbe 113068 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 11304e: 8d 14 40 lea (%eax,%eax,2),%edx 113051: c1 e2 03 shl $0x3,%edx 113054: 03 15 24 6f 12 00 add 0x126f24,%edx 11305a: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11305d: 85 d2 test %edx,%edx 11305f: 74 13 je 113074 } 113061: 59 pop %ecx 113062: 5b pop %ebx 113063: 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; 113064: ff e2 jmp *%edx 113066: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 113068: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 11306d: 5a pop %edx 11306e: 5b pop %ebx 11306f: c9 leave 113070: c3 ret 113071: 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; 113074: 31 c0 xor %eax,%eax } 113076: 5a pop %edx 113077: 5b pop %ebx 113078: c9 leave 113079: c3 ret =============================================================================== 0010ce8c : 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 ) { 10ce8c: 55 push %ebp 10ce8d: 89 e5 mov %esp,%ebp 10ce8f: 57 push %edi 10ce90: 56 push %esi 10ce91: 53 push %ebx 10ce92: 83 ec 0c sub $0xc,%esp 10ce95: 8b 5d 08 mov 0x8(%ebp),%ebx 10ce98: 8b 75 0c mov 0xc(%ebp),%esi 10ce9b: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10ce9e: a1 a0 bb 12 00 mov 0x12bba0,%eax if ( rtems_interrupt_is_in_progress() ) 10cea3: 8b 0d 14 b7 12 00 mov 0x12b714,%ecx 10cea9: 85 c9 test %ecx,%ecx 10ceab: 0f 85 ab 00 00 00 jne 10cf5c return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10ceb1: 85 d2 test %edx,%edx 10ceb3: 0f 84 e7 00 00 00 je 10cfa0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10ceb9: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10cebb: 85 f6 test %esi,%esi 10cebd: 0f 84 dd 00 00 00 je 10cfa0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cec3: 8b 3e mov (%esi),%edi 10cec5: 85 ff test %edi,%edi 10cec7: 0f 84 c7 00 00 00 je 10cf94 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10cecd: 39 d8 cmp %ebx,%eax 10cecf: 76 7b jbe 10cf4c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ced1: a1 54 b1 12 00 mov 0x12b154,%eax 10ced6: 40 inc %eax 10ced7: a3 54 b1 12 00 mov %eax,0x12b154 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10cedc: 85 db test %ebx,%ebx 10cede: 0f 85 88 00 00 00 jne 10cf6c static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10cee4: 8b 0d a0 bb 12 00 mov 0x12bba0,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10ceea: 85 c9 test %ecx,%ecx 10ceec: 0f 84 bb 00 00 00 je 10cfad <== NEVER TAKEN 10cef2: 8b 3d a4 bb 12 00 mov 0x12bba4,%edi 10cef8: 89 f8 mov %edi,%eax 10cefa: eb 08 jmp 10cf04 10cefc: 43 inc %ebx 10cefd: 83 c0 18 add $0x18,%eax 10cf00: 39 d9 cmp %ebx,%ecx 10cf02: 76 0b jbe 10cf0f static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf04: 83 38 00 cmpl $0x0,(%eax) 10cf07: 75 f3 jne 10cefc 10cf09: 83 78 04 00 cmpl $0x0,0x4(%eax) 10cf0d: 75 ed jne 10cefc if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cf0f: 89 1a mov %ebx,(%edx) if ( m != n ) 10cf11: 39 d9 cmp %ebx,%ecx 10cf13: 0f 84 9b 00 00 00 je 10cfb4 10cf19: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf1c: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10cf1f: 01 c7 add %eax,%edi 10cf21: b9 06 00 00 00 mov $0x6,%ecx 10cf26: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10cf28: e8 87 1a 00 00 call 10e9b4 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10cf2d: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10cf34: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10cf3b: 89 5d 08 mov %ebx,0x8(%ebp) } 10cf3e: 83 c4 0c add $0xc,%esp 10cf41: 5b pop %ebx 10cf42: 5e pop %esi 10cf43: 5f pop %edi 10cf44: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10cf45: e9 7a 7d 00 00 jmp 114cc4 10cf4a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 10cf4c: 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 ); } 10cf51: 83 c4 0c add $0xc,%esp 10cf54: 5b pop %ebx 10cf55: 5e pop %esi 10cf56: 5f pop %edi 10cf57: c9 leave 10cf58: c3 ret 10cf59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10cf5c: 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 ); } 10cf61: 83 c4 0c add $0xc,%esp 10cf64: 5b pop %ebx 10cf65: 5e pop %esi 10cf66: 5f pop %edi 10cf67: c9 leave 10cf68: c3 ret 10cf69: 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; 10cf6c: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf6f: c1 e0 03 shl $0x3,%eax 10cf72: 8b 0d a4 bb 12 00 mov 0x12bba4,%ecx 10cf78: 01 c1 add %eax,%ecx static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf7a: 8b 39 mov (%ecx),%edi 10cf7c: 85 ff test %edi,%edi 10cf7e: 74 40 je 10cfc0 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(); 10cf80: e8 2f 1a 00 00 call 10e9b4 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10cf85: 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 ); } 10cf8a: 83 c4 0c add $0xc,%esp 10cf8d: 5b pop %ebx 10cf8e: 5e pop %esi 10cf8f: 5f pop %edi 10cf90: c9 leave 10cf91: c3 ret 10cf92: 66 90 xchg %ax,%ax <== NOT EXECUTED static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf94: 8b 4e 04 mov 0x4(%esi),%ecx 10cf97: 85 c9 test %ecx,%ecx 10cf99: 0f 85 2e ff ff ff jne 10cecd 10cf9f: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10cfa0: b8 09 00 00 00 mov $0x9,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cfa5: 83 c4 0c add $0xc,%esp 10cfa8: 5b pop %ebx 10cfa9: 5e pop %esi 10cfaa: 5f pop %edi 10cfab: c9 leave 10cfac: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cfad: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10cfb3: 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(); 10cfb4: e8 fb 19 00 00 call 10e9b4 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10cfb9: b8 05 00 00 00 mov $0x5,%eax if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; 10cfbe: eb 91 jmp 10cf51 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cfc0: 8b 49 04 mov 0x4(%ecx),%ecx 10cfc3: 85 c9 test %ecx,%ecx 10cfc5: 75 b9 jne 10cf80 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10cfc7: 89 1a mov %ebx,(%edx) 10cfc9: 8b 3d a4 bb 12 00 mov 0x12bba4,%edi 10cfcf: e9 4b ff ff ff jmp 10cf1f =============================================================================== 0010cfd4 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10cfd4: 55 push %ebp 10cfd5: 89 e5 mov %esp,%ebp 10cfd7: 57 push %edi 10cfd8: 83 ec 04 sub $0x4,%esp 10cfdb: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10cfde: 8b 0d 14 b7 12 00 mov 0x12b714,%ecx 10cfe4: 85 c9 test %ecx,%ecx 10cfe6: 75 44 jne 10d02c return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10cfe8: 39 05 a0 bb 12 00 cmp %eax,0x12bba0 10cfee: 77 0c ja 10cffc _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10cff0: b8 0d 00 00 00 mov $0xd,%eax } 10cff5: 5a pop %edx 10cff6: 5f pop %edi 10cff7: c9 leave 10cff8: c3 ret 10cff9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10cffc: 8b 15 54 b1 12 00 mov 0x12b154,%edx 10d002: 42 inc %edx 10d003: 89 15 54 b1 12 00 mov %edx,0x12b154 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10d009: 8d 14 40 lea (%eax,%eax,2),%edx 10d00c: c1 e2 03 shl $0x3,%edx if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d00f: 03 15 a4 bb 12 00 add 0x12bba4,%edx 10d015: b9 18 00 00 00 mov $0x18,%ecx 10d01a: 31 c0 xor %eax,%eax 10d01c: 89 d7 mov %edx,%edi 10d01e: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d020: e8 8f 19 00 00 call 10e9b4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d025: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10d027: 5a pop %edx 10d028: 5f pop %edi 10d029: c9 leave 10d02a: c3 ret 10d02b: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10d02c: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d031: 5a pop %edx 10d032: 5f pop %edi 10d033: c9 leave 10d034: c3 ret =============================================================================== 0011307c : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 11307c: 55 push %ebp 11307d: 89 e5 mov %esp,%ebp 11307f: 53 push %ebx 113080: 83 ec 04 sub $0x4,%esp 113083: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113086: 39 05 20 6f 12 00 cmp %eax,0x126f20 11308c: 76 1a jbe 1130a8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 11308e: 8d 14 40 lea (%eax,%eax,2),%edx 113091: c1 e2 03 shl $0x3,%edx 113094: 03 15 24 6f 12 00 add 0x126f24,%edx 11309a: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11309d: 85 d2 test %edx,%edx 11309f: 74 13 je 1130b4 } 1130a1: 59 pop %ecx 1130a2: 5b pop %ebx 1130a3: 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; 1130a4: ff e2 jmp *%edx 1130a6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1130a8: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1130ad: 5a pop %edx 1130ae: 5b pop %ebx 1130af: c9 leave 1130b0: c3 ret 1130b1: 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; 1130b4: 31 c0 xor %eax,%eax } 1130b6: 5a pop %edx 1130b7: 5b pop %ebx 1130b8: c9 leave 1130b9: c3 ret =============================================================================== 0010df80 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10df80: 55 push %ebp 10df81: 89 e5 mov %esp,%ebp 10df83: 57 push %edi 10df84: 56 push %esi 10df85: 53 push %ebx 10df86: 83 ec 1c sub $0x1c,%esp 10df89: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10df8c: 85 ff test %edi,%edi 10df8e: 74 49 je 10dfd9 <== NEVER TAKEN 10df90: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10df97: 8b 55 e4 mov -0x1c(%ebp),%edx 10df9a: 8b 04 95 2c 23 13 00 mov 0x13232c(,%edx,4),%eax 10dfa1: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10dfa4: 85 f6 test %esi,%esi 10dfa6: 74 28 je 10dfd0 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10dfa8: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10dfad: 74 21 je 10dfd0 10dfaf: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10dfb4: 8b 46 1c mov 0x1c(%esi),%eax 10dfb7: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10dfba: 85 c0 test %eax,%eax 10dfbc: 74 09 je 10dfc7 <== NEVER TAKEN continue; (*routine)(the_thread); 10dfbe: 83 ec 0c sub $0xc,%esp 10dfc1: 50 push %eax 10dfc2: ff d7 call *%edi 10dfc4: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10dfc7: 43 inc %ebx 10dfc8: 0f b7 46 10 movzwl 0x10(%esi),%eax 10dfcc: 39 d8 cmp %ebx,%eax 10dfce: 73 e4 jae 10dfb4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10dfd0: ff 45 e4 incl -0x1c(%ebp) 10dfd3: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10dfd7: 75 be jne 10df97 (*routine)(the_thread); } } } 10dfd9: 8d 65 f4 lea -0xc(%ebp),%esp 10dfdc: 5b pop %ebx 10dfdd: 5e pop %esi 10dfde: 5f pop %edi 10dfdf: c9 leave 10dfe0: c3 ret =============================================================================== 0010fda8 : */ void rtems_libio_free( rtems_libio_t *iop ) { 10fda8: 55 push %ebp 10fda9: 89 e5 mov %esp,%ebp 10fdab: 53 push %ebx 10fdac: 83 ec 08 sub $0x8,%esp 10fdaf: 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 ); 10fdb2: 6a 00 push $0x0 10fdb4: 6a 00 push $0x0 10fdb6: ff 35 68 63 12 00 pushl 0x126368 10fdbc: e8 cf b8 ff ff call 10b690 rtems_libio_lock(); if (iop->sem) 10fdc1: 8b 43 2c mov 0x2c(%ebx),%eax 10fdc4: 83 c4 10 add $0x10,%esp 10fdc7: 85 c0 test %eax,%eax 10fdc9: 74 0c je 10fdd7 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 10fdcb: 83 ec 0c sub $0xc,%esp 10fdce: 50 push %eax 10fdcf: e8 18 b8 ff ff call 10b5ec 10fdd4: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10fdd7: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10fdde: a1 64 63 12 00 mov 0x126364,%eax 10fde3: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10fde6: 89 1d 64 63 12 00 mov %ebx,0x126364 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fdec: a1 68 63 12 00 mov 0x126368,%eax 10fdf1: 89 45 08 mov %eax,0x8(%ebp) rtems_libio_unlock(); } 10fdf4: 8b 5d fc mov -0x4(%ebp),%ebx 10fdf7: c9 leave 10fdf8: e9 8f b9 ff ff jmp 10b78c =============================================================================== 00108190 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 108190: 55 push %ebp 108191: 89 e5 mov %esp,%ebp 108193: 53 push %ebx 108194: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 108197: 8b 1d 4c 21 12 00 mov 0x12214c,%ebx 10819d: 85 db test %ebx,%ebx 10819f: 74 50 je 1081f1 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1081a1: 83 ec 08 sub $0x8,%esp 1081a4: 6a 38 push $0x38 1081a6: 53 push %ebx 1081a7: e8 58 fd ff ff call 107f04 1081ac: 89 c2 mov %eax,%edx 1081ae: a3 60 63 12 00 mov %eax,0x126360 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1081b3: 83 c4 10 add $0x10,%esp 1081b6: 85 c0 test %eax,%eax 1081b8: 74 74 je 10822e rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1081ba: a3 64 63 12 00 mov %eax,0x126364 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1081bf: 83 fb 01 cmp $0x1,%ebx 1081c2: 76 26 jbe 1081ea <== NEVER TAKEN * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 1081c4: 8d 50 38 lea 0x38(%eax),%edx 1081c7: b9 01 00 00 00 mov $0x1,%ecx 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++) iop->data1 = iop + 1; 1081cc: 89 52 fc mov %edx,-0x4(%edx) 1081cf: 41 inc %ecx 1081d0: 83 c2 38 add $0x38,%edx sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1081d3: 39 d9 cmp %ebx,%ecx 1081d5: 75 f5 jne 1081cc * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 1081d7: 8d 0c cd f8 ff ff ff lea -0x8(,%ecx,8),%ecx 1081de: 8d 14 cd 00 00 00 00 lea 0x0(,%ecx,8),%edx 1081e5: 29 ca sub %ecx,%edx sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1081e7: 8d 14 10 lea (%eax,%edx,1),%edx iop->data1 = iop + 1; iop->data1 = NULL; 1081ea: 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( 1081f1: 83 ec 0c sub $0xc,%esp 1081f4: 68 68 63 12 00 push $0x126368 1081f9: 6a 00 push $0x0 1081fb: 6a 54 push $0x54 1081fd: 6a 01 push $0x1 1081ff: 68 4f 49 42 4c push $0x4c42494f 108204: e8 0b 32 00 00 call 10b414 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 108209: 83 c4 20 add $0x20,%esp 10820c: 85 c0 test %eax,%eax 10820e: 75 15 jne 108225 <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 108210: a1 48 21 12 00 mov 0x122148,%eax 108215: 85 c0 test %eax,%eax 108217: 74 07 je 108220 <== NEVER TAKEN (* rtems_fs_init_helper)(); } 108219: 8b 5d fc mov -0x4(%ebp),%ebx 10821c: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 10821d: ff e0 jmp *%eax 10821f: 90 nop <== NOT EXECUTED } 108220: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108223: c9 leave <== NOT EXECUTED 108224: 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 ); 108225: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108228: 50 push %eax <== NOT EXECUTED 108229: e8 a2 3a 00 00 call 10bcd0 <== 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); 10822e: 83 ec 0c sub $0xc,%esp 108231: 6a 1a push $0x1a 108233: e8 98 3a 00 00 call 10bcd0 =============================================================================== 0010fe64 : */ int rtems_libio_is_file_open( void *node_access ) { 10fe64: 55 push %ebp 10fe65: 89 e5 mov %esp,%ebp 10fe67: 53 push %ebx 10fe68: 83 ec 08 sub $0x8,%esp 10fe6b: 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 ); 10fe6e: 6a 00 push $0x0 10fe70: 6a 00 push $0x0 10fe72: ff 35 68 63 12 00 pushl 0x126368 10fe78: e8 13 b8 ff ff call 10b690 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fe7d: a1 60 63 12 00 mov 0x126360,%eax 10fe82: 8b 0d 4c 21 12 00 mov 0x12214c,%ecx 10fe88: 83 c4 10 add $0x10,%esp 10fe8b: 85 c9 test %ecx,%ecx 10fe8d: 74 18 je 10fea7 <== NEVER TAKEN 10fe8f: 31 d2 xor %edx,%edx 10fe91: eb 04 jmp 10fe97 10fe93: 90 nop <== NOT EXECUTED 10fe94: 83 c0 38 add $0x38,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10fe97: f6 40 15 01 testb $0x1,0x15(%eax) 10fe9b: 74 05 je 10fea2 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 10fe9d: 39 58 18 cmp %ebx,0x18(%eax) 10fea0: 74 1e je 10fec0 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fea2: 42 inc %edx 10fea3: 39 ca cmp %ecx,%edx 10fea5: 72 ed jb 10fe94 int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; 10fea7: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fea9: 83 ec 0c sub $0xc,%esp 10feac: ff 35 68 63 12 00 pushl 0x126368 10feb2: e8 d5 b8 ff ff call 10b78c } rtems_libio_unlock(); return result; } 10feb7: 89 d8 mov %ebx,%eax 10feb9: 8b 5d fc mov -0x4(%ebp),%ebx 10febc: c9 leave 10febd: c3 ret 10febe: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { result = 1; 10fec0: bb 01 00 00 00 mov $0x1,%ebx 10fec5: eb e2 jmp 10fea9 =============================================================================== 0010fe00 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 10fe00: 55 push %ebp 10fe01: 89 e5 mov %esp,%ebp 10fe03: 53 push %ebx 10fe04: 83 ec 08 sub $0x8,%esp 10fe07: 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 ); 10fe0a: 6a 00 push $0x0 10fe0c: 6a 00 push $0x0 10fe0e: ff 35 68 63 12 00 pushl 0x126368 10fe14: e8 77 b8 ff ff call 10b690 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fe19: a1 60 63 12 00 mov 0x126360,%eax 10fe1e: 8b 0d 4c 21 12 00 mov 0x12214c,%ecx 10fe24: 83 c4 10 add $0x10,%esp 10fe27: 85 c9 test %ecx,%ecx 10fe29: 74 18 je 10fe43 <== NEVER TAKEN 10fe2b: 31 d2 xor %edx,%edx 10fe2d: eb 04 jmp 10fe33 10fe2f: 90 nop <== NOT EXECUTED 10fe30: 83 c0 38 add $0x38,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10fe33: f6 40 15 01 testb $0x1,0x15(%eax) 10fe37: 74 05 je 10fe3e /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 10fe39: 39 58 28 cmp %ebx,0x28(%eax) 10fe3c: 74 1e je 10fe5c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fe3e: 42 inc %edx 10fe3f: 39 ca cmp %ecx,%edx 10fe41: 72 ed jb 10fe30 int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { rtems_libio_t *iop; int result = 0; 10fe43: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fe45: 83 ec 0c sub $0xc,%esp 10fe48: ff 35 68 63 12 00 pushl 0x126368 10fe4e: e8 39 b9 ff ff call 10b78c } rtems_libio_unlock(); return result; } 10fe53: 89 d8 mov %ebx,%eax 10fe55: 8b 5d fc mov -0x4(%ebp),%ebx 10fe58: c9 leave 10fe59: c3 ret 10fe5a: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { result = 1; 10fe5c: bb 01 00 00 00 mov $0x1,%ebx 10fe61: eb e2 jmp 10fe45 =============================================================================== 00109560 : rtems_status_code rtems_libio_set_private_env(void) { 109560: 55 push %ebp 109561: 89 e5 mov %esp,%ebp 109563: 57 push %edi 109564: 56 push %esi 109565: 53 push %ebx 109566: 83 ec 5c sub $0x5c,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_id task_id = rtems_task_self(); 109569: e8 0e 2e 00 00 call 10c37c 10956e: 89 45 b4 mov %eax,-0x4c(%ebp) rtems_filesystem_location_info_t root_loc; rtems_filesystem_location_info_t current_loc; rtems_user_env_t *new_env = NULL; int rv = 0; rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); 109571: 83 ec 0c sub $0xc,%esp 109574: 6a 00 push $0x0 109576: 8d 5d d4 lea -0x2c(%ebp),%ebx 109579: 53 push %ebx 10957a: 6a 00 push $0x0 10957c: 6a 01 push $0x1 10957e: 68 47 13 12 00 push $0x121347 109583: e8 50 ee ff ff call 1083d8 if (rv != 0) 109588: 83 c4 20 add $0x20,%esp 10958b: 85 c0 test %eax,%eax 10958d: 74 0d je 10959c <== ALWAYS TAKEN error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; 10958f: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED } 109594: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109597: 5b pop %ebx <== NOT EXECUTED 109598: 5e pop %esi <== NOT EXECUTED 109599: 5f pop %edi <== NOT EXECUTED 10959a: c9 leave <== NOT EXECUTED 10959b: c3 ret <== NOT EXECUTED rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); if (rv != 0) goto error_0; rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0); 10959c: 83 ec 0c sub $0xc,%esp 10959f: 6a 00 push $0x0 1095a1: 8d 45 c0 lea -0x40(%ebp),%eax 1095a4: 89 45 a4 mov %eax,-0x5c(%ebp) 1095a7: 50 push %eax 1095a8: 6a 00 push $0x0 1095aa: 6a 01 push $0x1 1095ac: 68 47 13 12 00 push $0x121347 1095b1: e8 22 ee ff ff call 1083d8 if (rv != 0) 1095b6: 83 c4 20 add $0x20,%esp 1095b9: 85 c0 test %eax,%eax 1095bb: 0f 85 9a 00 00 00 jne 10965b <== NEVER TAKEN * Bharath: I'm not sure if the check can be reduced to * if( rtems_current_user_env->task_id != task_id ) { */ if ( rtems_current_user_env == &rtems_global_user_env 1095c1: 8b 15 d0 59 12 00 mov 0x1259d0,%edx /* * Bharath: I'm not sure if the check can be reduced to * if( rtems_current_user_env->task_id != task_id ) { */ if ( 1095c7: 81 fa 60 7c 12 00 cmp $0x127c60,%edx 1095cd: 74 07 je 1095d6 rtems_current_user_env == &rtems_global_user_env || rtems_current_user_env->task_id != task_id 1095cf: 8b 45 b4 mov -0x4c(%ebp),%eax 1095d2: 39 02 cmp %eax,(%edx) 1095d4: 74 3a je 109610 ) { new_env = malloc(sizeof(rtems_user_env_t)); 1095d6: 83 ec 0c sub $0xc,%esp 1095d9: 6a 48 push $0x48 1095db: e8 14 f4 ff ff call 1089f4 1095e0: 89 c2 mov %eax,%edx 1095e2: 89 c6 mov %eax,%esi if (new_env == NULL) 1095e4: 83 c4 10 add $0x10,%esp 1095e7: 85 c0 test %eax,%eax 1095e9: 74 61 je 10964c #ifdef HAVE_USERENV_REFCNT new_env->refcnt = 1; #endif sc = rtems_task_variable_add( 1095eb: 50 push %eax 1095ec: 68 20 95 10 00 push $0x109520 1095f1: 68 d0 59 12 00 push $0x1259d0 1095f6: 6a 00 push $0x0 1095f8: 89 55 b0 mov %edx,-0x50(%ebp) 1095fb: e8 00 2e 00 00 call 10c400 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) 109600: 83 c4 10 add $0x10,%esp 109603: 85 c0 test %eax,%eax 109605: 8b 55 b0 mov -0x50(%ebp),%edx 109608: 75 36 jne 109640 goto error_3; rtems_current_user_env = new_env; 10960a: 89 15 d0 59 12 00 mov %edx,0x1259d0 } /* Inherit the global values */ *rtems_current_user_env = rtems_global_user_env; 109610: be 60 7c 12 00 mov $0x127c60,%esi 109615: b9 12 00 00 00 mov $0x12,%ecx 10961a: 89 d7 mov %edx,%edi 10961c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id = task_id; 10961e: 8b 75 b4 mov -0x4c(%ebp),%esi 109621: 89 32 mov %esi,(%edx) * Clone the pathlocs. In contrast to most other code we must _not_ free the * original locs because what we are trying to do here is forking off clones. * The reason is a pathloc can be allocated by the file system and needs to * be freed when deleting the environment. */ rtems_filesystem_root = root_loc; 109623: 8d 7a 18 lea 0x18(%edx),%edi 109626: b1 05 mov $0x5,%cl 109628: 89 de mov %ebx,%esi 10962a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_current = current_loc; 10962c: 8d 7a 04 lea 0x4(%edx),%edi 10962f: b1 05 mov $0x5,%cl 109631: 8b 75 a4 mov -0x5c(%ebp),%esi 109634: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return RTEMS_SUCCESSFUL; 109636: 31 c0 xor %eax,%eax error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } 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 rtems_filesystem_current = current_loc; return RTEMS_SUCCESSFUL; error_3: free(new_env); 109640: 83 ec 0c sub $0xc,%esp 109643: 56 push %esi 109644: e8 7b ee ff ff call 1084c4 109649: 83 c4 10 add $0x10,%esp error_2: rtems_filesystem_freenode(¤t_loc); 10964c: 83 ec 0c sub $0xc,%esp 10964f: 8d 45 c0 lea -0x40(%ebp),%eax 109652: 50 push %eax 109653: e8 58 ee ff ff call 1084b0 109658: 83 c4 10 add $0x10,%esp error_1: rtems_filesystem_freenode(&root_loc); 10965b: 83 ec 0c sub $0xc,%esp 10965e: 53 push %ebx 10965f: e8 4c ee ff ff call 1084b0 109664: 83 c4 10 add $0x10,%esp error_0: return RTEMS_NO_MEMORY; 109667: b8 1a 00 00 00 mov $0x1a,%eax } 10966c: 8d 65 f4 lea -0xc(%ebp),%esp 10966f: 5b pop %ebx 109670: 5e pop %esi 109671: 5f pop %edi 109672: c9 leave 109673: c3 ret =============================================================================== 00109674 : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 109674: 55 push %ebp 109675: 89 e5 mov %esp,%ebp 109677: 56 push %esi 109678: 53 push %ebx 109679: 83 ec 20 sub $0x20,%esp 10967c: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_id current_task_id; /* * get current task id */ current_task_id = rtems_task_self(); 10967f: e8 f8 2c 00 00 call 10c37c 109684: 89 c6 mov %eax,%esi /* * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) 109686: 39 c3 cmp %eax,%ebx 109688: 74 32 je 1096bc <== NEVER TAKEN return RTEMS_SUCCESSFUL; /* * Try to get the requested user environment */ sc = rtems_task_variable_get( 10968a: 52 push %edx task_id, (void*)&rtems_current_user_env, (void*)&shared_user_env ); 10968b: 8d 45 f4 lea -0xc(%ebp),%eax if( task_id == current_task_id ) return RTEMS_SUCCESSFUL; /* * Try to get the requested user environment */ sc = rtems_task_variable_get( 10968e: 50 push %eax 10968f: 68 d0 59 12 00 push $0x1259d0 109694: 53 push %ebx 109695: e8 2a 2e 00 00 call 10c4c4 (void*)&shared_user_env ); /* * If it was not successful, return the error code */ if (sc != RTEMS_SUCCESSFUL) 10969a: 83 c4 10 add $0x10,%esp 10969d: 85 c0 test %eax,%eax 10969f: 75 13 jne 1096b4 * If we have a current environment in place, we need to * free it, since we will be sharing the variable with the * shared_user_env */ if (rtems_current_user_env->task_id==current_task_id) { 1096a1: 8b 15 d0 59 12 00 mov 0x1259d0,%edx 1096a7: 39 32 cmp %esi,(%edx) 1096a9: 74 1d je 1096c8 rtems_user_env_t *tmp = rtems_current_user_env; free_user_env( tmp ); } /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 1096ab: 8b 55 f4 mov -0xc(%ebp),%edx 1096ae: 89 15 d0 59 12 00 mov %edx,0x1259d0 #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; } 1096b4: 8d 65 f8 lea -0x8(%ebp),%esp 1096b7: 5b pop %ebx 1096b8: 5e pop %esi 1096b9: c9 leave 1096ba: c3 ret 1096bb: 90 nop <== NOT EXECUTED * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) return RTEMS_SUCCESSFUL; 1096bc: 31 c0 xor %eax,%eax <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; } 1096be: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1096c1: 5b pop %ebx <== NOT EXECUTED 1096c2: 5e pop %esi <== NOT EXECUTED 1096c3: c9 leave <== NOT EXECUTED 1096c4: c3 ret <== NOT EXECUTED 1096c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * shared_user_env */ if (rtems_current_user_env->task_id==current_task_id) { rtems_user_env_t *tmp = rtems_current_user_env; free_user_env( tmp ); 1096c8: 83 ec 0c sub $0xc,%esp 1096cb: 52 push %edx 1096cc: 89 45 e4 mov %eax,-0x1c(%ebp) 1096cf: e8 4c fe ff ff call 109520 1096d4: 83 c4 10 add $0x10,%esp 1096d7: 8b 45 e4 mov -0x1c(%ebp),%eax 1096da: eb cf jmp 1096ab =============================================================================== 0010fcc0 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10fcc0: 55 push %ebp 10fcc1: 89 e5 mov %esp,%ebp 10fcc3: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10fcc6: 89 d0 mov %edx,%eax 10fcc8: 83 e0 06 and $0x6,%eax 10fccb: 83 f8 06 cmp $0x6,%eax 10fcce: 74 2c je 10fcfc <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10fcd0: f6 c2 02 test $0x2,%dl 10fcd3: 75 23 jne 10fcf8 <== ALWAYS TAKEN ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 10fcd5: 31 c0 xor %eax,%eax <== NOT EXECUTED 10fcd7: f6 c2 04 test $0x4,%dl <== NOT EXECUTED 10fcda: 0f 95 c0 setne %al <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 10fcdd: f6 c2 01 test $0x1,%dl 10fce0: 74 03 je 10fce5 fcntl_flags |= O_NONBLOCK; 10fce2: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10fce5: f6 c6 02 test $0x2,%dh 10fce8: 74 03 je 10fced fcntl_flags |= O_APPEND; 10fcea: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10fced: 80 e6 04 and $0x4,%dh 10fcf0: 74 03 je 10fcf5 fcntl_flags |= O_CREAT; 10fcf2: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10fcf5: c9 leave 10fcf6: c3 ret 10fcf7: 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) { fcntl_flags |= O_RDONLY; 10fcf8: 31 c0 xor %eax,%eax 10fcfa: eb e1 jmp 10fcdd ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 10fcfc: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 10fd01: eb da jmp 10fcdd <== NOT EXECUTED =============================================================================== 0010aef0 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 10aef0: 55 push %ebp 10aef1: 89 e5 mov %esp,%ebp 10aef3: 83 ec 1c sub $0x1c,%esp uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 10aef6: 8d 45 f4 lea -0xc(%ebp),%eax 10aef9: 50 push %eax 10aefa: ff 75 08 pushl 0x8(%ebp) 10aefd: ff 35 58 91 12 00 pushl 0x129158 10af03: e8 b0 5b 00 00 call 110ab8 <_Protected_heap_Get_block_size> 10af08: 83 c4 10 add $0x10,%esp 10af0b: 84 c0 test %al,%al 10af0d: 74 11 je 10af20 <== NEVER TAKEN MSBUMP(lifetime_freed, size); 10af0f: 8b 45 f4 mov -0xc(%ebp),%eax 10af12: 31 d2 xor %edx,%edx 10af14: 01 05 e4 dc 12 00 add %eax,0x12dce4 10af1a: 11 15 e8 dc 12 00 adc %edx,0x12dce8 } } 10af20: c9 leave 10af21: c3 ret =============================================================================== 0010af24 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 10af24: 55 push %ebp 10af25: 89 e5 mov %esp,%ebp 10af27: 83 ec 18 sub $0x18,%esp 10af2a: 8b 45 08 mov 0x8(%ebp),%eax uintptr_t actual_size = 0; 10af2d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 10af34: 85 c0 test %eax,%eax 10af36: 74 43 je 10af7b <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 10af38: 52 push %edx 10af39: 8d 55 f4 lea -0xc(%ebp),%edx 10af3c: 52 push %edx 10af3d: 50 push %eax 10af3e: ff 35 58 91 12 00 pushl 0x129158 10af44: e8 6f 5b 00 00 call 110ab8 <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); 10af49: 8b 45 f4 mov -0xc(%ebp),%eax 10af4c: 31 d2 xor %edx,%edx 10af4e: 03 05 dc dc 12 00 add 0x12dcdc,%eax 10af54: 13 15 e0 dc 12 00 adc 0x12dce0,%edx 10af5a: a3 dc dc 12 00 mov %eax,0x12dcdc 10af5f: 89 15 e0 dc 12 00 mov %edx,0x12dce0 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 10af65: 2b 05 e4 dc 12 00 sub 0x12dce4,%eax if (current_depth > s->max_depth) 10af6b: 83 c4 10 add $0x10,%esp 10af6e: 3b 05 d8 dc 12 00 cmp 0x12dcd8,%eax 10af74: 76 05 jbe 10af7b s->max_depth = current_depth; 10af76: a3 d8 dc 12 00 mov %eax,0x12dcd8 } 10af7b: c9 leave 10af7c: c3 ret =============================================================================== 00113c9c : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 113c9c: 55 push %ebp 113c9d: 89 e5 mov %esp,%ebp 113c9f: 53 push %ebx 113ca0: 83 ec 14 sub $0x14,%esp 113ca3: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 113ca6: 85 db test %ebx,%ebx 113ca8: 74 5b je 113d05 return EINVAL; *pointer = NULL; 113caa: 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()) && 113cb0: 83 3d 00 b3 12 00 03 cmpl $0x3,0x12b300 113cb7: 74 43 je 113cfc <== ALWAYS TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 113cb9: e8 72 54 ff ff call 109130 Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return 113cbe: 6a 00 push $0x0 113cc0: ff 75 0c pushl 0xc(%ebp) 113cc3: ff 75 10 pushl 0x10(%ebp) 113cc6: ff 35 f8 6c 12 00 pushl 0x126cf8 113ccc: e8 9b a6 ff ff call 10e36c <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 113cd1: 83 c4 10 add $0x10,%esp 113cd4: 85 c0 test %eax,%eax 113cd6: 74 38 je 113d10 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 113cd8: 8b 15 08 93 12 00 mov 0x129308,%edx 113cde: 85 d2 test %edx,%edx 113ce0: 74 10 je 113cf2 (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 113ce2: 83 ec 0c sub $0xc,%esp 113ce5: 53 push %ebx 113ce6: 89 45 f4 mov %eax,-0xc(%ebp) 113ce9: ff 52 04 call *0x4(%edx) 113cec: 83 c4 10 add $0x10,%esp 113cef: 8b 45 f4 mov -0xc(%ebp),%eax *pointer = return_this; 113cf2: 89 03 mov %eax,(%ebx) return 0; 113cf4: 31 c0 xor %eax,%eax } 113cf6: 8b 5d fc mov -0x4(%ebp),%ebx 113cf9: c9 leave 113cfa: c3 ret 113cfb: 90 nop <== NOT EXECUTED /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) 113cfc: e8 ef 53 ff ff call 1090f0 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 113d01: 84 c0 test %al,%al 113d03: 75 b4 jne 113cb9 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) return EINVAL; 113d05: b8 16 00 00 00 mov $0x16,%eax if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(pointer); *pointer = return_this; return 0; } 113d0a: 8b 5d fc mov -0x4(%ebp),%ebx 113d0d: c9 leave 113d0e: c3 ret 113d0f: 90 nop <== NOT EXECUTED RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) return ENOMEM; 113d10: b8 0c 00 00 00 mov $0xc,%eax 113d15: eb df jmp 113cf6 =============================================================================== 00116398 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 116398: 55 push %ebp 116399: 89 e5 mov %esp,%ebp 11639b: 57 push %edi 11639c: 56 push %esi 11639d: 53 push %ebx 11639e: 83 ec 1c sub $0x1c,%esp 1163a1: 8b 7d 08 mov 0x8(%ebp),%edi 1163a4: 8b 5d 0c mov 0xc(%ebp),%ebx 1163a7: 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 ) 1163aa: 85 db test %ebx,%ebx 1163ac: 74 62 je 116410 return RTEMS_INVALID_ADDRESS; if ( !count ) 1163ae: 85 f6 test %esi,%esi 1163b0: 74 5e je 116410 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1163b2: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1163b3: 8d 45 e4 lea -0x1c(%ebp),%eax 1163b6: 50 push %eax 1163b7: 57 push %edi 1163b8: 68 e0 2a 14 00 push $0x142ae0 1163bd: e8 be 4e 00 00 call 11b280 <_Objects_Get> switch ( location ) { 1163c2: 83 c4 10 add $0x10,%esp 1163c5: 8b 55 e4 mov -0x1c(%ebp),%edx 1163c8: 85 d2 test %edx,%edx 1163ca: 74 10 je 1163dc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1163cc: b8 04 00 00 00 mov $0x4,%eax } 1163d1: 8d 65 f4 lea -0xc(%ebp),%esp 1163d4: 5b pop %ebx 1163d5: 5e pop %esi 1163d6: 5f pop %edi 1163d7: c9 leave 1163d8: c3 ret 1163d9: 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( 1163dc: 83 ec 08 sub $0x8,%esp 1163df: 56 push %esi 1163e0: 6a 00 push $0x0 1163e2: 57 push %edi 1163e3: ff 75 10 pushl 0x10(%ebp) 1163e6: 53 push %ebx 1163e7: 83 c0 14 add $0x14,%eax 1163ea: 50 push %eax 1163eb: e8 94 34 00 00 call 119884 <_CORE_message_queue_Broadcast> 1163f0: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 1163f2: 83 c4 20 add $0x20,%esp 1163f5: e8 16 57 00 00 call 11bb10 <_Thread_Enable_dispatch> return 1163fa: 83 ec 0c sub $0xc,%esp 1163fd: 53 push %ebx 1163fe: e8 69 03 00 00 call 11676c <_Message_queue_Translate_core_message_queue_return_code> 116403: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116406: 8d 65 f4 lea -0xc(%ebp),%esp 116409: 5b pop %ebx 11640a: 5e pop %esi 11640b: 5f pop %edi 11640c: c9 leave 11640d: c3 ret 11640e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 116410: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116415: 8d 65 f4 lea -0xc(%ebp),%esp 116418: 5b pop %ebx 116419: 5e pop %esi 11641a: 5f pop %edi 11641b: c9 leave 11641c: c3 ret =============================================================================== 00113824 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 113824: 55 push %ebp 113825: 89 e5 mov %esp,%ebp 113827: 57 push %edi 113828: 56 push %esi 113829: 53 push %ebx 11382a: 83 ec 2c sub $0x2c,%esp 11382d: 8b 5d 08 mov 0x8(%ebp),%ebx 113830: 8b 75 0c mov 0xc(%ebp),%esi 113833: 8b 4d 10 mov 0x10(%ebp),%ecx 113836: 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 ) ) 113839: 85 db test %ebx,%ebx 11383b: 74 2f je 11386c return RTEMS_INVALID_NAME; if ( !id ) 11383d: 85 ff test %edi,%edi 11383f: 0f 84 a3 00 00 00 je 1138e8 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113845: 85 f6 test %esi,%esi 113847: 74 13 je 11385c return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 113849: 85 c9 test %ecx,%ecx 11384b: 75 2f jne 11387c return RTEMS_INVALID_SIZE; 11384d: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113852: 8d 65 f4 lea -0xc(%ebp),%esp 113855: 5b pop %ebx 113856: 5e pop %esi 113857: 5f pop %edi 113858: c9 leave 113859: c3 ret 11385a: 66 90 xchg %ax,%ax <== NOT EXECUTED !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 11385c: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113861: 8d 65 f4 lea -0xc(%ebp),%esp 113864: 5b pop %ebx 113865: 5e pop %esi 113866: 5f pop %edi 113867: c9 leave 113868: c3 ret 113869: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11386c: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113871: 8d 65 f4 lea -0xc(%ebp),%esp 113874: 5b pop %ebx 113875: 5e pop %esi 113876: 5f pop %edi 113877: c9 leave 113878: c3 ret 113879: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11387c: a1 34 0b 13 00 mov 0x130b34,%eax 113881: 40 inc %eax 113882: a3 34 0b 13 00 mov %eax,0x130b34 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113887: 89 4d d4 mov %ecx,-0x2c(%ebp) 11388a: e8 19 5f 00 00 call 1197a8 <_Message_queue_Allocate> 11388f: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113891: 85 c0 test %eax,%eax 113893: 8b 4d d4 mov -0x2c(%ebp),%ecx 113896: 74 7c je 113914 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113898: 8b 45 14 mov 0x14(%ebp),%eax 11389b: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 11389e: a8 04 test $0x4,%al 1138a0: 0f 95 c0 setne %al 1138a3: 0f b6 c0 movzbl %al,%eax 1138a6: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 1138a9: 51 push %ecx 1138aa: 56 push %esi 1138ab: 8d 45 e4 lea -0x1c(%ebp),%eax 1138ae: 50 push %eax 1138af: 8d 42 14 lea 0x14(%edx),%eax 1138b2: 50 push %eax 1138b3: 89 55 d4 mov %edx,-0x2c(%ebp) 1138b6: e8 21 11 00 00 call 1149dc <_CORE_message_queue_Initialize> 1138bb: 83 c4 10 add $0x10,%esp 1138be: 84 c0 test %al,%al 1138c0: 8b 55 d4 mov -0x2c(%ebp),%edx 1138c3: 75 2f jne 1138f4 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 1138c5: 83 ec 08 sub $0x8,%esp 1138c8: 52 push %edx 1138c9: 68 00 15 13 00 push $0x131500 1138ce: e8 b1 1f 00 00 call 115884 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 1138d3: e8 fc 29 00 00 call 1162d4 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 1138d8: 83 c4 10 add $0x10,%esp 1138db: b8 0d 00 00 00 mov $0xd,%eax 1138e0: e9 6d ff ff ff jmp 113852 1138e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 1138e8: b8 09 00 00 00 mov $0x9,%eax 1138ed: e9 60 ff ff ff jmp 113852 1138f2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1138f4: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1138f7: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1138fa: 8b 0d 1c 15 13 00 mov 0x13151c,%ecx 113900: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113903: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 113906: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 113908: e8 c7 29 00 00 call 1162d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11390d: 31 c0 xor %eax,%eax 11390f: e9 3e ff ff ff jmp 113852 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113914: e8 bb 29 00 00 call 1162d4 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 113919: b8 05 00 00 00 mov $0x5,%eax 11391e: e9 2f ff ff ff jmp 113852 =============================================================================== 00116520 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 116520: 55 push %ebp 116521: 89 e5 mov %esp,%ebp 116523: 53 push %ebx 116524: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 116527: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11652a: 50 push %eax 11652b: ff 75 08 pushl 0x8(%ebp) 11652e: 68 e0 2a 14 00 push $0x142ae0 116533: e8 48 4d 00 00 call 11b280 <_Objects_Get> 116538: 89 c3 mov %eax,%ebx switch ( location ) { 11653a: 83 c4 10 add $0x10,%esp 11653d: 8b 4d f4 mov -0xc(%ebp),%ecx 116540: 85 c9 test %ecx,%ecx 116542: 75 3c jne 116580 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116544: 83 ec 08 sub $0x8,%esp 116547: 50 push %eax 116548: 68 e0 2a 14 00 push $0x142ae0 11654d: e8 b6 48 00 00 call 11ae08 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 116552: 83 c4 0c add $0xc,%esp 116555: 6a 05 push $0x5 116557: 6a 00 push $0x0 116559: 8d 43 14 lea 0x14(%ebx),%eax 11655c: 50 push %eax 11655d: e8 a6 33 00 00 call 119908 <_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 ); 116562: 58 pop %eax 116563: 5a pop %edx 116564: 53 push %ebx 116565: 68 e0 2a 14 00 push $0x142ae0 11656a: e8 95 4b 00 00 call 11b104 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11656f: e8 9c 55 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116574: 83 c4 10 add $0x10,%esp 116577: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116579: 8b 5d fc mov -0x4(%ebp),%ebx 11657c: c9 leave 11657d: c3 ret 11657e: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116580: b8 04 00 00 00 mov $0x4,%eax } 116585: 8b 5d fc mov -0x4(%ebp),%ebx 116588: c9 leave 116589: c3 ret =============================================================================== 0011658c : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 11658c: 55 push %ebp 11658d: 89 e5 mov %esp,%ebp 11658f: 53 push %ebx 116590: 83 ec 14 sub $0x14,%esp 116593: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116596: 85 db test %ebx,%ebx 116598: 74 46 je 1165e0 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11659a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11659b: 8d 45 f4 lea -0xc(%ebp),%eax 11659e: 50 push %eax 11659f: ff 75 08 pushl 0x8(%ebp) 1165a2: 68 e0 2a 14 00 push $0x142ae0 1165a7: e8 d4 4c 00 00 call 11b280 <_Objects_Get> switch ( location ) { 1165ac: 83 c4 10 add $0x10,%esp 1165af: 8b 55 f4 mov -0xc(%ebp),%edx 1165b2: 85 d2 test %edx,%edx 1165b4: 74 0a je 1165c0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1165b6: b8 04 00 00 00 mov $0x4,%eax } 1165bb: 8b 5d fc mov -0x4(%ebp),%ebx 1165be: c9 leave 1165bf: 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 ); 1165c0: 83 ec 0c sub $0xc,%esp 1165c3: 83 c0 14 add $0x14,%eax 1165c6: 50 push %eax 1165c7: e8 78 33 00 00 call 119944 <_CORE_message_queue_Flush> 1165cc: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1165ce: e8 3d 55 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1165d3: 83 c4 10 add $0x10,%esp 1165d6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165d8: 8b 5d fc mov -0x4(%ebp),%ebx 1165db: c9 leave 1165dc: c3 ret 1165dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 1165e0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165e5: 8b 5d fc mov -0x4(%ebp),%ebx 1165e8: c9 leave 1165e9: c3 ret =============================================================================== 001165ec : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 1165ec: 55 push %ebp 1165ed: 89 e5 mov %esp,%ebp 1165ef: 53 push %ebx 1165f0: 83 ec 14 sub $0x14,%esp 1165f3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1165f6: 85 db test %ebx,%ebx 1165f8: 74 3a je 116634 1165fa: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1165fb: 8d 45 f4 lea -0xc(%ebp),%eax 1165fe: 50 push %eax 1165ff: ff 75 08 pushl 0x8(%ebp) 116602: 68 e0 2a 14 00 push $0x142ae0 116607: e8 74 4c 00 00 call 11b280 <_Objects_Get> switch ( location ) { 11660c: 83 c4 10 add $0x10,%esp 11660f: 8b 55 f4 mov -0xc(%ebp),%edx 116612: 85 d2 test %edx,%edx 116614: 74 0a je 116620 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116616: b8 04 00 00 00 mov $0x4,%eax } 11661b: 8b 5d fc mov -0x4(%ebp),%ebx 11661e: c9 leave 11661f: 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; 116620: 8b 40 5c mov 0x5c(%eax),%eax 116623: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116625: e8 e6 54 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11662a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11662c: 8b 5d fc mov -0x4(%ebp),%ebx 11662f: c9 leave 116630: c3 ret 116631: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 116634: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116639: 8b 5d fc mov -0x4(%ebp),%ebx 11663c: c9 leave 11663d: c3 ret =============================================================================== 00113948 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 113948: 55 push %ebp 113949: 89 e5 mov %esp,%ebp 11394b: 56 push %esi 11394c: 53 push %ebx 11394d: 83 ec 10 sub $0x10,%esp 113950: 8b 5d 0c mov 0xc(%ebp),%ebx 113953: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113956: 85 db test %ebx,%ebx 113958: 74 6e je 1139c8 return RTEMS_INVALID_ADDRESS; if ( !size ) 11395a: 85 f6 test %esi,%esi 11395c: 74 6a je 1139c8 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11395e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11395f: 8d 45 f4 lea -0xc(%ebp),%eax 113962: 50 push %eax 113963: ff 75 08 pushl 0x8(%ebp) 113966: 68 00 15 13 00 push $0x131500 11396b: e8 54 20 00 00 call 1159c4 <_Objects_Get> switch ( location ) { 113970: 83 c4 10 add $0x10,%esp 113973: 8b 55 f4 mov -0xc(%ebp),%edx 113976: 85 d2 test %edx,%edx 113978: 75 42 jne 1139bc if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 11397a: 83 ec 08 sub $0x8,%esp 11397d: ff 75 18 pushl 0x18(%ebp) */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 113980: 8b 55 14 mov 0x14(%ebp),%edx 113983: 83 e2 01 and $0x1,%edx 113986: 83 f2 01 xor $0x1,%edx 113989: 52 push %edx 11398a: 56 push %esi 11398b: 53 push %ebx 11398c: ff 70 08 pushl 0x8(%eax) 11398f: 83 c0 14 add $0x14,%eax 113992: 50 push %eax 113993: e8 f4 10 00 00 call 114a8c <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113998: 83 c4 20 add $0x20,%esp 11399b: e8 34 29 00 00 call 1162d4 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 1139a0: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 1139a3: a1 f8 10 13 00 mov 0x1310f8,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 1139a8: ff 70 34 pushl 0x34(%eax) 1139ab: e8 a0 00 00 00 call 113a50 <_Message_queue_Translate_core_message_queue_return_code> 1139b0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1139b3: 8d 65 f8 lea -0x8(%ebp),%esp 1139b6: 5b pop %ebx 1139b7: 5e pop %esi 1139b8: c9 leave 1139b9: c3 ret 1139ba: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1139bc: b8 04 00 00 00 mov $0x4,%eax } 1139c1: 8d 65 f8 lea -0x8(%ebp),%esp 1139c4: 5b pop %ebx 1139c5: 5e pop %esi 1139c6: c9 leave 1139c7: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 1139c8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1139cd: 8d 65 f8 lea -0x8(%ebp),%esp 1139d0: 5b pop %ebx 1139d1: 5e pop %esi 1139d2: c9 leave 1139d3: c3 ret =============================================================================== 0010b388 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b388: 55 push %ebp 10b389: 89 e5 mov %esp,%ebp 10b38b: 56 push %esi 10b38c: 53 push %ebx 10b38d: 83 ec 10 sub $0x10,%esp 10b390: 8b 75 08 mov 0x8(%ebp),%esi 10b393: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b396: 85 db test %ebx,%ebx 10b398: 74 5e je 10b3f8 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10b39a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10b39b: 8d 45 f4 lea -0xc(%ebp),%eax 10b39e: 50 push %eax 10b39f: 56 push %esi 10b3a0: 68 a0 6e 12 00 push $0x126ea0 10b3a5: e8 6e 1a 00 00 call 10ce18 <_Objects_Get> switch ( location ) { 10b3aa: 83 c4 10 add $0x10,%esp 10b3ad: 8b 55 f4 mov -0xc(%ebp),%edx 10b3b0: 85 d2 test %edx,%edx 10b3b2: 74 0c je 10b3c0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b3b4: b8 04 00 00 00 mov $0x4,%eax } 10b3b9: 8d 65 f8 lea -0x8(%ebp),%esp 10b3bc: 5b pop %ebx 10b3bd: 5e pop %esi 10b3be: c9 leave 10b3bf: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b3c0: 6a 00 push $0x0 10b3c2: 6a 00 push $0x0 10b3c4: 68 ff ff ff 7f push $0x7fffffff 10b3c9: 6a 00 push $0x0 10b3cb: 56 push %esi 10b3cc: ff 75 10 pushl 0x10(%ebp) 10b3cf: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 10b3d0: 83 c0 14 add $0x14,%eax 10b3d3: 50 push %eax 10b3d4: e8 33 0c 00 00 call 10c00c <_CORE_message_queue_Submit> 10b3d9: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b3db: 83 c4 20 add $0x20,%esp 10b3de: e8 c5 22 00 00 call 10d6a8 <_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); 10b3e3: 83 ec 0c sub $0xc,%esp 10b3e6: 53 push %ebx 10b3e7: e8 18 00 00 00 call 10b404 <_Message_queue_Translate_core_message_queue_return_code> 10b3ec: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b3ef: 8d 65 f8 lea -0x8(%ebp),%esp 10b3f2: 5b pop %ebx 10b3f3: 5e pop %esi 10b3f4: c9 leave 10b3f5: c3 ret 10b3f6: 66 90 xchg %ax,%ax <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 10b3f8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b3fd: 8d 65 f8 lea -0x8(%ebp),%esp 10b400: 5b pop %ebx 10b401: 5e pop %esi 10b402: c9 leave 10b403: c3 ret =============================================================================== 0011677c : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 11677c: 55 push %ebp 11677d: 89 e5 mov %esp,%ebp 11677f: 56 push %esi 116780: 53 push %ebx 116781: 83 ec 10 sub $0x10,%esp 116784: 8b 75 08 mov 0x8(%ebp),%esi 116787: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 11678a: 85 db test %ebx,%ebx 11678c: 74 5e je 1167ec 11678e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11678f: 8d 45 f4 lea -0xc(%ebp),%eax 116792: 50 push %eax 116793: 56 push %esi 116794: 68 e0 2a 14 00 push $0x142ae0 116799: e8 e2 4a 00 00 call 11b280 <_Objects_Get> switch ( location ) { 11679e: 83 c4 10 add $0x10,%esp 1167a1: 8b 55 f4 mov -0xc(%ebp),%edx 1167a4: 85 d2 test %edx,%edx 1167a6: 74 0c je 1167b4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1167a8: b8 04 00 00 00 mov $0x4,%eax } 1167ad: 8d 65 f8 lea -0x8(%ebp),%esp 1167b0: 5b pop %ebx 1167b1: 5e pop %esi 1167b2: c9 leave 1167b3: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1167b4: 6a 00 push $0x0 1167b6: 6a 00 push $0x0 1167b8: 68 00 00 00 80 push $0x80000000 1167bd: 6a 00 push $0x0 1167bf: 56 push %esi 1167c0: ff 75 10 pushl 0x10(%ebp) 1167c3: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 1167c4: 83 c0 14 add $0x14,%eax 1167c7: 50 push %eax 1167c8: e8 b7 33 00 00 call 119b84 <_CORE_message_queue_Submit> 1167cd: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1167cf: 83 c4 20 add $0x20,%esp 1167d2: e8 39 53 00 00 call 11bb10 <_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); 1167d7: 83 ec 0c sub $0xc,%esp 1167da: 53 push %ebx 1167db: e8 8c ff ff ff call 11676c <_Message_queue_Translate_core_message_queue_return_code> 1167e0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1167e3: 8d 65 f8 lea -0x8(%ebp),%esp 1167e6: 5b pop %ebx 1167e7: 5e pop %esi 1167e8: c9 leave 1167e9: c3 ret 1167ea: 66 90 xchg %ax,%ax <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 1167ec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1167f1: 8d 65 f8 lea -0x8(%ebp),%esp 1167f4: 5b pop %ebx 1167f5: 5e pop %esi 1167f6: c9 leave 1167f7: c3 ret =============================================================================== 001123dc : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { 1123dc: 55 push %ebp 1123dd: 89 e5 mov %esp,%ebp 1123df: 57 push %edi 1123e0: 56 push %esi 1123e1: 53 push %ebx 1123e2: 83 ec 78 sub $0x78,%esp int success = 0; char *dup_path = strdup(path); 1123e5: ff 75 08 pushl 0x8(%ebp) 1123e8: e8 d7 36 00 00 call 115ac4 1123ed: 89 c7 mov %eax,%edi if (dup_path != NULL) { 1123ef: 83 c4 10 add $0x10,%esp 1123f2: 85 c0 test %eax,%eax 1123f4: 0f 84 0a 01 00 00 je 112504 <== NEVER TAKEN char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 1123fa: 8a 10 mov (%eax),%dl 1123fc: 80 fa 2f cmp $0x2f,%dl 1123ff: 0f 84 0f 01 00 00 je 112514 112405: 89 c3 mov %eax,%ebx 112407: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp) 11240e: b8 01 00 00 00 mov $0x1,%eax ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 112413: 84 d2 test %dl,%dl 112415: 74 11 je 112428 <== NEVER TAKEN 112417: 90 nop last = 1; else if (p[0] != '/') 112418: 80 fa 2f cmp $0x2f,%dl 11241b: 0f 84 83 00 00 00 je 1124a4 p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { 112421: 43 inc %ebx 112422: 8a 13 mov (%ebx),%dl if (p[0] == '\0') 112424: 84 d2 test %dl,%dl 112426: 75 f0 jne 112418 last = 1; else if (p[0] != '/') continue; *p = '\0'; 112428: c6 03 00 movb $0x0,(%ebx) 11242b: be 01 00 00 00 mov $0x1,%esi if (!last && p[1] == '\0') last = 1; if (first) { 112430: 85 c0 test %eax,%eax 112432: 75 54 jne 112488 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) 112434: 85 f6 test %esi,%esi 112436: 75 3c jne 112474 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 112438: b8 ff 01 00 00 mov $0x1ff,%eax 11243d: 83 ec 08 sub $0x8,%esp 112440: 50 push %eax 112441: 57 push %edi 112442: e8 89 72 ff ff call 1096d0 112447: 83 c4 10 add $0x10,%esp 11244a: 85 c0 test %eax,%eax 11244c: 78 6a js 1124b8 } else { retval = 0; break; } } if (!last) 11244e: 85 f6 test %esi,%esi 112450: 75 0a jne 11245c *p = '/'; 112452: c6 03 2f movb $0x2f,(%ebx) 112455: 31 c0 xor %eax,%eax 112457: eb c8 jmp 112421 112459: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 11245c: 83 ec 0c sub $0xc,%esp 11245f: 57 push %edi 112460: e8 73 6c ff ff call 1090d8 112465: 83 c4 10 add $0x10,%esp } return success != 0 ? 0 : -1; 112468: 31 c0 xor %eax,%eax } 11246a: 8d 65 f4 lea -0xc(%ebp),%esp 11246d: 5b pop %ebx 11246e: 5e pop %esi 11246f: 5f pop %edi 112470: c9 leave 112471: c3 ret 112472: 66 90 xchg %ax,%ax <== NOT EXECUTED numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask); 112474: 83 ec 0c sub $0xc,%esp 112477: ff 75 94 pushl -0x6c(%ebp) 11247a: e8 81 01 00 00 call 112600 11247f: 83 c4 10 add $0x10,%esp if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 112482: 8b 45 0c mov 0xc(%ebp),%eax 112485: eb b6 jmp 11243d 112487: 90 nop <== NOT EXECUTED * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); 112488: 83 ec 0c sub $0xc,%esp 11248b: 6a 00 push $0x0 11248d: e8 6e 01 00 00 call 112600 112492: 89 45 94 mov %eax,-0x6c(%ebp) numask = oumask & ~(S_IWUSR | S_IXUSR); 112495: 24 3f and $0x3f,%al (void)umask(numask); 112497: 89 04 24 mov %eax,(%esp) 11249a: e8 61 01 00 00 call 112600 11249f: 83 c4 10 add $0x10,%esp 1124a2: eb 90 jmp 112434 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; 1124a4: c6 03 00 movb $0x0,(%ebx) if (!last && p[1] == '\0') 1124a7: 31 d2 xor %edx,%edx 1124a9: 80 7b 01 00 cmpb $0x0,0x1(%ebx) 1124ad: 0f 94 c2 sete %dl 1124b0: 89 d6 mov %edx,%esi 1124b2: e9 79 ff ff ff jmp 112430 1124b7: 90 nop <== NOT EXECUTED first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { 1124b8: e8 7f 29 00 00 call 114e3c <__errno> 1124bd: 83 38 11 cmpl $0x11,(%eax) 1124c0: 74 0a je 1124cc 1124c2: e8 75 29 00 00 call 114e3c <__errno> 1124c7: 83 38 15 cmpl $0x15,(%eax) 1124ca: 75 53 jne 11251f <== ALWAYS TAKEN if (stat(path, &sb) < 0) { 1124cc: 83 ec 08 sub $0x8,%esp 1124cf: 8d 45 a0 lea -0x60(%ebp),%eax 1124d2: 50 push %eax 1124d3: 57 push %edi 1124d4: e8 7f 00 00 00 call 112558 1124d9: 83 c4 10 add $0x10,%esp 1124dc: 85 c0 test %eax,%eax 1124de: 78 3f js 11251f <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { 1124e0: 8b 45 ac mov -0x54(%ebp),%eax 1124e3: 25 00 f0 00 00 and $0xf000,%eax 1124e8: 3d 00 40 00 00 cmp $0x4000,%eax 1124ed: 0f 84 5b ff ff ff je 11244e if (last) 1124f3: 85 f6 test %esi,%esi 1124f5: 74 53 je 11254a errno = EEXIST; 1124f7: e8 40 29 00 00 call 114e3c <__errno> 1124fc: c7 00 11 00 00 00 movl $0x11,(%eax) 112502: eb 2d jmp 112531 if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; 112504: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED } 112509: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11250c: 5b pop %ebx <== NOT EXECUTED 11250d: 5e pop %esi <== NOT EXECUTED 11250e: 5f pop %edi <== NOT EXECUTED 11250f: c9 leave <== NOT EXECUTED 112510: c3 ret <== NOT EXECUTED 112511: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; 112514: 8d 58 01 lea 0x1(%eax),%ebx 112517: 8a 50 01 mov 0x1(%eax),%dl 11251a: e9 e8 fe ff ff jmp 112407 } } if (!last) *p = '/'; } if (!first && !last) 11251f: 85 f6 test %esi,%esi 112521: 75 0e jne 112531 <== ALWAYS TAKEN (void)umask(oumask); 112523: 83 ec 0c sub $0xc,%esp 112526: ff 75 94 pushl -0x6c(%ebp) 112529: e8 d2 00 00 00 call 112600 11252e: 83 c4 10 add $0x10,%esp int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 112531: 83 ec 0c sub $0xc,%esp 112534: 57 push %edi 112535: e8 9e 6b ff ff call 1090d8 11253a: 83 c4 10 add $0x10,%esp } return success != 0 ? 0 : -1; 11253d: b8 ff ff ff ff mov $0xffffffff,%eax } 112542: 8d 65 f4 lea -0xc(%ebp),%esp 112545: 5b pop %ebx 112546: 5e pop %esi 112547: 5f pop %edi 112548: c9 leave 112549: c3 ret break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; 11254a: e8 ed 28 00 00 call 114e3c <__errno> 11254f: c7 00 14 00 00 00 movl $0x14,(%eax) 112555: eb cc jmp 112523 =============================================================================== 0010b900 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10b900: 55 push %ebp 10b901: 89 e5 mov %esp,%ebp 10b903: 83 ec 08 sub $0x8,%esp 10b906: 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 ) 10b909: 83 f8 01 cmp $0x1,%eax 10b90c: 74 36 je 10b944 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10b90e: 83 f8 02 cmp $0x2,%eax 10b911: 74 29 je 10b93c api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 10b913: 83 f8 03 cmp $0x3,%eax 10b916: 74 08 je 10b920 api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 10b918: b8 7b 23 12 00 mov $0x12237b,%eax class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10b91d: c9 leave 10b91e: c3 ret 10b91f: 90 nop <== NOT EXECUTED 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 ) api_assoc = rtems_object_api_posix_assoc; 10b920: b8 e0 72 12 00 mov $0x1272e0,%eax #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10b925: 83 ec 08 sub $0x8,%esp 10b928: ff 75 0c pushl 0xc(%ebp) 10b92b: 50 push %eax 10b92c: e8 2f 49 00 00 call 110260 if ( class_assoc ) 10b931: 83 c4 10 add $0x10,%esp 10b934: 85 c0 test %eax,%eax 10b936: 74 14 je 10b94c return class_assoc->name; 10b938: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b93a: c9 leave 10b93b: c3 ret 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 ) api_assoc = rtems_object_api_classic_assoc; 10b93c: b8 60 72 12 00 mov $0x127260,%eax 10b941: eb e2 jmp 10b925 10b943: 90 nop <== NOT EXECUTED { 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; 10b944: b8 40 72 12 00 mov $0x127240,%eax 10b949: eb da jmp 10b925 10b94b: 90 nop <== NOT EXECUTED else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; 10b94c: b8 83 23 12 00 mov $0x122383,%eax } 10b951: c9 leave 10b952: c3 ret =============================================================================== 0010b954 : }; const char *rtems_object_get_api_name( int api ) { 10b954: 55 push %ebp 10b955: 89 e5 mov %esp,%ebp 10b957: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10b95a: ff 75 08 pushl 0x8(%ebp) 10b95d: 68 80 73 12 00 push $0x127380 10b962: e8 f9 48 00 00 call 110260 if ( api_assoc ) 10b967: 83 c4 10 add $0x10,%esp 10b96a: 85 c0 test %eax,%eax 10b96c: 74 06 je 10b974 return api_assoc->name; 10b96e: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b970: c9 leave 10b971: c3 ret 10b972: 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 ) return api_assoc->name; return "BAD CLASS"; 10b974: b8 83 23 12 00 mov $0x122383,%eax } 10b979: c9 leave 10b97a: c3 ret =============================================================================== 0010cf3c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cf3c: 55 push %ebp 10cf3d: 89 e5 mov %esp,%ebp 10cf3f: 57 push %edi 10cf40: 56 push %esi 10cf41: 53 push %ebx 10cf42: 83 ec 0c sub $0xc,%esp 10cf45: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cf48: 85 db test %ebx,%ebx 10cf4a: 74 60 je 10cfac return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cf4c: 83 ec 08 sub $0x8,%esp 10cf4f: 0f b7 45 0c movzwl 0xc(%ebp),%eax 10cf53: 50 push %eax 10cf54: ff 75 08 pushl 0x8(%ebp) 10cf57: e8 4c 1b 00 00 call 10eaa8 <_Objects_Get_information> if ( !obj_info ) 10cf5c: 83 c4 10 add $0x10,%esp 10cf5f: 85 c0 test %eax,%eax 10cf61: 74 59 je 10cfbc return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cf63: 8b 50 08 mov 0x8(%eax),%edx 10cf66: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cf68: 8b 50 0c mov 0xc(%eax),%edx 10cf6b: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cf6e: 8a 50 12 mov 0x12(%eax),%dl 10cf71: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cf74: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cf78: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf7b: 85 f6 test %esi,%esi 10cf7d: 74 44 je 10cfc3 <== NEVER TAKEN 10cf7f: 8b 78 1c mov 0x1c(%eax),%edi 10cf82: b9 01 00 00 00 mov $0x1,%ecx 10cf87: b8 01 00 00 00 mov $0x1,%eax 10cf8c: 31 d2 xor %edx,%edx 10cf8e: 66 90 xchg %ax,%ax if ( !obj_info->local_table[i] ) unallocated++; 10cf90: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cf94: 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++ ) 10cf97: 40 inc %eax 10cf98: 89 c1 mov %eax,%ecx 10cf9a: 39 c6 cmp %eax,%esi 10cf9c: 73 f2 jae 10cf90 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cf9e: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10cfa1: 31 c0 xor %eax,%eax } 10cfa3: 8d 65 f4 lea -0xc(%ebp),%esp 10cfa6: 5b pop %ebx 10cfa7: 5e pop %esi 10cfa8: 5f pop %edi 10cfa9: c9 leave 10cfaa: c3 ret 10cfab: 90 nop <== NOT EXECUTED /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10cfac: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cfb1: 8d 65 f4 lea -0xc(%ebp),%esp 10cfb4: 5b pop %ebx 10cfb5: 5e pop %esi 10cfb6: 5f pop %edi 10cfb7: c9 leave 10cfb8: c3 ret 10cfb9: 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 ) return RTEMS_INVALID_NUMBER; 10cfbc: b8 0a 00 00 00 mov $0xa,%eax 10cfc1: eb e0 jmp 10cfa3 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++ ) 10cfc3: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cfc5: eb d7 jmp 10cf9e <== NOT EXECUTED =============================================================================== 0010c4fc : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10c4fc: 55 push %ebp 10c4fd: 89 e5 mov %esp,%ebp 10c4ff: 53 push %ebx 10c500: 83 ec 14 sub $0x14,%esp 10c503: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10c506: 85 db test %ebx,%ebx 10c508: 74 26 je 10c530 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10c50a: 83 ec 08 sub $0x8,%esp 10c50d: 8d 45 f4 lea -0xc(%ebp),%eax 10c510: 50 push %eax 10c511: ff 75 08 pushl 0x8(%ebp) 10c514: e8 a7 1b 00 00 call 10e0c0 <_Objects_Id_to_name> *name = name_u.name_u32; 10c519: 8b 55 f4 mov -0xc(%ebp),%edx 10c51c: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10c51e: 8b 04 85 6c 2f 12 00 mov 0x122f6c(,%eax,4),%eax 10c525: 83 c4 10 add $0x10,%esp } 10c528: 8b 5d fc mov -0x4(%ebp),%ebx 10c52b: c9 leave 10c52c: c3 ret 10c52d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) return RTEMS_INVALID_ADDRESS; 10c530: 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 ]; } 10c535: 8b 5d fc mov -0x4(%ebp),%ebx 10c538: c9 leave 10c539: c3 ret =============================================================================== 0010b988 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10b988: 55 push %ebp 10b989: 89 e5 mov %esp,%ebp 10b98b: 57 push %edi 10b98c: 56 push %esi 10b98d: 53 push %ebx 10b98e: 83 ec 1c sub $0x1c,%esp 10b991: 8b 75 08 mov 0x8(%ebp),%esi 10b994: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b997: 85 ff test %edi,%edi 10b999: 74 61 je 10b9fc return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b99b: 85 f6 test %esi,%esi 10b99d: 74 35 je 10b9d4 information = _Objects_Get_information_id( tmpId ); 10b99f: 83 ec 0c sub $0xc,%esp 10b9a2: 56 push %esi 10b9a3: e8 24 19 00 00 call 10d2cc <_Objects_Get_information_id> 10b9a8: 89 c3 mov %eax,%ebx if ( !information ) 10b9aa: 83 c4 10 add $0x10,%esp 10b9ad: 85 c0 test %eax,%eax 10b9af: 74 16 je 10b9c7 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10b9b1: 50 push %eax 10b9b2: 8d 45 e4 lea -0x1c(%ebp),%eax 10b9b5: 50 push %eax 10b9b6: 56 push %esi 10b9b7: 53 push %ebx 10b9b8: e8 c7 1a 00 00 call 10d484 <_Objects_Get> switch ( location ) { 10b9bd: 83 c4 10 add $0x10,%esp 10b9c0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b9c3: 85 c9 test %ecx,%ecx 10b9c5: 74 19 je 10b9e0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b9c7: b8 04 00 00 00 mov $0x4,%eax } 10b9cc: 8d 65 f4 lea -0xc(%ebp),%esp 10b9cf: 5b pop %ebx 10b9d0: 5e pop %esi 10b9d1: 5f pop %edi 10b9d2: c9 leave 10b9d3: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b9d4: a1 f8 9c 12 00 mov 0x129cf8,%eax 10b9d9: 8b 70 08 mov 0x8(%eax),%esi 10b9dc: eb c1 jmp 10b99f 10b9de: 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 ); 10b9e0: 52 push %edx 10b9e1: 57 push %edi 10b9e2: 50 push %eax 10b9e3: 53 push %ebx 10b9e4: e8 97 1c 00 00 call 10d680 <_Objects_Set_name> _Thread_Enable_dispatch(); 10b9e9: e8 0a 24 00 00 call 10ddf8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b9ee: 83 c4 10 add $0x10,%esp 10b9f1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9f3: 8d 65 f4 lea -0xc(%ebp),%esp 10b9f6: 5b pop %ebx 10b9f7: 5e pop %esi 10b9f8: 5f pop %edi 10b9f9: c9 leave 10b9fa: c3 ret 10b9fb: 90 nop <== NOT EXECUTED Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10b9fc: b8 09 00 00 00 mov $0x9,%eax 10ba01: eb c9 jmp 10b9cc =============================================================================== 001167f8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1167f8: 55 push %ebp 1167f9: 89 e5 mov %esp,%ebp 1167fb: 57 push %edi 1167fc: 56 push %esi 1167fd: 53 push %ebx 1167fe: 83 ec 1c sub $0x1c,%esp 116801: 8b 5d 08 mov 0x8(%ebp),%ebx 116804: 8b 75 0c mov 0xc(%ebp),%esi 116807: 8b 55 10 mov 0x10(%ebp),%edx 11680a: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 11680d: 85 db test %ebx,%ebx 11680f: 74 47 je 116858 return RTEMS_INVALID_NAME; if ( !starting_address ) 116811: 85 f6 test %esi,%esi 116813: 74 23 je 116838 return RTEMS_INVALID_ADDRESS; if ( !id ) 116815: 8b 45 1c mov 0x1c(%ebp),%eax 116818: 85 c0 test %eax,%eax 11681a: 74 1c je 116838 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 11681c: 85 d2 test %edx,%edx 11681e: 74 28 je 116848 116820: 85 ff test %edi,%edi 116822: 74 24 je 116848 116824: 39 fa cmp %edi,%edx 116826: 72 20 jb 116848 116828: f7 c7 03 00 00 00 test $0x3,%edi 11682e: 75 18 jne 116848 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 116830: f7 c6 03 00 00 00 test $0x3,%esi 116836: 74 30 je 116868 return RTEMS_INVALID_ADDRESS; 116838: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11683d: 8d 65 f4 lea -0xc(%ebp),%esp 116840: 5b pop %ebx 116841: 5e pop %esi 116842: 5f pop %edi 116843: c9 leave 116844: c3 ret 116845: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 116848: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11684d: 8d 65 f4 lea -0xc(%ebp),%esp 116850: 5b pop %ebx 116851: 5e pop %esi 116852: 5f pop %edi 116853: c9 leave 116854: c3 ret 116855: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 116858: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11685d: 8d 65 f4 lea -0xc(%ebp),%esp 116860: 5b pop %ebx 116861: 5e pop %esi 116862: 5f pop %edi 116863: c9 leave 116864: c3 ret 116865: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116868: a1 14 21 14 00 mov 0x142114,%eax 11686d: 40 inc %eax 11686e: a3 14 21 14 00 mov %eax,0x142114 * 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 ); 116873: 83 ec 0c sub $0xc,%esp 116876: 68 a0 1f 14 00 push $0x141fa0 11687b: 89 55 e0 mov %edx,-0x20(%ebp) 11687e: e8 09 45 00 00 call 11ad8c <_Objects_Allocate> 116883: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 116886: 83 c4 10 add $0x10,%esp 116889: 85 c0 test %eax,%eax 11688b: 8b 55 e0 mov -0x20(%ebp),%edx 11688e: 74 58 je 1168e8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 116890: 8b 45 e4 mov -0x1c(%ebp),%eax 116893: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 116896: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 116899: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 11689c: 8b 4d 18 mov 0x18(%ebp),%ecx 11689f: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 1168a2: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 1168a9: 57 push %edi 1168aa: 89 d0 mov %edx,%eax 1168ac: 31 d2 xor %edx,%edx 1168ae: f7 f7 div %edi 1168b0: 50 push %eax 1168b1: 56 push %esi 1168b2: 8b 45 e4 mov -0x1c(%ebp),%eax 1168b5: 83 c0 24 add $0x24,%eax 1168b8: 50 push %eax 1168b9: e8 76 2f 00 00 call 119834 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1168be: 8b 7d e4 mov -0x1c(%ebp),%edi 1168c1: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1168c4: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1168c7: 8b 15 bc 1f 14 00 mov 0x141fbc,%edx 1168cd: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1168d0: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1168d3: 8b 55 1c mov 0x1c(%ebp),%edx 1168d6: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1168d8: e8 33 52 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1168dd: 83 c4 10 add $0x10,%esp 1168e0: 31 c0 xor %eax,%eax 1168e2: e9 66 ff ff ff jmp 11684d 1168e7: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1168e8: e8 23 52 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 1168ed: b8 05 00 00 00 mov $0x5,%eax 1168f2: e9 56 ff ff ff jmp 11684d =============================================================================== 001168f8 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 1168f8: 55 push %ebp 1168f9: 89 e5 mov %esp,%ebp 1168fb: 83 ec 2c sub $0x2c,%esp register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 1168fe: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116901: 50 push %eax 116902: ff 75 08 pushl 0x8(%ebp) 116905: 68 a0 1f 14 00 push $0x141fa0 11690a: e8 71 49 00 00 call 11b280 <_Objects_Get> switch ( location ) { 11690f: 83 c4 10 add $0x10,%esp 116912: 8b 55 f4 mov -0xc(%ebp),%edx 116915: 85 d2 test %edx,%edx 116917: 74 07 je 116920 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116919: b8 04 00 00 00 mov $0x4,%eax } 11691e: c9 leave 11691f: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 116920: 8b 48 20 mov 0x20(%eax),%ecx 116923: 85 c9 test %ecx,%ecx 116925: 74 0d je 116934 #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116927: e8 e4 51 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 11692c: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116931: c9 leave 116932: c3 ret 116933: 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 ); 116934: 83 ec 08 sub $0x8,%esp 116937: 50 push %eax 116938: 68 a0 1f 14 00 push $0x141fa0 11693d: 89 45 e4 mov %eax,-0x1c(%ebp) 116940: e8 c3 44 00 00 call 11ae08 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 116945: 58 pop %eax 116946: 5a pop %edx 116947: 8b 45 e4 mov -0x1c(%ebp),%eax 11694a: 50 push %eax 11694b: 68 a0 1f 14 00 push $0x141fa0 116950: e8 af 47 00 00 call 11b104 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 116955: e8 b6 51 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11695a: 83 c4 10 add $0x10,%esp 11695d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11695f: c9 leave 116960: c3 ret =============================================================================== 00116964 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 116964: 55 push %ebp 116965: 89 e5 mov %esp,%ebp 116967: 56 push %esi 116968: 53 push %ebx 116969: 83 ec 20 sub $0x20,%esp 11696c: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 11696f: 85 db test %ebx,%ebx 116971: 74 59 je 1169cc Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116973: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 116974: 8d 45 f4 lea -0xc(%ebp),%eax 116977: 50 push %eax 116978: ff 75 08 pushl 0x8(%ebp) 11697b: 68 a0 1f 14 00 push $0x141fa0 116980: e8 fb 48 00 00 call 11b280 <_Objects_Get> 116985: 89 c6 mov %eax,%esi switch ( location ) { 116987: 83 c4 10 add $0x10,%esp 11698a: 8b 45 f4 mov -0xc(%ebp),%eax 11698d: 85 c0 test %eax,%eax 11698f: 75 2f jne 1169c0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116991: 83 ec 0c sub $0xc,%esp 116994: 8d 46 24 lea 0x24(%esi),%eax 116997: 50 push %eax 116998: e8 73 2e 00 00 call 119810 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 11699d: 83 c4 10 add $0x10,%esp 1169a0: 85 c0 test %eax,%eax 1169a2: 74 34 je 1169d8 the_partition->number_of_used_blocks += 1; 1169a4: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 1169a7: 89 45 e4 mov %eax,-0x1c(%ebp) 1169aa: e8 61 51 00 00 call 11bb10 <_Thread_Enable_dispatch> *buffer = the_buffer; 1169af: 8b 45 e4 mov -0x1c(%ebp),%eax 1169b2: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 1169b4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169b6: 8d 65 f8 lea -0x8(%ebp),%esp 1169b9: 5b pop %ebx 1169ba: 5e pop %esi 1169bb: c9 leave 1169bc: c3 ret 1169bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1169c0: b8 04 00 00 00 mov $0x4,%eax } 1169c5: 8d 65 f8 lea -0x8(%ebp),%esp 1169c8: 5b pop %ebx 1169c9: 5e pop %esi 1169ca: c9 leave 1169cb: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 1169cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169d1: 8d 65 f8 lea -0x8(%ebp),%esp 1169d4: 5b pop %ebx 1169d5: 5e pop %esi 1169d6: c9 leave 1169d7: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1169d8: e8 33 51 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 1169dd: b8 0d 00 00 00 mov $0xd,%eax 1169e2: eb e1 jmp 1169c5 =============================================================================== 00116a08 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116a08: 55 push %ebp 116a09: 89 e5 mov %esp,%ebp 116a0b: 56 push %esi 116a0c: 53 push %ebx 116a0d: 83 ec 14 sub $0x14,%esp 116a10: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116a13: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a16: 50 push %eax 116a17: ff 75 08 pushl 0x8(%ebp) 116a1a: 68 a0 1f 14 00 push $0x141fa0 116a1f: e8 5c 48 00 00 call 11b280 <_Objects_Get> 116a24: 89 c3 mov %eax,%ebx switch ( location ) { 116a26: 83 c4 10 add $0x10,%esp 116a29: 8b 45 f4 mov -0xc(%ebp),%eax 116a2c: 85 c0 test %eax,%eax 116a2e: 74 0c je 116a3c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116a30: b8 04 00 00 00 mov $0x4,%eax } 116a35: 8d 65 f8 lea -0x8(%ebp),%esp 116a38: 5b pop %ebx 116a39: 5e pop %esi 116a3a: c9 leave 116a3b: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116a3c: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 116a3f: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116a42: 39 c6 cmp %eax,%esi 116a44: 72 3a jb 116a80 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116a46: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116a49: 39 d6 cmp %edx,%esi 116a4b: 77 33 ja 116a80 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116a4d: 89 f2 mov %esi,%edx 116a4f: 29 c2 sub %eax,%edx 116a51: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 116a53: 31 d2 xor %edx,%edx 116a55: f7 73 18 divl 0x18(%ebx) starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && 116a58: 85 d2 test %edx,%edx 116a5a: 75 24 jne 116a80 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116a5c: 83 ec 08 sub $0x8,%esp 116a5f: 56 push %esi 116a60: 8d 43 24 lea 0x24(%ebx),%eax 116a63: 50 push %eax 116a64: e8 6b 2d 00 00 call 1197d4 <_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; 116a69: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116a6c: e8 9f 50 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a71: 83 c4 10 add $0x10,%esp 116a74: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a76: 8d 65 f8 lea -0x8(%ebp),%esp 116a79: 5b pop %ebx 116a7a: 5e pop %esi 116a7b: c9 leave 116a7c: c3 ret 116a7d: 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(); 116a80: e8 8b 50 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 116a85: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a8a: 8d 65 f8 lea -0x8(%ebp),%esp 116a8d: 5b pop %ebx 116a8e: 5e pop %esi 116a8f: c9 leave 116a90: c3 ret =============================================================================== 00115e2c : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115e2c: 55 push %ebp 115e2d: 89 e5 mov %esp,%ebp 115e2f: 57 push %edi 115e30: 56 push %esi 115e31: 53 push %ebx 115e32: 83 ec 1c sub $0x1c,%esp 115e35: 8b 5d 08 mov 0x8(%ebp),%ebx 115e38: 8b 55 0c mov 0xc(%ebp),%edx 115e3b: 8b 7d 10 mov 0x10(%ebp),%edi 115e3e: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115e41: 85 db test %ebx,%ebx 115e43: 74 1b je 115e60 return RTEMS_INVALID_NAME; if ( !id ) 115e45: 85 f6 test %esi,%esi 115e47: 74 08 je 115e51 * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115e49: 89 f8 mov %edi,%eax 115e4b: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115e4d: a8 03 test $0x3,%al 115e4f: 74 1f je 115e70 !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 115e51: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e56: 8d 65 f4 lea -0xc(%ebp),%esp 115e59: 5b pop %ebx 115e5a: 5e pop %esi 115e5b: 5f pop %edi 115e5c: c9 leave 115e5d: c3 ret 115e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115e60: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e65: 8d 65 f4 lea -0xc(%ebp),%esp 115e68: 5b pop %ebx 115e69: 5e pop %esi 115e6a: 5f pop %edi 115e6b: c9 leave 115e6c: c3 ret 115e6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115e70: a1 14 21 14 00 mov 0x142114,%eax 115e75: 40 inc %eax 115e76: a3 14 21 14 00 mov %eax,0x142114 */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 115e7b: 83 ec 0c sub $0xc,%esp 115e7e: 68 60 1f 14 00 push $0x141f60 115e83: 89 55 e4 mov %edx,-0x1c(%ebp) 115e86: e8 01 4f 00 00 call 11ad8c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115e8b: 83 c4 10 add $0x10,%esp 115e8e: 85 c0 test %eax,%eax 115e90: 8b 55 e4 mov -0x1c(%ebp),%edx 115e93: 74 33 je 115ec8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115e95: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115e98: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115e9b: 8b 55 14 mov 0x14(%ebp),%edx 115e9e: 4a dec %edx 115e9f: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115ea2: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115ea5: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115ea8: 8b 0d 7c 1f 14 00 mov 0x141f7c,%ecx 115eae: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115eb1: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115eb4: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115eb6: e8 55 5c 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115ebb: 31 c0 xor %eax,%eax } 115ebd: 8d 65 f4 lea -0xc(%ebp),%esp 115ec0: 5b pop %ebx 115ec1: 5e pop %esi 115ec2: 5f pop %edi 115ec3: c9 leave 115ec4: c3 ret 115ec5: 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(); 115ec8: e8 43 5c 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115ecd: b8 05 00 00 00 mov $0x5,%eax 115ed2: eb 82 jmp 115e56 =============================================================================== 00115ed4 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115ed4: 55 push %ebp 115ed5: 89 e5 mov %esp,%ebp 115ed7: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 115eda: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 115edd: 50 push %eax 115ede: ff 75 08 pushl 0x8(%ebp) 115ee1: 68 60 1f 14 00 push $0x141f60 115ee6: e8 95 53 00 00 call 11b280 <_Objects_Get> switch ( location ) { 115eeb: 83 c4 10 add $0x10,%esp 115eee: 8b 4d f4 mov -0xc(%ebp),%ecx 115ef1: 85 c9 test %ecx,%ecx 115ef3: 75 2f jne 115f24 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115ef5: 83 ec 08 sub $0x8,%esp 115ef8: 50 push %eax 115ef9: 68 60 1f 14 00 push $0x141f60 115efe: 89 45 e4 mov %eax,-0x1c(%ebp) 115f01: e8 02 4f 00 00 call 11ae08 <_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 ); 115f06: 58 pop %eax 115f07: 5a pop %edx 115f08: 8b 45 e4 mov -0x1c(%ebp),%eax 115f0b: 50 push %eax 115f0c: 68 60 1f 14 00 push $0x141f60 115f11: e8 ee 51 00 00 call 11b104 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115f16: e8 f5 5b 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f1b: 83 c4 10 add $0x10,%esp 115f1e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f20: c9 leave 115f21: c3 ret 115f22: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f24: b8 04 00 00 00 mov $0x4,%eax } 115f29: c9 leave 115f2a: c3 ret =============================================================================== 00115f2c : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115f2c: 55 push %ebp 115f2d: 89 e5 mov %esp,%ebp 115f2f: 56 push %esi 115f30: 53 push %ebx 115f31: 83 ec 10 sub $0x10,%esp 115f34: 8b 75 0c mov 0xc(%ebp),%esi 115f37: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115f3a: 85 db test %ebx,%ebx 115f3c: 74 4e je 115f8c Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 115f3e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115f3f: 8d 45 f4 lea -0xc(%ebp),%eax 115f42: 50 push %eax 115f43: ff 75 08 pushl 0x8(%ebp) 115f46: 68 60 1f 14 00 push $0x141f60 115f4b: e8 30 53 00 00 call 11b280 <_Objects_Get> switch ( location ) { 115f50: 83 c4 10 add $0x10,%esp 115f53: 8b 55 f4 mov -0xc(%ebp),%edx 115f56: 85 d2 test %edx,%edx 115f58: 74 0e je 115f68 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f5a: b8 04 00 00 00 mov $0x4,%eax } 115f5f: 8d 65 f8 lea -0x8(%ebp),%esp 115f62: 5b pop %ebx 115f63: 5e pop %esi 115f64: c9 leave 115f65: c3 ret 115f66: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 115f68: 89 f2 mov %esi,%edx 115f6a: 2b 50 14 sub 0x14(%eax),%edx 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 ) 115f6d: 3b 50 18 cmp 0x18(%eax),%edx 115f70: 77 16 ja 115f88 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 115f72: 03 50 10 add 0x10(%eax),%edx 115f75: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 115f77: e8 94 5b 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f7c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f7e: 8d 65 f8 lea -0x8(%ebp),%esp 115f81: 5b pop %ebx 115f82: 5e pop %esi 115f83: c9 leave 115f84: c3 ret 115f85: 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; 115f88: 89 33 mov %esi,(%ebx) 115f8a: eb eb jmp 115f77 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 115f8c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f91: 8d 65 f8 lea -0x8(%ebp),%esp 115f94: 5b pop %ebx 115f95: 5e pop %esi 115f96: c9 leave 115f97: c3 ret =============================================================================== 00115fbc : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115fbc: 55 push %ebp 115fbd: 89 e5 mov %esp,%ebp 115fbf: 56 push %esi 115fc0: 53 push %ebx 115fc1: 83 ec 10 sub $0x10,%esp 115fc4: 8b 75 0c mov 0xc(%ebp),%esi 115fc7: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115fca: 85 db test %ebx,%ebx 115fcc: 74 4e je 11601c <== NEVER TAKEN 115fce: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115fcf: 8d 45 f4 lea -0xc(%ebp),%eax 115fd2: 50 push %eax 115fd3: ff 75 08 pushl 0x8(%ebp) 115fd6: 68 60 1f 14 00 push $0x141f60 115fdb: e8 a0 52 00 00 call 11b280 <_Objects_Get> switch ( location ) { 115fe0: 83 c4 10 add $0x10,%esp 115fe3: 8b 55 f4 mov -0xc(%ebp),%edx 115fe6: 85 d2 test %edx,%edx 115fe8: 74 0e je 115ff8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115fea: b8 04 00 00 00 mov $0x4,%eax } 115fef: 8d 65 f8 lea -0x8(%ebp),%esp 115ff2: 5b pop %ebx 115ff3: 5e pop %esi 115ff4: c9 leave 115ff5: c3 ret 115ff6: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 115ff8: 89 f2 mov %esi,%edx 115ffa: 2b 50 10 sub 0x10(%eax),%edx the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 115ffd: 3b 50 18 cmp 0x18(%eax),%edx 116000: 77 16 ja 116018 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116002: 03 50 14 add 0x14(%eax),%edx 116005: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 116007: e8 04 5b 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11600c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11600e: 8d 65 f8 lea -0x8(%ebp),%esp 116011: 5b pop %ebx 116012: 5e pop %esi 116013: c9 leave 116014: c3 ret 116015: 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; 116018: 89 33 mov %esi,(%ebx) 11601a: eb eb jmp 116007 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 11601c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116021: 8d 65 f8 lea -0x8(%ebp),%esp 116024: 5b pop %ebx 116025: 5e pop %esi 116026: c9 leave 116027: c3 ret =============================================================================== 00107800 : void rtems_print_buffer( const unsigned char *buffer, int length ) { 107800: 55 push %ebp 107801: 89 e5 mov %esp,%ebp 107803: 57 push %edi 107804: 56 push %esi 107805: 53 push %ebx 107806: 81 ec 9c 00 00 00 sub $0x9c,%esp 10780c: 8b 75 0c mov 0xc(%ebp),%esi int i, mod, max; if ( !length ) return; 10780f: 85 f6 test %esi,%esi 107811: 0f 84 00 01 00 00 je 107917 mod = length % 16; 107817: 89 f0 mov %esi,%eax 107819: 25 0f 00 00 80 and $0x8000000f,%eax 10781e: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp) 107824: 0f 88 21 02 00 00 js 107a4b 10782a: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax 107830: 89 85 58 ff ff ff mov %eax,-0xa8(%ebp) max = length - mod; 107836: 29 c6 sub %eax,%esi 107838: 89 b5 5c ff ff ff mov %esi,-0xa4(%ebp) for ( i=0 ; i 107846: c7 85 64 ff ff ff 00 movl $0x0,-0x9c(%ebp) 10784d: 00 00 00 107850: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx 107856: 66 90 xchg %ax,%ax static inline void Dump_Line( const unsigned char *buffer, int length ); void rtems_print_buffer( 107858: 8b 75 08 mov 0x8(%ebp),%esi 10785b: 03 b5 64 ff ff ff add -0x9c(%ebp),%esi { int i; char line_buffer[120]; line_buffer[0] = '\0'; 107861: c6 85 70 ff ff ff 00 movb $0x0,-0x90(%ebp) for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 107886: 31 c0 xor %eax,%eax 107888: b9 ff ff ff ff mov $0xffffffff,%ecx 10788d: 89 df mov %ebx,%edi 10788f: f2 ae repnz scas %es:(%edi),%al 107891: f7 d1 not %ecx 107893: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) for( i=0 ; i 1078b3: b8 2e 00 00 00 mov $0x2e,%eax 1078b8: 50 push %eax 1078b9: 53 push %ebx 1078ba: 68 fb 0a 12 00 push $0x120afb 1078bf: 53 push %ebx 1078c0: e8 ab c5 00 00 call 113e70 for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 1078ce: 31 c0 xor %eax,%eax 1078d0: b9 ff ff ff ff mov $0xffffffff,%ecx 1078d5: 89 df mov %ebx,%edi 1078d7: f2 ae repnz scas %es:(%edi),%al 1078d9: f7 d1 not %ecx 1078db: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax 1078df: 66 c7 00 7c 0a movw $0xa7c,(%eax) 1078e4: c6 40 02 00 movb $0x0,0x2(%eax) printk( line_buffer ); 1078e8: 83 ec 0c sub $0xc,%esp 1078eb: 53 push %ebx 1078ec: e8 17 18 00 00 call 109108 mod = length % 16; max = length - mod; for ( i=0 ; i Dump_Line( &buffer[ i ], 16 ); if ( mod ) 10790d: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx 107913: 85 c9 test %ecx,%ecx 107915: 75 08 jne 10791f Dump_Line( &buffer[ max ], mod ); } 107917: 8d 65 f4 lea -0xc(%ebp),%esp 10791a: 5b pop %ebx 10791b: 5e pop %esi 10791c: 5f pop %edi 10791d: c9 leave 10791e: c3 ret for ( i=0 ; i 10793d: 31 ff xor %edi,%edi 10793f: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx 107945: 8d 76 00 lea 0x0(%esi),%esi sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); 107948: 0f b6 04 3e movzbl (%esi,%edi,1),%eax 10794c: 50 push %eax 10794d: 53 push %ebx 10794e: 68 f3 0a 12 00 push $0x120af3 107953: 53 push %ebx 107954: e8 17 c5 00 00 call 113e70 int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) 107965: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp) 10796c: 0f 8f 02 01 00 00 jg 107a74 <== NEVER TAKEN 107972: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx strcat( line_buffer, " " ); 107978: 31 c0 xor %eax,%eax 10797a: 66 90 xchg %ax,%ax 10797c: b9 ff ff ff ff mov $0xffffffff,%ecx 107981: 89 df mov %ebx,%edi 107983: f2 ae repnz scas %es:(%edi),%al 107985: f7 d1 not %ecx 107987: c7 44 0b ff 20 20 20 movl $0x202020,-0x1(%ebx,%ecx,1) 10798e: 00 line_buffer[0] = '\0'; for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 107995: 31 c0 xor %eax,%eax 107997: b9 ff ff ff ff mov $0xffffffff,%ecx 10799c: 89 df mov %ebx,%edi 10799e: f2 ae repnz scas %es:(%edi),%al 1079a0: f7 d1 not %ecx 1079a2: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) for( i=0 ; i 1079b7: 31 ff xor %edi,%edi 1079b9: 8d 76 00 lea 0x0(%esi),%esi sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); 1079bc: 0f b6 04 3e movzbl (%esi,%edi,1),%eax 1079c0: 8b 15 14 53 12 00 mov 0x125314,%edx 1079c6: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i 1079d3: b8 2e 00 00 00 mov $0x2e,%eax 1079d8: 50 push %eax 1079d9: 53 push %ebx 1079da: 68 fb 0a 12 00 push $0x120afb 1079df: 53 push %ebx 1079e0: e8 8b c4 00 00 call 113e70 for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) 1079f1: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp) 1079f8: 7f 23 jg 107a1d <== NEVER TAKEN strcat( line_buffer, " " ); 1079fa: ba ff ff ff ff mov $0xffffffff,%edx 1079ff: 31 c0 xor %eax,%eax 107a01: 8b b5 58 ff ff ff mov -0xa8(%ebp),%esi 107a07: 90 nop 107a08: 89 d1 mov %edx,%ecx 107a0a: 89 df mov %ebx,%edi 107a0c: f2 ae repnz scas %es:(%edi),%al 107a0e: f7 d1 not %ecx 107a10: 66 c7 44 0b ff 20 00 movw $0x20,-0x1(%ebx,%ecx,1) strcat( line_buffer, "|" ); for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 107a1d: 31 c0 xor %eax,%eax 107a1f: b9 ff ff ff ff mov $0xffffffff,%ecx 107a24: 89 df mov %ebx,%edi 107a26: f2 ae repnz scas %es:(%edi),%al 107a28: f7 d1 not %ecx 107a2a: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax 107a2e: 66 c7 00 7c 0a movw $0xa7c,(%eax) 107a33: c6 40 02 00 movb $0x0,0x2(%eax) printk( line_buffer ); 107a37: 83 ec 0c sub $0xc,%esp 107a3a: 53 push %ebx 107a3b: e8 c8 16 00 00 call 109108 107a40: 83 c4 10 add $0x10,%esp for ( i=0 ; i for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 107a74: 31 c0 xor %eax,%eax <== NOT EXECUTED 107a76: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 107a79: 89 df mov %ebx,%edi <== NOT EXECUTED 107a7b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 107a7d: f7 d1 not %ecx <== NOT EXECUTED 107a7f: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) <== NOT EXECUTED 107a86: e9 2c ff ff ff jmp 1079b7 <== NOT EXECUTED =============================================================================== 00116a94 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 116a94: 55 push %ebp 116a95: 89 e5 mov %esp,%ebp 116a97: 53 push %ebx 116a98: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 116a9b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 116a9e: 50 push %eax 116a9f: ff 75 08 pushl 0x8(%ebp) 116aa2: 68 e0 1f 14 00 push $0x141fe0 116aa7: e8 d4 47 00 00 call 11b280 <_Objects_Get> 116aac: 89 c3 mov %eax,%ebx switch ( location ) { 116aae: 83 c4 10 add $0x10,%esp 116ab1: 8b 45 f4 mov -0xc(%ebp),%eax 116ab4: 85 c0 test %eax,%eax 116ab6: 74 0c je 116ac4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116ab8: b8 04 00 00 00 mov $0x4,%eax } 116abd: 8b 5d fc mov -0x4(%ebp),%ebx 116ac0: c9 leave 116ac1: c3 ret 116ac2: 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 ) ) { 116ac4: a1 d8 26 14 00 mov 0x1426d8,%eax 116ac9: 39 43 40 cmp %eax,0x40(%ebx) 116acc: 74 12 je 116ae0 _Thread_Enable_dispatch(); 116ace: e8 3d 50 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 116ad3: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ad8: 8b 5d fc mov -0x4(%ebp),%ebx 116adb: c9 leave 116adc: c3 ret 116add: 8d 76 00 lea 0x0(%esi),%esi <== 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 ); 116ae0: 83 ec 0c sub $0xc,%esp 116ae3: 8d 43 10 lea 0x10(%ebx),%eax 116ae6: 50 push %eax 116ae7: e8 60 64 00 00 call 11cf4c <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116aec: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 116af3: e8 18 50 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116af8: 83 c4 10 add $0x10,%esp 116afb: 31 c0 xor %eax,%eax 116afd: eb be jmp 116abd =============================================================================== 0010c30c : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c30c: 55 push %ebp 10c30d: 89 e5 mov %esp,%ebp 10c30f: 57 push %edi 10c310: 56 push %esi 10c311: 53 push %ebx 10c312: 83 ec 1c sub $0x1c,%esp 10c315: 8b 5d 08 mov 0x8(%ebp),%ebx 10c318: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c31b: 85 db test %ebx,%ebx 10c31d: 0f 84 a9 00 00 00 je 10c3cc return RTEMS_INVALID_NAME; if ( !id ) 10c323: 85 f6 test %esi,%esi 10c325: 0f 84 c5 00 00 00 je 10c3f0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c32b: a1 f4 a7 12 00 mov 0x12a7f4,%eax 10c330: 40 inc %eax 10c331: a3 f4 a7 12 00 mov %eax,0x12a7f4 * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) _Objects_Allocate( &_Rate_monotonic_Information ); 10c336: 83 ec 0c sub $0xc,%esp 10c339: 68 00 a7 12 00 push $0x12a700 10c33e: e8 25 1f 00 00 call 10e268 <_Objects_Allocate> 10c343: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c345: 83 c4 10 add $0x10,%esp 10c348: 85 c0 test %eax,%eax 10c34a: 0f 84 8c 00 00 00 je 10c3dc _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c350: a1 b8 ad 12 00 mov 0x12adb8,%eax 10c355: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c358: 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; 10c35f: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c366: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c36d: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c374: 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 ); 10c37b: 8d 42 54 lea 0x54(%edx),%eax 10c37e: 89 45 e4 mov %eax,-0x1c(%ebp) 10c381: b9 38 00 00 00 mov $0x38,%ecx 10c386: 31 c0 xor %eax,%eax 10c388: 8b 7d e4 mov -0x1c(%ebp),%edi 10c38b: f3 aa rep stos %al,%es:(%edi) 10c38d: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c394: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c39b: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c3a2: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c3a9: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c3ac: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c3af: 8b 0d 1c a7 12 00 mov 0x12a71c,%ecx 10c3b5: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c3b8: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c3bb: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c3bd: e8 d6 2c 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c3c2: 31 c0 xor %eax,%eax } 10c3c4: 8d 65 f4 lea -0xc(%ebp),%esp 10c3c7: 5b pop %ebx 10c3c8: 5e pop %esi 10c3c9: 5f pop %edi 10c3ca: c9 leave 10c3cb: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c3cc: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c3d4: 5b pop %ebx 10c3d5: 5e pop %esi 10c3d6: 5f pop %edi 10c3d7: c9 leave 10c3d8: c3 ret 10c3d9: 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(); 10c3dc: e8 b7 2c 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c3e1: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 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 10c3ee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c3f0: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3f5: 8d 65 f4 lea -0xc(%ebp),%esp 10c3f8: 5b pop %ebx 10c3f9: 5e pop %esi 10c3fa: 5f pop %edi 10c3fb: c9 leave 10c3fc: c3 ret =============================================================================== 0011288c : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 11288c: 55 push %ebp 11288d: 89 e5 mov %esp,%ebp 11288f: 53 push %ebx 112890: 83 ec 24 sub $0x24,%esp 112893: 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 ) 112896: 85 db test %ebx,%ebx 112898: 0f 84 92 00 00 00 je 112930 11289e: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 11289f: 8d 45 f4 lea -0xc(%ebp),%eax 1128a2: 50 push %eax 1128a3: ff 75 08 pushl 0x8(%ebp) 1128a6: 68 00 a7 12 00 push $0x12a700 1128ab: e8 58 bf ff ff call 10e808 <_Objects_Get> switch ( location ) { 1128b0: 83 c4 10 add $0x10,%esp 1128b3: 8b 4d f4 mov -0xc(%ebp),%ecx 1128b6: 85 c9 test %ecx,%ecx 1128b8: 74 0a je 1128c4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1128ba: b8 04 00 00 00 mov $0x4,%eax } 1128bf: 8b 5d fc mov -0x4(%ebp),%ebx 1128c2: c9 leave 1128c3: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 1128c4: 8b 50 40 mov 0x40(%eax),%edx 1128c7: 8b 52 08 mov 0x8(%edx),%edx 1128ca: 89 13 mov %edx,(%ebx) status->state = the_period->state; 1128cc: 8b 50 38 mov 0x38(%eax),%edx 1128cf: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 1128d2: 85 d2 test %edx,%edx 1128d4: 75 2a jne 112900 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 1128d6: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1128dd: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 1128e4: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 1128eb: 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(); 1128f2: e8 a1 c7 ff ff call 10f098 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1128f7: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1128f9: 8b 5d fc mov -0x4(%ebp),%ebx 1128fc: c9 leave 1128fd: c3 ret 1128fe: 66 90 xchg %ax,%ax <== NOT EXECUTED } else { /* * Grab the current status. */ valid_status = 112900: 52 push %edx _Rate_monotonic_Get_status( 112901: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 112904: 52 push %edx _Rate_monotonic_Get_status( 112905: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 112908: 52 push %edx 112909: 50 push %eax 11290a: e8 15 9b ff ff call 10c424 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 11290f: 83 c4 10 add $0x10,%esp 112912: 84 c0 test %al,%al 112914: 74 26 je 11293c _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 112916: 8b 45 e4 mov -0x1c(%ebp),%eax 112919: 8b 55 e8 mov -0x18(%ebp),%edx 11291c: 89 43 08 mov %eax,0x8(%ebx) 11291f: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 112922: 8b 45 ec mov -0x14(%ebp),%eax 112925: 8b 55 f0 mov -0x10(%ebp),%edx 112928: 89 43 10 mov %eax,0x10(%ebx) 11292b: 89 53 14 mov %edx,0x14(%ebx) 11292e: eb c2 jmp 1128f2 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 112930: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112935: 8b 5d fc mov -0x4(%ebp),%ebx 112938: c9 leave 112939: c3 ret 11293a: 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(); 11293c: e8 57 c7 ff ff call 10f098 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 112941: b8 0b 00 00 00 mov $0xb,%eax 112946: e9 74 ff ff ff jmp 1128bf =============================================================================== 0010c620 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10c620: 55 push %ebp 10c621: 89 e5 mov %esp,%ebp 10c623: 57 push %edi 10c624: 56 push %esi 10c625: 53 push %ebx 10c626: 83 ec 30 sub $0x30,%esp 10c629: 8b 5d 08 mov 0x8(%ebp),%ebx 10c62c: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); 10c62f: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10c632: 50 push %eax 10c633: 53 push %ebx 10c634: 68 00 a7 12 00 push $0x12a700 10c639: e8 ca 21 00 00 call 10e808 <_Objects_Get> switch ( location ) { 10c63e: 83 c4 10 add $0x10,%esp 10c641: 8b 55 e4 mov -0x1c(%ebp),%edx 10c644: 85 d2 test %edx,%edx 10c646: 74 10 je 10c658 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c648: b8 04 00 00 00 mov $0x4,%eax } 10c64d: 8d 65 f4 lea -0xc(%ebp),%esp 10c650: 5b pop %ebx 10c651: 5e pop %esi 10c652: 5f pop %edi 10c653: c9 leave 10c654: c3 ret 10c655: 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 ) ) { 10c658: 8b 15 b8 ad 12 00 mov 0x12adb8,%edx 10c65e: 39 50 40 cmp %edx,0x40(%eax) 10c661: 74 15 je 10c678 _Thread_Enable_dispatch(); 10c663: e8 30 2a 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10c668: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c66d: 8d 65 f4 lea -0xc(%ebp),%esp 10c670: 5b pop %ebx 10c671: 5e pop %esi 10c672: 5f pop %edi 10c673: c9 leave 10c674: c3 ret 10c675: 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 ) { 10c678: 85 f6 test %esi,%esi 10c67a: 75 1c jne 10c698 switch ( the_period->state ) { 10c67c: 8b 40 38 mov 0x38(%eax),%eax 10c67f: 83 f8 04 cmp $0x4,%eax 10c682: 77 6c ja 10c6f0 <== NEVER TAKEN 10c684: 8b 04 85 1c 34 12 00 mov 0x12341c(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10c68b: 89 45 d4 mov %eax,-0x2c(%ebp) 10c68e: e8 05 2a 00 00 call 10f098 <_Thread_Enable_dispatch> return( return_value ); 10c693: 8b 45 d4 mov -0x2c(%ebp),%eax 10c696: eb b5 jmp 10c64d } _ISR_Disable( level ); 10c698: 9c pushf 10c699: fa cli 10c69a: 5f pop %edi if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 10c69b: 8b 50 38 mov 0x38(%eax),%edx 10c69e: 85 d2 test %edx,%edx 10c6a0: 74 52 je 10c6f4 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 10c6a2: 83 fa 02 cmp $0x2,%edx 10c6a5: 0f 84 9e 00 00 00 je 10c749 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 10c6ab: 83 fa 04 cmp $0x4,%edx 10c6ae: 75 98 jne 10c648 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10c6b0: 83 ec 0c sub $0xc,%esp 10c6b3: 50 push %eax 10c6b4: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6b7: e8 74 fe ff ff call 10c530 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10c6bc: 57 push %edi 10c6bd: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10c6be: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6c1: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10c6c8: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c6cb: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c6ce: 5b pop %ebx 10c6cf: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c6d0: 83 c0 10 add $0x10,%eax 10c6d3: 50 push %eax 10c6d4: 68 c4 a8 12 00 push $0x12a8c4 10c6d9: e8 da 3a 00 00 call 1101b8 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c6de: e8 b5 29 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10c6e3: 83 c4 10 add $0x10,%esp 10c6e6: b8 06 00 00 00 mov $0x6,%eax 10c6eb: e9 5d ff ff ff jmp 10c64d _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c6f0: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c6f2: eb 97 jmp 10c68b <== NOT EXECUTED return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); 10c6f4: 57 push %edi 10c6f5: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10c6f6: 83 ec 0c sub $0xc,%esp 10c6f9: 50 push %eax 10c6fa: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6fd: e8 ba fd ff ff call 10c4bc <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10c702: 8b 45 d4 mov -0x2c(%ebp),%eax 10c705: 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; 10c70c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c713: c7 40 2c 78 ca 10 00 movl $0x10ca78,0x2c(%eax) the_watchdog->id = id; 10c71a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10c71d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10c724: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c727: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c72a: 5e pop %esi 10c72b: 5f pop %edi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c72c: 83 c0 10 add $0x10,%eax 10c72f: 50 push %eax 10c730: 68 c4 a8 12 00 push $0x12a8c4 10c735: e8 7e 3a 00 00 call 1101b8 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c73a: e8 59 29 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c73f: 83 c4 10 add $0x10,%esp 10c742: 31 c0 xor %eax,%eax 10c744: e9 04 ff ff ff jmp 10c64d if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10c749: 83 ec 0c sub $0xc,%esp 10c74c: 50 push %eax 10c74d: 89 45 d4 mov %eax,-0x2c(%ebp) 10c750: e8 db fd ff ff call 10c530 <_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; 10c755: 8b 45 d4 mov -0x2c(%ebp),%eax 10c758: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10c75f: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10c762: 57 push %edi 10c763: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10c764: 8b 15 b8 ad 12 00 mov 0x12adb8,%edx 10c76a: 8b 48 08 mov 0x8(%eax),%ecx 10c76d: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c770: 59 pop %ecx 10c771: 5b pop %ebx 10c772: 68 00 40 00 00 push $0x4000 10c777: 52 push %edx 10c778: 89 45 d4 mov %eax,-0x2c(%ebp) 10c77b: e8 f4 31 00 00 call 10f974 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10c780: 9c pushf 10c781: fa cli 10c782: 59 pop %ecx local_state = the_period->state; 10c783: 8b 45 d4 mov -0x2c(%ebp),%eax 10c786: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10c789: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10c790: 51 push %ecx 10c791: 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 ) 10c792: 83 c4 10 add $0x10,%esp 10c795: 83 fa 03 cmp $0x3,%edx 10c798: 74 0c je 10c7a6 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10c79a: e8 f9 28 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c79f: 31 c0 xor %eax,%eax 10c7a1: e9 a7 fe ff ff jmp 10c64d /* * 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 ); 10c7a6: 57 push %edi 10c7a7: 57 push %edi 10c7a8: 68 00 40 00 00 push $0x4000 10c7ad: ff 35 b8 ad 12 00 pushl 0x12adb8 10c7b3: e8 1c 25 00 00 call 10ecd4 <_Thread_Clear_state> 10c7b8: 83 c4 10 add $0x10,%esp 10c7bb: eb dd jmp 10c79a =============================================================================== 0010c7c0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10c7c0: 55 push %ebp 10c7c1: 89 e5 mov %esp,%ebp 10c7c3: 57 push %edi 10c7c4: 56 push %esi 10c7c5: 53 push %ebx 10c7c6: 81 ec 8c 00 00 00 sub $0x8c,%esp 10c7cc: 8b 75 08 mov 0x8(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10c7cf: 8b 7d 0c mov 0xc(%ebp),%edi 10c7d2: 85 ff test %edi,%edi 10c7d4: 0f 84 be 00 00 00 je 10c898 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10c7da: 83 ec 08 sub $0x8,%esp 10c7dd: 68 30 34 12 00 push $0x123430 10c7e2: 56 push %esi 10c7e3: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10c7e6: 59 pop %ecx 10c7e7: 5b pop %ebx 10c7e8: 68 68 34 12 00 push $0x123468 10c7ed: 56 push %esi 10c7ee: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10c7f1: 58 pop %eax 10c7f2: 5a pop %edx 10c7f3: 68 8c 34 12 00 push $0x12348c 10c7f8: 56 push %esi 10c7f9: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10c7fc: 5b pop %ebx 10c7fd: 5f pop %edi 10c7fe: 68 b0 34 12 00 push $0x1234b0 10c803: 56 push %esi 10c804: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10c807: 5a pop %edx 10c808: 59 pop %ecx 10c809: 68 fc 34 12 00 push $0x1234fc 10c80e: 56 push %esi 10c80f: ff 55 0c call *0xc(%ebp) /* * 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 ; 10c812: 8b 1d 08 a7 12 00 mov 0x12a708,%ebx 10c818: 83 c4 10 add $0x10,%esp 10c81b: 3b 1d 0c a7 12 00 cmp 0x12a70c,%ebx 10c821: 77 75 ja 10c898 <== NEVER TAKEN 10c823: 8d 7d 88 lea -0x78(%ebp),%edi 10c826: eb 09 jmp 10c831 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c828: 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 ; 10c829: 39 1d 0c a7 12 00 cmp %ebx,0x12a70c 10c82f: 72 67 jb 10c898 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10c831: 83 ec 08 sub $0x8,%esp 10c834: 57 push %edi 10c835: 53 push %ebx 10c836: e8 a5 5f 00 00 call 1127e0 if ( status != RTEMS_SUCCESSFUL ) 10c83b: 83 c4 10 add $0x10,%esp 10c83e: 85 c0 test %eax,%eax 10c840: 75 e6 jne 10c828 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10c842: 83 ec 08 sub $0x8,%esp 10c845: 8d 45 c0 lea -0x40(%ebp),%eax 10c848: 50 push %eax 10c849: 53 push %ebx 10c84a: e8 3d 60 00 00 call 11288c #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10c84f: 83 c4 0c add $0xc,%esp 10c852: 8d 55 e3 lea -0x1d(%ebp),%edx 10c855: 52 push %edx 10c856: 6a 05 push $0x5 10c858: ff 75 c0 pushl -0x40(%ebp) 10c85b: e8 b4 02 00 00 call 10cb14 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10c860: 59 pop %ecx 10c861: 58 pop %eax 10c862: ff 75 8c pushl -0x74(%ebp) 10c865: ff 75 88 pushl -0x78(%ebp) 10c868: 8d 45 e3 lea -0x1d(%ebp),%eax 10c86b: 50 push %eax 10c86c: 53 push %ebx 10c86d: 68 4e 34 12 00 push $0x12344e 10c872: 56 push %esi 10c873: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10c876: 8b 45 88 mov -0x78(%ebp),%eax 10c879: 83 c4 20 add $0x20,%esp 10c87c: 85 c0 test %eax,%eax 10c87e: 75 20 jne 10c8a0 (*print)( context, "\n" ); 10c880: 83 ec 08 sub $0x8,%esp 10c883: 68 51 15 12 00 push $0x121551 10c888: 56 push %esi 10c889: ff 55 0c call *0xc(%ebp) continue; 10c88c: 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++ ) { 10c88f: 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 ; 10c890: 39 1d 0c a7 12 00 cmp %ebx,0x12a70c 10c896: 73 99 jae 10c831 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10c898: 8d 65 f4 lea -0xc(%ebp),%esp 10c89b: 5b pop %ebx 10c89c: 5e pop %esi 10c89d: 5f pop %edi 10c89e: c9 leave 10c89f: 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 ); 10c8a0: 52 push %edx 10c8a1: 8d 55 d8 lea -0x28(%ebp),%edx 10c8a4: 52 push %edx 10c8a5: 50 push %eax 10c8a6: 8d 45 a0 lea -0x60(%ebp),%eax 10c8a9: 50 push %eax 10c8aa: e8 69 35 00 00 call 10fe18 <_Timespec_Divide_by_integer> (*print)( context, 10c8af: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10c8b4: 8b 45 dc mov -0x24(%ebp),%eax 10c8b7: f7 e9 imul %ecx 10c8b9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8bf: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c8c5: c1 f8 06 sar $0x6,%eax 10c8c8: 8b 55 dc mov -0x24(%ebp),%edx 10c8cb: c1 fa 1f sar $0x1f,%edx 10c8ce: 29 d0 sub %edx,%eax 10c8d0: 50 push %eax 10c8d1: ff 75 d8 pushl -0x28(%ebp) 10c8d4: 8b 45 9c mov -0x64(%ebp),%eax 10c8d7: f7 e9 imul %ecx 10c8d9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8df: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c8e5: c1 f8 06 sar $0x6,%eax 10c8e8: 8b 55 9c mov -0x64(%ebp),%edx 10c8eb: c1 fa 1f sar $0x1f,%edx 10c8ee: 29 d0 sub %edx,%eax 10c8f0: 50 push %eax 10c8f1: ff 75 98 pushl -0x68(%ebp) 10c8f4: 8b 45 94 mov -0x6c(%ebp),%eax 10c8f7: f7 e9 imul %ecx 10c8f9: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c8ff: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c905: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c90b: c1 f8 06 sar $0x6,%eax 10c90e: 8b 55 94 mov -0x6c(%ebp),%edx 10c911: c1 fa 1f sar $0x1f,%edx 10c914: 29 d0 sub %edx,%eax 10c916: 50 push %eax 10c917: ff 75 90 pushl -0x70(%ebp) 10c91a: 68 48 35 12 00 push $0x123548 10c91f: 56 push %esi 10c920: 89 4d 84 mov %ecx,-0x7c(%ebp) 10c923: ff 55 0c call *0xc(%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); 10c926: 83 c4 2c add $0x2c,%esp 10c929: 8d 55 d8 lea -0x28(%ebp),%edx 10c92c: 52 push %edx 10c92d: ff 75 88 pushl -0x78(%ebp) 10c930: 8d 45 b8 lea -0x48(%ebp),%eax 10c933: 50 push %eax 10c934: e8 df 34 00 00 call 10fe18 <_Timespec_Divide_by_integer> (*print)( context, 10c939: 8b 4d 84 mov -0x7c(%ebp),%ecx 10c93c: 8b 45 dc mov -0x24(%ebp),%eax 10c93f: f7 e9 imul %ecx 10c941: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c947: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c94d: c1 f8 06 sar $0x6,%eax 10c950: 8b 55 dc mov -0x24(%ebp),%edx 10c953: c1 fa 1f sar $0x1f,%edx 10c956: 29 d0 sub %edx,%eax 10c958: 50 push %eax 10c959: ff 75 d8 pushl -0x28(%ebp) 10c95c: 8b 45 b4 mov -0x4c(%ebp),%eax 10c95f: f7 e9 imul %ecx 10c961: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c967: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c96d: c1 f8 06 sar $0x6,%eax 10c970: 8b 55 b4 mov -0x4c(%ebp),%edx 10c973: c1 fa 1f sar $0x1f,%edx 10c976: 29 d0 sub %edx,%eax 10c978: 50 push %eax 10c979: ff 75 b0 pushl -0x50(%ebp) 10c97c: 8b 45 ac mov -0x54(%ebp),%eax 10c97f: f7 e9 imul %ecx 10c981: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c987: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c98d: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c993: c1 f8 06 sar $0x6,%eax 10c996: 8b 55 ac mov -0x54(%ebp),%edx 10c999: c1 fa 1f sar $0x1f,%edx 10c99c: 29 d0 sub %edx,%eax 10c99e: 50 push %eax 10c99f: ff 75 a8 pushl -0x58(%ebp) 10c9a2: 68 68 35 12 00 push $0x123568 10c9a7: 56 push %esi 10c9a8: ff 55 0c call *0xc(%ebp) 10c9ab: 83 c4 30 add $0x30,%esp 10c9ae: e9 75 fe ff ff jmp 10c828 =============================================================================== 0010c9cc : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10c9cc: 55 push %ebp 10c9cd: 89 e5 mov %esp,%ebp 10c9cf: 53 push %ebx 10c9d0: 83 ec 04 sub $0x4,%esp 10c9d3: a1 f4 a7 12 00 mov 0x12a7f4,%eax 10c9d8: 40 inc %eax 10c9d9: a3 f4 a7 12 00 mov %eax,0x12a7f4 /* * 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 ; 10c9de: 8b 1d 08 a7 12 00 mov 0x12a708,%ebx 10c9e4: 3b 1d 0c a7 12 00 cmp 0x12a70c,%ebx 10c9ea: 77 15 ja 10ca01 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10c9ec: 83 ec 0c sub $0xc,%esp 10c9ef: 53 push %ebx 10c9f0: e8 17 00 00 00 call 10ca0c * 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++ ) { 10c9f5: 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 ; 10c9f6: 83 c4 10 add $0x10,%esp 10c9f9: 39 1d 0c a7 12 00 cmp %ebx,0x12a70c 10c9ff: 73 eb jae 10c9ec /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10ca01: 8b 5d fc mov -0x4(%ebp),%ebx 10ca04: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10ca05: e9 8e 26 00 00 jmp 10f098 <_Thread_Enable_dispatch> =============================================================================== 0010ca0c : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10ca0c: 55 push %ebp 10ca0d: 89 e5 mov %esp,%ebp 10ca0f: 57 push %edi 10ca10: 53 push %ebx 10ca11: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10ca14: 8d 45 f4 lea -0xc(%ebp),%eax 10ca17: 50 push %eax 10ca18: ff 75 08 pushl 0x8(%ebp) 10ca1b: 68 00 a7 12 00 push $0x12a700 10ca20: e8 e3 1d 00 00 call 10e808 <_Objects_Get> 10ca25: 89 c2 mov %eax,%edx switch ( location ) { 10ca27: 83 c4 10 add $0x10,%esp 10ca2a: 8b 45 f4 mov -0xc(%ebp),%eax 10ca2d: 85 c0 test %eax,%eax 10ca2f: 75 3b jne 10ca6c case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10ca31: 8d 5a 54 lea 0x54(%edx),%ebx 10ca34: b9 38 00 00 00 mov $0x38,%ecx 10ca39: 31 c0 xor %eax,%eax 10ca3b: 89 df mov %ebx,%edi 10ca3d: f3 aa rep stos %al,%es:(%edi) 10ca3f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10ca46: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10ca4d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10ca54: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10ca5b: e8 38 26 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ca60: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca62: 8d 65 f8 lea -0x8(%ebp),%esp 10ca65: 5b pop %ebx 10ca66: 5f pop %edi 10ca67: c9 leave 10ca68: c3 ret 10ca69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ca6c: b8 04 00 00 00 mov $0x4,%eax } 10ca71: 8d 65 f8 lea -0x8(%ebp),%esp 10ca74: 5b pop %ebx 10ca75: 5f pop %edi 10ca76: c9 leave 10ca77: c3 ret =============================================================================== 00117228 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117228: 55 push %ebp 117229: 89 e5 mov %esp,%ebp 11722b: 57 push %edi 11722c: 56 push %esi 11722d: 53 push %ebx 11722e: 83 ec 1c sub $0x1c,%esp 117231: 8b 7d 08 mov 0x8(%ebp),%edi 117234: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117237: 85 ff test %edi,%edi 117239: 0f 84 c1 00 00 00 je 117300 return RTEMS_INVALID_NAME; if ( !starting_address ) 11723f: 85 f6 test %esi,%esi 117241: 0f 84 e1 00 00 00 je 117328 return RTEMS_INVALID_ADDRESS; if ( !id ) 117247: 8b 45 1c mov 0x1c(%ebp),%eax 11724a: 85 c0 test %eax,%eax 11724c: 0f 84 d6 00 00 00 je 117328 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117252: 83 ec 0c sub $0xc,%esp 117255: ff 35 c4 21 14 00 pushl 0x1421c4 11725b: e8 fc 24 00 00 call 11975c <_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 ); 117260: c7 04 24 20 20 14 00 movl $0x142020,(%esp) 117267: e8 20 3b 00 00 call 11ad8c <_Objects_Allocate> 11726c: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 11726e: 83 c4 10 add $0x10,%esp 117271: 85 c0 test %eax,%eax 117273: 0f 84 bf 00 00 00 je 117338 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 117279: ff 75 14 pushl 0x14(%ebp) 11727c: ff 75 10 pushl 0x10(%ebp) 11727f: 56 push %esi 117280: 8d 40 68 lea 0x68(%eax),%eax 117283: 50 push %eax 117284: e8 0f 37 00 00 call 11a998 <_Heap_Initialize> 117289: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 11728c: 83 c4 10 add $0x10,%esp 11728f: 85 c0 test %eax,%eax 117291: 74 7d je 117310 return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117293: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 117296: 8b 45 10 mov 0x10(%ebp),%eax 117299: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 11729c: 8b 55 14 mov 0x14(%ebp),%edx 11729f: 89 53 58 mov %edx,0x58(%ebx) the_region->attribute_set = attribute_set; 1172a2: 8b 45 18 mov 0x18(%ebp),%eax 1172a5: 89 43 60 mov %eax,0x60(%ebx) the_region->number_of_used_blocks = 0; 1172a8: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 1172af: 6a 06 push $0x6 1172b1: 6a 40 push $0x40 1172b3: a8 04 test $0x4,%al 1172b5: 0f 95 c0 setne %al 1172b8: 0f b6 c0 movzbl %al,%eax 1172bb: 50 push %eax 1172bc: 8d 43 10 lea 0x10(%ebx),%eax 1172bf: 50 push %eax 1172c0: e8 bf 4f 00 00 call 11c284 <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1172c5: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1172c8: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1172cb: 8b 15 3c 20 14 00 mov 0x14203c,%edx 1172d1: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1172d4: 89 7b 0c mov %edi,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 1172d7: 8b 55 1c mov 0x1c(%ebp),%edx 1172da: 89 02 mov %eax,(%edx) 1172dc: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 1172df: 31 c0 xor %eax,%eax } } _RTEMS_Unlock_allocator(); 1172e1: 83 ec 0c sub $0xc,%esp 1172e4: ff 35 c4 21 14 00 pushl 0x1421c4 1172ea: 89 45 e4 mov %eax,-0x1c(%ebp) 1172ed: e8 b2 24 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1172f2: 83 c4 10 add $0x10,%esp 1172f5: 8b 45 e4 mov -0x1c(%ebp),%eax } 1172f8: 8d 65 f4 lea -0xc(%ebp),%esp 1172fb: 5b pop %ebx 1172fc: 5e pop %esi 1172fd: 5f pop %edi 1172fe: c9 leave 1172ff: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 117300: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117305: 8d 65 f4 lea -0xc(%ebp),%esp 117308: 5b pop %ebx 117309: 5e pop %esi 11730a: 5f pop %edi 11730b: c9 leave 11730c: c3 ret 11730d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117310: 83 ec 08 sub $0x8,%esp 117313: 53 push %ebx 117314: 68 20 20 14 00 push $0x142020 117319: e8 e6 3d 00 00 call 11b104 <_Objects_Free> 11731e: 83 c4 10 add $0x10,%esp &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { _Region_Free( the_region ); return_status = RTEMS_INVALID_SIZE; 117321: b8 08 00 00 00 mov $0x8,%eax 117326: eb b9 jmp 1172e1 if ( !starting_address ) return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; 117328: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 11732d: 8d 65 f4 lea -0xc(%ebp),%esp 117330: 5b pop %ebx 117331: 5e pop %esi 117332: 5f pop %edi 117333: c9 leave 117334: c3 ret 117335: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) return_status = RTEMS_TOO_MANY; 117338: b8 05 00 00 00 mov $0x5,%eax 11733d: eb a2 jmp 1172e1 =============================================================================== 00117340 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 117340: 55 push %ebp 117341: 89 e5 mov %esp,%ebp 117343: 53 push %ebx 117344: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117347: ff 35 c4 21 14 00 pushl 0x1421c4 11734d: e8 0a 24 00 00 call 11975c <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 117352: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117355: 8d 45 f4 lea -0xc(%ebp),%eax 117358: 50 push %eax 117359: ff 75 08 pushl 0x8(%ebp) 11735c: 68 20 20 14 00 push $0x142020 117361: e8 de 3e 00 00 call 11b244 <_Objects_Get_no_protection> switch ( location ) { 117366: 83 c4 10 add $0x10,%esp 117369: 8b 5d f4 mov -0xc(%ebp),%ebx 11736c: 85 db test %ebx,%ebx 11736e: 74 1c je 11738c break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117370: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117375: 83 ec 0c sub $0xc,%esp 117378: ff 35 c4 21 14 00 pushl 0x1421c4 11737e: e8 21 24 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; } 117383: 89 d8 mov %ebx,%eax 117385: 8b 5d fc mov -0x4(%ebp),%ebx 117388: c9 leave 117389: c3 ret 11738a: 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 ) 11738c: 8b 48 64 mov 0x64(%eax),%ecx 11738f: 85 c9 test %ecx,%ecx 117391: 74 09 je 11739c return_status = RTEMS_RESOURCE_IN_USE; 117393: bb 0c 00 00 00 mov $0xc,%ebx 117398: eb db jmp 117375 11739a: 66 90 xchg %ax,%ax <== NOT EXECUTED else { _Objects_Close( &_Region_Information, &the_region->Object ); 11739c: 83 ec 08 sub $0x8,%esp 11739f: 50 push %eax 1173a0: 68 20 20 14 00 push $0x142020 1173a5: 89 45 e4 mov %eax,-0x1c(%ebp) 1173a8: e8 5b 3a 00 00 call 11ae08 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1173ad: 58 pop %eax 1173ae: 5a pop %edx 1173af: 8b 45 e4 mov -0x1c(%ebp),%eax 1173b2: 50 push %eax 1173b3: 68 20 20 14 00 push $0x142020 1173b8: e8 47 3d 00 00 call 11b104 <_Objects_Free> 1173bd: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 1173c0: 31 db xor %ebx,%ebx 1173c2: eb b1 jmp 117375 =============================================================================== 001173c4 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 1173c4: 55 push %ebp 1173c5: 89 e5 mov %esp,%ebp 1173c7: 56 push %esi 1173c8: 53 push %ebx 1173c9: 83 ec 10 sub $0x10,%esp 1173cc: 8b 5d 0c mov 0xc(%ebp),%ebx bool extend_ok; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 1173cf: 85 db test %ebx,%ebx 1173d1: 74 75 je 117448 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 1173d3: 83 ec 0c sub $0xc,%esp 1173d6: ff 35 c4 21 14 00 pushl 0x1421c4 1173dc: e8 7b 23 00 00 call 11975c <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1173e1: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1173e4: 8d 45 f0 lea -0x10(%ebp),%eax 1173e7: 50 push %eax 1173e8: ff 75 08 pushl 0x8(%ebp) 1173eb: 68 20 20 14 00 push $0x142020 1173f0: e8 4f 3e 00 00 call 11b244 <_Objects_Get_no_protection> 1173f5: 89 c6 mov %eax,%esi switch ( location ) { 1173f7: 83 c4 10 add $0x10,%esp 1173fa: 8b 45 f0 mov -0x10(%ebp),%eax 1173fd: 85 c0 test %eax,%eax 1173ff: 74 1f je 117420 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117401: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117406: 83 ec 0c sub $0xc,%esp 117409: ff 35 c4 21 14 00 pushl 0x1421c4 11740f: e8 90 23 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 117414: 83 c4 10 add $0x10,%esp } 117417: 89 d8 mov %ebx,%eax 117419: 8d 65 f8 lea -0x8(%ebp),%esp 11741c: 5b pop %ebx 11741d: 5e pop %esi 11741e: c9 leave 11741f: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 117420: 8d 45 f4 lea -0xc(%ebp),%eax 117423: 50 push %eax 117424: ff 75 10 pushl 0x10(%ebp) 117427: 53 push %ebx 117428: 8d 46 68 lea 0x68(%esi),%eax 11742b: 50 push %eax 11742c: e8 73 2f 00 00 call 11a3a4 <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 117431: 83 c4 10 add $0x10,%esp 117434: 84 c0 test %al,%al 117436: 74 20 je 117458 the_region->length += amount_extended; 117438: 8b 45 f4 mov -0xc(%ebp),%eax 11743b: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 11743e: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 117441: 31 db xor %ebx,%ebx 117443: eb c1 jmp 117406 117445: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 117448: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11744d: 89 d8 mov %ebx,%eax 11744f: 8d 65 f8 lea -0x8(%ebp),%esp 117452: 5b pop %ebx 117453: 5e pop %esi 117454: c9 leave 117455: c3 ret 117456: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else { return_status = RTEMS_INVALID_ADDRESS; 117458: bb 09 00 00 00 mov $0x9,%ebx 11745d: eb a7 jmp 117406 =============================================================================== 00117460 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117460: 55 push %ebp 117461: 89 e5 mov %esp,%ebp 117463: 53 push %ebx 117464: 83 ec 14 sub $0x14,%esp 117467: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 11746a: 85 db test %ebx,%ebx 11746c: 74 76 je 1174e4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11746e: 83 ec 0c sub $0xc,%esp 117471: ff 35 c4 21 14 00 pushl 0x1421c4 117477: e8 e0 22 00 00 call 11975c <_API_Mutex_Lock> 11747c: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11747f: 8d 45 f4 lea -0xc(%ebp),%eax 117482: 50 push %eax 117483: ff 75 08 pushl 0x8(%ebp) 117486: 68 20 20 14 00 push $0x142020 11748b: e8 b4 3d 00 00 call 11b244 <_Objects_Get_no_protection> switch ( location ) { 117490: 83 c4 10 add $0x10,%esp 117493: 8b 55 f4 mov -0xc(%ebp),%edx 117496: 85 d2 test %edx,%edx 117498: 74 1e je 1174b8 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11749a: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11749f: 83 ec 0c sub $0xc,%esp 1174a2: ff 35 c4 21 14 00 pushl 0x1421c4 1174a8: e8 f7 22 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1174ad: 83 c4 10 add $0x10,%esp } 1174b0: 89 d8 mov %ebx,%eax 1174b2: 8b 5d fc mov -0x4(%ebp),%ebx 1174b5: c9 leave 1174b6: c3 ret 1174b7: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 1174b8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 1174bf: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 1174c6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 1174cd: 83 ec 08 sub $0x8,%esp 1174d0: 53 push %ebx 1174d1: 83 c0 68 add $0x68,%eax 1174d4: 50 push %eax 1174d5: e8 a6 32 00 00 call 11a780 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 1174da: 83 c4 10 add $0x10,%esp the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); return_status = RTEMS_SUCCESSFUL; 1174dd: 31 db xor %ebx,%ebx break; 1174df: eb be jmp 11749f 1174e1: 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 ) return RTEMS_INVALID_ADDRESS; 1174e4: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 1174e9: 89 d8 mov %ebx,%eax 1174eb: 8b 5d fc mov -0x4(%ebp),%ebx 1174ee: c9 leave 1174ef: c3 ret =============================================================================== 001174f0 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 1174f0: 55 push %ebp 1174f1: 89 e5 mov %esp,%ebp 1174f3: 53 push %ebx 1174f4: 83 ec 14 sub $0x14,%esp 1174f7: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1174fa: 85 db test %ebx,%ebx 1174fc: 74 5e je 11755c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1174fe: 83 ec 0c sub $0xc,%esp 117501: ff 35 c4 21 14 00 pushl 0x1421c4 117507: e8 50 22 00 00 call 11975c <_API_Mutex_Lock> 11750c: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11750f: 8d 45 f4 lea -0xc(%ebp),%eax 117512: 50 push %eax 117513: ff 75 08 pushl 0x8(%ebp) 117516: 68 20 20 14 00 push $0x142020 11751b: e8 24 3d 00 00 call 11b244 <_Objects_Get_no_protection> switch ( location ) { 117520: 83 c4 10 add $0x10,%esp 117523: 8b 55 f4 mov -0xc(%ebp),%edx 117526: 85 d2 test %edx,%edx 117528: 74 1e je 117548 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11752a: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11752f: 83 ec 0c sub $0xc,%esp 117532: ff 35 c4 21 14 00 pushl 0x1421c4 117538: e8 67 22 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 11753d: 83 c4 10 add $0x10,%esp } 117540: 89 d8 mov %ebx,%eax 117542: 8b 5d fc mov -0x4(%ebp),%ebx 117545: c9 leave 117546: c3 ret 117547: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 117548: 83 ec 08 sub $0x8,%esp 11754b: 53 push %ebx 11754c: 83 c0 68 add $0x68,%eax 11754f: 50 push %eax 117550: e8 8b 32 00 00 call 11a7e0 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 117555: 83 c4 10 add $0x10,%esp the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); return_status = RTEMS_SUCCESSFUL; 117558: 31 db xor %ebx,%ebx break; 11755a: eb d3 jmp 11752f Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 11755c: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117561: 89 d8 mov %ebx,%eax 117563: 8b 5d fc mov -0x4(%ebp),%ebx 117566: c9 leave 117567: c3 ret =============================================================================== 00117568 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 117568: 55 push %ebp 117569: 89 e5 mov %esp,%ebp 11756b: 57 push %edi 11756c: 56 push %esi 11756d: 53 push %ebx 11756e: 83 ec 2c sub $0x2c,%esp 117571: 8b 75 0c mov 0xc(%ebp),%esi 117574: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117577: 85 db test %ebx,%ebx 117579: 0f 84 a1 00 00 00 je 117620 return RTEMS_INVALID_ADDRESS; *segment = NULL; 11757f: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117585: 85 f6 test %esi,%esi 117587: 75 0f jne 117598 return RTEMS_INVALID_SIZE; 117589: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 11758e: 8d 65 f4 lea -0xc(%ebp),%esp 117591: 5b pop %ebx 117592: 5e pop %esi 117593: 5f pop %edi 117594: c9 leave 117595: c3 ret 117596: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 117598: 83 ec 0c sub $0xc,%esp 11759b: ff 35 c4 21 14 00 pushl 0x1421c4 1175a1: e8 b6 21 00 00 call 11975c <_API_Mutex_Lock> executing = _Thread_Executing; 1175a6: a1 d8 26 14 00 mov 0x1426d8,%eax 1175ab: 89 45 d4 mov %eax,-0x2c(%ebp) 1175ae: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1175b1: 8d 45 e4 lea -0x1c(%ebp),%eax 1175b4: 50 push %eax 1175b5: ff 75 08 pushl 0x8(%ebp) 1175b8: 68 20 20 14 00 push $0x142020 1175bd: e8 82 3c 00 00 call 11b244 <_Objects_Get_no_protection> 1175c2: 89 c7 mov %eax,%edi switch ( location ) { 1175c4: 83 c4 10 add $0x10,%esp 1175c7: 8b 45 e4 mov -0x1c(%ebp),%eax 1175ca: 85 c0 test %eax,%eax 1175cc: 75 2a jne 1175f8 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 1175ce: 3b 77 5c cmp 0x5c(%edi),%esi 1175d1: 76 2d jbe 117600 return_status = RTEMS_INVALID_SIZE; 1175d3: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1175d8: 83 ec 0c sub $0xc,%esp 1175db: ff 35 c4 21 14 00 pushl 0x1421c4 1175e1: 89 45 d0 mov %eax,-0x30(%ebp) 1175e4: e8 bb 21 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1175e9: 83 c4 10 add $0x10,%esp 1175ec: 8b 45 d0 mov -0x30(%ebp),%eax } 1175ef: 8d 65 f4 lea -0xc(%ebp),%esp 1175f2: 5b pop %ebx 1175f3: 5e pop %esi 1175f4: 5f pop %edi 1175f5: c9 leave 1175f6: c3 ret 1175f7: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1175f8: b8 04 00 00 00 mov $0x4,%eax 1175fd: eb d9 jmp 1175d8 1175ff: 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 ); 117600: 6a 00 push $0x0 117602: 6a 00 push $0x0 117604: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 117605: 8d 47 68 lea 0x68(%edi),%eax 117608: 50 push %eax 117609: e8 c2 2b 00 00 call 11a1d0 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 11760e: 83 c4 10 add $0x10,%esp 117611: 85 c0 test %eax,%eax 117613: 74 17 je 11762c the_region->number_of_used_blocks += 1; 117615: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117618: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 11761a: 31 c0 xor %eax,%eax 11761c: eb ba jmp 1175d8 11761e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; 117620: b8 09 00 00 00 mov $0x9,%eax 117625: e9 64 ff ff ff jmp 11758e 11762a: 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 ) ) { 11762c: f6 45 10 01 testb $0x1,0x10(%ebp) 117630: 74 07 je 117639 return_status = RTEMS_UNSATISFIED; 117632: b8 0d 00 00 00 mov $0xd,%eax 117637: eb 9f jmp 1175d8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117639: a1 14 21 14 00 mov 0x142114,%eax 11763e: 40 inc %eax 11763f: a3 14 21 14 00 mov %eax,0x142114 * 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(); 117644: 83 ec 0c sub $0xc,%esp 117647: ff 35 c4 21 14 00 pushl 0x1421c4 11764d: e8 52 21 00 00 call 1197a4 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117652: 8d 47 10 lea 0x10(%edi),%eax 117655: 8b 55 d4 mov -0x2c(%ebp),%edx 117658: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 11765b: 8b 4d 08 mov 0x8(%ebp),%ecx 11765e: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117661: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117664: 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; 117667: 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 ); 11766e: 83 c4 0c add $0xc,%esp 117671: 68 48 c3 11 00 push $0x11c348 117676: ff 75 14 pushl 0x14(%ebp) 117679: 50 push %eax 11767a: e8 79 49 00 00 call 11bff8 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 11767f: e8 8c 44 00 00 call 11bb10 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117684: 8b 55 d4 mov -0x2c(%ebp),%edx 117687: 8b 42 34 mov 0x34(%edx),%eax 11768a: 83 c4 10 add $0x10,%esp 11768d: e9 fc fe ff ff jmp 11758e =============================================================================== 00117694 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117694: 55 push %ebp 117695: 89 e5 mov %esp,%ebp 117697: 56 push %esi 117698: 53 push %ebx 117699: 83 ec 20 sub $0x20,%esp 11769c: 8b 5d 0c mov 0xc(%ebp),%ebx 11769f: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 1176a2: 85 db test %ebx,%ebx 1176a4: 74 72 je 117718 return RTEMS_INVALID_ADDRESS; if ( !size ) 1176a6: 85 f6 test %esi,%esi 1176a8: 74 6e je 117718 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1176aa: 83 ec 0c sub $0xc,%esp 1176ad: ff 35 c4 21 14 00 pushl 0x1421c4 1176b3: e8 a4 20 00 00 call 11975c <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1176b8: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1176bb: 8d 45 f4 lea -0xc(%ebp),%eax 1176be: 50 push %eax 1176bf: ff 75 08 pushl 0x8(%ebp) 1176c2: 68 20 20 14 00 push $0x142020 1176c7: e8 78 3b 00 00 call 11b244 <_Objects_Get_no_protection> switch ( location ) { 1176cc: 83 c4 10 add $0x10,%esp 1176cf: 8b 55 f4 mov -0xc(%ebp),%edx 1176d2: 85 d2 test %edx,%edx 1176d4: 74 2a je 117700 void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 1176d6: 31 c0 xor %eax,%eax 1176d8: 83 fa 01 cmp $0x1,%edx 1176db: 0f 94 c0 sete %al 1176de: c1 e0 02 shl $0x2,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1176e1: 83 ec 0c sub $0xc,%esp 1176e4: ff 35 c4 21 14 00 pushl 0x1421c4 1176ea: 89 45 e4 mov %eax,-0x1c(%ebp) 1176ed: e8 b2 20 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1176f2: 83 c4 10 add $0x10,%esp 1176f5: 8b 45 e4 mov -0x1c(%ebp),%eax } 1176f8: 8d 65 f8 lea -0x8(%ebp),%esp 1176fb: 5b pop %ebx 1176fc: 5e pop %esi 1176fd: c9 leave 1176fe: c3 ret 1176ff: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 117700: 52 push %edx 117701: 56 push %esi 117702: 53 push %ebx 117703: 83 c0 68 add $0x68,%eax 117706: 50 push %eax 117707: e8 9c 35 00 00 call 11aca8 <_Heap_Size_of_alloc_area> 11770c: 83 c4 10 add $0x10,%esp void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 11770f: 3c 01 cmp $0x1,%al 117711: 19 c0 sbb %eax,%eax 117713: 83 e0 09 and $0x9,%eax 117716: eb c9 jmp 1176e1 if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 117718: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 11771d: 8d 65 f8 lea -0x8(%ebp),%esp 117720: 5b pop %ebx 117721: 5e pop %esi 117722: c9 leave 117723: c3 ret =============================================================================== 00117748 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 117748: 55 push %ebp 117749: 89 e5 mov %esp,%ebp 11774b: 56 push %esi 11774c: 53 push %ebx 11774d: 83 ec 20 sub $0x20,%esp 117750: 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 ) 117753: 85 db test %ebx,%ebx 117755: 0f 84 89 00 00 00 je 1177e4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11775b: 83 ec 0c sub $0xc,%esp 11775e: ff 35 c4 21 14 00 pushl 0x1421c4 117764: e8 f3 1f 00 00 call 11975c <_API_Mutex_Lock> 117769: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11776c: 8d 45 f0 lea -0x10(%ebp),%eax 11776f: 50 push %eax 117770: ff 75 08 pushl 0x8(%ebp) 117773: 68 20 20 14 00 push $0x142020 117778: e8 c7 3a 00 00 call 11b244 <_Objects_Get_no_protection> 11777d: 89 c6 mov %eax,%esi switch ( location ) { 11777f: 83 c4 10 add $0x10,%esp 117782: 8b 45 f0 mov -0x10(%ebp),%eax 117785: 85 c0 test %eax,%eax 117787: 74 1f je 1177a8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117789: 83 ec 0c sub $0xc,%esp 11778c: ff 35 c4 21 14 00 pushl 0x1421c4 117792: e8 0d 20 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 117797: 83 c4 10 add $0x10,%esp 11779a: b8 04 00 00 00 mov $0x4,%eax } 11779f: 8d 65 f8 lea -0x8(%ebp),%esp 1177a2: 5b pop %ebx 1177a3: 5e pop %esi 1177a4: c9 leave 1177a5: c3 ret 1177a6: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1177a8: 83 ec 0c sub $0xc,%esp 1177ab: 8d 45 f4 lea -0xc(%ebp),%eax 1177ae: 50 push %eax 1177af: 8d 45 ec lea -0x14(%ebp),%eax 1177b2: 50 push %eax 1177b3: ff 75 10 pushl 0x10(%ebp) 1177b6: ff 75 0c pushl 0xc(%ebp) 1177b9: 8d 46 68 lea 0x68(%esi),%eax 1177bc: 50 push %eax 1177bd: e8 de 33 00 00 call 11aba0 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1177c2: 8b 55 ec mov -0x14(%ebp),%edx 1177c5: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1177c7: 83 c4 20 add $0x20,%esp 1177ca: 85 c0 test %eax,%eax 1177cc: 75 22 jne 1177f0 _Region_Process_queue( the_region ); /* unlocks allocator */ 1177ce: 83 ec 0c sub $0xc,%esp 1177d1: 56 push %esi 1177d2: e8 b5 7c 00 00 call 11f48c <_Region_Process_queue> 1177d7: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 1177da: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1177dc: 8d 65 f8 lea -0x8(%ebp),%esp 1177df: 5b pop %ebx 1177e0: 5e pop %esi 1177e1: c9 leave 1177e2: c3 ret 1177e3: 90 nop <== NOT EXECUTED rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) return RTEMS_INVALID_ADDRESS; 1177e4: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1177e9: 8d 65 f8 lea -0x8(%ebp),%esp 1177ec: 5b pop %ebx 1177ed: 5e pop %esi 1177ee: c9 leave 1177ef: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1177f0: 83 ec 0c sub $0xc,%esp 1177f3: ff 35 c4 21 14 00 pushl 0x1421c4 1177f9: 89 45 e4 mov %eax,-0x1c(%ebp) 1177fc: e8 a3 1f 00 00 call 1197a4 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 117801: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 117804: 8b 45 e4 mov -0x1c(%ebp),%eax 117807: 48 dec %eax 117808: 0f 94 c0 sete %al 11780b: 0f b6 c0 movzbl %al,%eax 11780e: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117815: 8d 65 f8 lea -0x8(%ebp),%esp 117818: 5b pop %ebx 117819: 5e pop %esi 11781a: c9 leave 11781b: c3 ret =============================================================================== 0011781c : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 11781c: 55 push %ebp 11781d: 89 e5 mov %esp,%ebp 11781f: 53 push %ebx 117820: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 117823: ff 35 c4 21 14 00 pushl 0x1421c4 117829: e8 2e 1f 00 00 call 11975c <_API_Mutex_Lock> 11782e: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117831: 8d 45 f4 lea -0xc(%ebp),%eax 117834: 50 push %eax 117835: ff 75 08 pushl 0x8(%ebp) 117838: 68 20 20 14 00 push $0x142020 11783d: e8 02 3a 00 00 call 11b244 <_Objects_Get_no_protection> 117842: 89 c3 mov %eax,%ebx switch ( location ) { 117844: 83 c4 10 add $0x10,%esp 117847: 8b 45 f4 mov -0xc(%ebp),%eax 11784a: 85 c0 test %eax,%eax 11784c: 75 1e jne 11786c RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11784e: 83 ec 08 sub $0x8,%esp 117851: ff 75 0c pushl 0xc(%ebp) 117854: 8d 43 68 lea 0x68(%ebx),%eax 117857: 50 push %eax 117858: e8 d3 2d 00 00 call 11a630 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 11785d: 83 c4 10 add $0x10,%esp 117860: 84 c0 test %al,%al 117862: 75 28 jne 11788c return_status = RTEMS_INVALID_ADDRESS; 117864: bb 09 00 00 00 mov $0x9,%ebx 117869: eb 06 jmp 117871 11786b: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11786c: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117871: 83 ec 0c sub $0xc,%esp 117874: ff 35 c4 21 14 00 pushl 0x1421c4 11787a: e8 25 1f 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 11787f: 83 c4 10 add $0x10,%esp } 117882: 89 d8 mov %ebx,%eax 117884: 8b 5d fc mov -0x4(%ebp),%ebx 117887: c9 leave 117888: c3 ret 117889: 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; 11788c: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 11788f: 83 ec 0c sub $0xc,%esp 117892: 53 push %ebx 117893: e8 f4 7b 00 00 call 11f48c <_Region_Process_queue> return RTEMS_SUCCESSFUL; 117898: 83 c4 10 add $0x10,%esp 11789b: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11789d: 89 d8 mov %ebx,%eax 11789f: 8b 5d fc mov -0x4(%ebp),%ebx 1178a2: c9 leave 1178a3: c3 ret =============================================================================== 0010b414 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b414: 55 push %ebp 10b415: 89 e5 mov %esp,%ebp 10b417: 57 push %edi 10b418: 56 push %esi 10b419: 53 push %ebx 10b41a: 83 ec 3c sub $0x3c,%esp 10b41d: 8b 75 08 mov 0x8(%ebp),%esi 10b420: 8b 5d 10 mov 0x10(%ebp),%ebx 10b423: 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 ) ) 10b426: 85 f6 test %esi,%esi 10b428: 74 4a je 10b474 return RTEMS_INVALID_NAME; if ( !id ) 10b42a: 85 ff test %edi,%edi 10b42c: 0f 84 f6 00 00 00 je 10b528 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b432: 89 da mov %ebx,%edx 10b434: 81 e2 c0 00 00 00 and $0xc0,%edx 10b43a: 74 48 je 10b484 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10b43c: 89 d8 mov %ebx,%eax 10b43e: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b441: 83 f8 10 cmp $0x10,%eax 10b444: 74 0e je 10b454 } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10b446: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b44b: 8d 65 f4 lea -0xc(%ebp),%esp 10b44e: 5b pop %ebx 10b44f: 5e pop %esi 10b450: 5f pop %edi 10b451: c9 leave 10b452: c3 ret 10b453: 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 ) && 10b454: f6 c3 04 test $0x4,%bl 10b457: 74 ed je 10b446 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b459: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b45f: 74 e5 je 10b446 10b461: 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 ) ) 10b466: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b46a: 76 1f jbe 10b48b return RTEMS_INVALID_NUMBER; 10b46c: b8 0a 00 00 00 mov $0xa,%eax 10b471: eb d8 jmp 10b44b 10b473: 90 nop <== NOT EXECUTED CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b474: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b479: 8d 65 f4 lea -0xc(%ebp),%esp 10b47c: 5b pop %ebx 10b47d: 5e pop %esi 10b47e: 5f pop %edi 10b47f: c9 leave 10b480: c3 ret 10b481: 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 ) ) 10b484: 89 d9 mov %ebx,%ecx 10b486: 83 e1 30 and $0x30,%ecx 10b489: 75 db jne 10b466 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b48b: a1 d4 64 12 00 mov 0x1264d4,%eax 10b490: 40 inc %eax 10b491: a3 d4 64 12 00 mov %eax,0x1264d4 * 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 ); 10b496: 83 ec 0c sub $0xc,%esp 10b499: 68 20 64 12 00 push $0x126420 10b49e: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b4a1: e8 ba 14 00 00 call 10c960 <_Objects_Allocate> 10b4a6: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b4a8: 83 c4 10 add $0x10,%esp 10b4ab: 85 c0 test %eax,%eax 10b4ad: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b4b0: 0f 84 ba 00 00 00 je 10b570 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b4b6: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b4b9: 85 c9 test %ecx,%ecx 10b4bb: 74 77 je 10b534 /* * 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; 10b4bd: 31 c0 xor %eax,%eax 10b4bf: f6 c3 04 test $0x4,%bl 10b4c2: 0f 95 c0 setne %al 10b4c5: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b4c8: 83 f9 10 cmp $0x10,%ecx 10b4cb: 0f 84 ae 00 00 00 je 10b57f 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; 10b4d1: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b4d8: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b4dc: 50 push %eax 10b4dd: 31 c0 xor %eax,%eax 10b4df: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b4e3: 0f 94 c0 sete %al 10b4e6: 50 push %eax 10b4e7: 8d 45 d0 lea -0x30(%ebp),%eax 10b4ea: 50 push %eax 10b4eb: 8d 42 14 lea 0x14(%edx),%eax 10b4ee: 50 push %eax 10b4ef: 89 55 c4 mov %edx,-0x3c(%ebp) 10b4f2: e8 59 0c 00 00 call 10c150 <_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 ) { 10b4f7: 83 c4 10 add $0x10,%esp 10b4fa: 83 f8 06 cmp $0x6,%eax 10b4fd: 8b 55 c4 mov -0x3c(%ebp),%edx 10b500: 0f 84 a9 00 00 00 je 10b5af Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b506: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b509: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b50c: 8b 0d 3c 64 12 00 mov 0x12643c,%ecx 10b512: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b515: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b518: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b51a: e8 89 21 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b51f: 31 c0 xor %eax,%eax 10b521: e9 25 ff ff ff jmp 10b44b 10b526: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b528: b8 09 00 00 00 mov $0x9,%eax 10b52d: e9 19 ff ff ff jmp 10b44b 10b532: 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; 10b534: 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; 10b53b: 31 c0 xor %eax,%eax 10b53d: f6 c3 04 test $0x4,%bl 10b540: 0f 95 c0 setne %al 10b543: 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; 10b546: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b54d: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b554: 51 push %ecx 10b555: ff 75 0c pushl 0xc(%ebp) 10b558: 8d 45 e0 lea -0x20(%ebp),%eax 10b55b: 50 push %eax 10b55c: 8d 42 14 lea 0x14(%edx),%eax 10b55f: 50 push %eax 10b560: 89 55 c4 mov %edx,-0x3c(%ebp) 10b563: e8 78 0e 00 00 call 10c3e0 <_CORE_semaphore_Initialize> 10b568: 83 c4 10 add $0x10,%esp 10b56b: 8b 55 c4 mov -0x3c(%ebp),%edx 10b56e: eb 96 jmp 10b506 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b570: e8 33 21 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b575: b8 05 00 00 00 mov $0x5,%eax 10b57a: e9 cc fe ff ff jmp 10b44b 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; 10b57f: 8b 45 14 mov 0x14(%ebp),%eax 10b582: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b585: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b58c: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b590: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b594: 0f 85 42 ff ff ff jne 10b4dc if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b59a: f6 c3 40 test $0x40,%bl 10b59d: 74 30 je 10b5cf the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b59f: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b5a6: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b5aa: e9 2d ff ff ff jmp 10b4dc */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b5af: 83 ec 08 sub $0x8,%esp 10b5b2: 52 push %edx 10b5b3: 68 20 64 12 00 push $0x126420 10b5b8: e8 1b 17 00 00 call 10ccd8 <_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(); 10b5bd: e8 e6 20 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10b5c2: 83 c4 10 add $0x10,%esp 10b5c5: b8 13 00 00 00 mov $0x13,%eax 10b5ca: e9 7c fe ff ff jmp 10b44b 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 ) ) { 10b5cf: 81 e3 80 00 00 00 and $0x80,%ebx 10b5d5: 0f 84 01 ff ff ff je 10b4dc the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b5db: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b5e2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b5e6: e9 f1 fe ff ff jmp 10b4dc =============================================================================== 0010b5ec : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b5ec: 55 push %ebp 10b5ed: 89 e5 mov %esp,%ebp 10b5ef: 53 push %ebx 10b5f0: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10b5f3: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b5f6: 50 push %eax 10b5f7: ff 75 08 pushl 0x8(%ebp) 10b5fa: 68 20 64 12 00 push $0x126420 10b5ff: e8 14 18 00 00 call 10ce18 <_Objects_Get> 10b604: 89 c3 mov %eax,%ebx switch ( location ) { 10b606: 83 c4 10 add $0x10,%esp 10b609: 8b 4d f4 mov -0xc(%ebp),%ecx 10b60c: 85 c9 test %ecx,%ecx 10b60e: 74 0c je 10b61c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b610: b8 04 00 00 00 mov $0x4,%eax } 10b615: 8b 5d fc mov -0x4(%ebp),%ebx 10b618: c9 leave 10b619: c3 ret 10b61a: 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); 10b61c: 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) ) { 10b61f: 83 e0 30 and $0x30,%eax 10b622: 74 58 je 10b67c if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b624: 8b 53 64 mov 0x64(%ebx),%edx 10b627: 85 d2 test %edx,%edx 10b629: 75 15 jne 10b640 10b62b: 83 f8 20 cmp $0x20,%eax 10b62e: 74 10 je 10b640 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b630: e8 73 20 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10b635: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b63a: 8b 5d fc mov -0x4(%ebp),%ebx 10b63d: c9 leave 10b63e: c3 ret 10b63f: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b640: 50 push %eax 10b641: 6a 04 push $0x4 10b643: 6a 00 push $0x0 10b645: 8d 43 14 lea 0x14(%ebx),%eax 10b648: 50 push %eax 10b649: e8 f6 0a 00 00 call 10c144 <_CORE_mutex_Flush> 10b64e: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b651: 83 ec 08 sub $0x8,%esp 10b654: 53 push %ebx 10b655: 68 20 64 12 00 push $0x126420 10b65a: e8 7d 13 00 00 call 10c9dc <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b65f: 58 pop %eax 10b660: 5a pop %edx 10b661: 53 push %ebx 10b662: 68 20 64 12 00 push $0x126420 10b667: e8 6c 16 00 00 call 10ccd8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b66c: e8 37 20 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b671: 83 c4 10 add $0x10,%esp 10b674: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b676: 8b 5d fc mov -0x4(%ebp),%ebx 10b679: c9 leave 10b67a: c3 ret 10b67b: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b67c: 51 push %ecx 10b67d: 6a 02 push $0x2 10b67f: 6a 00 push $0x0 10b681: 8d 43 14 lea 0x14(%ebx),%eax 10b684: 50 push %eax 10b685: e8 4a 0d 00 00 call 10c3d4 <_CORE_semaphore_Flush> 10b68a: 83 c4 10 add $0x10,%esp 10b68d: eb c2 jmp 10b651 =============================================================================== 0010b690 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b690: 55 push %ebp 10b691: 89 e5 mov %esp,%ebp 10b693: 57 push %edi 10b694: 56 push %esi 10b695: 53 push %ebx 10b696: 83 ec 1c sub $0x1c,%esp 10b699: 8b 5d 08 mov 0x8(%ebp),%ebx 10b69c: 8b 75 0c mov 0xc(%ebp),%esi 10b69f: 8b 7d 10 mov 0x10(%ebp),%edi register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); 10b6a2: 8d 45 e0 lea -0x20(%ebp),%eax Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) _Objects_Get_isr_disable( &_Semaphore_Information, id, location, level ); 10b6a5: 50 push %eax 10b6a6: 8d 45 e4 lea -0x1c(%ebp),%eax 10b6a9: 50 push %eax 10b6aa: 53 push %ebx 10b6ab: 68 20 64 12 00 push $0x126420 10b6b0: e8 0b 17 00 00 call 10cdc0 <_Objects_Get_isr_disable> switch ( location ) { 10b6b5: 83 c4 10 add $0x10,%esp 10b6b8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b6bb: 85 c9 test %ecx,%ecx 10b6bd: 74 0d je 10b6cc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b6bf: b8 04 00 00 00 mov $0x4,%eax } 10b6c4: 8d 65 f4 lea -0xc(%ebp),%esp 10b6c7: 5b pop %ebx 10b6c8: 5e pop %esi 10b6c9: 5f pop %edi 10b6ca: c9 leave 10b6cb: 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) ) { 10b6cc: f6 40 10 30 testb $0x30,0x10(%eax) 10b6d0: 74 36 je 10b708 _CORE_mutex_Seize( 10b6d2: 83 ec 0c sub $0xc,%esp 10b6d5: ff 75 e0 pushl -0x20(%ebp) 10b6d8: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10b6d9: 83 e6 01 and $0x1,%esi 10b6dc: 83 f6 01 xor $0x1,%esi 10b6df: 56 push %esi 10b6e0: 53 push %ebx 10b6e1: 83 c0 14 add $0x14,%eax 10b6e4: 50 push %eax 10b6e5: e8 5e 0b 00 00 call 10c248 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b6ea: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10b6ed: a1 98 6a 12 00 mov 0x126a98,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b6f2: ff 70 34 pushl 0x34(%eax) 10b6f5: e8 12 01 00 00 call 10b80c <_Semaphore_Translate_core_mutex_return_code> 10b6fa: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b6fd: 8d 65 f4 lea -0xc(%ebp),%esp 10b700: 5b pop %ebx 10b701: 5e pop %esi 10b702: 5f pop %edi 10b703: c9 leave 10b704: c3 ret 10b705: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b708: 8b 15 98 6a 12 00 mov 0x126a98,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b70e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b715: 8b 48 5c mov 0x5c(%eax),%ecx 10b718: 85 c9 test %ecx,%ecx 10b71a: 75 2c jne 10b748 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b71c: 83 e6 01 and $0x1,%esi 10b71f: 74 33 je 10b754 _ISR_Enable( *level_p ); 10b721: ff 75 e0 pushl -0x20(%ebp) 10b724: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b725: 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( 10b72c: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10b72f: a1 98 6a 12 00 mov 0x126a98,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b734: ff 70 34 pushl 0x34(%eax) 10b737: e8 e0 00 00 00 call 10b81c <_Semaphore_Translate_core_semaphore_return_code> 10b73c: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b73f: 8d 65 f4 lea -0xc(%ebp),%esp 10b742: 5b pop %ebx 10b743: 5e pop %esi 10b744: 5f pop %edi 10b745: c9 leave 10b746: c3 ret 10b747: 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; 10b748: 49 dec %ecx 10b749: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b74c: ff 75 e0 pushl -0x20(%ebp) 10b74f: 9d popf 10b750: eb da jmp 10b72c 10b752: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b754: 8b 0d d4 64 12 00 mov 0x1264d4,%ecx 10b75a: 41 inc %ecx 10b75b: 89 0d d4 64 12 00 mov %ecx,0x1264d4 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; 10b761: 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; 10b768: 83 c0 14 add $0x14,%eax 10b76b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b76e: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b771: ff 75 e0 pushl -0x20(%ebp) 10b774: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b775: 52 push %edx 10b776: 68 e0 de 10 00 push $0x10dee0 10b77b: 57 push %edi 10b77c: 50 push %eax 10b77d: e8 0e 24 00 00 call 10db90 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b782: e8 21 1f 00 00 call 10d6a8 <_Thread_Enable_dispatch> 10b787: 83 c4 10 add $0x10,%esp 10b78a: eb a0 jmp 10b72c =============================================================================== 0010b78c : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b78c: 55 push %ebp 10b78d: 89 e5 mov %esp,%ebp 10b78f: 53 push %ebx 10b790: 83 ec 18 sub $0x18,%esp 10b793: 8b 5d 08 mov 0x8(%ebp),%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); 10b796: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b799: 50 push %eax 10b79a: 53 push %ebx 10b79b: 68 20 64 12 00 push $0x126420 10b7a0: e8 73 16 00 00 call 10ce18 <_Objects_Get> switch ( location ) { 10b7a5: 83 c4 10 add $0x10,%esp 10b7a8: 8b 55 f4 mov -0xc(%ebp),%edx 10b7ab: 85 d2 test %edx,%edx 10b7ad: 74 0d je 10b7bc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b7af: b8 04 00 00 00 mov $0x4,%eax } 10b7b4: 8b 5d fc mov -0x4(%ebp),%ebx 10b7b7: c9 leave 10b7b8: c3 ret 10b7b9: 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) ) { 10b7bc: f6 40 10 30 testb $0x30,0x10(%eax) 10b7c0: 75 26 jne 10b7e8 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b7c2: 52 push %edx 10b7c3: 6a 00 push $0x0 10b7c5: 53 push %ebx 10b7c6: 83 c0 14 add $0x14,%eax 10b7c9: 50 push %eax 10b7ca: e8 51 0c 00 00 call 10c420 <_CORE_semaphore_Surrender> 10b7cf: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b7d1: e8 d2 1e 00 00 call 10d6a8 <_Thread_Enable_dispatch> return 10b7d6: 89 1c 24 mov %ebx,(%esp) 10b7d9: e8 3e 00 00 00 call 10b81c <_Semaphore_Translate_core_semaphore_return_code> 10b7de: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7e1: 8b 5d fc mov -0x4(%ebp),%ebx 10b7e4: c9 leave 10b7e5: c3 ret 10b7e6: 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( 10b7e8: 51 push %ecx 10b7e9: 6a 00 push $0x0 10b7eb: 53 push %ebx 10b7ec: 83 c0 14 add $0x14,%eax 10b7ef: 50 push %eax 10b7f0: e8 f3 0a 00 00 call 10c2e8 <_CORE_mutex_Surrender> 10b7f5: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b7f7: e8 ac 1e 00 00 call 10d6a8 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b7fc: 89 1c 24 mov %ebx,(%esp) 10b7ff: e8 08 00 00 00 call 10b80c <_Semaphore_Translate_core_mutex_return_code> 10b804: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b807: 8b 5d fc mov -0x4(%ebp),%ebx 10b80a: c9 leave 10b80b: c3 ret =============================================================================== 0011ea50 : */ void rtems_shutdown_executive( uint32_t result ) { 11ea50: 55 push %ebp 11ea51: 89 e5 mov %esp,%ebp 11ea53: 83 ec 08 sub $0x8,%esp if ( _System_state_Is_up( _System_state_Get() ) ) { 11ea56: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 11ea5d: 74 0d je 11ea6c _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } _Internal_error_Occurred( 11ea5f: 50 push %eax 11ea60: 6a 14 push $0x14 11ea62: 6a 01 push $0x1 11ea64: 6a 00 push $0x0 11ea66: e8 65 de fe ff call 10c8d0 <_Internal_error_Occurred> 11ea6b: 90 nop <== NOT EXECUTED 11ea6c: c7 05 80 66 12 00 04 movl $0x4,0x126680 11ea73: 00 00 00 * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); 11ea76: 83 ec 0c sub $0xc,%esp 11ea79: 68 bc 64 12 00 push $0x1264bc 11ea7e: e8 9a fe fe ff call 10e91d <_CPU_Context_restore> =============================================================================== 0010c7a4 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c7a4: 55 push %ebp 10c7a5: 89 e5 mov %esp,%ebp 10c7a7: 83 ec 08 sub $0x8,%esp 10c7aa: 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 ]; 10c7ad: a1 78 a5 12 00 mov 0x12a578,%eax 10c7b2: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10c7b8: 8b 0d b4 9f 12 00 mov 0x129fb4,%ecx 10c7be: 41 inc %ecx 10c7bf: 89 0d b4 9f 12 00 mov %ecx,0x129fb4 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c7c5: 85 d2 test %edx,%edx 10c7c7: 74 13 je 10c7dc asr->mode_set = mode_set; 10c7c9: 8b 4d 0c mov 0xc(%ebp),%ecx 10c7cc: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c7cf: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c7d2: e8 2d 22 00 00 call 10ea04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c7d7: 31 c0 xor %eax,%eax 10c7d9: c9 leave 10c7da: c3 ret 10c7db: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c7dc: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c7e0: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c7e7: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c7ee: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c7f5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c7fc: 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(); 10c803: e8 fc 21 00 00 call 10ea04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c808: 31 c0 xor %eax,%eax 10c80a: c9 leave 10c80b: c3 ret =============================================================================== 00117d3c : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117d3c: 55 push %ebp 117d3d: 89 e5 mov %esp,%ebp 117d3f: 53 push %ebx 117d40: 83 ec 14 sub $0x14,%esp 117d43: 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 ) 117d46: 85 db test %ebx,%ebx 117d48: 75 0a jne 117d54 return RTEMS_INVALID_NUMBER; 117d4a: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d4f: 8b 5d fc mov -0x4(%ebp),%ebx 117d52: c9 leave 117d53: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117d54: 83 ec 08 sub $0x8,%esp 117d57: 8d 45 f4 lea -0xc(%ebp),%eax 117d5a: 50 push %eax 117d5b: ff 75 08 pushl 0x8(%ebp) 117d5e: e8 d1 3d 00 00 call 11bb34 <_Thread_Get> switch ( location ) { 117d63: 83 c4 10 add $0x10,%esp 117d66: 8b 55 f4 mov -0xc(%ebp),%edx 117d69: 85 d2 test %edx,%edx 117d6b: 74 0b je 117d78 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117d6d: b8 04 00 00 00 mov $0x4,%eax } 117d72: 8b 5d fc mov -0x4(%ebp),%ebx 117d75: c9 leave 117d76: c3 ret 117d77: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117d78: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 117d7e: 8b 4a 0c mov 0xc(%edx),%ecx 117d81: 85 c9 test %ecx,%ecx 117d83: 74 3f je 117dc4 if ( asr->is_enabled ) { 117d85: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117d89: 74 25 je 117db0 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117d8b: 9c pushf 117d8c: fa cli 117d8d: 59 pop %ecx *signal_set |= signals; 117d8e: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 117d91: 51 push %ecx 117d92: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117d93: 8b 15 d4 26 14 00 mov 0x1426d4,%edx 117d99: 85 d2 test %edx,%edx 117d9b: 74 1b je 117db8 117d9d: 3b 05 d8 26 14 00 cmp 0x1426d8,%eax 117da3: 75 13 jne 117db8 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 117da5: c6 05 e4 26 14 00 01 movb $0x1,0x1426e4 117dac: eb 0a jmp 117db8 117dae: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117db0: 9c pushf 117db1: fa cli 117db2: 58 pop %eax *signal_set |= signals; 117db3: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117db6: 50 push %eax 117db7: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117db8: e8 53 3d 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117dbd: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117dbf: 8b 5d fc mov -0x4(%ebp),%ebx 117dc2: c9 leave 117dc3: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117dc4: e8 47 3d 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117dc9: b8 0b 00 00 00 mov $0xb,%eax 117dce: e9 7c ff ff ff jmp 117d4f =============================================================================== 00107df0 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 107df0: 55 push %ebp 107df1: 89 e5 mov %esp,%ebp 107df3: 57 push %edi 107df4: 56 push %esi 107df5: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 107df8: 8b 48 08 mov 0x8(%eax),%ecx 107dfb: 85 c9 test %ecx,%ecx 107dfd: 74 15 je 107e14 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 107dff: 8b b8 c8 00 00 00 mov 0xc8(%eax),%edi 107e05: 83 c7 08 add $0x8,%edi 107e08: be 60 9d 12 00 mov $0x129d60,%esi 107e0d: b9 04 00 00 00 mov $0x4,%ecx 107e12: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 107e14: 5e pop %esi 107e15: 5f pop %edi 107e16: c9 leave 107e17: c3 ret =============================================================================== 00107dc8 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 107dc8: 55 push %ebp 107dc9: 89 e5 mov %esp,%ebp 107dcb: 57 push %edi 107dcc: 8b 7d 0c mov 0xc(%ebp),%edi Stack_check_Initialize(); 107dcf: e8 88 ff ff ff call 107d5c if (the_thread) 107dd4: 85 ff test %edi,%edi 107dd6: 74 12 je 107dea <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 107dd8: 8b 8f c4 00 00 00 mov 0xc4(%edi),%ecx 107dde: 8b 97 c8 00 00 00 mov 0xc8(%edi),%edx 107de4: b0 a5 mov $0xa5,%al 107de6: 89 d7 mov %edx,%edi 107de8: f3 aa rep stos %al,%es:(%edi) return true; } 107dea: b0 01 mov $0x1,%al 107dec: 5f pop %edi 107ded: c9 leave 107dee: c3 ret =============================================================================== 00107f2c : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 107f2c: 55 push %ebp 107f2d: 89 e5 mov %esp,%ebp 107f2f: 57 push %edi 107f30: 56 push %esi Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 107f31: a1 38 a5 12 00 mov 0x12a538,%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 107f36: 8b b0 c8 00 00 00 mov 0xc8(%eax),%esi 107f3c: 39 f5 cmp %esi,%ebp 107f3e: 72 3c jb 107f7c <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 107f40: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 107f46: 8d 04 06 lea (%esi,%eax,1),%eax } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 107f49: 39 c5 cmp %eax,%ebp 107f4b: 0f 96 c0 setbe %al /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 107f4e: 8b 15 08 9a 12 00 mov 0x129a08,%edx 107f54: 85 d2 test %edx,%edx 107f56: 74 30 je 107f88 <== NEVER TAKEN pattern_ok = (!memcmp( (void *) Stack_check_Get_pattern_area(the_stack)->pattern, 107f58: 83 c6 08 add $0x8,%esi /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 107f5b: bf 60 9d 12 00 mov $0x129d60,%edi 107f60: b9 10 00 00 00 mov $0x10,%ecx 107f65: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107f67: 0f 94 c2 sete %dl /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { 107f6a: 84 c0 test %al,%al 107f6c: 74 1e je 107f8c <== NEVER TAKEN 107f6e: 84 d2 test %dl,%dl 107f70: 74 1a je 107f8c <== NEVER TAKEN /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 107f72: 31 c0 xor %eax,%eax 107f74: 8d 65 f8 lea -0x8(%ebp),%esp 107f77: 5e pop %esi 107f78: 5f pop %edi 107f79: c9 leave 107f7a: c3 ret 107f7b: 90 nop <== NOT EXECUTED { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; 107f7c: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 107f7e: 8b 15 08 9a 12 00 mov 0x129a08,%edx <== NOT EXECUTED 107f84: 85 d2 test %edx,%edx <== NOT EXECUTED 107f86: 75 d0 jne 107f58 <== NOT EXECUTED */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; bool sp_ok; bool pattern_ok = true; 107f88: b2 01 mov $0x1,%dl <== NOT EXECUTED 107f8a: eb de jmp 107f6a <== NOT EXECUTED /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 107f8c: 57 push %edi <== NOT EXECUTED 107f8d: 57 push %edi <== NOT EXECUTED 107f8e: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107f91: 52 push %edx <== NOT EXECUTED 107f92: ff 35 38 a5 12 00 pushl 0x12a538 <== NOT EXECUTED 107f98: e8 7b fe ff ff call 107e18 <== NOT EXECUTED =============================================================================== 00108008 : void rtems_stack_checker_report_usage( void ) { 108008: 55 push %ebp <== NOT EXECUTED 108009: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10800b: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 10800e: 68 70 98 10 00 push $0x109870 <== NOT EXECUTED 108013: 6a 00 push $0x0 <== NOT EXECUTED 108015: e8 86 ff ff ff call 107fa0 <== NOT EXECUTED 10801a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10801d: c9 leave <== NOT EXECUTED 10801e: c3 ret <== NOT EXECUTED =============================================================================== 00107fa0 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 107fa0: 55 push %ebp <== NOT EXECUTED 107fa1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107fa3: 56 push %esi <== NOT EXECUTED 107fa4: 53 push %ebx <== NOT EXECUTED 107fa5: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 107fa8: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED if ( !print ) 107fab: 85 db test %ebx,%ebx <== NOT EXECUTED 107fad: 74 50 je 107fff <== NOT EXECUTED return; print_context = context; 107faf: 89 35 00 9a 12 00 mov %esi,0x129a00 <== NOT EXECUTED print_handler = print; 107fb5: 89 1d 04 9a 12 00 mov %ebx,0x129a04 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 107fbb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107fbe: 68 c8 32 12 00 push $0x1232c8 <== NOT EXECUTED 107fc3: 56 push %esi <== NOT EXECUTED 107fc4: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 107fc6: 59 pop %ecx <== NOT EXECUTED 107fc7: 58 pop %eax <== NOT EXECUTED 107fc8: 68 4c 33 12 00 push $0x12334c <== NOT EXECUTED 107fcd: 56 push %esi <== NOT EXECUTED 107fce: 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 ); 107fd0: c7 04 24 f0 7b 10 00 movl $0x107bf0,(%esp) <== NOT EXECUTED 107fd7: e8 54 6d 00 00 call 10ed30 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 107fdc: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 107fe3: e8 08 fc ff ff call 107bf0 <== NOT EXECUTED #endif print_context = NULL; 107fe8: c7 05 00 9a 12 00 00 movl $0x0,0x129a00 <== NOT EXECUTED 107fef: 00 00 00 print_handler = NULL; 107ff2: c7 05 04 9a 12 00 00 movl $0x0,0x129a04 <== NOT EXECUTED 107ff9: 00 00 00 107ffc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107fff: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108002: 5b pop %ebx <== NOT EXECUTED 108003: 5e pop %esi <== NOT EXECUTED 108004: c9 leave <== NOT EXECUTED 108005: c3 ret <== NOT EXECUTED =============================================================================== 00107ed4 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 107ed4: 55 push %ebp 107ed5: 89 e5 mov %esp,%ebp 107ed7: 57 push %edi 107ed8: 56 push %esi 107ed9: 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; 107edc: 8b 90 c8 00 00 00 mov 0xc8(%eax),%edx 107ee2: 8d 72 08 lea 0x8(%edx),%esi ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 107ee5: 39 d5 cmp %edx,%ebp 107ee7: 72 0a jb 107ef3 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 107ee9: 03 90 c4 00 00 00 add 0xc4(%eax),%edx 107eef: 39 d5 cmp %edx,%ebp 107ef1: 76 1d jbe 107f10 <== ALWAYS 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, 107ef3: bf 60 9d 12 00 mov $0x129d60,%edi <== NOT EXECUTED 107ef8: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED 107efd: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED 107eff: 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 ); 107f02: 56 push %esi <== NOT EXECUTED 107f03: 56 push %esi <== NOT EXECUTED 107f04: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107f07: 52 push %edx <== NOT EXECUTED 107f08: 50 push %eax <== NOT EXECUTED 107f09: e8 0a ff ff ff call 107e18 <== NOT EXECUTED 107f0e: 66 90 xchg %ax,%ax <== 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, 107f10: bf 60 9d 12 00 mov $0x129d60,%edi 107f15: b9 10 00 00 00 mov $0x10,%ecx (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 107f1a: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107f1c: 75 07 jne 107f25 <== NEVER TAKEN Stack_check_report_blown_task( running, pattern_ok ); } } 107f1e: 8d 65 f8 lea -0x8(%ebp),%esp 107f21: 5e pop %esi 107f22: 5f pop %edi 107f23: c9 leave 107f24: c3 ret sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 107f25: 31 d2 xor %edx,%edx <== NOT EXECUTED 107f27: eb d9 jmp 107f02 <== NOT EXECUTED =============================================================================== 00110a40 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110a40: 55 push %ebp 110a41: 89 e5 mov %esp,%ebp 110a43: 57 push %edi 110a44: 56 push %esi 110a45: 53 push %ebx 110a46: 83 ec 2c sub $0x2c,%esp 110a49: 8b 75 08 mov 0x8(%ebp),%esi 110a4c: 8b 5d 0c mov 0xc(%ebp),%ebx 110a4f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110a52: 85 db test %ebx,%ebx 110a54: 74 72 je 110ac8 return RTEMS_INVALID_ADDRESS; errno = 0; 110a56: e8 39 2f 00 00 call 113994 <__errno> 110a5b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110a61: c7 03 00 00 00 00 movl $0x0,(%ebx) 110a67: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 110a6e: 83 ec 08 sub $0x8,%esp 110a71: 8d 45 e4 lea -0x1c(%ebp),%eax 110a74: 50 push %eax 110a75: 56 push %esi 110a76: e8 19 59 00 00 call 116394 #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 ) 110a7b: 83 c4 10 add $0x10,%esp 110a7e: 85 ff test %edi,%edi 110a80: 74 56 je 110ad8 *endptr = end; 110a82: 8b 45 e4 mov -0x1c(%ebp),%eax 110a85: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110a87: 39 c6 cmp %eax,%esi 110a89: 74 55 je 110ae0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110a8b: dd 05 50 57 12 00 fldl 0x125750 110a91: d9 c9 fxch %st(1) 110a93: dd e1 fucom %st(1) 110a95: df e0 fnstsw %ax 110a97: dd d9 fstp %st(1) 110a99: f6 c4 45 test $0x45,%ah 110a9c: 74 0e je 110aac #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110a9e: dd 1b fstpl (%ebx) #endif return RTEMS_SUCCESSFUL; 110aa0: 31 c0 xor %eax,%eax } 110aa2: 8d 65 f4 lea -0xc(%ebp),%esp 110aa5: 5b pop %ebx 110aa6: 5e pop %esi 110aa7: 5f pop %edi 110aa8: c9 leave 110aa9: c3 ret 110aaa: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110aac: dd 5d c8 fstpl -0x38(%ebp) 110aaf: e8 e0 2e 00 00 call 113994 <__errno> 110ab4: 83 38 22 cmpl $0x22,(%eax) 110ab7: dd 45 c8 fldl -0x38(%ebp) 110aba: 75 e2 jne 110a9e <== NEVER TAKEN 110abc: dd d8 fstp %st(0) return RTEMS_INVALID_NUMBER; 110abe: b8 0a 00 00 00 mov $0xa,%eax 110ac3: eb dd jmp 110aa2 110ac5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110ac8: 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; } 110acd: 8d 65 f4 lea -0xc(%ebp),%esp 110ad0: 5b pop %ebx 110ad1: 5e pop %esi 110ad2: 5f pop %edi 110ad3: c9 leave 110ad4: c3 ret 110ad5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ) 110ad8: 8b 45 e4 mov -0x1c(%ebp),%eax 110adb: eb aa jmp 110a87 110add: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110ae0: dd d8 fstp %st(0) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110ae2: b8 0b 00 00 00 mov $0xb,%eax 110ae7: eb b9 jmp 110aa2 =============================================================================== 00110aec : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110aec: 55 push %ebp 110aed: 89 e5 mov %esp,%ebp 110aef: 57 push %edi 110af0: 56 push %esi 110af1: 53 push %ebx 110af2: 83 ec 2c sub $0x2c,%esp 110af5: 8b 75 08 mov 0x8(%ebp),%esi 110af8: 8b 5d 0c mov 0xc(%ebp),%ebx 110afb: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110afe: 85 db test %ebx,%ebx 110b00: 74 6a je 110b6c return RTEMS_INVALID_ADDRESS; errno = 0; 110b02: e8 8d 2e 00 00 call 113994 <__errno> 110b07: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110b0d: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 110b13: 83 ec 08 sub $0x8,%esp 110b16: 8d 45 e4 lea -0x1c(%ebp),%eax 110b19: 50 push %eax 110b1a: 56 push %esi 110b1b: e8 90 58 00 00 call 1163b0 #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 ) 110b20: 83 c4 10 add $0x10,%esp 110b23: 85 ff test %edi,%edi 110b25: 74 55 je 110b7c *endptr = end; 110b27: 8b 45 e4 mov -0x1c(%ebp),%eax 110b2a: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110b2c: 39 c6 cmp %eax,%esi 110b2e: 74 54 je 110b84 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110b30: d9 05 58 57 12 00 flds 0x125758 110b36: d9 c9 fxch %st(1) 110b38: dd e1 fucom %st(1) 110b3a: df e0 fnstsw %ax 110b3c: dd d9 fstp %st(1) 110b3e: f6 c4 45 test $0x45,%ah 110b41: 74 0d je 110b50 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110b43: d9 1b fstps (%ebx) #endif return RTEMS_SUCCESSFUL; 110b45: 31 c0 xor %eax,%eax } 110b47: 8d 65 f4 lea -0xc(%ebp),%esp 110b4a: 5b pop %ebx 110b4b: 5e pop %esi 110b4c: 5f pop %edi 110b4d: c9 leave 110b4e: c3 ret 110b4f: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110b50: d9 5d c8 fstps -0x38(%ebp) 110b53: e8 3c 2e 00 00 call 113994 <__errno> 110b58: 83 38 22 cmpl $0x22,(%eax) 110b5b: d9 45 c8 flds -0x38(%ebp) 110b5e: 75 e3 jne 110b43 <== NEVER TAKEN 110b60: dd d8 fstp %st(0) return RTEMS_INVALID_NUMBER; 110b62: b8 0a 00 00 00 mov $0xa,%eax 110b67: eb de jmp 110b47 110b69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110b6c: 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; } 110b71: 8d 65 f4 lea -0xc(%ebp),%esp 110b74: 5b pop %ebx 110b75: 5e pop %esi 110b76: 5f pop %edi 110b77: c9 leave 110b78: c3 ret 110b79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ) 110b7c: 8b 45 e4 mov -0x1c(%ebp),%eax 110b7f: eb ab jmp 110b2c 110b81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110b84: dd d8 fstp %st(0) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110b86: b8 0b 00 00 00 mov $0xb,%eax 110b8b: eb ba jmp 110b47 =============================================================================== 00110b90 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110b90: 55 push %ebp 110b91: 89 e5 mov %esp,%ebp 110b93: 57 push %edi 110b94: 56 push %esi 110b95: 53 push %ebx 110b96: 83 ec 2c sub $0x2c,%esp 110b99: 8b 75 08 mov 0x8(%ebp),%esi 110b9c: 8b 5d 0c mov 0xc(%ebp),%ebx 110b9f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110ba2: 85 db test %ebx,%ebx 110ba4: 74 5e je 110c04 return RTEMS_INVALID_ADDRESS; errno = 0; 110ba6: e8 e9 2d 00 00 call 113994 <__errno> 110bab: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110bb1: 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 ); 110bb7: 50 push %eax 110bb8: ff 75 14 pushl 0x14(%ebp) 110bbb: 8d 45 e4 lea -0x1c(%ebp),%eax 110bbe: 50 push %eax 110bbf: 56 push %esi 110bc0: e8 af 59 00 00 call 116574 110bc5: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110bc7: 83 c4 10 add $0x10,%esp 110bca: 85 ff test %edi,%edi 110bcc: 74 46 je 110c14 *endptr = end; 110bce: 8b 45 e4 mov -0x1c(%ebp),%eax 110bd1: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110bd3: 39 c6 cmp %eax,%esi 110bd5: 74 45 je 110c1c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110bd7: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 110bdd: 74 0d je 110bec #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110bdf: 89 13 mov %edx,(%ebx) #endif return RTEMS_SUCCESSFUL; 110be1: 31 c0 xor %eax,%eax } 110be3: 8d 65 f4 lea -0xc(%ebp),%esp 110be6: 5b pop %ebx 110be7: 5e pop %esi 110be8: 5f pop %edi 110be9: c9 leave 110bea: c3 ret 110beb: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110bec: 89 55 d4 mov %edx,-0x2c(%ebp) 110bef: e8 a0 2d 00 00 call 113994 <__errno> 110bf4: 83 38 22 cmpl $0x22,(%eax) 110bf7: 8b 55 d4 mov -0x2c(%ebp),%edx 110bfa: 75 e3 jne 110bdf return RTEMS_INVALID_NUMBER; 110bfc: b8 0a 00 00 00 mov $0xa,%eax 110c01: eb e0 jmp 110be3 110c03: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110c04: 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; } 110c09: 8d 65 f4 lea -0xc(%ebp),%esp 110c0c: 5b pop %ebx 110c0d: 5e pop %esi 110c0e: 5f pop %edi 110c0f: c9 leave 110c10: c3 ret 110c11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ) 110c14: 8b 45 e4 mov -0x1c(%ebp),%eax 110c17: eb ba jmp 110bd3 110c19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110c1c: b8 0b 00 00 00 mov $0xb,%eax 110c21: eb c0 jmp 110be3 =============================================================================== 00110cd4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110cd4: 55 push %ebp 110cd5: 89 e5 mov %esp,%ebp 110cd7: 57 push %edi 110cd8: 56 push %esi 110cd9: 53 push %ebx 110cda: 83 ec 1c sub $0x1c,%esp 110cdd: 8b 7d 08 mov 0x8(%ebp),%edi 110ce0: 8b 5d 0c mov 0xc(%ebp),%ebx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110ce3: 85 db test %ebx,%ebx 110ce5: 74 69 je 110d50 return RTEMS_INVALID_ADDRESS; errno = 0; 110ce7: e8 a8 2c 00 00 call 113994 <__errno> 110cec: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110cf2: 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 ); 110cf8: 52 push %edx 110cf9: ff 75 14 pushl 0x14(%ebp) 110cfc: 8d 45 e4 lea -0x1c(%ebp),%eax 110cff: 50 push %eax 110d00: 57 push %edi 110d01: e8 6e 58 00 00 call 116574 110d06: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110d08: 83 c4 10 add $0x10,%esp 110d0b: 8b 45 10 mov 0x10(%ebp),%eax 110d0e: 85 c0 test %eax,%eax 110d10: 74 4e je 110d60 *endptr = end; 110d12: 8b 45 e4 mov -0x1c(%ebp),%eax 110d15: 8b 55 10 mov 0x10(%ebp),%edx 110d18: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 110d1a: 39 c7 cmp %eax,%edi 110d1c: 74 4a je 110d68 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110d1e: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 110d24: 74 16 je 110d3c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110d26: 81 fe 00 00 00 80 cmp $0x80000000,%esi 110d2c: 74 0e je 110d3c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110d2e: 89 33 mov %esi,(%ebx) #endif return RTEMS_SUCCESSFUL; 110d30: 31 c0 xor %eax,%eax } 110d32: 8d 65 f4 lea -0xc(%ebp),%esp 110d35: 5b pop %ebx 110d36: 5e pop %esi 110d37: 5f pop %edi 110d38: c9 leave 110d39: c3 ret 110d3a: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110d3c: e8 53 2c 00 00 call 113994 <__errno> 110d41: 83 38 22 cmpl $0x22,(%eax) 110d44: 75 e8 jne 110d2e return RTEMS_INVALID_NUMBER; 110d46: b8 0a 00 00 00 mov $0xa,%eax 110d4b: eb e5 jmp 110d32 110d4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110d50: 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; } 110d55: 8d 65 f4 lea -0xc(%ebp),%esp 110d58: 5b pop %ebx 110d59: 5e pop %esi 110d5a: 5f pop %edi 110d5b: c9 leave 110d5c: c3 ret 110d5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ) 110d60: 8b 45 e4 mov -0x1c(%ebp),%eax 110d63: eb b5 jmp 110d1a 110d65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110d68: b8 0b 00 00 00 mov $0xb,%eax 110d6d: eb c3 jmp 110d32 =============================================================================== 00110c24 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110c24: 55 push %ebp 110c25: 89 e5 mov %esp,%ebp 110c27: 57 push %edi 110c28: 56 push %esi 110c29: 53 push %ebx 110c2a: 83 ec 2c sub $0x2c,%esp 110c2d: 8b 5d 0c mov 0xc(%ebp),%ebx 110c30: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110c33: 85 db test %ebx,%ebx 110c35: 74 7d je 110cb4 return RTEMS_INVALID_ADDRESS; errno = 0; 110c37: e8 58 2d 00 00 call 113994 <__errno> 110c3c: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110c42: c7 03 00 00 00 00 movl $0x0,(%ebx) 110c48: 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 ); 110c4f: 50 push %eax 110c50: ff 75 14 pushl 0x14(%ebp) 110c53: 8d 45 e4 lea -0x1c(%ebp),%eax 110c56: 50 push %eax 110c57: ff 75 08 pushl 0x8(%ebp) 110c5a: e8 31 59 00 00 call 116590 110c5f: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110c61: 83 c4 10 add $0x10,%esp 110c64: 85 ff test %edi,%edi 110c66: 74 5c je 110cc4 *endptr = end; 110c68: 8b 45 e4 mov -0x1c(%ebp),%eax 110c6b: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110c6d: 39 45 08 cmp %eax,0x8(%ebp) 110c70: 74 5a je 110ccc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110c72: 89 d1 mov %edx,%ecx 110c74: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx 110c7a: 89 f0 mov %esi,%eax 110c7c: f7 d0 not %eax 110c7e: 09 c1 or %eax,%ecx 110c80: 74 1a je 110c9c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110c82: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 110c88: 09 f0 or %esi,%eax 110c8a: 74 10 je 110c9c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110c8c: 89 33 mov %esi,(%ebx) 110c8e: 89 53 04 mov %edx,0x4(%ebx) #endif return RTEMS_SUCCESSFUL; 110c91: 31 c0 xor %eax,%eax } 110c93: 8d 65 f4 lea -0xc(%ebp),%esp 110c96: 5b pop %ebx 110c97: 5e pop %esi 110c98: 5f pop %edi 110c99: c9 leave 110c9a: c3 ret 110c9b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110c9c: 89 55 d4 mov %edx,-0x2c(%ebp) 110c9f: e8 f0 2c 00 00 call 113994 <__errno> 110ca4: 83 38 22 cmpl $0x22,(%eax) 110ca7: 8b 55 d4 mov -0x2c(%ebp),%edx 110caa: 75 e0 jne 110c8c return RTEMS_INVALID_NUMBER; 110cac: b8 0a 00 00 00 mov $0xa,%eax 110cb1: eb e0 jmp 110c93 110cb3: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110cb4: 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; } 110cb9: 8d 65 f4 lea -0xc(%ebp),%esp 110cbc: 5b pop %ebx 110cbd: 5e pop %esi 110cbe: 5f pop %edi 110cbf: c9 leave 110cc0: c3 ret 110cc1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ) 110cc4: 8b 45 e4 mov -0x1c(%ebp),%eax 110cc7: eb a4 jmp 110c6d 110cc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110ccc: b8 0b 00 00 00 mov $0xb,%eax 110cd1: eb c0 jmp 110c93 =============================================================================== 00110d70 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110d70: 55 push %ebp 110d71: 89 e5 mov %esp,%ebp 110d73: 57 push %edi 110d74: 56 push %esi 110d75: 53 push %ebx 110d76: 83 ec 2c sub $0x2c,%esp 110d79: 8b 75 08 mov 0x8(%ebp),%esi 110d7c: 8b 5d 0c mov 0xc(%ebp),%ebx 110d7f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110d82: 85 db test %ebx,%ebx 110d84: 74 5a je 110de0 return RTEMS_INVALID_ADDRESS; errno = 0; 110d86: e8 09 2c 00 00 call 113994 <__errno> 110d8b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110d91: 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 ); 110d97: 50 push %eax 110d98: 6a 10 push $0x10 110d9a: 8d 45 e4 lea -0x1c(%ebp),%eax 110d9d: 50 push %eax 110d9e: 56 push %esi 110d9f: e8 98 5c 00 00 call 116a3c 110da4: 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 ) 110da6: 83 c4 10 add $0x10,%esp 110da9: 85 ff test %edi,%edi 110dab: 74 43 je 110df0 *endptr = end; 110dad: 8b 45 e4 mov -0x1c(%ebp),%eax 110db0: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110db2: 39 c6 cmp %eax,%esi 110db4: 74 42 je 110df8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110db6: 83 fa ff cmp $0xffffffff,%edx 110db9: 74 0d je 110dc8 <== NEVER 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; 110dbb: 89 13 mov %edx,(%ebx) #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 110dbd: 31 c0 xor %eax,%eax } 110dbf: 8d 65 f4 lea -0xc(%ebp),%esp 110dc2: 5b pop %ebx 110dc3: 5e pop %esi 110dc4: 5f pop %edi 110dc5: c9 leave 110dc6: c3 ret 110dc7: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110dc8: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 110dcb: e8 c4 2b 00 00 call 113994 <__errno> <== NOT EXECUTED 110dd0: 83 38 22 cmpl $0x22,(%eax) <== NOT EXECUTED 110dd3: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 110dd6: 75 e3 jne 110dbb <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 110dd8: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 110ddd: eb e0 jmp 110dbf <== NOT EXECUTED 110ddf: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110de0: 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; } 110de5: 8d 65 f4 lea -0xc(%ebp),%esp 110de8: 5b pop %ebx 110de9: 5e pop %esi 110dea: 5f pop %edi 110deb: c9 leave 110dec: c3 ret 110ded: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ) 110df0: 8b 45 e4 mov -0x1c(%ebp),%eax 110df3: eb bd jmp 110db2 110df5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110df8: b8 0b 00 00 00 mov $0xb,%eax 110dfd: eb c0 jmp 110dbf =============================================================================== 00110e00 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110e00: 55 push %ebp 110e01: 89 e5 mov %esp,%ebp 110e03: 57 push %edi 110e04: 56 push %esi 110e05: 53 push %ebx 110e06: 83 ec 1c sub $0x1c,%esp 110e09: 8b 75 08 mov 0x8(%ebp),%esi 110e0c: 8b 5d 0c mov 0xc(%ebp),%ebx 110e0f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110e12: 85 db test %ebx,%ebx 110e14: 74 3a je 110e50 return RTEMS_INVALID_ADDRESS; errno = 0; 110e16: e8 79 2b 00 00 call 113994 <__errno> 110e1b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110e21: 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 ); 110e24: 50 push %eax 110e25: ff 75 14 pushl 0x14(%ebp) 110e28: 8d 45 e4 lea -0x1c(%ebp),%eax 110e2b: 50 push %eax 110e2c: 56 push %esi 110e2d: e8 0a 5c 00 00 call 116a3c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110e32: 83 c4 10 add $0x10,%esp 110e35: 85 ff test %edi,%edi 110e37: 74 27 je 110e60 *endptr = end; 110e39: 8b 55 e4 mov -0x1c(%ebp),%edx 110e3c: 89 17 mov %edx,(%edi) /* nothing was converted */ if ( end == s ) 110e3e: 39 d6 cmp %edx,%esi 110e40: 74 26 je 110e68 #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 ); 110e42: 88 03 mov %al,(%ebx) #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 110e44: 31 c0 xor %eax,%eax } 110e46: 8d 65 f4 lea -0xc(%ebp),%esp 110e49: 5b pop %ebx 110e4a: 5e pop %esi 110e4b: 5f pop %edi 110e4c: c9 leave 110e4d: c3 ret 110e4e: 66 90 xchg %ax,%ax <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110e50: 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; } 110e55: 8d 65 f4 lea -0xc(%ebp),%esp 110e58: 5b pop %ebx 110e59: 5e pop %esi 110e5a: 5f pop %edi 110e5b: c9 leave 110e5c: c3 ret 110e5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ) 110e60: 8b 55 e4 mov -0x1c(%ebp),%edx 110e63: eb d9 jmp 110e3e 110e65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110e68: b8 0b 00 00 00 mov $0xb,%eax 110e6d: eb d7 jmp 110e46 =============================================================================== 00110e70 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110e70: 55 push %ebp 110e71: 89 e5 mov %esp,%ebp 110e73: 57 push %edi 110e74: 56 push %esi 110e75: 53 push %ebx 110e76: 83 ec 2c sub $0x2c,%esp 110e79: 8b 75 08 mov 0x8(%ebp),%esi 110e7c: 8b 5d 0c mov 0xc(%ebp),%ebx 110e7f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110e82: 85 db test %ebx,%ebx 110e84: 74 5a je 110ee0 return RTEMS_INVALID_ADDRESS; errno = 0; 110e86: e8 09 2b 00 00 call 113994 <__errno> 110e8b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110e91: 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 ); 110e97: 50 push %eax 110e98: ff 75 14 pushl 0x14(%ebp) 110e9b: 8d 45 e4 lea -0x1c(%ebp),%eax 110e9e: 50 push %eax 110e9f: 56 push %esi 110ea0: e8 97 5b 00 00 call 116a3c 110ea5: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110ea7: 83 c4 10 add $0x10,%esp 110eaa: 85 ff test %edi,%edi 110eac: 74 42 je 110ef0 *endptr = end; 110eae: 8b 45 e4 mov -0x1c(%ebp),%eax 110eb1: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110eb3: 39 c6 cmp %eax,%esi 110eb5: 74 41 je 110ef8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110eb7: 83 fa ff cmp $0xffffffff,%edx 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: 89 13 mov %edx,(%ebx) #endif return RTEMS_SUCCESSFUL; 110ebe: 31 c0 xor %eax,%eax } 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: 89 55 d4 mov %edx,-0x2c(%ebp) 110ecb: e8 c4 2a 00 00 call 113994 <__errno> 110ed0: 83 38 22 cmpl $0x22,(%eax) 110ed3: 8b 55 d4 mov -0x2c(%ebp),%edx 110ed6: 75 e4 jne 110ebc <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 110ed8: b8 0a 00 00 00 mov $0xa,%eax 110edd: eb e1 jmp 110ec0 110edf: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110ee0: 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; } 110ee5: 8d 65 f4 lea -0xc(%ebp),%esp 110ee8: 5b pop %ebx 110ee9: 5e pop %esi 110eea: 5f pop %edi 110eeb: c9 leave 110eec: c3 ret 110eed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ) 110ef0: 8b 45 e4 mov -0x1c(%ebp),%eax 110ef3: eb be jmp 110eb3 110ef5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110ef8: b8 0b 00 00 00 mov $0xb,%eax 110efd: eb c1 jmp 110ec0 =============================================================================== 00110f9c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110f9c: 55 push %ebp 110f9d: 89 e5 mov %esp,%ebp 110f9f: 57 push %edi 110fa0: 56 push %esi 110fa1: 53 push %ebx 110fa2: 83 ec 2c sub $0x2c,%esp 110fa5: 8b 75 08 mov 0x8(%ebp),%esi 110fa8: 8b 5d 0c mov 0xc(%ebp),%ebx 110fab: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110fae: 85 db test %ebx,%ebx 110fb0: 74 5a je 11100c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 110fb2: e8 dd 29 00 00 call 113994 <__errno> 110fb7: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110fbd: 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 ); 110fc3: 50 push %eax 110fc4: ff 75 14 pushl 0x14(%ebp) 110fc7: 8d 45 e4 lea -0x1c(%ebp),%eax 110fca: 50 push %eax 110fcb: 56 push %esi 110fcc: e8 6b 5a 00 00 call 116a3c 110fd1: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110fd3: 83 c4 10 add $0x10,%esp 110fd6: 85 ff test %edi,%edi 110fd8: 74 42 je 11101c <== NEVER TAKEN *endptr = end; 110fda: 8b 45 e4 mov -0x1c(%ebp),%eax 110fdd: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110fdf: 39 c6 cmp %eax,%esi 110fe1: 74 41 je 111024 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110fe3: 83 fa ff cmp $0xffffffff,%edx 110fe6: 74 0c je 110ff4 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110fe8: 89 13 mov %edx,(%ebx) #endif return RTEMS_SUCCESSFUL; 110fea: 31 c0 xor %eax,%eax } 110fec: 8d 65 f4 lea -0xc(%ebp),%esp 110fef: 5b pop %ebx 110ff0: 5e pop %esi 110ff1: 5f pop %edi 110ff2: c9 leave 110ff3: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110ff4: 89 55 d4 mov %edx,-0x2c(%ebp) 110ff7: e8 98 29 00 00 call 113994 <__errno> 110ffc: 83 38 22 cmpl $0x22,(%eax) 110fff: 8b 55 d4 mov -0x2c(%ebp),%edx 111002: 75 e4 jne 110fe8 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 111004: b8 0a 00 00 00 mov $0xa,%eax 111009: eb e1 jmp 110fec 11100b: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 11100c: 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; } 111011: 8d 65 f4 lea -0xc(%ebp),%esp 111014: 5b pop %ebx 111015: 5e pop %esi 111016: 5f pop %edi 111017: c9 leave 111018: c3 ret 111019: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ) 11101c: 8b 45 e4 mov -0x1c(%ebp),%eax 11101f: eb be jmp 110fdf 111021: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 111024: b8 0b 00 00 00 mov $0xb,%eax 111029: eb c1 jmp 110fec =============================================================================== 00110f00 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110f00: 55 push %ebp 110f01: 89 e5 mov %esp,%ebp 110f03: 57 push %edi 110f04: 56 push %esi 110f05: 53 push %ebx 110f06: 83 ec 2c sub $0x2c,%esp 110f09: 8b 5d 0c mov 0xc(%ebp),%ebx 110f0c: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110f0f: 85 db test %ebx,%ebx 110f11: 74 69 je 110f7c return RTEMS_INVALID_ADDRESS; errno = 0; 110f13: e8 7c 2a 00 00 call 113994 <__errno> 110f18: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110f1e: c7 03 00 00 00 00 movl $0x0,(%ebx) 110f24: 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 ); 110f2b: 50 push %eax 110f2c: ff 75 14 pushl 0x14(%ebp) 110f2f: 8d 45 e4 lea -0x1c(%ebp),%eax 110f32: 50 push %eax 110f33: ff 75 08 pushl 0x8(%ebp) 110f36: e8 1d 5b 00 00 call 116a58 110f3b: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110f3d: 83 c4 10 add $0x10,%esp 110f40: 85 ff test %edi,%edi 110f42: 74 48 je 110f8c *endptr = end; 110f44: 8b 45 e4 mov -0x1c(%ebp),%eax 110f47: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110f49: 39 45 08 cmp %eax,0x8(%ebp) 110f4c: 74 46 je 110f94 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110f4e: 89 f0 mov %esi,%eax 110f50: 21 d0 and %edx,%eax 110f52: 40 inc %eax 110f53: 74 0f je 110f64 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110f55: 89 33 mov %esi,(%ebx) 110f57: 89 53 04 mov %edx,0x4(%ebx) #endif return RTEMS_SUCCESSFUL; 110f5a: 31 c0 xor %eax,%eax } 110f5c: 8d 65 f4 lea -0xc(%ebp),%esp 110f5f: 5b pop %ebx 110f60: 5e pop %esi 110f61: 5f pop %edi 110f62: c9 leave 110f63: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110f64: 89 55 d4 mov %edx,-0x2c(%ebp) 110f67: e8 28 2a 00 00 call 113994 <__errno> 110f6c: 83 38 22 cmpl $0x22,(%eax) 110f6f: 8b 55 d4 mov -0x2c(%ebp),%edx 110f72: 75 e1 jne 110f55 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 110f74: b8 0a 00 00 00 mov $0xa,%eax 110f79: eb e1 jmp 110f5c 110f7b: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110f7c: 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; } 110f81: 8d 65 f4 lea -0xc(%ebp),%esp 110f84: 5b pop %ebx 110f85: 5e pop %esi 110f86: 5f pop %edi 110f87: c9 leave 110f88: c3 ret 110f89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ) 110f8c: 8b 45 e4 mov -0x1c(%ebp),%eax 110f8f: eb b8 jmp 110f49 110f91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110f94: b8 0b 00 00 00 mov $0xb,%eax 110f99: eb c1 jmp 110f5c =============================================================================== 00107df4 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 107df4: 55 push %ebp 107df5: 89 e5 mov %esp,%ebp 107df7: 57 push %edi 107df8: 56 push %esi 107df9: 53 push %ebx 107dfa: 81 ec d8 01 00 00 sub $0x1d8,%esp int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 107e00: 31 c0 xor %eax,%eax 107e02: b9 ff ff ff ff mov $0xffffffff,%ecx 107e07: 8b 7d 08 mov 0x8(%ebp),%edi 107e0a: f2 ae repnz scas %es:(%edi),%al 107e0c: f7 d1 not %ecx 107e0e: 49 dec %ecx 107e0f: 6a 00 push $0x0 107e11: 8d 45 d0 lea -0x30(%ebp),%eax 107e14: 89 85 2c fe ff ff mov %eax,-0x1d4(%ebp) 107e1a: 50 push %eax 107e1b: 6a 00 push $0x0 107e1d: 51 push %ecx 107e1e: ff 75 08 pushl 0x8(%ebp) 107e21: e8 9a 0a 00 00 call 1088c0 107e26: 89 85 44 fe ff ff mov %eax,-0x1bc(%ebp) strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 107e2c: 83 c4 20 add $0x20,%esp 107e2f: 85 c0 test %eax,%eax 107e31: 0f 85 61 01 00 00 jne 107f98 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 107e37: 8b 45 dc mov -0x24(%ebp),%eax 107e3a: 3d 60 64 12 00 cmp $0x126460,%eax 107e3f: 0f 85 47 01 00 00 jne 107f8c 107e45: 31 db xor %ebx,%ebx * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 107e47: 8d 45 bc lea -0x44(%ebp),%eax 107e4a: 89 85 30 fe ff ff mov %eax,-0x1d0(%ebp) * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); 107e50: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx 107e56: 89 95 34 fe ff ff mov %edx,-0x1cc(%ebp) 107e5c: eb 15 jmp 107e73 107e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED * IMFS_create_node was ONLY passed a NULL when we created the * root node. We added a new IMFS_create_root_node() so this * path no longer existed. The result was simpler code which * should not have this path. */ else if (linkflag == REGTYPE) { 107e60: 80 bd 53 fe ff ff 30 cmpb $0x30,-0x1ad(%ebp) 107e67: 0f 84 43 01 00 00 je 107fb0 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 107e6d: 8b 9d 54 fe ff ff mov -0x1ac(%ebp),%ebx /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 107e73: 8d 83 00 02 00 00 lea 0x200(%ebx),%eax 107e79: 89 85 54 fe ff ff mov %eax,-0x1ac(%ebp) 107e7f: 8b 55 10 mov 0x10(%ebp),%edx 107e82: 39 d0 cmp %edx,%eax 107e84: 0f 87 18 01 00 00 ja 107fa2 <== NEVER TAKEN break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 107e8a: 03 5d 0c add 0xc(%ebp),%ebx offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 107e8d: 8d b3 01 01 00 00 lea 0x101(%ebx),%esi 107e93: bf a8 64 12 00 mov $0x1264a8,%edi 107e98: b9 05 00 00 00 mov $0x5,%ecx 107e9d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107e9f: 0f 85 fd 00 00 00 jne 107fa2 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 107ea5: 57 push %edi 107ea6: 6a 63 push $0x63 107ea8: 53 push %ebx 107ea9: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax 107eaf: 50 push %eax 107eb0: e8 d7 fd 00 00 call 117c8c filename[MAX_NAME_FIELD_SIZE] = '\0'; 107eb5: c6 45 bb 00 movb $0x0,-0x45(%ebp) linkflag = hdr_ptr[156]; 107eb9: 8a 93 9c 00 00 00 mov 0x9c(%ebx),%dl 107ebf: 88 95 53 fe ff ff mov %dl,-0x1ad(%ebp) file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 107ec5: 59 pop %ecx 107ec6: 5e pop %esi 107ec7: 6a 08 push $0x8 107ec9: 8d 43 64 lea 0x64(%ebx),%eax 107ecc: 50 push %eax 107ecd: e8 9e 7b 00 00 call 10fa70 <_rtems_octal2ulong> 107ed2: 89 85 48 fe ff ff mov %eax,-0x1b8(%ebp) file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 107ed8: 58 pop %eax 107ed9: 5a pop %edx 107eda: 6a 0c push $0xc 107edc: 8d 43 7c lea 0x7c(%ebx),%eax 107edf: 50 push %eax 107ee0: e8 8b 7b 00 00 call 10fa70 <_rtems_octal2ulong> 107ee5: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp) hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 107eeb: 5e pop %esi 107eec: 5f pop %edi 107eed: 6a 08 push $0x8 107eef: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax 107ef5: 50 push %eax 107ef6: e8 75 7b 00 00 call 10fa70 <_rtems_octal2ulong> 107efb: 89 c6 mov %eax,%esi if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 107efd: 89 1c 24 mov %ebx,(%esp) 107f00: e8 3f 80 00 00 call 10ff44 <_rtems_tar_header_checksum> 107f05: 83 c4 10 add $0x10,%esp 107f08: 39 f0 cmp %esi,%eax 107f0a: 0f 85 92 00 00 00 jne 107fa2 <== NEVER TAKEN * Generate an IMFS node depending on the file type. * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { 107f10: 80 bd 53 fe ff ff 35 cmpb $0x35,-0x1ad(%ebp) 107f17: 0f 85 43 ff ff ff jne 107e60 strcpy(full_filename, mountpoint); 107f1d: 83 ec 08 sub $0x8,%esp 107f20: ff 75 08 pushl 0x8(%ebp) 107f23: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax 107f29: 50 push %eax 107f2a: e8 f5 f9 00 00 call 117924 if (full_filename[strlen(full_filename)-1] != '/') 107f2f: 31 c0 xor %eax,%eax 107f31: b9 ff ff ff ff mov $0xffffffff,%ecx 107f36: 8b bd 34 fe ff ff mov -0x1cc(%ebp),%edi 107f3c: f2 ae repnz scas %es:(%edi),%al 107f3e: f7 d1 not %ecx 107f40: 49 dec %ecx 107f41: 83 c4 10 add $0x10,%esp 107f44: 80 bc 0d 57 fe ff ff cmpb $0x2f,-0x1a9(%ebp,%ecx,1) 107f4b: 2f 107f4c: 74 0a je 107f58 <== ALWAYS TAKEN strcat(full_filename, "/"); 107f4e: 66 c7 84 0d 58 fe ff movw $0x2f,-0x1a8(%ebp,%ecx,1) <== NOT EXECUTED 107f55: ff 2f 00 strcat(full_filename, filename); 107f58: 83 ec 08 sub $0x8,%esp 107f5b: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx 107f61: 52 push %edx 107f62: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax 107f68: 50 push %eax 107f69: e8 02 f8 00 00 call 117770 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 107f6e: 5a pop %edx 107f6f: 59 pop %ecx 107f70: 68 ff 01 00 00 push $0x1ff 107f75: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx 107f7b: 52 push %edx 107f7c: e8 fb 10 00 00 call 10907c 107f81: 83 c4 10 add $0x10,%esp 107f84: e9 e4 fe ff ff jmp 107e6d 107f89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 107f8c: 3d e0 6e 12 00 cmp $0x126ee0,%eax 107f91: 0f 84 ae fe ff ff je 107e45 <== NEVER TAKEN 107f97: 90 nop return -1; 107f98: c7 85 44 fe ff ff ff movl $0xffffffff,-0x1bc(%ebp) 107f9f: ff ff ff nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 107fa2: 8b 85 44 fe ff ff mov -0x1bc(%ebp),%eax 107fa8: 8d 65 f4 lea -0xc(%ebp),%esp 107fab: 5b pop %ebx 107fac: 5e pop %esi 107fad: 5f pop %edi 107fae: c9 leave 107faf: c3 ret * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 107fb0: 8b bd 30 fe ff ff mov -0x1d0(%ebp),%edi 107fb6: 8b b5 2c fe ff ff mov -0x1d4(%ebp),%esi 107fbc: b9 05 00 00 00 mov $0x5,%ecx 107fc1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 107fc3: 50 push %eax 107fc4: 8d 45 e4 lea -0x1c(%ebp),%eax 107fc7: 50 push %eax 107fc8: 8d 55 bc lea -0x44(%ebp),%edx 107fcb: 52 push %edx 107fcc: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax 107fd2: 50 push %eax 107fd3: e8 4c 87 00 00 call 110724 107fd8: 83 c4 10 add $0x10,%esp 107fdb: 85 c0 test %eax,%eax 107fdd: 74 1d je 107ffc <== ALWAYS TAKEN ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; 107fdf: 8b 85 4c fe ff ff mov -0x1b4(%ebp),%eax 107fe5: 05 ff 01 00 00 add $0x1ff,%eax offset += 512 * nblocks; 107fea: 25 00 fe ff ff and $0xfffffe00,%eax 107fef: 01 85 54 fe ff ff add %eax,-0x1ac(%ebp) 107ff5: e9 73 fe ff ff jmp 107e6d 107ffa: 66 90 xchg %ax,%ax <== NOT EXECUTED else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 107ffc: 83 ec 0c sub $0xc,%esp 107fff: 6a 00 push $0x0 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 108001: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax 108007: 25 ff 01 00 00 and $0x1ff,%eax else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 10800c: 80 cc 80 or $0x80,%ah 10800f: 50 push %eax 108010: ff 75 e4 pushl -0x1c(%ebp) 108013: 6a 06 push $0x6 108015: 8d 55 bc lea -0x44(%ebp),%edx 108018: 52 push %edx 108019: e8 0e 81 00 00 call 11012c &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 10801e: 8b 95 4c fe ff ff mov -0x1b4(%ebp),%edx 108024: 89 50 50 mov %edx,0x50(%eax) 108027: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.linearfile.direct = &tar_image[offset]; 10802e: 8b 55 0c mov 0xc(%ebp),%edx 108031: 03 95 54 fe ff ff add -0x1ac(%ebp),%edx 108037: 89 50 58 mov %edx,0x58(%eax) 10803a: 83 c4 20 add $0x20,%esp 10803d: eb a0 jmp 107fdf =============================================================================== 0010b82c : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b82c: 55 push %ebp 10b82d: 89 e5 mov %esp,%ebp 10b82f: 57 push %edi 10b830: 56 push %esi 10b831: 53 push %ebx 10b832: 83 ec 1c sub $0x1c,%esp 10b835: 8b 5d 08 mov 0x8(%ebp),%ebx 10b838: 8b 7d 0c mov 0xc(%ebp),%edi 10b83b: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b83e: 85 f6 test %esi,%esi 10b840: 0f 84 3e 01 00 00 je 10b984 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b846: 85 db test %ebx,%ebx 10b848: 0f 84 d2 00 00 00 je 10b920 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b84e: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10b855: 75 17 jne 10b86e */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b857: 85 ff test %edi,%edi 10b859: 0f 84 b1 00 00 00 je 10b910 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10b85f: 0f b6 05 14 22 12 00 movzbl 0x122214,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b866: 39 c7 cmp %eax,%edi 10b868: 0f 87 a2 00 00 00 ja 10b910 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b86e: 83 ec 0c sub $0xc,%esp 10b871: ff 35 84 65 12 00 pushl 0x126584 10b877: e8 b8 06 00 00 call 10bf34 <_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 ); 10b87c: c7 04 24 60 64 12 00 movl $0x126460,(%esp) 10b883: e8 d8 10 00 00 call 10c960 <_Objects_Allocate> 10b888: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b88a: 83 c4 10 add $0x10,%esp 10b88d: 85 c0 test %eax,%eax 10b88f: 0f 84 cf 00 00 00 je 10b964 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b895: 50 push %eax 10b896: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10b897: 8b 45 14 mov 0x14(%ebp),%eax 10b89a: 83 e0 01 and $0x1,%eax 10b89d: 50 push %eax 10b89e: 6a 00 push $0x0 10b8a0: 31 c0 xor %eax,%eax 10b8a2: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10b8a9: 0f 95 c0 setne %al 10b8ac: 50 push %eax 10b8ad: 31 c0 xor %eax,%eax 10b8af: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10b8b6: 0f 94 c0 sete %al 10b8b9: 50 push %eax 10b8ba: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10b8bb: 8b 45 18 mov 0x18(%ebp),%eax 10b8be: 83 e0 01 and $0x1,%eax 10b8c1: 50 push %eax 10b8c2: ff 75 10 pushl 0x10(%ebp) 10b8c5: 6a 00 push $0x0 10b8c7: 52 push %edx 10b8c8: 68 60 64 12 00 push $0x126460 10b8cd: 89 55 e4 mov %edx,-0x1c(%ebp) 10b8d0: e8 6b 1e 00 00 call 10d740 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b8d5: 83 c4 30 add $0x30,%esp 10b8d8: 84 c0 test %al,%al 10b8da: 8b 55 e4 mov -0x1c(%ebp),%edx 10b8dd: 74 51 je 10b930 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10b8df: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax * id - thread id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_task_create( 10b8e5: f7 45 14 00 04 00 00 testl $0x400,0x14(%ebp) } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10b8ec: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10b8f0: 8b 42 08 mov 0x8(%edx),%eax 10b8f3: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b8f5: 83 ec 0c sub $0xc,%esp 10b8f8: ff 35 84 65 12 00 pushl 0x126584 10b8fe: e8 79 06 00 00 call 10bf7c <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10b903: 83 c4 10 add $0x10,%esp 10b906: 31 c0 xor %eax,%eax } 10b908: 8d 65 f4 lea -0xc(%ebp),%esp 10b90b: 5b pop %ebx 10b90c: 5e pop %esi 10b90d: 5f pop %edi 10b90e: c9 leave 10b90f: c3 ret * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) return RTEMS_INVALID_PRIORITY; 10b910: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b915: 8d 65 f4 lea -0xc(%ebp),%esp 10b918: 5b pop %ebx 10b919: 5e pop %esi 10b91a: 5f pop %edi 10b91b: c9 leave 10b91c: c3 ret 10b91d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b920: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b925: 8d 65 f4 lea -0xc(%ebp),%esp 10b928: 5b pop %ebx 10b929: 5e pop %esi 10b92a: 5f pop %edi 10b92b: c9 leave 10b92c: c3 ret 10b92d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b930: 83 ec 0c sub $0xc,%esp 10b933: ff 72 08 pushl 0x8(%edx) 10b936: e8 0d 14 00 00 call 10cd48 <_Objects_Get_information_id> 10b93b: 5a pop %edx 10b93c: 59 pop %ecx 10b93d: 8b 55 e4 mov -0x1c(%ebp),%edx 10b940: 52 push %edx 10b941: 50 push %eax 10b942: e8 91 13 00 00 call 10ccd8 <_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(); 10b947: 58 pop %eax 10b948: ff 35 84 65 12 00 pushl 0x126584 10b94e: e8 29 06 00 00 call 10bf7c <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10b953: 83 c4 10 add $0x10,%esp 10b956: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b95b: 8d 65 f4 lea -0xc(%ebp),%esp 10b95e: 5b pop %ebx 10b95f: 5e pop %esi 10b960: 5f pop %edi 10b961: c9 leave 10b962: c3 ret 10b963: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b964: 83 ec 0c sub $0xc,%esp 10b967: ff 35 84 65 12 00 pushl 0x126584 10b96d: e8 0a 06 00 00 call 10bf7c <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10b972: 83 c4 10 add $0x10,%esp 10b975: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b97a: 8d 65 f4 lea -0xc(%ebp),%esp 10b97d: 5b pop %ebx 10b97e: 5e pop %esi 10b97f: 5f pop %edi 10b980: c9 leave 10b981: c3 ret 10b982: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b984: b8 09 00 00 00 mov $0x9,%eax 10b989: eb 8a jmp 10b915 =============================================================================== 0010b98c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b98c: 55 push %ebp 10b98d: 89 e5 mov %esp,%ebp 10b98f: 53 push %ebx 10b990: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b993: ff 35 84 65 12 00 pushl 0x126584 10b999: e8 96 05 00 00 call 10bf34 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10b99e: 5a pop %edx 10b99f: 59 pop %ecx 10b9a0: 8d 45 f4 lea -0xc(%ebp),%eax 10b9a3: 50 push %eax 10b9a4: ff 75 08 pushl 0x8(%ebp) 10b9a7: e8 20 1d 00 00 call 10d6cc <_Thread_Get> 10b9ac: 89 c3 mov %eax,%ebx switch ( location ) { 10b9ae: 83 c4 10 add $0x10,%esp 10b9b1: 8b 45 f4 mov -0xc(%ebp),%eax 10b9b4: 85 c0 test %eax,%eax 10b9b6: 75 44 jne 10b9fc case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10b9b8: 83 ec 0c sub $0xc,%esp 10b9bb: ff 73 08 pushl 0x8(%ebx) 10b9be: e8 85 13 00 00 call 10cd48 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10b9c3: 5a pop %edx 10b9c4: 59 pop %ecx 10b9c5: 53 push %ebx 10b9c6: 50 push %eax 10b9c7: e8 ac 19 00 00 call 10d378 <_Thread_Close> 10b9cc: 58 pop %eax 10b9cd: ff 73 08 pushl 0x8(%ebx) 10b9d0: e8 73 13 00 00 call 10cd48 <_Objects_Get_information_id> 10b9d5: 5a pop %edx 10b9d6: 59 pop %ecx 10b9d7: 53 push %ebx 10b9d8: 50 push %eax 10b9d9: e8 fa 12 00 00 call 10ccd8 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b9de: 58 pop %eax 10b9df: ff 35 84 65 12 00 pushl 0x126584 10b9e5: e8 92 05 00 00 call 10bf7c <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10b9ea: e8 b9 1c 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b9ef: 83 c4 10 add $0x10,%esp 10b9f2: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10b9f4: 8b 5d fc mov -0x4(%ebp),%ebx 10b9f7: c9 leave 10b9f8: c3 ret 10b9f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10b9fc: 83 ec 0c sub $0xc,%esp 10b9ff: ff 35 84 65 12 00 pushl 0x126584 10ba05: e8 72 05 00 00 call 10bf7c <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10ba0a: 83 c4 10 add $0x10,%esp 10ba0d: b8 04 00 00 00 mov $0x4,%eax } 10ba12: 8b 5d fc mov -0x4(%ebp),%ebx 10ba15: c9 leave 10ba16: c3 ret =============================================================================== 0010d4b0 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d4b0: 55 push %ebp 10d4b1: 89 e5 mov %esp,%ebp 10d4b3: 56 push %esi 10d4b4: 53 push %ebx 10d4b5: 83 ec 10 sub $0x10,%esp 10d4b8: 8b 45 08 mov 0x8(%ebp),%eax 10d4bb: 8b 75 0c mov 0xc(%ebp),%esi 10d4be: 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() ) 10d4c1: 80 3d e4 61 12 00 00 cmpb $0x0,0x1261e4 10d4c8: 74 6e je 10d538 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d4ca: 85 db test %ebx,%ebx 10d4cc: 74 7e je 10d54c <== NEVER TAKEN /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d4ce: 83 fe 0f cmp $0xf,%esi 10d4d1: 77 3d ja 10d510 <== NEVER TAKEN /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d4d3: 85 c0 test %eax,%eax 10d4d5: 74 45 je 10d51c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d4d7: 8b 15 d8 ad 12 00 mov 0x12add8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d4dd: 3b 42 08 cmp 0x8(%edx),%eax 10d4e0: 74 40 je 10d522 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d4e2: 83 ec 08 sub $0x8,%esp 10d4e5: 8d 55 f4 lea -0xc(%ebp),%edx 10d4e8: 52 push %edx 10d4e9: 50 push %eax 10d4ea: e8 11 20 00 00 call 10f500 <_Thread_Get> switch ( location ) { 10d4ef: 83 c4 10 add $0x10,%esp 10d4f2: 8b 55 f4 mov -0xc(%ebp),%edx 10d4f5: 85 d2 test %edx,%edx 10d4f7: 75 4b jne 10d544 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d4f9: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d4ff: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d503: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d505: e8 d2 1f 00 00 call 10f4dc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d50a: 31 c0 xor %eax,%eax 10d50c: eb 07 jmp 10d515 10d50e: 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 ) return RTEMS_INVALID_NUMBER; 10d510: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d515: 8d 65 f8 lea -0x8(%ebp),%esp 10d518: 5b pop %ebx 10d519: 5e pop %esi 10d51a: c9 leave 10d51b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d51c: 8b 15 d8 ad 12 00 mov 0x12add8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d522: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d528: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d52c: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10d52e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d530: 8d 65 f8 lea -0x8(%ebp),%esp 10d533: 5b pop %ebx 10d534: 5e pop %esi 10d535: c9 leave 10d536: c3 ret 10d537: 90 nop <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d538: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d53d: 8d 65 f8 lea -0x8(%ebp),%esp 10d540: 5b pop %ebx 10d541: 5e pop %esi 10d542: c9 leave 10d543: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d544: b8 04 00 00 00 mov $0x4,%eax 10d549: eb ca jmp 10d515 10d54b: 90 nop <== NOT EXECUTED if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10d54c: b8 09 00 00 00 mov $0x9,%eax 10d551: eb c2 jmp 10d515 =============================================================================== 0010ba18 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10ba18: 55 push %ebp 10ba19: 89 e5 mov %esp,%ebp 10ba1b: 83 ec 08 sub $0x8,%esp 10ba1e: 8b 55 08 mov 0x8(%ebp),%edx 10ba21: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10ba24: 85 c0 test %eax,%eax 10ba26: 74 30 je 10ba58 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10ba28: 85 d2 test %edx,%edx 10ba2a: 75 10 jne 10ba3c *id = _Thread_Executing->Object.id; 10ba2c: 8b 15 98 6a 12 00 mov 0x126a98,%edx 10ba32: 8b 52 08 mov 0x8(%edx),%edx 10ba35: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10ba37: 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 ]; } 10ba39: c9 leave 10ba3a: c3 ret 10ba3b: 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 ); 10ba3c: 50 push %eax 10ba3d: ff 75 0c pushl 0xc(%ebp) 10ba40: 52 push %edx 10ba41: 68 60 64 12 00 push $0x126460 10ba46: e8 51 15 00 00 call 10cf9c <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10ba4b: 8b 04 85 cc 0b 12 00 mov 0x120bcc(,%eax,4),%eax 10ba52: 83 c4 10 add $0x10,%esp } 10ba55: c9 leave 10ba56: c3 ret 10ba57: 90 nop <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; if ( !id ) return RTEMS_INVALID_ADDRESS; 10ba58: b8 09 00 00 00 mov $0x9,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10ba5d: c9 leave 10ba5e: c3 ret =============================================================================== 00118120 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 118120: 55 push %ebp 118121: 89 e5 mov %esp,%ebp 118123: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118126: 8d 45 f4 lea -0xc(%ebp),%eax 118129: 50 push %eax 11812a: ff 75 08 pushl 0x8(%ebp) 11812d: e8 02 3a 00 00 call 11bb34 <_Thread_Get> switch ( location ) { 118132: 83 c4 10 add $0x10,%esp 118135: 8b 55 f4 mov -0xc(%ebp),%edx 118138: 85 d2 test %edx,%edx 11813a: 74 08 je 118144 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11813c: b8 04 00 00 00 mov $0x4,%eax } 118141: c9 leave 118142: c3 ret 118143: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118144: f6 40 10 02 testb $0x2,0x10(%eax) 118148: 74 0e je 118158 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11814a: e8 c1 39 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11814f: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118154: c9 leave 118155: c3 ret 118156: 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(); 118158: e8 b3 39 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11815d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11815f: c9 leave 118160: c3 ret =============================================================================== 00112e18 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 112e18: 55 push %ebp 112e19: 89 e5 mov %esp,%ebp 112e1b: 57 push %edi 112e1c: 56 push %esi 112e1d: 53 push %ebx 112e1e: 83 ec 1c sub $0x1c,%esp 112e21: 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 ) 112e24: 85 c9 test %ecx,%ecx 112e26: 0f 84 40 01 00 00 je 112f6c return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 112e2c: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 112e32: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 112e38: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 112e3c: 19 f6 sbb %esi,%esi 112e3e: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 112e44: 8b 53 7c mov 0x7c(%ebx),%edx 112e47: 85 d2 test %edx,%edx 112e49: 0f 85 f1 00 00 00 jne 112f40 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 112e4f: 80 7f 08 01 cmpb $0x1,0x8(%edi) 112e53: 19 d2 sbb %edx,%edx 112e55: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 112e5b: 89 55 e4 mov %edx,-0x1c(%ebp) 112e5e: 89 4d e0 mov %ecx,-0x20(%ebp) 112e61: e8 26 be ff ff call 10ec8c <_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; 112e66: 8b 55 e4 mov -0x1c(%ebp),%edx 112e69: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 112e6b: 09 f0 or %esi,%eax 112e6d: 8b 4d e0 mov -0x20(%ebp),%ecx 112e70: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 112e72: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 112e79: 74 0b je 112e86 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 112e7b: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 112e82: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 112e86: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 112e8d: 74 1c je 112eab if ( _Modes_Is_timeslice(mode_set) ) { 112e8f: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 112e96: 0f 84 b8 00 00 00 je 112f54 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 112e9c: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 112ea3: a1 a4 64 12 00 mov 0x1264a4,%eax 112ea8: 89 43 78 mov %eax,0x78(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112eab: f6 45 0c 01 testb $0x1,0xc(%ebp) 112eaf: 74 0b je 112ebc */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 112eb1: f6 45 08 01 testb $0x1,0x8(%ebp) 112eb5: 0f 84 91 00 00 00 je 112f4c 112ebb: fa cli * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 112ebc: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 112ec3: 74 3f je 112f04 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 112ec5: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 112ecc: 0f 94 c0 sete %al is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 112ecf: 38 47 08 cmp %al,0x8(%edi) 112ed2: 74 30 je 112f04 asr->is_enabled = is_asr_enabled; 112ed4: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 112ed7: 9c pushf 112ed8: fa cli 112ed9: 58 pop %eax _signals = information->signals_pending; 112eda: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 112edd: 8b 4f 14 mov 0x14(%edi),%ecx 112ee0: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 112ee3: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 112ee6: 50 push %eax 112ee7: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 112ee8: 8b 47 14 mov 0x14(%edi),%eax 112eeb: 85 c0 test %eax,%eax 112eed: 0f 95 c0 setne %al needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 112ef0: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 112ef7: 74 16 je 112f0f <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 112ef9: 31 c0 xor %eax,%eax } 112efb: 83 c4 1c add $0x1c,%esp 112efe: 5b pop %ebx 112eff: 5e pop %esi 112f00: 5f pop %edi 112f01: c9 leave 112f02: c3 ret 112f03: 90 nop <== NOT EXECUTED /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 112f04: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 112f06: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 112f0d: 75 ea jne 112ef9 <== NEVER TAKEN bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 112f0f: 8b 15 98 6a 12 00 mov 0x126a98,%edx if ( are_signals_pending || 112f15: 84 c0 test %al,%al 112f17: 75 0e jne 112f27 112f19: 3b 15 9c 6a 12 00 cmp 0x126a9c,%edx 112f1f: 74 d8 je 112ef9 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 112f21: 80 7a 74 00 cmpb $0x0,0x74(%edx) 112f25: 74 d2 je 112ef9 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 112f27: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 112f2e: e8 fd a5 ff ff call 10d530 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 112f33: 31 c0 xor %eax,%eax } 112f35: 83 c4 1c add $0x1c,%esp 112f38: 5b pop %ebx 112f39: 5e pop %esi 112f3a: 5f pop %edi 112f3b: c9 leave 112f3c: c3 ret 112f3d: 8d 76 00 lea 0x0(%esi),%esi <== 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; 112f40: 81 ce 00 02 00 00 or $0x200,%esi 112f46: e9 04 ff ff ff jmp 112e4f 112f4b: 90 nop <== NOT EXECUTED 112f4c: fb sti 112f4d: e9 6a ff ff ff jmp 112ebc 112f52: 66 90 xchg %ax,%ax <== 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; 112f54: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112f5b: f6 45 0c 01 testb $0x1,0xc(%ebp) 112f5f: 0f 84 57 ff ff ff je 112ebc 112f65: e9 47 ff ff ff jmp 112eb1 112f6a: 66 90 xchg %ax,%ax <== NOT EXECUTED bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 112f6c: b8 09 00 00 00 mov $0x9,%eax if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } 112f71: 83 c4 1c add $0x1c,%esp 112f74: 5b pop %ebx 112f75: 5e pop %esi 112f76: 5f pop %edi 112f77: c9 leave 112f78: c3 ret =============================================================================== 0010c4f4 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c4f4: 55 push %ebp 10c4f5: 89 e5 mov %esp,%ebp 10c4f7: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c4fa: 8d 45 f4 lea -0xc(%ebp),%eax 10c4fd: 50 push %eax 10c4fe: ff 75 08 pushl 0x8(%ebp) 10c501: e8 fe 1c 00 00 call 10e204 <_Thread_Get> switch ( location ) { 10c506: 83 c4 10 add $0x10,%esp 10c509: 8b 4d f4 mov -0xc(%ebp),%ecx 10c50c: 85 c9 test %ecx,%ecx 10c50e: 75 20 jne 10c530 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c510: 52 push %edx 10c511: ff 75 0c pushl 0xc(%ebp) 10c514: 6a 00 push $0x0 10c516: 50 push %eax 10c517: e8 34 25 00 00 call 10ea50 <_Thread_Restart> 10c51c: 83 c4 10 add $0x10,%esp 10c51f: 84 c0 test %al,%al 10c521: 75 15 jne 10c538 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c523: e8 b8 1c 00 00 call 10e1e0 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10c528: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c52d: c9 leave 10c52e: c3 ret 10c52f: 90 nop <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c530: b8 04 00 00 00 mov $0x4,%eax } 10c535: c9 leave 10c536: c3 ret 10c537: 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(); 10c538: e8 a3 1c 00 00 call 10e1e0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c53d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c53f: c9 leave 10c540: c3 ret =============================================================================== 0010ec98 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10ec98: 55 push %ebp 10ec99: 89 e5 mov %esp,%ebp 10ec9b: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ec9e: 8d 45 f4 lea -0xc(%ebp),%eax 10eca1: 50 push %eax 10eca2: ff 75 08 pushl 0x8(%ebp) 10eca5: e8 36 1d 00 00 call 1109e0 <_Thread_Get> switch ( location ) { 10ecaa: 83 c4 10 add $0x10,%esp 10ecad: 8b 55 f4 mov -0xc(%ebp),%edx 10ecb0: 85 d2 test %edx,%edx 10ecb2: 74 08 je 10ecbc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ecb4: b8 04 00 00 00 mov $0x4,%eax } 10ecb9: c9 leave 10ecba: c3 ret 10ecbb: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10ecbc: f6 40 10 02 testb $0x2,0x10(%eax) 10ecc0: 75 0e jne 10ecd0 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ecc2: e8 f5 1c 00 00 call 1109bc <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10ecc7: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10eccc: c9 leave 10eccd: c3 ret 10ecce: 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 ); 10ecd0: 83 ec 08 sub $0x8,%esp 10ecd3: 6a 01 push $0x1 10ecd5: 50 push %eax 10ecd6: e8 51 25 00 00 call 11122c <_Thread_Resume> _Thread_Enable_dispatch(); 10ecdb: e8 dc 1c 00 00 call 1109bc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ece0: 83 c4 10 add $0x10,%esp 10ece3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ece5: c9 leave 10ece6: c3 ret =============================================================================== 0010d628 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d628: 55 push %ebp 10d629: 89 e5 mov %esp,%ebp 10d62b: 56 push %esi 10d62c: 53 push %ebx 10d62d: 83 ec 10 sub $0x10,%esp 10d630: 8b 45 08 mov 0x8(%ebp),%eax 10d633: 8b 5d 0c mov 0xc(%ebp),%ebx 10d636: 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() ) 10d639: 80 3d e4 61 12 00 00 cmpb $0x0,0x1261e4 10d640: 74 66 je 10d6a8 /* * 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 ) 10d642: 83 fb 0f cmp $0xf,%ebx 10d645: 77 39 ja 10d680 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d647: 85 c0 test %eax,%eax 10d649: 74 41 je 10d68c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d64b: 8b 15 d8 ad 12 00 mov 0x12add8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d651: 3b 42 08 cmp 0x8(%edx),%eax 10d654: 74 3c je 10d692 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d656: 83 ec 08 sub $0x8,%esp 10d659: 8d 55 f4 lea -0xc(%ebp),%edx 10d65c: 52 push %edx 10d65d: 50 push %eax 10d65e: e8 9d 1e 00 00 call 10f500 <_Thread_Get> switch ( location ) { 10d663: 83 c4 10 add $0x10,%esp 10d666: 8b 55 f4 mov -0xc(%ebp),%edx 10d669: 85 d2 test %edx,%edx 10d66b: 75 47 jne 10d6b4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d66d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d673: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d677: e8 60 1e 00 00 call 10f4dc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d67c: 31 c0 xor %eax,%eax 10d67e: eb 05 jmp 10d685 * 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 ) return RTEMS_INVALID_NUMBER; 10d680: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d685: 8d 65 f8 lea -0x8(%ebp),%esp 10d688: 5b pop %ebx 10d689: 5e pop %esi 10d68a: c9 leave 10d68b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d68c: 8b 15 d8 ad 12 00 mov 0x12add8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d692: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d698: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10d69c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d69e: 8d 65 f8 lea -0x8(%ebp),%esp 10d6a1: 5b pop %ebx 10d6a2: 5e pop %esi 10d6a3: c9 leave 10d6a4: c3 ret 10d6a5: 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() ) return RTEMS_NOT_CONFIGURED; 10d6a8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d6ad: 8d 65 f8 lea -0x8(%ebp),%esp 10d6b0: 5b pop %ebx 10d6b1: 5e pop %esi 10d6b2: c9 leave 10d6b3: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d6b4: b8 04 00 00 00 mov $0x4,%eax } 10d6b9: 8d 65 f8 lea -0x8(%ebp),%esp 10d6bc: 5b pop %ebx 10d6bd: 5e pop %esi 10d6be: c9 leave 10d6bf: c3 ret =============================================================================== 0010f96c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10f96c: 55 push %ebp 10f96d: 89 e5 mov %esp,%ebp 10f96f: 56 push %esi 10f970: 53 push %ebx 10f971: 83 ec 10 sub $0x10,%esp 10f974: 8b 5d 0c mov 0xc(%ebp),%ebx 10f977: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10f97a: 85 db test %ebx,%ebx 10f97c: 74 0b je 10f989 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10f97e: 0f b6 05 14 62 12 00 movzbl 0x126214,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10f985: 39 c3 cmp %eax,%ebx 10f987: 77 5f ja 10f9e8 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10f989: 85 f6 test %esi,%esi 10f98b: 74 67 je 10f9f4 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10f98d: 83 ec 08 sub $0x8,%esp 10f990: 8d 45 f4 lea -0xc(%ebp),%eax 10f993: 50 push %eax 10f994: ff 75 08 pushl 0x8(%ebp) 10f997: e8 94 1e 00 00 call 111830 <_Thread_Get> switch ( location ) { 10f99c: 83 c4 10 add $0x10,%esp 10f99f: 8b 55 f4 mov -0xc(%ebp),%edx 10f9a2: 85 d2 test %edx,%edx 10f9a4: 75 36 jne 10f9dc case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10f9a6: 8b 50 14 mov 0x14(%eax),%edx 10f9a9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10f9ab: 85 db test %ebx,%ebx 10f9ad: 74 1c je 10f9cb the_thread->real_priority = new_priority; 10f9af: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10f9b2: 8b 48 1c mov 0x1c(%eax),%ecx 10f9b5: 85 c9 test %ecx,%ecx 10f9b7: 74 05 je 10f9be 10f9b9: 3b 58 14 cmp 0x14(%eax),%ebx 10f9bc: 73 0d jae 10f9cb <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10f9be: 52 push %edx 10f9bf: 6a 00 push $0x0 10f9c1: 53 push %ebx 10f9c2: 50 push %eax 10f9c3: e8 40 19 00 00 call 111308 <_Thread_Change_priority> 10f9c8: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10f9cb: e8 3c 1e 00 00 call 11180c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10f9d0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9d2: 8d 65 f8 lea -0x8(%ebp),%esp 10f9d5: 5b pop %ebx 10f9d6: 5e pop %esi 10f9d7: c9 leave 10f9d8: c3 ret 10f9d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10f9dc: b8 04 00 00 00 mov $0x4,%eax } 10f9e1: 8d 65 f8 lea -0x8(%ebp),%esp 10f9e4: 5b pop %ebx 10f9e5: 5e pop %esi 10f9e6: c9 leave 10f9e7: c3 ret register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 10f9e8: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9ed: 8d 65 f8 lea -0x8(%ebp),%esp 10f9f0: 5b pop %ebx 10f9f1: 5e pop %esi 10f9f2: c9 leave 10f9f3: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 10f9f4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9f9: 8d 65 f8 lea -0x8(%ebp),%esp 10f9fc: 5b pop %ebx 10f9fd: 5e pop %esi 10f9fe: c9 leave 10f9ff: c3 ret =============================================================================== 0010bad4 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10bad4: 55 push %ebp 10bad5: 89 e5 mov %esp,%ebp 10bad7: 53 push %ebx 10bad8: 83 ec 14 sub $0x14,%esp 10badb: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10bade: 85 db test %ebx,%ebx 10bae0: 74 4e je 10bb30 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10bae2: 83 ec 08 sub $0x8,%esp 10bae5: 8d 45 f4 lea -0xc(%ebp),%eax 10bae8: 50 push %eax 10bae9: ff 75 08 pushl 0x8(%ebp) 10baec: e8 db 1b 00 00 call 10d6cc <_Thread_Get> switch ( location ) { 10baf1: 83 c4 10 add $0x10,%esp 10baf4: 8b 55 f4 mov -0xc(%ebp),%edx 10baf7: 85 d2 test %edx,%edx 10baf9: 75 29 jne 10bb24 case OBJECTS_LOCAL: if ( _Thread_Start( 10bafb: 83 ec 0c sub $0xc,%esp 10bafe: ff 75 10 pushl 0x10(%ebp) 10bb01: 6a 00 push $0x0 10bb03: 53 push %ebx 10bb04: 6a 00 push $0x0 10bb06: 50 push %eax 10bb07: e8 cc 26 00 00 call 10e1d8 <_Thread_Start> 10bb0c: 83 c4 20 add $0x20,%esp 10bb0f: 84 c0 test %al,%al 10bb11: 75 29 jne 10bb3c the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10bb13: e8 90 1b 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10bb18: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb1d: 8b 5d fc mov -0x4(%ebp),%ebx 10bb20: c9 leave 10bb21: c3 ret 10bb22: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bb24: b8 04 00 00 00 mov $0x4,%eax } 10bb29: 8b 5d fc mov -0x4(%ebp),%ebx 10bb2c: c9 leave 10bb2d: c3 ret 10bb2e: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10bb30: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb35: 8b 5d fc mov -0x4(%ebp),%ebx 10bb38: c9 leave 10bb39: c3 ret 10bb3a: 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(); 10bb3c: e8 67 1b 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bb41: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb43: 8b 5d fc mov -0x4(%ebp),%ebx 10bb46: c9 leave 10bb47: c3 ret =============================================================================== 00110e6c : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 110e6c: 55 push %ebp 110e6d: 89 e5 mov %esp,%ebp 110e6f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 110e72: 8d 45 f4 lea -0xc(%ebp),%eax 110e75: 50 push %eax 110e76: ff 75 08 pushl 0x8(%ebp) 110e79: e8 4e c8 ff ff call 10d6cc <_Thread_Get> switch ( location ) { 110e7e: 83 c4 10 add $0x10,%esp 110e81: 8b 55 f4 mov -0xc(%ebp),%edx 110e84: 85 d2 test %edx,%edx 110e86: 74 08 je 110e90 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 110e88: b8 04 00 00 00 mov $0x4,%eax } 110e8d: c9 leave 110e8e: c3 ret 110e8f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 110e90: f6 40 10 02 testb $0x2,0x10(%eax) 110e94: 74 0e je 110ea4 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 110e96: e8 0d c8 ff ff call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 110e9b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110ea0: c9 leave 110ea1: c3 ret 110ea2: 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 ); 110ea4: 83 ec 0c sub $0xc,%esp 110ea7: 50 push %eax 110ea8: e8 9b 09 00 00 call 111848 <_Thread_Suspend> _Thread_Enable_dispatch(); 110ead: e8 f6 c7 ff ff call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 110eb2: 83 c4 10 add $0x10,%esp 110eb5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110eb7: c9 leave 110eb8: c3 ret =============================================================================== 0010c618 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c618: 55 push %ebp 10c619: 89 e5 mov %esp,%ebp 10c61b: 57 push %edi 10c61c: 56 push %esi 10c61d: 53 push %ebx 10c61e: 83 ec 1c sub $0x1c,%esp 10c621: 8b 5d 0c mov 0xc(%ebp),%ebx 10c624: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c627: 85 db test %ebx,%ebx 10c629: 0f 84 9d 00 00 00 je 10c6cc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c62f: 83 ec 08 sub $0x8,%esp 10c632: 8d 45 e4 lea -0x1c(%ebp),%eax 10c635: 50 push %eax 10c636: ff 75 08 pushl 0x8(%ebp) 10c639: e8 86 1d 00 00 call 10e3c4 <_Thread_Get> 10c63e: 89 c6 mov %eax,%esi switch (location) { 10c640: 83 c4 10 add $0x10,%esp 10c643: 8b 45 e4 mov -0x1c(%ebp),%eax 10c646: 85 c0 test %eax,%eax 10c648: 74 0e je 10c658 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c64a: b8 04 00 00 00 mov $0x4,%eax } 10c64f: 8d 65 f4 lea -0xc(%ebp),%esp 10c652: 5b pop %ebx 10c653: 5e pop %esi 10c654: 5f pop %edi 10c655: c9 leave 10c656: c3 ret 10c657: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10c658: 8b 86 00 01 00 00 mov 0x100(%esi),%eax while (tvp) { 10c65e: 85 c0 test %eax,%eax 10c660: 75 44 jne 10c6a6 10c662: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10c664: 83 ec 0c sub $0xc,%esp 10c667: 6a 14 push $0x14 10c669: e8 0e 2f 00 00 call 10f57c <_Workspace_Allocate> if (new == NULL) { 10c66e: 83 c4 10 add $0x10,%esp 10c671: 85 c0 test %eax,%eax 10c673: 74 4b je 10c6c0 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10c675: 8b 13 mov (%ebx),%edx 10c677: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10c67a: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10c67d: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10c680: 8b 96 00 01 00 00 mov 0x100(%esi),%edx 10c686: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10c688: 89 86 00 01 00 00 mov %eax,0x100(%esi) _Thread_Enable_dispatch(); 10c68e: e8 0d 1d 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c693: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c695: 8d 65 f4 lea -0xc(%ebp),%esp 10c698: 5b pop %ebx 10c699: 5e pop %esi 10c69a: 5f pop %edi 10c69b: c9 leave 10c69c: c3 ret 10c69d: 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; 10c6a0: 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) { 10c6a2: 85 c0 test %eax,%eax 10c6a4: 74 be je 10c664 if (tvp->ptr == ptr) { 10c6a6: 39 58 04 cmp %ebx,0x4(%eax) 10c6a9: 75 f5 jne 10c6a0 tvp->dtor = dtor; 10c6ab: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10c6ae: e8 ed 1c 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c6b3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6b5: 8d 65 f4 lea -0xc(%ebp),%esp 10c6b8: 5b pop %ebx 10c6b9: 5e pop %esi 10c6ba: 5f pop %edi 10c6bb: c9 leave 10c6bc: c3 ret 10c6bd: 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(); 10c6c0: e8 db 1c 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10c6c5: b8 1a 00 00 00 mov $0x1a,%eax 10c6ca: eb 83 jmp 10c64f Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c6cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c6d4: 5b pop %ebx 10c6d5: 5e pop %esi 10c6d6: 5f pop %edi 10c6d7: c9 leave 10c6d8: c3 ret =============================================================================== 0010c6dc : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10c6dc: 55 push %ebp 10c6dd: 89 e5 mov %esp,%ebp 10c6df: 53 push %ebx 10c6e0: 83 ec 14 sub $0x14,%esp 10c6e3: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10c6e6: 85 db test %ebx,%ebx 10c6e8: 74 76 je 10c760 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10c6ea: 83 ec 08 sub $0x8,%esp 10c6ed: 8d 45 f4 lea -0xc(%ebp),%eax 10c6f0: 50 push %eax 10c6f1: ff 75 08 pushl 0x8(%ebp) 10c6f4: e8 cb 1c 00 00 call 10e3c4 <_Thread_Get> switch (location) { 10c6f9: 83 c4 10 add $0x10,%esp 10c6fc: 8b 55 f4 mov -0xc(%ebp),%edx 10c6ff: 85 d2 test %edx,%edx 10c701: 74 0d je 10c710 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c703: b8 04 00 00 00 mov $0x4,%eax } 10c708: 8b 5d fc mov -0x4(%ebp),%ebx 10c70b: c9 leave 10c70c: c3 ret 10c70d: 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; 10c710: 8b 88 00 01 00 00 mov 0x100(%eax),%ecx while (tvp) { 10c716: 85 c9 test %ecx,%ecx 10c718: 74 17 je 10c731 if (tvp->ptr == ptr) { 10c71a: 39 59 04 cmp %ebx,0x4(%ecx) 10c71d: 75 0c jne 10c72b 10c71f: eb 49 jmp 10c76a 10c721: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c724: 39 5a 04 cmp %ebx,0x4(%edx) 10c727: 74 17 je 10c740 10c729: 89 d1 mov %edx,%ecx _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10c72b: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10c72d: 85 d2 test %edx,%edx 10c72f: 75 f3 jne 10c724 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c731: e8 6a 1c 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c736: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c73b: 8b 5d fc mov -0x4(%ebp),%ebx 10c73e: c9 leave 10c73f: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10c740: 8b 1a mov (%edx),%ebx 10c742: 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 ); 10c744: 83 ec 08 sub $0x8,%esp 10c747: 52 push %edx 10c748: 50 push %eax 10c749: e8 b2 00 00 00 call 10c800 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10c74e: e8 4d 1c 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c753: 83 c4 10 add $0x10,%esp 10c756: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c758: 8b 5d fc mov -0x4(%ebp),%ebx 10c75b: c9 leave 10c75c: c3 ret 10c75d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c760: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c765: 8b 5d fc mov -0x4(%ebp),%ebx 10c768: c9 leave 10c769: 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; 10c76a: 8b 11 mov (%ecx),%edx 10c76c: 89 90 00 01 00 00 mov %edx,0x100(%eax) 10c772: 89 ca mov %ecx,%edx 10c774: eb ce jmp 10c744 =============================================================================== 0010c778 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10c778: 55 push %ebp 10c779: 89 e5 mov %esp,%ebp 10c77b: 56 push %esi 10c77c: 53 push %ebx 10c77d: 83 ec 10 sub $0x10,%esp 10c780: 8b 5d 0c mov 0xc(%ebp),%ebx 10c783: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10c786: 85 db test %ebx,%ebx 10c788: 74 56 je 10c7e0 return RTEMS_INVALID_ADDRESS; if ( !result ) 10c78a: 85 f6 test %esi,%esi 10c78c: 74 52 je 10c7e0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c78e: 83 ec 08 sub $0x8,%esp 10c791: 8d 45 f4 lea -0xc(%ebp),%eax 10c794: 50 push %eax 10c795: ff 75 08 pushl 0x8(%ebp) 10c798: e8 27 1c 00 00 call 10e3c4 <_Thread_Get> switch (location) { 10c79d: 83 c4 10 add $0x10,%esp 10c7a0: 8b 55 f4 mov -0xc(%ebp),%edx 10c7a3: 85 d2 test %edx,%edx 10c7a5: 75 2d jne 10c7d4 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10c7a7: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10c7ad: 85 c0 test %eax,%eax 10c7af: 75 09 jne 10c7ba 10c7b1: eb 39 jmp 10c7ec 10c7b3: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c7b4: 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) { 10c7b6: 85 c0 test %eax,%eax 10c7b8: 74 32 je 10c7ec <== NEVER TAKEN if (tvp->ptr == ptr) { 10c7ba: 39 58 04 cmp %ebx,0x4(%eax) 10c7bd: 75 f5 jne 10c7b4 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10c7bf: 8b 40 0c mov 0xc(%eax),%eax 10c7c2: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c7c4: e8 d7 1b 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c7c9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7cb: 8d 65 f8 lea -0x8(%ebp),%esp 10c7ce: 5b pop %ebx 10c7cf: 5e pop %esi 10c7d0: c9 leave 10c7d1: c3 ret 10c7d2: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c7d4: b8 04 00 00 00 mov $0x4,%eax } 10c7d9: 8d 65 f8 lea -0x8(%ebp),%esp 10c7dc: 5b pop %ebx 10c7dd: 5e pop %esi 10c7de: c9 leave 10c7df: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10c7e0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7e5: 8d 65 f8 lea -0x8(%ebp),%esp 10c7e8: 5b pop %ebx 10c7e9: 5e pop %esi 10c7ea: c9 leave 10c7eb: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c7ec: e8 af 1b 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c7f1: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7f6: 8d 65 f8 lea -0x8(%ebp),%esp 10c7f9: 5b pop %ebx 10c7fa: 5e pop %esi 10c7fb: c9 leave 10c7fc: c3 ret =============================================================================== 0010bb48 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10bb48: 55 push %ebp 10bb49: 89 e5 mov %esp,%ebp 10bb4b: 53 push %ebx 10bb4c: 83 ec 04 sub $0x4,%esp 10bb4f: 8b 5d 08 mov 0x8(%ebp),%ebx 10bb52: a1 d4 64 12 00 mov 0x1264d4,%eax 10bb57: 40 inc %eax 10bb58: a3 d4 64 12 00 mov %eax,0x1264d4 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10bb5d: 85 db test %ebx,%ebx 10bb5f: 74 53 je 10bbb4 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10bb61: 83 ec 08 sub $0x8,%esp 10bb64: 6a 08 push $0x8 10bb66: ff 35 98 6a 12 00 pushl 0x126a98 10bb6c: e8 13 24 00 00 call 10df84 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10bb71: a1 98 6a 12 00 mov 0x126a98,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10bb76: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bb79: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10bb80: c7 40 64 f4 d4 10 00 movl $0x10d4f4,0x64(%eax) the_watchdog->id = id; 10bb87: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10bb8a: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bb91: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bb94: 5a pop %edx 10bb95: 59 pop %ecx &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); 10bb96: 83 c0 48 add $0x48,%eax 10bb99: 50 push %eax 10bb9a: 68 a4 65 12 00 push $0x1265a4 10bb9f: e8 80 2a 00 00 call 10e624 <_Watchdog_Insert> 10bba4: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10bba7: e8 fc 1a 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bbac: 31 c0 xor %eax,%eax 10bbae: 8b 5d fc mov -0x4(%ebp),%ebx 10bbb1: c9 leave 10bbb2: c3 ret 10bbb3: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10bbb4: e8 eb 26 00 00 call 10e2a4 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bbb9: e8 ea 1a 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bbbe: 31 c0 xor %eax,%eax 10bbc0: 8b 5d fc mov -0x4(%ebp),%ebx 10bbc3: c9 leave 10bbc4: c3 ret =============================================================================== 0010c98c : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10c98c: 55 push %ebp 10c98d: 89 e5 mov %esp,%ebp 10c98f: 53 push %ebx 10c990: 83 ec 14 sub $0x14,%esp 10c993: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c996: 80 3d 68 a1 12 00 00 cmpb $0x0,0x12a168 10c99d: 0f 84 a9 00 00 00 je 10ca4c return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c9a3: 85 db test %ebx,%ebx 10c9a5: 0f 84 ad 00 00 00 je 10ca58 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10c9ab: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10c9b2: 83 ec 0c sub $0xc,%esp 10c9b5: 53 push %ebx 10c9b6: e8 d1 f3 ff ff call 10bd8c <_TOD_Validate> 10c9bb: 83 c4 10 add $0x10,%esp 10c9be: 84 c0 test %al,%al 10c9c0: 75 0a jne 10c9cc return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10c9c2: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c9c7: 8b 5d fc mov -0x4(%ebp),%ebx 10c9ca: c9 leave 10c9cb: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10c9cc: 83 ec 0c sub $0xc,%esp 10c9cf: 53 push %ebx 10c9d0: e8 2b f3 ff ff call 10bd00 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10c9d5: 83 c4 10 add $0x10,%esp 10c9d8: 3b 05 e8 a1 12 00 cmp 0x12a1e8,%eax 10c9de: 76 e2 jbe 10c9c2 10c9e0: 8b 15 54 a1 12 00 mov 0x12a154,%edx 10c9e6: 42 inc %edx 10c9e7: 89 15 54 a1 12 00 mov %edx,0x12a154 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10c9ed: 83 ec 08 sub $0x8,%esp 10c9f0: 6a 10 push $0x10 10c9f2: ff 35 18 a7 12 00 pushl 0x12a718 10c9f8: 89 45 f4 mov %eax,-0xc(%ebp) 10c9fb: e8 c0 24 00 00 call 10eec0 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ca00: 8b 15 18 a7 12 00 mov 0x12a718,%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( 10ca06: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ca09: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10ca10: c7 42 64 30 e4 10 00 movl $0x10e430,0x64(%edx) the_watchdog->id = id; 10ca17: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10ca1a: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_seconds( 10ca21: 8b 45 f4 mov -0xc(%ebp),%eax 10ca24: 2b 05 e8 a1 12 00 sub 0x12a1e8,%eax 10ca2a: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10ca2d: 58 pop %eax 10ca2e: 59 pop %ecx 10ca2f: 83 c2 48 add $0x48,%edx 10ca32: 52 push %edx 10ca33: 68 18 a2 12 00 push $0x12a218 10ca38: e8 9b 2b 00 00 call 10f5d8 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10ca3d: e8 a2 1b 00 00 call 10e5e4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ca42: 83 c4 10 add $0x10,%esp 10ca45: 31 c0 xor %eax,%eax 10ca47: e9 7b ff ff ff jmp 10c9c7 ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10ca4c: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca51: 8b 5d fc mov -0x4(%ebp),%ebx 10ca54: c9 leave 10ca55: c3 ret 10ca56: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10ca58: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca5d: 8b 5d fc mov -0x4(%ebp),%ebx 10ca60: c9 leave 10ca61: c3 ret =============================================================================== 0010a8a8 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 10a8a8: 55 push %ebp 10a8a9: 89 e5 mov %esp,%ebp 10a8ab: 8b 45 08 mov 0x8(%ebp),%eax int baud_index; switch (termios_baud) { 10a8ae: 83 f8 09 cmp $0x9,%eax 10a8b1: 0f 84 f1 00 00 00 je 10a9a8 10a8b7: 7e 37 jle 10a8f0 10a8b9: 83 f8 0e cmp $0xe,%eax 10a8bc: 0f 84 f6 00 00 00 je 10a9b8 10a8c2: 7e 5c jle 10a920 10a8c4: 3d 02 10 00 00 cmp $0x1002,%eax 10a8c9: 0f 84 01 01 00 00 je 10a9d0 10a8cf: 0f 8e 97 00 00 00 jle 10a96c 10a8d5: 3d 03 10 00 00 cmp $0x1003,%eax 10a8da: 0f 84 e0 00 00 00 je 10a9c0 10a8e0: 3d 04 10 00 00 cmp $0x1004,%eax 10a8e5: 75 51 jne 10a938 <== NEVER TAKEN case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 10a8e7: b8 13 00 00 00 mov $0x13,%eax default: baud_index = -1; break; } return baud_index; } 10a8ec: c9 leave 10a8ed: c3 ret 10a8ee: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a8f0: 83 f8 04 cmp $0x4,%eax 10a8f3: 0f 84 b7 00 00 00 je 10a9b0 10a8f9: 7f 45 jg 10a940 10a8fb: 83 f8 01 cmp $0x1,%eax 10a8fe: 0f 84 8c 00 00 00 je 10a990 10a904: 0f 8e de 00 00 00 jle 10a9e8 10a90a: 83 f8 02 cmp $0x2,%eax 10a90d: 0f 84 c5 00 00 00 je 10a9d8 10a913: 83 f8 03 cmp $0x3,%eax 10a916: 75 20 jne 10a938 <== NEVER TAKEN case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 10a918: b8 03 00 00 00 mov $0x3,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a91d: c9 leave 10a91e: c3 ret 10a91f: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a920: 83 f8 0b cmp $0xb,%eax 10a923: 0f 84 9f 00 00 00 je 10a9c8 10a929: 7c 39 jl 10a964 10a92b: 83 f8 0c cmp $0xc,%eax 10a92e: 74 50 je 10a980 10a930: 83 f8 0d cmp $0xd,%eax 10a933: 74 62 je 10a997 <== ALWAYS TAKEN 10a935: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; default: baud_index = -1; break; 10a938: b8 ff ff ff ff mov $0xffffffff,%eax } return baud_index; } 10a93d: c9 leave 10a93e: c3 ret 10a93f: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a940: 83 f8 06 cmp $0x6,%eax 10a943: 74 43 je 10a988 10a945: 7c 15 jl 10a95c 10a947: 83 f8 07 cmp $0x7,%eax 10a94a: 0f 84 90 00 00 00 je 10a9e0 10a950: 83 f8 08 cmp $0x8,%eax 10a953: 75 e3 jne 10a938 <== NEVER TAKEN 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; 10a955: b8 08 00 00 00 mov $0x8,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a95a: c9 leave 10a95b: c3 ret 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; 10a95c: b8 05 00 00 00 mov $0x5,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a961: c9 leave 10a962: c3 ret 10a963: 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; 10a964: b8 0a 00 00 00 mov $0xa,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a969: c9 leave 10a96a: c3 ret 10a96b: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a96c: 83 f8 0f cmp $0xf,%eax 10a96f: 74 2f je 10a9a0 10a971: 3d 01 10 00 00 cmp $0x1001,%eax 10a976: 75 c0 jne 10a938 <== NEVER TAKEN 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; 10a978: b8 10 00 00 00 mov $0x10,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a97d: c9 leave 10a97e: c3 ret 10a97f: 90 nop <== 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; 10a980: b8 0c 00 00 00 mov $0xc,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a985: c9 leave 10a986: c3 ret 10a987: 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; 10a988: b8 06 00 00 00 mov $0x6,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a98d: c9 leave 10a98e: c3 ret 10a98f: 90 nop <== NOT EXECUTED { int baud_index; switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; 10a990: b8 01 00 00 00 mov $0x1,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a995: c9 leave 10a996: c3 ret 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; 10a997: b8 0d 00 00 00 mov $0xd,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a99c: c9 leave 10a99d: c3 ret 10a99e: 66 90 xchg %ax,%ax <== 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; 10a9a0: b8 0f 00 00 00 mov $0xf,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9a5: c9 leave 10a9a6: c3 ret 10a9a7: 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; 10a9a8: b8 09 00 00 00 mov $0x9,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9ad: c9 leave 10a9ae: c3 ret 10a9af: 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; case B134: baud_index = 4; break; 10a9b0: b8 04 00 00 00 mov $0x4,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9b5: c9 leave 10a9b6: c3 ret 10a9b7: 90 nop <== 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; 10a9b8: b8 0e 00 00 00 mov $0xe,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9bd: c9 leave 10a9be: c3 ret 10a9bf: 90 nop <== 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; 10a9c0: b8 12 00 00 00 mov $0x12,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9c5: c9 leave 10a9c6: c3 ret 10a9c7: 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; 10a9c8: b8 0b 00 00 00 mov $0xb,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9cd: c9 leave 10a9ce: c3 ret 10a9cf: 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; 10a9d0: b8 11 00 00 00 mov $0x11,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9d5: c9 leave 10a9d6: c3 ret 10a9d7: 90 nop <== NOT EXECUTED int baud_index; switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 10a9d8: b8 02 00 00 00 mov $0x2,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9dd: c9 leave 10a9de: c3 ret 10a9df: 90 nop <== 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; 10a9e0: b8 07 00 00 00 mov $0x7,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9e5: c9 leave 10a9e6: c3 ret 10a9e7: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a9e8: 85 c0 test %eax,%eax 10a9ea: 0f 85 48 ff ff ff jne 10a938 case B0: baud_index = 0; break; 10a9f0: 31 c0 xor %eax,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9f2: c9 leave 10a9f3: c3 ret =============================================================================== 00108f18 : extern rtems_assoc_t termios_assoc_table[]; int32_t rtems_termios_baud_to_number( int termios_baud ) { 108f18: 55 push %ebp 108f19: 89 e5 mov %esp,%ebp 108f1b: 53 push %ebx 108f1c: 83 ec 0c sub $0xc,%esp 108f1f: 8b 5d 08 mov 0x8(%ebp),%ebx int baud; baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud ); 108f22: 53 push %ebx 108f23: 68 20 40 12 00 push $0x124020 108f28: e8 8f 6b 00 00 call 10fabc if ( baud == 0 && termios_baud != 0 ) 108f2d: 83 c4 10 add $0x10,%esp 108f30: 85 c0 test %eax,%eax 108f32: 74 08 je 108f3c return -1; return baud; } 108f34: 8b 5d fc mov -0x4(%ebp),%ebx 108f37: c9 leave 108f38: c3 ret 108f39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { int baud; baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud ); if ( baud == 0 && termios_baud != 0 ) 108f3c: 85 db test %ebx,%ebx 108f3e: 74 f4 je 108f34 return -1; 108f40: b8 ff ff ff ff mov $0xffffffff,%eax 108f45: eb ed jmp 108f34 =============================================================================== 0010949c : } } rtems_status_code rtems_termios_close (void *arg) { 10949c: 55 push %ebp 10949d: 89 e5 mov %esp,%ebp 10949f: 56 push %esi 1094a0: 53 push %ebx 1094a1: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1094a4: 8b 06 mov (%esi),%eax 1094a6: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain( 1094a9: 52 push %edx 1094aa: 6a 00 push $0x0 1094ac: 6a 00 push $0x0 1094ae: ff 35 ac 63 12 00 pushl 0x1263ac 1094b4: e8 d7 21 00 00 call 10b690 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 1094b9: 83 c4 10 add $0x10,%esp 1094bc: 85 c0 test %eax,%eax 1094be: 0f 85 9a 01 00 00 jne 10965e <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 1094c4: 8b 43 08 mov 0x8(%ebx),%eax 1094c7: 48 dec %eax 1094c8: 89 43 08 mov %eax,0x8(%ebx) 1094cb: 85 c0 test %eax,%eax 1094cd: 0f 85 bf 00 00 00 jne 109592 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 1094d3: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1094d9: c1 e0 05 shl $0x5,%eax 1094dc: 8b 80 44 60 12 00 mov 0x126044(%eax),%eax 1094e2: 85 c0 test %eax,%eax 1094e4: 0f 84 0a 01 00 00 je 1095f4 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 1094ea: 83 ec 0c sub $0xc,%esp 1094ed: 53 push %ebx 1094ee: ff d0 call *%eax 1094f0: 83 c4 10 add $0x10,%esp } drainOutput (tty); rtems_semaphore_release (tty->osem); } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1094f3: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1094fa: 0f 84 2c 01 00 00 je 10962c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 109500: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 109506: 85 c0 test %eax,%eax 109508: 74 0d je 109517 (*tty->device.lastClose)(tty->major, tty->minor, arg); 10950a: 51 push %ecx 10950b: 56 push %esi 10950c: ff 73 10 pushl 0x10(%ebx) 10950f: ff 73 0c pushl 0xc(%ebx) 109512: ff d0 call *%eax 109514: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 109517: 8b 03 mov (%ebx),%eax 109519: 85 c0 test %eax,%eax 10951b: 0f 84 b7 00 00 00 je 1095d8 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 109521: 8b 53 04 mov 0x4(%ebx),%edx 109524: 89 50 04 mov %edx,0x4(%eax) 109527: 8b 53 04 mov 0x4(%ebx),%edx } if (tty->back == NULL) { 10952a: 85 d2 test %edx,%edx 10952c: 0f 84 8a 00 00 00 je 1095bc <== ALWAYS TAKEN rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 109532: 89 02 mov %eax,(%edx) } rtems_semaphore_delete (tty->isem); 109534: 83 ec 0c sub $0xc,%esp 109537: ff 73 14 pushl 0x14(%ebx) 10953a: e8 ad 20 00 00 call 10b5ec rtems_semaphore_delete (tty->osem); 10953f: 5a pop %edx 109540: ff 73 18 pushl 0x18(%ebx) 109543: e8 a4 20 00 00 call 10b5ec rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 109548: 58 pop %eax 109549: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10954f: e8 98 20 00 00 call 10b5ec if ((tty->device.pollRead == NULL) || 109554: 83 c4 10 add $0x10,%esp 109557: 8b b3 a0 00 00 00 mov 0xa0(%ebx),%esi 10955d: 85 f6 test %esi,%esi 10955f: 74 4b je 1095ac 109561: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109568: 74 42 je 1095ac (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 10956a: 83 ec 0c sub $0xc,%esp 10956d: ff 73 58 pushl 0x58(%ebx) 109570: e8 1f eb ff ff call 108094 free (tty->rawOutBuf.theBuf); 109575: 59 pop %ecx 109576: ff 73 7c pushl 0x7c(%ebx) 109579: e8 16 eb ff ff call 108094 free (tty->cbuf); 10957e: 5a pop %edx 10957f: ff 73 1c pushl 0x1c(%ebx) 109582: e8 0d eb ff ff call 108094 free (tty); 109587: 89 1c 24 mov %ebx,(%esp) 10958a: e8 05 eb ff ff call 108094 10958f: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 109592: 83 ec 0c sub $0xc,%esp 109595: ff 35 ac 63 12 00 pushl 0x1263ac 10959b: e8 ec 21 00 00 call 10b78c return RTEMS_SUCCESSFUL; } 1095a0: 31 c0 xor %eax,%eax 1095a2: 8d 65 f8 lea -0x8(%ebp),%esp 1095a5: 5b pop %ebx 1095a6: 5e pop %esi 1095a7: c9 leave 1095a8: c3 ret 1095a9: 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); 1095ac: 83 ec 0c sub $0xc,%esp 1095af: ff 73 68 pushl 0x68(%ebx) 1095b2: e8 35 20 00 00 call 10b5ec 1095b7: 83 c4 10 add $0x10,%esp 1095ba: eb ae jmp 10956a } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 1095bc: a3 b4 63 12 00 mov %eax,0x1263b4 if ( rtems_termios_ttyHead != NULL ) { 1095c1: 85 c0 test %eax,%eax 1095c3: 0f 84 6b ff ff ff je 109534 rtems_termios_ttyHead->back = NULL; 1095c9: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 1095d0: e9 5f ff ff ff jmp 109534 1095d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 1095d8: 8b 53 04 mov 0x4(%ebx),%edx 1095db: 89 15 b0 63 12 00 mov %edx,0x1263b0 if ( rtems_termios_ttyTail != NULL ) { 1095e1: 85 d2 test %edx,%edx 1095e3: 74 d7 je 1095bc rtems_termios_ttyTail->forw = NULL; 1095e5: c7 02 00 00 00 00 movl $0x0,(%edx) 1095eb: 8b 03 mov (%ebx),%eax 1095ed: e9 40 ff ff ff jmp 109532 1095f2: 66 90 xchg %ax,%ax <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1095f4: 50 push %eax 1095f5: 6a 00 push $0x0 1095f7: 6a 00 push $0x0 1095f9: ff 73 18 pushl 0x18(%ebx) 1095fc: e8 8f 20 00 00 call 10b690 if (sc != RTEMS_SUCCESSFUL) { 109601: 83 c4 10 add $0x10,%esp 109604: 85 c0 test %eax,%eax 109606: 75 56 jne 10965e <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 109608: 89 d8 mov %ebx,%eax 10960a: e8 75 f9 ff ff call 108f84 rtems_semaphore_release (tty->osem); 10960f: 83 ec 0c sub $0xc,%esp 109612: ff 73 18 pushl 0x18(%ebx) 109615: e8 72 21 00 00 call 10b78c 10961a: 83 c4 10 add $0x10,%esp } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10961d: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109624: 0f 85 d6 fe ff ff jne 109500 10962a: 66 90 xchg %ax,%ax /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 10962c: 83 ec 08 sub $0x8,%esp 10962f: 6a 01 push $0x1 109631: ff b3 c4 00 00 00 pushl 0xc4(%ebx) 109637: e8 40 1b 00 00 call 10b17c if (sc != RTEMS_SUCCESSFUL) 10963c: 83 c4 10 add $0x10,%esp 10963f: 85 c0 test %eax,%eax 109641: 75 1b jne 10965e <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 109643: 83 ec 08 sub $0x8,%esp 109646: 6a 01 push $0x1 109648: ff b3 c8 00 00 00 pushl 0xc8(%ebx) 10964e: e8 29 1b 00 00 call 10b17c if (sc != RTEMS_SUCCESSFUL) 109653: 83 c4 10 add $0x10,%esp 109656: 85 c0 test %eax,%eax 109658: 0f 84 a2 fe ff ff je 109500 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10965e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109661: 50 push %eax <== NOT EXECUTED 109662: e8 69 26 00 00 call 10bcd0 <== NOT EXECUTED =============================================================================== 0010ab44 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 10ab44: 55 push %ebp 10ab45: 89 e5 mov %esp,%ebp 10ab47: 83 ec 08 sub $0x8,%esp 10ab4a: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 10ab4d: 8b 55 0c mov 0xc(%ebp),%edx 10ab50: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10ab56: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 10ab5d: 74 2d je 10ab8c if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 10ab5f: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 10ab66: 74 0c je 10ab74 rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 10ab68: 89 45 08 mov %eax,0x8(%ebp) } 10ab6b: c9 leave rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 10ab6c: e9 27 fd ff ff jmp 10a898 10ab71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10ab74: 8b 15 f4 60 12 00 mov 0x1260f4,%edx 10ab7a: 85 d2 test %edx,%edx 10ab7c: 74 09 je 10ab87 <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 10ab7e: 83 ec 0c sub $0xc,%esp 10ab81: 50 push %eax 10ab82: ff d2 call *%edx 10ab84: 83 c4 10 add $0x10,%esp } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } 10ab87: 31 c0 xor %eax,%eax 10ab89: c9 leave 10ab8a: c3 ret 10ab8b: 90 nop <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 10ab8c: 83 ec 08 sub $0x8,%esp 10ab8f: 6a 02 push $0x2 10ab91: ff b0 c8 00 00 00 pushl 0xc8(%eax) 10ab97: e8 e0 05 00 00 call 10b17c if (sc != RTEMS_SUCCESSFUL) 10ab9c: 83 c4 10 add $0x10,%esp 10ab9f: 85 c0 test %eax,%eax 10aba1: 74 e4 je 10ab87 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10aba3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aba6: 50 push %eax <== NOT EXECUTED 10aba7: e8 24 11 00 00 call 10bcd0 <== NOT EXECUTED =============================================================================== 0010a520 : * 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) { 10a520: 55 push %ebp 10a521: 89 e5 mov %esp,%ebp 10a523: 57 push %edi 10a524: 56 push %esi 10a525: 53 push %ebx 10a526: 83 ec 3c sub $0x3c,%esp 10a529: 8b 5d 08 mov 0x8(%ebp),%ebx 10a52c: 8b 75 0c mov 0xc(%ebp),%esi 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) { 10a52f: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a535: c1 e0 05 shl $0x5,%eax 10a538: 8b 80 50 60 12 00 mov 0x126050(%eax),%eax 10a53e: 85 c0 test %eax,%eax 10a540: 0f 84 8a 00 00 00 je 10a5d0 while (len--) { 10a546: 8b 4d 10 mov 0x10(%ebp),%ecx 10a549: 85 c9 test %ecx,%ecx 10a54b: 74 2a je 10a577 <== NEVER TAKEN 10a54d: 31 ff xor %edi,%edi 10a54f: eb 12 jmp 10a563 10a551: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10a554: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a55a: c1 e0 05 shl $0x5,%eax 10a55d: 8b 80 50 60 12 00 mov 0x126050(%eax),%eax c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 10a563: 83 ec 08 sub $0x8,%esp 10a566: 53 push %ebx 10a567: 0f be 14 3e movsbl (%esi,%edi,1),%edx 10a56b: 52 push %edx 10a56c: ff d0 call *%eax 10a56e: 47 inc %edi 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--) { 10a56f: 83 c4 10 add $0x10,%esp 10a572: 3b 7d 10 cmp 0x10(%ebp),%edi 10a575: 75 dd jne 10a554 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 10a577: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx 10a57d: 85 d2 test %edx,%edx 10a57f: 75 3b jne 10a5bc <== NEVER TAKEN 10a581: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 10a587: 85 c0 test %eax,%eax 10a589: 74 31 je 10a5bc <== NEVER TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10a58b: 83 ec 08 sub $0x8,%esp 10a58e: ff b3 e0 00 00 00 pushl 0xe0(%ebx) 10a594: 8d 53 30 lea 0x30(%ebx),%edx 10a597: 52 push %edx 10a598: ff d0 call *%eax tty->tty_rcvwakeup = 1; 10a59a: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) 10a5a1: 00 00 00 10a5a4: 83 c4 10 add $0x10,%esp } return 0; 10a5a7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 10a5ae: 8b 45 e0 mov -0x20(%ebp),%eax 10a5b1: 8d 65 f4 lea -0xc(%ebp),%esp 10a5b4: 5b pop %ebx 10a5b5: 5e pop %esi 10a5b6: 5f pop %edi 10a5b7: c9 leave 10a5b8: c3 ret 10a5b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; 10a5bc: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 10a5c3: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a5c6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a5c9: 5b pop %ebx <== NOT EXECUTED 10a5ca: 5e pop %esi <== NOT EXECUTED 10a5cb: 5f pop %edi <== NOT EXECUTED 10a5cc: c9 leave <== NOT EXECUTED 10a5cd: c3 ret <== NOT EXECUTED 10a5ce: 66 90 xchg %ax,%ax <== 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) { 10a5d0: 8b 7d 10 mov 0x10(%ebp),%edi 10a5d3: c6 45 db 00 movb $0x0,-0x25(%ebp) 10a5d7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) /* * 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); 10a5de: 8d 43 30 lea 0x30(%ebx),%eax 10a5e1: 89 45 d0 mov %eax,-0x30(%ebp) if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 10a5e4: 8d 53 4a lea 0x4a(%ebx),%edx 10a5e7: 89 55 cc mov %edx,-0x34(%ebp) tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 10a5ea: 85 ff test %edi,%edi 10a5ec: 0f 84 0b 01 00 00 je 10a6fd <== NEVER TAKEN 10a5f2: 66 90 xchg %ax,%ax c = *buf++; 10a5f4: 8a 06 mov (%esi),%al 10a5f6: 88 45 e7 mov %al,-0x19(%ebp) 10a5f9: 46 inc %esi /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 10a5fa: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a600: f6 c4 02 test $0x2,%ah 10a603: 74 1c je 10a621 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 10a605: 0f be 45 e7 movsbl -0x19(%ebp),%eax 10a609: 0f b6 53 4a movzbl 0x4a(%ebx),%edx 10a60d: 39 d0 cmp %edx,%eax 10a60f: 0f 84 07 01 00 00 je 10a71c /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 10a615: 0f b6 53 49 movzbl 0x49(%ebx),%edx 10a619: 39 d0 cmp %edx,%eax 10a61b: 0f 84 4f 01 00 00 je 10a770 <== NEVER TAKEN /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 10a621: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 10a625: 0f 85 0c 01 00 00 jne 10a737 <== NEVER TAKEN } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 10a62b: 8b 43 60 mov 0x60(%ebx),%eax 10a62e: 8b 53 64 mov 0x64(%ebx),%edx 10a631: 89 55 dc mov %edx,-0x24(%ebp) 10a634: 40 inc %eax 10a635: 31 d2 xor %edx,%edx 10a637: f7 75 dc divl -0x24(%ebp) 10a63a: 89 d1 mov %edx,%ecx /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 10a63c: 9c pushf 10a63d: fa cli 10a63e: 8f 45 d4 popl -0x2c(%ebp) if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 10a641: 8b 43 5c mov 0x5c(%ebx),%eax 10a644: 89 45 c4 mov %eax,-0x3c(%ebp) 10a647: 8b 43 64 mov 0x64(%ebx),%eax % tty->rawInBuf.Size) > tty->highwater) && 10a64a: 8b 53 64 mov 0x64(%ebx),%edx 10a64d: 89 55 dc mov %edx,-0x24(%ebp) } } 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) 10a650: 2b 45 c4 sub -0x3c(%ebp),%eax 10a653: 01 c8 add %ecx,%eax % tty->rawInBuf.Size) > tty->highwater) && 10a655: 31 d2 xor %edx,%edx 10a657: f7 75 dc divl -0x24(%ebp) } } 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) 10a65a: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx 10a660: 76 46 jbe 10a6a8 <== ALWAYS TAKEN % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 10a662: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) % tty->rawInBuf.Size) > tty->highwater) && 10a668: a8 01 test $0x1,%al <== NOT EXECUTED 10a66a: 75 3c jne 10a6a8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 10a66c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a672: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 10a675: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 10a67b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a681: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 10a686: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 10a68b: 0f 84 22 01 00 00 je 10a7b3 <== NOT EXECUTED /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 10a691: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a697: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 10a69c: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 10a6a1: 0f 84 50 01 00 00 je 10a7f7 <== NOT EXECUTED 10a6a7: 90 nop <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 10a6a8: ff 75 d4 pushl -0x2c(%ebp) 10a6ab: 9d popf if (newTail == tty->rawInBuf.Head) { 10a6ac: 8b 43 5c mov 0x5c(%ebx),%eax 10a6af: 39 c8 cmp %ecx,%eax 10a6b1: 0f 84 b1 00 00 00 je 10a768 <== NEVER TAKEN dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 10a6b7: 8b 43 58 mov 0x58(%ebx),%eax 10a6ba: 8a 55 e7 mov -0x19(%ebp),%dl 10a6bd: 88 14 08 mov %dl,(%eax,%ecx,1) tty->rawInBuf.Tail = newTail; 10a6c0: 89 4b 60 mov %ecx,0x60(%ebx) /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 10a6c3: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax 10a6c9: 85 c0 test %eax,%eax 10a6cb: 75 27 jne 10a6f4 <== NEVER TAKEN 10a6cd: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 10a6d3: 85 c0 test %eax,%eax 10a6d5: 74 1d je 10a6f4 <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10a6d7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a6da: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 10a6e0: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 10a6e3: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 10a6e5: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10a6ec: 00 00 00 10a6ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a6f2: 66 90 xchg %ax,%ax <== NOT EXECUTED 10a6f4: 4f dec %edi tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 10a6f5: 85 ff test %edi,%edi 10a6f7: 0f 85 f7 fe ff ff jne 10a5f4 <== NEVER TAKEN } } } } tty->rawInBufDropped += dropped; 10a6fd: 8b 45 e0 mov -0x20(%ebp),%eax 10a700: 01 43 78 add %eax,0x78(%ebx) rtems_semaphore_release (tty->rawInBuf.Semaphore); 10a703: 83 ec 0c sub $0xc,%esp 10a706: ff 73 68 pushl 0x68(%ebx) 10a709: e8 7e 10 00 00 call 10b78c return dropped; 10a70e: 83 c4 10 add $0x10,%esp } 10a711: 8b 45 e0 mov -0x20(%ebp),%eax 10a714: 8d 65 f4 lea -0xc(%ebp),%esp 10a717: 5b pop %ebx 10a718: 5e pop %esi 10a719: 5f pop %edi 10a71a: c9 leave 10a71b: c3 ret /* 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]) { 10a71c: 0f b6 53 49 movzbl 0x49(%ebx),%edx 10a720: 39 d0 cmp %edx,%eax 10a722: 74 7e je 10a7a2 <== NEVER TAKEN tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 10a724: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a72a: 83 c8 10 or $0x10,%eax 10a72d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) 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--) { 10a733: c6 45 db 01 movb $0x1,-0x25(%ebp) flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 10a737: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a73d: 83 e0 30 and $0x30,%eax 10a740: 83 f8 20 cmp $0x20,%eax 10a743: 75 af jne 10a6f4 <== ALWAYS TAKEN /* disable interrupts */ rtems_interrupt_disable(level); 10a745: 9c pushf <== NOT EXECUTED 10a746: fa cli <== NOT EXECUTED 10a747: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10a748: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a74e: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 10a751: 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) { 10a757: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 10a75d: 85 c0 test %eax,%eax <== NOT EXECUTED 10a75f: 75 20 jne 10a781 <== 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); 10a761: 52 push %edx <== NOT EXECUTED 10a762: 9d popf <== 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); tty->tty_rcvwakeup = 1; 10a763: 4f dec %edi <== NOT EXECUTED 10a764: eb 8f jmp 10a6f5 <== NOT EXECUTED 10a766: 66 90 xchg %ax,%ax <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 10a768: ff 45 e0 incl -0x20(%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); tty->tty_rcvwakeup = 1; 10a76b: 4f dec %edi <== NOT EXECUTED 10a76c: eb 87 jmp 10a6f5 <== NOT EXECUTED 10a76e: 66 90 xchg %ax,%ax <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 10a770: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a776: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 10a779: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 10a77f: eb b2 jmp 10a733 <== 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); 10a781: 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)( 10a787: 51 push %ecx <== NOT EXECUTED 10a788: 6a 01 push $0x1 <== NOT EXECUTED 10a78a: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 10a78d: 50 push %eax <== NOT EXECUTED 10a78e: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a791: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 10a794: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a79a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a79d: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 10a7a0: eb bf jmp 10a761 <== 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; 10a7a2: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7a8: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 10a7ab: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 10a7b1: eb 80 jmp 10a733 <== 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) || 10a7b3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7b9: a8 20 test $0x20,%al <== NOT EXECUTED 10a7bb: 75 0e jne 10a7cb <== NOT EXECUTED 10a7bd: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 10a7c3: 85 c0 test %eax,%eax <== NOT EXECUTED 10a7c5: 0f 85 dd fe ff ff jne 10a6a8 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 10a7cb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7d1: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10a7d4: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 10a7da: 52 push %edx <== NOT EXECUTED 10a7db: 6a 01 push $0x1 <== NOT EXECUTED 10a7dd: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 10a7e0: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a7e3: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 10a7e6: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a7ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a7ef: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 10a7f2: e9 b1 fe ff ff jmp 10a6a8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { tty->flow_ctrl |= FL_IRTSOFF; 10a7f7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7fd: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 10a800: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 10a806: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 10a80c: 85 c0 test %eax,%eax <== NOT EXECUTED 10a80e: 0f 84 94 fe ff ff je 10a6a8 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 10a814: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a817: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a81a: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 10a81d: ff d0 call *%eax <== NOT EXECUTED 10a81f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a822: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 10a825: e9 7e fe ff ff jmp 10a6a8 <== NOT EXECUTED =============================================================================== 00108f48 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 108f48: 55 push %ebp 108f49: 89 e5 mov %esp,%ebp 108f4b: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 108f4e: a1 ac 63 12 00 mov 0x1263ac,%eax 108f53: 85 c0 test %eax,%eax 108f55: 74 05 je 108f5c RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 108f57: c9 leave 108f58: c3 ret 108f59: 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 ( 108f5c: 83 ec 0c sub $0xc,%esp 108f5f: 68 ac 63 12 00 push $0x1263ac 108f64: 6a 00 push $0x0 108f66: 6a 54 push $0x54 108f68: 6a 01 push $0x1 108f6a: 68 69 6d 52 54 push $0x54526d69 108f6f: e8 a0 24 00 00 call 10b414 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) 108f74: 83 c4 20 add $0x20,%esp 108f77: 85 c0 test %eax,%eax 108f79: 74 dc je 108f57 rtems_fatal_error_occurred (sc); 108f7b: 83 ec 0c sub $0xc,%esp 108f7e: 50 push %eax 108f7f: e8 4c 2d 00 00 call 10bcd0 =============================================================================== 00109688 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 109688: 55 push %ebp 109689: 89 e5 mov %esp,%ebp 10968b: 57 push %edi 10968c: 56 push %esi 10968d: 53 push %ebx 10968e: 83 ec 20 sub $0x20,%esp 109691: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109694: 8b 03 mov (%ebx),%eax 109696: 8b 40 34 mov 0x34(%eax),%eax 109699: 89 45 e4 mov %eax,-0x1c(%ebp) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 10969c: 8b 73 08 mov 0x8(%ebx),%esi rtems_status_code sc; args->ioctl_return = 0; 10969f: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1096a6: 6a 00 push $0x0 1096a8: 6a 00 push $0x0 1096aa: ff 70 18 pushl 0x18(%eax) 1096ad: e8 de 1f 00 00 call 10b690 1096b2: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) { 1096b5: 83 c4 10 add $0x10,%esp 1096b8: 85 c0 test %eax,%eax 1096ba: 75 24 jne 1096e0 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 1096bc: 8b 43 04 mov 0x4(%ebx),%eax 1096bf: 83 f8 04 cmp $0x4,%eax 1096c2: 74 70 je 109734 1096c4: 77 2a ja 1096f0 1096c6: 83 f8 02 cmp $0x2,%eax 1096c9: 0f 84 9d 00 00 00 je 10976c 1096cf: 0f 86 3f 02 00 00 jbe 109914 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 1096d5: 8b 45 e4 mov -0x1c(%ebp),%eax 1096d8: e8 a7 f8 ff ff call 108f84 break; 1096dd: eb 69 jmp 109748 1096df: 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; 1096e0: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; return sc; } 1096e3: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1096e6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1096e9: 5b pop %ebx <== NOT EXECUTED 1096ea: 5e pop %esi <== NOT EXECUTED 1096eb: 5f pop %edi <== NOT EXECUTED 1096ec: c9 leave <== NOT EXECUTED 1096ed: c3 ret <== NOT EXECUTED 1096ee: 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) { 1096f0: 3d 7f 66 04 40 cmp $0x4004667f,%eax 1096f5: 0f 84 f1 01 00 00 je 1098ec <== NEVER TAKEN 1096fb: 0f 87 33 02 00 00 ja 109934 109701: 83 f8 05 cmp $0x5,%eax 109704: 0f 84 ae 02 00 00 je 1099b8 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 10970a: 8b 55 e4 mov -0x1c(%ebp),%edx 10970d: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax 109713: c1 e0 05 shl $0x5,%eax 109716: 8b 80 58 60 12 00 mov 0x126058(%eax),%eax 10971c: 85 c0 test %eax,%eax 10971e: 0f 84 b8 02 00 00 je 1099dc <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 109724: 83 ec 08 sub $0x8,%esp 109727: 53 push %ebx 109728: 52 push %edx 109729: ff d0 call *%eax 10972b: 89 45 e0 mov %eax,-0x20(%ebp) 10972e: 83 c4 10 add $0x10,%esp 109731: eb 15 jmp 109748 109733: 90 nop <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 109734: 8b 06 mov (%esi),%eax 109736: 8b 56 04 mov 0x4(%esi),%edx 109739: 8b 4d e4 mov -0x1c(%ebp),%ecx 10973c: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx) 109742: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx) *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 109748: 83 ec 0c sub $0xc,%esp 10974b: 8b 45 e4 mov -0x1c(%ebp),%eax 10974e: ff 70 18 pushl 0x18(%eax) 109751: e8 36 20 00 00 call 10b78c args->ioctl_return = sc; 109756: 8b 55 e0 mov -0x20(%ebp),%edx 109759: 89 53 0c mov %edx,0xc(%ebx) return sc; 10975c: 83 c4 10 add $0x10,%esp } 10975f: 8b 45 e0 mov -0x20(%ebp),%eax 109762: 8d 65 f4 lea -0xc(%ebp),%esp 109765: 5b pop %ebx 109766: 5e pop %esi 109767: 5f pop %edi 109768: c9 leave 109769: c3 ret 10976a: 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; 10976c: 8b 73 08 mov 0x8(%ebx),%esi 10976f: 8b 4d e4 mov -0x1c(%ebp),%ecx 109772: 83 c1 30 add $0x30,%ecx 109775: 89 4d dc mov %ecx,-0x24(%ebp) 109778: b9 09 00 00 00 mov $0x9,%ecx 10977d: 8b 7d dc mov -0x24(%ebp),%edi 109780: 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) && 109782: 8b 55 e4 mov -0x1c(%ebp),%edx 109785: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10978b: f6 c4 02 test $0x2,%ah 10978e: 74 44 je 1097d4 109790: f6 42 31 04 testb $0x4,0x31(%edx) 109794: 75 3e jne 1097d4 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 109796: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10979c: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 1097a1: 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) { 1097a7: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 1097ad: a8 20 test $0x20,%al <== NOT EXECUTED 1097af: 74 23 je 1097d4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 1097b1: 9c pushf <== NOT EXECUTED 1097b2: fa cli <== NOT EXECUTED 1097b3: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 1097b4: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 1097ba: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 1097bd: 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) { 1097c3: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED 1097c9: 85 ff test %edi,%edi <== NOT EXECUTED 1097cb: 0f 85 bb 02 00 00 jne 109a8c <== 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); 1097d1: 56 push %esi <== NOT EXECUTED 1097d2: 9d popf <== NOT EXECUTED 1097d3: 90 nop <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { 1097d4: 8b 4d e4 mov -0x1c(%ebp),%ecx 1097d7: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax 1097dd: f6 c4 04 test $0x4,%ah 1097e0: 74 24 je 109806 1097e2: f6 41 31 10 testb $0x10,0x31(%ecx) 1097e6: 75 1e jne 109806 <== ALWAYS TAKEN /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 1097e8: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 1097ee: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 1097f1: 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); 1097f7: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 1097fd: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 109800: 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) && !(tty->termios.c_cflag & CRTSCTS)) { 109806: 8b 55 e4 mov -0x1c(%ebp),%edx 109809: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10980f: f6 c4 01 test $0x1,%ah 109812: 0f 84 bc 01 00 00 je 1099d4 <== ALWAYS TAKEN 109818: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10981b: 8b 41 38 mov 0x38(%ecx),%eax <== NOT EXECUTED 10981e: 85 c0 test %eax,%eax <== NOT EXECUTED 109820: 0f 88 12 02 00 00 js 109a38 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 109826: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 10982c: 80 e6 fe and $0xfe,%dh <== NOT EXECUTED 10982f: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { 109835: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 10983b: 83 e2 04 and $0x4,%edx <== NOT EXECUTED 10983e: 74 1b je 10985b <== NOT EXECUTED 109840: 8b 91 b0 00 00 00 mov 0xb0(%ecx),%edx <== NOT EXECUTED 109846: 85 d2 test %edx,%edx <== NOT EXECUTED 109848: 74 11 je 10985b <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 10984a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10984d: ff 71 10 pushl 0x10(%ecx) <== NOT EXECUTED 109850: ff d2 call *%edx <== NOT EXECUTED 109852: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109855: 8b 42 38 mov 0x38(%edx),%eax <== NOT EXECUTED 109858: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 10985b: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10985e: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 109864: 83 e2 fb and $0xfffffffb,%edx <== NOT EXECUTED 109867: 89 91 b8 00 00 00 mov %edx,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) { 10986d: 85 c0 test %eax,%eax 10986f: 0f 88 c3 01 00 00 js 109a38 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 109875: 8b 4d e4 mov -0x1c(%ebp),%ecx 109878: 8b 41 30 mov 0x30(%ecx),%eax 10987b: f6 c4 10 test $0x10,%ah 10987e: 74 0f je 10988f tty->flow_ctrl |= FL_MDXOF; 109880: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx 109886: 80 ce 04 or $0x4,%dh 109889: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 10988f: f6 c4 04 test $0x4,%ah 109892: 74 12 je 1098a6 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 109894: 8b 55 e4 mov -0x1c(%ebp),%edx 109897: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10989d: 80 cc 02 or $0x2,%ah 1098a0: 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) { 1098a6: 8b 4d e4 mov -0x1c(%ebp),%ecx 1098a9: f6 41 3c 02 testb $0x2,0x3c(%ecx) 1098ad: 0f 84 41 01 00 00 je 1099f4 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 1098b3: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 1098ba: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 1098c1: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 1098c8: 8b 55 e4 mov -0x1c(%ebp),%edx 1098cb: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax 1098d1: 85 c0 test %eax,%eax 1098d3: 0f 84 6f fe ff ff je 109748 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 1098d9: 83 ec 08 sub $0x8,%esp 1098dc: ff 75 dc pushl -0x24(%ebp) 1098df: ff 72 10 pushl 0x10(%edx) 1098e2: ff d0 call *%eax 1098e4: 83 c4 10 add $0x10,%esp 1098e7: e9 5c fe ff ff jmp 109748 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 1098ec: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1098ef: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED 1098f2: 89 d1 mov %edx,%ecx <== NOT EXECUTED 1098f4: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 1098f7: 29 d0 sub %edx,%eax <== NOT EXECUTED 1098f9: 0f 88 e9 00 00 00 js 1099e8 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 1098ff: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED 109902: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 109905: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED 109908: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED 10990b: 89 02 mov %eax,(%edx) <== NOT EXECUTED } break; 10990d: e9 36 fe ff ff jmp 109748 <== NOT EXECUTED 109912: 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) { 109914: 48 dec %eax 109915: 0f 85 ef fd ff ff jne 10970a <== NEVER TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 10991b: 8b 43 08 mov 0x8(%ebx),%eax 10991e: 8b 75 e4 mov -0x1c(%ebp),%esi 109921: 83 c6 30 add $0x30,%esi 109924: b9 09 00 00 00 mov $0x9,%ecx 109929: 89 c7 mov %eax,%edi 10992b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 10992d: e9 16 fe ff ff jmp 109748 109932: 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) { 109934: 3d 1a 74 04 40 cmp $0x4004741a,%eax 109939: 74 69 je 1099a4 10993b: 3d 1b 74 04 80 cmp $0x8004741b,%eax 109940: 0f 85 c4 fd ff ff jne 10970a <== NEVER TAKEN #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 109946: 8b 55 e4 mov -0x1c(%ebp),%edx 109949: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax 10994f: c1 e0 05 shl $0x5,%eax 109952: 8b 80 44 60 12 00 mov 0x126044(%eax),%eax 109958: 85 c0 test %eax,%eax 10995a: 74 0c je 109968 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 10995c: 83 ec 0c sub $0xc,%esp 10995f: 52 push %edx 109960: ff d0 call *%eax 109962: 89 45 e0 mov %eax,-0x20(%ebp) 109965: 83 c4 10 add $0x10,%esp } tty->t_line=*(int*)(args->buffer); 109968: 8b 43 08 mov 0x8(%ebx),%eax 10996b: 8b 00 mov (%eax),%eax 10996d: 8b 4d e4 mov -0x1c(%ebp),%ecx 109970: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx) tty->t_sc = NULL; /* ensure that no more valid data */ 109976: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx) 10997d: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 109980: c1 e0 05 shl $0x5,%eax 109983: 8b 80 40 60 12 00 mov 0x126040(%eax),%eax 109989: 85 c0 test %eax,%eax 10998b: 0f 84 b7 fd ff ff je 109748 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_open(tty); 109991: 83 ec 0c sub $0xc,%esp 109994: 51 push %ecx 109995: ff d0 call *%eax 109997: 89 45 e0 mov %eax,-0x20(%ebp) 10999a: 83 c4 10 add $0x10,%esp 10999d: e9 a6 fd ff ff jmp 109748 1099a2: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 1099a4: 8b 43 08 mov 0x8(%ebx),%eax 1099a7: 8b 4d e4 mov -0x1c(%ebp),%ecx 1099aa: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx 1099b0: 89 10 mov %edx,(%eax) break; 1099b2: e9 91 fd ff ff jmp 109748 1099b7: 90 nop <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 1099b8: 8b 06 mov (%esi),%eax 1099ba: 8b 56 04 mov 0x4(%esi),%edx 1099bd: 8b 4d e4 mov -0x1c(%ebp),%ecx 1099c0: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx) 1099c6: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) break; 1099cc: e9 77 fd ff ff jmp 109748 1099d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 1099d4: 8b 42 38 mov 0x38(%edx),%eax 1099d7: e9 91 fe ff ff jmp 10986d default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 1099dc: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED 1099e3: e9 60 fd ff ff jmp 109748 <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 1099e8: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED 1099eb: 01 d0 add %edx,%eax <== NOT EXECUTED 1099ed: e9 0d ff ff ff jmp 1098ff <== NOT EXECUTED 1099f2: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 1099f4: 8b 45 e4 mov -0x1c(%ebp),%eax 1099f7: 0f b6 70 46 movzbl 0x46(%eax),%esi rtems_clock_get_ticks_per_second() / 10; 1099fb: e8 74 15 00 00 call 10af74 if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 109a00: 0f af c6 imul %esi,%eax rtems_clock_get_ticks_per_second() / 10; 109a03: ba cd cc cc cc mov $0xcccccccd,%edx 109a08: f7 e2 mul %edx 109a0a: c1 ea 03 shr $0x3,%edx if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 109a0d: 8b 4d e4 mov -0x1c(%ebp),%ecx 109a10: 89 51 54 mov %edx,0x54(%ecx) rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 109a13: 80 79 46 00 cmpb $0x0,0x46(%ecx) 109a17: 74 36 je 109a4f tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 109a19: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 109a20: 89 51 70 mov %edx,0x70(%ecx) if (tty->termios.c_cc[VMIN]) 109a23: 80 79 47 00 cmpb $0x0,0x47(%ecx) 109a27: 74 49 je 109a72 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 109a29: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) 109a30: e9 93 fe ff ff jmp 1098c8 109a35: 8d 76 00 lea 0x0(%esi),%esi <== 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; 109a38: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109a3b: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 109a41: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 109a44: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED 109a4a: e9 26 fe ff ff jmp 109875 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 109a4f: 8b 55 e4 mov -0x1c(%ebp),%edx 109a52: 80 7a 47 00 cmpb $0x0,0x47(%edx) 109a56: 74 25 je 109a7d <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 109a58: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 109a5f: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 109a66: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED 109a6d: e9 56 fe ff ff jmp 1098c8 <== 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; 109a72: 8b 45 e4 mov -0x1c(%ebp),%eax 109a75: 89 50 74 mov %edx,0x74(%eax) 109a78: e9 4b fe ff ff jmp 1098c8 if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 109a7d: 8b 4d e4 mov -0x1c(%ebp),%ecx 109a80: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx) 109a87: e9 3c fe ff ff jmp 1098c8 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); 109a8c: 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)( 109a92: 51 push %ecx <== NOT EXECUTED 109a93: 6a 01 push $0x1 <== NOT EXECUTED 109a95: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED 109a98: 50 push %eax <== NOT EXECUTED 109a99: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 109a9c: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED 109aa2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109aa5: e9 27 fd ff ff jmp 1097d1 <== NOT EXECUTED =============================================================================== 0010aa60 : extern rtems_assoc_t termios_assoc_table[]; int rtems_termios_number_to_baud( int32_t baud ) { 10aa60: 55 push %ebp 10aa61: 89 e5 mov %esp,%ebp 10aa63: 53 push %ebx 10aa64: 83 ec 0c sub $0xc,%esp 10aa67: 8b 5d 08 mov 0x8(%ebp),%ebx int termios_baud; termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud ); 10aa6a: 53 push %ebx 10aa6b: 68 60 88 12 00 push $0x128860 10aa70: e8 37 6e 00 00 call 1118ac if ( termios_baud == 0 && baud != 0 ) 10aa75: 83 c4 10 add $0x10,%esp 10aa78: 85 c0 test %eax,%eax 10aa7a: 74 08 je 10aa84 return -1; return termios_baud; } 10aa7c: 8b 5d fc mov -0x4(%ebp),%ebx 10aa7f: c9 leave 10aa80: c3 ret 10aa81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { int termios_baud; termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud ); if ( termios_baud == 0 && baud != 0 ) 10aa84: 85 db test %ebx,%ebx 10aa86: 74 f4 je 10aa7c return -1; 10aa88: b8 ff ff ff ff mov $0xffffffff,%eax 10aa8d: eb ed jmp 10aa7c =============================================================================== 00108ff4 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 108ff4: 55 push %ebp 108ff5: 89 e5 mov %esp,%ebp 108ff7: 57 push %edi 108ff8: 56 push %esi 108ff9: 53 push %ebx 108ffa: 83 ec 40 sub $0x40,%esp 108ffd: 8b 55 08 mov 0x8(%ebp),%edx struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 109000: 6a 00 push $0x0 109002: 6a 00 push $0x0 109004: ff 35 ac 63 12 00 pushl 0x1263ac 10900a: 89 55 dc mov %edx,-0x24(%ebp) 10900d: e8 7e 26 00 00 call 10b690 109012: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109015: 83 c4 10 add $0x10,%esp 109018: 85 c0 test %eax,%eax 10901a: 8b 55 dc mov -0x24(%ebp),%edx 10901d: 75 6d jne 10908c <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 10901f: 8b 35 b4 63 12 00 mov 0x1263b4,%esi 109025: 85 f6 test %esi,%esi 109027: 0f 84 a7 00 00 00 je 1090d4 10902d: 89 f3 mov %esi,%ebx 10902f: 8b 45 0c mov 0xc(%ebp),%eax 109032: eb 0a jmp 10903e 109034: 8b 1b mov (%ebx),%ebx 109036: 85 db test %ebx,%ebx 109038: 0f 84 96 00 00 00 je 1090d4 <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) 10903e: 39 53 0c cmp %edx,0xc(%ebx) 109041: 75 f1 jne 109034 109043: 39 43 10 cmp %eax,0x10(%ebx) 109046: 75 ec jne 109034 <== NEVER TAKEN */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 109048: 8b 75 10 mov 0x10(%ebp),%esi 10904b: 8b 06 mov (%esi),%eax 10904d: 89 58 34 mov %ebx,0x34(%eax) if (!tty->refcount++) { 109050: 8b 43 08 mov 0x8(%ebx),%eax 109053: 8d 48 01 lea 0x1(%eax),%ecx 109056: 89 4b 08 mov %ecx,0x8(%ebx) 109059: 85 c0 test %eax,%eax 10905b: 75 1e jne 10907b if (tty->device.firstOpen) 10905d: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax 109063: 85 c0 test %eax,%eax 109065: 74 0b je 109072 (*tty->device.firstOpen)(major, minor, arg); 109067: 57 push %edi 109068: 56 push %esi 109069: ff 75 0c pushl 0xc(%ebp) 10906c: 52 push %edx 10906d: ff d0 call *%eax 10906f: 83 c4 10 add $0x10,%esp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109072: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109079: 74 1c je 109097 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 10907b: 83 ec 0c sub $0xc,%esp 10907e: ff 35 ac 63 12 00 pushl 0x1263ac 109084: e8 03 27 00 00 call 10b78c return RTEMS_SUCCESSFUL; 109089: 83 c4 10 add $0x10,%esp } 10908c: 8b 45 e4 mov -0x1c(%ebp),%eax 10908f: 8d 65 f4 lea -0xc(%ebp),%esp 109092: 5b pop %ebx 109093: 5e pop %esi 109094: 5f pop %edi 109095: c9 leave 109096: c3 ret /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start( 109097: 56 push %esi 109098: 53 push %ebx 109099: 68 2c a8 10 00 push $0x10a82c 10909e: ff b3 c4 00 00 00 pushl 0xc4(%ebx) 1090a4: e8 2b 2a 00 00 call 10bad4 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 1090a9: 83 c4 10 add $0x10,%esp 1090ac: 85 c0 test %eax,%eax 1090ae: 0f 85 3f 03 00 00 jne 1093f3 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( 1090b4: 51 push %ecx 1090b5: 53 push %ebx 1090b6: 68 dc aa 10 00 push $0x10aadc 1090bb: ff b3 c8 00 00 00 pushl 0xc8(%ebx) 1090c1: e8 0e 2a 00 00 call 10bad4 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 1090c6: 83 c4 10 add $0x10,%esp 1090c9: 85 c0 test %eax,%eax 1090cb: 74 ae je 10907b <== ALWAYS TAKEN 1090cd: e9 21 03 00 00 jmp 1093f3 <== NOT EXECUTED 1090d2: 66 90 xchg %ax,%ax <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 1090d4: 83 ec 08 sub $0x8,%esp 1090d7: 68 e8 00 00 00 push $0xe8 1090dc: 6a 01 push $0x1 1090de: 89 55 dc mov %edx,-0x24(%ebp) 1090e1: e8 1e ee ff ff call 107f04 1090e6: 89 45 e0 mov %eax,-0x20(%ebp) 1090e9: 89 c3 mov %eax,%ebx if (tty == NULL) { 1090eb: 83 c4 10 add $0x10,%esp 1090ee: 85 c0 test %eax,%eax 1090f0: 8b 55 dc mov -0x24(%ebp),%edx 1090f3: 0f 84 75 02 00 00 je 10936e return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 1090f9: a1 24 41 12 00 mov 0x124124,%eax 1090fe: 8b 4d e0 mov -0x20(%ebp),%ecx 109101: 89 41 64 mov %eax,0x64(%ecx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 109104: 8b 41 64 mov 0x64(%ecx),%eax 109107: 83 ec 0c sub $0xc,%esp 10910a: 50 push %eax 10910b: 89 55 dc mov %edx,-0x24(%ebp) 10910e: e8 55 f2 ff ff call 108368 109113: 89 45 c4 mov %eax,-0x3c(%ebp) 109116: 8b 7d e0 mov -0x20(%ebp),%edi 109119: 89 47 58 mov %eax,0x58(%edi) if (tty->rawInBuf.theBuf == NULL) { 10911c: 83 c4 10 add $0x10,%esp 10911f: 85 c0 test %eax,%eax 109121: 8b 55 dc mov -0x24(%ebp),%edx 109124: 0f 84 61 02 00 00 je 10938b return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 10912a: a1 28 41 12 00 mov 0x124128,%eax 10912f: 8b 4d e0 mov -0x20(%ebp),%ecx 109132: 89 81 88 00 00 00 mov %eax,0x88(%ecx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 109138: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 10913e: 83 ec 0c sub $0xc,%esp 109141: 50 push %eax 109142: 89 55 dc mov %edx,-0x24(%ebp) 109145: e8 1e f2 ff ff call 108368 10914a: 89 c7 mov %eax,%edi 10914c: 8b 45 e0 mov -0x20(%ebp),%eax 10914f: 89 78 7c mov %edi,0x7c(%eax) if (tty->rawOutBuf.theBuf == NULL) { 109152: 83 c4 10 add $0x10,%esp 109155: 85 ff test %edi,%edi 109157: 8b 55 dc mov -0x24(%ebp),%edx 10915a: 0f 84 4f 02 00 00 je 1093af <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 109160: 83 ec 0c sub $0xc,%esp 109163: ff 35 20 41 12 00 pushl 0x124120 109169: 89 55 dc mov %edx,-0x24(%ebp) 10916c: e8 f7 f1 ff ff call 108368 109171: 8b 4d e0 mov -0x20(%ebp),%ecx 109174: 89 41 1c mov %eax,0x1c(%ecx) if (tty->cbuf == NULL) { 109177: 83 c4 10 add $0x10,%esp 10917a: 85 c0 test %eax,%eax 10917c: 8b 55 dc mov -0x24(%ebp),%edx 10917f: 0f 84 77 02 00 00 je 1093fc return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 109185: 8b 7d e0 mov -0x20(%ebp),%edi 109188: c7 87 d4 00 00 00 00 movl $0x0,0xd4(%edi) 10918f: 00 00 00 tty->tty_snd.sw_arg = NULL; 109192: c7 87 d8 00 00 00 00 movl $0x0,0xd8(%edi) 109199: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 10919c: c7 87 dc 00 00 00 00 movl $0x0,0xdc(%edi) 1091a3: 00 00 00 tty->tty_rcv.sw_arg = NULL; 1091a6: c7 87 e0 00 00 00 00 movl $0x0,0xe0(%edi) 1091ad: 00 00 00 tty->tty_rcvwakeup = 0; 1091b0: c7 87 e4 00 00 00 00 movl $0x0,0xe4(%edi) 1091b7: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 1091ba: 89 37 mov %esi,(%edi) tty->back = NULL; 1091bc: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) if (rtems_termios_ttyHead != NULL) 1091c3: 85 f6 test %esi,%esi 1091c5: 74 03 je 1091ca rtems_termios_ttyHead->back = tty; 1091c7: 89 7e 04 mov %edi,0x4(%esi) rtems_termios_ttyHead = tty; 1091ca: 8b 45 e0 mov -0x20(%ebp),%eax 1091cd: a3 b4 63 12 00 mov %eax,0x1263b4 if (rtems_termios_ttyTail == NULL) 1091d2: 8b 0d b0 63 12 00 mov 0x1263b0,%ecx 1091d8: 85 c9 test %ecx,%ecx 1091da: 0f 84 af 02 00 00 je 10948f rtems_termios_ttyTail = tty; tty->minor = minor; 1091e0: 8b 75 0c mov 0xc(%ebp),%esi 1091e3: 8b 4d e0 mov -0x20(%ebp),%ecx 1091e6: 89 71 10 mov %esi,0x10(%ecx) tty->major = major; 1091e9: 89 51 0c mov %edx,0xc(%ecx) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1091ec: 83 ec 0c sub $0xc,%esp 1091ef: 89 c8 mov %ecx,%eax 1091f1: 83 c0 14 add $0x14,%eax 1091f4: 50 push %eax 1091f5: 6a 00 push $0x0 1091f7: 6a 54 push $0x54 1091f9: 6a 01 push $0x1 rtems_build_name ('T', 'R', 'i', c), 1091fb: 0f be 05 2c 41 12 00 movsbl 0x12412c,%eax tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 109202: 0d 00 69 52 54 or $0x54526900,%eax 109207: 50 push %eax 109208: 89 55 dc mov %edx,-0x24(%ebp) 10920b: e8 04 22 00 00 call 10b414 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) 109210: 83 c4 20 add $0x20,%esp 109213: 85 c0 test %eax,%eax 109215: 8b 55 dc mov -0x24(%ebp),%edx 109218: 0f 85 d5 01 00 00 jne 1093f3 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10921e: 83 ec 0c sub $0xc,%esp 109221: 8b 45 e0 mov -0x20(%ebp),%eax 109224: 83 c0 18 add $0x18,%eax 109227: 50 push %eax 109228: 6a 00 push $0x0 10922a: 6a 54 push $0x54 10922c: 6a 01 push $0x1 rtems_build_name ('T', 'R', 'o', c), 10922e: 0f be 05 2c 41 12 00 movsbl 0x12412c,%eax RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 109235: 0d 00 6f 52 54 or $0x54526f00,%eax 10923a: 50 push %eax 10923b: 89 55 dc mov %edx,-0x24(%ebp) 10923e: e8 d1 21 00 00 call 10b414 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) 109243: 83 c4 20 add $0x20,%esp 109246: 85 c0 test %eax,%eax 109248: 8b 55 dc mov -0x24(%ebp),%edx 10924b: 0f 85 a2 01 00 00 jne 1093f3 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 109251: 83 ec 0c sub $0xc,%esp 109254: 8b 45 e0 mov -0x20(%ebp),%eax 109257: 05 8c 00 00 00 add $0x8c,%eax 10925c: 50 push %eax 10925d: 6a 00 push $0x0 10925f: 6a 20 push $0x20 109261: 6a 00 push $0x0 rtems_build_name ('T', 'R', 'x', c), 109263: 0f be 05 2c 41 12 00 movsbl 0x12412c,%eax RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10926a: 0d 00 78 52 54 or $0x54527800,%eax 10926f: 50 push %eax 109270: 89 55 dc mov %edx,-0x24(%ebp) 109273: e8 9c 21 00 00 call 10b414 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 109278: 83 c4 20 add $0x20,%esp 10927b: 85 c0 test %eax,%eax 10927d: 8b 55 dc mov -0x24(%ebp),%edx 109280: 0f 85 6d 01 00 00 jne 1093f3 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 109286: 8b 7d e0 mov -0x20(%ebp),%edi 109289: c7 87 94 00 00 00 00 movl $0x0,0x94(%edi) 109290: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 109293: 81 c7 98 00 00 00 add $0x98,%edi 109299: b9 08 00 00 00 mov $0x8,%ecx 10929e: 8b 75 14 mov 0x14(%ebp),%esi 1092a1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1092a3: 8b 7d e0 mov -0x20(%ebp),%edi 1092a6: 83 bf b4 00 00 00 02 cmpl $0x2,0xb4(%edi) 1092ad: 0f 84 64 01 00 00 je 109417 <== NEVER TAKEN &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 1092b3: 8b 45 e0 mov -0x20(%ebp),%eax 1092b6: 8b 88 a0 00 00 00 mov 0xa0(%eax),%ecx 1092bc: 85 c9 test %ecx,%ecx 1092be: 0f 84 fc 00 00 00 je 1093c0 1092c4: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 1092cb: 0f 84 ef 00 00 00 je 1093c0 <== NEVER TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 1092d1: 8b 4d e0 mov -0x20(%ebp),%ecx 1092d4: c7 41 30 02 25 00 00 movl $0x2502,0x30(%ecx) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 1092db: c7 41 34 05 18 00 00 movl $0x1805,0x34(%ecx) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 1092e2: c7 41 38 bd 08 00 00 movl $0x8bd,0x38(%ecx) tty->termios.c_lflag = 1092e9: c7 41 3c 3b 82 00 00 movl $0x823b,0x3c(%ecx) ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 1092f0: c6 41 41 03 movb $0x3,0x41(%ecx) tty->termios.c_cc[VQUIT] = '\034'; 1092f4: c6 41 42 1c movb $0x1c,0x42(%ecx) tty->termios.c_cc[VERASE] = '\177'; 1092f8: c6 41 43 7f movb $0x7f,0x43(%ecx) tty->termios.c_cc[VKILL] = '\025'; 1092fc: c6 41 44 15 movb $0x15,0x44(%ecx) tty->termios.c_cc[VEOF] = '\004'; 109300: c6 41 45 04 movb $0x4,0x45(%ecx) tty->termios.c_cc[VEOL] = '\000'; 109304: c6 41 4c 00 movb $0x0,0x4c(%ecx) tty->termios.c_cc[VEOL2] = '\000'; 109308: c6 41 51 00 movb $0x0,0x51(%ecx) tty->termios.c_cc[VSTART] = '\021'; 10930c: c6 41 49 11 movb $0x11,0x49(%ecx) tty->termios.c_cc[VSTOP] = '\023'; 109310: c6 41 4a 13 movb $0x13,0x4a(%ecx) tty->termios.c_cc[VSUSP] = '\032'; 109314: c6 41 4b 1a movb $0x1a,0x4b(%ecx) tty->termios.c_cc[VREPRINT] = '\022'; 109318: c6 41 4d 12 movb $0x12,0x4d(%ecx) tty->termios.c_cc[VDISCARD] = '\017'; 10931c: c6 41 4e 0f movb $0xf,0x4e(%ecx) tty->termios.c_cc[VWERASE] = '\027'; 109320: c6 41 4f 17 movb $0x17,0x4f(%ecx) tty->termios.c_cc[VLNEXT] = '\026'; 109324: c6 41 50 16 movb $0x16,0x50(%ecx) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 109328: c7 81 b8 00 00 00 00 movl $0x0,0xb8(%ecx) 10932f: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 109332: 8b 41 64 mov 0x64(%ecx),%eax 109335: d1 e8 shr %eax 109337: 89 81 bc 00 00 00 mov %eax,0xbc(%ecx) tty->highwater = tty->rawInBuf.Size * 3/4; 10933d: 8b 41 64 mov 0x64(%ecx),%eax 109340: 8d 04 40 lea (%eax,%eax,2),%eax 109343: c1 e8 02 shr $0x2,%eax 109346: 89 81 c0 00 00 00 mov %eax,0xc0(%ecx) /* * Bump name characer */ if (c++ == 'z') 10934c: a0 2c 41 12 00 mov 0x12412c,%al 109351: 8d 48 01 lea 0x1(%eax),%ecx 109354: 88 0d 2c 41 12 00 mov %cl,0x12412c 10935a: 3c 7a cmp $0x7a,%al 10935c: 0f 85 e6 fc ff ff jne 109048 c = 'a'; 109362: c6 05 2c 41 12 00 61 movb $0x61,0x12412c 109369: e9 da fc ff ff jmp 109048 /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 10936e: 83 ec 0c sub $0xc,%esp 109371: ff 35 ac 63 12 00 pushl 0x1263ac 109377: e8 10 24 00 00 call 10b78c return RTEMS_NO_MEMORY; 10937c: 83 c4 10 add $0x10,%esp 10937f: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) 109386: e9 01 fd ff ff jmp 10908c * 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); 10938b: 83 ec 0c sub $0xc,%esp 10938e: 57 push %edi */ 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); 10938f: e8 00 ed ff ff call 108094 rtems_semaphore_release (rtems_termios_ttyMutex); 109394: 5f pop %edi 109395: ff 35 ac 63 12 00 pushl 0x1263ac 10939b: e8 ec 23 00 00 call 10b78c return RTEMS_NO_MEMORY; 1093a0: 83 c4 10 add $0x10,%esp 1093a3: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) 1093aa: e9 dd fc ff ff jmp 10908c * 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)); 1093af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1093b2: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 1093b5: e8 da ec ff ff call 108094 <== NOT EXECUTED free(tty); 1093ba: 58 pop %eax <== NOT EXECUTED 1093bb: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 1093be: eb cf jmp 10938f <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 1093c0: 83 ec 0c sub $0xc,%esp 1093c3: 8b 45 e0 mov -0x20(%ebp),%eax 1093c6: 83 c0 68 add $0x68,%eax 1093c9: 50 push %eax 1093ca: 6a 00 push $0x0 1093cc: 6a 24 push $0x24 1093ce: 6a 00 push $0x0 rtems_build_name ('T', 'R', 'r', c), 1093d0: 0f be 05 2c 41 12 00 movsbl 0x12412c,%eax rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 1093d7: 0d 00 72 52 54 or $0x54527200,%eax 1093dc: 50 push %eax 1093dd: 89 55 dc mov %edx,-0x24(%ebp) 1093e0: e8 2f 20 00 00 call 10b414 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 1093e5: 83 c4 20 add $0x20,%esp 1093e8: 85 c0 test %eax,%eax 1093ea: 8b 55 dc mov -0x24(%ebp),%edx 1093ed: 0f 84 de fe ff ff je 1092d1 rtems_fatal_error_occurred (sc); sc = rtems_task_start( tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 1093f3: 83 ec 0c sub $0xc,%esp 1093f6: 50 push %eax 1093f7: e8 d4 28 00 00 call 10bcd0 /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 1093fc: 83 ec 0c sub $0xc,%esp 1093ff: 57 push %edi 109400: e8 8f ec ff ff call 108094 free((void *)(tty->rawInBuf.theBuf)); 109405: 5e pop %esi 109406: ff 75 c4 pushl -0x3c(%ebp) 109409: e8 86 ec ff ff call 108094 free(tty); 10940e: 5b pop %ebx 10940f: ff 75 e0 pushl -0x20(%ebp) 109412: e9 78 ff ff ff jmp 10938f /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 109417: 50 push %eax 109418: 50 push %eax 109419: 89 f8 mov %edi,%eax 10941b: 05 c8 00 00 00 add $0xc8,%eax 109420: 50 push %eax 109421: 6a 00 push $0x0 109423: 68 00 05 00 00 push $0x500 109428: 68 00 04 00 00 push $0x400 10942d: 6a 0a push $0xa rtems_build_name ('T', 'x', 'T', c), 10942f: 0f be 05 2c 41 12 00 movsbl 0x12412c,%eax /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 109436: 0d 00 54 78 54 or $0x54785400,%eax 10943b: 50 push %eax 10943c: 89 55 dc mov %edx,-0x24(%ebp) 10943f: e8 e8 23 00 00 call 10b82c TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 109444: 83 c4 20 add $0x20,%esp 109447: 85 c0 test %eax,%eax 109449: 8b 55 dc mov -0x24(%ebp),%edx 10944c: 75 a5 jne 1093f3 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 10944e: 56 push %esi 10944f: 56 push %esi 109450: 8b 45 e0 mov -0x20(%ebp),%eax 109453: 05 c4 00 00 00 add $0xc4,%eax 109458: 50 push %eax 109459: 6a 00 push $0x0 10945b: 68 00 05 00 00 push $0x500 109460: 68 00 04 00 00 push $0x400 109465: 6a 09 push $0x9 rtems_build_name ('R', 'x', 'T', c), 109467: 0f be 05 2c 41 12 00 movsbl 0x12412c,%eax RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 10946e: 0d 00 54 78 52 or $0x52785400,%eax 109473: 50 push %eax 109474: 89 55 dc mov %edx,-0x24(%ebp) 109477: e8 b0 23 00 00 call 10b82c TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 10947c: 83 c4 20 add $0x20,%esp 10947f: 85 c0 test %eax,%eax 109481: 8b 55 dc mov -0x24(%ebp),%edx 109484: 0f 84 29 fe ff ff je 1092b3 10948a: e9 64 ff ff ff jmp 1093f3 <== 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; 10948f: a3 b0 63 12 00 mov %eax,0x1263b0 109494: e9 47 fd ff ff jmp 1091e0 =============================================================================== 00109aac : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 109aac: 55 push %ebp 109aad: 89 e5 mov %esp,%ebp 109aaf: 57 push %edi 109ab0: 56 push %esi 109ab1: 53 push %ebx 109ab2: 83 ec 1c sub $0x1c,%esp 109ab5: 8b 45 08 mov 0x8(%ebp),%eax 109ab8: 8b 55 0c mov 0xc(%ebp),%edx 109abb: 89 55 e4 mov %edx,-0x1c(%ebp) 109abe: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 109ac1: 89 c6 mov %eax,%esi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 109ac3: 8b 8b b4 00 00 00 mov 0xb4(%ebx),%ecx 109ac9: 85 c9 test %ecx,%ecx 109acb: 0f 84 eb 00 00 00 je 109bbc (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 109ad1: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109ad7: 89 45 e0 mov %eax,-0x20(%ebp) while (len) { 109ada: 8b 55 e4 mov -0x1c(%ebp),%edx 109add: 85 d2 test %edx,%edx 109adf: 0f 84 cf 00 00 00 je 109bb4 <== NEVER TAKEN 109ae5: 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; 109ae8: 8b 45 e0 mov -0x20(%ebp),%eax 109aeb: 40 inc %eax 109aec: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 109af2: 31 d2 xor %edx,%edx 109af4: f7 f1 div %ecx 109af6: 89 55 dc mov %edx,-0x24(%ebp) 109af9: 89 55 e0 mov %edx,-0x20(%ebp) rtems_interrupt_disable (level); 109afc: 9c pushf 109afd: fa cli 109afe: 5f pop %edi while (newHead == tty->rawOutBuf.Tail) { 109aff: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109b05: 3b 55 e0 cmp -0x20(%ebp),%edx 109b08: 75 3e jne 109b48 109b0a: 89 f8 mov %edi,%eax 109b0c: 89 f7 mov %esi,%edi 109b0e: 89 d6 mov %edx,%esi tty->rawOutBufState = rob_wait; 109b10: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109b17: 00 00 00 rtems_interrupt_enable (level); 109b1a: 50 push %eax 109b1b: 9d popf sc = rtems_semaphore_obtain( 109b1c: 50 push %eax 109b1d: 6a 00 push $0x0 109b1f: 6a 00 push $0x0 109b21: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109b27: e8 64 1b 00 00 call 10b690 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109b2c: 83 c4 10 add $0x10,%esp 109b2f: 85 c0 test %eax,%eax 109b31: 0f 85 a0 00 00 00 jne 109bd7 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 109b37: 9c pushf 109b38: fa cli 109b39: 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) { 109b3a: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109b40: 39 f2 cmp %esi,%edx 109b42: 74 cc je 109b10 <== NEVER TAKEN 109b44: 89 fe mov %edi,%esi 109b46: 89 c7 mov %eax,%edi tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 109b48: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109b4e: 8b 4b 7c mov 0x7c(%ebx),%ecx 109b51: 8a 16 mov (%esi),%dl 109b53: 88 14 01 mov %dl,(%ecx,%eax,1) tty->rawOutBuf.Head = newHead; 109b56: 8b 45 dc mov -0x24(%ebp),%eax 109b59: 89 83 80 00 00 00 mov %eax,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 109b5f: 8b 8b 94 00 00 00 mov 0x94(%ebx),%ecx 109b65: 85 c9 test %ecx,%ecx 109b67: 75 23 jne 109b8c /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 109b69: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109b6f: a8 10 test $0x10,%al 109b71: 74 26 je 109b99 <== ALWAYS 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; 109b73: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b79: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 109b7c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 109b82: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 109b89: 00 00 00 } rtems_interrupt_enable (level); 109b8c: 57 push %edi 109b8d: 9d popf if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 109b8e: ff 4d e4 decl -0x1c(%ebp) 109b91: 74 21 je 109bb4 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 109b93: 46 inc %esi 109b94: e9 4f ff ff ff jmp 109ae8 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); 109b99: 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, 109b9f: 52 push %edx 109ba0: 6a 01 push $0x1 109ba2: 03 43 7c add 0x7c(%ebx),%eax 109ba5: 50 push %eax 109ba6: ff 73 10 pushl 0x10(%ebx) 109ba9: ff 93 a4 00 00 00 call *0xa4(%ebx) 109baf: 83 c4 10 add $0x10,%esp 109bb2: eb ce jmp 109b82 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109bb4: 8d 65 f4 lea -0xc(%ebp),%esp 109bb7: 5b pop %ebx 109bb8: 5e pop %esi 109bb9: 5f pop %edi 109bba: c9 leave 109bbb: 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); 109bbc: 89 55 10 mov %edx,0x10(%ebp) 109bbf: 89 45 0c mov %eax,0xc(%ebp) 109bc2: 8b 43 10 mov 0x10(%ebx),%eax 109bc5: 89 45 08 mov %eax,0x8(%ebp) 109bc8: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109bce: 8d 65 f4 lea -0xc(%ebp),%esp 109bd1: 5b pop %ebx 109bd2: 5e pop %esi 109bd3: 5f pop %edi 109bd4: c9 leave unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 109bd5: ff e0 jmp *%eax tty->rawOutBufState = rob_wait; 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); 109bd7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109bda: 50 push %eax <== NOT EXECUTED 109bdb: e8 f0 20 00 00 call 10bcd0 <== NOT EXECUTED =============================================================================== 0010a1b8 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 10a1b8: 55 push %ebp 10a1b9: 89 e5 mov %esp,%ebp 10a1bb: 57 push %edi 10a1bc: 56 push %esi 10a1bd: 53 push %ebx 10a1be: 83 ec 30 sub $0x30,%esp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a1c1: 8b 55 08 mov 0x8(%ebp),%edx 10a1c4: 8b 02 mov (%edx),%eax 10a1c6: 8b 58 34 mov 0x34(%eax),%ebx uint32_t count = args->count; 10a1c9: 8b 4a 10 mov 0x10(%edx),%ecx 10a1cc: 89 4d dc mov %ecx,-0x24(%ebp) char *buffer = args->buffer; 10a1cf: 8b 42 0c mov 0xc(%edx),%eax 10a1d2: 89 45 d8 mov %eax,-0x28(%ebp) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a1d5: 6a 00 push $0x0 10a1d7: 6a 00 push $0x0 10a1d9: ff 73 14 pushl 0x14(%ebx) 10a1dc: e8 af 14 00 00 call 10b690 10a1e1: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) 10a1e4: 83 c4 10 add $0x10,%esp 10a1e7: 85 c0 test %eax,%eax 10a1e9: 75 35 jne 10a220 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 10a1eb: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a1f1: c1 e0 05 shl $0x5,%eax 10a1f4: 8b 80 48 60 12 00 mov 0x126048(%eax),%eax 10a1fa: 85 c0 test %eax,%eax 10a1fc: 74 2e je 10a22c sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 10a1fe: 83 ec 08 sub $0x8,%esp 10a201: ff 75 08 pushl 0x8(%ebp) 10a204: 53 push %ebx 10a205: ff d0 call *%eax 10a207: 89 45 e0 mov %eax,-0x20(%ebp) tty->tty_rcvwakeup = 0; 10a20a: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10a211: 00 00 00 rtems_semaphore_release (tty->isem); 10a214: 59 pop %ecx 10a215: ff 73 14 pushl 0x14(%ebx) 10a218: e8 6f 15 00 00 call 10b78c return sc; 10a21d: 83 c4 10 add $0x10,%esp } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 10a220: 8b 45 e0 mov -0x20(%ebp),%eax 10a223: 8d 65 f4 lea -0xc(%ebp),%esp 10a226: 5b pop %ebx 10a227: 5e pop %esi 10a228: 5f pop %edi 10a229: c9 leave 10a22a: c3 ret 10a22b: 90 nop <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 10a22c: 8b 53 20 mov 0x20(%ebx),%edx 10a22f: 39 53 24 cmp %edx,0x24(%ebx) 10a232: 74 5f je 10a293 <== ALWAYS TAKEN sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 10a234: 8b 45 dc mov -0x24(%ebp),%eax 10a237: 85 c0 test %eax,%eax 10a239: 74 29 je 10a264 <== NEVER TAKEN 10a23b: 8b 43 24 mov 0x24(%ebx),%eax 10a23e: 3b 43 20 cmp 0x20(%ebx),%eax 10a241: 7d 21 jge 10a264 <== NEVER TAKEN 10a243: 8b 55 d8 mov -0x28(%ebp),%edx 10a246: 8b 7d dc mov -0x24(%ebp),%edi 10a249: eb 06 jmp 10a251 10a24b: 90 nop <== NOT EXECUTED 10a24c: 39 43 20 cmp %eax,0x20(%ebx) 10a24f: 7e 10 jle 10a261 *buffer++ = tty->cbuf[tty->cindex++]; 10a251: 8b 73 1c mov 0x1c(%ebx),%esi 10a254: 8a 0c 06 mov (%esi,%eax,1),%cl 10a257: 88 0a mov %cl,(%edx) 10a259: 42 inc %edx 10a25a: 40 inc %eax 10a25b: 89 43 24 mov %eax,0x24(%ebx) sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 10a25e: 4f dec %edi 10a25f: 75 eb jne 10a24c 10a261: 89 7d dc mov %edi,-0x24(%ebp) *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 10a264: 8b 55 08 mov 0x8(%ebp),%edx 10a267: 8b 42 10 mov 0x10(%edx),%eax 10a26a: 2b 45 dc sub -0x24(%ebp),%eax 10a26d: 89 42 18 mov %eax,0x18(%edx) tty->tty_rcvwakeup = 0; 10a270: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10a277: 00 00 00 rtems_semaphore_release (tty->isem); 10a27a: 83 ec 0c sub $0xc,%esp 10a27d: ff 73 14 pushl 0x14(%ebx) 10a280: e8 07 15 00 00 call 10b78c return sc; 10a285: 83 c4 10 add $0x10,%esp } 10a288: 8b 45 e0 mov -0x20(%ebp),%eax 10a28b: 8d 65 f4 lea -0xc(%ebp),%esp 10a28e: 5b pop %ebx 10a28f: 5e pop %esi 10a290: 5f pop %edi 10a291: c9 leave 10a292: c3 ret rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 10a293: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) 10a29a: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) tty->read_start_column = tty->column; 10a2a1: 8b 43 28 mov 0x28(%ebx),%eax 10a2a4: 89 43 2c mov %eax,0x2c(%ebx) if (tty->device.pollRead != NULL && 10a2a7: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 10a2ad: 85 c0 test %eax,%eax 10a2af: 74 0e je 10a2bf 10a2b1: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx 10a2b7: 85 d2 test %edx,%edx 10a2b9: 0f 84 82 01 00 00 je 10a441 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 10a2bf: 8b 73 74 mov 0x74(%ebx),%esi rtems_status_code sc; int wait = (int)1; 10a2c2: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) 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)( 10a2c9: 8d 4b 49 lea 0x49(%ebx),%ecx 10a2cc: 89 4d d4 mov %ecx,-0x2c(%ebp) 10a2cf: 90 nop while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a2d0: 8b 53 5c mov 0x5c(%ebx),%edx 10a2d3: 8b 43 60 mov 0x60(%ebx),%eax 10a2d6: 39 c2 cmp %eax,%edx 10a2d8: 0f 84 06 01 00 00 je 10a3e4 (tty->ccount < (CBUFSIZE-1))) { 10a2de: a1 20 41 12 00 mov 0x124120,%eax 10a2e3: 48 dec %eax while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a2e4: 3b 43 20 cmp 0x20(%ebx),%eax 10a2e7: 7f 3c jg 10a325 <== ALWAYS TAKEN 10a2e9: e9 f6 00 00 00 jmp 10a3e4 <== NOT EXECUTED 10a2ee: 66 90 xchg %ax,%ax <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) 10a2f0: 0f b6 c1 movzbl %cl,%eax 10a2f3: 89 da mov %ebx,%edx 10a2f5: e8 9e fd ff ff call 10a098 10a2fa: 85 c0 test %eax,%eax 10a2fc: 74 07 je 10a305 wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; 10a2fe: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) } timeout = tty->rawInBufSemaphoreTimeout; 10a305: 8b 73 70 mov 0x70(%ebx),%esi while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a308: 8b 53 5c mov 0x5c(%ebx),%edx 10a30b: 8b 43 60 mov 0x60(%ebx),%eax 10a30e: 39 c2 cmp %eax,%edx 10a310: 0f 84 ce 00 00 00 je 10a3e4 (tty->ccount < (CBUFSIZE-1))) { 10a316: a1 20 41 12 00 mov 0x124120,%eax 10a31b: 48 dec %eax while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a31c: 39 43 20 cmp %eax,0x20(%ebx) 10a31f: 0f 8d bf 00 00 00 jge 10a3e4 <== NEVER TAKEN (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 10a325: 8b 43 5c mov 0x5c(%ebx),%eax 10a328: 8b 4b 64 mov 0x64(%ebx),%ecx 10a32b: 40 inc %eax 10a32c: 31 d2 xor %edx,%edx 10a32e: f7 f1 div %ecx c = tty->rawInBuf.theBuf[newHead]; 10a330: 8b 43 58 mov 0x58(%ebx),%eax 10a333: 8a 0c 10 mov (%eax,%edx,1),%cl tty->rawInBuf.Head = newHead; 10a336: 89 53 5c mov %edx,0x5c(%ebx) if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 10a339: 8b 43 60 mov 0x60(%ebx),%eax 10a33c: 8b 7b 64 mov 0x64(%ebx),%edi % tty->rawInBuf.Size) 10a33f: 8b 73 64 mov 0x64(%ebx),%esi unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 10a342: 8d 04 07 lea (%edi,%eax,1),%eax 10a345: 29 d0 sub %edx,%eax % tty->rawInBuf.Size) 10a347: 31 d2 xor %edx,%edx 10a349: f7 f6 div %esi unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 10a34b: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx 10a351: 73 5d jae 10a3b0 <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 10a353: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a359: 83 e0 fe and $0xfffffffe,%eax 10a35c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 10a362: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a368: 25 02 02 00 00 and $0x202,%eax 10a36d: 3d 02 02 00 00 cmp $0x202,%eax 10a372: 0f 84 94 00 00 00 je 10a40c <== NEVER TAKEN && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 10a378: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a37e: f6 c4 01 test $0x1,%ah 10a381: 74 2d je 10a3b0 <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; 10a383: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a389: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10a38c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 10a392: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 10a398: 85 c0 test %eax,%eax <== NOT EXECUTED 10a39a: 74 14 je 10a3b0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 10a39c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a39f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a3a2: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10a3a5: ff d0 call *%eax <== NOT EXECUTED 10a3a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a3aa: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 10a3ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 10a3b0: f6 43 3c 02 testb $0x2,0x3c(%ebx) 10a3b4: 0f 85 36 ff ff ff jne 10a2f0 <== ALWAYS TAKEN if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 10a3ba: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 10a3bd: 89 da mov %ebx,%edx <== NOT EXECUTED 10a3bf: e8 d4 fc ff ff call 10a098 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a3c4: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 10a3c8: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10a3cb: 0f 8d 2d ff ff ff jge 10a2fe <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 10a3d1: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a3d4: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 10a3d7: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a3da: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10a3dc: 0f 85 34 ff ff ff jne 10a316 <== NOT EXECUTED 10a3e2: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 10a3e4: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a3e7: 85 c9 test %ecx,%ecx 10a3e9: 0f 84 45 fe ff ff je 10a234 sc = rtems_semaphore_obtain( 10a3ef: 52 push %edx 10a3f0: 56 push %esi 10a3f1: ff 73 6c pushl 0x6c(%ebx) 10a3f4: ff 73 68 pushl 0x68(%ebx) 10a3f7: e8 94 12 00 00 call 10b690 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 10a3fc: 83 c4 10 add $0x10,%esp 10a3ff: 85 c0 test %eax,%eax 10a401: 0f 84 c9 fe ff ff je 10a2d0 <== ALWAYS TAKEN 10a407: e9 28 fe ff ff jmp 10a234 <== NOT EXECUTED < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 10a40c: 8b bb 94 00 00 00 mov 0x94(%ebx),%edi <== NOT EXECUTED 10a412: 85 ff test %edi,%edi <== NOT EXECUTED 10a414: 74 0e je 10a424 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 10a416: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a41c: a8 20 test $0x20,%al <== NOT EXECUTED 10a41e: 0f 84 54 ff ff ff je 10a378 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 10a424: 56 push %esi <== NOT EXECUTED 10a425: 6a 01 push $0x1 <== NOT EXECUTED 10a427: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10a42a: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a42d: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10a430: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a436: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a439: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 10a43c: e9 6f ff ff ff jmp 10a3b0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 10a441: f6 43 3c 02 testb $0x2,0x3c(%ebx) 10a445: 75 1d jne 10a464 10a447: eb 39 jmp 10a482 10a449: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 10a44c: 0f b6 c0 movzbl %al,%eax 10a44f: 89 da mov %ebx,%edx 10a451: e8 42 fc ff ff call 10a098 10a456: 85 c0 test %eax,%eax 10a458: 0f 85 d6 fd ff ff jne 10a234 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 10a45e: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax for (;;) { n = (*tty->device.pollRead)(tty->minor); 10a464: 83 ec 0c sub $0xc,%esp 10a467: ff 73 10 pushl 0x10(%ebx) 10a46a: ff d0 call *%eax if (n < 0) { 10a46c: 83 c4 10 add $0x10,%esp 10a46f: 85 c0 test %eax,%eax 10a471: 79 d9 jns 10a44c rtems_task_wake_after (1); 10a473: 83 ec 0c sub $0xc,%esp 10a476: 6a 01 push $0x1 10a478: e8 cb 16 00 00 call 10bb48 10a47d: 83 c4 10 add $0x10,%esp 10a480: eb dc jmp 10a45e } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 10a482: e8 01 0b 00 00 call 10af88 10a487: 89 c6 mov %eax,%esi 10a489: 8d 76 00 lea 0x0(%esi),%esi for (;;) { n = (*tty->device.pollRead)(tty->minor); 10a48c: 83 ec 0c sub $0xc,%esp 10a48f: ff 73 10 pushl 0x10(%ebx) 10a492: ff 93 a0 00 00 00 call *0xa0(%ebx) if (n < 0) { 10a498: 83 c4 10 add $0x10,%esp 10a49b: 85 c0 test %eax,%eax 10a49d: 78 25 js 10a4c4 break; } } rtems_task_wake_after (1); } else { siproc (n, tty); 10a49f: 0f b6 c0 movzbl %al,%eax 10a4a2: 89 da mov %ebx,%edx 10a4a4: e8 ef fb ff ff call 10a098 if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a4a9: 8a 43 47 mov 0x47(%ebx),%al 10a4ac: 0f b6 d0 movzbl %al,%edx 10a4af: 39 53 20 cmp %edx,0x20(%ebx) 10a4b2: 0f 8d 7c fd ff ff jge 10a234 <== NEVER TAKEN break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 10a4b8: 84 c0 test %al,%al 10a4ba: 74 d0 je 10a48c <== NEVER TAKEN 10a4bc: 80 7b 46 00 cmpb $0x0,0x46(%ebx) 10a4c0: 74 ca je 10a48c <== NEVER TAKEN 10a4c2: eb be jmp 10a482 then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 10a4c4: 80 7b 47 00 cmpb $0x0,0x47(%ebx) 10a4c8: 74 1d je 10a4e7 <== NEVER TAKEN if (tty->termios.c_cc[VTIME] && tty->ccount) { 10a4ca: 80 7b 46 00 cmpb $0x0,0x46(%ebx) 10a4ce: 74 08 je 10a4d8 <== NEVER TAKEN 10a4d0: 8b 43 20 mov 0x20(%ebx),%eax 10a4d3: 85 c0 test %eax,%eax 10a4d5: 75 1a jne 10a4f1 10a4d7: 90 nop now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 10a4d8: 83 ec 0c sub $0xc,%esp 10a4db: 6a 01 push $0x1 10a4dd: e8 66 16 00 00 call 10bb48 10a4e2: 83 c4 10 add $0x10,%esp 10a4e5: eb a5 jmp 10a48c if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 10a4e7: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a4eb: 0f 84 43 fd ff ff je 10a234 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 10a4f1: e8 92 0a 00 00 call 10af88 if ((now - then) > tty->vtimeTicks) { 10a4f6: 29 f0 sub %esi,%eax 10a4f8: 3b 43 54 cmp 0x54(%ebx),%eax 10a4fb: 76 db jbe 10a4d8 10a4fd: e9 32 fd ff ff jmp 10a234 =============================================================================== 0010a898 : * 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) { 10a898: 55 push %ebp 10a899: 89 e5 mov %esp,%ebp 10a89b: 57 push %edi 10a89c: 56 push %esi 10a89d: 53 push %ebx 10a89e: 83 ec 0c sub $0xc,%esp 10a8a1: 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)) 10a8a4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a8aa: 25 03 04 00 00 and $0x403,%eax 10a8af: 3d 01 04 00 00 cmp $0x401,%eax 10a8b4: 0f 84 62 01 00 00 je 10aa1c <== NEVER TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 10a8ba: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a8c0: 83 e0 03 and $0x3,%eax 10a8c3: 83 f8 02 cmp $0x2,%eax 10a8c6: 0f 84 8c 01 00 00 je 10aa58 <== NEVER TAKEN tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 10a8cc: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10a8d2: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10a8d8: 39 c2 cmp %eax,%edx 10a8da: 0f 84 a4 00 00 00 je 10a984 rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 10a8e0: 9c pushf 10a8e1: fa cli 10a8e2: 58 pop %eax len = tty->t_dqlen; 10a8e3: 8b b3 90 00 00 00 mov 0x90(%ebx),%esi tty->t_dqlen = 0; 10a8e9: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 10a8f0: 00 00 00 rtems_interrupt_enable(level); 10a8f3: 50 push %eax 10a8f4: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 10a8f5: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10a8fb: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 10a901: 8d 04 06 lea (%esi,%eax,1),%eax 10a904: 31 d2 xor %edx,%edx 10a906: f7 f1 div %ecx 10a908: 89 d6 mov %edx,%esi tty->rawOutBuf.Tail = newTail; 10a90a: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 10a910: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 10a917: 0f 84 e7 00 00 00 je 10aa04 * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 10a91d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10a923: 39 f0 cmp %esi,%eax 10a925: 74 79 je 10a9a0 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)) 10a927: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a92d: 25 10 02 00 00 and $0x210,%eax 10a932: 3d 10 02 00 00 cmp $0x210,%eax 10a937: 0f 84 57 01 00 00 je 10aa94 <== NEVER TAKEN nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 10a93d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10a943: 39 c6 cmp %eax,%esi 10a945: 0f 87 91 00 00 00 ja 10a9dc nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 10a94b: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi 10a951: 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)) { 10a953: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a959: f6 c4 06 test $0x6,%ah 10a95c: 0f 85 91 00 00 00 jne 10a9f3 10a962: 89 f8 mov %edi,%eax nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 10a964: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 10a96b: 00 00 00 (*tty->device.write)( 10a96e: 52 push %edx 10a96f: 50 push %eax 10a970: 8b 43 7c mov 0x7c(%ebx),%eax 10a973: 01 f0 add %esi,%eax 10a975: 50 push %eax 10a976: ff 73 10 pushl 0x10(%ebx) 10a979: ff 93 a4 00 00 00 call *0xa4(%ebx) 10a97f: 83 c4 10 add $0x10,%esp 10a982: eb 48 jmp 10a9cc } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 10a984: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 10a98b: 0f 84 2b 01 00 00 je 10aabc <== NEVER TAKEN /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 10a991: 31 ff xor %edi,%edi tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10a993: 89 f8 mov %edi,%eax 10a995: 8d 65 f4 lea -0xc(%ebp),%esp 10a998: 5b pop %ebx 10a999: 5e pop %esi 10a99a: 5f pop %edi 10a99b: c9 leave 10a99c: c3 ret 10a99d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 10a9a0: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 10a9a7: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 10a9aa: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 10a9b0: 85 c0 test %eax,%eax 10a9b2: 0f 84 1c 01 00 00 je 10aad4 <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 10a9b8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a9bb: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 10a9c1: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 10a9c4: 52 push %edx <== NOT EXECUTED 10a9c5: ff d0 call *%eax <== NOT EXECUTED 10a9c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 10a9ca: 31 ff xor %edi,%edi <== NOT EXECUTED } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 10a9cc: 89 b3 84 00 00 00 mov %esi,0x84(%ebx) } return nToSend; } 10a9d2: 89 f8 mov %edi,%eax 10a9d4: 8d 65 f4 lea -0xc(%ebp),%esp 10a9d7: 5b pop %ebx 10a9d8: 5e pop %esi 10a9d9: 5f pop %edi 10a9da: c9 leave 10a9db: c3 ret } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 10a9dc: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 10a9e2: 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)) { 10a9e4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a9ea: f6 c4 06 test $0x6,%ah 10a9ed: 0f 84 6f ff ff ff je 10a962 <== ALWAYS TAKEN 10a9f3: b8 01 00 00 00 mov $0x1,%eax nToSend = 1; 10a9f8: bf 01 00 00 00 mov $0x1,%edi 10a9fd: e9 62 ff ff ff jmp 10a964 10aa02: 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); 10aa04: 83 ec 0c sub $0xc,%esp 10aa07: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10aa0d: e8 7a 0d 00 00 call 10b78c 10aa12: 83 c4 10 add $0x10,%esp 10aa15: e9 03 ff ff ff jmp 10a91d 10aa1a: 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, (void *)&(tty->termios.c_cc[VSTOP]), 1); 10aa1c: 56 push %esi <== NOT EXECUTED 10aa1d: 6a 01 push $0x1 <== NOT EXECUTED 10aa1f: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 10aa22: 50 push %eax <== NOT EXECUTED 10aa23: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10aa26: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED rtems_interrupt_disable(level); 10aa2c: 9c pushf <== NOT EXECUTED 10aa2d: fa cli <== NOT EXECUTED 10aa2e: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10aa2f: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 10aa35: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10aa3b: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10aa3e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 10aa44: 52 push %edx <== NOT EXECUTED 10aa45: 9d popf <== NOT EXECUTED 10aa46: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend = 1; 10aa49: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10aa4e: 89 f8 mov %edi,%eax <== NOT EXECUTED 10aa50: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10aa53: 5b pop %ebx <== NOT EXECUTED 10aa54: 5e pop %esi <== NOT EXECUTED 10aa55: 5f pop %edi <== NOT EXECUTED 10aa56: c9 leave <== NOT EXECUTED 10aa57: 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, (void *)&(tty->termios.c_cc[VSTART]), 1); 10aa58: 51 push %ecx <== NOT EXECUTED 10aa59: 6a 01 push $0x1 <== NOT EXECUTED 10aa5b: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 10aa5e: 50 push %eax <== NOT EXECUTED 10aa5f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10aa62: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED rtems_interrupt_disable(level); 10aa68: 9c pushf <== NOT EXECUTED 10aa69: fa cli <== NOT EXECUTED 10aa6a: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10aa6b: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 10aa71: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10aa77: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10aa7a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 10aa80: 52 push %edx <== NOT EXECUTED 10aa81: 9d popf <== NOT EXECUTED 10aa82: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend = 1; 10aa85: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10aa8a: 89 f8 mov %edi,%eax <== NOT EXECUTED 10aa8c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10aa8f: 5b pop %ebx <== NOT EXECUTED 10aa90: 5e pop %esi <== NOT EXECUTED 10aa91: 5f pop %edi <== NOT EXECUTED 10aa92: c9 leave <== NOT EXECUTED 10aa93: c3 ret <== 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); 10aa94: 9c pushf <== NOT EXECUTED 10aa95: fa cli <== NOT EXECUTED 10aa96: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 10aa97: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10aa9d: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 10aaa0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 10aaa6: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 10aaad: 00 00 00 rtems_interrupt_enable(level); 10aab0: 52 push %edx <== NOT EXECUTED 10aab1: 9d popf <== NOT EXECUTED nToSend = 0; 10aab2: 31 ff xor %edi,%edi <== NOT EXECUTED 10aab4: e9 13 ff ff ff jmp 10a9cc <== NOT EXECUTED 10aab9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 10aabc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aabf: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 10aac5: e8 c2 0c 00 00 call 10b78c <== NOT EXECUTED 10aaca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; 10aacd: 31 ff xor %edi,%edi <== NOT EXECUTED 10aacf: e9 bf fe ff ff jmp 10a993 <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 10aad4: 31 ff xor %edi,%edi 10aad6: e9 f1 fe ff ff jmp 10a9cc =============================================================================== 0010a82c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 10a82c: 55 push %ebp 10a82d: 89 e5 mov %esp,%ebp 10a82f: 57 push %edi 10a830: 56 push %esi 10a831: 53 push %ebx 10a832: 83 ec 1c sub $0x1c,%esp 10a835: 8b 5d 08 mov 0x8(%ebp),%ebx 10a838: 8d 75 e0 lea -0x20(%ebp),%esi 10a83b: 8d 7d e7 lea -0x19(%ebp),%edi 10a83e: eb 14 jmp 10a854 } /* * do something */ c = tty->device.pollRead(tty->minor); 10a840: 83 ec 0c sub $0xc,%esp 10a843: ff 73 10 pushl 0x10(%ebx) 10a846: ff 93 a0 00 00 00 call *0xa0(%ebx) if (c != EOF) { 10a84c: 83 c4 10 add $0x10,%esp 10a84f: 83 f8 ff cmp $0xffffffff,%eax 10a852: 75 30 jne 10a884 while (1) { /* * wait for rtems event */ rtems_event_receive( 10a854: 56 push %esi 10a855: 6a 00 push $0x0 10a857: 6a 02 push $0x2 10a859: 6a 03 push $0x3 10a85b: e8 94 07 00 00 call 10aff4 (TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 10a860: 83 c4 10 add $0x10,%esp 10a863: f6 45 e0 01 testb $0x1,-0x20(%ebp) 10a867: 74 d7 je 10a840 <== ALWAYS TAKEN tty->rxTaskId = 0; 10a869: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 10a870: 00 00 00 rtems_task_delete(RTEMS_SELF); 10a873: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a876: 6a 00 push $0x0 <== NOT EXECUTED 10a878: e8 0f 11 00 00 call 10b98c <== NOT EXECUTED 10a87d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a880: eb be jmp 10a840 <== NOT EXECUTED 10a882: 66 90 xchg %ax,%ax <== NOT EXECUTED c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 10a884: 88 45 e7 mov %al,-0x19(%ebp) rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 10a887: 50 push %eax 10a888: 6a 01 push $0x1 10a88a: 57 push %edi 10a88b: 53 push %ebx 10a88c: e8 8f fc ff ff call 10a520 10a891: 83 c4 10 add $0x10,%esp 10a894: eb be jmp 10a854 =============================================================================== 0010c6b8 : int rtems_termios_set_initial_baud( struct rtems_termios_tty *ttyp, int32_t baud ) { 10c6b8: 55 push %ebp 10c6b9: 89 e5 mov %esp,%ebp 10c6bb: 53 push %ebx 10c6bc: 83 ec 10 sub $0x10,%esp 10c6bf: 8b 5d 08 mov 0x8(%ebp),%ebx int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); 10c6c2: ff 75 0c pushl 0xc(%ebp) 10c6c5: e8 96 e3 ff ff call 10aa60 if ( cflags_baud == -1 ) 10c6ca: 83 c4 10 add $0x10,%esp 10c6cd: 83 f8 ff cmp $0xffffffff,%eax 10c6d0: 74 16 je 10c6e8 return -1; ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; 10c6d2: 8b 53 38 mov 0x38(%ebx),%edx 10c6d5: 81 e2 f0 ef ff ff and $0xffffeff0,%edx 10c6db: 09 c2 or %eax,%edx 10c6dd: 89 53 38 mov %edx,0x38(%ebx) return 0; 10c6e0: 31 c0 xor %eax,%eax } 10c6e2: 8b 5d fc mov -0x4(%ebp),%ebx 10c6e5: c9 leave 10c6e6: c3 ret 10c6e7: 90 nop <== NOT EXECUTED { int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); if ( cflags_baud == -1 ) return -1; 10c6e8: b8 ff ff ff ff mov $0xffffffff,%eax ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; return 0; } 10c6ed: 8b 5d fc mov -0x4(%ebp),%ebx 10c6f0: c9 leave 10c6f1: c3 ret =============================================================================== 0010aadc : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 10aadc: 55 push %ebp 10aadd: 89 e5 mov %esp,%ebp 10aadf: 56 push %esi 10aae0: 53 push %ebx 10aae1: 83 ec 10 sub $0x10,%esp 10aae4: 8b 5d 08 mov 0x8(%ebp),%ebx 10aae7: 8d 75 f4 lea -0xc(%ebp),%esi 10aaea: eb 28 jmp 10ab14 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10aaec: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10aaf2: c1 e0 05 shl $0x5,%eax 10aaf5: 8b 80 54 60 12 00 mov 0x126054(%eax),%eax 10aafb: 85 c0 test %eax,%eax 10aafd: 74 09 je 10ab08 <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 10aaff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ab02: 53 push %ebx <== NOT EXECUTED 10ab03: ff d0 call *%eax <== NOT EXECUTED 10ab05: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 10ab08: 83 ec 0c sub $0xc,%esp 10ab0b: 53 push %ebx 10ab0c: e8 87 fd ff ff call 10a898 } 10ab11: 83 c4 10 add $0x10,%esp while (1) { /* * wait for rtems event */ rtems_event_receive( 10ab14: 56 push %esi 10ab15: 6a 00 push $0x0 10ab17: 6a 02 push $0x2 10ab19: 6a 03 push $0x3 10ab1b: e8 d4 04 00 00 call 10aff4 (TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 10ab20: 83 c4 10 add $0x10,%esp 10ab23: f6 45 f4 01 testb $0x1,-0xc(%ebp) 10ab27: 74 c3 je 10aaec <== ALWAYS TAKEN tty->txTaskId = 0; 10ab29: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 10ab30: 00 00 00 rtems_task_delete(RTEMS_SELF); 10ab33: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ab36: 6a 00 push $0x0 <== NOT EXECUTED 10ab38: e8 4f 0e 00 00 call 10b98c <== NOT EXECUTED 10ab3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ab40: eb aa jmp 10aaec <== NOT EXECUTED =============================================================================== 0010a0ec : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 10a0ec: 55 push %ebp 10a0ed: 89 e5 mov %esp,%ebp 10a0ef: 57 push %edi 10a0f0: 56 push %esi 10a0f1: 53 push %ebx 10a0f2: 83 ec 20 sub $0x20,%esp 10a0f5: 8b 7d 08 mov 0x8(%ebp),%edi rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a0f8: 8b 07 mov (%edi),%eax 10a0fa: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a0fd: 6a 00 push $0x0 10a0ff: 6a 00 push $0x0 10a101: ff 76 18 pushl 0x18(%esi) 10a104: e8 87 15 00 00 call 10b690 10a109: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) 10a10c: 83 c4 10 add $0x10,%esp 10a10f: 85 c0 test %eax,%eax 10a111: 75 29 jne 10a13c <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 10a113: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 10a119: c1 e0 05 shl $0x5,%eax 10a11c: 8b 80 4c 60 12 00 mov 0x12604c(%eax),%eax 10a122: 85 c0 test %eax,%eax 10a124: 74 22 je 10a148 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 10a126: 83 ec 08 sub $0x8,%esp 10a129: 57 push %edi 10a12a: 56 push %esi 10a12b: ff d0 call *%eax 10a12d: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_semaphore_release (tty->osem); 10a130: 5f pop %edi 10a131: ff 76 18 pushl 0x18(%esi) 10a134: e8 53 16 00 00 call 10b78c return sc; 10a139: 83 c4 10 add $0x10,%esp rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 10a13c: 8b 45 e4 mov -0x1c(%ebp),%eax 10a13f: 8d 65 f4 lea -0xc(%ebp),%esp 10a142: 5b pop %ebx 10a143: 5e pop %esi 10a144: 5f pop %edi 10a145: c9 leave 10a146: c3 ret 10a147: 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) { 10a148: f6 46 34 01 testb $0x1,0x34(%esi) 10a14c: 74 4e je 10a19c <== NEVER TAKEN uint32_t count = args->count; 10a14e: 8b 47 10 mov 0x10(%edi),%eax 10a151: 89 45 e0 mov %eax,-0x20(%ebp) char *buffer = args->buffer; 10a154: 8b 47 0c mov 0xc(%edi),%eax while (count--) 10a157: 8b 5d e0 mov -0x20(%ebp),%ebx 10a15a: 85 db test %ebx,%ebx 10a15c: 74 56 je 10a1b4 <== NEVER TAKEN 10a15e: 31 db xor %ebx,%ebx 10a160: 89 7d dc mov %edi,-0x24(%ebp) 10a163: 89 c7 mov %eax,%edi 10a165: 8d 76 00 lea 0x0(%esi),%esi oproc (*buffer++, tty); 10a168: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 10a16c: 89 f2 mov %esi,%edx 10a16e: e8 6d fa ff ff call 109be0 10a173: 43 inc %ebx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10a174: 39 5d e0 cmp %ebx,-0x20(%ebp) 10a177: 75 ef jne 10a168 10a179: 8b 7d dc mov -0x24(%ebp),%edi 10a17c: 8b 47 10 mov 0x10(%edi),%eax oproc (*buffer++, tty); args->bytes_moved = args->count; 10a17f: 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); 10a182: 83 ec 0c sub $0xc,%esp 10a185: ff 76 18 pushl 0x18(%esi) 10a188: e8 ff 15 00 00 call 10b78c return sc; 10a18d: 83 c4 10 add $0x10,%esp } 10a190: 8b 45 e4 mov -0x1c(%ebp),%eax 10a193: 8d 65 f4 lea -0xc(%ebp),%esp 10a196: 5b pop %ebx 10a197: 5e pop %esi 10a198: 5f pop %edi 10a199: c9 leave 10a19a: c3 ret 10a19b: 90 nop <== NOT EXECUTED char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 10a19c: 51 push %ecx <== NOT EXECUTED 10a19d: 56 push %esi <== NOT EXECUTED 10a19e: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED 10a1a1: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED 10a1a4: e8 03 f9 ff ff call 109aac <== NOT EXECUTED args->bytes_moved = args->count; 10a1a9: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED 10a1ac: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED 10a1af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a1b2: eb ce jmp 10a182 <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10a1b4: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a1b6: eb c7 jmp 10a17f <== NOT EXECUTED =============================================================================== 001186b0 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 1186b0: 55 push %ebp 1186b1: 89 e5 mov %esp,%ebp 1186b3: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1186b6: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1186b9: 50 push %eax 1186ba: ff 75 08 pushl 0x8(%ebp) 1186bd: 68 20 2b 14 00 push $0x142b20 1186c2: e8 b9 2b 00 00 call 11b280 <_Objects_Get> switch ( location ) { 1186c7: 83 c4 10 add $0x10,%esp 1186ca: 8b 55 f4 mov -0xc(%ebp),%edx 1186cd: 85 d2 test %edx,%edx 1186cf: 74 07 je 1186d8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1186d1: b8 04 00 00 00 mov $0x4,%eax } 1186d6: c9 leave 1186d7: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 1186d8: 83 78 38 04 cmpl $0x4,0x38(%eax) 1186dc: 74 0f je 1186ed <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 1186de: 83 ec 0c sub $0xc,%esp 1186e1: 83 c0 10 add $0x10,%eax 1186e4: 50 push %eax 1186e5: e8 62 48 00 00 call 11cf4c <_Watchdog_Remove> 1186ea: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 1186ed: e8 1e 34 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1186f2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186f4: c9 leave 1186f5: c3 ret =============================================================================== 0010bfbc : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10bfbc: 55 push %ebp 10bfbd: 89 e5 mov %esp,%ebp 10bfbf: 57 push %edi 10bfc0: 56 push %esi 10bfc1: 53 push %ebx 10bfc2: 83 ec 0c sub $0xc,%esp 10bfc5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfc8: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bfcb: 85 db test %ebx,%ebx 10bfcd: 74 6d je 10c03c return RTEMS_INVALID_NAME; if ( !id ) 10bfcf: 85 f6 test %esi,%esi 10bfd1: 0f 84 89 00 00 00 je 10c060 10bfd7: a1 b4 8e 12 00 mov 0x128eb4,%eax 10bfdc: 40 inc %eax 10bfdd: a3 b4 8e 12 00 mov %eax,0x128eb4 * 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 ); 10bfe2: 83 ec 0c sub $0xc,%esp 10bfe5: 68 c0 98 12 00 push $0x1298c0 10bfea: e8 2d 0f 00 00 call 10cf1c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10bfef: 83 c4 10 add $0x10,%esp 10bff2: 85 c0 test %eax,%eax 10bff4: 74 56 je 10c04c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10bff6: 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; 10bffd: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c004: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10c00b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10c012: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c019: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c01c: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c01f: 8b 0d dc 98 12 00 mov 0x1298dc,%ecx 10c025: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c028: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10c02b: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10c02d: e8 32 1c 00 00 call 10dc64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c032: 31 c0 xor %eax,%eax } 10c034: 8d 65 f4 lea -0xc(%ebp),%esp 10c037: 5b pop %ebx 10c038: 5e pop %esi 10c039: 5f pop %edi 10c03a: c9 leave 10c03b: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c03c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c041: 8d 65 f4 lea -0xc(%ebp),%esp 10c044: 5b pop %ebx 10c045: 5e pop %esi 10c046: 5f pop %edi 10c047: c9 leave 10c048: c3 ret 10c049: 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(); 10c04c: e8 13 1c 00 00 call 10dc64 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c051: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c056: 8d 65 f4 lea -0xc(%ebp),%esp 10c059: 5b pop %ebx 10c05a: 5e pop %esi 10c05b: 5f pop %edi 10c05c: c9 leave 10c05d: c3 ret 10c05e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c060: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c065: 8d 65 f4 lea -0xc(%ebp),%esp 10c068: 5b pop %ebx 10c069: 5e pop %esi 10c06a: 5f pop %edi 10c06b: c9 leave 10c06c: c3 ret =============================================================================== 001187ac : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1187ac: 55 push %ebp 1187ad: 89 e5 mov %esp,%ebp 1187af: 53 push %ebx 1187b0: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1187b3: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1187b6: 50 push %eax 1187b7: ff 75 08 pushl 0x8(%ebp) 1187ba: 68 20 2b 14 00 push $0x142b20 1187bf: e8 bc 2a 00 00 call 11b280 <_Objects_Get> 1187c4: 89 c3 mov %eax,%ebx switch ( location ) { 1187c6: 83 c4 10 add $0x10,%esp 1187c9: 8b 4d f4 mov -0xc(%ebp),%ecx 1187cc: 85 c9 test %ecx,%ecx 1187ce: 75 38 jne 118808 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1187d0: 83 ec 08 sub $0x8,%esp 1187d3: 50 push %eax 1187d4: 68 20 2b 14 00 push $0x142b20 1187d9: e8 2a 26 00 00 call 11ae08 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 1187de: 8d 43 10 lea 0x10(%ebx),%eax 1187e1: 89 04 24 mov %eax,(%esp) 1187e4: e8 63 47 00 00 call 11cf4c <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 1187e9: 58 pop %eax 1187ea: 5a pop %edx 1187eb: 53 push %ebx 1187ec: 68 20 2b 14 00 push $0x142b20 1187f1: e8 0e 29 00 00 call 11b104 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 1187f6: e8 15 33 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1187fb: 83 c4 10 add $0x10,%esp 1187fe: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118800: 8b 5d fc mov -0x4(%ebp),%ebx 118803: c9 leave 118804: c3 ret 118805: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118808: b8 04 00 00 00 mov $0x4,%eax } 11880d: 8b 5d fc mov -0x4(%ebp),%ebx 118810: c9 leave 118811: c3 ret =============================================================================== 0010c070 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10c070: 55 push %ebp 10c071: 89 e5 mov %esp,%ebp 10c073: 57 push %edi 10c074: 56 push %esi 10c075: 53 push %ebx 10c076: 83 ec 2c sub $0x2c,%esp 10c079: 8b 5d 0c mov 0xc(%ebp),%ebx 10c07c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c07f: 85 db test %ebx,%ebx 10c081: 0f 84 99 00 00 00 je 10c120 return RTEMS_INVALID_NUMBER; if ( !routine ) 10c087: 85 f6 test %esi,%esi 10c089: 0f 84 b1 00 00 00 je 10c140 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10c08f: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10c090: 8d 45 e4 lea -0x1c(%ebp),%eax 10c093: 50 push %eax 10c094: ff 75 08 pushl 0x8(%ebp) 10c097: 68 c0 98 12 00 push $0x1298c0 10c09c: e8 33 13 00 00 call 10d3d4 <_Objects_Get> 10c0a1: 89 c7 mov %eax,%edi switch ( location ) { 10c0a3: 83 c4 10 add $0x10,%esp 10c0a6: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c0a9: 85 c9 test %ecx,%ecx 10c0ab: 74 0f je 10c0bc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c0ad: b8 04 00 00 00 mov $0x4,%eax } 10c0b2: 8d 65 f4 lea -0xc(%ebp),%esp 10c0b5: 5b pop %ebx 10c0b6: 5e pop %esi 10c0b7: 5f pop %edi 10c0b8: c9 leave 10c0b9: c3 ret 10c0ba: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10c0bc: 8d 50 10 lea 0x10(%eax),%edx 10c0bf: 83 ec 0c sub $0xc,%esp 10c0c2: 52 push %edx 10c0c3: 89 55 d4 mov %edx,-0x2c(%ebp) 10c0c6: e8 4d 2c 00 00 call 10ed18 <_Watchdog_Remove> _ISR_Disable( level ); 10c0cb: 9c pushf 10c0cc: fa cli 10c0cd: 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 ) { 10c0ce: 83 c4 10 add $0x10,%esp 10c0d1: 8b 57 18 mov 0x18(%edi),%edx 10c0d4: 85 d2 test %edx,%edx 10c0d6: 8b 55 d4 mov -0x2c(%ebp),%edx 10c0d9: 75 55 jne 10c130 /* * 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; 10c0db: 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; 10c0e2: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10c0e9: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10c0ec: 8b 4d 08 mov 0x8(%ebp),%ecx 10c0ef: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10c0f2: 8b 4d 14 mov 0x14(%ebp),%ecx 10c0f5: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10c0f8: 50 push %eax 10c0f9: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c0fa: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c0fd: 83 ec 08 sub $0x8,%esp 10c100: 52 push %edx 10c101: 68 84 8f 12 00 push $0x128f84 10c106: e8 d5 2a 00 00 call 10ebe0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10c10b: e8 54 1b 00 00 call 10dc64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c110: 83 c4 10 add $0x10,%esp 10c113: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c115: 8d 65 f4 lea -0xc(%ebp),%esp 10c118: 5b pop %ebx 10c119: 5e pop %esi 10c11a: 5f pop %edi 10c11b: c9 leave 10c11c: c3 ret 10c11d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; 10c120: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c125: 8d 65 f4 lea -0xc(%ebp),%esp 10c128: 5b pop %ebx 10c129: 5e pop %esi 10c12a: 5f pop %edi 10c12b: c9 leave 10c12c: c3 ret 10c12d: 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 ); 10c130: 50 push %eax 10c131: 9d popf _Thread_Enable_dispatch(); 10c132: e8 2d 1b 00 00 call 10dc64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c137: 31 c0 xor %eax,%eax 10c139: e9 74 ff ff ff jmp 10c0b2 10c13e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10c140: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c145: 8d 65 f4 lea -0xc(%ebp),%esp 10c148: 5b pop %ebx 10c149: 5e pop %esi 10c14a: 5f pop %edi 10c14b: c9 leave 10c14c: c3 ret =============================================================================== 001188f4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1188f4: 55 push %ebp 1188f5: 89 e5 mov %esp,%ebp 1188f7: 57 push %edi 1188f8: 56 push %esi 1188f9: 53 push %ebx 1188fa: 83 ec 2c sub $0x2c,%esp 1188fd: 8b 75 08 mov 0x8(%ebp),%esi 118900: 8b 7d 0c mov 0xc(%ebp),%edi 118903: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 118906: 80 3d 28 21 14 00 00 cmpb $0x0,0x142128 11890d: 75 0d jne 11891c return RTEMS_NOT_DEFINED; 11890f: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118914: 8d 65 f4 lea -0xc(%ebp),%esp 118917: 5b pop %ebx 118918: 5e pop %esi 118919: 5f pop %edi 11891a: c9 leave 11891b: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 11891c: 83 ec 0c sub $0xc,%esp 11891f: 57 push %edi 118920: e8 93 d4 ff ff call 115db8 <_TOD_Validate> 118925: 83 c4 10 add $0x10,%esp 118928: 84 c0 test %al,%al 11892a: 74 1e je 11894a return RTEMS_INVALID_CLOCK; if ( !routine ) 11892c: 85 db test %ebx,%ebx 11892e: 0f 84 a4 00 00 00 je 1189d8 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 118934: 83 ec 0c sub $0xc,%esp 118937: 57 push %edi 118938: e8 ef d3 ff ff call 115d2c <_TOD_To_seconds> 11893d: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11893f: 83 c4 10 add $0x10,%esp 118942: 3b 05 a8 21 14 00 cmp 0x1421a8,%eax 118948: 77 0e ja 118958 return RTEMS_INVALID_CLOCK; 11894a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11894f: 8d 65 f4 lea -0xc(%ebp),%esp 118952: 5b pop %ebx 118953: 5e pop %esi 118954: 5f pop %edi 118955: c9 leave 118956: c3 ret 118957: 90 nop <== NOT EXECUTED 118958: 50 push %eax seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118959: 8d 45 e4 lea -0x1c(%ebp),%eax 11895c: 50 push %eax 11895d: 56 push %esi 11895e: 68 20 2b 14 00 push $0x142b20 118963: e8 18 29 00 00 call 11b280 <_Objects_Get> switch ( location ) { 118968: 83 c4 10 add $0x10,%esp 11896b: 8b 4d e4 mov -0x1c(%ebp),%ecx 11896e: 85 c9 test %ecx,%ecx 118970: 75 5a jne 1189cc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118972: 8d 48 10 lea 0x10(%eax),%ecx 118975: 83 ec 0c sub $0xc,%esp 118978: 51 push %ecx 118979: 89 45 d0 mov %eax,-0x30(%ebp) 11897c: 89 4d d4 mov %ecx,-0x2c(%ebp) 11897f: e8 c8 45 00 00 call 11cf4c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 118984: 8b 55 d0 mov -0x30(%ebp),%edx 118987: 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; 11898e: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118995: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118998: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 11899b: 8b 45 14 mov 0x14(%ebp),%eax 11899e: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 1189a1: 2b 3d a8 21 14 00 sub 0x1421a8,%edi 1189a7: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1189aa: 58 pop %eax 1189ab: 5a pop %edx 1189ac: 8b 4d d4 mov -0x2c(%ebp),%ecx 1189af: 51 push %ecx 1189b0: 68 d8 21 14 00 push $0x1421d8 1189b5: e8 5a 44 00 00 call 11ce14 <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1189ba: e8 51 31 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1189bf: 83 c4 10 add $0x10,%esp 1189c2: 31 c0 xor %eax,%eax 1189c4: e9 4b ff ff ff jmp 118914 1189c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1189cc: b8 04 00 00 00 mov $0x4,%eax 1189d1: e9 3e ff ff ff jmp 118914 1189d6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 1189d8: b8 09 00 00 00 mov $0x9,%eax 1189dd: e9 32 ff ff ff jmp 118914 =============================================================================== 001189e4 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 1189e4: 55 push %ebp 1189e5: 89 e5 mov %esp,%ebp 1189e7: 53 push %ebx 1189e8: 83 ec 14 sub $0x14,%esp 1189eb: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 1189ee: 85 db test %ebx,%ebx 1189f0: 74 4a je 118a3c 1189f2: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 1189f3: 8d 45 f4 lea -0xc(%ebp),%eax 1189f6: 50 push %eax 1189f7: ff 75 08 pushl 0x8(%ebp) 1189fa: 68 20 2b 14 00 push $0x142b20 1189ff: e8 7c 28 00 00 call 11b280 <_Objects_Get> switch ( location ) { 118a04: 83 c4 10 add $0x10,%esp 118a07: 8b 55 f4 mov -0xc(%ebp),%edx 118a0a: 85 d2 test %edx,%edx 118a0c: 74 0a je 118a18 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118a0e: b8 04 00 00 00 mov $0x4,%eax } 118a13: 8b 5d fc mov -0x4(%ebp),%ebx 118a16: c9 leave 118a17: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 118a18: 8b 50 38 mov 0x38(%eax),%edx 118a1b: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 118a1d: 8b 50 1c mov 0x1c(%eax),%edx 118a20: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 118a23: 8b 50 24 mov 0x24(%eax),%edx 118a26: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 118a29: 8b 40 28 mov 0x28(%eax),%eax 118a2c: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 118a2f: e8 dc 30 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118a34: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a36: 8b 5d fc mov -0x4(%ebp),%ebx 118a39: c9 leave 118a3a: c3 ret 118a3b: 90 nop <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 118a3c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a41: 8b 5d fc mov -0x4(%ebp),%ebx 118a44: c9 leave 118a45: c3 ret =============================================================================== 00119070 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 119070: 55 push %ebp 119071: 89 e5 mov %esp,%ebp 119073: 56 push %esi 119074: 53 push %ebx 119075: 83 ec 10 sub $0x10,%esp 119078: 8b 45 08 mov 0x8(%ebp),%eax 11907b: 85 c0 test %eax,%eax 11907d: 74 41 je 1190c0 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 11907f: 0f b6 15 14 9a 13 00 movzbl 0x139a14,%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 119086: 39 d0 cmp %edx,%eax 119088: 76 42 jbe 1190cc * 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 ) 11908a: 40 inc %eax 11908b: 75 33 jne 1190c0 return RTEMS_INVALID_PRIORITY; _priority = 0; 11908d: 31 f6 xor %esi,%esi 11908f: 8b 15 14 21 14 00 mov 0x142114,%edx 119095: 42 inc %edx 119096: 89 15 14 21 14 00 mov %edx,0x142114 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11909c: 8a 1d 40 da 13 00 mov 0x13da40,%bl initialized = true; 1190a2: c6 05 40 da 13 00 01 movb $0x1,0x13da40 _Thread_Enable_dispatch(); 1190a9: e8 62 2a 00 00 call 11bb10 <_Thread_Enable_dispatch> if ( tmpInitialized ) 1190ae: 84 db test %bl,%bl 1190b0: 74 1e je 1190d0 return RTEMS_INCORRECT_STATE; 1190b2: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 1190b7: 8d 65 f8 lea -0x8(%ebp),%esp 1190ba: 5b pop %ebx 1190bb: 5e pop %esi 1190bc: c9 leave 1190bd: c3 ret 1190be: 66 90 xchg %ax,%ax <== NOT EXECUTED * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) return RTEMS_INVALID_PRIORITY; 1190c0: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 1190c5: 8d 65 f8 lea -0x8(%ebp),%esp 1190c8: 5b pop %ebx 1190c9: 5e pop %esi 1190ca: c9 leave 1190cb: c3 ret 1190cc: 89 c6 mov %eax,%esi 1190ce: eb bf jmp 11908f * 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( 1190d0: 83 ec 08 sub $0x8,%esp 1190d3: 8d 45 f4 lea -0xc(%ebp),%eax 1190d6: 50 push %eax 1190d7: 8b 45 10 mov 0x10(%ebp),%eax 1190da: 80 cc 80 or $0x80,%ah 1190dd: 50 push %eax 1190de: 68 00 01 00 00 push $0x100 1190e3: ff 75 0c pushl 0xc(%ebp) 1190e6: 56 push %esi 1190e7: 68 45 4d 49 54 push $0x54494d45 1190ec: e8 e3 ec ff ff call 117dd4 /* 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) { 1190f1: 83 c4 20 add $0x20,%esp 1190f4: 85 c0 test %eax,%eax 1190f6: 74 10 je 119108 initialized = false; 1190f8: c6 05 40 da 13 00 00 movb $0x0,0x13da40 initialized = false; } #endif return status; } 1190ff: 8d 65 f8 lea -0x8(%ebp),%esp 119102: 5b pop %ebx 119103: 5e pop %esi 119104: c9 leave 119105: c3 ret 119106: 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) 119108: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 11910b: 0f b7 c8 movzwl %ax,%ecx 11910e: 8b 15 bc 20 14 00 mov 0x1420bc,%edx /* * 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( 119114: 8b 14 8a mov (%edx,%ecx,4),%edx 119117: 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); 11911d: c7 05 f0 d9 13 00 f4 movl $0x13d9f4,0x13d9f0 119124: d9 13 00 the_chain->permanent_null = NULL; 119127: c7 05 f4 d9 13 00 00 movl $0x0,0x13d9f4 11912e: 00 00 00 the_chain->last = _Chain_Head(the_chain); 119131: c7 05 f8 d9 13 00 f0 movl $0x13d9f0,0x13d9f8 119138: d9 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11913b: c7 05 28 da 13 00 2c movl $0x13da2c,0x13da28 119142: da 13 00 the_chain->permanent_null = NULL; 119145: c7 05 2c da 13 00 00 movl $0x0,0x13da2c 11914c: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11914f: c7 05 30 da 13 00 28 movl $0x13da28,0x13da30 119156: da 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119159: c7 05 d0 d9 13 00 00 movl $0x0,0x13d9d0 119160: 00 00 00 the_watchdog->routine = routine; 119163: c7 05 e4 d9 13 00 5c movl $0x11b95c,0x13d9e4 11916a: b9 11 00 the_watchdog->id = id; 11916d: a3 e8 d9 13 00 mov %eax,0x13d9e8 the_watchdog->user_data = user_data; 119172: c7 05 ec d9 13 00 00 movl $0x0,0x13d9ec 119179: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11917c: c7 05 08 da 13 00 00 movl $0x0,0x13da08 119183: 00 00 00 the_watchdog->routine = routine; 119186: c7 05 1c da 13 00 5c movl $0x11b95c,0x13da1c 11918d: b9 11 00 the_watchdog->id = id; 119190: a3 20 da 13 00 mov %eax,0x13da20 the_watchdog->user_data = user_data; 119195: c7 05 24 da 13 00 00 movl $0x0,0x13da24 11919c: 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; 11919f: c7 05 c4 d9 13 00 40 movl $0x118f40,0x13d9c4 1191a6: 8f 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1191a9: 8b 15 64 22 14 00 mov 0x142264,%edx 1191af: 89 15 fc d9 13 00 mov %edx,0x13d9fc ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1191b5: 8b 15 a8 21 14 00 mov 0x1421a8,%edx 1191bb: 89 15 34 da 13 00 mov %edx,0x13da34 ts->insert_chain = NULL; 1191c1: c7 05 38 da 13 00 00 movl $0x0,0x13da38 1191c8: 00 00 00 ts->active = false; 1191cb: c6 05 3c da 13 00 00 movb $0x0,0x13da3c /* * The default timer server is now available. */ _Timer_server = ts; 1191d2: c7 05 60 2b 14 00 c0 movl $0x13d9c0,0x142b60 1191d9: d9 13 00 /* * Start the timer server */ status = rtems_task_start( 1191dc: 53 push %ebx 1191dd: 68 c0 d9 13 00 push $0x13d9c0 1191e2: 68 94 8d 11 00 push $0x118d94 1191e7: 50 push %eax 1191e8: e8 a7 f2 ff ff call 118494 if (status) { initialized = false; } #endif return status; 1191ed: 83 c4 10 add $0x10,%esp 1191f0: e9 d0 fe ff ff jmp 1190c5 =============================================================================== 00118a6c : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118a6c: 55 push %ebp 118a6d: 89 e5 mov %esp,%ebp 118a6f: 56 push %esi 118a70: 53 push %ebx 118a71: 83 ec 24 sub $0x24,%esp Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); 118a74: 8d 45 f4 lea -0xc(%ebp),%eax 118a77: 50 push %eax 118a78: ff 75 08 pushl 0x8(%ebp) 118a7b: 68 20 2b 14 00 push $0x142b20 118a80: e8 fb 27 00 00 call 11b280 <_Objects_Get> 118a85: 89 c3 mov %eax,%ebx switch ( location ) { 118a87: 83 c4 10 add $0x10,%esp 118a8a: 8b 45 f4 mov -0xc(%ebp),%eax 118a8d: 85 c0 test %eax,%eax 118a8f: 74 0f je 118aa0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118a91: b8 04 00 00 00 mov $0x4,%eax } 118a96: 8d 65 f8 lea -0x8(%ebp),%esp 118a99: 5b pop %ebx 118a9a: 5e pop %esi 118a9b: c9 leave 118a9c: c3 ret 118a9d: 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 ) { 118aa0: 8b 43 38 mov 0x38(%ebx),%eax 118aa3: 85 c0 test %eax,%eax 118aa5: 74 1d je 118ac4 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118aa7: 48 dec %eax 118aa8: 74 3a je 118ae4 /* * Must be dormant or time of day timer (e.g. TIMER_DORMANT, * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; 118aaa: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 118aaf: 89 45 e4 mov %eax,-0x1c(%ebp) 118ab2: e8 59 30 00 00 call 11bb10 <_Thread_Enable_dispatch> return status; 118ab7: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118aba: 8d 65 f8 lea -0x8(%ebp),%esp 118abd: 5b pop %ebx 118abe: 5e pop %esi 118abf: c9 leave 118ac0: c3 ret 118ac1: 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 ); 118ac4: 83 c3 10 add $0x10,%ebx 118ac7: 83 ec 0c sub $0xc,%esp 118aca: 53 push %ebx 118acb: e8 7c 44 00 00 call 11cf4c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118ad0: 59 pop %ecx 118ad1: 5e pop %esi 118ad2: 53 push %ebx 118ad3: 68 e4 21 14 00 push $0x1421e4 118ad8: e8 37 43 00 00 call 11ce14 <_Watchdog_Insert> 118add: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118ae0: 31 c0 xor %eax,%eax 118ae2: eb cb jmp 118aaf case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 118ae4: 8b 35 60 2b 14 00 mov 0x142b60,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118aea: 83 ec 0c sub $0xc,%esp 118aed: 8d 43 10 lea 0x10(%ebx),%eax 118af0: 50 push %eax 118af1: e8 56 44 00 00 call 11cf4c <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118af6: 58 pop %eax 118af7: 5a pop %edx 118af8: 53 push %ebx 118af9: 56 push %esi 118afa: ff 56 04 call *0x4(%esi) 118afd: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118b00: 31 c0 xor %eax,%eax 118b02: eb ab jmp 118aaf =============================================================================== 00118b04 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118b04: 55 push %ebp 118b05: 89 e5 mov %esp,%ebp 118b07: 57 push %edi 118b08: 56 push %esi 118b09: 53 push %ebx 118b0a: 83 ec 2c sub $0x2c,%esp 118b0d: 8b 7d 0c mov 0xc(%ebp),%edi 118b10: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 118b13: 8b 1d 60 2b 14 00 mov 0x142b60,%ebx if ( !timer_server ) 118b19: 85 db test %ebx,%ebx 118b1b: 0f 84 9f 00 00 00 je 118bc0 return RTEMS_INCORRECT_STATE; if ( !routine ) 118b21: 85 f6 test %esi,%esi 118b23: 0f 84 a3 00 00 00 je 118bcc return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118b29: 85 ff test %edi,%edi 118b2b: 75 0f jne 118b3c return RTEMS_INVALID_NUMBER; 118b2d: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b32: 8d 65 f4 lea -0xc(%ebp),%esp 118b35: 5b pop %ebx 118b36: 5e pop %esi 118b37: 5f pop %edi 118b38: c9 leave 118b39: c3 ret 118b3a: 66 90 xchg %ax,%ax <== NOT EXECUTED 118b3c: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118b3d: 8d 45 e4 lea -0x1c(%ebp),%eax 118b40: 50 push %eax 118b41: ff 75 08 pushl 0x8(%ebp) 118b44: 68 20 2b 14 00 push $0x142b20 118b49: e8 32 27 00 00 call 11b280 <_Objects_Get> 118b4e: 89 c2 mov %eax,%edx switch ( location ) { 118b50: 83 c4 10 add $0x10,%esp 118b53: 8b 45 e4 mov -0x1c(%ebp),%eax 118b56: 85 c0 test %eax,%eax 118b58: 75 56 jne 118bb0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118b5a: 83 ec 0c sub $0xc,%esp 118b5d: 8d 42 10 lea 0x10(%edx),%eax 118b60: 50 push %eax 118b61: 89 55 d4 mov %edx,-0x2c(%ebp) 118b64: e8 e3 43 00 00 call 11cf4c <_Watchdog_Remove> _ISR_Disable( level ); 118b69: 9c pushf 118b6a: fa cli 118b6b: 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 ) { 118b6c: 83 c4 10 add $0x10,%esp 118b6f: 8b 55 d4 mov -0x2c(%ebp),%edx 118b72: 8b 4a 18 mov 0x18(%edx),%ecx 118b75: 85 c9 test %ecx,%ecx 118b77: 75 5f jne 118bd8 /* * 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; 118b79: 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; 118b80: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118b87: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118b8a: 8b 4d 08 mov 0x8(%ebp),%ecx 118b8d: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118b90: 8b 4d 14 mov 0x14(%ebp),%ecx 118b93: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 118b96: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118b99: 50 push %eax 118b9a: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118b9b: 83 ec 08 sub $0x8,%esp 118b9e: 52 push %edx 118b9f: 53 push %ebx 118ba0: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118ba3: e8 68 2f 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118ba8: 83 c4 10 add $0x10,%esp 118bab: 31 c0 xor %eax,%eax 118bad: eb 83 jmp 118b32 118baf: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118bb0: b8 04 00 00 00 mov $0x4,%eax } 118bb5: 8d 65 f4 lea -0xc(%ebp),%esp 118bb8: 5b pop %ebx 118bb9: 5e pop %esi 118bba: 5f pop %edi 118bbb: c9 leave 118bbc: c3 ret 118bbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118bc0: b8 0e 00 00 00 mov $0xe,%eax 118bc5: e9 68 ff ff ff jmp 118b32 118bca: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; 118bcc: b8 09 00 00 00 mov $0x9,%eax 118bd1: e9 5c ff ff ff jmp 118b32 118bd6: 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 ); 118bd8: 50 push %eax 118bd9: 9d popf _Thread_Enable_dispatch(); 118bda: e8 31 2f 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118bdf: 31 c0 xor %eax,%eax 118be1: e9 4c ff ff ff jmp 118b32 =============================================================================== 00118be8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118be8: 55 push %ebp 118be9: 89 e5 mov %esp,%ebp 118beb: 57 push %edi 118bec: 56 push %esi 118bed: 53 push %ebx 118bee: 83 ec 2c sub $0x2c,%esp 118bf1: 8b 7d 0c mov 0xc(%ebp),%edi 118bf4: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118bf7: 8b 1d 60 2b 14 00 mov 0x142b60,%ebx if ( !timer_server ) 118bfd: 85 db test %ebx,%ebx 118bff: 0f 84 d7 00 00 00 je 118cdc return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118c05: 80 3d 28 21 14 00 00 cmpb $0x0,0x142128 118c0c: 0f 84 aa 00 00 00 je 118cbc <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 118c12: 85 f6 test %esi,%esi 118c14: 0f 84 b2 00 00 00 je 118ccc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118c1a: 83 ec 0c sub $0xc,%esp 118c1d: 57 push %edi 118c1e: e8 95 d1 ff ff call 115db8 <_TOD_Validate> 118c23: 83 c4 10 add $0x10,%esp 118c26: 84 c0 test %al,%al 118c28: 75 0e jne 118c38 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118c2a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c2f: 8d 65 f4 lea -0xc(%ebp),%esp 118c32: 5b pop %ebx 118c33: 5e pop %esi 118c34: 5f pop %edi 118c35: c9 leave 118c36: c3 ret 118c37: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118c38: 83 ec 0c sub $0xc,%esp 118c3b: 57 push %edi 118c3c: e8 eb d0 ff ff call 115d2c <_TOD_To_seconds> 118c41: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118c43: 83 c4 10 add $0x10,%esp 118c46: 3b 05 a8 21 14 00 cmp 0x1421a8,%eax 118c4c: 76 dc jbe 118c2a 118c4e: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118c4f: 8d 45 e4 lea -0x1c(%ebp),%eax 118c52: 50 push %eax 118c53: ff 75 08 pushl 0x8(%ebp) 118c56: 68 20 2b 14 00 push $0x142b20 118c5b: e8 20 26 00 00 call 11b280 <_Objects_Get> 118c60: 89 c2 mov %eax,%edx switch ( location ) { 118c62: 83 c4 10 add $0x10,%esp 118c65: 8b 45 e4 mov -0x1c(%ebp),%eax 118c68: 85 c0 test %eax,%eax 118c6a: 75 7c jne 118ce8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118c6c: 83 ec 0c sub $0xc,%esp 118c6f: 8d 42 10 lea 0x10(%edx),%eax 118c72: 50 push %eax 118c73: 89 55 d4 mov %edx,-0x2c(%ebp) 118c76: e8 d1 42 00 00 call 11cf4c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118c7b: 8b 55 d4 mov -0x2c(%ebp),%edx 118c7e: 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; 118c85: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118c8c: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118c8f: 8b 45 08 mov 0x8(%ebp),%eax 118c92: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 118c95: 8b 45 14 mov 0x14(%ebp),%eax 118c98: 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(); 118c9b: 2b 3d a8 21 14 00 sub 0x1421a8,%edi 118ca1: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 118ca4: 58 pop %eax 118ca5: 59 pop %ecx 118ca6: 52 push %edx 118ca7: 53 push %ebx 118ca8: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118cab: e8 60 2e 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118cb0: 83 c4 10 add $0x10,%esp 118cb3: 31 c0 xor %eax,%eax 118cb5: e9 75 ff ff ff jmp 118c2f 118cba: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118cbc: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118cc1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118cc4: 5b pop %ebx <== NOT EXECUTED 118cc5: 5e pop %esi <== NOT EXECUTED 118cc6: 5f pop %edi <== NOT EXECUTED 118cc7: c9 leave <== NOT EXECUTED 118cc8: c3 ret <== NOT EXECUTED 118cc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118ccc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118cd1: 8d 65 f4 lea -0xc(%ebp),%esp 118cd4: 5b pop %ebx 118cd5: 5e pop %esi 118cd6: 5f pop %edi 118cd7: c9 leave 118cd8: c3 ret 118cd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118cdc: b8 0e 00 00 00 mov $0xe,%eax 118ce1: e9 49 ff ff ff jmp 118c2f 118ce6: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118ce8: b8 04 00 00 00 mov $0x4,%eax 118ced: e9 3d ff ff ff jmp 118c2f =============================================================================== 0010c69c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10c69c: 55 push %ebp 10c69d: 89 e5 mov %esp,%ebp 10c69f: 57 push %edi 10c6a0: 56 push %esi 10c6a1: 53 push %ebx 10c6a2: 83 ec 1c sub $0x1c,%esp 10c6a5: 89 c3 mov %eax,%ebx 10c6a7: 89 d6 mov %edx,%esi 10c6a9: 89 cf mov %ecx,%edi int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 10c6ab: a9 00 00 00 20 test $0x20000000,%eax 10c6b0: 74 2b je 10c6dd if (rtems_panic_in_progress++) 10c6b2: 8b 15 20 e0 12 00 mov 0x12e020,%edx 10c6b8: 8d 42 01 lea 0x1(%edx),%eax 10c6bb: a3 20 e0 12 00 mov %eax,0x12e020 10c6c0: 85 d2 test %edx,%edx 10c6c2: 74 10 je 10c6d4 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c6c4: a1 94 e1 12 00 mov 0x12e194,%eax <== NOT EXECUTED 10c6c9: 40 inc %eax <== NOT EXECUTED 10c6ca: a3 94 e1 12 00 mov %eax,0x12e194 <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 10c6cf: a1 20 e0 12 00 mov 0x12e020,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10c6d4: 83 f8 02 cmp $0x2,%eax 10c6d7: 0f 8f af 00 00 00 jg 10c78c <== NEVER TAKEN return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10c6dd: 83 ec 0c sub $0xc,%esp 10c6e0: a1 e0 bd 12 00 mov 0x12bde0,%eax 10c6e5: ff 70 08 pushl 0x8(%eax) 10c6e8: e8 cb c0 00 00 call 1187b8 status = error_flag & ~RTEMS_ERROR_MASK; 10c6ed: 89 d8 mov %ebx,%eax 10c6ef: 25 ff ff ff 8f and $0x8fffffff,%eax 10c6f4: 89 45 e4 mov %eax,-0x1c(%ebp) if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10c6f7: 83 c4 10 add $0x10,%esp 10c6fa: 81 e3 00 00 00 40 and $0x40000000,%ebx 10c700: 0f 85 be 00 00 00 jne 10c7c4 <== NEVER TAKEN rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; 10c706: 31 db xor %ebx,%ebx #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 10c708: 50 push %eax 10c709: 57 push %edi 10c70a: 56 push %esi 10c70b: a1 e0 bd 12 00 mov 0x12bde0,%eax 10c710: ff 70 0c pushl 0xc(%eax) 10c713: e8 18 1e 01 00 call 11e530 10c718: 89 c6 mov %eax,%esi if (status) 10c71a: 83 c4 10 add $0x10,%esp 10c71d: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c720: 85 c9 test %ecx,%ecx 10c722: 75 74 jne 10c798 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 10c724: 83 fb 00 cmp $0x0,%ebx 10c727: 74 30 je 10c759 if ((local_errno > 0) && *strerror(local_errno)) 10c729: 7e 15 jle 10c740 10c72b: 83 ec 0c sub $0xc,%esp 10c72e: 53 push %ebx 10c72f: e8 c8 cc 00 00 call 1193fc 10c734: 83 c4 10 add $0x10,%esp 10c737: 80 38 00 cmpb $0x0,(%eax) 10c73a: 0f 85 90 00 00 00 jne 10c7d0 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10c740: 52 push %edx 10c741: 53 push %ebx 10c742: 68 49 69 12 00 push $0x126949 10c747: a1 e0 bd 12 00 mov 0x12bde0,%eax 10c74c: ff 70 0c pushl 0xc(%eax) 10c74f: e8 58 c4 00 00 call 118bac 10c754: 01 c6 add %eax,%esi 10c756: 83 c4 10 add $0x10,%esp } chars_written += fprintf(stderr, "\n"); 10c759: 83 ec 08 sub $0x8,%esp 10c75c: 68 02 5c 12 00 push $0x125c02 10c761: a1 e0 bd 12 00 mov 0x12bde0,%eax 10c766: ff 70 0c pushl 0xc(%eax) 10c769: e8 3e c4 00 00 call 118bac 10c76e: 8d 34 30 lea (%eax,%esi,1),%esi (void) fflush(stderr); 10c771: 58 pop %eax 10c772: a1 e0 bd 12 00 mov 0x12bde0,%eax 10c777: ff 70 0c pushl 0xc(%eax) 10c77a: e8 39 c0 00 00 call 1187b8 return chars_written; 10c77f: 83 c4 10 add $0x10,%esp } 10c782: 89 f0 mov %esi,%eax 10c784: 8d 65 f4 lea -0xc(%ebp),%esp 10c787: 5b pop %ebx 10c788: 5e pop %esi 10c789: 5f pop %edi 10c78a: c9 leave 10c78b: c3 ret if (rtems_panic_in_progress++) _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; 10c78c: 31 f6 xor %esi,%esi <== NOT EXECUTED chars_written += fprintf(stderr, "\n"); (void) fflush(stderr); return chars_written; } 10c78e: 89 f0 mov %esi,%eax <== NOT EXECUTED 10c790: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10c793: 5b pop %ebx <== NOT EXECUTED 10c794: 5e pop %esi <== NOT EXECUTED 10c795: 5f pop %edi <== NOT EXECUTED 10c796: c9 leave <== NOT EXECUTED 10c797: c3 ret <== NOT EXECUTED chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10c798: 83 ec 0c sub $0xc,%esp 10c79b: ff 75 e4 pushl -0x1c(%ebp) 10c79e: e8 e1 fe ff ff call 10c684 10c7a3: 83 c4 0c add $0xc,%esp 10c7a6: 50 push %eax 10c7a7: 68 2e 69 12 00 push $0x12692e 10c7ac: a1 e0 bd 12 00 mov 0x12bde0,%eax 10c7b1: ff 70 0c pushl 0xc(%eax) 10c7b4: e8 f3 c3 00 00 call 118bac #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 10c7b9: 01 c6 add %eax,%esi 10c7bb: 83 c4 10 add $0x10,%esp 10c7be: e9 61 ff ff ff jmp 10c724 10c7c3: 90 nop <== 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; 10c7c4: e8 57 bc 00 00 call 118420 <__errno> 10c7c9: 8b 18 mov (%eax),%ebx 10c7cb: e9 38 ff ff ff jmp 10c708 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10c7d0: 83 ec 0c sub $0xc,%esp 10c7d3: 53 push %ebx 10c7d4: e8 23 cc 00 00 call 1193fc 10c7d9: 83 c4 0c add $0xc,%esp 10c7dc: 50 push %eax 10c7dd: 68 3c 69 12 00 push $0x12693c 10c7e2: e9 60 ff ff ff jmp 10c747 =============================================================================== 00108694 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 108694: 55 push %ebp 108695: 89 e5 mov %esp,%ebp 108697: 57 push %edi 108698: 56 push %esi 108699: 53 push %ebx 10869a: 83 ec 1c sub $0x1c,%esp 10869d: 89 c6 mov %eax,%esi 10869f: 89 55 e0 mov %edx,-0x20(%ebp) int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 1086a2: 31 ff xor %edi,%edi static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; unsigned int limit = INT_MAX; 1086a4: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 1086ab: 31 db xor %ebx,%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1086ad: 8b 46 04 mov 0x4(%esi),%eax 1086b0: 48 dec %eax 1086b1: 89 46 04 mov %eax,0x4(%esi) 1086b4: 85 c0 test %eax,%eax 1086b6: 78 52 js 10870a <== NEVER TAKEN 1086b8: 8b 06 mov (%esi),%eax 1086ba: 0f b6 08 movzbl (%eax),%ecx 1086bd: 40 inc %eax 1086be: 89 06 mov %eax,(%esi) if (c == ':') 1086c0: 83 f9 3a cmp $0x3a,%ecx 1086c3: 74 5f je 108724 break; if (sign == 0) { 1086c5: 85 ff test %edi,%edi 1086c7: 75 0e jne 1086d7 if (c == '-') { 1086c9: 83 f9 2d cmp $0x2d,%ecx 1086cc: 0f 84 8a 00 00 00 je 10875c sign = -1; limit++; continue; } sign = 1; 1086d2: bf 01 00 00 00 mov $0x1,%edi } if (!isdigit(c)) 1086d7: a1 94 6b 12 00 mov 0x126b94,%eax 1086dc: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 1086e1: 74 6d je 108750 return 0; d = c - '0'; if ((i > (limit / 10)) 1086e3: b8 cd cc cc cc mov $0xcccccccd,%eax 1086e8: f7 65 e4 mull -0x1c(%ebp) 1086eb: c1 ea 03 shr $0x3,%edx 1086ee: 39 d3 cmp %edx,%ebx 1086f0: 77 5e ja 108750 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 1086f2: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 1086f5: 39 d3 cmp %edx,%ebx 1086f7: 74 47 je 108740 return 0; i = i * 10 + d; 1086f9: 8d 04 9b lea (%ebx,%ebx,4),%eax 1086fc: 8d 1c 41 lea (%ecx,%eax,2),%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1086ff: 8b 46 04 mov 0x4(%esi),%eax 108702: 48 dec %eax 108703: 89 46 04 mov %eax,0x4(%esi) 108706: 85 c0 test %eax,%eax 108708: 79 ae jns 1086b8 <== ALWAYS TAKEN 10870a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10870d: 56 push %esi <== NOT EXECUTED 10870e: ff 35 a0 6b 12 00 pushl 0x126ba0 <== NOT EXECUTED 108714: e8 ab cd 00 00 call 1154c4 <__srget_r> <== NOT EXECUTED 108719: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10871b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (c == ':') 10871e: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED 108721: 75 a2 jne 1086c5 <== NOT EXECUTED 108723: 90 nop <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 108724: 85 ff test %edi,%edi 108726: 74 28 je 108750 <== NEVER TAKEN return 0; *val = i * sign; 108728: 0f af df imul %edi,%ebx 10872b: 8b 45 e0 mov -0x20(%ebp),%eax 10872e: 89 18 mov %ebx,(%eax) return 1; 108730: b8 01 00 00 00 mov $0x1,%eax } 108735: 8d 65 f4 lea -0xc(%ebp),%esp 108738: 5b pop %ebx 108739: 5e pop %esi 10873a: 5f pop %edi 10873b: c9 leave 10873c: c3 ret 10873d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 108740: 8d 04 9b lea (%ebx,%ebx,4),%eax 108743: d1 e0 shl %eax 108745: 8b 55 e4 mov -0x1c(%ebp),%edx 108748: 29 c2 sub %eax,%edx 10874a: 39 d1 cmp %edx,%ecx 10874c: 76 ab jbe 1086f9 <== NEVER TAKEN 10874e: 66 90 xchg %ax,%ax return 0; i = i * 10 + d; } if (sign == 0) return 0; 108750: 31 c0 xor %eax,%eax *val = i * sign; return 1; } 108752: 8d 65 f4 lea -0xc(%ebp),%esp 108755: 5b pop %ebx 108756: 5e pop %esi 108757: 5f pop %edi 108758: c9 leave 108759: c3 ret 10875a: 66 90 xchg %ax,%ax <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 10875c: ff 45 e4 incl -0x1c(%ebp) c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 10875f: bf ff ff ff ff mov $0xffffffff,%edi limit++; continue; 108764: e9 44 ff ff ff jmp 1086ad =============================================================================== 0010876c : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 10876c: 55 push %ebp 10876d: 89 e5 mov %esp,%ebp 10876f: 57 push %edi 108770: 56 push %esi 108771: 53 push %ebx 108772: 83 ec 0c sub $0xc,%esp 108775: 89 c3 mov %eax,%ebx 108777: 89 ce mov %ecx,%esi 108779: 8b 7d 08 mov 0x8(%ebp),%edi int c; *name = *bufp; 10877c: 8b 01 mov (%ecx),%eax 10877e: 89 02 mov %eax,(%edx) 108780: eb 26 jmp 1087a8 108782: 66 90 xchg %ax,%ax <== NOT EXECUTED for (;;) { c = getc(fp); 108784: 8b 13 mov (%ebx),%edx 108786: 0f b6 02 movzbl (%edx),%eax 108789: 42 inc %edx 10878a: 89 13 mov %edx,(%ebx) if (c == ':') { 10878c: 83 f8 3a cmp $0x3a,%eax 10878f: 74 3b je 1087cc if (nlFlag) return 0; break; } if (c == '\n') { 108791: 83 f8 0a cmp $0xa,%eax 108794: 74 56 je 1087ec if (!nlFlag) return 0; break; } if (c == EOF) 108796: 83 f8 ff cmp $0xffffffff,%eax 108799: 74 59 je 1087f4 return 0; if (*nleft < 2) 10879b: 83 3f 01 cmpl $0x1,(%edi) 10879e: 76 54 jbe 1087f4 return 0; **bufp = c; 1087a0: 8b 16 mov (%esi),%edx 1087a2: 88 02 mov %al,(%edx) ++(*bufp); 1087a4: ff 06 incl (%esi) --(*nleft); 1087a6: ff 0f decl (%edi) { int c; *name = *bufp; for (;;) { c = getc(fp); 1087a8: 8b 43 04 mov 0x4(%ebx),%eax 1087ab: 48 dec %eax 1087ac: 89 43 04 mov %eax,0x4(%ebx) 1087af: 85 c0 test %eax,%eax 1087b1: 79 d1 jns 108784 1087b3: 83 ec 08 sub $0x8,%esp 1087b6: 53 push %ebx 1087b7: ff 35 a0 6b 12 00 pushl 0x126ba0 1087bd: e8 02 cd 00 00 call 1154c4 <__srget_r> 1087c2: 83 c4 10 add $0x10,%esp if (c == ':') { 1087c5: 83 f8 3a cmp $0x3a,%eax 1087c8: 75 c7 jne 108791 <== ALWAYS TAKEN 1087ca: 66 90 xchg %ax,%ax <== NOT EXECUTED if (nlFlag) 1087cc: 8b 55 0c mov 0xc(%ebp),%edx 1087cf: 85 d2 test %edx,%edx 1087d1: 75 21 jne 1087f4 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 1087d3: 8b 06 mov (%esi),%eax 1087d5: c6 00 00 movb $0x0,(%eax) ++(*bufp); 1087d8: ff 06 incl (%esi) --(*nleft); 1087da: ff 0f decl (%edi) return 1; 1087dc: b8 01 00 00 00 mov $0x1,%eax } 1087e1: 8d 65 f4 lea -0xc(%ebp),%esp 1087e4: 5b pop %ebx 1087e5: 5e pop %esi 1087e6: 5f pop %edi 1087e7: c9 leave 1087e8: c3 ret 1087e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 1087ec: 8b 45 0c mov 0xc(%ebp),%eax 1087ef: 85 c0 test %eax,%eax 1087f1: 75 e0 jne 1087d3 1087f3: 90 nop break; } if (c == EOF) return 0; if (*nleft < 2) return 0; 1087f4: 31 c0 xor %eax,%eax } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 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 =============================================================================== 00108800 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 108800: 55 push %ebp 108801: 89 e5 mov %esp,%ebp 108803: 57 push %edi 108804: 56 push %esi 108805: 53 push %ebx 108806: 83 ec 34 sub $0x34,%esp 108809: 89 c6 mov %eax,%esi 10880b: 89 d3 mov %edx,%ebx 10880d: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 108810: 8d 7d d4 lea -0x2c(%ebp),%edi 108813: 6a 00 push $0x0 108815: 8d 45 08 lea 0x8(%ebp),%eax 108818: 50 push %eax 108819: 89 f9 mov %edi,%ecx 10881b: 89 f0 mov %esi,%eax 10881d: e8 4a ff ff ff call 10876c 108822: 83 c4 10 add $0x10,%esp 108825: 85 c0 test %eax,%eax 108827: 75 0b jne 108834 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; 108829: 31 c0 xor %eax,%eax grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 10882b: 8d 65 f4 lea -0xc(%ebp),%esp 10882e: 5b pop %ebx 10882f: 5e pop %esi 108830: 5f pop %edi 108831: c9 leave 108832: c3 ret 108833: 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) 108834: 83 ec 08 sub $0x8,%esp 108837: 8d 53 04 lea 0x4(%ebx),%edx 10883a: 6a 00 push $0x0 10883c: 8d 45 08 lea 0x8(%ebp),%eax 10883f: 50 push %eax 108840: 89 f9 mov %edi,%ecx 108842: 89 f0 mov %esi,%eax 108844: e8 23 ff ff ff call 10876c 108849: 83 c4 10 add $0x10,%esp 10884c: 85 c0 test %eax,%eax 10884e: 74 d9 je 108829 <== NEVER TAKEN || !scanInt(fp, &grgid) 108850: 8d 55 e4 lea -0x1c(%ebp),%edx 108853: 89 f0 mov %esi,%eax 108855: e8 3a fe ff ff call 108694 10885a: 85 c0 test %eax,%eax 10885c: 74 cb je 108829 <== NEVER TAKEN || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 10885e: 83 ec 08 sub $0x8,%esp 108861: 8d 55 e0 lea -0x20(%ebp),%edx 108864: 6a 01 push $0x1 108866: 8d 45 08 lea 0x8(%ebp),%eax 108869: 50 push %eax 10886a: 89 f9 mov %edi,%ecx 10886c: 89 f0 mov %esi,%eax 10886e: e8 f9 fe ff ff call 10876c 108873: 83 c4 10 add $0x10,%esp 108876: 85 c0 test %eax,%eax 108878: 74 af je 108829 <== NEVER TAKEN return 0; grp->gr_gid = grgid; 10887a: 8b 45 e4 mov -0x1c(%ebp),%eax 10887d: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 108881: 8b 7d e0 mov -0x20(%ebp),%edi 108884: 8a 07 mov (%edi),%al 108886: 84 c0 test %al,%al 108888: 74 7d je 108907 <== NEVER TAKEN 10888a: 89 fa mov %edi,%edx 10888c: b9 01 00 00 00 mov $0x1,%ecx 108891: eb 08 jmp 10889b 108893: 90 nop <== NOT EXECUTED 108894: 42 inc %edx 108895: 8a 02 mov (%edx),%al 108897: 84 c0 test %al,%al 108899: 74 09 je 1088a4 if(*cp == ',') 10889b: 3c 2c cmp $0x2c,%al 10889d: 75 f5 jne 108894 memcount++; 10889f: 41 inc %ecx 1088a0: eb f2 jmp 108894 1088a2: 66 90 xchg %ax,%ax <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1088a4: 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)) 1088ab: 39 45 08 cmp %eax,0x8(%ebp) 1088ae: 0f 82 75 ff ff ff jb 108829 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 1088b4: 8b 75 d4 mov -0x2c(%ebp),%esi 1088b7: 83 c6 0f add $0xf,%esi 1088ba: 83 e6 f0 and $0xfffffff0,%esi 1088bd: 89 73 0c mov %esi,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 1088c0: 89 3e mov %edi,(%esi) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1088c2: 8b 45 e0 mov -0x20(%ebp),%eax 1088c5: 8a 10 mov (%eax),%dl 1088c7: 84 d2 test %dl,%dl 1088c9: 74 43 je 10890e <== NEVER TAKEN } /* * Extract a single group record from the database */ static int scangr( 1088cb: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1088cc: b9 01 00 00 00 mov $0x1,%ecx 1088d1: eb 08 jmp 1088db 1088d3: 90 nop <== NOT EXECUTED 1088d4: 8a 10 mov (%eax),%dl 1088d6: 40 inc %eax 1088d7: 84 d2 test %dl,%dl 1088d9: 74 15 je 1088f0 if(*cp == ',') { 1088db: 80 fa 2c cmp $0x2c,%dl 1088de: 75 f4 jne 1088d4 *cp = '\0'; 1088e0: c6 40 ff 00 movb $0x0,-0x1(%eax) grp->gr_mem[memcount++] = cp + 1; 1088e4: 8b 53 0c mov 0xc(%ebx),%edx 1088e7: 89 04 8a mov %eax,(%edx,%ecx,4) 1088ea: 41 inc %ecx 1088eb: eb e7 jmp 1088d4 1088ed: 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++) { 1088f0: 8b 73 0c mov 0xc(%ebx),%esi 1088f3: c1 e1 02 shl $0x2,%ecx if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 1088f6: c7 04 0e 00 00 00 00 movl $0x0,(%esi,%ecx,1) return 1; 1088fd: b8 01 00 00 00 mov $0x1,%eax 108902: e9 24 ff ff ff jmp 10882b grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 108907: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED 10890c: eb 9d jmp 1088ab <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 10890e: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED 108913: eb e1 jmp 1088f6 <== NOT EXECUTED =============================================================================== 00108918 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 108918: 55 push %ebp 108919: 89 e5 mov %esp,%ebp 10891b: 57 push %edi 10891c: 56 push %esi 10891d: 53 push %ebx 10891e: 83 ec 34 sub $0x34,%esp 108921: 89 c6 mov %eax,%esi 108923: 89 d3 mov %edx,%ebx 108925: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108928: 8d 7d d4 lea -0x2c(%ebp),%edi 10892b: 6a 00 push $0x0 10892d: 8d 45 08 lea 0x8(%ebp),%eax 108930: 50 push %eax 108931: 89 f9 mov %edi,%ecx 108933: 89 f0 mov %esi,%eax 108935: e8 32 fe ff ff call 10876c 10893a: 83 c4 10 add $0x10,%esp 10893d: 85 c0 test %eax,%eax 10893f: 75 0b jne 10894c || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; 108941: 31 c0 xor %eax,%eax pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 108943: 8d 65 f4 lea -0xc(%ebp),%esp 108946: 5b pop %ebx 108947: 5e pop %esi 108948: 5f pop %edi 108949: c9 leave 10894a: c3 ret 10894b: 90 nop <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 10894c: 83 ec 08 sub $0x8,%esp 10894f: 8d 53 04 lea 0x4(%ebx),%edx 108952: 6a 00 push $0x0 108954: 8d 45 08 lea 0x8(%ebp),%eax 108957: 50 push %eax 108958: 89 f9 mov %edi,%ecx 10895a: 89 f0 mov %esi,%eax 10895c: e8 0b fe ff ff call 10876c 108961: 83 c4 10 add $0x10,%esp 108964: 85 c0 test %eax,%eax 108966: 74 d9 je 108941 <== NEVER TAKEN || !scanInt(fp, &pwuid) 108968: 8d 55 e4 lea -0x1c(%ebp),%edx 10896b: 89 f0 mov %esi,%eax 10896d: e8 22 fd ff ff call 108694 108972: 85 c0 test %eax,%eax 108974: 74 cb je 108941 || !scanInt(fp, &pwgid) 108976: 8d 55 e0 lea -0x20(%ebp),%edx 108979: 89 f0 mov %esi,%eax 10897b: e8 14 fd ff ff call 108694 108980: 85 c0 test %eax,%eax 108982: 74 bd je 108941 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 108984: 83 ec 08 sub $0x8,%esp 108987: 8d 53 0c lea 0xc(%ebx),%edx 10898a: 6a 00 push $0x0 10898c: 8d 45 08 lea 0x8(%ebp),%eax 10898f: 50 push %eax 108990: 89 f9 mov %edi,%ecx 108992: 89 f0 mov %esi,%eax 108994: e8 d3 fd ff ff call 10876c 108999: 83 c4 10 add $0x10,%esp 10899c: 85 c0 test %eax,%eax 10899e: 74 a1 je 108941 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 1089a0: 83 ec 08 sub $0x8,%esp 1089a3: 8d 53 10 lea 0x10(%ebx),%edx 1089a6: 6a 00 push $0x0 1089a8: 8d 45 08 lea 0x8(%ebp),%eax 1089ab: 50 push %eax 1089ac: 89 f9 mov %edi,%ecx 1089ae: 89 f0 mov %esi,%eax 1089b0: e8 b7 fd ff ff call 10876c 1089b5: 83 c4 10 add $0x10,%esp 1089b8: 85 c0 test %eax,%eax 1089ba: 74 85 je 108941 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 1089bc: 83 ec 08 sub $0x8,%esp 1089bf: 8d 53 14 lea 0x14(%ebx),%edx 1089c2: 6a 00 push $0x0 1089c4: 8d 45 08 lea 0x8(%ebp),%eax 1089c7: 50 push %eax 1089c8: 89 f9 mov %edi,%ecx 1089ca: 89 f0 mov %esi,%eax 1089cc: e8 9b fd ff ff call 10876c 1089d1: 83 c4 10 add $0x10,%esp 1089d4: 85 c0 test %eax,%eax 1089d6: 0f 84 65 ff ff ff je 108941 <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 1089dc: 83 ec 08 sub $0x8,%esp 1089df: 8d 53 18 lea 0x18(%ebx),%edx 1089e2: 6a 01 push $0x1 1089e4: 8d 45 08 lea 0x8(%ebp),%eax 1089e7: 50 push %eax 1089e8: 89 f9 mov %edi,%ecx 1089ea: 89 f0 mov %esi,%eax 1089ec: e8 7b fd ff ff call 10876c 1089f1: 83 c4 10 add $0x10,%esp 1089f4: 85 c0 test %eax,%eax 1089f6: 0f 84 45 ff ff ff je 108941 return 0; pwd->pw_uid = pwuid; 1089fc: 8b 45 e4 mov -0x1c(%ebp),%eax 1089ff: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 108a03: 8b 45 e0 mov -0x20(%ebp),%eax 108a06: 66 89 43 0a mov %ax,0xa(%ebx) return 1; 108a0a: b8 01 00 00 00 mov $0x1,%eax 108a0f: e9 2f ff ff ff jmp 108943 =============================================================================== 0010be14 : #include int sched_get_priority_max( int policy ) { 10be14: 55 push %ebp 10be15: 89 e5 mov %esp,%ebp 10be17: 83 ec 08 sub $0x8,%esp 10be1a: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10be1d: 85 c0 test %eax,%eax 10be1f: 78 0a js 10be2b 10be21: 83 f8 02 cmp $0x2,%eax 10be24: 7e 1a jle 10be40 10be26: 83 f8 04 cmp $0x4,%eax 10be29: 74 15 je 10be40 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10be2b: e8 58 81 00 00 call 113f88 <__errno> 10be30: c7 00 16 00 00 00 movl $0x16,(%eax) 10be36: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10be3b: c9 leave 10be3c: c3 ret 10be3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10be40: 0f b6 05 bc 44 12 00 movzbl 0x1244bc,%eax 10be47: 48 dec %eax } 10be48: c9 leave 10be49: c3 ret =============================================================================== 0010be4c : #include int sched_get_priority_min( int policy ) { 10be4c: 55 push %ebp 10be4d: 89 e5 mov %esp,%ebp 10be4f: 83 ec 08 sub $0x8,%esp 10be52: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10be55: 85 c0 test %eax,%eax 10be57: 78 0a js 10be63 10be59: 83 f8 02 cmp $0x2,%eax 10be5c: 7e 1a jle 10be78 <== ALWAYS TAKEN 10be5e: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10be61: 74 15 je 10be78 <== NOT EXECUTED case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10be63: e8 20 81 00 00 call 113f88 <__errno> 10be68: c7 00 16 00 00 00 movl $0x16,(%eax) 10be6e: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10be73: c9 leave 10be74: c3 ret 10be75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; 10be78: b8 01 00 00 00 mov $0x1,%eax } 10be7d: c9 leave 10be7e: c3 ret =============================================================================== 0010be80 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10be80: 55 push %ebp 10be81: 89 e5 mov %esp,%ebp 10be83: 56 push %esi 10be84: 53 push %ebx 10be85: 8b 75 08 mov 0x8(%ebp),%esi 10be88: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10be8b: 85 f6 test %esi,%esi 10be8d: 75 21 jne 10beb0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 10be8f: 85 db test %ebx,%ebx 10be91: 74 38 je 10becb rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10be93: 83 ec 08 sub $0x8,%esp 10be96: 53 push %ebx 10be97: ff 35 24 87 12 00 pushl 0x128724 10be9d: e8 d6 34 00 00 call 10f378 <_Timespec_From_ticks> return 0; 10bea2: 83 c4 10 add $0x10,%esp 10bea5: 31 c0 xor %eax,%eax } 10bea7: 8d 65 f8 lea -0x8(%ebp),%esp 10beaa: 5b pop %ebx 10beab: 5e pop %esi 10beac: c9 leave 10bead: c3 ret 10beae: 66 90 xchg %ax,%ax <== NOT EXECUTED { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10beb0: e8 fb c8 ff ff call 1087b0 10beb5: 39 f0 cmp %esi,%eax 10beb7: 74 d6 je 10be8f rtems_set_errno_and_return_minus_one( ESRCH ); 10beb9: e8 ca 80 00 00 call 113f88 <__errno> 10bebe: c7 00 03 00 00 00 movl $0x3,(%eax) 10bec4: b8 ff ff ff ff mov $0xffffffff,%eax 10bec9: eb dc jmp 10bea7 if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10becb: e8 b8 80 00 00 call 113f88 <__errno> 10bed0: c7 00 16 00 00 00 movl $0x16,(%eax) 10bed6: b8 ff ff ff ff mov $0xffffffff,%eax 10bedb: eb ca jmp 10bea7 =============================================================================== 0010e5d4 : */ int sem_close( sem_t *sem ) { 10e5d4: 55 push %ebp 10e5d5: 89 e5 mov %esp,%ebp 10e5d7: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e5da: 8d 45 f4 lea -0xc(%ebp),%eax sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) _Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location ); 10e5dd: 50 push %eax 10e5de: 8b 45 08 mov 0x8(%ebp),%eax 10e5e1: ff 30 pushl (%eax) 10e5e3: 68 e0 d4 12 00 push $0x12d4e0 10e5e8: e8 bf 21 00 00 call 1107ac <_Objects_Get> switch ( location ) { 10e5ed: 83 c4 10 add $0x10,%esp 10e5f0: 8b 55 f4 mov -0xc(%ebp),%edx 10e5f3: 85 d2 test %edx,%edx 10e5f5: 74 15 je 10e60c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e5f7: e8 b8 8f 00 00 call 1175b4 <__errno> 10e5fc: c7 00 16 00 00 00 movl $0x16,(%eax) 10e602: b8 ff ff ff ff mov $0xffffffff,%eax } 10e607: c9 leave 10e608: c3 ret 10e609: 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; 10e60c: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10e60f: 83 ec 0c sub $0xc,%esp 10e612: 50 push %eax 10e613: e8 58 63 00 00 call 114970 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e618: e8 9f 2a 00 00 call 1110bc <_Thread_Enable_dispatch> return 0; 10e61d: 83 c4 10 add $0x10,%esp 10e620: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e622: c9 leave 10e623: c3 ret =============================================================================== 0010e624 : */ int sem_destroy( sem_t *sem ) { 10e624: 55 push %ebp 10e625: 89 e5 mov %esp,%ebp 10e627: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e62a: 8d 45 f4 lea -0xc(%ebp),%eax 10e62d: 50 push %eax 10e62e: 8b 45 08 mov 0x8(%ebp),%eax 10e631: ff 30 pushl (%eax) 10e633: 68 e0 d4 12 00 push $0x12d4e0 10e638: e8 6f 21 00 00 call 1107ac <_Objects_Get> switch ( location ) { 10e63d: 83 c4 10 add $0x10,%esp 10e640: 8b 55 f4 mov -0xc(%ebp),%edx 10e643: 85 d2 test %edx,%edx 10e645: 74 15 je 10e65c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e647: e8 68 8f 00 00 call 1175b4 <__errno> 10e64c: c7 00 16 00 00 00 movl $0x16,(%eax) 10e652: b8 ff ff ff ff mov $0xffffffff,%eax } 10e657: c9 leave 10e658: c3 ret 10e659: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10e65c: 80 78 14 00 cmpb $0x0,0x14(%eax) 10e660: 75 16 jne 10e678 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10e662: 83 ec 0c sub $0xc,%esp 10e665: 50 push %eax 10e666: e8 05 63 00 00 call 114970 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e66b: e8 4c 2a 00 00 call 1110bc <_Thread_Enable_dispatch> return 0; 10e670: 83 c4 10 add $0x10,%esp 10e673: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e675: c9 leave 10e676: c3 ret 10e677: 90 nop <== NOT EXECUTED /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { _Thread_Enable_dispatch(); 10e678: e8 3f 2a 00 00 call 1110bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10e67d: e8 32 8f 00 00 call 1175b4 <__errno> 10e682: c7 00 16 00 00 00 movl $0x16,(%eax) 10e688: b8 ff ff ff ff mov $0xffffffff,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e68d: c9 leave 10e68e: c3 ret =============================================================================== 0010e690 : int sem_getvalue( sem_t *sem, int *sval ) { 10e690: 55 push %ebp 10e691: 89 e5 mov %esp,%ebp 10e693: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e696: 8d 45 f4 lea -0xc(%ebp),%eax 10e699: 50 push %eax 10e69a: 8b 45 08 mov 0x8(%ebp),%eax 10e69d: ff 30 pushl (%eax) 10e69f: 68 e0 d4 12 00 push $0x12d4e0 10e6a4: e8 03 21 00 00 call 1107ac <_Objects_Get> switch ( location ) { 10e6a9: 83 c4 10 add $0x10,%esp 10e6ac: 8b 55 f4 mov -0xc(%ebp),%edx 10e6af: 85 d2 test %edx,%edx 10e6b1: 74 15 je 10e6c8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e6b3: e8 fc 8e 00 00 call 1175b4 <__errno> 10e6b8: c7 00 16 00 00 00 movl $0x16,(%eax) 10e6be: b8 ff ff ff ff mov $0xffffffff,%eax } 10e6c3: c9 leave 10e6c4: c3 ret 10e6c5: 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 ); 10e6c8: 8b 50 64 mov 0x64(%eax),%edx 10e6cb: 8b 45 0c mov 0xc(%ebp),%eax 10e6ce: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e6d0: e8 e7 29 00 00 call 1110bc <_Thread_Enable_dispatch> return 0; 10e6d5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e6d7: c9 leave 10e6d8: c3 ret =============================================================================== 0010e724 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10e724: 55 push %ebp 10e725: 89 e5 mov %esp,%ebp 10e727: 57 push %edi 10e728: 56 push %esi 10e729: 53 push %ebx 10e72a: 83 ec 2c sub $0x2c,%esp 10e72d: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e730: a1 b4 d1 12 00 mov 0x12d1b4,%eax 10e735: 40 inc %eax 10e736: a3 b4 d1 12 00 mov %eax,0x12d1b4 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10e73b: 8b 7d 0c mov 0xc(%ebp),%edi 10e73e: 81 e7 00 02 00 00 and $0x200,%edi 10e744: 0f 85 86 00 00 00 jne 10e7d0 /* unsigned int value */ ) { va_list arg; mode_t mode; unsigned int value = 0; 10e74a: 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 ); 10e751: 83 ec 08 sub $0x8,%esp 10e754: 8d 45 e4 lea -0x1c(%ebp),%eax 10e757: 50 push %eax 10e758: 56 push %esi 10e759: e8 62 62 00 00 call 1149c0 <_POSIX_Semaphore_Name_to_id> 10e75e: 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 ) { 10e760: 83 c4 10 add $0x10,%esp 10e763: 85 c0 test %eax,%eax 10e765: 74 25 je 10e78c /* * 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) ) ) { 10e767: 83 f8 02 cmp $0x2,%eax 10e76a: 75 04 jne 10e770 <== NEVER TAKEN 10e76c: 85 ff test %edi,%edi 10e76e: 75 6c jne 10e7dc _Thread_Enable_dispatch(); 10e770: e8 47 29 00 00 call 1110bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10e775: e8 3a 8e 00 00 call 1175b4 <__errno> 10e77a: 89 18 mov %ebx,(%eax) 10e77c: b8 ff ff ff ff mov $0xffffffff,%eax id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 10e781: 8d 65 f4 lea -0xc(%ebp),%esp 10e784: 5b pop %ebx 10e785: 5e pop %esi 10e786: 5f pop %edi 10e787: c9 leave 10e788: c3 ret 10e789: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10e78c: 8b 45 0c mov 0xc(%ebp),%eax 10e78f: 25 00 0a 00 00 and $0xa00,%eax 10e794: 3d 00 0a 00 00 cmp $0xa00,%eax 10e799: 74 65 je 10e800 10e79b: 50 push %eax _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10e79c: 8d 45 dc lea -0x24(%ebp),%eax 10e79f: 50 push %eax 10e7a0: ff 75 e4 pushl -0x1c(%ebp) 10e7a3: 68 e0 d4 12 00 push $0x12d4e0 10e7a8: e8 ff 1f 00 00 call 1107ac <_Objects_Get> 10e7ad: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10e7b0: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10e7b3: e8 04 29 00 00 call 1110bc <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10e7b8: e8 ff 28 00 00 call 1110bc <_Thread_Enable_dispatch> goto return_id; 10e7bd: 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; 10e7c0: 8b 45 e0 mov -0x20(%ebp),%eax 10e7c3: 83 c0 08 add $0x8,%eax #endif return id; } 10e7c6: 8d 65 f4 lea -0xc(%ebp),%esp 10e7c9: 5b pop %ebx 10e7ca: 5e pop %esi 10e7cb: 5f pop %edi 10e7cc: c9 leave 10e7cd: c3 ret 10e7ce: 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 ); 10e7d0: 8b 45 14 mov 0x14(%ebp),%eax 10e7d3: 89 45 d4 mov %eax,-0x2c(%ebp) 10e7d6: e9 76 ff ff ff jmp 10e751 10e7db: 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( 10e7dc: 8d 45 e0 lea -0x20(%ebp),%eax 10e7df: 50 push %eax 10e7e0: ff 75 d4 pushl -0x2c(%ebp) 10e7e3: 6a 00 push $0x0 10e7e5: 56 push %esi 10e7e6: e8 79 60 00 00 call 114864 <_POSIX_Semaphore_Create_support> 10e7eb: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10e7ed: e8 ca 28 00 00 call 1110bc <_Thread_Enable_dispatch> if ( status == -1 ) 10e7f2: 83 c4 10 add $0x10,%esp 10e7f5: 43 inc %ebx 10e7f6: 75 c8 jne 10e7c0 return SEM_FAILED; 10e7f8: b8 ff ff ff ff mov $0xffffffff,%eax 10e7fd: eb c7 jmp 10e7c6 10e7ff: 90 nop <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 10e800: e8 b7 28 00 00 call 1110bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10e805: e8 aa 8d 00 00 call 1175b4 <__errno> 10e80a: c7 00 11 00 00 00 movl $0x11,(%eax) 10e810: b8 ff ff ff ff mov $0xffffffff,%eax 10e815: eb af jmp 10e7c6 =============================================================================== 0010e818 : */ int sem_post( sem_t *sem ) { 10e818: 55 push %ebp 10e819: 89 e5 mov %esp,%ebp 10e81b: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e81e: 8d 45 f4 lea -0xc(%ebp),%eax 10e821: 50 push %eax 10e822: 8b 45 08 mov 0x8(%ebp),%eax 10e825: ff 30 pushl (%eax) 10e827: 68 e0 d4 12 00 push $0x12d4e0 10e82c: e8 7b 1f 00 00 call 1107ac <_Objects_Get> switch ( location ) { 10e831: 83 c4 10 add $0x10,%esp 10e834: 8b 4d f4 mov -0xc(%ebp),%ecx 10e837: 85 c9 test %ecx,%ecx 10e839: 74 15 je 10e850 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e83b: e8 74 8d 00 00 call 1175b4 <__errno> 10e840: c7 00 16 00 00 00 movl $0x16,(%eax) 10e846: b8 ff ff ff ff mov $0xffffffff,%eax } 10e84b: c9 leave 10e84c: c3 ret 10e84d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10e850: 52 push %edx 10e851: 6a 00 push $0x0 10e853: ff 70 08 pushl 0x8(%eax) 10e856: 83 c0 1c add $0x1c,%eax 10e859: 50 push %eax 10e85a: e8 55 15 00 00 call 10fdb4 <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10e85f: e8 58 28 00 00 call 1110bc <_Thread_Enable_dispatch> return 0; 10e864: 83 c4 10 add $0x10,%esp 10e867: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e869: c9 leave 10e86a: c3 ret =============================================================================== 0010e86c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 10e86c: 55 push %ebp 10e86d: 89 e5 mov %esp,%ebp 10e86f: 53 push %ebx 10e870: 83 ec 1c sub $0x1c,%esp 10e873: 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 ); 10e876: 8d 45 f4 lea -0xc(%ebp),%eax 10e879: 50 push %eax 10e87a: ff 75 0c pushl 0xc(%ebp) 10e87d: e8 72 54 00 00 call 113cf4 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10e882: 83 c4 10 add $0x10,%esp 10e885: 83 f8 03 cmp $0x3,%eax 10e888: 74 16 je 10e8a0 <== ALWAYS TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10e88a: 50 push %eax <== NOT EXECUTED 10e88b: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10e88e: 6a 00 push $0x0 <== NOT EXECUTED 10e890: 53 push %ebx <== NOT EXECUTED 10e891: e8 96 61 00 00 call 114a2c <_POSIX_Semaphore_Wait_support><== NOT EXECUTED 10e896: 83 c4 10 add $0x10,%esp <== NOT EXECUTED lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 10e899: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e89c: c9 leave <== NOT EXECUTED 10e89d: c3 ret <== NOT EXECUTED 10e89e: 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 ); 10e8a0: 52 push %edx 10e8a1: ff 75 f4 pushl -0xc(%ebp) 10e8a4: 6a 01 push $0x1 10e8a6: 53 push %ebx 10e8a7: e8 80 61 00 00 call 114a2c <_POSIX_Semaphore_Wait_support> 10e8ac: 83 c4 10 add $0x10,%esp lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 10e8af: 8b 5d fc mov -0x4(%ebp),%ebx 10e8b2: c9 leave 10e8b3: c3 ret =============================================================================== 0010b2d4 : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 10b2d4: 55 push %ebp 10b2d5: 89 e5 mov %esp,%ebp 10b2d7: 83 ec 08 sub $0x8,%esp if ( !value ) 10b2da: 8b 55 0c mov 0xc(%ebp),%edx 10b2dd: 85 d2 test %edx,%edx 10b2df: 74 33 je 10b314 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 10b2e1: 8b 45 10 mov 0x10(%ebp),%eax 10b2e4: 85 c0 test %eax,%eax 10b2e6: 74 2c je 10b314 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b2e8: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b2ec: 76 12 jbe 10b300 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b2ee: e8 b5 86 00 00 call 1139a8 <__errno> 10b2f3: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b2f9: b8 ff ff ff ff mov $0xffffffff,%eax 10b2fe: c9 leave 10b2ff: c3 ret switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b300: e8 a3 86 00 00 call 1139a8 <__errno> 10b305: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b30b: b8 ff ff ff ff mov $0xffffffff,%eax 10b310: c9 leave 10b311: c3 ret 10b312: 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 ); 10b314: e8 8f 86 00 00 call 1139a8 <__errno> 10b319: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b31f: eb d8 jmp 10b2f9 =============================================================================== 0010bd14 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10bd14: 55 push %ebp 10bd15: 89 e5 mov %esp,%ebp 10bd17: 57 push %edi 10bd18: 56 push %esi 10bd19: 53 push %ebx 10bd1a: 83 ec 1c sub $0x1c,%esp 10bd1d: 8b 5d 08 mov 0x8(%ebp),%ebx 10bd20: 8b 45 0c mov 0xc(%ebp),%eax 10bd23: 8b 55 10 mov 0x10(%ebp),%edx ISR_Level level; if ( oact ) 10bd26: 85 d2 test %edx,%edx 10bd28: 74 13 je 10bd3d *oact = _POSIX_signals_Vectors[ sig ]; 10bd2a: 8d 0c 5b lea (%ebx,%ebx,2),%ecx 10bd2d: 8d 34 8d 40 8b 12 00 lea 0x128b40(,%ecx,4),%esi 10bd34: b9 03 00 00 00 mov $0x3,%ecx 10bd39: 89 d7 mov %edx,%edi 10bd3b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10bd3d: 85 db test %ebx,%ebx 10bd3f: 74 77 je 10bdb8 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10bd41: 8d 53 ff lea -0x1(%ebx),%edx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10bd44: 83 fa 1f cmp $0x1f,%edx 10bd47: 77 6f ja 10bdb8 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10bd49: 83 fb 09 cmp $0x9,%ebx 10bd4c: 74 6a je 10bdb8 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10bd4e: 85 c0 test %eax,%eax 10bd50: 74 62 je 10bdb4 <== NEVER 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 ); 10bd52: 9c pushf 10bd53: fa cli 10bd54: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10bd57: 8b 50 08 mov 0x8(%eax),%edx 10bd5a: 85 d2 test %edx,%edx 10bd5c: 74 36 je 10bd94 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 10bd5e: 83 ec 0c sub $0xc,%esp 10bd61: 53 push %ebx 10bd62: 89 45 e0 mov %eax,-0x20(%ebp) 10bd65: e8 da 56 00 00 call 111444 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10bd6a: 8d 14 5b lea (%ebx,%ebx,2),%edx 10bd6d: 8d 14 95 40 8b 12 00 lea 0x128b40(,%edx,4),%edx 10bd74: b9 03 00 00 00 mov $0x3,%ecx 10bd79: 8b 45 e0 mov -0x20(%ebp),%eax 10bd7c: 89 d7 mov %edx,%edi 10bd7e: 89 c6 mov %eax,%esi 10bd80: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bd82: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10bd85: ff 75 e4 pushl -0x1c(%ebp) 10bd88: 9d popf * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 10bd89: 31 c0 xor %eax,%eax } 10bd8b: 8d 65 f4 lea -0xc(%ebp),%esp 10bd8e: 5b pop %ebx 10bd8f: 5e pop %esi 10bd90: 5f pop %edi 10bd91: c9 leave 10bd92: c3 ret 10bd93: 90 nop <== 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 ]; 10bd94: 8d 34 5b lea (%ebx,%ebx,2),%esi 10bd97: c1 e6 02 shl $0x2,%esi 10bd9a: 8d 86 40 8b 12 00 lea 0x128b40(%esi),%eax 10bda0: 81 c6 60 2f 12 00 add $0x122f60,%esi 10bda6: b9 03 00 00 00 mov $0x3,%ecx 10bdab: 89 c7 mov %eax,%edi 10bdad: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bdaf: eb d4 jmp 10bd85 10bdb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 10bdb4: 31 c0 xor %eax,%eax <== NOT EXECUTED 10bdb6: eb d3 jmp 10bd8b <== 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 ); 10bdb8: e8 c7 84 00 00 call 114284 <__errno> 10bdbd: c7 00 16 00 00 00 movl $0x16,(%eax) 10bdc3: b8 ff ff ff ff mov $0xffffffff,%eax 10bdc8: eb c1 jmp 10bd8b =============================================================================== 0010bdcc : int sigaddset( sigset_t *set, int signo ) { 10bdcc: 55 push %ebp 10bdcd: 89 e5 mov %esp,%ebp 10bdcf: 83 ec 08 sub $0x8,%esp 10bdd2: 8b 45 08 mov 0x8(%ebp),%eax 10bdd5: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10bdd8: 85 c0 test %eax,%eax 10bdda: 74 18 je 10bdf4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10bddc: 85 c9 test %ecx,%ecx 10bdde: 74 14 je 10bdf4 10bde0: 49 dec %ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 10bde1: 83 f9 1f cmp $0x1f,%ecx 10bde4: 77 0e ja 10bdf4 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 10bde6: ba 01 00 00 00 mov $0x1,%edx 10bdeb: d3 e2 shl %cl,%edx rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo); 10bded: 09 10 or %edx,(%eax) return 0; 10bdef: 31 c0 xor %eax,%eax } 10bdf1: c9 leave 10bdf2: c3 ret 10bdf3: 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 ); 10bdf4: e8 8b 84 00 00 call 114284 <__errno> 10bdf9: c7 00 16 00 00 00 movl $0x16,(%eax) 10bdff: b8 ff ff ff ff mov $0xffffffff,%eax *set |= signo_to_mask(signo); return 0; } 10be04: c9 leave 10be05: c3 ret =============================================================================== 0010dba0 : int sigdelset( sigset_t *set, int signo ) { 10dba0: 55 push %ebp 10dba1: 89 e5 mov %esp,%ebp 10dba3: 83 ec 08 sub $0x8,%esp 10dba6: 8b 45 08 mov 0x8(%ebp),%eax 10dba9: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10dbac: 85 c0 test %eax,%eax 10dbae: 74 1c je 10dbcc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10dbb0: 85 c9 test %ecx,%ecx 10dbb2: 74 14 je 10dbc8 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10dbb4: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10dbb5: 83 f9 1f cmp $0x1f,%ecx 10dbb8: 77 12 ja 10dbcc static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 10dbba: ba fe ff ff ff mov $0xfffffffe,%edx rtems_set_errno_and_return_minus_one( EINVAL ); *set &= ~signo_to_mask(signo); 10dbbf: d3 c2 rol %cl,%edx 10dbc1: 21 10 and %edx,(%eax) return 0; 10dbc3: 31 c0 xor %eax,%eax } 10dbc5: c9 leave 10dbc6: c3 ret 10dbc7: 90 nop <== NOT EXECUTED { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) return 0; 10dbc8: 31 c0 xor %eax,%eax if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); *set &= ~signo_to_mask(signo); return 0; } 10dbca: c9 leave 10dbcb: c3 ret if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10dbcc: e8 c3 84 00 00 call 116094 <__errno> 10dbd1: c7 00 16 00 00 00 movl $0x16,(%eax) 10dbd7: b8 ff ff ff ff mov $0xffffffff,%eax *set &= ~signo_to_mask(signo); return 0; } 10dbdc: c9 leave 10dbdd: c3 ret =============================================================================== 0010dc38 : int sigismember( const sigset_t *set, int signo ) { 10dc38: 55 push %ebp 10dc39: 89 e5 mov %esp,%ebp 10dc3b: 83 ec 08 sub $0x8,%esp 10dc3e: 8b 45 08 mov 0x8(%ebp),%eax 10dc41: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10dc44: 85 c0 test %eax,%eax 10dc46: 74 20 je 10dc68 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10dc48: 85 c9 test %ecx,%ecx 10dc4a: 74 18 je 10dc64 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10dc4c: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10dc4d: 83 f9 1f cmp $0x1f,%ecx 10dc50: 77 16 ja 10dc68 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 10dc52: ba 01 00 00 00 mov $0x1,%edx 10dc57: d3 e2 shl %cl,%edx const sigset_t *set, int signo ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); 10dc59: 85 10 test %edx,(%eax) 10dc5b: 0f 95 c0 setne %al 10dc5e: 0f b6 c0 movzbl %al,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10dc61: c9 leave 10dc62: c3 ret 10dc63: 90 nop <== NOT EXECUTED { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) return 0; 10dc64: 31 c0 xor %eax,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10dc66: c9 leave 10dc67: c3 ret if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10dc68: e8 27 84 00 00 call 116094 <__errno> 10dc6d: c7 00 16 00 00 00 movl $0x16,(%eax) 10dc73: b8 ff ff ff ff mov $0xffffffff,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10dc78: c9 leave 10dc79: c3 ret =============================================================================== 0010c0f0 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10c0f0: 55 push %ebp 10c0f1: 89 e5 mov %esp,%ebp 10c0f3: 57 push %edi 10c0f4: 56 push %esi 10c0f5: 53 push %ebx 10c0f6: 83 ec 2c sub $0x2c,%esp 10c0f9: 8b 5d 08 mov 0x8(%ebp),%ebx 10c0fc: 8b 7d 0c mov 0xc(%ebp),%edi 10c0ff: 8b 75 10 mov 0x10(%ebp),%esi ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10c102: 85 db test %ebx,%ebx 10c104: 0f 84 9e 01 00 00 je 10c2a8 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10c10a: 85 f6 test %esi,%esi 10c10c: 0f 84 3e 01 00 00 je 10c250 if ( !_Timespec_Is_valid( timeout ) ) 10c112: 83 ec 0c sub $0xc,%esp 10c115: 56 push %esi 10c116: e8 65 35 00 00 call 10f680 <_Timespec_Is_valid> 10c11b: 83 c4 10 add $0x10,%esp 10c11e: 84 c0 test %al,%al 10c120: 0f 84 82 01 00 00 je 10c2a8 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10c126: 83 ec 0c sub $0xc,%esp 10c129: 56 push %esi 10c12a: e8 b9 35 00 00 call 10f6e8 <_Timespec_To_ticks> if ( !interval ) 10c12f: 83 c4 10 add $0x10,%esp 10c132: 85 c0 test %eax,%eax 10c134: 0f 84 6e 01 00 00 je 10c2a8 <== NEVER TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c13a: 85 ff test %edi,%edi 10c13c: 0f 84 18 01 00 00 je 10c25a <== NEVER TAKEN the_thread = _Thread_Executing; 10c142: 8b 0d 18 a1 12 00 mov 0x12a118,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c148: 8b 91 f8 00 00 00 mov 0xf8(%ecx),%edx * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10c14e: 9c pushf 10c14f: fa cli 10c150: 8f 45 d0 popl -0x30(%ebp) if ( *set & api->signals_pending ) { 10c153: 8b 33 mov (%ebx),%esi 10c155: 89 75 d4 mov %esi,-0x2c(%ebp) 10c158: 8b b2 d4 00 00 00 mov 0xd4(%edx),%esi 10c15e: 85 75 d4 test %esi,-0x2c(%ebp) 10c161: 0f 85 fd 00 00 00 jne 10c264 return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10c167: 8b 35 48 a3 12 00 mov 0x12a348,%esi 10c16d: 85 75 d4 test %esi,-0x2c(%ebp) 10c170: 0f 85 96 00 00 00 jne 10c20c the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 10c176: c7 07 ff ff ff ff movl $0xffffffff,(%edi) 10c17c: 8b 35 54 9b 12 00 mov 0x129b54,%esi 10c182: 46 inc %esi 10c183: 89 35 54 9b 12 00 mov %esi,0x129b54 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10c189: c7 41 44 e0 a2 12 00 movl $0x12a2e0,0x44(%ecx) the_thread->Wait.return_code = EINTR; 10c190: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) the_thread->Wait.option = *set; 10c197: 8b 33 mov (%ebx),%esi 10c199: 89 71 30 mov %esi,0x30(%ecx) the_thread->Wait.return_argument = the_info; 10c19c: 89 79 28 mov %edi,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; 10c19f: c7 05 10 a3 12 00 01 movl $0x1,0x12a310 10c1a6: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10c1a9: ff 75 d0 pushl -0x30(%ebp) 10c1ac: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10c1ad: 51 push %ecx 10c1ae: 68 1c f2 10 00 push $0x10f21c 10c1b3: 50 push %eax 10c1b4: 68 e0 a2 12 00 push $0x12a2e0 10c1b9: 89 55 cc mov %edx,-0x34(%ebp) 10c1bc: e8 0b 2d 00 00 call 10eecc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c1c1: e8 1e 28 00 00 call 10e9e4 <_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 ); 10c1c6: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c1cd: 6a 00 push $0x0 10c1cf: 57 push %edi 10c1d0: ff 37 pushl (%edi) 10c1d2: 8b 55 cc mov -0x34(%ebp),%edx 10c1d5: 52 push %edx 10c1d6: e8 55 59 00 00 call 111b30 <_POSIX_signals_Clear_signals> /* Set errno only if return code is not EINTR or * if EINTR was caused by a signal being caught, which * was not in our set. */ if ( (_Thread_Executing->Wait.return_code != EINTR) 10c1db: 83 c4 20 add $0x20,%esp 10c1de: a1 18 a1 12 00 mov 0x12a118,%eax 10c1e3: 83 78 34 04 cmpl $0x4,0x34(%eax) 10c1e7: 0f 85 d3 00 00 00 jne 10c2c0 || !(*set & signo_to_mask( the_info->si_signo )) ) { 10c1ed: 8b 37 mov (%edi),%esi 10c1ef: 8d 4e ff lea -0x1(%esi),%ecx 10c1f2: b8 01 00 00 00 mov $0x1,%eax 10c1f7: d3 e0 shl %cl,%eax 10c1f9: 85 03 test %eax,(%ebx) 10c1fb: 0f 84 bf 00 00 00 je 10c2c0 errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } 10c201: 89 f0 mov %esi,%eax 10c203: 8d 65 f4 lea -0xc(%ebp),%esp 10c206: 5b pop %ebx 10c207: 5e pop %esi 10c208: 5f pop %edi 10c209: c9 leave 10c20a: c3 ret 10c20b: 90 nop <== NOT EXECUTED } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); 10c20c: 83 ec 0c sub $0xc,%esp 10c20f: 56 push %esi 10c210: 89 55 cc mov %edx,-0x34(%ebp) 10c213: e8 94 fe ff ff call 10c0ac <_POSIX_signals_Get_lowest> 10c218: 89 c6 mov %eax,%esi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10c21a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c221: 6a 01 push $0x1 10c223: 57 push %edi 10c224: 50 push %eax 10c225: 8b 55 cc mov -0x34(%ebp),%edx 10c228: 52 push %edx 10c229: e8 02 59 00 00 call 111b30 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10c22e: ff 75 d0 pushl -0x30(%ebp) 10c231: 9d popf the_info->si_signo = signo; 10c232: 89 37 mov %esi,(%edi) the_info->si_code = SI_USER; 10c234: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi) the_info->si_value.sival_int = 0; 10c23b: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) return signo; 10c242: 83 c4 20 add $0x20,%esp errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } 10c245: 89 f0 mov %esi,%eax 10c247: 8d 65 f4 lea -0xc(%ebp),%esp 10c24a: 5b pop %ebx 10c24b: 5e pop %esi 10c24c: 5f pop %edi 10c24d: c9 leave 10c24e: c3 ret 10c24f: 90 nop <== NOT EXECUTED /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; 10c250: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c252: 85 ff test %edi,%edi 10c254: 0f 85 e8 fe ff ff jne 10c142 10c25a: 8d 7d dc lea -0x24(%ebp),%edi 10c25d: e9 e0 fe ff ff jmp 10c142 10c262: 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_lowest( api->signals_pending ); 10c264: 83 ec 0c sub $0xc,%esp 10c267: 56 push %esi 10c268: 89 55 cc mov %edx,-0x34(%ebp) 10c26b: e8 3c fe ff ff call 10c0ac <_POSIX_signals_Get_lowest> 10c270: 89 07 mov %eax,(%edi) _POSIX_signals_Clear_signals( 10c272: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c279: 6a 00 push $0x0 10c27b: 57 push %edi 10c27c: 50 push %eax 10c27d: 8b 55 cc mov -0x34(%ebp),%edx 10c280: 52 push %edx 10c281: e8 aa 58 00 00 call 111b30 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10c286: ff 75 d0 pushl -0x30(%ebp) 10c289: 9d popf the_info->si_code = SI_USER; 10c28a: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi) the_info->si_value.sival_int = 0; 10c291: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) return the_info->si_signo; 10c298: 8b 37 mov (%edi),%esi 10c29a: 83 c4 20 add $0x20,%esp errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } 10c29d: 89 f0 mov %esi,%eax 10c29f: 8d 65 f4 lea -0xc(%ebp),%esp 10c2a2: 5b pop %ebx 10c2a3: 5e pop %esi 10c2a4: 5f pop %edi 10c2a5: c9 leave 10c2a6: c3 ret 10c2a7: 90 nop <== 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 ); 10c2a8: e8 1b 86 00 00 call 1148c8 <__errno> 10c2ad: c7 00 16 00 00 00 movl $0x16,(%eax) 10c2b3: be ff ff ff ff mov $0xffffffff,%esi 10c2b8: e9 44 ff ff ff jmp 10c201 10c2bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * was not in our set. */ if ( (_Thread_Executing->Wait.return_code != EINTR) || !(*set & signo_to_mask( the_info->si_signo )) ) { errno = _Thread_Executing->Wait.return_code; 10c2c0: e8 03 86 00 00 call 1148c8 <__errno> 10c2c5: 8b 15 18 a1 12 00 mov 0x12a118,%edx 10c2cb: 8b 52 34 mov 0x34(%edx),%edx 10c2ce: 89 10 mov %edx,(%eax) return -1; 10c2d0: be ff ff ff ff mov $0xffffffff,%esi 10c2d5: e9 27 ff ff ff jmp 10c201 =============================================================================== 0010df78 : int sigwait( const sigset_t *set, int *sig ) { 10df78: 55 push %ebp 10df79: 89 e5 mov %esp,%ebp 10df7b: 53 push %ebx 10df7c: 83 ec 08 sub $0x8,%esp 10df7f: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10df82: 6a 00 push $0x0 10df84: 6a 00 push $0x0 10df86: ff 75 08 pushl 0x8(%ebp) 10df89: e8 e6 fd ff ff call 10dd74 if ( status != -1 ) { 10df8e: 83 c4 10 add $0x10,%esp 10df91: 83 f8 ff cmp $0xffffffff,%eax 10df94: 74 0e je 10dfa4 if ( sig ) 10df96: 85 db test %ebx,%ebx 10df98: 74 16 je 10dfb0 <== NEVER TAKEN *sig = status; 10df9a: 89 03 mov %eax,(%ebx) return 0; 10df9c: 31 c0 xor %eax,%eax } return errno; } 10df9e: 8b 5d fc mov -0x4(%ebp),%ebx 10dfa1: c9 leave 10dfa2: c3 ret 10dfa3: 90 nop <== NOT EXECUTED if ( sig ) *sig = status; return 0; } return errno; 10dfa4: e8 eb 80 00 00 call 116094 <__errno> 10dfa9: 8b 00 mov (%eax),%eax } 10dfab: 8b 5d fc mov -0x4(%ebp),%ebx 10dfae: c9 leave 10dfaf: c3 ret status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 10dfb0: 31 c0 xor %eax,%eax <== NOT EXECUTED } return errno; } 10dfb2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10dfb5: c9 leave <== NOT EXECUTED 10dfb6: c3 ret <== NOT EXECUTED =============================================================================== 0010a098 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 10a098: 55 push %ebp 10a099: 89 e5 mov %esp,%ebp 10a09b: 56 push %esi 10a09c: 53 push %ebx 10a09d: 89 d3 mov %edx,%ebx 10a09f: 89 c6 mov %eax,%esi int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 10a0a1: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) 10a0a8: 75 12 jne 10a0bc <== ALWAYS TAKEN rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 10a0aa: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a0ad: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 10a0af: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a0b2: 5b pop %ebx <== NOT EXECUTED 10a0b3: 5e pop %esi <== NOT EXECUTED 10a0b4: 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); 10a0b5: e9 92 fe ff ff jmp 109f4c <== NOT EXECUTED 10a0ba: 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); 10a0bc: 52 push %edx 10a0bd: 6a 00 push $0x0 10a0bf: 6a 00 push $0x0 10a0c1: ff 73 18 pushl 0x18(%ebx) 10a0c4: e8 c7 15 00 00 call 10b690 i = iproc (c, tty); 10a0c9: 89 f2 mov %esi,%edx 10a0cb: 0f b6 c2 movzbl %dl,%eax 10a0ce: 89 da mov %ebx,%edx 10a0d0: e8 77 fe ff ff call 109f4c 10a0d5: 89 c6 mov %eax,%esi rtems_semaphore_release (tty->osem); 10a0d7: 58 pop %eax 10a0d8: ff 73 18 pushl 0x18(%ebx) 10a0db: e8 ac 16 00 00 call 10b78c 10a0e0: 83 c4 10 add $0x10,%esp } else { i = iproc (c, tty); } return i; } 10a0e3: 89 f0 mov %esi,%eax 10a0e5: 8d 65 f8 lea -0x8(%ebp),%esp 10a0e8: 5b pop %ebx 10a0e9: 5e pop %esi 10a0ea: c9 leave 10a0eb: c3 ret =============================================================================== 00108e9c : int _STAT_NAME( const char *path, struct stat *buf ) { 108e9c: 55 push %ebp 108e9d: 89 e5 mov %esp,%ebp 108e9f: 57 push %edi 108ea0: 56 push %esi 108ea1: 53 push %ebx 108ea2: 83 ec 3c sub $0x3c,%esp 108ea5: 8b 55 08 mov 0x8(%ebp),%edx 108ea8: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 108eab: 85 f6 test %esi,%esi 108ead: 74 65 je 108f14 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 108eaf: b9 ff ff ff ff mov $0xffffffff,%ecx 108eb4: 89 d7 mov %edx,%edi 108eb6: 31 c0 xor %eax,%eax 108eb8: f2 ae repnz scas %es:(%edi),%al 108eba: f7 d1 not %ecx 108ebc: 49 dec %ecx 108ebd: 83 ec 0c sub $0xc,%esp 108ec0: 6a 01 push $0x1 108ec2: 8d 5d d4 lea -0x2c(%ebp),%ebx 108ec5: 53 push %ebx 108ec6: 6a 00 push $0x0 108ec8: 51 push %ecx 108ec9: 52 push %edx 108eca: e8 45 f1 ff ff call 108014 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 108ecf: 83 c4 20 add $0x20,%esp 108ed2: 85 c0 test %eax,%eax 108ed4: 74 0e je 108ee4 return -1; 108ed6: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 108edb: 8d 65 f4 lea -0xc(%ebp),%esp 108ede: 5b pop %ebx 108edf: 5e pop %esi 108ee0: 5f pop %edi 108ee1: c9 leave 108ee2: c3 ret 108ee3: 90 nop <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 108ee4: b9 48 00 00 00 mov $0x48,%ecx 108ee9: 89 f7 mov %esi,%edi 108eeb: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 108eed: 83 ec 08 sub $0x8,%esp 108ef0: 56 push %esi 108ef1: 53 push %ebx 108ef2: 8b 45 dc mov -0x24(%ebp),%eax 108ef5: ff 50 18 call *0x18(%eax) rtems_filesystem_freenode( &loc ); 108ef8: 89 1c 24 mov %ebx,(%esp) 108efb: 89 45 c4 mov %eax,-0x3c(%ebp) 108efe: e8 e9 f1 ff ff call 1080ec return status; 108f03: 83 c4 10 add $0x10,%esp 108f06: 8b 45 c4 mov -0x3c(%ebp),%eax } 108f09: 8d 65 f4 lea -0xc(%ebp),%esp 108f0c: 5b pop %ebx 108f0d: 5e pop %esi 108f0e: 5f pop %edi 108f0f: c9 leave 108f10: c3 ret 108f11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 108f14: e8 7f 87 00 00 call 111698 <__errno> 108f19: c7 00 0e 00 00 00 movl $0xe,(%eax) 108f1f: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 108f24: 8d 65 f4 lea -0xc(%ebp),%esp 108f27: 5b pop %ebx 108f28: 5e pop %esi 108f29: 5f pop %edi 108f2a: c9 leave 108f2b: c3 ret =============================================================================== 0010b30c : #include int statvfs (const char *path, struct statvfs *sb) { 10b30c: 55 push %ebp 10b30d: 89 e5 mov %esp,%ebp 10b30f: 57 push %edi 10b310: 56 push %esi 10b311: 53 push %ebx 10b312: 83 ec 48 sub $0x48,%esp 10b315: 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 ) ) 10b318: 31 f6 xor %esi,%esi 10b31a: b9 ff ff ff ff mov $0xffffffff,%ecx 10b31f: 89 d7 mov %edx,%edi 10b321: 89 f0 mov %esi,%eax 10b323: f2 ae repnz scas %es:(%edi),%al 10b325: f7 d1 not %ecx 10b327: 49 dec %ecx 10b328: 6a 01 push $0x1 10b32a: 8d 5d d4 lea -0x2c(%ebp),%ebx 10b32d: 53 push %ebx 10b32e: 6a 00 push $0x0 10b330: 51 push %ecx 10b331: 52 push %edx 10b332: e8 ad eb ff ff call 109ee4 10b337: 83 c4 20 add $0x20,%esp 10b33a: 85 c0 test %eax,%eax 10b33c: 74 0e je 10b34c <== ALWAYS TAKEN return -1; 10b33e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 10b343: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b346: 5b pop %ebx <== NOT EXECUTED 10b347: 5e pop %esi <== NOT EXECUTED 10b348: 5f pop %edi <== NOT EXECUTED 10b349: c9 leave <== NOT EXECUTED 10b34a: c3 ret <== NOT EXECUTED 10b34b: 90 nop <== NOT EXECUTED */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; 10b34c: 8b 55 e4 mov -0x1c(%ebp),%edx fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); 10b34f: b9 38 00 00 00 mov $0x38,%ecx 10b354: 8b 7d 0c mov 0xc(%ebp),%edi 10b357: 89 f0 mov %esi,%eax 10b359: f3 aa rep stos %al,%es:(%edi) result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 10b35b: 83 ec 08 sub $0x8,%esp 10b35e: 8b 42 28 mov 0x28(%edx),%eax 10b361: ff 75 0c pushl 0xc(%ebp) if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; 10b364: 83 c2 1c add $0x1c,%edx memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 10b367: 52 push %edx 10b368: ff 50 44 call *0x44(%eax) rtems_filesystem_freenode( &loc ); 10b36b: 89 1c 24 mov %ebx,(%esp) 10b36e: 89 45 c4 mov %eax,-0x3c(%ebp) 10b371: e8 46 ec ff ff call 109fbc return result; 10b376: 83 c4 10 add $0x10,%esp 10b379: 8b 45 c4 mov -0x3c(%ebp),%eax } 10b37c: 8d 65 f4 lea -0xc(%ebp),%esp 10b37f: 5b pop %ebx 10b380: 5e pop %esi 10b381: 5f pop %edi 10b382: c9 leave 10b383: c3 ret =============================================================================== 0010acb0 : int symlink( const char *actualpath, const char *sympath ) { 10acb0: 55 push %ebp 10acb1: 89 e5 mov %esp,%ebp 10acb3: 56 push %esi 10acb4: 53 push %ebx 10acb5: 83 ec 34 sub $0x34,%esp 10acb8: 8b 75 0c mov 0xc(%ebp),%esi rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 10acbb: 8d 5d dc lea -0x24(%ebp),%ebx 10acbe: 53 push %ebx 10acbf: 8d 45 f4 lea -0xc(%ebp),%eax 10acc2: 50 push %eax 10acc3: 56 push %esi 10acc4: e8 0f ff ff ff call 10abd8 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 10acc9: 83 c4 0c add $0xc,%esp 10accc: 8d 45 f0 lea -0x10(%ebp),%eax 10accf: 50 push %eax 10acd0: 53 push %ebx 10acd1: 03 75 f4 add -0xc(%ebp),%esi 10acd4: 56 push %esi 10acd5: 8b 45 e8 mov -0x18(%ebp),%eax 10acd8: ff 50 04 call *0x4(%eax) if ( result != 0 ) 10acdb: 83 c4 10 add $0x10,%esp 10acde: 85 c0 test %eax,%eax 10ace0: 74 0e je 10acf0 return -1; 10ace2: b8 ff ff ff ff mov $0xffffffff,%eax result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 10ace7: 8d 65 f8 lea -0x8(%ebp),%esp 10acea: 5b pop %ebx 10aceb: 5e pop %esi 10acec: c9 leave 10aced: c3 ret 10acee: 66 90 xchg %ax,%ax <== NOT EXECUTED result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 10acf0: 50 push %eax 10acf1: ff 75 f0 pushl -0x10(%ebp) 10acf4: ff 75 08 pushl 0x8(%ebp) 10acf7: 53 push %ebx 10acf8: 8b 45 e8 mov -0x18(%ebp),%eax 10acfb: ff 50 38 call *0x38(%eax) rtems_filesystem_freenode( &loc ); 10acfe: 89 1c 24 mov %ebx,(%esp) 10ad01: 89 45 d4 mov %eax,-0x2c(%ebp) 10ad04: e8 6f ec ff ff call 109978 return result; 10ad09: 83 c4 10 add $0x10,%esp 10ad0c: 8b 45 d4 mov -0x2c(%ebp),%eax } 10ad0f: 8d 65 f8 lea -0x8(%ebp),%esp 10ad12: 5b pop %ebx 10ad13: 5e pop %esi 10ad14: c9 leave 10ad15: c3 ret =============================================================================== 0010a1ac : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 10a1ac: 55 push %ebp 10a1ad: 89 e5 mov %esp,%ebp 10a1af: 53 push %ebx 10a1b0: 83 ec 04 sub $0x4,%esp 10a1b3: 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; 10a1b6: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx if ( this_reent ) { 10a1bc: 85 d2 test %edx,%edx 10a1be: 74 33 je 10a1f3 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 10a1c0: 8b 0d 78 96 12 00 mov 0x129678,%ecx 10a1c6: 8b 99 f0 00 00 00 mov 0xf0(%ecx),%ebx _Thread_Executing->libc_reent = this_reent; 10a1cc: 89 91 f0 00 00 00 mov %edx,0xf0(%ecx) _fwalk (t->libc_reent, sync_wrapper); 10a1d2: 83 ec 08 sub $0x8,%esp 10a1d5: 68 f8 a1 10 00 push $0x10a1f8 10a1da: ff b0 f0 00 00 00 pushl 0xf0(%eax) 10a1e0: e8 3b b1 00 00 call 115320 <_fwalk> _Thread_Executing->libc_reent = current_reent; 10a1e5: a1 78 96 12 00 mov 0x129678,%eax 10a1ea: 89 98 f0 00 00 00 mov %ebx,0xf0(%eax) 10a1f0: 83 c4 10 add $0x10,%esp } } 10a1f3: 8b 5d fc mov -0x4(%ebp),%ebx 10a1f6: c9 leave 10a1f7: c3 ret =============================================================================== 0010b194 : */ long sysconf( int name ) { 10b194: 55 push %ebp 10b195: 89 e5 mov %esp,%ebp 10b197: 83 ec 08 sub $0x8,%esp 10b19a: 8b 45 08 mov 0x8(%ebp),%eax if ( name == _SC_CLK_TCK ) 10b19d: 83 f8 02 cmp $0x2,%eax 10b1a0: 74 16 je 10b1b8 return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 10b1a2: 83 f8 04 cmp $0x4,%eax 10b1a5: 74 21 je 10b1c8 return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b1a7: 83 f8 33 cmp $0x33,%eax 10b1aa: 74 24 je 10b1d0 return 1024; if ( name == _SC_PAGESIZE ) 10b1ac: 83 f8 08 cmp $0x8,%eax 10b1af: 75 27 jne 10b1d8 return PAGE_SIZE; 10b1b1: b8 00 10 00 00 mov $0x1000,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1b6: c9 leave 10b1b7: c3 ret long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 10b1b8: b8 40 42 0f 00 mov $0xf4240,%eax 10b1bd: 31 d2 xor %edx,%edx 10b1bf: f7 35 cc 42 12 00 divl 0x1242cc if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1c5: c9 leave 10b1c6: c3 ret 10b1c7: 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; 10b1c8: a1 ac 41 12 00 mov 0x1241ac,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1cd: c9 leave 10b1ce: c3 ret 10b1cf: 90 nop <== NOT EXECUTED if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) return 1024; 10b1d0: b8 00 04 00 00 mov $0x400,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1d5: c9 leave 10b1d6: c3 ret 10b1d7: 90 nop <== NOT EXECUTED #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b1d8: e8 8b 86 00 00 call 113868 <__errno> 10b1dd: c7 00 16 00 00 00 movl $0x16,(%eax) 10b1e3: b8 ff ff ff ff mov $0xffffffff,%eax } 10b1e8: c9 leave 10b1e9: c3 ret =============================================================================== 0010a850 : int tcsetattr( int fd, int opt, struct termios *tp ) { 10a850: 55 push %ebp 10a851: 89 e5 mov %esp,%ebp 10a853: 56 push %esi 10a854: 53 push %ebx 10a855: 8b 5d 08 mov 0x8(%ebp),%ebx 10a858: 8b 45 0c mov 0xc(%ebp),%eax 10a85b: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 10a85e: 85 c0 test %eax,%eax 10a860: 74 2c je 10a88e 10a862: 48 dec %eax 10a863: 74 17 je 10a87c default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a865: e8 96 a5 00 00 call 114e00 <__errno> 10a86a: c7 00 86 00 00 00 movl $0x86,(%eax) * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 10a870: b8 ff ff ff ff mov $0xffffffff,%eax 10a875: 8d 65 f8 lea -0x8(%ebp),%esp 10a878: 5b pop %ebx 10a879: 5e pop %esi 10a87a: c9 leave 10a87b: c3 ret switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 10a87c: 50 push %eax 10a87d: 6a 00 push $0x0 10a87f: 6a 03 push $0x3 10a881: 53 push %ebx 10a882: e8 19 71 00 00 call 1119a0 10a887: 83 c4 10 add $0x10,%esp 10a88a: 85 c0 test %eax,%eax 10a88c: 78 e2 js 10a870 <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 10a88e: 89 75 10 mov %esi,0x10(%ebp) 10a891: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 10a898: 89 5d 08 mov %ebx,0x8(%ebp) } } 10a89b: 8d 65 f8 lea -0x8(%ebp),%esp 10a89e: 5b pop %ebx 10a89f: 5e pop %esi 10a8a0: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 10a8a1: e9 fa 70 00 00 jmp 1119a0 =============================================================================== 0010b4cc : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10b4cc: 55 push %ebp 10b4cd: 89 e5 mov %esp,%ebp 10b4cf: 56 push %esi 10b4d0: 53 push %ebx 10b4d1: 8b 5d 0c mov 0xc(%ebp),%ebx 10b4d4: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10b4d7: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10b4db: 0f 85 db 00 00 00 jne 10b5bc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10b4e1: 85 f6 test %esi,%esi 10b4e3: 0f 84 d3 00 00 00 je 10b5bc /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10b4e9: 85 db test %ebx,%ebx 10b4eb: 74 21 je 10b50e /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10b4ed: 8b 03 mov (%ebx),%eax 10b4ef: 48 dec %eax 10b4f0: 83 f8 01 cmp $0x1,%eax 10b4f3: 0f 87 c3 00 00 00 ja 10b5bc <== NEVER 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 ) 10b4f9: 8b 43 04 mov 0x4(%ebx),%eax 10b4fc: 85 c0 test %eax,%eax 10b4fe: 0f 84 b8 00 00 00 je 10b5bc <== NEVER TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10b504: 48 dec %eax rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10b505: 83 f8 1f cmp $0x1f,%eax 10b508: 0f 87 ae 00 00 00 ja 10b5bc <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b50e: a1 94 97 12 00 mov 0x129794,%eax 10b513: 40 inc %eax 10b514: a3 94 97 12 00 mov %eax,0x129794 * 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 ); 10b519: 83 ec 0c sub $0xc,%esp 10b51c: 68 00 9b 12 00 push $0x129b00 10b521: e8 96 1e 00 00 call 10d3bc <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10b526: 83 c4 10 add $0x10,%esp 10b529: 85 c0 test %eax,%eax 10b52b: 0f 84 a2 00 00 00 je 10b5d3 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; 10b531: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10b535: 8b 15 58 9d 12 00 mov 0x129d58,%edx 10b53b: 8b 52 08 mov 0x8(%edx),%edx 10b53e: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10b541: 85 db test %ebx,%ebx 10b543: 74 11 je 10b556 ptimer->inf.sigev_notify = evp->sigev_notify; 10b545: 8b 13 mov (%ebx),%edx 10b547: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10b54a: 8b 53 04 mov 0x4(%ebx),%edx 10b54d: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10b550: 8b 53 08 mov 0x8(%ebx),%edx 10b553: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10b556: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10b55d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10b564: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10b56b: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10b572: 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; 10b579: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10b580: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10b587: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10b58e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b595: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b598: 0f b7 da movzwl %dx,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b59b: 8b 0d 1c 9b 12 00 mov 0x129b1c,%ecx 10b5a1: 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; 10b5a4: 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; 10b5ab: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10b5ad: e8 52 2b 00 00 call 10e104 <_Thread_Enable_dispatch> return 0; 10b5b2: 31 c0 xor %eax,%eax } 10b5b4: 8d 65 f8 lea -0x8(%ebp),%esp 10b5b7: 5b pop %ebx 10b5b8: 5e pop %esi 10b5b9: c9 leave 10b5ba: c3 ret 10b5bb: 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 ); 10b5bc: e8 6b 8a 00 00 call 11402c <__errno> 10b5c1: c7 00 16 00 00 00 movl $0x16,(%eax) 10b5c7: 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; } 10b5cc: 8d 65 f8 lea -0x8(%ebp),%esp 10b5cf: 5b pop %ebx 10b5d0: 5e pop %esi 10b5d1: c9 leave 10b5d2: c3 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 10b5d3: e8 2c 2b 00 00 call 10e104 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10b5d8: e8 4f 8a 00 00 call 11402c <__errno> 10b5dd: c7 00 0b 00 00 00 movl $0xb,(%eax) 10b5e3: b8 ff ff ff ff mov $0xffffffff,%eax 10b5e8: eb ca jmp 10b5b4 =============================================================================== 0010ba14 : int timer_delete( timer_t timerid ) { 10ba14: 55 push %ebp 10ba15: 89 e5 mov %esp,%ebp 10ba17: 53 push %ebx 10ba18: 83 ec 18 sub $0x18,%esp * because rtems_timer_delete stops the timer before deleting it. */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); 10ba1b: 8d 45 f4 lea -0xc(%ebp),%eax timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) _Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location ); 10ba1e: 50 push %eax 10ba1f: ff 75 08 pushl 0x8(%ebp) 10ba22: 68 c0 99 12 00 push $0x1299c0 10ba27: e8 9c 21 00 00 call 10dbc8 <_Objects_Get> 10ba2c: 89 c3 mov %eax,%ebx switch ( location ) { 10ba2e: 83 c4 10 add $0x10,%esp 10ba31: 8b 4d f4 mov -0xc(%ebp),%ecx 10ba34: 85 c9 test %ecx,%ecx 10ba36: 74 18 je 10ba50 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10ba38: e8 ff 8c 00 00 call 11473c <__errno> 10ba3d: c7 00 16 00 00 00 movl $0x16,(%eax) 10ba43: b8 ff ff ff ff mov $0xffffffff,%eax } 10ba48: 8b 5d fc mov -0x4(%ebp),%ebx 10ba4b: c9 leave 10ba4c: c3 ret 10ba4d: 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 ); 10ba50: 83 ec 08 sub $0x8,%esp 10ba53: 50 push %eax 10ba54: 68 c0 99 12 00 push $0x1299c0 10ba59: e8 2e 1d 00 00 call 10d78c <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10ba5e: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10ba62: 8d 43 10 lea 0x10(%ebx),%eax 10ba65: 89 04 24 mov %eax,(%esp) 10ba68: e8 87 3b 00 00 call 10f5f4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10ba6d: 58 pop %eax 10ba6e: 5a pop %edx 10ba6f: 53 push %ebx 10ba70: 68 c0 99 12 00 push $0x1299c0 10ba75: e8 0e 20 00 00 call 10da88 <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10ba7a: e8 d9 29 00 00 call 10e458 <_Thread_Enable_dispatch> return 0; 10ba7f: 83 c4 10 add $0x10,%esp 10ba82: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10ba84: 8b 5d fc mov -0x4(%ebp),%ebx 10ba87: c9 leave 10ba88: c3 ret =============================================================================== 0010c8d0 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10c8d0: 55 push %ebp 10c8d1: 89 e5 mov %esp,%ebp 10c8d3: 53 push %ebx 10c8d4: 83 ec 18 sub $0x18,%esp int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); 10c8d7: 8d 45 f4 lea -0xc(%ebp),%eax timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) _Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location ); 10c8da: 50 push %eax 10c8db: ff 75 08 pushl 0x8(%ebp) 10c8de: 68 a0 b0 12 00 push $0x12b0a0 10c8e3: e8 24 21 00 00 call 10ea0c <_Objects_Get> switch ( location ) { 10c8e8: 83 c4 10 add $0x10,%esp 10c8eb: 8b 55 f4 mov -0xc(%ebp),%edx 10c8ee: 85 d2 test %edx,%edx 10c8f0: 74 1a je 10c90c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c8f2: e8 c5 88 00 00 call 1151bc <__errno> 10c8f7: c7 00 16 00 00 00 movl $0x16,(%eax) 10c8fd: bb ff ff ff ff mov $0xffffffff,%ebx } 10c902: 89 d8 mov %ebx,%eax 10c904: 8b 5d fc mov -0x4(%ebp),%ebx 10c907: c9 leave 10c908: c3 ret 10c909: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 10c90c: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10c90f: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10c916: e8 81 29 00 00 call 10f29c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c91b: 89 d8 mov %ebx,%eax 10c91d: 8b 5d fc mov -0x4(%ebp),%ebx 10c920: c9 leave 10c921: c3 ret =============================================================================== 0010c924 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 10c924: 55 push %ebp 10c925: 89 e5 mov %esp,%ebp 10c927: 56 push %esi 10c928: 53 push %ebx 10c929: 83 ec 10 sub $0x10,%esp 10c92c: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 10c92f: 85 db test %ebx,%ebx 10c931: 74 65 je 10c998 rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 10c933: 83 ec 0c sub $0xc,%esp 10c936: 8d 45 ec lea -0x14(%ebp),%eax 10c939: 50 push %eax 10c93a: e8 f1 16 00 00 call 10e030 <_TOD_Get> 10c93f: 83 c4 0c add $0xc,%esp ptimer = _POSIX_Timer_Get( timerid, &location ); 10c942: 8d 45 f4 lea -0xc(%ebp),%eax 10c945: 50 push %eax 10c946: ff 75 08 pushl 0x8(%ebp) 10c949: 68 a0 b0 12 00 push $0x12b0a0 10c94e: e8 b9 20 00 00 call 10ea0c <_Objects_Get> 10c953: 89 c6 mov %eax,%esi switch ( location ) { 10c955: 83 c4 10 add $0x10,%esp 10c958: 8b 45 f4 mov -0xc(%ebp),%eax 10c95b: 85 c0 test %eax,%eax 10c95d: 75 39 jne 10c998 case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10c95f: a1 84 ae 12 00 mov 0x12ae84,%eax _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10c964: 83 ec 08 sub $0x8,%esp 10c967: 8d 53 08 lea 0x8(%ebx),%edx 10c96a: 52 push %edx case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10c96b: 8b 56 1c mov 0x1c(%esi),%edx 10c96e: 03 56 24 add 0x24(%esi),%edx case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = 10c971: 29 c2 sub %eax,%edx (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10c973: 52 push %edx 10c974: e8 bf 35 00 00 call 10ff38 <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 10c979: 8b 46 54 mov 0x54(%esi),%eax 10c97c: 8b 56 58 mov 0x58(%esi),%edx 10c97f: 89 03 mov %eax,(%ebx) 10c981: 89 53 04 mov %edx,0x4(%ebx) _Thread_Enable_dispatch(); 10c984: e8 13 29 00 00 call 10f29c <_Thread_Enable_dispatch> return 0; 10c989: 83 c4 10 add $0x10,%esp 10c98c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c98e: 8d 65 f8 lea -0x8(%ebp),%esp 10c991: 5b pop %ebx 10c992: 5e pop %esi 10c993: c9 leave 10c994: c3 ret 10c995: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c998: e8 1f 88 00 00 call 1151bc <__errno> 10c99d: c7 00 16 00 00 00 movl $0x16,(%eax) 10c9a3: b8 ff ff ff ff mov $0xffffffff,%eax 10c9a8: eb e4 jmp 10c98e =============================================================================== 0010b5ec : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10b5ec: 55 push %ebp 10b5ed: 89 e5 mov %esp,%ebp 10b5ef: 57 push %edi 10b5f0: 56 push %esi 10b5f1: 53 push %ebx 10b5f2: 83 ec 3c sub $0x3c,%esp 10b5f5: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10b5f8: 85 db test %ebx,%ebx 10b5fa: 0f 84 50 01 00 00 je 10b750 <== NEVER TAKEN /* * First, it verifies if the structure "value" is correct * if the number of nanoseconds is not correct return EINVAL */ if ( !_Timespec_Is_valid( &(value->it_value) ) ) { 10b600: 83 ec 0c sub $0xc,%esp 10b603: 8d 43 08 lea 0x8(%ebx),%eax 10b606: 50 push %eax 10b607: e8 b8 37 00 00 call 10edc4 <_Timespec_Is_valid> 10b60c: 83 c4 10 add $0x10,%esp 10b60f: 84 c0 test %al,%al 10b611: 0f 84 39 01 00 00 je 10b750 rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !_Timespec_Is_valid( &(value->it_interval) ) ) { 10b617: 83 ec 0c sub $0xc,%esp 10b61a: 53 push %ebx 10b61b: e8 a4 37 00 00 call 10edc4 <_Timespec_Is_valid> 10b620: 83 c4 10 add $0x10,%esp 10b623: 84 c0 test %al,%al 10b625: 0f 84 25 01 00 00 je 10b750 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 10b62b: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10b62f: 0f 84 db 00 00 00 je 10b710 10b635: 8b 45 0c mov 0xc(%ebp),%eax 10b638: 85 c0 test %eax,%eax 10b63a: 0f 85 10 01 00 00 jne 10b750 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b640: 8d 45 cc lea -0x34(%ebp),%eax 10b643: 89 45 c4 mov %eax,-0x3c(%ebp) 10b646: b9 04 00 00 00 mov $0x4,%ecx 10b64b: 89 c7 mov %eax,%edi 10b64d: 89 de mov %ebx,%esi 10b64f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) _Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location ); 10b651: 50 push %eax /* If the function reaches this point, then it will be necessary to do * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); 10b652: 8d 45 e4 lea -0x1c(%ebp),%eax 10b655: 50 push %eax 10b656: ff 75 08 pushl 0x8(%ebp) 10b659: 68 00 9b 12 00 push $0x129b00 10b65e: e8 11 22 00 00 call 10d874 <_Objects_Get> 10b663: 89 c2 mov %eax,%edx switch ( location ) { 10b665: 83 c4 10 add $0x10,%esp 10b668: 8b 7d e4 mov -0x1c(%ebp),%edi 10b66b: 85 ff test %edi,%edi 10b66d: 0f 85 dd 00 00 00 jne 10b750 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 ) { 10b673: 8b 75 d4 mov -0x2c(%ebp),%esi 10b676: 85 f6 test %esi,%esi 10b678: 75 0b jne 10b685 10b67a: 8b 4d d8 mov -0x28(%ebp),%ecx 10b67d: 85 c9 test %ecx,%ecx 10b67f: 0f 84 df 00 00 00 je 10b764 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10b685: 83 ec 0c sub $0xc,%esp 10b688: 53 push %ebx 10b689: 89 55 c0 mov %edx,-0x40(%ebp) 10b68c: e8 9b 37 00 00 call 10ee2c <_Timespec_To_ticks> 10b691: 8b 55 c0 mov -0x40(%ebp),%edx 10b694: 89 42 64 mov %eax,0x64(%edx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10b697: 8d 45 d4 lea -0x2c(%ebp),%eax 10b69a: 89 04 24 mov %eax,(%esp) 10b69d: e8 8a 37 00 00 call 10ee2c <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10b6a2: 8b 55 c0 mov -0x40(%ebp),%edx 10b6a5: 89 14 24 mov %edx,(%esp) 10b6a8: 68 d0 b7 10 00 push $0x10b7d0 10b6ad: ff 72 08 pushl 0x8(%edx) 10b6b0: 50 push %eax 10b6b1: 8d 42 10 lea 0x10(%edx),%eax 10b6b4: 50 push %eax 10b6b5: e8 7e 60 00 00 call 111738 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10b6ba: 83 c4 20 add $0x20,%esp 10b6bd: 84 c0 test %al,%al 10b6bf: 8b 55 c0 mov -0x40(%ebp),%edx 10b6c2: 0f 84 e8 00 00 00 je 10b7b0 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10b6c8: 8b 45 14 mov 0x14(%ebp),%eax 10b6cb: 85 c0 test %eax,%eax 10b6cd: 0f 84 ed 00 00 00 je 10b7c0 *ovalue = ptimer->timer_data; 10b6d3: 8d 42 54 lea 0x54(%edx),%eax 10b6d6: b9 04 00 00 00 mov $0x4,%ecx 10b6db: 8b 7d 14 mov 0x14(%ebp),%edi 10b6de: 89 c6 mov %eax,%esi 10b6e0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10b6e2: b9 04 00 00 00 mov $0x4,%ecx 10b6e7: 89 c7 mov %eax,%edi 10b6e9: 8b 75 c4 mov -0x3c(%ebp),%esi 10b6ec: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b6ee: c6 42 3c 03 movb $0x3,0x3c(%edx) _TOD_Get( &ptimer->time ); 10b6f2: 83 ec 0c sub $0xc,%esp 10b6f5: 83 c2 6c add $0x6c,%edx 10b6f8: 52 push %edx 10b6f9: e8 be 17 00 00 call 10cebc <_TOD_Get> _Thread_Enable_dispatch(); 10b6fe: e8 01 2a 00 00 call 10e104 <_Thread_Enable_dispatch> return 0; 10b703: 83 c4 10 add $0x10,%esp 10b706: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b708: 8d 65 f4 lea -0xc(%ebp),%esp 10b70b: 5b pop %ebx 10b70c: 5e pop %esi 10b70d: 5f pop %edi 10b70e: c9 leave 10b70f: c3 ret if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b710: 8d 45 cc lea -0x34(%ebp),%eax 10b713: 89 45 c4 mov %eax,-0x3c(%ebp) 10b716: 89 c7 mov %eax,%edi 10b718: 89 de mov %ebx,%esi 10b71a: 8b 4d 0c mov 0xc(%ebp),%ecx 10b71d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 10b71f: 83 ec 0c sub $0xc,%esp 10b722: 8d 75 dc lea -0x24(%ebp),%esi 10b725: 56 push %esi 10b726: e8 91 17 00 00 call 10cebc <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10b72b: 59 pop %ecx 10b72c: 5f pop %edi 10b72d: 8d 7d d4 lea -0x2c(%ebp),%edi 10b730: 57 push %edi 10b731: 56 push %esi 10b732: e8 69 36 00 00 call 10eda0 <_Timespec_Greater_than> 10b737: 83 c4 10 add $0x10,%esp 10b73a: 84 c0 test %al,%al 10b73c: 75 12 jne 10b750 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10b73e: 52 push %edx 10b73f: 57 push %edi 10b740: 57 push %edi 10b741: 56 push %esi 10b742: e8 a5 36 00 00 call 10edec <_Timespec_Subtract> 10b747: 83 c4 10 add $0x10,%esp 10b74a: e9 02 ff ff ff jmp 10b651 10b74f: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b750: e8 d7 88 00 00 call 11402c <__errno> 10b755: c7 00 16 00 00 00 movl $0x16,(%eax) 10b75b: b8 ff ff ff ff mov $0xffffffff,%eax 10b760: eb a6 jmp 10b708 10b762: 66 90 xchg %ax,%ax <== NOT EXECUTED 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 ); 10b764: 83 ec 0c sub $0xc,%esp 10b767: 8d 40 10 lea 0x10(%eax),%eax 10b76a: 50 push %eax 10b76b: 89 55 c0 mov %edx,-0x40(%ebp) 10b76e: e8 e5 3a 00 00 call 10f258 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10b773: 83 c4 10 add $0x10,%esp 10b776: 8b 55 14 mov 0x14(%ebp),%edx 10b779: 85 d2 test %edx,%edx 10b77b: 8b 55 c0 mov -0x40(%ebp),%edx 10b77e: 74 48 je 10b7c8 *ovalue = ptimer->timer_data; 10b780: 8d 42 54 lea 0x54(%edx),%eax 10b783: b9 04 00 00 00 mov $0x4,%ecx 10b788: 8b 7d 14 mov 0x14(%ebp),%edi 10b78b: 89 c6 mov %eax,%esi 10b78d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10b78f: b9 04 00 00 00 mov $0x4,%ecx 10b794: 89 c7 mov %eax,%edi 10b796: 8b 75 c4 mov -0x3c(%ebp),%esi 10b799: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b79b: c6 42 3c 04 movb $0x4,0x3c(%edx) /* Returns with success */ _Thread_Enable_dispatch(); 10b79f: e8 60 29 00 00 call 10e104 <_Thread_Enable_dispatch> return 0; 10b7a4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b7a6: 8d 65 f4 lea -0xc(%ebp),%esp 10b7a9: 5b pop %ebx 10b7aa: 5e pop %esi 10b7ab: 5f pop %edi 10b7ac: c9 leave 10b7ad: c3 ret 10b7ae: 66 90 xchg %ax,%ax <== NOT EXECUTED ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 10b7b0: e8 4f 29 00 00 call 10e104 <_Thread_Enable_dispatch> return 0; 10b7b5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b7b7: 8d 65 f4 lea -0xc(%ebp),%esp 10b7ba: 5b pop %ebx 10b7bb: 5e pop %esi 10b7bc: 5f pop %edi 10b7bd: c9 leave 10b7be: c3 ret 10b7bf: 90 nop <== NOT EXECUTED 10b7c0: 8d 42 54 lea 0x54(%edx),%eax 10b7c3: e9 1a ff ff ff jmp 10b6e2 10b7c8: 8d 42 54 lea 0x54(%edx),%eax 10b7cb: eb c2 jmp 10b78f =============================================================================== 0010e5b8 : int truncate( const char *path, off_t length ) { 10e5b8: 55 push %ebp 10e5b9: 89 e5 mov %esp,%ebp 10e5bb: 57 push %edi 10e5bc: 56 push %esi 10e5bd: 53 push %ebx 10e5be: 83 ec 14 sub $0x14,%esp 10e5c1: 8b 75 0c mov 0xc(%ebp),%esi 10e5c4: 8b 7d 10 mov 0x10(%ebp),%edi int status; int fd; fd = open( path, O_WRONLY ); 10e5c7: 6a 01 push $0x1 10e5c9: ff 75 08 pushl 0x8(%ebp) 10e5cc: e8 43 db ff ff call 10c114 10e5d1: 89 c3 mov %eax,%ebx if ( fd == -1 ) 10e5d3: 83 c4 10 add $0x10,%esp 10e5d6: 83 f8 ff cmp $0xffffffff,%eax 10e5d9: 74 21 je 10e5fc return -1; status = ftruncate( fd, length ); 10e5db: 50 push %eax 10e5dc: 57 push %edi 10e5dd: 56 push %esi 10e5de: 53 push %ebx 10e5df: e8 20 54 00 00 call 113a04 10e5e4: 89 c6 mov %eax,%esi (void) close( fd ); 10e5e6: 89 1c 24 mov %ebx,(%esp) 10e5e9: e8 c6 c7 ff ff call 10adb4 return status; 10e5ee: 83 c4 10 add $0x10,%esp } 10e5f1: 89 f0 mov %esi,%eax 10e5f3: 8d 65 f4 lea -0xc(%ebp),%esp 10e5f6: 5b pop %ebx 10e5f7: 5e pop %esi 10e5f8: 5f pop %edi 10e5f9: c9 leave 10e5fa: c3 ret 10e5fb: 90 nop <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); if ( fd == -1 ) return -1; 10e5fc: be ff ff ff ff mov $0xffffffff,%esi status = ftruncate( fd, length ); (void) close( fd ); return status; } 10e601: 89 f0 mov %esi,%eax 10e603: 8d 65 f4 lea -0xc(%ebp),%esp 10e606: 5b pop %ebx 10e607: 5e pop %esi 10e608: 5f pop %edi 10e609: c9 leave 10e60a: c3 ret =============================================================================== 0010b3f0 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 10b3f0: 55 push %ebp 10b3f1: 89 e5 mov %esp,%ebp 10b3f3: 56 push %esi 10b3f4: 53 push %ebx 10b3f5: 83 ec 10 sub $0x10,%esp 10b3f8: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10b3fb: 8b 0d fc 9c 12 00 mov 0x129cfc,%ecx 10b401: 85 c9 test %ecx,%ecx 10b403: 0f 84 8f 00 00 00 je 10b498 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 10b409: 83 ec 0c sub $0xc,%esp 10b40c: 68 e0 9c 12 00 push $0x129ce0 10b411: e8 b6 39 00 00 call 10edcc <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 10b416: 83 e8 02 sub $0x2,%eax 10b419: 83 c4 10 add $0x10,%esp 10b41c: 83 f8 01 cmp $0x1,%eax 10b41f: 0f 86 a3 00 00 00 jbe 10b4c8 <== ALWAYS TAKEN useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 10b425: 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 ) { 10b427: 85 db test %ebx,%ebx 10b429: 74 62 je 10b48d Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10b42b: ba 83 de 1b 43 mov $0x431bde83,%edx 10b430: 89 d8 mov %ebx,%eax 10b432: f7 e2 mul %edx 10b434: c1 ea 12 shr $0x12,%edx 10b437: 89 55 f0 mov %edx,-0x10(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10b43a: 8d 04 92 lea (%edx,%edx,4),%eax 10b43d: 8d 04 80 lea (%eax,%eax,4),%eax 10b440: 8d 04 80 lea (%eax,%eax,4),%eax 10b443: 8d 04 80 lea (%eax,%eax,4),%eax 10b446: 8d 04 80 lea (%eax,%eax,4),%eax 10b449: 8d 04 80 lea (%eax,%eax,4),%eax 10b44c: c1 e0 06 shl $0x6,%eax 10b44f: 29 c3 sub %eax,%ebx 10b451: 8d 04 9b lea (%ebx,%ebx,4),%eax 10b454: 8d 04 80 lea (%eax,%eax,4),%eax 10b457: 8d 04 80 lea (%eax,%eax,4),%eax 10b45a: c1 e0 03 shl $0x3,%eax 10b45d: 89 45 f4 mov %eax,-0xc(%ebp) ticks = _Timespec_To_ticks( &tp ); 10b460: 83 ec 0c sub $0xc,%esp 10b463: 8d 5d f0 lea -0x10(%ebp),%ebx 10b466: 53 push %ebx 10b467: e8 bc 34 00 00 call 10e928 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10b46c: 89 1c 24 mov %ebx,(%esp) 10b46f: e8 b4 34 00 00 call 10e928 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b474: a3 ec 9c 12 00 mov %eax,0x129cec _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b479: 58 pop %eax 10b47a: 5a pop %edx 10b47b: 68 e0 9c 12 00 push $0x129ce0 10b480: 68 24 94 12 00 push $0x129424 10b485: e8 0a 38 00 00 call 10ec94 <_Watchdog_Insert> 10b48a: 83 c4 10 add $0x10,%esp } return remaining; } 10b48d: 89 f0 mov %esi,%eax 10b48f: 8d 65 f8 lea -0x8(%ebp),%esp 10b492: 5b pop %ebx 10b493: 5e pop %esi 10b494: c9 leave 10b495: c3 ret 10b496: 66 90 xchg %ax,%ax <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b498: c7 05 e8 9c 12 00 00 movl $0x0,0x129ce8 10b49f: 00 00 00 the_watchdog->routine = routine; 10b4a2: c7 05 fc 9c 12 00 b4 movl $0x10b3b4,0x129cfc 10b4a9: b3 10 00 the_watchdog->id = id; 10b4ac: c7 05 00 9d 12 00 00 movl $0x0,0x129d00 10b4b3: 00 00 00 the_watchdog->user_data = user_data; 10b4b6: c7 05 04 9d 12 00 00 movl $0x0,0x129d04 10b4bd: 00 00 00 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 10b4c0: 31 f6 xor %esi,%esi 10b4c2: e9 60 ff ff ff jmp 10b427 10b4c7: 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); 10b4c8: a1 f4 9c 12 00 mov 0x129cf4,%eax 10b4cd: 03 05 ec 9c 12 00 add 0x129cec,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10b4d3: 83 ec 08 sub $0x8,%esp 10b4d6: 8d 55 f0 lea -0x10(%ebp),%edx 10b4d9: 52 push %edx * 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); 10b4da: 2b 05 f8 9c 12 00 sub 0x129cf8,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10b4e0: 50 push %eax 10b4e1: e8 ba 33 00 00 call 10e8a0 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10b4e6: 8b 45 f0 mov -0x10(%ebp),%eax 10b4e9: 8d 04 80 lea (%eax,%eax,4),%eax 10b4ec: 8d 04 80 lea (%eax,%eax,4),%eax 10b4ef: 8d 04 80 lea (%eax,%eax,4),%eax 10b4f2: 8d 04 80 lea (%eax,%eax,4),%eax 10b4f5: 8d 04 80 lea (%eax,%eax,4),%eax 10b4f8: 8d 0c 80 lea (%eax,%eax,4),%ecx 10b4fb: c1 e1 06 shl $0x6,%ecx remaining += tp.tv_nsec / 1000; 10b4fe: 8b 75 f4 mov -0xc(%ebp),%esi 10b501: b8 d3 4d 62 10 mov $0x10624dd3,%eax 10b506: f7 ee imul %esi 10b508: 89 d0 mov %edx,%eax 10b50a: c1 f8 06 sar $0x6,%eax 10b50d: c1 fe 1f sar $0x1f,%esi 10b510: 29 f0 sub %esi,%eax 10b512: 8d 34 08 lea (%eax,%ecx,1),%esi 10b515: 83 c4 10 add $0x10,%esp 10b518: e9 0a ff ff ff jmp 10b427 =============================================================================== 0010bb54 : #include int unlink( const char *path ) { 10bb54: 55 push %ebp 10bb55: 89 e5 mov %esp,%ebp 10bb57: 57 push %edi 10bb58: 56 push %esi 10bb59: 53 push %ebx 10bb5a: 83 ec 58 sub $0x58,%esp 10bb5d: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 10bb60: 53 push %ebx 10bb61: e8 3e d3 ff ff call 108ea4 if ( parentpathlen == 0 ) 10bb66: 83 c4 10 add $0x10,%esp 10bb69: 85 c0 test %eax,%eax 10bb6b: 0f 85 d3 00 00 00 jne 10bc44 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 10bb71: 50 push %eax 10bb72: 8d 45 d0 lea -0x30(%ebp),%eax 10bb75: 89 45 b4 mov %eax,-0x4c(%ebp) 10bb78: 50 push %eax 10bb79: 8d 45 e4 lea -0x1c(%ebp),%eax 10bb7c: 50 push %eax 10bb7d: 53 push %ebx 10bb7e: e8 b9 e2 ff ff call 109e3c 10bb83: 83 c4 10 add $0x10,%esp 10bb86: 31 d2 xor %edx,%edx const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 10bb88: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10bb8c: 8d 7d bc lea -0x44(%ebp),%edi 10bb8f: b9 05 00 00 00 mov $0x5,%ecx 10bb94: 8b 75 b4 mov -0x4c(%ebp),%esi 10bb97: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 10bb99: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10bb9b: be ff ff ff ff mov $0xffffffff,%esi 10bba0: 89 f1 mov %esi,%ecx 10bba2: 89 df mov %ebx,%edi 10bba4: 31 c0 xor %eax,%eax 10bba6: f2 ae repnz scas %es:(%edi),%al 10bba8: f7 d1 not %ecx 10bbaa: 49 dec %ecx 10bbab: 83 ec 08 sub $0x8,%esp 10bbae: 51 push %ecx 10bbaf: 53 push %ebx 10bbb0: e8 33 d3 ff ff call 108ee8 10bbb5: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10bbb7: 89 f1 mov %esi,%ecx 10bbb9: 89 df mov %ebx,%edi 10bbbb: 31 c0 xor %eax,%eax 10bbbd: f2 ae repnz scas %es:(%edi),%al 10bbbf: f7 d1 not %ecx 10bbc1: 49 dec %ecx 10bbc2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10bbc9: 8d 75 bc lea -0x44(%ebp),%esi 10bbcc: 56 push %esi 10bbcd: 6a 00 push $0x0 10bbcf: 51 push %ecx 10bbd0: 53 push %ebx 10bbd1: e8 22 d2 ff ff call 108df8 0, &loc, false ); if ( result != 0 ) { 10bbd6: 83 c4 20 add $0x20,%esp 10bbd9: 85 c0 test %eax,%eax 10bbdb: 75 53 jne 10bc30 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 10bbdd: 83 ec 0c sub $0xc,%esp 10bbe0: 56 push %esi 10bbe1: 8b 45 c8 mov -0x38(%ebp),%eax 10bbe4: ff 50 10 call *0x10(%eax) 10bbe7: 83 c4 10 add $0x10,%esp 10bbea: 48 dec %eax 10bbeb: 0f 84 83 00 00 00 je 10bc74 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 10bbf1: 83 ec 08 sub $0x8,%esp 10bbf4: 56 push %esi 10bbf5: ff 75 b4 pushl -0x4c(%ebp) 10bbf8: 8b 45 c8 mov -0x38(%ebp),%eax 10bbfb: ff 50 0c call *0xc(%eax) rtems_filesystem_freenode( &loc ); 10bbfe: 89 34 24 mov %esi,(%esp) 10bc01: 89 45 ac mov %eax,-0x54(%ebp) 10bc04: e8 2f d3 ff ff call 108f38 if ( free_parentloc ) 10bc09: 83 c4 10 add $0x10,%esp 10bc0c: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10bc10: 8b 45 ac mov -0x54(%ebp),%eax 10bc13: 74 11 je 10bc26 rtems_filesystem_freenode( &parentloc ); 10bc15: 83 ec 0c sub $0xc,%esp 10bc18: ff 75 b4 pushl -0x4c(%ebp) 10bc1b: e8 18 d3 ff ff call 108f38 10bc20: 83 c4 10 add $0x10,%esp 10bc23: 8b 45 ac mov -0x54(%ebp),%eax return result; } 10bc26: 8d 65 f4 lea -0xc(%ebp),%esp 10bc29: 5b pop %ebx 10bc2a: 5e pop %esi 10bc2b: 5f pop %edi 10bc2c: c9 leave 10bc2d: c3 ret 10bc2e: 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, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 10bc30: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10bc34: 75 70 jne 10bca6 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); return -1; 10bc36: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 10bc3b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10bc3e: 5b pop %ebx <== NOT EXECUTED 10bc3f: 5e pop %esi <== NOT EXECUTED 10bc40: 5f pop %edi <== NOT EXECUTED 10bc41: c9 leave <== NOT EXECUTED 10bc42: c3 ret <== NOT EXECUTED 10bc43: 90 nop <== 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, 10bc44: 89 c2 mov %eax,%edx 10bc46: 83 ec 0c sub $0xc,%esp 10bc49: 6a 00 push $0x0 10bc4b: 8d 45 d0 lea -0x30(%ebp),%eax 10bc4e: 89 45 b4 mov %eax,-0x4c(%ebp) 10bc51: 50 push %eax 10bc52: 6a 02 push $0x2 10bc54: 52 push %edx 10bc55: 53 push %ebx 10bc56: 89 55 ac mov %edx,-0x54(%ebp) 10bc59: e8 02 d2 ff ff call 108e60 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10bc5e: 83 c4 20 add $0x20,%esp 10bc61: 85 c0 test %eax,%eax 10bc63: 8b 55 ac mov -0x54(%ebp),%edx 10bc66: 75 ce jne 10bc36 <== NEVER TAKEN return -1; free_parentloc = true; 10bc68: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 10bc6c: e9 1b ff ff ff jmp 10bb8c 10bc71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 10bc74: 83 ec 0c sub $0xc,%esp 10bc77: 56 push %esi 10bc78: e8 bb d2 ff ff call 108f38 if ( free_parentloc ) 10bc7d: 83 c4 10 add $0x10,%esp 10bc80: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10bc84: 74 0e je 10bc94 rtems_filesystem_freenode( &parentloc ); 10bc86: 83 ec 0c sub $0xc,%esp 10bc89: ff 75 b4 pushl -0x4c(%ebp) 10bc8c: e8 a7 d2 ff ff call 108f38 10bc91: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EISDIR ); 10bc94: e8 9b b3 00 00 call 117034 <__errno> 10bc99: c7 00 15 00 00 00 movl $0x15,(%eax) 10bc9f: b8 ff ff ff ff mov $0xffffffff,%eax 10bca4: eb 80 jmp 10bc26 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 10bca6: 83 ec 0c sub $0xc,%esp 10bca9: ff 75 b4 pushl -0x4c(%ebp) 10bcac: e8 87 d2 ff ff call 108f38 10bcb1: 83 c4 10 add $0x10,%esp return -1; 10bcb4: b8 ff ff ff ff mov $0xffffffff,%eax 10bcb9: e9 68 ff ff ff jmp 10bc26 =============================================================================== 0010bd34 : */ int unmount( const char *path ) { 10bd34: 55 push %ebp 10bd35: 89 e5 mov %esp,%ebp 10bd37: 57 push %edi 10bd38: 56 push %esi 10bd39: 53 push %ebx 10bd3a: 83 ec 38 sub $0x38,%esp 10bd3d: 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 ) ) 10bd40: 31 c0 xor %eax,%eax 10bd42: b9 ff ff ff ff mov $0xffffffff,%ecx 10bd47: 89 d7 mov %edx,%edi 10bd49: f2 ae repnz scas %es:(%edi),%al 10bd4b: f7 d1 not %ecx 10bd4d: 49 dec %ecx 10bd4e: 6a 01 push $0x1 10bd50: 8d 75 d4 lea -0x2c(%ebp),%esi 10bd53: 56 push %esi 10bd54: 6a 00 push $0x0 10bd56: 51 push %ecx 10bd57: 52 push %edx 10bd58: e8 77 cf ff ff call 108cd4 10bd5d: 83 c4 20 add $0x20,%esp 10bd60: 85 c0 test %eax,%eax 10bd62: 75 68 jne 10bdcc return -1; mt_entry = loc.mt_entry; 10bd64: 8b 5d e4 mov -0x1c(%ebp),%ebx /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ 10bd67: 8b 45 d4 mov -0x2c(%ebp),%eax 10bd6a: 39 43 1c cmp %eax,0x1c(%ebx) 10bd6d: 0f 85 c5 00 00 00 jne 10be38 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10bd73: 83 ec 0c sub $0xc,%esp 10bd76: 56 push %esi 10bd77: e8 30 d0 ff ff call 108dac * 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 ) 10bd7c: 83 c4 10 add $0x10,%esp 10bd7f: a1 70 7c 12 00 mov 0x127c70,%eax 10bd84: 39 58 14 cmp %ebx,0x14(%eax) 10bd87: 0f 84 cf 00 00 00 je 10be5c /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 10bd8d: 83 ec 08 sub $0x8,%esp 10bd90: ff 73 2c pushl 0x2c(%ebx) 10bd93: 68 20 bd 10 00 push $0x10bd20 10bd98: e8 ab d7 ff ff call 109548 10bd9d: 83 c4 10 add $0x10,%esp 10bda0: 84 c0 test %al,%al 10bda2: 0f 85 b4 00 00 00 jne 10be5c * 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 ) 10bda8: 83 ec 0c sub $0xc,%esp 10bdab: 53 push %ebx 10bdac: e8 2b d3 ff ff call 1090dc 10bdb1: 83 c4 10 add $0x10,%esp 10bdb4: 48 dec %eax 10bdb5: 0f 84 a1 00 00 00 je 10be5c * 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 ) 10bdbb: 83 ec 0c sub $0xc,%esp 10bdbe: 8b 43 14 mov 0x14(%ebx),%eax 10bdc1: 53 push %ebx 10bdc2: ff 50 28 call *0x28(%eax) 10bdc5: 83 c4 10 add $0x10,%esp 10bdc8: 85 c0 test %eax,%eax 10bdca: 74 10 je 10bddc <== ALWAYS TAKEN */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) rtems_fatal_error_occurred( 0 ); return -1; 10bdcc: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10bdd1: 8d 65 f4 lea -0xc(%ebp),%esp 10bdd4: 5b pop %ebx 10bdd5: 5e pop %esi 10bdd6: 5f pop %edi 10bdd7: c9 leave 10bdd8: c3 ret 10bdd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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){ 10bddc: 83 ec 0c sub $0xc,%esp 10bddf: 8b 43 28 mov 0x28(%ebx),%eax 10bde2: 53 push %ebx 10bde3: ff 50 2c call *0x2c(%eax) 10bde6: 83 c4 10 add $0x10,%esp 10bde9: 85 c0 test %eax,%eax 10bdeb: 0f 85 83 00 00 00 jne 10be74 <== NEVER TAKEN 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 ); 10bdf1: 52 push %edx 10bdf2: 6a 00 push $0x0 10bdf4: 6a 00 push $0x0 10bdf6: ff 35 48 9f 12 00 pushl 0x129f48 10bdfc: e8 77 0b 00 00 call 10c978 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10be01: 89 1c 24 mov %ebx,(%esp) 10be04: e8 67 14 00 00 call 10d270 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10be09: 58 pop %eax 10be0a: ff 35 48 9f 12 00 pushl 0x129f48 10be10: e8 5f 0c 00 00 call 10ca74 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; 10be15: 8d 43 08 lea 0x8(%ebx),%eax /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 10be18: 89 04 24 mov %eax,(%esp) 10be1b: e8 8c cf ff ff call 108dac free( mt_entry ); 10be20: 89 1c 24 mov %ebx,(%esp) 10be23: e8 98 cf ff ff call 108dc0 return 0; 10be28: 83 c4 10 add $0x10,%esp 10be2b: 31 c0 xor %eax,%eax } 10be2d: 8d 65 f4 lea -0xc(%ebp),%esp 10be30: 5b pop %ebx 10be31: 5e pop %esi 10be32: 5f pop %edi 10be33: c9 leave 10be34: c3 ret 10be35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ rtems_filesystem_freenode( &loc ); 10be38: 83 ec 0c sub $0xc,%esp 10be3b: 56 push %esi 10be3c: e8 6b cf ff ff call 108dac rtems_set_errno_and_return_minus_one( EACCES ); 10be41: e8 92 84 00 00 call 1142d8 <__errno> 10be46: c7 00 0d 00 00 00 movl $0xd,(%eax) 10be4c: 83 c4 10 add $0x10,%esp 10be4f: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10be54: 8d 65 f4 lea -0xc(%ebp),%esp 10be57: 5b pop %ebx 10be58: 5e pop %esi 10be59: 5f pop %edi 10be5a: c9 leave 10be5b: c3 ret * 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 ); 10be5c: e8 77 84 00 00 call 1142d8 <__errno> 10be61: c7 00 10 00 00 00 movl $0x10,(%eax) 10be67: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10be6c: 8d 65 f4 lea -0xc(%ebp),%esp 10be6f: 5b pop %ebx 10be70: 5e pop %esi 10be71: 5f pop %edi 10be72: c9 leave 10be73: 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 ) 10be74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10be77: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10be7a: 53 push %ebx <== NOT EXECUTED 10be7b: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10be7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10be81: 85 c0 test %eax,%eax <== NOT EXECUTED 10be83: 0f 84 43 ff ff ff je 10bdcc <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10be89: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10be8c: 6a 00 push $0x0 <== NOT EXECUTED 10be8e: e8 dd 10 00 00 call 10cf70 <== NOT EXECUTED =============================================================================== 0010bef0 : int utime( const char *path, const struct utimbuf *times ) { 10bef0: 55 push %ebp 10bef1: 89 e5 mov %esp,%ebp 10bef3: 57 push %edi 10bef4: 56 push %esi 10bef5: 53 push %ebx 10bef6: 83 ec 48 sub $0x48,%esp 10bef9: 8b 55 08 mov 0x8(%ebp),%edx 10befc: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t temp_loc; int result; struct utimbuf now; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 10beff: 31 c0 xor %eax,%eax 10bf01: b9 ff ff ff ff mov $0xffffffff,%ecx 10bf06: 89 d7 mov %edx,%edi 10bf08: f2 ae repnz scas %es:(%edi),%al 10bf0a: f7 d1 not %ecx 10bf0c: 49 dec %ecx 10bf0d: 6a 01 push $0x1 10bf0f: 8d 75 d4 lea -0x2c(%ebp),%esi 10bf12: 56 push %esi 10bf13: 6a 00 push $0x0 10bf15: 51 push %ecx 10bf16: 52 push %edx 10bf17: e8 cc ca ff ff call 1089e8 10bf1c: 83 c4 20 add $0x20,%esp 10bf1f: 85 c0 test %eax,%eax 10bf21: 75 2d jne 10bf50 return -1; if ( times == NULL ) { 10bf23: 85 db test %ebx,%ebx 10bf25: 74 39 je 10bf60 10bf27: 8b 43 04 mov 0x4(%ebx),%eax 10bf2a: 8b 13 mov (%ebx),%edx now.actime = now.modtime = time( NULL ); times = &now; } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 10bf2c: 51 push %ecx 10bf2d: 50 push %eax 10bf2e: 52 push %edx 10bf2f: 56 push %esi 10bf30: 8b 45 e0 mov -0x20(%ebp),%eax 10bf33: ff 50 30 call *0x30(%eax) rtems_filesystem_freenode( &temp_loc ); 10bf36: 89 34 24 mov %esi,(%esp) 10bf39: 89 45 c4 mov %eax,-0x3c(%ebp) 10bf3c: e8 97 ce ff ff call 108dd8 return result; 10bf41: 83 c4 10 add $0x10,%esp 10bf44: 8b 45 c4 mov -0x3c(%ebp),%eax } 10bf47: 8d 65 f4 lea -0xc(%ebp),%esp 10bf4a: 5b pop %ebx 10bf4b: 5e pop %esi 10bf4c: 5f pop %edi 10bf4d: c9 leave 10bf4e: c3 ret 10bf4f: 90 nop <== NOT EXECUTED rtems_filesystem_location_info_t temp_loc; int result; struct utimbuf now; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; 10bf50: b8 ff ff ff ff mov $0xffffffff,%eax result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 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 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( times == NULL ) { now.actime = now.modtime = time( NULL ); 10bf60: 83 ec 0c sub $0xc,%esp 10bf63: 6a 00 push $0x0 10bf65: e8 12 c9 00 00 call 11887c