=============================================================================== 0010e674 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10e674: 55 push %ebp 10e675: 89 e5 mov %esp,%ebp 10e677: 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; 10e67a: 8b 50 10 mov 0x10(%eax),%edx 10e67d: 8b 4a 34 mov 0x34(%edx),%ecx switch( node->type ) { 10e680: 8b 10 mov (%eax),%edx 10e682: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10e686: 77 12 ja 10e69a <== NEVER TAKEN 10e688: 8b 52 4c mov 0x4c(%edx),%edx 10e68b: ff 24 95 b0 12 12 00 jmp *0x1212b0(,%edx,4) 10e692: 66 90 xchg %ax,%ax case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10e694: 8b 51 0c mov 0xc(%ecx),%edx 10e697: 89 50 08 mov %edx,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10e69a: 31 c0 xor %eax,%eax 10e69c: c9 leave 10e69d: c3 ret 10e69e: 66 90 xchg %ax,%ax break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 10e6a0: 8b 51 08 mov 0x8(%ecx),%edx 10e6a3: 89 50 08 mov %edx,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10e6a6: 31 c0 xor %eax,%eax 10e6a8: c9 leave 10e6a9: c3 ret 10e6aa: 66 90 xchg %ax,%ax case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10e6ac: c7 40 08 60 13 12 00 movl $0x121360,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10e6b3: 31 c0 xor %eax,%eax 10e6b5: c9 leave 10e6b6: c3 ret 10e6b7: 90 nop break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 10e6b8: 8b 51 10 mov 0x10(%ecx),%edx 10e6bb: 89 50 08 mov %edx,0x8(%eax) break; } return 0; } 10e6be: 31 c0 xor %eax,%eax 10e6c0: c9 leave 10e6c1: c3 ret 10e6c2: 66 90 xchg %ax,%ax switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10e6c4: c7 40 08 e0 12 12 00 movl $0x1212e0,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10e6cb: 31 c0 xor %eax,%eax 10e6cd: c9 leave 10e6ce: c3 ret =============================================================================== 0010efec : void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { 10efec: 55 push %ebp 10efed: 89 e5 mov %esp,%ebp 10efef: 53 push %ebx 10eff0: 83 ec 10 sub $0x10,%esp 10eff3: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { 10eff6: 53 push %ebx 10eff7: e8 4c 05 00 00 call 10f548 10effc: 83 c4 10 add $0x10,%esp 10efff: 85 c0 test %eax,%eax 10f001: 75 2d jne 10f030 10f003: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10f008: 75 26 jne 10f030 if ( rtems_filesystem_current.node_access == jnode ) 10f00a: a1 10 54 12 00 mov 0x125410,%eax 10f00f: 39 58 04 cmp %ebx,0x4(%eax) 10f012: 74 58 je 10f06c rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { 10f014: 8b 43 4c mov 0x4c(%ebx),%eax 10f017: 83 f8 04 cmp $0x4,%eax 10f01a: 74 34 je 10f050 10f01c: 83 f8 05 cmp $0x5,%eax 10f01f: 74 17 je 10f038 break; default: break; } free( jnode ); 10f021: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f024: 8b 5d fc mov -0x4(%ebp),%ebx 10f027: c9 leave break; default: break; } free( jnode ); 10f028: e9 07 86 ff ff jmp 107634 10f02d: 8d 76 00 lea 0x0(%esi),%esi } } 10f030: 8b 5d fc mov -0x4(%ebp),%ebx 10f033: c9 leave 10f034: c3 ret 10f035: 8d 76 00 lea 0x0(%esi),%esi if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); 10f038: 83 ec 0c sub $0xc,%esp 10f03b: 53 push %ebx 10f03c: e8 37 29 00 00 call 111978 break; 10f041: 83 c4 10 add $0x10,%esp break; default: break; } free( jnode ); 10f044: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f047: 8b 5d fc mov -0x4(%ebp),%ebx 10f04a: c9 leave break; default: break; } free( jnode ); 10f04b: e9 e4 85 ff ff jmp 107634 switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); break; case IMFS_SYM_LINK: free( jnode->info.sym_link.name ); 10f050: 83 ec 0c sub $0xc,%esp 10f053: ff 73 50 pushl 0x50(%ebx) 10f056: e8 d9 85 ff ff call 107634 break; 10f05b: 83 c4 10 add $0x10,%esp default: break; } free( jnode ); 10f05e: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f061: 8b 5d fc mov -0x4(%ebp),%ebx 10f064: c9 leave break; default: break; } free( jnode ); 10f065: e9 ca 85 ff ff jmp 107634 10f06a: 66 90 xchg %ax,%ax 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; 10f06c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10f073: eb 9f jmp 10f014 =============================================================================== 0010e434 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 10e434: 55 push %ebp 10e435: 89 e5 mov %esp,%ebp 10e437: 57 push %edi 10e438: 56 push %esi 10e439: 53 push %ebx 10e43a: 83 ec 1c sub $0x1c,%esp 10e43d: 8b 7d 0c mov 0xc(%ebp),%edi 10e440: 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; 10e443: 8b 45 08 mov 0x8(%ebp),%eax 10e446: 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(); 10e448: e8 bb 0e 00 00 call 10f308 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 10e44d: 66 39 43 3c cmp %ax,0x3c(%ebx) 10e451: 74 05 je 10e458 10e453: 66 85 c0 test %ax,%ax 10e456: 75 2c jne 10e484 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 10e458: 66 89 7b 3c mov %di,0x3c(%ebx) jnode->st_gid = group; 10e45c: 66 89 73 3e mov %si,0x3e(%ebx) IMFS_update_ctime( jnode ); 10e460: 83 ec 08 sub $0x8,%esp 10e463: 6a 00 push $0x0 10e465: 8d 45 e0 lea -0x20(%ebp),%eax 10e468: 50 push %eax 10e469: e8 42 92 ff ff call 1076b0 10e46e: 8b 45 e0 mov -0x20(%ebp),%eax 10e471: 89 43 48 mov %eax,0x48(%ebx) return 0; 10e474: 83 c4 10 add $0x10,%esp 10e477: 31 c0 xor %eax,%eax } 10e479: 8d 65 f4 lea -0xc(%ebp),%esp 10e47c: 5b pop %ebx 10e47d: 5e pop %esi 10e47e: 5f pop %edi 10e47f: c9 leave 10e480: c3 ret 10e481: 8d 76 00 lea 0x0(%esi),%esi #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 ); 10e484: e8 cb 49 00 00 call 112e54 <__errno> 10e489: c7 00 01 00 00 00 movl $0x1,(%eax) 10e48f: b8 ff ff ff ff mov $0xffffffff,%eax 10e494: eb e3 jmp 10e479 =============================================================================== 0010e508 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10e508: 55 push %ebp 10e509: 89 e5 mov %esp,%ebp 10e50b: 57 push %edi 10e50c: 56 push %esi 10e50d: 53 push %ebx 10e50e: 83 ec 1c sub $0x1c,%esp 10e511: 8b 45 08 mov 0x8(%ebp),%eax 10e514: 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 ) 10e517: 85 c0 test %eax,%eax 10e519: 0f 84 ba 00 00 00 je 10e5d9 <== NEVER TAKEN return NULL; parent = parent_loc->node_access; 10e51f: 8b 38 mov (%eax),%edi fs_info = parent_loc->mt_entry->fs_info; 10e521: 8b 40 10 mov 0x10(%eax),%eax 10e524: 8b 70 34 mov 0x34(%eax),%esi /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 10e527: 83 fb 07 cmp $0x7,%ebx 10e52a: 0f 84 9c 00 00 00 je 10e5cc return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10e530: 50 push %eax 10e531: a1 10 54 12 00 mov 0x125410,%eax 10e536: 8b 40 2c mov 0x2c(%eax),%eax 10e539: f7 d0 not %eax 10e53b: 23 45 14 and 0x14(%ebp),%eax 10e53e: 50 push %eax 10e53f: ff 75 10 pushl 0x10(%ebp) 10e542: 53 push %ebx 10e543: e8 50 ff ff ff call 10e498 if ( !node ) 10e548: 83 c4 10 add $0x10,%esp 10e54b: 85 c0 test %eax,%eax 10e54d: 74 73 je 10e5c2 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 10e54f: 83 fb 01 cmp $0x1,%ebx 10e552: 74 38 je 10e58c rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 10e554: 83 fb 03 cmp $0x3,%ebx 10e557: 0f 84 97 00 00 00 je 10e5f4 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 10e55d: 83 fb 04 cmp $0x4,%ebx 10e560: 0f 84 8e 00 00 00 je 10e5f4 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { 10e566: 83 fb 02 cmp $0x2,%ebx 10e569: 74 79 je 10e5e4 node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { 10e56b: 83 fb 06 cmp $0x6,%ebx 10e56e: 0f 84 8c 00 00 00 je 10e600 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 10e574: 83 fb 05 cmp $0x5,%ebx 10e577: 0f 84 9b 00 00 00 je 10e618 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 ) { 10e57d: 83 fb 07 cmp $0x7,%ebx 10e580: 75 1d jne 10e59f <== NEVER TAKEN node->info.fifo.pipe = NULL; 10e582: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10e589: eb 14 jmp 10e59f 10e58b: 90 nop RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10e58c: 8d 50 54 lea 0x54(%eax),%edx 10e58f: 89 50 50 mov %edx,0x50(%eax) head->next = tail; head->previous = NULL; 10e592: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 10e599: 8d 50 50 lea 0x50(%eax),%edx 10e59c: 89 50 58 mov %edx,0x58(%eax) } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 10e59f: 89 78 08 mov %edi,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10e5a2: 8b 56 04 mov 0x4(%esi),%edx 10e5a5: 42 inc %edx 10e5a6: 89 56 04 mov %edx,0x4(%esi) 10e5a9: 89 50 38 mov %edx,0x38(%eax) 10e5ac: 83 ec 08 sub $0x8,%esp 10e5af: 50 push %eax rtems_chain_append( &parent->info.directory.Entries, &node->Node ); 10e5b0: 83 c7 50 add $0x50,%edi 10e5b3: 57 push %edi 10e5b4: 89 45 e4 mov %eax,-0x1c(%ebp) 10e5b7: e8 14 cf ff ff call 10b4d0 <_Chain_Append> return node; 10e5bc: 83 c4 10 add $0x10,%esp 10e5bf: 8b 45 e4 mov -0x1c(%ebp),%eax } 10e5c2: 8d 65 f4 lea -0xc(%ebp),%esp 10e5c5: 5b pop %ebx 10e5c6: 5e pop %esi 10e5c7: 5f pop %edi 10e5c8: c9 leave 10e5c9: c3 ret 10e5ca: 66 90 xchg %ax,%ax fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 10e5cc: 81 7e 10 40 12 12 00 cmpl $0x121240,0x10(%esi) 10e5d3: 0f 85 57 ff ff ff jne 10e530 fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 10e5d9: 31 c0 xor %eax,%eax node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 10e5db: 8d 65 f4 lea -0xc(%ebp),%esp 10e5de: 5b pop %ebx 10e5df: 5e pop %esi 10e5e0: 5f pop %edi 10e5e1: c9 leave 10e5e2: c3 ret 10e5e3: 90 nop } 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; 10e5e4: 8b 4d 18 mov 0x18(%ebp),%ecx 10e5e7: 8b 11 mov (%ecx),%edx 10e5e9: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10e5ec: 8b 51 04 mov 0x4(%ecx),%edx 10e5ef: 89 50 54 mov %edx,0x54(%eax) 10e5f2: eb ab jmp 10e59f 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; 10e5f4: 8b 4d 18 mov 0x18(%ebp),%ecx 10e5f7: 8b 11 mov (%ecx),%edx 10e5f9: 89 50 50 mov %edx,0x50(%eax) 10e5fc: eb a1 jmp 10e59f 10e5fe: 66 90 xchg %ax,%ax } 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; 10e600: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10e607: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.linearfile.direct = 0; 10e60e: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) 10e615: eb 88 jmp 10e59f 10e617: 90 nop } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; 10e618: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10e61f: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10e626: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10e62d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10e634: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) 10e63b: e9 5f ff ff ff jmp 10e59f =============================================================================== 00109a58 : */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 109a58: 55 push %ebp 109a59: 89 e5 mov %esp,%ebp 109a5b: 57 push %edi 109a5c: 56 push %esi 109a5d: 53 push %ebx 109a5e: 83 ec 1c sub $0x1c,%esp 109a61: 8b 45 08 mov 0x8(%ebp),%eax 109a64: 8b 75 0c mov 0xc(%ebp),%esi * */ int IMFS_memfile_maximum_size( void ) { return IMFS_MEMFILE_MAXIMUM_SIZE; } 109a67: 8b 78 50 mov 0x50(%eax),%edi RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 109a6a: 83 c0 54 add $0x54,%eax 109a6d: 89 45 e4 mov %eax,-0x1c(%ebp) IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 109a70: 39 c7 cmp %eax,%edi 109a72: 74 47 je 109abb 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 ); 109a74: 8d 46 01 lea 0x1(%esi),%eax 109a77: 89 45 e0 mov %eax,-0x20(%ebp) 109a7a: 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++ ) 109a7c: 85 f6 test %esi,%esi 109a7e: 78 22 js 109aa2 <== NEVER TAKEN 109a80: 31 db xor %ebx,%ebx 109a82: 66 90 xchg %ax,%ax fprintf(stdout, "...." ); 109a84: a1 20 b2 12 00 mov 0x12b220,%eax 109a89: ff 70 08 pushl 0x8(%eax) 109a8c: 6a 04 push $0x4 109a8e: 6a 01 push $0x1 109a90: 68 72 6b 12 00 push $0x126b72 109a95: e8 26 e6 00 00 call 1180c0 !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++ ) 109a9a: 43 inc %ebx 109a9b: 83 c4 10 add $0x10,%esp 109a9e: 39 de cmp %ebx,%esi 109aa0: 7d e2 jge 109a84 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 109aa2: 83 ec 0c sub $0xc,%esp 109aa5: 57 push %edi 109aa6: e8 75 fe ff ff call 109920 if ( the_jnode->type == IMFS_DIRECTORY ) 109aab: 83 c4 10 add $0x10,%esp 109aae: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 109ab2: 74 10 je 109ac4 the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 109ab4: 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 = rtems_chain_first( the_chain ); 109ab6: 3b 7d e4 cmp -0x1c(%ebp),%edi 109ab9: 75 c1 jne 109a7c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 109abb: 8d 65 f4 lea -0xc(%ebp),%esp 109abe: 5b pop %ebx 109abf: 5e pop %esi 109ac0: 5f pop %edi 109ac1: c9 leave 109ac2: c3 ret 109ac3: 90 nop 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 ); 109ac4: 83 ec 08 sub $0x8,%esp 109ac7: ff 75 e0 pushl -0x20(%ebp) 109aca: 57 push %edi 109acb: e8 88 ff ff ff call 109a58 109ad0: 83 c4 10 add $0x10,%esp 109ad3: eb df jmp 109ab4 =============================================================================== 0010e780 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10e780: 55 push %ebp 10e781: 89 e5 mov %esp,%ebp 10e783: 57 push %edi 10e784: 56 push %esi 10e785: 53 push %ebx 10e786: 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 ) ) { 10e789: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10e790: 0f 85 ee 01 00 00 jne 10e984 <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10e796: 8b 45 14 mov 0x14(%ebp),%eax 10e799: 8b 38 mov (%eax),%edi size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; 10e79b: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) 10e7a2: 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 ); 10e7a5: 8d 55 e4 lea -0x1c(%ebp),%edx 10e7a8: 52 push %edx 10e7a9: 56 push %esi 10e7aa: ff 75 0c pushl 0xc(%ebp) 10e7ad: 8b 45 08 mov 0x8(%ebp),%eax 10e7b0: 03 45 a4 add -0x5c(%ebp),%eax 10e7b3: 50 push %eax 10e7b4: e8 17 07 00 00 call 10eed0 10e7b9: 89 c3 mov %eax,%ebx pathnamelen -= len; 10e7bb: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10e7be: 8b 4d 14 mov 0x14(%ebp),%ecx 10e7c1: 8b 01 mov (%ecx),%eax 10e7c3: 83 c4 10 add $0x10,%esp 10e7c6: 85 c0 test %eax,%eax 10e7c8: 0f 84 e6 00 00 00 je 10e8b4 <== NEVER TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10e7ce: 29 55 0c sub %edx,0xc(%ebp) i += len; 10e7d1: 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 ) 10e7d4: 85 db test %ebx,%ebx 10e7d6: 75 44 jne 10e81c * 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 ) { 10e7d8: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e7dc: 0f 84 26 01 00 00 je 10e908 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10e7e2: 83 ec 0c sub $0xc,%esp 10e7e5: ff 75 14 pushl 0x14(%ebp) 10e7e8: e8 87 fe ff ff call 10e674 10e7ed: 89 c3 mov %eax,%ebx 10e7ef: 5a pop %edx 10e7f0: 59 pop %ecx /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10e7f1: ff 75 10 pushl 0x10(%ebp) 10e7f4: ff 75 14 pushl 0x14(%ebp) 10e7f7: e8 d4 fe ff ff call 10e6d0 10e7fc: 83 c4 10 add $0x10,%esp 10e7ff: 85 c0 test %eax,%eax 10e801: 0f 85 d1 00 00 00 jne 10e8d8 rtems_set_errno_and_return_minus_one( EACCES ); 10e807: e8 48 46 00 00 call 112e54 <__errno> 10e80c: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e812: bb ff ff ff ff mov $0xffffffff,%ebx 10e817: e9 bc 00 00 00 jmp 10e8d8 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10e81c: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e820: 0f 84 be 00 00 00 je 10e8e4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10e826: 89 c7 mov %eax,%edi switch( type ) { 10e828: 83 fb 03 cmp $0x3,%ebx 10e82b: 74 1b je 10e848 10e82d: 83 fb 04 cmp $0x4,%ebx 10e830: 0f 84 92 00 00 00 je 10e8c8 10e836: 83 fb 02 cmp $0x2,%ebx 10e839: 74 51 je 10e88c /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10e83b: 83 fb 04 cmp $0x4,%ebx 10e83e: 0f 85 61 ff ff ff jne 10e7a5 <== ALWAYS TAKEN 10e844: eb 92 jmp 10e7d8 <== NOT EXECUTED 10e846: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10e848: 8b 40 4c mov 0x4c(%eax),%eax 10e84b: 83 f8 03 cmp $0x3,%eax 10e84e: 0f 84 08 01 00 00 je 10e95c * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 10e854: 83 f8 04 cmp $0x4,%eax 10e857: 0f 84 51 01 00 00 je 10e9ae } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10e85d: 48 dec %eax 10e85e: 0f 85 35 01 00 00 jne 10e999 /* * 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 ) { 10e864: 8b 47 5c mov 0x5c(%edi),%eax 10e867: 85 c0 test %eax,%eax 10e869: 0f 85 a4 00 00 00 jne 10e913 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10e86f: 83 ec 08 sub $0x8,%esp 10e872: 56 push %esi 10e873: 57 push %edi 10e874: e8 eb 05 00 00 call 10ee64 10e879: 89 c7 mov %eax,%edi if ( !node ) 10e87b: 83 c4 10 add $0x10,%esp 10e87e: 85 c0 test %eax,%eax 10e880: 74 32 je 10e8b4 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10e882: 8b 45 14 mov 0x14(%ebp),%eax 10e885: 89 38 mov %edi,(%eax) 10e887: e9 19 ff ff ff jmp 10e7a5 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10e88c: 8b 15 10 54 12 00 mov 0x125410,%edx 10e892: 39 42 18 cmp %eax,0x18(%edx) 10e895: 0f 84 0a ff ff ff je 10e7a5 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10e89b: 8b 4d 14 mov 0x14(%ebp),%ecx 10e89e: 8b 51 10 mov 0x10(%ecx),%edx /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10e8a1: 39 42 1c cmp %eax,0x1c(%edx) 10e8a4: 0f 84 d2 00 00 00 je 10e97c pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10e8aa: 8b 78 08 mov 0x8(%eax),%edi 10e8ad: 85 ff test %edi,%edi 10e8af: 75 d1 jne 10e882 10e8b1: 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 ); 10e8b4: e8 9b 45 00 00 call 112e54 <__errno> 10e8b9: c7 00 02 00 00 00 movl $0x2,(%eax) 10e8bf: bb ff ff ff ff mov $0xffffffff,%ebx 10e8c4: eb 12 jmp 10e8d8 10e8c6: 66 90 xchg %ax,%ax case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10e8c8: e8 87 45 00 00 call 112e54 <__errno> 10e8cd: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10e8d3: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10e8d8: 89 d8 mov %ebx,%eax 10e8da: 8d 65 f4 lea -0xc(%ebp),%esp 10e8dd: 5b pop %ebx 10e8de: 5e pop %esi 10e8df: 5f pop %edi 10e8e0: c9 leave 10e8e1: c3 ret 10e8e2: 66 90 xchg %ax,%ax /* * 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 ) ) 10e8e4: 83 ec 08 sub $0x8,%esp 10e8e7: 6a 01 push $0x1 10e8e9: ff 75 14 pushl 0x14(%ebp) 10e8ec: e8 df fd ff ff call 10e6d0 10e8f1: 83 c4 10 add $0x10,%esp 10e8f4: 85 c0 test %eax,%eax 10e8f6: 0f 84 0b ff ff ff je 10e807 10e8fc: 8b 55 14 mov 0x14(%ebp),%edx 10e8ff: 8b 02 mov (%edx),%eax 10e901: e9 20 ff ff ff jmp 10e826 10e906: 66 90 xchg %ax,%ax * * 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 ) { 10e908: 8b 40 5c mov 0x5c(%eax),%eax 10e90b: 85 c0 test %eax,%eax 10e90d: 0f 84 cf fe ff ff je 10e7e2 newloc = node->info.directory.mt_fs->mt_fs_root; 10e913: 8d 7d d0 lea -0x30(%ebp),%edi 10e916: 8d 70 1c lea 0x1c(%eax),%esi 10e919: b9 05 00 00 00 mov $0x5,%ecx 10e91e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10e920: 8d 75 d0 lea -0x30(%ebp),%esi 10e923: b1 05 mov $0x5,%cl 10e925: 8b 7d 14 mov 0x14(%ebp),%edi 10e928: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10e92a: 8b 55 e4 mov -0x1c(%ebp),%edx 10e92d: 8b 4d 14 mov 0x14(%ebp),%ecx 10e930: 8b 41 0c mov 0xc(%ecx),%eax 10e933: 51 push %ecx 10e934: ff 75 10 pushl 0x10(%ebp) 10e937: 8b 4d 0c mov 0xc(%ebp),%ecx 10e93a: 01 d1 add %edx,%ecx 10e93c: 51 push %ecx 10e93d: 8b 4d a4 mov -0x5c(%ebp),%ecx 10e940: 29 d1 sub %edx,%ecx 10e942: 8b 55 08 mov 0x8(%ebp),%edx 10e945: 01 ca add %ecx,%edx 10e947: 52 push %edx 10e948: ff 10 call *(%eax) 10e94a: 89 c3 mov %eax,%ebx 10e94c: 83 c4 10 add $0x10,%esp if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10e94f: 89 d8 mov %ebx,%eax 10e951: 8d 65 f4 lea -0xc(%ebp),%esp 10e954: 5b pop %ebx 10e955: 5e pop %esi 10e956: 5f pop %edi 10e957: c9 leave 10e958: c3 ret 10e959: 8d 76 00 lea 0x0(%esi),%esi case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 10e95c: 83 ec 08 sub $0x8,%esp 10e95f: 6a 00 push $0x0 10e961: ff 75 14 pushl 0x14(%ebp) 10e964: e8 d3 fd ff ff call 10e73c node = pathloc->node_access; 10e969: 8b 55 14 mov 0x14(%ebp),%edx 10e96c: 8b 3a mov (%edx),%edi 10e96e: 8b 47 4c mov 0x4c(%edi),%eax 10e971: 83 c4 10 add $0x10,%esp 10e974: e9 e4 fe ff ff jmp 10e85d 10e979: 8d 76 00 lea 0x0(%esi),%esi */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 10e97c: 8d 7d d0 lea -0x30(%ebp),%edi 10e97f: 8d 72 08 lea 0x8(%edx),%esi 10e982: eb 95 jmp 10e919 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 ); 10e984: e8 cb 44 00 00 call 112e54 <__errno> <== NOT EXECUTED 10e989: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 10e98f: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 10e994: e9 3f ff ff ff jmp 10e8d8 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10e999: e8 b6 44 00 00 call 112e54 <__errno> 10e99e: c7 00 14 00 00 00 movl $0x14,(%eax) 10e9a4: bb ff ff ff ff mov $0xffffffff,%ebx 10e9a9: e9 2a ff ff ff jmp 10e8d8 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 10e9ae: 83 ec 08 sub $0x8,%esp 10e9b1: 6a 00 push $0x0 10e9b3: ff 75 14 pushl 0x14(%ebp) 10e9b6: e8 1d 00 00 00 call 10e9d8 10e9bb: 89 c3 mov %eax,%ebx /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 10e9bd: 8b 4d 14 mov 0x14(%ebp),%ecx 10e9c0: 8b 39 mov (%ecx),%edi if ( result == -1 ) 10e9c2: 83 c4 10 add $0x10,%esp 10e9c5: 83 f8 ff cmp $0xffffffff,%eax 10e9c8: 0f 84 0a ff ff ff je 10e8d8 <== NEVER TAKEN /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 10e9ce: 8b 47 4c mov 0x4c(%edi),%eax 10e9d1: e9 87 fe ff ff jmp 10e85d =============================================================================== 0010eb00 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10eb00: 55 push %ebp 10eb01: 89 e5 mov %esp,%ebp 10eb03: 57 push %edi 10eb04: 56 push %esi 10eb05: 53 push %ebx 10eb06: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10eb09: 8b 45 0c mov 0xc(%ebp),%eax 10eb0c: 8b 18 mov (%eax),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10eb0e: 31 c0 xor %eax,%eax 10eb10: b9 ff ff ff ff mov $0xffffffff,%ecx 10eb15: 8b 7d 08 mov 0x8(%ebp),%edi 10eb18: f2 ae repnz scas %es:(%edi),%al 10eb1a: f7 d1 not %ecx 10eb1c: 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; 10eb1f: 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 ); 10eb26: 8d 55 e4 lea -0x1c(%ebp),%edx 10eb29: 52 push %edx 10eb2a: 8d 4d af lea -0x51(%ebp),%ecx 10eb2d: 51 push %ecx 10eb2e: 56 push %esi 10eb2f: 8b 45 08 mov 0x8(%ebp),%eax 10eb32: 03 45 a4 add -0x5c(%ebp),%eax 10eb35: 50 push %eax 10eb36: e8 95 03 00 00 call 10eed0 10eb3b: 89 c7 mov %eax,%edi pathlen -= len; 10eb3d: 8b 55 e4 mov -0x1c(%ebp),%edx 10eb40: 29 d6 sub %edx,%esi i += len; if ( !pathloc->node_access ) 10eb42: 8b 4d 0c mov 0xc(%ebp),%ecx 10eb45: 8b 01 mov (%ecx),%eax 10eb47: 83 c4 10 add $0x10,%esp 10eb4a: 85 c0 test %eax,%eax 10eb4c: 0f 84 55 01 00 00 je 10eca7 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10eb52: 85 ff test %edi,%edi 10eb54: 75 1a jne 10eb70 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10eb56: e8 f9 42 00 00 call 112e54 <__errno> 10eb5b: c7 00 11 00 00 00 movl $0x11,(%eax) 10eb61: 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; } 10eb66: 89 d8 mov %ebx,%eax 10eb68: 8d 65 f4 lea -0xc(%ebp),%esp 10eb6b: 5b pop %ebx 10eb6c: 5e pop %esi 10eb6d: 5f pop %edi 10eb6e: c9 leave 10eb6f: c3 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10eb70: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10eb74: 0f 84 c6 00 00 00 je 10ec40 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10eb7a: 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; 10eb7d: 89 c3 mov %eax,%ebx switch( type ) { 10eb7f: 83 ff 02 cmp $0x2,%edi 10eb82: 0f 84 88 00 00 00 je 10ec10 10eb88: 76 26 jbe 10ebb0 10eb8a: 83 ff 03 cmp $0x3,%edi 10eb8d: 74 2d je 10ebbc 10eb8f: 83 ff 04 cmp $0x4,%edi 10eb92: 75 92 jne 10eb26 <== 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 ); 10eb94: e8 bb 42 00 00 call 112e54 <__errno> 10eb99: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10eb9f: 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; } 10eba4: 89 d8 mov %ebx,%eax 10eba6: 8d 65 f4 lea -0xc(%ebp),%esp 10eba9: 5b pop %ebx 10ebaa: 5e pop %esi 10ebab: 5f pop %edi 10ebac: c9 leave 10ebad: c3 ret 10ebae: 66 90 xchg %ax,%ax if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 10ebb0: 85 ff test %edi,%edi 10ebb2: 74 a2 je 10eb56 <== NEVER TAKEN 10ebb4: e9 6d ff ff ff jmp 10eb26 10ebb9: 8d 76 00 lea 0x0(%esi),%esi pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10ebbc: 8b 40 4c mov 0x4c(%eax),%eax 10ebbf: 83 f8 03 cmp $0x3,%eax 10ebc2: 0f 84 b4 01 00 00 je 10ed7c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10ebc8: 83 f8 04 cmp $0x4,%eax 10ebcb: 0f 84 ca 01 00 00 je 10ed9b if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 10ebd1: 85 db test %ebx,%ebx 10ebd3: 0f 84 67 01 00 00 je 10ed40 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10ebd9: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10ebdd: 0f 85 5d 01 00 00 jne 10ed40 /* * 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 ) { 10ebe3: 8b 43 5c mov 0x5c(%ebx),%eax 10ebe6: 85 c0 test %eax,%eax 10ebe8: 0f 85 67 01 00 00 jne 10ed55 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10ebee: 83 ec 08 sub $0x8,%esp 10ebf1: 8d 45 af lea -0x51(%ebp),%eax 10ebf4: 50 push %eax 10ebf5: 53 push %ebx 10ebf6: e8 69 02 00 00 call 10ee64 10ebfb: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10ebfd: 83 c4 10 add $0x10,%esp 10ec00: 85 c0 test %eax,%eax 10ec02: 74 64 je 10ec68 done = true; else pathloc->node_access = node; 10ec04: 8b 55 0c mov 0xc(%ebp),%edx 10ec07: 89 02 mov %eax,(%edx) 10ec09: e9 18 ff ff ff jmp 10eb26 10ec0e: 66 90 xchg %ax,%ax case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10ec10: 8b 15 10 54 12 00 mov 0x125410,%edx 10ec16: 3b 42 18 cmp 0x18(%edx),%eax 10ec19: 0f 84 07 ff ff ff je 10eb26 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10ec1f: 8b 4d 0c mov 0xc(%ebp),%ecx 10ec22: 8b 51 10 mov 0x10(%ecx),%edx 10ec25: 3b 42 1c cmp 0x1c(%edx),%eax 10ec28: 0f 84 8e 00 00 00 je 10ecbc *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 10ec2e: 8b 58 08 mov 0x8(%eax),%ebx 10ec31: 85 db test %ebx,%ebx 10ec33: 74 72 je 10eca7 rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 10ec35: 8b 4d 0c mov 0xc(%ebp),%ecx 10ec38: 89 19 mov %ebx,(%ecx) break; 10ec3a: e9 e7 fe ff ff jmp 10eb26 10ec3f: 90 nop * 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 ) ) 10ec40: 83 ec 08 sub $0x8,%esp 10ec43: 6a 01 push $0x1 10ec45: ff 75 0c pushl 0xc(%ebp) 10ec48: 89 55 a0 mov %edx,-0x60(%ebp) 10ec4b: e8 80 fa ff ff call 10e6d0 10ec50: 83 c4 10 add $0x10,%esp 10ec53: 85 c0 test %eax,%eax 10ec55: 8b 55 a0 mov -0x60(%ebp),%edx 10ec58: 0f 84 cd 00 00 00 je 10ed2b 10ec5e: 8b 4d 0c mov 0xc(%ebp),%ecx 10ec61: 8b 01 mov (%ecx),%eax 10ec63: e9 12 ff ff ff jmp 10eb7a case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10ec68: 8b 45 a4 mov -0x5c(%ebp),%eax 10ec6b: 2b 45 e4 sub -0x1c(%ebp),%eax 10ec6e: 03 45 08 add 0x8(%ebp),%eax 10ec71: 8b 4d 10 mov 0x10(%ebp),%ecx 10ec74: 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++) { 10ec76: 8b 4d 08 mov 0x8(%ebp),%ecx 10ec79: 8b 55 a4 mov -0x5c(%ebp),%edx 10ec7c: 8a 04 11 mov (%ecx,%edx,1),%al 10ec7f: 84 c0 test %al,%al 10ec81: 74 75 je 10ecf8 10ec83: 89 d3 mov %edx,%ebx 10ec85: 89 ce mov %ecx,%esi 10ec87: eb 0b jmp 10ec94 10ec89: 8d 76 00 lea 0x0(%esi),%esi 10ec8c: 43 inc %ebx 10ec8d: 8a 04 1e mov (%esi,%ebx,1),%al 10ec90: 84 c0 test %al,%al 10ec92: 74 64 je 10ecf8 if ( !IMFS_is_separator( path[ i ] ) ) 10ec94: 83 ec 0c sub $0xc,%esp 10ec97: 0f be c0 movsbl %al,%eax 10ec9a: 50 push %eax 10ec9b: e8 20 98 ff ff call 1084c0 10eca0: 83 c4 10 add $0x10,%esp 10eca3: 85 c0 test %eax,%eax 10eca5: 75 e5 jne 10ec8c rtems_set_errno_and_return_minus_one( ENOENT ); 10eca7: e8 a8 41 00 00 call 112e54 <__errno> 10ecac: c7 00 02 00 00 00 movl $0x2,(%eax) 10ecb2: bb ff ff ff ff mov $0xffffffff,%ebx 10ecb7: e9 aa fe ff ff jmp 10eb66 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10ecbc: 8d 7d d0 lea -0x30(%ebp),%edi 10ecbf: 8d 72 08 lea 0x8(%edx),%esi 10ecc2: b9 05 00 00 00 mov $0x5,%ecx 10ecc7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10ecc9: 8d 75 d0 lea -0x30(%ebp),%esi 10eccc: b1 05 mov $0x5,%cl 10ecce: 8b 7d 0c mov 0xc(%ebp),%edi 10ecd1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10ecd3: 53 push %ebx 10ecd4: 8b 55 0c mov 0xc(%ebp),%edx 10ecd7: 8b 42 0c mov 0xc(%edx),%eax 10ecda: ff 75 10 pushl 0x10(%ebp) 10ecdd: 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 ); 10ecde: 8b 55 a4 mov -0x5c(%ebp),%edx 10ece1: 2b 55 e4 sub -0x1c(%ebp),%edx 10ece4: 03 55 08 add 0x8(%ebp),%edx 10ece7: 52 push %edx 10ece8: ff 50 04 call *0x4(%eax) 10eceb: 89 c3 mov %eax,%ebx 10eced: 83 c4 10 add $0x10,%esp 10ecf0: e9 71 fe ff ff jmp 10eb66 10ecf5: 8d 76 00 lea 0x0(%esi),%esi /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10ecf8: 83 ec 0c sub $0xc,%esp 10ecfb: ff 75 0c pushl 0xc(%ebp) 10ecfe: e8 71 f9 ff ff call 10e674 10ed03: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 10ed05: 8b 55 0c mov 0xc(%ebp),%edx 10ed08: 8b 02 mov (%edx),%eax 10ed0a: 83 c4 10 add $0x10,%esp 10ed0d: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10ed11: 75 2d jne 10ed40 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10ed13: 83 ec 08 sub $0x8,%esp 10ed16: 6a 03 push $0x3 10ed18: ff 75 0c pushl 0xc(%ebp) 10ed1b: e8 b0 f9 ff ff call 10e6d0 10ed20: 83 c4 10 add $0x10,%esp 10ed23: 85 c0 test %eax,%eax 10ed25: 0f 85 3b fe ff ff jne 10eb66 rtems_set_errno_and_return_minus_one( EACCES ); 10ed2b: e8 24 41 00 00 call 112e54 <__errno> 10ed30: c7 00 0d 00 00 00 movl $0xd,(%eax) 10ed36: bb ff ff ff ff mov $0xffffffff,%ebx 10ed3b: e9 26 fe ff ff jmp 10eb66 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10ed40: e8 0f 41 00 00 call 112e54 <__errno> 10ed45: c7 00 14 00 00 00 movl $0x14,(%eax) 10ed4b: bb ff ff ff ff mov $0xffffffff,%ebx 10ed50: e9 11 fe ff ff jmp 10eb66 * 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; 10ed55: 8d 7d d0 lea -0x30(%ebp),%edi 10ed58: 8d 70 1c lea 0x1c(%eax),%esi 10ed5b: b9 05 00 00 00 mov $0x5,%ecx 10ed60: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10ed62: 8d 75 d0 lea -0x30(%ebp),%esi 10ed65: b1 05 mov $0x5,%cl 10ed67: 8b 7d 0c mov 0xc(%ebp),%edi 10ed6a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10ed6c: 51 push %ecx 10ed6d: 8b 4d 0c mov 0xc(%ebp),%ecx 10ed70: 8b 41 0c mov 0xc(%ecx),%eax 10ed73: ff 75 10 pushl 0x10(%ebp) 10ed76: 51 push %ecx 10ed77: e9 62 ff ff ff jmp 10ecde case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10ed7c: 83 ec 08 sub $0x8,%esp 10ed7f: 6a 00 push $0x0 10ed81: ff 75 0c pushl 0xc(%ebp) 10ed84: e8 cb fc ff ff call 10ea54 if ( result == -1 ) 10ed89: 83 c4 10 add $0x10,%esp 10ed8c: 83 f8 ff cmp $0xffffffff,%eax 10ed8f: 74 29 je 10edba <== NEVER TAKEN 10ed91: 8b 45 0c mov 0xc(%ebp),%eax 10ed94: 8b 18 mov (%eax),%ebx 10ed96: e9 36 fe ff ff jmp 10ebd1 return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10ed9b: 83 ec 08 sub $0x8,%esp 10ed9e: 6a 00 push $0x0 10eda0: ff 75 0c pushl 0xc(%ebp) 10eda3: e8 ac fc ff ff call 10ea54 if ( result == -1 ) 10eda8: 83 c4 10 add $0x10,%esp 10edab: 83 f8 ff cmp $0xffffffff,%eax 10edae: 74 0a je 10edba <== NEVER TAKEN 10edb0: 8b 55 0c mov 0xc(%ebp),%edx 10edb3: 8b 1a mov (%edx),%ebx 10edb5: e9 17 fe ff ff jmp 10ebd1 10edba: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10edbc: e9 a5 fd ff ff jmp 10eb66 <== NOT EXECUTED =============================================================================== 0010ea54 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10ea54: 55 push %ebp 10ea55: 89 e5 mov %esp,%ebp 10ea57: 57 push %edi 10ea58: 56 push %esi 10ea59: 53 push %ebx 10ea5a: 83 ec 0c sub $0xc,%esp 10ea5d: 8b 75 08 mov 0x8(%ebp),%esi 10ea60: 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 ); 10ea63: 8b 15 10 54 12 00 mov 0x125410,%edx 10ea69: eb 0e jmp 10ea79 10ea6b: 90 nop */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 10ea6c: 83 f8 04 cmp $0x4,%eax 10ea6f: 74 53 je 10eac4 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 10ea71: 83 e8 03 sub $0x3,%eax 10ea74: 83 f8 01 cmp $0x1,%eax 10ea77: 77 3a ja 10eab3 <== ALWAYS TAKEN { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 10ea79: 8b 1e mov (%esi),%ebx /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 10ea7b: 8b 42 30 mov 0x30(%edx),%eax 10ea7e: 40 inc %eax 10ea7f: 66 89 42 30 mov %ax,0x30(%edx) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 10ea83: 66 83 f8 05 cmp $0x5,%ax 10ea87: 77 57 ja 10eae0 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 10ea89: 8b 43 4c mov 0x4c(%ebx),%eax 10ea8c: 83 f8 03 cmp $0x3,%eax 10ea8f: 75 db jne 10ea6c result = IMFS_evaluate_hard_link( node, flags ); 10ea91: 83 ec 08 sub $0x8,%esp 10ea94: 57 push %edi 10ea95: 56 push %esi 10ea96: e8 a1 fc ff ff call 10e73c 10ea9b: 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 ) ) ); 10ea9e: 85 c0 test %eax,%eax 10eaa0: 75 33 jne 10ead5 10eaa2: 8b 43 4c mov 0x4c(%ebx),%eax 10eaa5: 8b 15 10 54 12 00 mov 0x125410,%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 ) || 10eaab: 83 e8 03 sub $0x3,%eax 10eaae: 83 f8 01 cmp $0x1,%eax 10eab1: 76 c6 jbe 10ea79 <== ALWAYS TAKEN 10eab3: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 10eab5: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 10eabb: 8d 65 f4 lea -0xc(%ebp),%esp 10eabe: 5b pop %ebx 10eabf: 5e pop %esi 10eac0: 5f pop %edi 10eac1: c9 leave 10eac2: c3 ret 10eac3: 90 nop 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 ); 10eac4: 83 ec 08 sub $0x8,%esp 10eac7: 57 push %edi 10eac8: 56 push %esi 10eac9: e8 0a ff ff ff call 10e9d8 10eace: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10ead1: 85 c0 test %eax,%eax 10ead3: 74 cd je 10eaa2 10ead5: 8b 15 10 54 12 00 mov 0x125410,%edx 10eadb: eb d8 jmp 10eab5 10eadd: 8d 76 00 lea 0x0(%esi),%esi * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 10eae0: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) rtems_set_errno_and_return_minus_one( ELOOP ); 10eae6: e8 69 43 00 00 call 112e54 <__errno> 10eaeb: c7 00 5c 00 00 00 movl $0x5c,(%eax) 10eaf1: b8 ff ff ff ff mov $0xffffffff,%eax */ rtems_filesystem_link_counts = 0; return result; } 10eaf6: 8d 65 f4 lea -0xc(%ebp),%esp 10eaf9: 5b pop %ebx 10eafa: 5e pop %esi 10eafb: 5f pop %edi 10eafc: c9 leave 10eafd: c3 ret =============================================================================== 0010e6d0 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10e6d0: 55 push %ebp 10e6d1: 89 e5 mov %esp,%ebp 10e6d3: 57 push %edi 10e6d4: 56 push %esi 10e6d5: 53 push %ebx 10e6d6: 83 ec 0c sub $0xc,%esp 10e6d9: 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 ) ) 10e6dc: f7 c6 f8 ff ff ff test $0xfffffff8,%esi 10e6e2: 75 44 jne 10e728 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; 10e6e4: 8b 45 08 mov 0x8(%ebp),%eax 10e6e7: 8b 18 mov (%eax),%ebx #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10e6e9: e8 1a 0c 00 00 call 10f308 10e6ee: 89 c7 mov %eax,%edi st_gid = getegid(); 10e6f0: e8 03 0c 00 00 call 10f2f8 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 10e6f5: 66 39 7b 3c cmp %di,0x3c(%ebx) 10e6f9: 74 1d je 10e718 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 10e6fb: 66 39 43 3e cmp %ax,0x3e(%ebx) 10e6ff: 74 1f je 10e720 <== 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 ) 10e701: 8b 43 30 mov 0x30(%ebx),%eax 10e704: 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 ); 10e706: 39 c6 cmp %eax,%esi 10e708: 0f 94 c0 sete %al 10e70b: 0f b6 c0 movzbl %al,%eax */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 10e70e: 83 c4 0c add $0xc,%esp 10e711: 5b pop %ebx 10e712: 5e pop %esi 10e713: 5f pop %edi 10e714: c9 leave 10e715: c3 ret 10e716: 66 90 xchg %ax,%ax */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 10e718: c1 e6 06 shl $0x6,%esi 10e71b: eb e4 jmp 10e701 10e71d: 8d 76 00 lea 0x0(%esi),%esi else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 10e720: c1 e6 03 shl $0x3,%esi 10e723: eb dc jmp 10e701 10e725: 8d 76 00 lea 0x0(%esi),%esi 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 ); 10e728: e8 27 47 00 00 call 112e54 <__errno> <== NOT EXECUTED 10e72d: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10e733: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10e738: eb d4 jmp 10e70e <== NOT EXECUTED =============================================================================== 0010e9d8 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10e9d8: 55 push %ebp 10e9d9: 89 e5 mov %esp,%ebp 10e9db: 57 push %edi 10e9dc: 56 push %esi 10e9dd: 53 push %ebx 10e9de: 83 ec 20 sub $0x20,%esp 10e9e1: 8b 5d 08 mov 0x8(%ebp),%ebx 10e9e4: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10e9e7: 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; 10e9e9: 8b 47 08 mov 0x8(%edi),%eax 10e9ec: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10e9ee: 53 push %ebx 10e9ef: 8d 45 e4 lea -0x1c(%ebp),%eax 10e9f2: 50 push %eax 10e9f3: ff 77 50 pushl 0x50(%edi) 10e9f6: e8 4d 0e 00 00 call 10f848 ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10e9fb: 8b 57 50 mov 0x50(%edi),%edx 10e9fe: 03 55 e4 add -0x1c(%ebp),%edx 10ea01: 31 c0 xor %eax,%eax 10ea03: b9 ff ff ff ff mov $0xffffffff,%ecx 10ea08: 89 d7 mov %edx,%edi 10ea0a: f2 ae repnz scas %es:(%edi),%al 10ea0c: f7 d1 not %ecx 10ea0e: 49 dec %ecx 10ea0f: 53 push %ebx 10ea10: 56 push %esi 10ea11: 51 push %ecx 10ea12: 52 push %edx 10ea13: e8 68 fd ff ff call 10e780 10ea18: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10ea1a: 83 c4 14 add $0x14,%esp 10ea1d: 53 push %ebx 10ea1e: e8 51 fc ff ff call 10e674 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ea23: 58 pop %eax 10ea24: 5a pop %edx 10ea25: 56 push %esi 10ea26: 53 push %ebx 10ea27: e8 a4 fc ff ff call 10e6d0 10ea2c: 83 c4 10 add $0x10,%esp 10ea2f: 85 c0 test %eax,%eax 10ea31: 74 0d je 10ea40 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10ea33: 89 f8 mov %edi,%eax 10ea35: 8d 65 f4 lea -0xc(%ebp),%esp 10ea38: 5b pop %ebx 10ea39: 5e pop %esi 10ea3a: 5f pop %edi 10ea3b: c9 leave 10ea3c: c3 ret 10ea3d: 8d 76 00 lea 0x0(%esi),%esi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10ea40: e8 0f 44 00 00 call 112e54 <__errno> 10ea45: c7 00 0d 00 00 00 movl $0xd,(%eax) 10ea4b: bf ff ff ff ff mov $0xffffffff,%edi 10ea50: eb e1 jmp 10ea33 =============================================================================== 001124e8 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 1124e8: 55 push %ebp 1124e9: 89 e5 mov %esp,%ebp 1124eb: 53 push %ebx 1124ec: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 1124ef: 8b 45 08 mov 0x8(%ebp),%eax 1124f2: 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(); 1124f4: e8 0f ce ff ff call 10f308 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 1124f9: 66 39 43 3c cmp %ax,0x3c(%ebx) 1124fd: 74 05 je 112504 1124ff: 66 85 c0 test %ax,%ax 112502: 75 34 jne 112538 <== 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); 112504: 8b 45 0c mov 0xc(%ebp),%eax 112507: 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); 11250c: 8b 53 30 mov 0x30(%ebx),%edx 11250f: 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); 112515: 09 d0 or %edx,%eax 112517: 89 43 30 mov %eax,0x30(%ebx) IMFS_update_ctime( jnode ); 11251a: 83 ec 08 sub $0x8,%esp 11251d: 6a 00 push $0x0 11251f: 8d 45 f0 lea -0x10(%ebp),%eax 112522: 50 push %eax 112523: e8 88 51 ff ff call 1076b0 112528: 8b 45 f0 mov -0x10(%ebp),%eax 11252b: 89 43 48 mov %eax,0x48(%ebx) return 0; 11252e: 83 c4 10 add $0x10,%esp 112531: 31 c0 xor %eax,%eax } 112533: 8b 5d fc mov -0x4(%ebp),%ebx 112536: c9 leave 112537: 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 ); 112538: e8 17 09 00 00 call 112e54 <__errno> 11253d: c7 00 01 00 00 00 movl $0x1,(%eax) 112543: b8 ff ff ff ff mov $0xffffffff,%eax 112548: eb e9 jmp 112533 =============================================================================== 00107ff4 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 107ff4: 55 push %ebp 107ff5: 89 e5 mov %esp,%ebp 107ff7: 53 push %ebx 107ff8: 83 ec 04 sub $0x4,%esp 107ffb: 8b 45 08 mov 0x8(%ebp),%eax 107ffe: 8b 55 0c mov 0xc(%ebp),%edx 108001: 8b 4d 10 mov 0x10(%ebp),%ecx int err; if (command == FIONBIO) { 108004: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx 10800a: 74 1c je 108028 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 10800c: 50 push %eax 10800d: 51 push %ecx 10800e: 52 push %edx 10800f: 8b 40 18 mov 0x18(%eax),%eax 108012: ff 70 50 pushl 0x50(%eax) 108015: e8 b2 97 00 00 call 1117cc IMFS_FIFO_RETURN(err); 10801a: 83 c4 10 add $0x10,%esp 10801d: 85 c0 test %eax,%eax 10801f: 78 3e js 10805f } 108021: 8b 5d fc mov -0x4(%ebp),%ebx 108024: c9 leave 108025: c3 ret 108026: 66 90 xchg %ax,%ax ) { int err; if (command == FIONBIO) { if (buffer == NULL) 108028: 85 c9 test %ecx,%ecx 10802a: 74 20 je 10804c err = -EFAULT; else { if (*(int *)buffer) 10802c: 8b 11 mov (%ecx),%edx 10802e: 85 d2 test %edx,%edx 108030: 74 0e je 108040 iop->flags |= LIBIO_FLAGS_NO_DELAY; 108032: 83 48 14 01 orl $0x1,0x14(%eax) else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; 108036: 31 c0 xor %eax,%eax } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 108038: 8b 5d fc mov -0x4(%ebp),%ebx 10803b: c9 leave 10803c: c3 ret 10803d: 8d 76 00 lea 0x0(%esi),%esi err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 108040: 83 60 14 fe andl $0xfffffffe,0x14(%eax) return 0; 108044: 31 c0 xor %eax,%eax } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 108046: 8b 5d fc mov -0x4(%ebp),%ebx 108049: c9 leave 10804a: c3 ret 10804b: 90 nop ) { int err; if (command == FIONBIO) { if (buffer == NULL) 10804c: bb 0e 00 00 00 mov $0xe,%ebx } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 108051: e8 62 cf 00 00 call 114fb8 <__errno> 108056: 89 18 mov %ebx,(%eax) 108058: b8 ff ff ff ff mov $0xffffffff,%eax 10805d: eb c2 jmp 108021 10805f: 89 c3 mov %eax,%ebx 108061: f7 db neg %ebx 108063: eb ec jmp 108051 =============================================================================== 00107fb0 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 107fb0: 55 push %ebp 107fb1: 89 e5 mov %esp,%ebp 107fb3: 53 push %ebx 107fb4: 83 ec 10 sub $0x10,%esp 107fb7: 8b 45 08 mov 0x8(%ebp),%eax off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 107fba: 50 push %eax 107fbb: ff 75 14 pushl 0x14(%ebp) 107fbe: ff 75 10 pushl 0x10(%ebp) 107fc1: ff 75 0c pushl 0xc(%ebp) 107fc4: 8b 40 18 mov 0x18(%eax),%eax 107fc7: ff 70 50 pushl 0x50(%eax) 107fca: e8 5d 98 00 00 call 11182c 107fcf: 89 c3 mov %eax,%ebx 107fd1: 99 cltd IMFS_FIFO_RETURN(err); 107fd2: 83 c4 20 add $0x20,%esp 107fd5: 85 d2 test %edx,%edx 107fd7: 78 05 js 107fde <== ALWAYS TAKEN } 107fd9: 8b 5d fc mov -0x4(%ebp),%ebx 107fdc: c9 leave 107fdd: c3 ret rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 107fde: e8 d5 cf 00 00 call 114fb8 <__errno> 107fe3: f7 db neg %ebx 107fe5: 89 18 mov %ebx,(%eax) 107fe7: b8 ff ff ff ff mov $0xffffffff,%eax 107fec: ba ff ff ff ff mov $0xffffffff,%edx 107ff1: eb e6 jmp 107fd9 =============================================================================== 00108068 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 108068: 55 push %ebp 108069: 89 e5 mov %esp,%ebp 10806b: 56 push %esi 10806c: 53 push %ebx 10806d: 83 ec 10 sub $0x10,%esp 108070: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->pathinfo.node_access; 108073: 8b 58 18 mov 0x18(%eax),%ebx int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 108076: 50 push %eax 108077: ff 75 10 pushl 0x10(%ebp) 10807a: ff 75 0c pushl 0xc(%ebp) 10807d: ff 73 50 pushl 0x50(%ebx) 108080: e8 47 95 00 00 call 1115cc 108085: 89 c6 mov %eax,%esi if (err > 0) { 108087: 83 c4 10 add $0x10,%esp 10808a: 83 f8 00 cmp $0x0,%eax 10808d: 7e 25 jle 1080b4 IMFS_mtime_ctime_update(jnode); 10808f: 83 ec 08 sub $0x8,%esp 108092: 6a 00 push $0x0 108094: 8d 45 f0 lea -0x10(%ebp),%eax 108097: 50 push %eax 108098: e8 3f 0f 00 00 call 108fdc 10809d: 8b 45 f0 mov -0x10(%ebp),%eax 1080a0: 89 43 44 mov %eax,0x44(%ebx) 1080a3: 89 43 48 mov %eax,0x48(%ebx) 1080a6: 83 c4 10 add $0x10,%esp 1080a9: 89 f0 mov %esi,%eax } IMFS_FIFO_RETURN(err); } 1080ab: 8d 65 f8 lea -0x8(%ebp),%esp 1080ae: 5b pop %ebx 1080af: 5e pop %esi 1080b0: c9 leave 1080b1: c3 ret 1080b2: 66 90 xchg %ax,%ax int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 1080b4: 75 09 jne 1080bf <== ALWAYS TAKEN 1080b6: 31 c0 xor %eax,%eax } 1080b8: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1080bb: 5b pop %ebx <== NOT EXECUTED 1080bc: 5e pop %esi <== NOT EXECUTED 1080bd: c9 leave <== NOT EXECUTED 1080be: c3 ret <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 1080bf: e8 f4 ce 00 00 call 114fb8 <__errno> 1080c4: f7 de neg %esi 1080c6: 89 30 mov %esi,(%eax) 1080c8: b8 ff ff ff ff mov $0xffffffff,%eax 1080cd: eb dc jmp 1080ab =============================================================================== 0010ee64 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10ee64: 55 push %ebp 10ee65: 89 e5 mov %esp,%ebp 10ee67: 57 push %edi 10ee68: 56 push %esi 10ee69: 53 push %ebx 10ee6a: 83 ec 0c sub $0xc,%esp 10ee6d: 8b 45 08 mov 0x8(%ebp),%eax 10ee70: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10ee73: bf d0 12 12 00 mov $0x1212d0,%edi 10ee78: b9 02 00 00 00 mov $0x2,%ecx 10ee7d: 89 de mov %ebx,%esi 10ee7f: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10ee81: 74 13 je 10ee96 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10ee83: bf d2 12 12 00 mov $0x1212d2,%edi 10ee88: b9 03 00 00 00 mov $0x3,%ecx 10ee8d: 89 de mov %ebx,%esi 10ee8f: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10ee91: 75 0d jne 10eea0 <== ALWAYS TAKEN return directory->Parent; 10ee93: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10ee96: 8d 65 f4 lea -0xc(%ebp),%esp 10ee99: 5b pop %ebx 10ee9a: 5e pop %esi 10ee9b: 5f pop %edi 10ee9c: c9 leave 10ee9d: c3 ret 10ee9e: 66 90 xchg %ax,%ax 10eea0: 8b 70 50 mov 0x50(%eax),%esi RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 10eea3: 8d 78 54 lea 0x54(%eax),%edi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 10eea6: 39 fe cmp %edi,%esi 10eea8: 75 08 jne 10eeb2 10eeaa: eb 20 jmp 10eecc !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10eeac: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 10eeae: 39 fe cmp %edi,%esi 10eeb0: 74 1a je 10eecc !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 ) ) 10eeb2: 8d 46 0c lea 0xc(%esi),%eax 10eeb5: 83 ec 08 sub $0x8,%esp 10eeb8: 50 push %eax 10eeb9: 53 push %ebx 10eeba: e8 0d 4c 00 00 call 113acc 10eebf: 83 c4 10 add $0x10,%esp 10eec2: 85 c0 test %eax,%eax 10eec4: 75 e6 jne 10eeac for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 10eec6: 89 f0 mov %esi,%eax 10eec8: eb cc jmp 10ee96 10eeca: 66 90 xchg %ax,%ax if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 10eecc: 31 c0 xor %eax,%eax 10eece: eb c6 jmp 10ee96 =============================================================================== 0010edc4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10edc4: 55 push %ebp 10edc5: 89 e5 mov %esp,%ebp 10edc7: 57 push %edi 10edc8: 56 push %esi 10edc9: 53 push %ebx 10edca: 83 ec 3c sub $0x3c,%esp 10edcd: 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; 10edd0: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 10edd3: 8d 55 d4 lea -0x2c(%ebp),%edx 10edd6: 89 55 c4 mov %edx,-0x3c(%ebp) 10edd9: 8d 70 1c lea 0x1c(%eax),%esi 10eddc: b9 05 00 00 00 mov $0x5,%ecx 10ede1: 89 d7 mov %edx,%edi 10ede3: 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; 10ede5: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; 10edec: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 10edef: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 10edf2: 83 ec 0c sub $0xc,%esp 10edf5: 8d 45 d4 lea -0x2c(%ebp),%eax 10edf8: 50 push %eax 10edf9: e8 76 f8 ff ff call 10e674 if ( jnode->type != IMFS_DIRECTORY ) { 10edfe: 83 c4 10 add $0x10,%esp 10ee01: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10ee05: 75 31 jne 10ee38 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10ee07: 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 ) ) { 10ee0a: 39 43 50 cmp %eax,0x50(%ebx) 10ee0d: 74 42 je 10ee51 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 10ee0f: 85 db test %ebx,%ebx 10ee11: 74 19 je 10ee2c if ( jnode->type == IMFS_DIRECTORY ) { 10ee13: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10ee17: 75 d3 jne 10edec <== NEVER TAKEN } } } while (jnode != NULL); return 0; } 10ee19: 8b 43 50 mov 0x50(%ebx),%eax 10ee1c: 8d 53 54 lea 0x54(%ebx),%edx return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) 10ee1f: 39 d0 cmp %edx,%eax 10ee21: 74 c9 je 10edec jnode = jnode_get_first_child( jnode ); 10ee23: 89 c3 mov %eax,%ebx } } } while (jnode != NULL); 10ee25: 85 c0 test %eax,%eax 10ee27: 75 c3 jne 10edec <== ALWAYS TAKEN 10ee29: 8d 76 00 lea 0x0(%esi),%esi return 0; 10ee2c: 31 c0 xor %eax,%eax } 10ee2e: 8d 65 f4 lea -0xc(%ebp),%esp 10ee31: 5b pop %ebx 10ee32: 5e pop %esi 10ee33: 5f pop %edi 10ee34: c9 leave 10ee35: c3 ret 10ee36: 66 90 xchg %ax,%ax next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 10ee38: 83 ec 08 sub $0x8,%esp 10ee3b: 8d 55 d4 lea -0x2c(%ebp),%edx 10ee3e: 52 push %edx if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10ee3f: 6a 00 push $0x0 10ee41: e8 36 83 ff ff call 10717c if (result != 0) 10ee46: 83 c4 10 add $0x10,%esp 10ee49: 85 c0 test %eax,%eax 10ee4b: 75 0d jne 10ee5a <== NEVER TAKEN return -1; jnode = next; 10ee4d: 89 f3 mov %esi,%ebx 10ee4f: eb be jmp 10ee0f result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10ee51: 83 ec 08 sub $0x8,%esp 10ee54: 8d 45 d4 lea -0x2c(%ebp),%eax 10ee57: 50 push %eax 10ee58: eb e5 jmp 10ee3f if (result != 0) return -1; 10ee5a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10ee5f: eb cd jmp 10ee2e <== NOT EXECUTED =============================================================================== 0010eed0 : const char *path, int pathlen, char *token, int *token_len ) { 10eed0: 55 push %ebp 10eed1: 89 e5 mov %esp,%ebp 10eed3: 57 push %edi 10eed4: 56 push %esi 10eed5: 53 push %ebx 10eed6: 83 ec 1c sub $0x1c,%esp 10eed9: 8b 7d 08 mov 0x8(%ebp),%edi 10eedc: 8b 5d 10 mov 0x10(%ebp),%ebx register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10eedf: 8a 17 mov (%edi),%dl int pathlen, char *token, int *token_len ) { register int i = 0; 10eee1: 31 f6 xor %esi,%esi 10eee3: 89 7d e4 mov %edi,-0x1c(%ebp) 10eee6: 89 df mov %ebx,%edi 10eee8: 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) ) { 10eeea: eb 07 jmp 10eef3 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10eeec: 46 inc %esi 10eeed: 8b 45 e4 mov -0x1c(%ebp),%eax 10eef0: 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) ) { 10eef3: 83 ec 0c sub $0xc,%esp 10eef6: 0f be c3 movsbl %bl,%eax 10eef9: 50 push %eax 10eefa: e8 c1 95 ff ff call 1084c0 10eeff: 83 c4 10 add $0x10,%esp 10ef02: 85 c0 test %eax,%eax 10ef04: 75 1a jne 10ef20 10ef06: 3b 75 0c cmp 0xc(%ebp),%esi 10ef09: 7d 15 jge 10ef20 token[i] = c; 10ef0b: 88 1c 37 mov %bl,(%edi,%esi,1) if ( i == IMFS_NAME_MAX ) 10ef0e: 83 fe 20 cmp $0x20,%esi 10ef11: 75 d9 jne 10eeec return IMFS_INVALID_TOKEN; 10ef13: b8 04 00 00 00 mov $0x4,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10ef18: 8d 65 f4 lea -0xc(%ebp),%esp 10ef1b: 5b pop %ebx 10ef1c: 5e pop %esi 10ef1d: 5f pop %edi 10ef1e: c9 leave 10ef1f: c3 ret 10ef20: 88 da mov %bl,%dl 10ef22: 89 fb mov %edi,%ebx /* * Copy a seperator into token. */ if ( i == 0 ) { 10ef24: 85 f6 test %esi,%esi 10ef26: 75 25 jne 10ef4d token[i] = c; 10ef28: 88 17 mov %dl,(%edi) if ( (token[i] != '\0') && pathlen ) { 10ef2a: 84 d2 test %dl,%dl 10ef2c: 74 16 je 10ef44 10ef2e: 8b 45 0c mov 0xc(%ebp),%eax 10ef31: 85 c0 test %eax,%eax 10ef33: 74 0f je 10ef44 i++; type = IMFS_CURRENT_DIR; 10ef35: b8 01 00 00 00 mov $0x1,%eax if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 10ef3a: be 01 00 00 00 mov $0x1,%esi 10ef3f: eb 05 jmp 10ef46 10ef41: 8d 76 00 lea 0x0(%esi),%esi type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 10ef44: 31 c0 xor %eax,%eax /* * Set token_len to the number of characters copied. */ *token_len = i; 10ef46: 8b 55 14 mov 0x14(%ebp),%edx 10ef49: 89 32 mov %esi,(%edx) 10ef4b: eb cb jmp 10ef18 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10ef4d: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1) 10ef52: 74 04 je 10ef58 <== NEVER TAKEN token[i] = '\0'; 10ef54: c6 04 37 00 movb $0x0,(%edi,%esi,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10ef58: 8b 45 14 mov 0x14(%ebp),%eax 10ef5b: 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 ) 10ef5d: bf d5 12 12 00 mov $0x1212d5,%edi 10ef62: b9 03 00 00 00 mov $0x3,%ecx 10ef67: 89 de mov %ebx,%esi 10ef69: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10ef6b: 75 0f jne 10ef7c type = IMFS_UP_DIR; 10ef6d: b8 02 00 00 00 mov $0x2,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10ef72: 8d 65 f4 lea -0xc(%ebp),%esp 10ef75: 5b pop %ebx 10ef76: 5e pop %esi 10ef77: 5f pop %edi 10ef78: c9 leave 10ef79: c3 ret 10ef7a: 66 90 xchg %ax,%ax */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10ef7c: bf d6 12 12 00 mov $0x1212d6,%edi 10ef81: b9 02 00 00 00 mov $0x2,%ecx 10ef86: 89 de mov %ebx,%esi 10ef88: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10ef8a: 0f 97 c0 seta %al 10ef8d: 0f 92 c2 setb %dl 10ef90: 28 d0 sub %dl,%al 10ef92: 0f be c0 movsbl %al,%eax 10ef95: 83 f8 01 cmp $0x1,%eax 10ef98: 19 c0 sbb %eax,%eax 10ef9a: 83 e0 fe and $0xfffffffe,%eax 10ef9d: 83 c0 03 add $0x3,%eax type = IMFS_CURRENT_DIR; } return type; } 10efa0: 8d 65 f4 lea -0xc(%ebp),%esp 10efa3: 5b pop %ebx 10efa4: 5e pop %esi 10efa5: 5f pop %edi 10efa6: c9 leave 10efa7: c3 ret =============================================================================== 00106dc4 : 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 ) { 106dc4: 55 push %ebp 106dc5: 89 e5 mov %esp,%ebp 106dc7: 57 push %edi 106dc8: 56 push %esi 106dc9: 53 push %ebx 106dca: 83 ec 1c sub $0x1c,%esp 106dcd: 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, 106dd0: 8b 0d 50 34 12 00 mov 0x123450,%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) { 106dd6: 83 f9 10 cmp $0x10,%ecx 106dd9: 74 1f je 106dfa is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 106ddb: 83 f9 0f cmp $0xf,%ecx 106dde: 7e 15 jle 106df5 106de0: ba 05 00 00 00 mov $0x5,%edx 106de5: 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) { 106dea: 39 c1 cmp %eax,%ecx 106dec: 74 0c je 106dfa is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 106dee: 7c 05 jl 106df5 <== 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) { 106df0: d1 e0 shl %eax 106df2: 4a dec %edx 106df3: 75 f5 jne 106dea <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 106df5: b9 80 00 00 00 mov $0x80,%ecx break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 106dfa: 89 0d 20 73 12 00 mov %ecx,0x127320 /* * 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(); 106e00: e8 3b 78 00 00 call 10e640 106e05: 89 c2 mov %eax,%edx 106e07: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 106e0a: 8b 45 14 mov 0x14(%ebp),%eax 106e0d: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 106e10: 8b 45 0c mov 0xc(%ebp),%eax 106e13: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 106e16: 8d 7b 38 lea 0x38(%ebx),%edi 106e19: be 80 12 12 00 mov $0x121280,%esi 106e1e: b9 0c 00 00 00 mov $0xc,%ecx 106e23: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 106e25: 83 ec 08 sub $0x8,%esp 106e28: 6a 14 push $0x14 106e2a: 6a 01 push $0x1 106e2c: 89 55 e4 mov %edx,-0x1c(%ebp) 106e2f: e8 70 06 00 00 call 1074a4 if ( !fs_info ) { 106e34: 83 c4 10 add $0x10,%esp 106e37: 85 c0 test %eax,%eax 106e39: 8b 55 e4 mov -0x1c(%ebp),%edx 106e3c: 74 3c je 106e7a free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 106e3e: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 106e41: 8b 0d 24 73 12 00 mov 0x127324,%ecx 106e47: 89 08 mov %ecx,(%eax) 106e49: 41 inc %ecx 106e4a: 89 0d 24 73 12 00 mov %ecx,0x127324 fs_info->ino_count = 1; 106e50: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 106e57: 8b 4d 10 mov 0x10(%ebp),%ecx 106e5a: 89 48 08 mov %ecx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 106e5d: 8b 4d 14 mov 0x14(%ebp),%ecx 106e60: 89 48 0c mov %ecx,0xc(%eax) fs_info->fifo_handlers = fifo_handlers; 106e63: 8b 4d 18 mov 0x18(%ebp),%ecx 106e66: 89 48 10 mov %ecx,0x10(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 106e69: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) return 0; 106e70: 31 c0 xor %eax,%eax } 106e72: 8d 65 f4 lea -0xc(%ebp),%esp 106e75: 5b pop %ebx 106e76: 5e pop %esi 106e77: 5f pop %edi 106e78: c9 leave 106e79: 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); 106e7a: 83 ec 0c sub $0xc,%esp 106e7d: 52 push %edx 106e7e: e8 b1 07 00 00 call 107634 rtems_set_errno_and_return_minus_one(ENOMEM); 106e83: e8 cc bf 00 00 call 112e54 <__errno> 106e88: c7 00 0c 00 00 00 movl $0xc,(%eax) 106e8e: 83 c4 10 add $0x10,%esp 106e91: 83 c8 ff or $0xffffffff,%eax 106e94: eb dc jmp 106e72 =============================================================================== 00106e98 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 106e98: 55 push %ebp 106e99: 89 e5 mov %esp,%ebp 106e9b: 57 push %edi 106e9c: 53 push %ebx 106e9d: 83 ec 50 sub $0x50,%esp 106ea0: 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; 106ea3: 8b 45 08 mov 0x8(%ebp),%eax 106ea6: 8b 00 mov (%eax),%eax 106ea8: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 106eab: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 106eb0: 77 66 ja 106f18 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 ); 106eb2: 31 c0 xor %eax,%eax 106eb4: b9 ff ff ff ff mov $0xffffffff,%ecx 106eb9: 89 d7 mov %edx,%edi 106ebb: f2 ae repnz scas %es:(%edi),%al 106ebd: f7 d1 not %ecx 106ebf: 49 dec %ecx 106ec0: 8d 45 f4 lea -0xc(%ebp),%eax 106ec3: 50 push %eax 106ec4: 8d 5d b7 lea -0x49(%ebp),%ebx 106ec7: 53 push %ebx 106ec8: 51 push %ecx 106ec9: 52 push %edx 106eca: e8 01 80 00 00 call 10eed0 new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 106ecf: 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( 106ed2: 89 04 24 mov %eax,(%esp) 106ed5: 68 ff a1 00 00 push $0xa1ff 106eda: 53 push %ebx 106edb: 6a 03 push $0x3 106edd: ff 75 0c pushl 0xc(%ebp) 106ee0: e8 23 76 00 00 call 10e508 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 106ee5: 83 c4 20 add $0x20,%esp 106ee8: 85 c0 test %eax,%eax 106eea: 74 3e je 106f2a 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++; 106eec: 8b 45 d8 mov -0x28(%ebp),%eax 106eef: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 106ef3: 83 ec 08 sub $0x8,%esp 106ef6: 6a 00 push $0x0 106ef8: 8d 45 ec lea -0x14(%ebp),%eax 106efb: 50 push %eax 106efc: e8 af 07 00 00 call 1076b0 106f01: 8b 55 ec mov -0x14(%ebp),%edx 106f04: 8b 45 d8 mov -0x28(%ebp),%eax 106f07: 89 50 48 mov %edx,0x48(%eax) return 0; 106f0a: 83 c4 10 add $0x10,%esp 106f0d: 31 c0 xor %eax,%eax } 106f0f: 8d 65 f8 lea -0x8(%ebp),%esp 106f12: 5b pop %ebx 106f13: 5f pop %edi 106f14: c9 leave 106f15: c3 ret 106f16: 66 90 xchg %ax,%ax /* * 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 ); 106f18: e8 37 bf 00 00 call 112e54 <__errno> 106f1d: c7 00 1f 00 00 00 movl $0x1f,(%eax) 106f23: b8 ff ff ff ff mov $0xffffffff,%eax 106f28: eb e5 jmp 106f0f ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 106f2a: e8 25 bf 00 00 call 112e54 <__errno> 106f2f: c7 00 0c 00 00 00 movl $0xc,(%eax) 106f35: b8 ff ff ff ff mov $0xffffffff,%eax 106f3a: eb d3 jmp 106f0f =============================================================================== 001118c0 : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 1118c0: 55 push %ebp 1118c1: 89 e5 mov %esp,%ebp 1118c3: 53 push %ebx 1118c4: 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 ); 1118c7: 6a 01 push $0x1 1118c9: ff 75 0c pushl 0xc(%ebp) 1118cc: ff 75 08 pushl 0x8(%ebp) 1118cf: e8 28 fc ff ff call 1114fc 1118d4: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 1118d6: 83 c4 10 add $0x10,%esp 1118d9: 8b 00 mov (%eax),%eax 1118db: 85 c0 test %eax,%eax 1118dd: 74 09 je 1118e8 return 0; 1118df: 31 c0 xor %eax,%eax if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 1118e1: 8b 5d fc mov -0x4(%ebp),%ebx 1118e4: c9 leave 1118e5: c3 ret 1118e6: 66 90 xchg %ax,%ax return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); 1118e8: e8 eb fb ff ff call 1114d8 if ( !memory ) 1118ed: 85 c0 test %eax,%eax 1118ef: 74 07 je 1118f8 return 1; *block_entry_ptr = memory; 1118f1: 89 03 mov %eax,(%ebx) return 0; 1118f3: 31 c0 xor %eax,%eax 1118f5: eb ea jmp 1118e1 1118f7: 90 nop /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; 1118f8: b8 01 00 00 00 mov $0x1,%eax 1118fd: eb e2 jmp 1118e1 =============================================================================== 00111b00 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 111b00: 55 push %ebp 111b01: 89 e5 mov %esp,%ebp 111b03: 57 push %edi 111b04: 56 push %esi 111b05: 53 push %ebx 111b06: 83 ec 2c sub $0x2c,%esp 111b09: 8b 5d 08 mov 0x8(%ebp),%ebx 111b0c: 8b 45 0c mov 0xc(%ebp),%eax 111b0f: 8b 55 10 mov 0x10(%ebp),%edx 111b12: 89 45 d8 mov %eax,-0x28(%ebp) 111b15: 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 ) 111b18: a1 20 73 12 00 mov 0x127320,%eax 111b1d: 89 c1 mov %eax,%ecx 111b1f: c1 e9 02 shr $0x2,%ecx 111b22: 8d 51 01 lea 0x1(%ecx),%edx 111b25: 0f af d1 imul %ecx,%edx 111b28: 42 inc %edx 111b29: 0f af d1 imul %ecx,%edx 111b2c: 4a dec %edx 111b2d: 0f af d0 imul %eax,%edx 111b30: 31 c9 xor %ecx,%ecx 111b32: 3b 4d dc cmp -0x24(%ebp),%ecx 111b35: 7f 1a jg 111b51 <== NEVER TAKEN 111b37: 7d 13 jge 111b4c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 111b39: e8 16 13 00 00 call 112e54 <__errno> 111b3e: c7 00 16 00 00 00 movl $0x16,(%eax) 111b44: b8 ff ff ff ff mov $0xffffffff,%eax 111b49: eb 19 jmp 111b64 111b4b: 90 nop IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 111b4c: 3b 55 d8 cmp -0x28(%ebp),%edx 111b4f: 76 e8 jbe 111b39 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 ) 111b51: 8b 53 50 mov 0x50(%ebx),%edx 111b54: 8b 4b 54 mov 0x54(%ebx),%ecx 111b57: 89 55 e0 mov %edx,-0x20(%ebp) 111b5a: 89 4d e4 mov %ecx,-0x1c(%ebp) 111b5d: 39 4d dc cmp %ecx,-0x24(%ebp) 111b60: 7d 0a jge 111b6c <== ALWAYS TAKEN return 0; 111b62: 31 c0 xor %eax,%eax /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 111b64: 8d 65 f4 lea -0xc(%ebp),%esp 111b67: 5b pop %ebx 111b68: 5e pop %esi 111b69: 5f pop %edi 111b6a: c9 leave 111b6b: 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 ) 111b6c: 7f 05 jg 111b73 <== NEVER TAKEN 111b6e: 39 55 d8 cmp %edx,-0x28(%ebp) 111b71: 76 ef jbe 111b62 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 111b73: 89 45 d0 mov %eax,-0x30(%ebp) 111b76: 89 c1 mov %eax,%ecx 111b78: c1 f9 1f sar $0x1f,%ecx 111b7b: 89 4d d4 mov %ecx,-0x2c(%ebp) 111b7e: ff 75 d4 pushl -0x2c(%ebp) 111b81: ff 75 d0 pushl -0x30(%ebp) 111b84: ff 75 dc pushl -0x24(%ebp) 111b87: ff 75 d8 pushl -0x28(%ebp) 111b8a: e8 d1 ca 00 00 call 11e660 <__divdi3> 111b8f: 83 c4 10 add $0x10,%esp 111b92: 89 c6 mov %eax,%esi old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 111b94: ff 75 d4 pushl -0x2c(%ebp) 111b97: ff 75 d0 pushl -0x30(%ebp) 111b9a: ff 75 e4 pushl -0x1c(%ebp) 111b9d: ff 75 e0 pushl -0x20(%ebp) 111ba0: e8 bb ca 00 00 call 11e660 <__divdi3> 111ba5: 83 c4 10 add $0x10,%esp 111ba8: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 111bab: 39 c6 cmp %eax,%esi 111bad: 72 51 jb 111c00 <== NEVER TAKEN 111baf: 89 c7 mov %eax,%edi 111bb1: eb 06 jmp 111bb9 111bb3: 90 nop 111bb4: 47 inc %edi 111bb5: 39 fe cmp %edi,%esi 111bb7: 72 47 jb 111c00 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 111bb9: 83 ec 08 sub $0x8,%esp 111bbc: 57 push %edi 111bbd: 53 push %ebx 111bbe: e8 fd fc ff ff call 1118c0 111bc3: 83 c4 10 add $0x10,%esp 111bc6: 85 c0 test %eax,%eax 111bc8: 74 ea je 111bb4 for ( ; block>=old_blocks ; block-- ) { 111bca: 39 7d e0 cmp %edi,-0x20(%ebp) 111bcd: 77 17 ja 111be6 <== NEVER TAKEN 111bcf: 8b 75 e0 mov -0x20(%ebp),%esi 111bd2: 66 90 xchg %ax,%ax IMFS_memfile_remove_block( the_jnode, block ); 111bd4: 83 ec 08 sub $0x8,%esp 111bd7: 57 push %edi 111bd8: 53 push %ebx 111bd9: e8 f6 fe ff ff call 111ad4 /* * 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-- ) { 111bde: 4f dec %edi 111bdf: 83 c4 10 add $0x10,%esp 111be2: 39 fe cmp %edi,%esi 111be4: 76 ee jbe 111bd4 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 111be6: e8 69 12 00 00 call 112e54 <__errno> 111beb: c7 00 1c 00 00 00 movl $0x1c,(%eax) 111bf1: b8 ff ff ff ff mov $0xffffffff,%eax /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 111bf6: 8d 65 f4 lea -0xc(%ebp),%esp 111bf9: 5b pop %ebx 111bfa: 5e pop %esi 111bfb: 5f pop %edi 111bfc: c9 leave 111bfd: c3 ret 111bfe: 66 90 xchg %ax,%ax } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 111c00: 8b 45 d8 mov -0x28(%ebp),%eax 111c03: 8b 55 dc mov -0x24(%ebp),%edx 111c06: 89 43 50 mov %eax,0x50(%ebx) 111c09: 89 53 54 mov %edx,0x54(%ebx) return 0; 111c0c: 31 c0 xor %eax,%eax } 111c0e: 8d 65 f4 lea -0xc(%ebp),%esp 111c11: 5b pop %ebx 111c12: 5e pop %esi 111c13: 5f pop %edi 111c14: c9 leave 111c15: c3 ret =============================================================================== 001114fc : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 1114fc: 55 push %ebp 1114fd: 89 e5 mov %esp,%ebp 1114ff: 57 push %edi 111500: 56 push %esi 111501: 53 push %ebx 111502: 83 ec 1c sub $0x1c,%esp 111505: 8b 5d 08 mov 0x8(%ebp),%ebx 111508: 8b 75 0c mov 0xc(%ebp),%esi 11150b: 8b 7d 10 mov 0x10(%ebp),%edi my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 11150e: 8b 0d 20 73 12 00 mov 0x127320,%ecx 111514: c1 e9 02 shr $0x2,%ecx 111517: 8d 41 ff lea -0x1(%ecx),%eax 11151a: 39 c6 cmp %eax,%esi 11151c: 77 1a ja 111538 p = info->indirect; 11151e: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 111521: 85 ff test %edi,%edi 111523: 74 53 je 111578 if ( !p ) { 111525: 85 c0 test %eax,%eax 111527: 0f 84 b6 00 00 00 je 1115e3 } if ( !p ) return 0; return &info->indirect[ my_block ]; 11152d: 8d 04 b0 lea (%eax,%esi,4),%eax /* * This means the requested block number is out of range. */ return 0; } 111530: 83 c4 1c add $0x1c,%esp 111533: 5b pop %ebx 111534: 5e pop %esi 111535: 5f pop %edi 111536: c9 leave 111537: c3 ret /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 111538: 8d 41 01 lea 0x1(%ecx),%eax 11153b: 0f af c1 imul %ecx,%eax 11153e: 8d 50 ff lea -0x1(%eax),%edx 111541: 39 d6 cmp %edx,%esi 111543: 77 3b ja 111580 my_block -= FIRST_DOUBLY_INDIRECT; 111545: 29 ce sub %ecx,%esi singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 111547: 89 f0 mov %esi,%eax 111549: 31 d2 xor %edx,%edx 11154b: f7 f1 div %ecx 11154d: 89 c6 mov %eax,%esi doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 11154f: 8b 43 5c mov 0x5c(%ebx),%eax if ( malloc_it ) { 111552: 85 ff test %edi,%edi 111554: 74 7e je 1115d4 if ( !p ) { 111556: 85 c0 test %eax,%eax 111558: 0f 84 96 00 00 00 je 1115f4 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 11155e: 8d 1c b0 lea (%eax,%esi,4),%ebx 111561: 8b 03 mov (%ebx),%eax if ( !p1 ) { 111563: 85 c0 test %eax,%eax 111565: 0f 84 a4 00 00 00 je 11160f p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 11156b: 8d 04 90 lea (%eax,%edx,4),%eax /* * This means the requested block number is out of range. */ return 0; } 11156e: 83 c4 1c add $0x1c,%esp 111571: 5b pop %ebx 111572: 5e pop %esi 111573: 5f pop %edi 111574: c9 leave 111575: c3 ret 111576: 66 90 xchg %ax,%ax info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 111578: 85 c0 test %eax,%eax 11157a: 75 b1 jne 11152d <== ALWAYS TAKEN if ( !p ) return 0; p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; 11157c: 31 c0 xor %eax,%eax 11157e: eb ee jmp 11156e <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 111580: 8d 50 01 lea 0x1(%eax),%edx 111583: 0f af d1 imul %ecx,%edx 111586: 4a dec %edx 111587: 39 d6 cmp %edx,%esi 111589: 77 f1 ja 11157c <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 11158b: 29 c6 sub %eax,%esi 11158d: 89 f0 mov %esi,%eax singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 11158f: 31 d2 xor %edx,%edx 111591: f7 f1 div %ecx 111593: 89 55 e4 mov %edx,-0x1c(%ebp) doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 111596: 31 d2 xor %edx,%edx 111598: f7 f1 div %ecx 11159a: 89 c6 mov %eax,%esi doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 11159c: 8b 4b 60 mov 0x60(%ebx),%ecx if ( malloc_it ) { 11159f: 85 ff test %edi,%edi 1115a1: 0f 84 82 00 00 00 je 111629 <== NEVER TAKEN if ( !p ) { 1115a7: 85 c9 test %ecx,%ecx 1115a9: 0f 84 9b 00 00 00 je 11164a <== NEVER TAKEN if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 1115af: 8d 1c b1 lea (%ecx,%esi,4),%ebx 1115b2: 8b 0b mov (%ebx),%ecx if ( !p1 ) { 1115b4: 85 c9 test %ecx,%ecx 1115b6: 0f 84 c5 00 00 00 je 111681 <== NEVER TAKEN if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 1115bc: 8d 1c 91 lea (%ecx,%edx,4),%ebx 1115bf: 8b 13 mov (%ebx),%edx if ( !p2 ) { 1115c1: 85 d2 test %edx,%edx 1115c3: 0f 84 a0 00 00 00 je 111669 <== NEVER TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 1115c9: 8b 4d e4 mov -0x1c(%ebp),%ecx 1115cc: 8d 04 8a lea (%edx,%ecx,4),%eax 1115cf: eb 9d jmp 11156e 1115d1: 8d 76 00 lea 0x0(%esi),%esi } return (block_p *)&p1[ singly ]; } if ( !p ) 1115d4: 85 c0 test %eax,%eax 1115d6: 74 a4 je 11157c <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 1115d8: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !p ) 1115db: 85 c0 test %eax,%eax 1115dd: 75 8c jne 11156b <== ALWAYS TAKEN if ( !p ) return 0; p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; 1115df: 31 c0 xor %eax,%eax 1115e1: eb 8b jmp 11156e <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 1115e3: e8 f0 fe ff ff call 1114d8 if ( !p ) 1115e8: 85 c0 test %eax,%eax 1115ea: 74 90 je 11157c <== NEVER TAKEN return 0; info->indirect = p; 1115ec: 89 43 58 mov %eax,0x58(%ebx) 1115ef: e9 39 ff ff ff jmp 11152d p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 1115f4: 89 55 e0 mov %edx,-0x20(%ebp) 1115f7: e8 dc fe ff ff call 1114d8 if ( !p ) 1115fc: 85 c0 test %eax,%eax 1115fe: 8b 55 e0 mov -0x20(%ebp),%edx 111601: 0f 84 75 ff ff ff je 11157c <== NEVER TAKEN return 0; info->doubly_indirect = p; 111607: 89 43 5c mov %eax,0x5c(%ebx) 11160a: e9 4f ff ff ff jmp 11155e } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 11160f: 89 55 e0 mov %edx,-0x20(%ebp) 111612: e8 c1 fe ff ff call 1114d8 if ( !p1 ) 111617: 85 c0 test %eax,%eax 111619: 8b 55 e0 mov -0x20(%ebp),%edx 11161c: 0f 84 5a ff ff ff je 11157c <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; 111622: 89 03 mov %eax,(%ebx) 111624: e9 42 ff ff ff jmp 11156b p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 111629: 85 c9 test %ecx,%ecx 11162b: 0f 84 4b ff ff ff je 11157c <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 111631: 8b 04 81 mov (%ecx,%eax,4),%eax if ( !p1 ) 111634: 85 c0 test %eax,%eax 111636: 0f 84 40 ff ff ff je 11157c <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 11163c: 8b 14 90 mov (%eax,%edx,4),%edx if ( !p2 ) return 0; 11163f: 31 c0 xor %eax,%eax p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 111641: 85 d2 test %edx,%edx 111643: 75 84 jne 1115c9 111645: e9 24 ff ff ff jmp 11156e <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 11164a: 89 55 e0 mov %edx,-0x20(%ebp) 11164d: e8 86 fe ff ff call 1114d8 111652: 89 c1 mov %eax,%ecx if ( !p ) return 0; 111654: 31 c0 xor %eax,%eax p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 111656: 85 c9 test %ecx,%ecx 111658: 8b 55 e0 mov -0x20(%ebp),%edx 11165b: 0f 84 0d ff ff ff je 11156e <== NEVER TAKEN return 0; info->triply_indirect = p; 111661: 89 4b 60 mov %ecx,0x60(%ebx) 111664: e9 46 ff ff ff jmp 1115af p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 111669: e8 6a fe ff ff call 1114d8 11166e: 89 c2 mov %eax,%edx if ( !p2 ) return 0; 111670: 31 c0 xor %eax,%eax } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 111672: 85 d2 test %edx,%edx 111674: 0f 84 f4 fe ff ff je 11156e <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 11167a: 89 13 mov %edx,(%ebx) 11167c: e9 48 ff ff ff jmp 1115c9 info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 111681: 89 55 e0 mov %edx,-0x20(%ebp) 111684: e8 4f fe ff ff call 1114d8 111689: 89 c1 mov %eax,%ecx if ( !p1 ) return 0; 11168b: 31 c0 xor %eax,%eax } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 11168d: 85 c9 test %ecx,%ecx 11168f: 8b 55 e0 mov -0x20(%ebp),%edx 111692: 0f 84 d6 fe ff ff je 11156e <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 111698: 89 0b mov %ecx,(%ebx) 11169a: e9 1d ff ff ff jmp 1115bc =============================================================================== 001116a0 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 1116a0: 55 push %ebp 1116a1: 89 e5 mov %esp,%ebp 1116a3: 57 push %edi 1116a4: 56 push %esi 1116a5: 53 push %ebx 1116a6: 83 ec 3c sub $0x3c,%esp 1116a9: 8b 75 0c mov 0xc(%ebp),%esi 1116ac: 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) { 1116af: 8b 45 08 mov 0x8(%ebp),%eax 1116b2: 83 78 4c 06 cmpl $0x6,0x4c(%eax) 1116b6: 0f 84 60 01 00 00 je 11181c /* * 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; 1116bc: 89 f0 mov %esi,%eax if ( last_byte > the_jnode->info.file.size ) 1116be: 8b 55 08 mov 0x8(%ebp),%edx 1116c1: 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; 1116c4: 8b 5d 18 mov 0x18(%ebp),%ebx 1116c7: 01 f3 add %esi,%ebx 1116c9: 89 5d d0 mov %ebx,-0x30(%ebp) if ( last_byte > the_jnode->info.file.size ) 1116cc: 31 d2 xor %edx,%edx 1116ce: 8b 5d 08 mov 0x8(%ebp),%ebx 1116d1: 3b 53 54 cmp 0x54(%ebx),%edx 1116d4: 0f 8d d2 00 00 00 jge 1117ac <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 1116da: 8b 45 18 mov 0x18(%ebp),%eax 1116dd: 89 45 cc mov %eax,-0x34(%ebp) */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 1116e0: 8b 15 20 73 12 00 mov 0x127320,%edx 1116e6: 89 55 d0 mov %edx,-0x30(%ebp) 1116e9: 89 d0 mov %edx,%eax 1116eb: 99 cltd 1116ec: 89 d3 mov %edx,%ebx 1116ee: 52 push %edx 1116ef: 50 push %eax 1116f0: 57 push %edi 1116f1: 56 push %esi 1116f2: 89 45 c0 mov %eax,-0x40(%ebp) 1116f5: e8 b2 d0 00 00 call 11e7ac <__moddi3> 1116fa: 83 c4 10 add $0x10,%esp 1116fd: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 111700: 8b 4d c0 mov -0x40(%ebp),%ecx 111703: 53 push %ebx 111704: 51 push %ecx 111705: 57 push %edi 111706: 56 push %esi 111707: e8 54 cf 00 00 call 11e660 <__divdi3> 11170c: 83 c4 10 add $0x10,%esp 11170f: 89 c3 mov %eax,%ebx if ( start_offset ) { 111711: 8b 7d c8 mov -0x38(%ebp),%edi 111714: 85 ff test %edi,%edi 111716: 0f 84 a0 00 00 00 je 1117bc 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 ); 11171c: 56 push %esi 11171d: 6a 00 push $0x0 11171f: 50 push %eax 111720: ff 75 08 pushl 0x8(%ebp) 111723: e8 d4 fd ff ff call 1114fc if ( !block_ptr ) 111728: 83 c4 10 add $0x10,%esp 11172b: 85 c0 test %eax,%eax 11172d: 0f 84 65 01 00 00 je 111898 <== 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; 111733: 8b 4d d0 mov -0x30(%ebp),%ecx 111736: 2b 4d c8 sub -0x38(%ebp),%ecx 111739: 8b 55 cc mov -0x34(%ebp),%edx 11173c: 39 ca cmp %ecx,%edx 11173e: 0f 87 3c 01 00 00 ja 111880 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 ); 111744: 8b 75 c8 mov -0x38(%ebp),%esi 111747: 03 30 add (%eax),%esi dest += to_copy; 111749: 8b 7d 14 mov 0x14(%ebp),%edi 11174c: 89 d1 mov %edx,%ecx 11174e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 111750: 89 7d c8 mov %edi,-0x38(%ebp) block++; 111753: 43 inc %ebx my_length -= to_copy; 111754: 29 55 cc sub %edx,-0x34(%ebp) 111757: a1 20 73 12 00 mov 0x127320,%eax 11175c: 89 45 d0 mov %eax,-0x30(%ebp) copied += to_copy; 11175f: 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 ) { 111762: 8b 4d d0 mov -0x30(%ebp),%ecx 111765: 39 4d cc cmp %ecx,-0x34(%ebp) 111768: 73 24 jae 11178e 11176a: eb 60 jmp 1117cc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 11176c: 8b 30 mov (%eax),%esi 11176e: 8b 7d c8 mov -0x38(%ebp),%edi 111771: 8b 4d d0 mov -0x30(%ebp),%ecx 111774: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 111776: 89 7d c8 mov %edi,-0x38(%ebp) block++; 111779: 43 inc %ebx my_length -= to_copy; 11177a: 8b 7d d0 mov -0x30(%ebp),%edi 11177d: 29 7d cc sub %edi,-0x34(%ebp) copied += to_copy; 111780: 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 ) { 111783: 8b 45 cc mov -0x34(%ebp),%eax 111786: 39 05 20 73 12 00 cmp %eax,0x127320 11178c: 77 3e ja 1117cc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 11178e: 51 push %ecx 11178f: 6a 00 push $0x0 111791: 53 push %ebx 111792: ff 75 08 pushl 0x8(%ebp) 111795: e8 62 fd ff ff call 1114fc if ( !block_ptr ) 11179a: 83 c4 10 add $0x10,%esp 11179d: 85 c0 test %eax,%eax 11179f: 75 cb jne 11176c <== 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; 1117a1: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 1117a4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1117a7: 5b pop %ebx <== NOT EXECUTED 1117a8: 5e pop %esi <== NOT EXECUTED 1117a9: 5f pop %edi <== NOT EXECUTED 1117aa: c9 leave <== NOT EXECUTED 1117ab: 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 ) 1117ac: 0f 8e be 00 00 00 jle 111870 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; 1117b2: 29 c1 sub %eax,%ecx 1117b4: 89 4d cc mov %ecx,-0x34(%ebp) 1117b7: e9 24 ff ff ff jmp 1116e0 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 1117bc: 8b 55 14 mov 0x14(%ebp),%edx 1117bf: 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; 1117c2: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 1117c9: eb 97 jmp 111762 1117cb: 90 nop /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 1117cc: 8b 55 cc mov -0x34(%ebp),%edx 1117cf: 85 d2 test %edx,%edx 1117d1: 74 23 je 1117f6 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1117d3: 50 push %eax 1117d4: 6a 00 push $0x0 1117d6: 53 push %ebx 1117d7: ff 75 08 pushl 0x8(%ebp) 1117da: e8 1d fd ff ff call 1114fc if ( !block_ptr ) 1117df: 83 c4 10 add $0x10,%esp 1117e2: 85 c0 test %eax,%eax 1117e4: 74 bb je 1117a1 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 1117e6: 8b 30 mov (%eax),%esi 1117e8: 8b 7d c8 mov -0x38(%ebp),%edi 1117eb: 8b 4d cc mov -0x34(%ebp),%ecx 1117ee: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 1117f0: 8b 55 cc mov -0x34(%ebp),%edx 1117f3: 01 55 c4 add %edx,-0x3c(%ebp) } IMFS_update_atime( the_jnode ); 1117f6: 83 ec 08 sub $0x8,%esp 1117f9: 6a 00 push $0x0 1117fb: 8d 45 e0 lea -0x20(%ebp),%eax 1117fe: 50 push %eax 1117ff: e8 ac 5e ff ff call 1076b0 111804: 8b 45 e0 mov -0x20(%ebp),%eax 111807: 8b 4d 08 mov 0x8(%ebp),%ecx 11180a: 89 41 40 mov %eax,0x40(%ecx) return copied; 11180d: 8b 45 c4 mov -0x3c(%ebp),%eax 111810: 83 c4 10 add $0x10,%esp } 111813: 8d 65 f4 lea -0xc(%ebp),%esp 111816: 5b pop %ebx 111817: 5e pop %esi 111818: 5f pop %edi 111819: c9 leave 11181a: c3 ret 11181b: 90 nop my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 11181c: 8b 50 58 mov 0x58(%eax),%edx 11181f: 89 55 cc mov %edx,-0x34(%ebp) if (my_length > (the_jnode->info.linearfile.size - start)) 111822: 89 c1 mov %eax,%ecx 111824: 8b 40 50 mov 0x50(%eax),%eax 111827: 8b 51 54 mov 0x54(%ecx),%edx 11182a: 89 c1 mov %eax,%ecx 11182c: 89 d3 mov %edx,%ebx 11182e: 29 f1 sub %esi,%ecx 111830: 19 fb sbb %edi,%ebx 111832: 89 4d d0 mov %ecx,-0x30(%ebp) 111835: 89 5d d4 mov %ebx,-0x2c(%ebp) 111838: 31 c9 xor %ecx,%ecx 11183a: 39 d9 cmp %ebx,%ecx 11183c: 7d 4a jge 111888 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 11183e: 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); 111841: 03 75 cc add -0x34(%ebp),%esi 111844: 8b 7d 14 mov 0x14(%ebp),%edi 111847: 89 d9 mov %ebx,%ecx 111849: f3 a4 rep movsb %ds:(%esi),%es:(%edi) IMFS_update_atime( the_jnode ); 11184b: 83 ec 08 sub $0x8,%esp 11184e: 6a 00 push $0x0 111850: 8d 45 e0 lea -0x20(%ebp),%eax 111853: 50 push %eax 111854: e8 57 5e ff ff call 1076b0 111859: 8b 45 e0 mov -0x20(%ebp),%eax 11185c: 8b 7d 08 mov 0x8(%ebp),%edi 11185f: 89 47 40 mov %eax,0x40(%edi) return my_length; 111862: 89 d8 mov %ebx,%eax 111864: 83 c4 10 add $0x10,%esp } IMFS_update_atime( the_jnode ); return copied; } 111867: 8d 65 f4 lea -0xc(%ebp),%esp 11186a: 5b pop %ebx 11186b: 5e pop %esi 11186c: 5f pop %edi 11186d: c9 leave 11186e: c3 ret 11186f: 90 nop /* * 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 ) 111870: 39 4d d0 cmp %ecx,-0x30(%ebp) 111873: 0f 86 61 fe ff ff jbe 1116da 111879: e9 34 ff ff ff jmp 1117b2 11187e: 66 90 xchg %ax,%ax * 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; 111880: 89 ca mov %ecx,%edx 111882: e9 bd fe ff ff jmp 111744 111887: 90 nop 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)) 111888: 7f 08 jg 111892 <== NEVER TAKEN 11188a: 8b 5d d0 mov -0x30(%ebp),%ebx 11188d: 39 5d 18 cmp %ebx,0x18(%ebp) 111890: 76 ac jbe 11183e <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 111892: 89 c3 mov %eax,%ebx 111894: 29 f3 sub %esi,%ebx 111896: eb a9 jmp 111841 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; 111898: 31 c0 xor %eax,%eax 11189a: e9 05 ff ff ff jmp 1117a4 <== NOT EXECUTED =============================================================================== 00111978 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 111978: 55 push %ebp 111979: 89 e5 mov %esp,%ebp 11197b: 57 push %edi 11197c: 56 push %esi 11197d: 53 push %ebx 11197e: 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; 111981: 8b 3d 20 73 12 00 mov 0x127320,%edi 111987: c1 ef 02 shr $0x2,%edi * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 11198a: 8b 45 08 mov 0x8(%ebp),%eax 11198d: 8b 50 58 mov 0x58(%eax),%edx 111990: 85 d2 test %edx,%edx 111992: 74 10 je 1119a4 memfile_free_blocks_in_table( &info->indirect, to_free ); 111994: 83 ec 08 sub $0x8,%esp 111997: 57 push %edi 111998: 83 c0 58 add $0x58,%eax 11199b: 50 push %eax 11199c: e8 7b ff ff ff call 11191c 1119a1: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 1119a4: 8b 4d 08 mov 0x8(%ebp),%ecx 1119a7: 8b 51 5c mov 0x5c(%ecx),%edx 1119aa: 85 d2 test %edx,%edx 1119ac: 74 55 je 111a03 for ( i=0 ; i<== NEVER TAKEN 1119ba: 31 c9 xor %ecx,%ecx 1119bc: 31 db xor %ebx,%ebx 1119be: 8b 75 08 mov 0x8(%ebp),%esi 1119c1: eb 04 jmp 1119c7 1119c3: 90 nop 1119c4: 8b 56 5c mov 0x5c(%esi),%edx if ( info->doubly_indirect[i] ) { 1119c7: c1 e1 02 shl $0x2,%ecx 1119ca: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) 1119ce: 74 14 je 1119e4 <== NEVER TAKEN memfile_free_blocks_in_table( 1119d0: 83 ec 08 sub $0x8,%esp 1119d3: 57 push %edi 1119d4: 01 ca add %ecx,%edx 1119d6: 52 push %edx 1119d7: e8 40 ff ff ff call 11191c 1119dc: 83 c4 10 add $0x10,%esp 1119df: a1 20 73 12 00 mov 0x127320,%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 ); 1119f0: 83 ec 08 sub $0x8,%esp 1119f3: 57 push %edi 1119f4: 8b 45 08 mov 0x8(%ebp),%eax 1119f7: 83 c0 5c add $0x5c,%eax 1119fa: 50 push %eax 1119fb: e8 1c ff ff ff call 11191c 111a00: 83 c4 10 add $0x10,%esp } if ( info->triply_indirect ) { 111a03: 8b 45 08 mov 0x8(%ebp),%eax 111a06: 8b 50 60 mov 0x60(%eax),%edx 111a09: 85 d2 test %edx,%edx 111a0b: 0f 84 b6 00 00 00 je 111ac7 for ( i=0 ; i<== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; 111a21: 8b 32 mov (%edx),%esi if ( !p ) /* ensure we have a valid pointer */ 111a23: 85 f6 test %esi,%esi 111a25: 0f 84 89 00 00 00 je 111ab4 <== NEVER TAKEN } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 111a2b: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( !p ) /* ensure we have a valid pointer */ 111a32: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 111a39: 8d 76 00 lea 0x0(%esi),%esi break; for ( j=0 ; j<== NEVER TAKEN 111a43: 31 d2 xor %edx,%edx 111a45: 31 db xor %ebx,%ebx 111a47: 90 nop if ( p[j] ) { 111a48: c1 e2 02 shl $0x2,%edx 111a4b: 8b 0c 16 mov (%esi,%edx,1),%ecx 111a4e: 85 c9 test %ecx,%ecx 111a50: 74 15 je 111a67 <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 111a52: 83 ec 08 sub $0x8,%esp 111a55: 57 push %edi 111a56: 8d 14 16 lea (%esi,%edx,1),%edx 111a59: 52 push %edx 111a5a: e8 bd fe ff ff call 11191c 111a5f: 83 c4 10 add $0x10,%esp 111a62: a1 20 73 12 00 mov 0x127320,%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( 111a73: 83 ec 08 sub $0x8,%esp 111a76: 57 push %edi 111a77: 8b 45 e0 mov -0x20(%ebp),%eax 111a7a: 8b 4d 08 mov 0x8(%ebp),%ecx 111a7d: 03 41 60 add 0x60(%ecx),%eax 111a80: 50 push %eax 111a81: e8 96 fe ff ff call 11191c 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 */ 111a9b: 8b 55 e4 mov -0x1c(%ebp),%edx 111a9e: c1 e2 02 shl $0x2,%edx 111aa1: 89 55 e0 mov %edx,-0x20(%ebp) } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 111aa4: 8b 4d 08 mov 0x8(%ebp),%ecx 111aa7: 8b 51 60 mov 0x60(%ecx),%edx 111aaa: 8b 4d e0 mov -0x20(%ebp),%ecx 111aad: 8b 34 0a mov (%edx,%ecx,1),%esi if ( !p ) /* ensure we have a valid pointer */ 111ab0: 85 f6 test %esi,%esi 111ab2: 75 88 jne 111a3c <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 111ab4: 83 ec 08 sub $0x8,%esp 111ab7: 57 push %edi (block_p **)&info->triply_indirect, to_free ); 111ab8: 8b 45 08 mov 0x8(%ebp),%eax 111abb: 83 c0 60 add $0x60,%eax } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 111abe: 50 push %eax 111abf: e8 58 fe ff ff call 11191c 111ac4: 83 c4 10 add $0x10,%esp (block_p **)&info->triply_indirect, to_free ); } return 0; } 111ac7: 31 c0 xor %eax,%eax 111ac9: 8d 65 f4 lea -0xc(%ebp),%esp 111acc: 5b pop %ebx 111acd: 5e pop %esi 111ace: 5f pop %edi 111acf: c9 leave 111ad0: c3 ret =============================================================================== 00111c18 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 111c18: 55 push %ebp 111c19: 89 e5 mov %esp,%ebp 111c1b: 57 push %edi 111c1c: 56 push %esi 111c1d: 53 push %ebx 111c1e: 83 ec 3c sub $0x3c,%esp 111c21: 8b 5d 0c mov 0xc(%ebp),%ebx 111c24: 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; 111c27: 8b 4d 18 mov 0x18(%ebp),%ecx 111c2a: 01 d9 add %ebx,%ecx if ( last_byte > the_jnode->info.file.size ) { 111c2c: 89 c8 mov %ecx,%eax 111c2e: 31 d2 xor %edx,%edx 111c30: 8b 7d 08 mov 0x8(%ebp),%edi 111c33: 3b 57 54 cmp 0x54(%edi),%edx 111c36: 7c 1c jl 111c54 <== NEVER TAKEN 111c38: 0f 8e f2 00 00 00 jle 111d30 <== ALWAYS TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 111c3e: 51 push %ecx 111c3f: 52 push %edx 111c40: 50 push %eax 111c41: ff 75 08 pushl 0x8(%ebp) 111c44: e8 b7 fe ff ff call 111b00 if ( status ) 111c49: 83 c4 10 add $0x10,%esp 111c4c: 85 c0 test %eax,%eax 111c4e: 0f 85 52 01 00 00 jne 111da6 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 111c54: a1 20 73 12 00 mov 0x127320,%eax 111c59: 89 45 d4 mov %eax,-0x2c(%ebp) 111c5c: 99 cltd 111c5d: 89 45 c8 mov %eax,-0x38(%ebp) 111c60: 89 55 cc mov %edx,-0x34(%ebp) 111c63: 52 push %edx 111c64: 50 push %eax 111c65: 56 push %esi 111c66: 53 push %ebx 111c67: e8 40 cb 00 00 call 11e7ac <__moddi3> 111c6c: 83 c4 10 add $0x10,%esp 111c6f: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 111c71: ff 75 cc pushl -0x34(%ebp) 111c74: ff 75 c8 pushl -0x38(%ebp) 111c77: 56 push %esi 111c78: 53 push %ebx 111c79: e8 e2 c9 00 00 call 11e660 <__divdi3> 111c7e: 83 c4 10 add $0x10,%esp 111c81: 89 c3 mov %eax,%ebx if ( start_offset ) { 111c83: 85 ff test %edi,%edi 111c85: 75 5d jne 111ce4 unsigned int last_byte; unsigned int start_offset; int copied; const unsigned char *src; src = source; 111c87: 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 ) { 111c8a: 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; 111c8d: 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 ) { 111c94: 3b 55 d4 cmp -0x2c(%ebp),%edx 111c97: 73 26 jae 111cbf 111c99: e9 a2 00 00 00 jmp 111d40 111c9e: 66 90 xchg %ax,%ax 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 ); 111ca0: 8b 00 mov (%eax),%eax src += to_copy; 111ca2: 89 c7 mov %eax,%edi 111ca4: 8b 4d d4 mov -0x2c(%ebp),%ecx 111ca7: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 111ca9: 43 inc %ebx my_length -= to_copy; 111caa: 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( 111cad: 8b 45 d4 mov -0x2c(%ebp),%eax 111cb0: 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 ) { 111cb3: 39 15 20 73 12 00 cmp %edx,0x127320 111cb9: 0f 87 81 00 00 00 ja 111d40 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111cbf: 57 push %edi 111cc0: 6a 00 push $0x0 111cc2: 53 push %ebx 111cc3: ff 75 08 pushl 0x8(%ebp) 111cc6: 89 55 c4 mov %edx,-0x3c(%ebp) 111cc9: e8 2e f8 ff ff call 1114fc if ( !block_ptr ) 111cce: 83 c4 10 add $0x10,%esp 111cd1: 85 c0 test %eax,%eax 111cd3: 8b 55 c4 mov -0x3c(%ebp),%edx 111cd6: 75 c8 jne 111ca0 <== ALWAYS TAKEN IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 111cd8: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 111cdb: 8d 65 f4 lea -0xc(%ebp),%esp 111cde: 5b pop %ebx 111cdf: 5e pop %esi 111ce0: 5f pop %edi 111ce1: c9 leave 111ce2: c3 ret 111ce3: 90 nop 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 ); 111ce4: 50 push %eax 111ce5: 6a 00 push $0x0 111ce7: 53 push %ebx 111ce8: ff 75 08 pushl 0x8(%ebp) 111ceb: e8 0c f8 ff ff call 1114fc if ( !block_ptr ) 111cf0: 83 c4 10 add $0x10,%esp 111cf3: 85 c0 test %eax,%eax 111cf5: 0f 84 a1 00 00 00 je 111d9c <== 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; 111cfb: 8b 55 d4 mov -0x2c(%ebp),%edx 111cfe: 29 fa sub %edi,%edx 111d00: 89 55 c8 mov %edx,-0x38(%ebp) 111d03: 8b 55 18 mov 0x18(%ebp),%edx 111d06: 39 55 c8 cmp %edx,-0x38(%ebp) 111d09: 0f 87 85 00 00 00 ja 111d94 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 111d0f: 03 38 add (%eax),%edi src += to_copy; 111d11: 8b 75 14 mov 0x14(%ebp),%esi 111d14: 8b 4d c8 mov -0x38(%ebp),%ecx 111d17: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 111d19: 43 inc %ebx my_length -= to_copy; 111d1a: 8b 55 18 mov 0x18(%ebp),%edx 111d1d: 2b 55 c8 sub -0x38(%ebp),%edx copied += to_copy; 111d20: 8b 3d 20 73 12 00 mov 0x127320,%edi 111d26: 89 7d d4 mov %edi,-0x2c(%ebp) 111d29: e9 66 ff ff ff jmp 111c94 111d2e: 66 90 xchg %ax,%ax * 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 ) { 111d30: 3b 4f 50 cmp 0x50(%edi),%ecx 111d33: 0f 86 1b ff ff ff jbe 111c54 <== NEVER TAKEN 111d39: e9 00 ff ff ff jmp 111c3e 111d3e: 66 90 xchg %ax,%ax * 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 ) { 111d40: 85 d2 test %edx,%edx 111d42: 74 28 je 111d6c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111d44: 51 push %ecx 111d45: 6a 00 push $0x0 111d47: 53 push %ebx 111d48: ff 75 08 pushl 0x8(%ebp) 111d4b: 89 55 c4 mov %edx,-0x3c(%ebp) 111d4e: e8 a9 f7 ff ff call 1114fc if ( !block_ptr ) 111d53: 83 c4 10 add $0x10,%esp 111d56: 85 c0 test %eax,%eax 111d58: 8b 55 c4 mov -0x3c(%ebp),%edx 111d5b: 0f 84 77 ff ff ff je 111cd8 <== 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 ); 111d61: 8b 00 mov (%eax),%eax 111d63: 89 c7 mov %eax,%edi 111d65: 89 d1 mov %edx,%ecx 111d67: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 111d69: 01 55 c8 add %edx,-0x38(%ebp) } IMFS_mtime_ctime_update( the_jnode ); 111d6c: 83 ec 08 sub $0x8,%esp 111d6f: 6a 00 push $0x0 111d71: 8d 45 e0 lea -0x20(%ebp),%eax 111d74: 50 push %eax 111d75: e8 36 59 ff ff call 1076b0 111d7a: 8b 45 e0 mov -0x20(%ebp),%eax 111d7d: 8b 55 08 mov 0x8(%ebp),%edx 111d80: 89 42 44 mov %eax,0x44(%edx) 111d83: 89 42 48 mov %eax,0x48(%edx) return copied; 111d86: 83 c4 10 add $0x10,%esp 111d89: 8b 45 c8 mov -0x38(%ebp),%eax } 111d8c: 8d 65 f4 lea -0xc(%ebp),%esp 111d8f: 5b pop %ebx 111d90: 5e pop %esi 111d91: 5f pop %edi 111d92: c9 leave 111d93: 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; 111d94: 89 55 c8 mov %edx,-0x38(%ebp) 111d97: e9 73 ff ff ff jmp 111d0f 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; 111d9c: 31 c0 xor %eax,%eax } IMFS_mtime_ctime_update( the_jnode ); return copied; } 111d9e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111da1: 5b pop %ebx <== NOT EXECUTED 111da2: 5e pop %esi <== NOT EXECUTED 111da3: 5f pop %edi <== NOT EXECUTED 111da4: c9 leave <== NOT EXECUTED 111da5: 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 ); 111da6: e8 a9 10 00 00 call 112e54 <__errno> 111dab: c7 00 1c 00 00 00 movl $0x1c,(%eax) 111db1: 83 c8 ff or $0xffffffff,%eax 111db4: e9 22 ff ff ff jmp 111cdb =============================================================================== 00106f3c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 106f3c: 55 push %ebp 106f3d: 89 e5 mov %esp,%ebp 106f3f: 57 push %edi 106f40: 56 push %esi 106f41: 53 push %ebx 106f42: 83 ec 5c sub $0x5c,%esp 106f45: 8b 55 08 mov 0x8(%ebp),%edx 106f48: 8b 5d 0c mov 0xc(%ebp),%ebx 106f4b: 8b 75 10 mov 0x10(%ebp),%esi 106f4e: 8b 45 14 mov 0x14(%ebp),%eax 106f51: 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 ); 106f54: 31 c0 xor %eax,%eax 106f56: b9 ff ff ff ff mov $0xffffffff,%ecx 106f5b: 89 d7 mov %edx,%edi 106f5d: f2 ae repnz scas %es:(%edi),%al 106f5f: f7 d1 not %ecx 106f61: 49 dec %ecx 106f62: 8d 45 e4 lea -0x1c(%ebp),%eax 106f65: 50 push %eax 106f66: 8d 7d af lea -0x51(%ebp),%edi 106f69: 57 push %edi 106f6a: 51 push %ecx 106f6b: 52 push %edx 106f6c: e8 5f 7f 00 00 call 10eed0 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 106f71: 89 d8 mov %ebx,%eax 106f73: 25 00 f0 00 00 and $0xf000,%eax 106f78: 83 c4 10 add $0x10,%esp 106f7b: 3d 00 40 00 00 cmp $0x4000,%eax 106f80: 74 56 je 106fd8 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 106f82: 3d 00 80 00 00 cmp $0x8000,%eax 106f87: 74 57 je 106fe0 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 106f89: 3d 00 60 00 00 cmp $0x6000,%eax 106f8e: 74 14 je 106fa4 106f90: 3d 00 20 00 00 cmp $0x2000,%eax 106f95: 74 0d je 106fa4 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 106f97: 3d 00 10 00 00 cmp $0x1000,%eax 106f9c: 74 4a je 106fe8 <== ALWAYS TAKEN mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { IMFS_token_types type = 0; 106f9e: 31 d2 xor %edx,%edx <== NOT EXECUTED 106fa0: eb 10 jmp 106fb2 <== NOT EXECUTED 106fa2: 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 ); 106fa4: 89 75 d0 mov %esi,-0x30(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 106fa7: 8b 45 a4 mov -0x5c(%ebp),%eax 106faa: 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; 106fad: 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 ); 106fb2: 83 ec 0c sub $0xc,%esp 106fb5: 8d 45 d0 lea -0x30(%ebp),%eax 106fb8: 50 push %eax 106fb9: 53 push %ebx 106fba: 57 push %edi 106fbb: 52 push %edx 106fbc: ff 75 18 pushl 0x18(%ebp) 106fbf: e8 44 75 00 00 call 10e508 if ( !new_node ) 106fc4: 83 c4 20 add $0x20,%esp 106fc7: 85 c0 test %eax,%eax 106fc9: 74 24 je 106fef rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; 106fcb: 31 c0 xor %eax,%eax } 106fcd: 8d 65 f4 lea -0xc(%ebp),%esp 106fd0: 5b pop %ebx 106fd1: 5e pop %esi 106fd2: 5f pop %edi 106fd3: c9 leave 106fd4: c3 ret 106fd5: 8d 76 00 lea 0x0(%esi),%esi /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 106fd8: ba 01 00 00 00 mov $0x1,%edx 106fdd: eb d3 jmp 106fb2 106fdf: 90 nop else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 106fe0: ba 05 00 00 00 mov $0x5,%edx 106fe5: eb cb jmp 106fb2 106fe7: 90 nop 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; 106fe8: ba 07 00 00 00 mov $0x7,%edx 106fed: eb c3 jmp 106fb2 * 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 ); 106fef: e8 60 be 00 00 call 112e54 <__errno> 106ff4: c7 00 0c 00 00 00 movl $0xc,(%eax) 106ffa: b8 ff ff ff ff mov $0xffffffff,%eax 106fff: eb cc jmp 106fcd =============================================================================== 00107004 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107004: 55 push %ebp 107005: 89 e5 mov %esp,%ebp 107007: 83 ec 08 sub $0x8,%esp 10700a: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10700d: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107010: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107014: 75 0a jne 107020 <== 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; 107016: 89 50 5c mov %edx,0x5c(%eax) return 0; 107019: 31 c0 xor %eax,%eax } 10701b: c9 leave 10701c: c3 ret 10701d: 8d 76 00 lea 0x0(%esi),%esi /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 107020: e8 2f be 00 00 call 112e54 <__errno> <== NOT EXECUTED 107025: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 10702b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 107030: c9 leave <== NOT EXECUTED 107031: c3 ret <== NOT EXECUTED =============================================================================== 00109920 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 109920: 55 push %ebp 109921: 89 e5 mov %esp,%ebp 109923: 53 push %ebx 109924: 83 ec 0c sub $0xc,%esp 109927: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 10992a: a1 20 b2 12 00 mov 0x12b220,%eax 10992f: ff 70 08 pushl 0x8(%eax) 109932: 8d 43 0c lea 0xc(%ebx),%eax 109935: 50 push %eax 109936: e8 61 db 00 00 call 11749c switch( the_jnode->type ) { 10993b: 8b 43 4c mov 0x4c(%ebx),%eax 10993e: 83 c4 10 add $0x10,%esp 109941: 83 f8 07 cmp $0x7,%eax 109944: 76 1e jbe 109964 <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 109946: 52 push %edx <== NOT EXECUTED 109947: 50 push %eax <== NOT EXECUTED 109948: 68 64 6b 12 00 push $0x126b64 <== NOT EXECUTED 10994d: a1 20 b2 12 00 mov 0x12b220,%eax <== NOT EXECUTED 109952: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109955: e8 36 da 00 00 call 117390 <== NOT EXECUTED return; 10995a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } puts(""); } 10995d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109960: c9 leave <== NOT EXECUTED 109961: c3 ret <== NOT EXECUTED 109962: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 109964: ff 24 85 7c 6b 12 00 jmp *0x126b7c(,%eax,4) 10996b: 90 nop case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 10996c: a1 20 b2 12 00 mov 0x12b220,%eax 109971: ff 70 08 pushl 0x8(%eax) 109974: 6a 13 push $0x13 109976: 6a 01 push $0x1 109978: 68 3d 6b 12 00 push $0x126b3d 10997d: e8 3e e7 00 00 call 1180c0 return; 109982: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 109985: 8b 5d fc mov -0x4(%ebp),%ebx 109988: c9 leave 109989: c3 ret 10998a: 66 90 xchg %ax,%ax case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 10998c: a1 20 b2 12 00 mov 0x12b220,%eax 109991: ff 70 08 pushl 0x8(%eax) 109994: 6a 12 push $0x12 109996: 6a 01 push $0x1 109998: 68 51 6b 12 00 push $0x126b51 10999d: e8 1e e7 00 00 call 1180c0 return; 1099a2: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 1099a5: 8b 5d fc mov -0x4(%ebp),%ebx 1099a8: c9 leave 1099a9: c3 ret 1099aa: 66 90 xchg %ax,%ax the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 1099ac: 51 push %ecx 1099ad: ff 73 50 pushl 0x50(%ebx) 1099b0: 68 31 6b 12 00 push $0x126b31 1099b5: a1 20 b2 12 00 mov 0x12b220,%eax 1099ba: ff 70 08 pushl 0x8(%eax) 1099bd: e8 ce d9 00 00 call 117390 (uint32_t)the_jnode->info.file.size ); #endif break; 1099c2: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 1099c5: c7 45 08 69 6e 12 00 movl $0x126e69,0x8(%ebp) } 1099cc: 8b 5d fc mov -0x4(%ebp),%ebx 1099cf: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 1099d0: e9 e3 f2 00 00 jmp 118cb8 1099d5: 8d 76 00 lea 0x0(%esi),%esi 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)", 1099d8: ff 73 58 pushl 0x58(%ebx) 1099db: ff 73 50 pushl 0x50(%ebx) 1099de: 68 22 6b 12 00 push $0x126b22 1099e3: a1 20 b2 12 00 mov 0x12b220,%eax 1099e8: ff 70 08 pushl 0x8(%eax) 1099eb: e8 a0 d9 00 00 call 117390 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 1099f0: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 1099f3: c7 45 08 69 6e 12 00 movl $0x126e69,0x8(%ebp) } 1099fa: 8b 5d fc mov -0x4(%ebp),%ebx 1099fd: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 1099fe: e9 b5 f2 00 00 jmp 118cb8 109a03: 90 nop IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 109a04: 83 ec 08 sub $0x8,%esp 109a07: a1 20 b2 12 00 mov 0x12b220,%eax 109a0c: ff 70 08 pushl 0x8(%eax) 109a0f: 6a 2f push $0x2f 109a11: e8 da d9 00 00 call 1173f0 break; 109a16: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 109a19: c7 45 08 69 6e 12 00 movl $0x126e69,0x8(%ebp) } 109a20: 8b 5d fc mov -0x4(%ebp),%ebx 109a23: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 109a24: e9 8f f2 00 00 jmp 118cb8 109a29: 8d 76 00 lea 0x0(%esi),%esi case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 109a2c: ff 73 54 pushl 0x54(%ebx) 109a2f: ff 73 50 pushl 0x50(%ebx) 109a32: 68 0f 6b 12 00 push $0x126b0f 109a37: a1 20 b2 12 00 mov 0x12b220,%eax 109a3c: ff 70 08 pushl 0x8(%eax) 109a3f: e8 4c d9 00 00 call 117390 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 109a44: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 109a47: c7 45 08 69 6e 12 00 movl $0x126e69,0x8(%ebp) } 109a4e: 8b 5d fc mov -0x4(%ebp),%ebx 109a51: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 109a52: e9 61 f2 00 00 jmp 118cb8 =============================================================================== 00107044 : ssize_t IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107044: 55 push %ebp 107045: 89 e5 mov %esp,%ebp 107047: 57 push %edi 107048: 56 push %esi 107049: 53 push %ebx 10704a: 8b 7d 0c mov 0xc(%ebp),%edi 10704d: 8b 5d 10 mov 0x10(%ebp),%ebx IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 107050: 8b 45 08 mov 0x8(%ebp),%eax 107053: 8b 30 mov (%eax),%esi IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107055: 85 db test %ebx,%ebx 107057: 74 28 je 107081 <== NEVER TAKEN 107059: 8b 46 50 mov 0x50(%esi),%eax 10705c: 8a 10 mov (%eax),%dl 10705e: 84 d2 test %dl,%dl 107060: 74 1f je 107081 <== NEVER TAKEN 107062: 31 c9 xor %ecx,%ecx 107064: 31 c0 xor %eax,%eax 107066: eb 0a jmp 107072 107068: 8b 56 50 mov 0x50(%esi),%edx 10706b: 8a 14 02 mov (%edx,%eax,1),%dl 10706e: 84 d2 test %dl,%dl 107070: 74 0a je 10707c buf[i] = node->info.sym_link.name[i]; 107072: 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++ ) 107075: 40 inc %eax 107076: 89 c1 mov %eax,%ecx 107078: 39 d8 cmp %ebx,%eax 10707a: 72 ec jb 107068 buf[i] = node->info.sym_link.name[i]; return i; } 10707c: 5b pop %ebx 10707d: 5e pop %esi 10707e: 5f pop %edi 10707f: c9 leave 107080: c3 ret node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107081: 31 c0 xor %eax,%eax 107083: eb f7 jmp 10707c <== NOT EXECUTED =============================================================================== 00107088 : 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 */ ) { 107088: 55 push %ebp 107089: 89 e5 mov %esp,%ebp 10708b: 53 push %ebx 10708c: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 10708f: 8b 45 0c mov 0xc(%ebp),%eax 107092: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 107094: 6a 20 push $0x20 107096: ff 75 14 pushl 0x14(%ebp) 107099: 8d 43 0c lea 0xc(%ebx),%eax 10709c: 50 push %eax 10709d: e8 aa cb 00 00 call 113c4c if ( the_jnode->Parent != NULL ) 1070a2: 83 c4 10 add $0x10,%esp 1070a5: 8b 4b 08 mov 0x8(%ebx),%ecx 1070a8: 85 c9 test %ecx,%ecx 1070aa: 74 0c je 1070b8 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1070ac: 83 ec 0c sub $0xc,%esp 1070af: 53 push %ebx 1070b0: e8 3f 44 00 00 call 10b4f4 <_Chain_Extract> 1070b5: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 1070b8: 8b 45 10 mov 0x10(%ebp),%eax 1070bb: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 1070bd: 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 ); 1070c0: 83 ec 08 sub $0x8,%esp 1070c3: 53 push %ebx rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); 1070c4: 83 c0 50 add $0x50,%eax 1070c7: 50 push %eax 1070c8: e8 03 44 00 00 call 10b4d0 <_Chain_Append> /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1070cd: 58 pop %eax 1070ce: 5a pop %edx 1070cf: 6a 00 push $0x0 1070d1: 8d 45 f0 lea -0x10(%ebp),%eax 1070d4: 50 push %eax 1070d5: e8 d6 05 00 00 call 1076b0 1070da: 8b 45 f0 mov -0x10(%ebp),%eax 1070dd: 89 43 48 mov %eax,0x48(%ebx) return 0; } 1070e0: 31 c0 xor %eax,%eax 1070e2: 8b 5d fc mov -0x4(%ebp),%ebx 1070e5: c9 leave 1070e6: c3 ret =============================================================================== 0010f09c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10f09c: 55 push %ebp 10f09d: 89 e5 mov %esp,%ebp 10f09f: 56 push %esi 10f0a0: 53 push %ebx 10f0a1: 8b 4d 08 mov 0x8(%ebp),%ecx 10f0a4: 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; 10f0a7: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10f0a9: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10f0ad: 76 15 jbe 10f0c4 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10f0af: e8 a0 3d 00 00 call 112e54 <__errno> 10f0b4: c7 00 86 00 00 00 movl $0x86,(%eax) 10f0ba: 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; } 10f0bf: 5b pop %ebx 10f0c0: 5e pop %esi 10f0c1: c9 leave 10f0c2: c3 ret 10f0c3: 90 nop IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 10f0c4: 8b 5a 4c mov 0x4c(%edx),%ebx 10f0c7: ff 24 9d d8 13 12 00 jmp *0x1213d8(,%ebx,4) 10f0ce: 66 90 xchg %ax,%ax case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10f0d0: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) 10f0d7: 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; 10f0de: 8b 49 10 mov 0x10(%ecx),%ecx buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 10f0e1: 8b 49 34 mov 0x34(%ecx),%ecx 10f0e4: 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 = 10f0e6: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10f0ec: 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; 10f0ef: 8b 4a 30 mov 0x30(%edx),%ecx 10f0f2: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10f0f5: 8b 4a 34 mov 0x34(%edx),%ecx 10f0f8: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10f0fc: 8b 4a 38 mov 0x38(%edx),%ecx 10f0ff: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10f102: 8b 4a 3c mov 0x3c(%edx),%ecx 10f105: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10f109: 66 8b 4a 3e mov 0x3e(%edx),%cx 10f10d: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10f111: 8b 4a 40 mov 0x40(%edx),%ecx 10f114: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10f117: 8b 4a 44 mov 0x44(%edx),%ecx 10f11a: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10f11d: 8b 52 48 mov 0x48(%edx),%edx 10f120: 89 50 38 mov %edx,0x38(%eax) return 0; 10f123: 31 c0 xor %eax,%eax } 10f125: 5b pop %ebx 10f126: 5e pop %esi 10f127: c9 leave 10f128: c3 ret 10f129: 8d 76 00 lea 0x0(%esi),%esi switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10f12c: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10f12f: 8b 72 50 mov 0x50(%edx),%esi 10f132: 89 70 18 mov %esi,0x18(%eax) 10f135: 89 58 1c mov %ebx,0x1c(%eax) break; 10f138: eb a4 jmp 10f0de 10f13a: 66 90 xchg %ax,%ax case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10f13c: 8b 5a 50 mov 0x50(%edx),%ebx 10f13f: 8b 72 54 mov 0x54(%edx),%esi 10f142: 89 58 20 mov %ebx,0x20(%eax) 10f145: 89 70 24 mov %esi,0x24(%eax) break; 10f148: eb 94 jmp 10f0de =============================================================================== 0010717c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 10717c: 55 push %ebp 10717d: 89 e5 mov %esp,%ebp 10717f: 57 push %edi 107180: 56 push %esi 107181: 53 push %ebx 107182: 83 ec 3c sub $0x3c,%esp 107185: 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; 107188: 8b 13 mov (%ebx),%edx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 10718a: 83 7a 4c 03 cmpl $0x3,0x4c(%edx) 10718e: 74 18 je 1071a8 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 107190: 83 ec 08 sub $0x8,%esp 107193: 8b 43 08 mov 0x8(%ebx),%eax 107196: 53 push %ebx 107197: ff 75 08 pushl 0x8(%ebp) 10719a: ff 50 34 call *0x34(%eax) return result; 10719d: 83 c4 10 add $0x10,%esp } 1071a0: 8d 65 f4 lea -0xc(%ebp),%esp 1071a3: 5b pop %ebx 1071a4: 5e pop %esi 1071a5: 5f pop %edi 1071a6: c9 leave 1071a7: c3 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 1071a8: 8b 42 50 mov 0x50(%edx),%eax 1071ab: 85 c0 test %eax,%eax 1071ad: 74 79 je 107228 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 1071af: 8d 7d cc lea -0x34(%ebp),%edi 1071b2: b9 05 00 00 00 mov $0x5,%ecx 1071b7: 89 de mov %ebx,%esi 1071b9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 1071bb: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 1071be: 83 ec 0c sub $0xc,%esp 1071c1: 8d 75 cc lea -0x34(%ebp),%esi 1071c4: 56 push %esi 1071c5: 89 55 c4 mov %edx,-0x3c(%ebp) 1071c8: e8 a7 74 00 00 call 10e674 /* * 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) 1071cd: 8b 55 c4 mov -0x3c(%ebp),%edx 1071d0: 8b 42 50 mov 0x50(%edx),%eax 1071d3: 8b 48 34 mov 0x34(%eax),%ecx 1071d6: 83 c4 10 add $0x10,%esp 1071d9: 66 83 f9 01 cmp $0x1,%cx 1071dd: 74 27 je 107206 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 1071df: 49 dec %ecx 1071e0: 66 89 48 34 mov %cx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 1071e4: 83 ec 08 sub $0x8,%esp 1071e7: 6a 00 push $0x0 1071e9: 8d 45 e0 lea -0x20(%ebp),%eax 1071ec: 50 push %eax 1071ed: 89 55 c4 mov %edx,-0x3c(%ebp) 1071f0: e8 bb 04 00 00 call 1076b0 1071f5: 8b 55 c4 mov -0x3c(%ebp),%edx 1071f8: 8b 42 50 mov 0x50(%edx),%eax 1071fb: 8b 55 e0 mov -0x20(%ebp),%edx 1071fe: 89 50 48 mov %edx,0x48(%eax) 107201: 83 c4 10 add $0x10,%esp 107204: eb 8a jmp 107190 * 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 ); 107206: 83 ec 08 sub $0x8,%esp 107209: 56 push %esi 10720a: ff 75 08 pushl 0x8(%ebp) 10720d: 8b 45 d4 mov -0x2c(%ebp),%eax 107210: ff 50 34 call *0x34(%eax) if ( result != 0 ) 107213: 83 c4 10 add $0x10,%esp 107216: 85 c0 test %eax,%eax 107218: 0f 84 72 ff ff ff je 107190 return -1; 10721e: b8 ff ff ff ff mov $0xffffffff,%eax 107223: e9 78 ff ff ff jmp 1071a0 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 107228: e8 27 bc 00 00 call 112e54 <__errno> <== NOT EXECUTED 10722d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107233: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107238: e9 63 ff ff ff jmp 1071a0 <== NOT EXECUTED =============================================================================== 00107240 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107240: 55 push %ebp 107241: 89 e5 mov %esp,%ebp 107243: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107246: 8b 45 08 mov 0x8(%ebp),%eax 107249: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 10724c: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107250: 75 12 jne 107264 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 107252: 8b 50 5c mov 0x5c(%eax),%edx 107255: 85 d2 test %edx,%edx 107257: 74 1d je 107276 <== 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; 107259: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) return 0; 107260: 31 c0 xor %eax,%eax } 107262: c9 leave 107263: 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 ); 107264: e8 eb bb 00 00 call 112e54 <__errno> <== NOT EXECUTED 107269: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 10726f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 107274: c9 leave <== NOT EXECUTED 107275: 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 */ 107276: e8 d9 bb 00 00 call 112e54 <__errno> <== NOT EXECUTED 10727b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107281: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 107286: c9 leave <== NOT EXECUTED 107287: c3 ret <== NOT EXECUTED =============================================================================== 0010785c : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 10785c: 55 push %ebp 10785d: 89 e5 mov %esp,%ebp 10785f: 57 push %edi 107860: 56 push %esi 107861: 53 push %ebx 107862: 83 ec 0c sub $0xc,%esp 107865: 8b 5d 08 mov 0x8(%ebp),%ebx 107868: 8b 75 0c mov 0xc(%ebp),%esi 10786b: 8b 7d 10 mov 0x10(%ebp),%edi /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 10786e: a1 68 5a 12 00 mov 0x125a68,%eax 107873: 85 c0 test %eax,%eax 107875: 74 02 je 107879 (*rtems_malloc_statistics_helpers->initialize)(); 107877: ff 10 call *(%eax) } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 107879: e8 76 ff ff ff call 1077f4 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 10787e: a1 6c 5a 12 00 mov 0x125a6c,%eax 107883: 85 c0 test %eax,%eax 107885: 74 0e je 107895 heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 107887: 83 ec 08 sub $0x8,%esp 10788a: 57 push %edi 10788b: 53 push %ebx 10788c: ff 10 call *(%eax) 10788e: 89 c3 mov %eax,%ebx 107890: 83 c4 10 add $0x10,%esp heap_begin, sbrk_amount ); heap_size = (uintptr_t) sbrk_amount; 107893: 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 ( 107895: 80 3d 64 5a 12 00 00 cmpb $0x0,0x125a64 10789c: 75 1f jne 1078bd !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 10789e: 80 3d 88 35 12 00 00 cmpb $0x0,0x123588 1078a5: 75 41 jne 1078e8 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1078a7: 6a 04 push $0x4 1078a9: 56 push %esi 1078aa: 53 push %ebx 1078ab: ff 35 90 34 12 00 pushl 0x123490 1078b1: e8 f6 41 00 00 call 10baac <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 1078b6: 83 c4 10 add $0x10,%esp 1078b9: 85 c0 test %eax,%eax 1078bb: 74 3e je 1078fb rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 1078bd: 8b 1d a0 76 12 00 mov 0x1276a0,%ebx 1078c3: 83 ec 0c sub $0xc,%esp 1078c6: ff 35 90 34 12 00 pushl 0x123490 1078cc: e8 57 4c 00 00 call 10c528 <_Protected_heap_Get_size> 1078d1: 8d 1c 18 lea (%eax,%ebx,1),%ebx 1078d4: 89 1d a0 76 12 00 mov %ebx,0x1276a0 1078da: 83 c4 10 add $0x10,%esp } 1078dd: 8d 65 f4 lea -0xc(%ebp),%esp 1078e0: 5b pop %ebx 1078e1: 5e pop %esi 1078e2: 5f pop %edi 1078e3: c9 leave 1078e4: c3 ret 1078e5: 8d 76 00 lea 0x0(%esi),%esi if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 1078e8: 31 c0 xor %eax,%eax 1078ea: 89 df mov %ebx,%edi 1078ec: 89 f1 mov %esi,%ecx 1078ee: 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 ) { 1078f0: 80 3d 64 5a 12 00 00 cmpb $0x0,0x125a64 1078f7: 74 ae je 1078a7 <== ALWAYS TAKEN 1078f9: eb c2 jmp 1078bd <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 1078fb: 83 ec 0c sub $0xc,%esp 1078fe: 6a 1a push $0x1a 107900: e8 e7 38 00 00 call 10b1ec =============================================================================== 00107370 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 107370: 55 push %ebp <== NOT EXECUTED 107371: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107373: 57 push %edi <== NOT EXECUTED 107374: 56 push %esi <== NOT EXECUTED 107375: 53 push %ebx <== NOT EXECUTED 107376: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 107379: 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) { 10737c: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 10737f: 0f 84 37 01 00 00 je 1074bc <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 107385: 8d b3 b8 00 00 00 lea 0xb8(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 10738b: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 107391: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 107394: 8b 8b bc 00 00 00 mov 0xbc(%ebx),%ecx <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 10739a: 8d 51 10 lea 0x10(%ecx),%edx <== NOT EXECUTED 10739d: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 1073a0: 8b 3e mov (%esi),%edi <== NOT EXECUTED 1073a2: 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; 1073a5: 8d 41 20 lea 0x20(%ecx),%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 1073a8: 89 fa mov %edi,%edx <== NOT EXECUTED 1073aa: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 1073ad: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 1073b0: 39 d0 cmp %edx,%eax <== NOT EXECUTED 1073b2: 73 23 jae 1073d7 <== NOT EXECUTED if (*base != U32_PATTERN) 1073b4: 81 79 20 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x20(%ecx) <== NOT EXECUTED 1073bb: 74 13 je 1073d0 <== NOT EXECUTED 1073bd: e9 a2 00 00 00 jmp 107464 <== NOT EXECUTED 1073c2: 66 90 xchg %ax,%ax <== NOT EXECUTED 1073c4: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 1073ca: 0f 85 94 00 00 00 jne 107464 <== 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++) 1073d0: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 1073d3: 39 c2 cmp %eax,%edx <== NOT EXECUTED 1073d5: 77 ed ja 1073c4 <== 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; 1073d7: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 1073de: 85 db test %ebx,%ebx <== NOT EXECUTED 1073e0: 0f 84 98 00 00 00 je 10747e <== NOT EXECUTED #endif { (*print_handler)( 1073e6: a1 44 90 12 00 mov 0x129044,%eax <== NOT EXECUTED 1073eb: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 1073ee: 50 push %eax <== NOT EXECUTED 1073ef: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 1073f2: 50 push %eax <== NOT EXECUTED 1073f3: 6a 05 push $0x5 <== NOT EXECUTED 1073f5: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 1073f8: e8 97 5e 00 00 call 10d294 <== NOT EXECUTED 1073fd: 50 push %eax <== NOT EXECUTED 1073fe: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107401: 68 b3 37 12 00 push $0x1237b3 <== NOT EXECUTED 107406: ff 35 40 90 12 00 pushl 0x129040 <== NOT EXECUTED 10740c: ff 55 cc call *-0x34(%ebp) <== NOT EXECUTED 10740f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 107412: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 107415: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107418: 57 push %edi <== NOT EXECUTED 107419: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 10741c: 8b 16 mov (%esi),%edx <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 10741e: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 107422: 52 push %edx <== NOT EXECUTED 107423: 50 push %eax <== NOT EXECUTED 107424: 68 ce 37 12 00 push $0x1237ce <== NOT EXECUTED 107429: ff 35 40 90 12 00 pushl 0x129040 <== NOT EXECUTED 10742f: ff 15 44 90 12 00 call *0x129044 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 107435: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107438: 8b 15 48 90 12 00 mov 0x129048,%edx <== NOT EXECUTED 10743e: 85 d2 test %edx,%edx <== NOT EXECUTED 107440: 74 5a je 10749c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 107442: 50 push %eax <== NOT EXECUTED 107443: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 107446: 68 f9 37 12 00 push $0x1237f9 <== NOT EXECUTED 10744b: ff 35 40 90 12 00 pushl 0x129040 <== NOT EXECUTED 107451: ff 15 44 90 12 00 call *0x129044 <== NOT EXECUTED 107457: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 10745a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10745d: 5b pop %ebx <== NOT EXECUTED 10745e: 5e pop %esi <== NOT EXECUTED 10745f: 5f pop %edi <== NOT EXECUTED 107460: c9 leave <== NOT EXECUTED 107461: c3 ret <== NOT EXECUTED 107462: 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 ) 107464: 85 c0 test %eax,%eax <== NOT EXECUTED 107466: 0f 84 6b ff ff ff je 1073d7 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 10746c: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10746f: 01 fa add %edi,%edx <== NOT EXECUTED 107471: 29 c2 sub %eax,%edx <== NOT EXECUTED 107473: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 107476: 85 db test %ebx,%ebx <== NOT EXECUTED 107478: 0f 85 68 ff ff ff jne 1073e6 <== 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 ); 10747e: 51 push %ecx <== NOT EXECUTED 10747f: 6a ff push $0xffffffff <== NOT EXECUTED 107481: 68 c0 37 12 00 push $0x1237c0 <== NOT EXECUTED 107486: ff 35 40 90 12 00 pushl 0x129040 <== NOT EXECUTED 10748c: ff 15 44 90 12 00 call *0x129044 <== NOT EXECUTED 107492: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107495: e9 78 ff ff ff jmp 107412 <== NOT EXECUTED 10749a: 66 90 xchg %ax,%ax <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 10749c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10749f: 68 ec 37 12 00 push $0x1237ec <== NOT EXECUTED 1074a4: ff 35 40 90 12 00 pushl 0x129040 <== NOT EXECUTED 1074aa: ff 15 44 90 12 00 call *0x129044 <== NOT EXECUTED 1074b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 1074b3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1074b6: 5b pop %ebx <== NOT EXECUTED 1074b7: 5e pop %esi <== NOT EXECUTED 1074b8: 5f pop %edi <== NOT EXECUTED 1074b9: c9 leave <== NOT EXECUTED 1074ba: c3 ret <== NOT EXECUTED 1074bb: 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) 1074bc: 8b 0d d4 93 12 00 mov 0x1293d4,%ecx <== NOT EXECUTED 1074c2: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1074c4: 74 94 je 10745a <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 1074c6: be d0 93 12 00 mov $0x1293d0,%esi <== NOT EXECUTED the_thread = 0; current = 0; 1074cb: 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; 1074d2: 31 db xor %ebx,%ebx <== NOT EXECUTED 1074d4: e9 c1 fe ff ff jmp 10739a <== NOT EXECUTED =============================================================================== 001074dc : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 1074dc: 55 push %ebp 1074dd: 89 e5 mov %esp,%ebp 1074df: 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 ) 1074e0: 8b 15 48 90 12 00 mov 0x129048,%edx 1074e6: 85 d2 test %edx,%edx 1074e8: 75 5a jne 107544 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 1074ea: c7 05 c0 93 12 00 0d movl $0xfeedf00d,0x1293c0 1074f1: f0 ed fe 1074f4: c7 05 c4 93 12 00 06 movl $0xbad0d06,0x1293c4 1074fb: 0d ad 0b 1074fe: c7 05 c8 93 12 00 0d movl $0xdeadf00d,0x1293c8 107505: f0 ad de 107508: c7 05 cc 93 12 00 06 movl $0x600d0d06,0x1293cc 10750f: 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) { 107512: 8b 15 6c 9b 12 00 mov 0x129b6c,%edx 107518: 85 d2 test %edx,%edx 10751a: 74 1e je 10753a <== NEVER TAKEN 10751c: 8b 0d 70 9b 12 00 mov 0x129b70,%ecx 107522: 85 c9 test %ecx,%ecx 107524: 74 14 je 10753a <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 107526: 89 15 d4 93 12 00 mov %edx,0x1293d4 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 10752c: 29 d1 sub %edx,%ecx 10752e: 89 0d d0 93 12 00 mov %ecx,0x1293d0 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 107534: b0 a5 mov $0xa5,%al 107536: 89 d7 mov %edx,%edi 107538: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 10753a: c7 05 48 90 12 00 01 movl $0x1,0x129048 107541: 00 00 00 } 107544: 5f pop %edi 107545: c9 leave 107546: c3 ret =============================================================================== 00107598 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 107598: 55 push %ebp <== NOT EXECUTED 107599: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10759b: 56 push %esi <== NOT EXECUTED 10759c: 53 push %ebx <== NOT EXECUTED 10759d: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 1075a0: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 1075a3: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); 1075a6: 8b b3 bc 00 00 00 mov 0xbc(%ebx),%esi <== NOT EXECUTED char name[32]; printk("BLOWN STACK!!!\n"); 1075ac: 68 ff 37 12 00 push $0x1237ff <== NOT EXECUTED 1075b1: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 1075b4: e8 f3 1b 00 00 call 1091ac <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 1075b9: 5a pop %edx <== NOT EXECUTED 1075ba: 59 pop %ecx <== NOT EXECUTED 1075bb: 53 push %ebx <== NOT EXECUTED 1075bc: 68 0f 38 12 00 push $0x12380f <== NOT EXECUTED 1075c1: e8 e6 1b 00 00 call 1091ac <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 1075c6: 59 pop %ecx <== NOT EXECUTED 1075c7: 58 pop %eax <== NOT EXECUTED 1075c8: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 1075cb: 68 2c 38 12 00 push $0x12382c <== NOT EXECUTED 1075d0: e8 d7 1b 00 00 call 1091ac <== NOT EXECUTED printk( 1075d5: 58 pop %eax <== NOT EXECUTED 1075d6: 5a pop %edx <== NOT EXECUTED 1075d7: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 1075da: 68 3e 38 12 00 push $0x12383e <== NOT EXECUTED 1075df: e8 c8 1b 00 00 call 1091ac <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 1075e4: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 1075e7: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 1075ea: 50 push %eax <== NOT EXECUTED 1075eb: 6a 20 push $0x20 <== NOT EXECUTED 1075ed: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 1075f0: e8 9f 5c 00 00 call 10d294 <== NOT EXECUTED 1075f5: 5a pop %edx <== NOT EXECUTED 1075f6: 59 pop %ecx <== NOT EXECUTED 1075f7: 50 push %eax <== NOT EXECUTED 1075f8: 68 52 38 12 00 push $0x123852 <== NOT EXECUTED 1075fd: e8 aa 1b 00 00 call 1091ac <== 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) 107602: 8b 8b bc 00 00 00 mov 0xbc(%ebx),%ecx <== NOT EXECUTED 107608: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 10760e: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 107611: 53 push %ebx <== NOT EXECUTED 107612: 51 push %ecx <== NOT EXECUTED 107613: 50 push %eax <== NOT EXECUTED 107614: 68 80 38 12 00 push $0x123880 <== NOT EXECUTED 107619: e8 8e 1b 00 00 call 1091ac <== 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) { 10761e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107621: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 107624: 84 d2 test %dl,%dl <== NOT EXECUTED 107626: 74 10 je 107638 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 107628: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10762b: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 107630: e8 6f 64 00 00 call 10daa4 <== NOT EXECUTED 107635: 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(stack); 107638: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 10763b: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 10763e: 56 push %esi <== NOT EXECUTED 10763f: 50 push %eax <== NOT EXECUTED 107640: 6a 10 push $0x10 <== NOT EXECUTED 107642: 68 b4 38 12 00 push $0x1238b4 <== NOT EXECUTED 107647: e8 60 1b 00 00 call 1091ac <== NOT EXECUTED 10764c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10764f: eb d7 jmp 107628 <== NOT EXECUTED =============================================================================== 0010b394 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10b394: 55 push %ebp 10b395: 89 e5 mov %esp,%ebp 10b397: 53 push %ebx 10b398: 83 ec 04 sub $0x4,%esp the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10b39b: 8b 1d 18 7a 12 00 mov 0x127a18,%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 10b3a1: 81 fb 1c 7a 12 00 cmp $0x127a1c,%ebx 10b3a7: 74 10 je 10b3b9 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10b3a9: 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)(); 10b3ac: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10b3af: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 10b3b1: 81 fb 1c 7a 12 00 cmp $0x127a1c,%ebx 10b3b7: 75 f3 jne 10b3ac <_API_extensions_Run_postdriver+0x18> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10b3b9: 58 pop %eax 10b3ba: 5b pop %ebx 10b3bb: c9 leave 10b3bc: c3 ret =============================================================================== 0010b3c0 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10b3c0: 55 push %ebp 10b3c1: 89 e5 mov %esp,%ebp 10b3c3: 53 push %ebx 10b3c4: 83 ec 04 sub $0x4,%esp the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10b3c7: 8b 1d 18 7a 12 00 mov 0x127a18,%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 10b3cd: 81 fb 1c 7a 12 00 cmp $0x127a1c,%ebx 10b3d3: 74 1c je 10b3f1 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10b3d5: 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 ); 10b3d8: 83 ec 0c sub $0xc,%esp 10b3db: ff 35 98 7d 12 00 pushl 0x127d98 10b3e1: ff 53 0c call *0xc(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10b3e4: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 10b3e6: 83 c4 10 add $0x10,%esp 10b3e9: 81 fb 1c 7a 12 00 cmp $0x127a1c,%ebx 10b3ef: 75 e7 jne 10b3d8 <_API_extensions_Run_postswitch+0x18> the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10b3f1: 8b 5d fc mov -0x4(%ebp),%ebx 10b3f4: c9 leave 10b3f5: c3 ret =============================================================================== 0010d7a0 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10d7a0: 55 push %ebp 10d7a1: 89 e5 mov %esp,%ebp 10d7a3: 57 push %edi 10d7a4: 56 push %esi 10d7a5: 53 push %ebx 10d7a6: 83 ec 1c sub $0x1c,%esp 10d7a9: 8b 5d 08 mov 0x8(%ebp),%ebx 10d7ac: 8b 7d 0c mov 0xc(%ebp),%edi 10d7af: 8b 4d 14 mov 0x14(%ebp),%ecx 10d7b2: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10d7b5: 8b 35 98 b6 12 00 mov 0x12b698,%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 ); 10d7bb: 9c pushf 10d7bc: fa cli 10d7bd: 8f 45 e4 popl -0x1c(%ebp) switch ( the_rwlock->current_state ) { 10d7c0: 8b 43 44 mov 0x44(%ebx),%eax 10d7c3: 85 c0 test %eax,%eax 10d7c5: 75 1d jne 10d7e4 <_CORE_RWLock_Obtain_for_reading+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10d7c7: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10d7ce: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10d7d1: ff 75 e4 pushl -0x1c(%ebp) 10d7d4: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10d7d5: 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 */ } 10d7dc: 8d 65 f4 lea -0xc(%ebp),%esp 10d7df: 5b pop %ebx 10d7e0: 5e pop %esi 10d7e1: 5f pop %edi 10d7e2: c9 leave 10d7e3: 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 ) { 10d7e4: 48 dec %eax 10d7e5: 74 51 je 10d838 <_CORE_RWLock_Obtain_for_reading+0x98> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10d7e7: 84 d2 test %dl,%dl 10d7e9: 75 15 jne 10d800 <_CORE_RWLock_Obtain_for_reading+0x60> _ISR_Enable( level ); 10d7eb: ff 75 e4 pushl -0x1c(%ebp) 10d7ee: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10d7ef: 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 */ } 10d7f6: 8d 65 f4 lea -0xc(%ebp),%esp 10d7f9: 5b pop %ebx 10d7fa: 5e pop %esi 10d7fb: 5f pop %edi 10d7fc: c9 leave 10d7fd: c3 ret 10d7fe: 66 90 xchg %ax,%ax 10d800: 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; 10d807: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10d80a: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10d80d: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10d814: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10d81b: ff 75 e4 pushl -0x1c(%ebp) 10d81e: 9d popf _Thread_queue_Enqueue_with_handler( 10d81f: c7 45 10 a4 d9 10 00 movl $0x10d9a4,0x10(%ebp) 10d826: 89 4d 0c mov %ecx,0xc(%ebp) 10d829: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10d82c: 8d 65 f4 lea -0xc(%ebp),%esp 10d82f: 5b pop %ebx 10d830: 5e pop %esi 10d831: 5f pop %edi 10d832: 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( 10d833: e9 b8 1b 00 00 jmp 10f3f0 <_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 ); 10d838: 83 ec 0c sub $0xc,%esp 10d83b: 53 push %ebx 10d83c: 88 55 e0 mov %dl,-0x20(%ebp) 10d83f: 89 4d dc mov %ecx,-0x24(%ebp) 10d842: e8 d1 1e 00 00 call 10f718 <_Thread_queue_First> if ( !waiter ) { 10d847: 83 c4 10 add $0x10,%esp 10d84a: 85 c0 test %eax,%eax 10d84c: 8a 55 e0 mov -0x20(%ebp),%dl 10d84f: 8b 4d dc mov -0x24(%ebp),%ecx 10d852: 75 93 jne 10d7e7 <_CORE_RWLock_Obtain_for_reading+0x47> the_rwlock->number_of_readers += 1; 10d854: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10d857: ff 75 e4 pushl -0x1c(%ebp) 10d85a: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10d85b: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10d862: e9 75 ff ff ff jmp 10d7dc <_CORE_RWLock_Obtain_for_reading+0x3c> =============================================================================== 0010d868 <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10d868: 55 push %ebp 10d869: 89 e5 mov %esp,%ebp 10d86b: 57 push %edi 10d86c: 56 push %esi 10d86d: 53 push %ebx 10d86e: 83 ec 0c sub $0xc,%esp 10d871: 8b 45 08 mov 0x8(%ebp),%eax 10d874: 8b 7d 0c mov 0xc(%ebp),%edi 10d877: 8b 75 14 mov 0x14(%ebp),%esi 10d87a: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10d87d: 8b 15 98 b6 12 00 mov 0x12b698,%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 ); 10d883: 9c pushf 10d884: fa cli 10d885: 59 pop %ecx switch ( the_rwlock->current_state ) { 10d886: 83 78 44 00 cmpl $0x0,0x44(%eax) 10d88a: 75 18 jne 10d8a4 <_CORE_RWLock_Obtain_for_writing+0x3c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10d88c: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10d893: 51 push %ecx 10d894: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10d895: 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 */ } 10d89c: 83 c4 0c add $0xc,%esp 10d89f: 5b pop %ebx 10d8a0: 5e pop %esi 10d8a1: 5f pop %edi 10d8a2: c9 leave 10d8a3: c3 ret /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10d8a4: 84 db test %bl,%bl 10d8a6: 75 14 jne 10d8bc <_CORE_RWLock_Obtain_for_writing+0x54> _ISR_Enable( level ); 10d8a8: 51 push %ecx 10d8a9: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10d8aa: 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 */ } 10d8b1: 83 c4 0c add $0xc,%esp 10d8b4: 5b pop %ebx 10d8b5: 5e pop %esi 10d8b6: 5f pop %edi 10d8b7: c9 leave 10d8b8: c3 ret 10d8b9: 8d 76 00 lea 0x0(%esi),%esi 10d8bc: 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; 10d8c3: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10d8c6: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10d8c9: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10d8d0: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10d8d7: 51 push %ecx 10d8d8: 9d popf _Thread_queue_Enqueue_with_handler( 10d8d9: c7 45 10 a4 d9 10 00 movl $0x10d9a4,0x10(%ebp) 10d8e0: 89 75 0c mov %esi,0xc(%ebp) 10d8e3: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10d8e6: 83 c4 0c add $0xc,%esp 10d8e9: 5b pop %ebx 10d8ea: 5e pop %esi 10d8eb: 5f pop %edi 10d8ec: 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( 10d8ed: e9 fe 1a 00 00 jmp 10f3f0 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010d8f4 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10d8f4: 55 push %ebp 10d8f5: 89 e5 mov %esp,%ebp 10d8f7: 53 push %ebx 10d8f8: 83 ec 04 sub $0x4,%esp 10d8fb: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10d8fe: 8b 0d 98 b6 12 00 mov 0x12b698,%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 ); 10d904: 9c pushf 10d905: fa cli 10d906: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10d907: 8b 43 44 mov 0x44(%ebx),%eax 10d90a: 85 c0 test %eax,%eax 10d90c: 74 7a je 10d988 <_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 ) { 10d90e: 48 dec %eax 10d90f: 74 63 je 10d974 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10d911: 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; 10d918: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10d91f: 52 push %edx 10d920: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10d921: 83 ec 0c sub $0xc,%esp 10d924: 53 push %ebx 10d925: e8 9e 19 00 00 call 10f2c8 <_Thread_queue_Dequeue> if ( next ) { 10d92a: 83 c4 10 add $0x10,%esp 10d92d: 85 c0 test %eax,%eax 10d92f: 74 39 je 10d96a <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10d931: 83 78 30 01 cmpl $0x1,0x30(%eax) 10d935: 74 61 je 10d998 <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10d937: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10d93a: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10d941: eb 17 jmp 10d95a <_CORE_RWLock_Release+0x66> 10d943: 90 nop /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 10d944: 83 78 30 01 cmpl $0x1,0x30(%eax) 10d948: 74 20 je 10d96a <_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; 10d94a: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10d94d: 83 ec 08 sub $0x8,%esp 10d950: 50 push %eax 10d951: 53 push %ebx 10d952: e8 a9 1c 00 00 call 10f600 <_Thread_queue_Extract> } 10d957: 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 ); 10d95a: 83 ec 0c sub $0xc,%esp 10d95d: 53 push %ebx 10d95e: e8 b5 1d 00 00 call 10f718 <_Thread_queue_First> if ( !next || 10d963: 83 c4 10 add $0x10,%esp 10d966: 85 c0 test %eax,%eax 10d968: 75 da jne 10d944 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10d96a: 31 c0 xor %eax,%eax 10d96c: 8b 5d fc mov -0x4(%ebp),%ebx 10d96f: c9 leave 10d970: c3 ret 10d971: 8d 76 00 lea 0x0(%esi),%esi _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; 10d974: 8b 43 48 mov 0x48(%ebx),%eax 10d977: 48 dec %eax 10d978: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10d97b: 85 c0 test %eax,%eax 10d97d: 74 92 je 10d911 <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10d97f: 52 push %edx 10d980: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10d981: 31 c0 xor %eax,%eax 10d983: 8b 5d fc mov -0x4(%ebp),%ebx 10d986: c9 leave 10d987: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10d988: 52 push %edx 10d989: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10d98a: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10d991: 31 c0 xor %eax,%eax 10d993: 8b 5d fc mov -0x4(%ebp),%ebx 10d996: c9 leave 10d997: 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; 10d998: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10d99f: eb c9 jmp 10d96a <_CORE_RWLock_Release+0x76> =============================================================================== 0010d9a4 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10d9a4: 55 push %ebp 10d9a5: 89 e5 mov %esp,%ebp 10d9a7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d9aa: 8d 45 f4 lea -0xc(%ebp),%eax 10d9ad: 50 push %eax 10d9ae: ff 75 08 pushl 0x8(%ebp) 10d9b1: e8 b6 15 00 00 call 10ef6c <_Thread_Get> switch ( location ) { 10d9b6: 83 c4 10 add $0x10,%esp 10d9b9: 8b 55 f4 mov -0xc(%ebp),%edx 10d9bc: 85 d2 test %edx,%edx 10d9be: 75 17 jne 10d9d7 <_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 ); 10d9c0: 83 ec 0c sub $0xc,%esp 10d9c3: 50 push %eax 10d9c4: e8 2f 1e 00 00 call 10f7f8 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d9c9: a1 ec b0 12 00 mov 0x12b0ec,%eax 10d9ce: 48 dec %eax 10d9cf: a3 ec b0 12 00 mov %eax,0x12b0ec 10d9d4: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10d9d7: c9 leave 10d9d8: c3 ret =============================================================================== 001109c8 <_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 ) { 1109c8: 55 push %ebp 1109c9: 89 e5 mov %esp,%ebp 1109cb: 57 push %edi 1109cc: 56 push %esi 1109cd: 53 push %ebx 1109ce: 83 ec 0c sub $0xc,%esp 1109d1: 8b 5d 08 mov 0x8(%ebp),%ebx 1109d4: 8b 75 10 mov 0x10(%ebp),%esi 1109d7: 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; 1109da: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1109dd: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1109e4: 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; 1109e7: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 1109ee: 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)) { 1109f5: a8 03 test $0x3,%al 1109f7: 74 17 je 110a10 <_CORE_message_queue_Initialize+0x48> allocated_message_size += sizeof(uint32_t); 1109f9: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 1109fc: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 1109ff: 39 d0 cmp %edx,%eax 110a01: 76 0f jbe 110a12 <_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; 110a03: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 110a05: 8d 65 f4 lea -0xc(%ebp),%esp 110a08: 5b pop %ebx 110a09: 5e pop %esi 110a0a: 5f pop %edi 110a0b: c9 leave 110a0c: c3 ret 110a0d: 8d 76 00 lea 0x0(%esi),%esi /* * 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)) { 110a10: 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)); 110a12: 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 * 110a15: 89 f8 mov %edi,%eax 110a17: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 110a1a: 39 d0 cmp %edx,%eax 110a1c: 72 e5 jb 110a03 <_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 ); 110a1e: 83 ec 0c sub $0xc,%esp 110a21: 50 push %eax 110a22: e8 35 d3 ff ff call 10dd5c <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 110a27: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 110a2a: 83 c4 10 add $0x10,%esp 110a2d: 85 c0 test %eax,%eax 110a2f: 74 d2 je 110a03 <_CORE_message_queue_Initialize+0x3b> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 110a31: 57 push %edi 110a32: 56 push %esi 110a33: 50 push %eax 110a34: 8d 43 68 lea 0x68(%ebx),%eax 110a37: 50 push %eax 110a38: e8 ab fe ff ff call 1108e8 <_Chain_Initialize> Chain_Node *tail = _Chain_Tail( the_chain ); 110a3d: 8d 43 54 lea 0x54(%ebx),%eax 110a40: 89 43 50 mov %eax,0x50(%ebx) head->next = tail; head->previous = NULL; 110a43: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 110a4a: 8d 43 50 lea 0x50(%ebx),%eax 110a4d: 89 43 58 mov %eax,0x58(%ebx) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 110a50: 6a 06 push $0x6 110a52: 68 80 00 00 00 push $0x80 110a57: 8b 45 0c mov 0xc(%ebp),%eax 110a5a: 83 38 01 cmpl $0x1,(%eax) 110a5d: 0f 94 c0 sete %al 110a60: 0f b6 c0 movzbl %al,%eax 110a63: 50 push %eax 110a64: 53 push %ebx 110a65: e8 26 ca ff ff call 10d490 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 110a6a: 83 c4 20 add $0x20,%esp 110a6d: b0 01 mov $0x1,%al } 110a6f: 8d 65 f4 lea -0xc(%ebp),%esp 110a72: 5b pop %ebx 110a73: 5e pop %esi 110a74: 5f pop %edi 110a75: c9 leave 110a76: c3 ret =============================================================================== 00112ba0 <_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 ) { 112ba0: 55 push %ebp 112ba1: 89 e5 mov %esp,%ebp 112ba3: 56 push %esi 112ba4: 53 push %ebx 112ba5: 83 ec 10 sub $0x10,%esp 112ba8: 8b 45 08 mov 0x8(%ebp),%eax 112bab: 8b 55 0c mov 0xc(%ebp),%edx 112bae: 8b 4d 10 mov 0x10(%ebp),%ecx 112bb1: 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 ) { 112bb4: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx 112bba: 74 70 je 112c2c <_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 ) { 112bbc: 81 f9 00 00 00 80 cmp $0x80000000,%ecx 112bc2: 0f 84 88 00 00 00 je 112c50 <_CORE_message_queue_Insert_message+0xb0> * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 112bc8: 8b 58 50 mov 0x50(%eax),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 112bcb: 8d 70 54 lea 0x54(%eax),%esi int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = _Chain_First( the_header ); while ( !_Chain_Is_tail( the_header, the_node ) ) { 112bce: 39 de cmp %ebx,%esi 112bd0: 74 05 je 112bd7 <_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 ) { 112bd2: 3b 4b 08 cmp 0x8(%ebx),%ecx 112bd5: 7d 45 jge 112c1c <_CORE_message_queue_Insert_message+0x7c> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 112bd7: 9c pushf 112bd8: fa cli 112bd9: 5e pop %esi SET_NOTIFY(); 112bda: 8b 48 48 mov 0x48(%eax),%ecx * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 112bdd: 85 c9 test %ecx,%ecx 112bdf: 0f 94 45 f7 sete -0x9(%ebp) } break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 112be3: 41 inc %ecx 112be4: 89 48 48 mov %ecx,0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 112be7: 8b 4b 04 mov 0x4(%ebx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 112bea: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 112bed: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 112bef: 89 11 mov %edx,(%ecx) the_node->next = before_node; 112bf1: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 112bf3: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 112bf6: 56 push %esi 112bf7: 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 ) 112bf8: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 112bfc: 74 16 je 112c14 <_CORE_message_queue_Insert_message+0x74> 112bfe: 8b 50 60 mov 0x60(%eax),%edx 112c01: 85 d2 test %edx,%edx 112c03: 74 0f je 112c14 <_CORE_message_queue_Insert_message+0x74> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 112c05: 8b 40 64 mov 0x64(%eax),%eax 112c08: 89 45 08 mov %eax,0x8(%ebp) #endif } 112c0b: 83 c4 10 add $0x10,%esp 112c0e: 5b pop %ebx 112c0f: 5e pop %esi 112c10: 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); 112c11: ff e2 jmp *%edx 112c13: 90 nop #endif } 112c14: 83 c4 10 add $0x10,%esp 112c17: 5b pop %ebx 112c18: 5e pop %esi 112c19: c9 leave 112c1a: c3 ret 112c1b: 90 nop 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; 112c1c: 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 = _Chain_First( the_header ); while ( !_Chain_Is_tail( the_header, the_node ) ) { 112c1e: 39 de cmp %ebx,%esi 112c20: 74 b5 je 112bd7 <_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 ) { 112c22: 3b 4b 08 cmp 0x8(%ebx),%ecx 112c25: 7c b0 jl 112bd7 <_CORE_message_queue_Insert_message+0x37> 112c27: eb f3 jmp 112c1c <_CORE_message_queue_Insert_message+0x7c> 112c29: 8d 76 00 lea 0x0(%esi),%esi 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 ); 112c2c: 9c pushf 112c2d: fa cli 112c2e: 5b pop %ebx SET_NOTIFY(); 112c2f: 8b 48 48 mov 0x48(%eax),%ecx * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 112c32: 85 c9 test %ecx,%ecx 112c34: 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++; 112c38: 41 inc %ecx 112c39: 89 48 48 mov %ecx,0x48(%eax) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 112c3c: 8b 48 58 mov 0x58(%eax),%ecx RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 112c3f: 8d 70 54 lea 0x54(%eax),%esi 112c42: 89 32 mov %esi,(%edx) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 112c44: 89 50 58 mov %edx,0x58(%eax) old_last->next = the_node; 112c47: 89 11 mov %edx,(%ecx) the_node->previous = old_last; 112c49: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 112c4c: 53 push %ebx 112c4d: 9d popf 112c4e: eb a8 jmp 112bf8 <_CORE_message_queue_Insert_message+0x58> } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 112c50: 9c pushf 112c51: fa cli 112c52: 5b pop %ebx SET_NOTIFY(); 112c53: 8b 48 48 mov 0x48(%eax),%ecx * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 112c56: 85 c9 test %ecx,%ecx 112c58: 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++; 112c5c: 41 inc %ecx 112c5d: 89 48 48 mov %ecx,0x48(%eax) RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert_unprotected(_Chain_Head(the_chain), the_node); 112c60: 8d 48 50 lea 0x50(%eax),%ecx 112c63: 89 4a 04 mov %ecx,0x4(%edx) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 112c66: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 112c69: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 112c6c: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 112c6e: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 112c71: 53 push %ebx 112c72: 9d popf 112c73: eb 83 jmp 112bf8 <_CORE_message_queue_Insert_message+0x58> =============================================================================== 00110a78 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 110a78: 55 push %ebp 110a79: 89 e5 mov %esp,%ebp 110a7b: 57 push %edi 110a7c: 56 push %esi 110a7d: 53 push %ebx 110a7e: 83 ec 2c sub $0x2c,%esp 110a81: 8b 55 08 mov 0x8(%ebp),%edx 110a84: 8b 45 0c mov 0xc(%ebp),%eax 110a87: 89 45 dc mov %eax,-0x24(%ebp) 110a8a: 8b 4d 10 mov 0x10(%ebp),%ecx 110a8d: 89 4d e0 mov %ecx,-0x20(%ebp) 110a90: 8b 45 14 mov 0x14(%ebp),%eax 110a93: 8b 5d 1c mov 0x1c(%ebp),%ebx 110a96: 89 5d d8 mov %ebx,-0x28(%ebp) 110a99: 0f b6 7d 18 movzbl 0x18(%ebp),%edi ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 110a9d: 8b 0d 98 7d 12 00 mov 0x127d98,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 110aa3: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 110aaa: 9c pushf 110aab: fa cli 110aac: 8f 45 e4 popl -0x1c(%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 ); } 110aaf: 8b 5a 50 mov 0x50(%edx),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 110ab2: 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)) 110ab5: 39 f3 cmp %esi,%ebx 110ab7: 74 7b je 110b34 <_CORE_message_queue_Seize+0xbc> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 110ab9: 8b 0b mov (%ebx),%ecx head->next = new_first; 110abb: 89 4a 50 mov %ecx,0x50(%edx) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 110abe: 8d 72 50 lea 0x50(%edx),%esi 110ac1: 89 71 04 mov %esi,0x4(%ecx) executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 110ac4: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 110ac7: ff 75 e4 pushl -0x1c(%ebp) 110aca: 9d popf *size_p = the_message->Contents.size; 110acb: 8b 4b 0c mov 0xc(%ebx),%ecx 110ace: 89 08 mov %ecx,(%eax) _Thread_Executing->Wait.count = 110ad0: 8b 73 08 mov 0x8(%ebx),%esi 110ad3: 8b 0d 98 7d 12 00 mov 0x127d98,%ecx 110ad9: 89 71 24 mov %esi,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 110adc: 8d 4b 10 lea 0x10(%ebx),%ecx 110adf: 89 4d e4 mov %ecx,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 110ae2: 8b 08 mov (%eax),%ecx 110ae4: 8b 7d e0 mov -0x20(%ebp),%edi 110ae7: 8b 75 e4 mov -0x1c(%ebp),%esi 110aea: 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 ); 110aec: 83 ec 0c sub $0xc,%esp 110aef: 52 push %edx 110af0: 89 55 d4 mov %edx,-0x2c(%ebp) 110af3: e8 08 c6 ff ff call 10d100 <_Thread_queue_Dequeue> if ( !the_thread ) { 110af8: 83 c4 10 add $0x10,%esp 110afb: 85 c0 test %eax,%eax 110afd: 8b 55 d4 mov -0x2c(%ebp),%edx 110b00: 0f 84 86 00 00 00 je 110b8c <_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; 110b06: 8b 48 24 mov 0x24(%eax),%ecx 110b09: 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; 110b0c: 8b 48 30 mov 0x30(%eax),%ecx 110b0f: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 110b12: 8b 70 2c mov 0x2c(%eax),%esi 110b15: 8b 7d e4 mov -0x1c(%ebp),%edi 110b18: 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( 110b1a: 8b 43 08 mov 0x8(%ebx),%eax 110b1d: 89 45 10 mov %eax,0x10(%ebp) 110b20: 89 5d 0c mov %ebx,0xc(%ebp) 110b23: 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 ); } 110b26: 8d 65 f4 lea -0xc(%ebp),%esp 110b29: 5b pop %ebx 110b2a: 5e pop %esi 110b2b: 5f pop %edi 110b2c: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 110b2d: e9 6e 20 00 00 jmp 112ba0 <_CORE_message_queue_Insert_message> 110b32: 66 90 xchg %ax,%ax return; } #endif } if ( !wait ) { 110b34: 89 fb mov %edi,%ebx 110b36: 84 db test %bl,%bl 110b38: 75 16 jne 110b50 <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 110b3a: ff 75 e4 pushl -0x1c(%ebp) 110b3d: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 110b3e: 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 ); } 110b45: 8d 65 f4 lea -0xc(%ebp),%esp 110b48: 5b pop %ebx 110b49: 5e pop %esi 110b4a: 5f pop %edi 110b4b: c9 leave 110b4c: c3 ret 110b4d: 8d 76 00 lea 0x0(%esi),%esi 110b50: 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; 110b57: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 110b5a: 8b 5d dc mov -0x24(%ebp),%ebx 110b5d: 89 59 20 mov %ebx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 110b60: 8b 5d e0 mov -0x20(%ebp),%ebx 110b63: 89 59 2c mov %ebx,0x2c(%ecx) executing->Wait.return_argument = size_p; 110b66: 89 41 28 mov %eax,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 110b69: ff 75 e4 pushl -0x1c(%ebp) 110b6c: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 110b6d: c7 45 10 54 d5 10 00 movl $0x10d554,0x10(%ebp) 110b74: 8b 45 d8 mov -0x28(%ebp),%eax 110b77: 89 45 0c mov %eax,0xc(%ebp) 110b7a: 89 55 08 mov %edx,0x8(%ebp) } 110b7d: 8d 65 f4 lea -0xc(%ebp),%esp 110b80: 5b pop %ebx 110b81: 5e pop %esi 110b82: 5f pop %edi 110b83: 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 ); 110b84: e9 9f c6 ff ff jmp 10d228 <_Thread_queue_Enqueue_with_handler> 110b89: 8d 76 00 lea 0x0(%esi),%esi 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 ); 110b8c: 89 5d 0c mov %ebx,0xc(%ebp) 110b8f: 83 c2 68 add $0x68,%edx 110b92: 89 55 08 mov %edx,0x8(%ebp) } 110b95: 8d 65 f4 lea -0xc(%ebp),%esp 110b98: 5b pop %ebx 110b99: 5e pop %esi 110b9a: 5f pop %edi 110b9b: c9 leave 110b9c: e9 2f a9 ff ff jmp 10b4d0 <_Chain_Append> =============================================================================== 00110ba4 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 110ba4: 55 push %ebp 110ba5: 89 e5 mov %esp,%ebp 110ba7: 57 push %edi 110ba8: 56 push %esi 110ba9: 53 push %ebx 110baa: 83 ec 1c sub $0x1c,%esp 110bad: 8b 5d 08 mov 0x8(%ebp),%ebx 110bb0: 8b 75 0c mov 0xc(%ebp),%esi 110bb3: 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 ) { 110bb6: 8b 45 10 mov 0x10(%ebp),%eax 110bb9: 39 43 4c cmp %eax,0x4c(%ebx) 110bbc: 72 32 jb 110bf0 <_CORE_message_queue_Submit+0x4c> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 110bbe: 8b 43 48 mov 0x48(%ebx),%eax 110bc1: 85 c0 test %eax,%eax 110bc3: 74 3b je 110c00 <_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 < 110bc5: 39 43 44 cmp %eax,0x44(%ebx) 110bc8: 0f 87 ba 00 00 00 ja 110c88 <_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 ) { 110bce: 84 c9 test %cl,%cl 110bd0: 0f 84 ee 00 00 00 je 110cc4 <_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() ) { 110bd6: 8b 15 94 7d 12 00 mov 0x127d94,%edx 110bdc: 85 d2 test %edx,%edx 110bde: 74 60 je 110c40 <_CORE_message_queue_Submit+0x9c> return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; 110be0: 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 } 110be5: 8d 65 f4 lea -0xc(%ebp),%esp 110be8: 5b pop %ebx 110be9: 5e pop %esi 110bea: 5f pop %edi 110beb: c9 leave 110bec: c3 ret 110bed: 8d 76 00 lea 0x0(%esi),%esi { 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; 110bf0: 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 } 110bf5: 8d 65 f4 lea -0xc(%ebp),%esp 110bf8: 5b pop %ebx 110bf9: 5e pop %esi 110bfa: 5f pop %edi 110bfb: c9 leave 110bfc: c3 ret 110bfd: 8d 76 00 lea 0x0(%esi),%esi /* * 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 ); 110c00: 83 ec 0c sub $0xc,%esp 110c03: 53 push %ebx 110c04: 88 4d e4 mov %cl,-0x1c(%ebp) 110c07: e8 f4 c4 ff ff call 10d100 <_Thread_queue_Dequeue> 110c0c: 89 c2 mov %eax,%edx if ( the_thread ) { 110c0e: 83 c4 10 add $0x10,%esp 110c11: 85 c0 test %eax,%eax 110c13: 8a 4d e4 mov -0x1c(%ebp),%cl 110c16: 0f 84 b8 00 00 00 je 110cd4 <_CORE_message_queue_Submit+0x130> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 110c1c: 8b 40 2c mov 0x2c(%eax),%eax 110c1f: 89 c7 mov %eax,%edi 110c21: 8b 4d 10 mov 0x10(%ebp),%ecx 110c24: 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; 110c26: 8b 42 28 mov 0x28(%edx),%eax 110c29: 8b 4d 10 mov 0x10(%ebp),%ecx 110c2c: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 110c2e: 8b 45 1c mov 0x1c(%ebp),%eax 110c31: 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; 110c34: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 110c36: 8d 65 f4 lea -0xc(%ebp),%esp 110c39: 5b pop %ebx 110c3a: 5e pop %esi 110c3b: 5f pop %edi 110c3c: c9 leave 110c3d: c3 ret 110c3e: 66 90 xchg %ax,%ax * 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; 110c40: a1 98 7d 12 00 mov 0x127d98,%eax ISR_Level level; _ISR_Disable( level ); 110c45: 9c pushf 110c46: fa cli 110c47: 59 pop %ecx 110c48: 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; 110c4f: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 110c52: 8b 55 14 mov 0x14(%ebp),%edx 110c55: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 110c58: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 110c5b: 8b 55 10 mov 0x10(%ebp),%edx 110c5e: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 110c61: 8b 55 1c mov 0x1c(%ebp),%edx 110c64: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 110c67: 51 push %ecx 110c68: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 110c69: 50 push %eax 110c6a: 68 54 d5 10 00 push $0x10d554 110c6f: ff 75 24 pushl 0x24(%ebp) 110c72: 53 push %ebx 110c73: e8 b0 c5 ff ff call 10d228 <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 110c78: 83 c4 10 add $0x10,%esp 110c7b: b8 07 00 00 00 mov $0x7,%eax #endif } 110c80: 8d 65 f4 lea -0xc(%ebp),%esp 110c83: 5b pop %ebx 110c84: 5e pop %esi 110c85: 5f pop %edi 110c86: c9 leave 110c87: 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 ); 110c88: 83 ec 0c sub $0xc,%esp 110c8b: 8d 43 68 lea 0x68(%ebx),%eax 110c8e: 50 push %eax 110c8f: e8 78 a8 ff ff call 10b50c <_Chain_Get> 110c94: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 110c96: 8d 40 10 lea 0x10(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 110c99: 89 c7 mov %eax,%edi 110c9b: 8b 4d 10 mov 0x10(%ebp),%ecx 110c9e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 110ca0: 8b 4d 10 mov 0x10(%ebp),%ecx 110ca3: 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; 110ca6: 8b 45 1c mov 0x1c(%ebp),%eax 110ca9: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 110cac: 83 c4 0c add $0xc,%esp 110caf: 50 push %eax 110cb0: 52 push %edx 110cb1: 53 push %ebx 110cb2: e8 e9 1e 00 00 call 112ba0 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 110cb7: 83 c4 10 add $0x10,%esp 110cba: 31 c0 xor %eax,%eax 110cbc: e9 34 ff ff ff jmp 110bf5 <_CORE_message_queue_Submit+0x51> 110cc1: 8d 76 00 lea 0x0(%esi),%esi * 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; 110cc4: 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 } 110cc9: 8d 65 f4 lea -0xc(%ebp),%esp 110ccc: 5b pop %ebx 110ccd: 5e pop %esi 110cce: 5f pop %edi 110ccf: c9 leave 110cd0: c3 ret 110cd1: 8d 76 00 lea 0x0(%esi),%esi /* * 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 ) { 110cd4: 8b 43 48 mov 0x48(%ebx),%eax 110cd7: e9 e9 fe ff ff jmp 110bc5 <_CORE_message_queue_Submit+0x21> =============================================================================== 0010b53c <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10b53c: 55 push %ebp 10b53d: 89 e5 mov %esp,%ebp 10b53f: 57 push %edi 10b540: 56 push %esi 10b541: 53 push %ebx 10b542: 83 ec 0c sub $0xc,%esp 10b545: 8b 45 08 mov 0x8(%ebp),%eax 10b548: 8b 5d 0c mov 0xc(%ebp),%ebx 10b54b: 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; 10b54e: 8d 78 40 lea 0x40(%eax),%edi 10b551: b9 04 00 00 00 mov $0x4,%ecx 10b556: 89 de mov %ebx,%esi 10b558: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10b55a: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10b55d: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10b564: 85 d2 test %edx,%edx 10b566: 75 30 jne 10b598 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10b568: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10b56f: 8b 15 98 7d 12 00 mov 0x127d98,%edx 10b575: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10b578: 8b 4a 08 mov 0x8(%edx),%ecx 10b57b: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b57e: 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 ) || 10b581: 83 f9 02 cmp $0x2,%ecx 10b584: 74 05 je 10b58b <_CORE_mutex_Initialize+0x4f> 10b586: 83 f9 03 cmp $0x3,%ecx 10b589: 75 22 jne 10b5ad <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10b58b: 8b 48 4c mov 0x4c(%eax),%ecx 10b58e: 39 4a 14 cmp %ecx,0x14(%edx) 10b591: 72 41 jb 10b5d4 <_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++; 10b593: ff 42 1c incl 0x1c(%edx) 10b596: eb 15 jmp 10b5ad <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10b598: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10b59f: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10b5a6: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10b5ad: 6a 05 push $0x5 10b5af: 68 00 04 00 00 push $0x400 10b5b4: 31 d2 xor %edx,%edx 10b5b6: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10b5ba: 0f 95 c2 setne %dl 10b5bd: 52 push %edx 10b5be: 50 push %eax 10b5bf: e8 cc 1e 00 00 call 10d490 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10b5c4: 83 c4 10 add $0x10,%esp 10b5c7: 31 c0 xor %eax,%eax } 10b5c9: 8d 65 f4 lea -0xc(%ebp),%esp 10b5cc: 5b pop %ebx 10b5cd: 5e pop %esi 10b5ce: 5f pop %edi 10b5cf: c9 leave 10b5d0: c3 ret 10b5d1: 8d 76 00 lea 0x0(%esi),%esi 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; 10b5d4: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b5d9: 8d 65 f4 lea -0xc(%ebp),%esp 10b5dc: 5b pop %ebx 10b5dd: 5e pop %esi 10b5de: 5f pop %edi 10b5df: c9 leave 10b5e0: c3 ret =============================================================================== 0010b634 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10b634: 55 push %ebp 10b635: 89 e5 mov %esp,%ebp 10b637: 53 push %ebx 10b638: 83 ec 14 sub $0x14,%esp 10b63b: 8b 5d 08 mov 0x8(%ebp),%ebx 10b63e: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10b641: a1 ec 77 12 00 mov 0x1277ec,%eax 10b646: 85 c0 test %eax,%eax 10b648: 74 04 je 10b64e <_CORE_mutex_Seize+0x1a> 10b64a: 84 d2 test %dl,%dl 10b64c: 75 36 jne 10b684 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10b64e: 83 ec 08 sub $0x8,%esp 10b651: 8d 45 18 lea 0x18(%ebp),%eax 10b654: 50 push %eax 10b655: 53 push %ebx 10b656: 88 55 f4 mov %dl,-0xc(%ebp) 10b659: e8 7e 56 00 00 call 110cdc <_CORE_mutex_Seize_interrupt_trylock> 10b65e: 83 c4 10 add $0x10,%esp 10b661: 85 c0 test %eax,%eax 10b663: 8a 55 f4 mov -0xc(%ebp),%dl 10b666: 74 14 je 10b67c <_CORE_mutex_Seize+0x48> 10b668: 84 d2 test %dl,%dl 10b66a: 75 30 jne 10b69c <_CORE_mutex_Seize+0x68> 10b66c: ff 75 18 pushl 0x18(%ebp) 10b66f: 9d popf 10b670: a1 98 7d 12 00 mov 0x127d98,%eax 10b675: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10b67c: 8b 5d fc mov -0x4(%ebp),%ebx 10b67f: c9 leave 10b680: c3 ret 10b681: 8d 76 00 lea 0x0(%esi),%esi bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10b684: 83 3d 80 79 12 00 01 cmpl $0x1,0x127980 10b68b: 76 c1 jbe 10b64e <_CORE_mutex_Seize+0x1a> 10b68d: 53 push %ebx 10b68e: 6a 12 push $0x12 10b690: 6a 00 push $0x0 10b692: 6a 00 push $0x0 10b694: e8 1b 06 00 00 call 10bcb4 <_Internal_error_Occurred> 10b699: 8d 76 00 lea 0x0(%esi),%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; 10b69c: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10b6a3: a1 98 7d 12 00 mov 0x127d98,%eax 10b6a8: 89 58 44 mov %ebx,0x44(%eax) 10b6ab: 8b 55 0c mov 0xc(%ebp),%edx 10b6ae: 89 50 20 mov %edx,0x20(%eax) 10b6b1: a1 ec 77 12 00 mov 0x1277ec,%eax 10b6b6: 40 inc %eax 10b6b7: a3 ec 77 12 00 mov %eax,0x1277ec 10b6bc: ff 75 18 pushl 0x18(%ebp) 10b6bf: 9d popf 10b6c0: 83 ec 08 sub $0x8,%esp 10b6c3: ff 75 14 pushl 0x14(%ebp) 10b6c6: 53 push %ebx 10b6c7: e8 18 ff ff ff call 10b5e4 <_CORE_mutex_Seize_interrupt_blocking> 10b6cc: 83 c4 10 add $0x10,%esp } 10b6cf: 8b 5d fc mov -0x4(%ebp),%ebx 10b6d2: c9 leave 10b6d3: c3 ret =============================================================================== 00110cdc <_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 ) { 110cdc: 55 push %ebp 110cdd: 89 e5 mov %esp,%ebp 110cdf: 56 push %esi 110ce0: 53 push %ebx 110ce1: 8b 45 08 mov 0x8(%ebp),%eax 110ce4: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 110ce7: 8b 15 98 7d 12 00 mov 0x127d98,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 110ced: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110cf4: 8b 58 50 mov 0x50(%eax),%ebx 110cf7: 85 db test %ebx,%ebx 110cf9: 74 31 je 110d2c <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 110cfb: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 110d02: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110d05: 8b 5a 08 mov 0x8(%edx),%ebx 110d08: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 110d0b: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 110d12: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 110d15: 83 fb 02 cmp $0x2,%ebx 110d18: 74 26 je 110d40 <_CORE_mutex_Seize_interrupt_trylock+0x64> 110d1a: 83 fb 03 cmp $0x3,%ebx 110d1d: 74 3d je 110d5c <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 110d1f: ff 31 pushl (%ecx) 110d21: 9d popf return 0; 110d22: 31 c0 xor %eax,%eax 110d24: 8d 65 f8 lea -0x8(%ebp),%esp 110d27: 5b pop %ebx 110d28: 5e pop %esi 110d29: c9 leave 110d2a: c3 ret 110d2b: 90 nop /* * 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 ) ) { 110d2c: 3b 50 5c cmp 0x5c(%eax),%edx 110d2f: 74 17 je 110d48 <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 110d31: b8 01 00 00 00 mov $0x1,%eax 110d36: 8d 65 f8 lea -0x8(%ebp),%esp 110d39: 5b pop %ebx 110d3a: 5e pop %esi 110d3b: c9 leave 110d3c: c3 ret 110d3d: 8d 76 00 lea 0x0(%esi),%esi _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 110d40: ff 42 1c incl 0x1c(%edx) 110d43: eb da jmp 110d1f <_CORE_mutex_Seize_interrupt_trylock+0x43> 110d45: 8d 76 00 lea 0x0(%esi),%esi * 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 ) { 110d48: 8b 58 40 mov 0x40(%eax),%ebx 110d4b: 85 db test %ebx,%ebx 110d4d: 75 45 jne 110d94 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 110d4f: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 110d52: ff 31 pushl (%ecx) 110d54: 9d popf return 0; 110d55: 31 c0 xor %eax,%eax 110d57: eb dd jmp 110d36 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110d59: 8d 76 00 lea 0x0(%esi),%esi _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 110d5c: 8b 5a 1c mov 0x1c(%edx),%ebx 110d5f: 8d 73 01 lea 0x1(%ebx),%esi 110d62: 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 ) { 110d65: 8b 72 14 mov 0x14(%edx),%esi 110d68: 39 70 4c cmp %esi,0x4c(%eax) 110d6b: 74 6b je 110dd8 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 110d6d: 72 39 jb 110da8 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 110d6f: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 110d76: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 110d7d: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 110d84: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 110d87: ff 31 pushl (%ecx) 110d89: 9d popf return 0; 110d8a: 31 c0 xor %eax,%eax 110d8c: 8d 65 f8 lea -0x8(%ebp),%esp 110d8f: 5b pop %ebx 110d90: 5e pop %esi 110d91: c9 leave 110d92: c3 ret 110d93: 90 nop * 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 ) { 110d94: 4b dec %ebx 110d95: 75 9a jne 110d31 <_CORE_mutex_Seize_interrupt_trylock+0x55> the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; #if defined(RTEMS_POSIX_API) case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 110d97: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _ISR_Enable( *level_p ); 110d9e: ff 31 pushl (%ecx) 110da0: 9d popf return 0; 110da1: 31 c0 xor %eax,%eax 110da3: eb 91 jmp 110d36 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110da5: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110da8: 8b 15 ec 77 12 00 mov 0x1277ec,%edx 110dae: 42 inc %edx 110daf: 89 15 ec 77 12 00 mov %edx,0x1277ec return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 110db5: ff 31 pushl (%ecx) 110db7: 9d popf _Thread_Change_priority( 110db8: 52 push %edx 110db9: 6a 00 push $0x0 110dbb: ff 70 4c pushl 0x4c(%eax) 110dbe: ff 70 5c pushl 0x5c(%eax) 110dc1: e8 82 bb ff ff call 10c948 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 110dc6: e8 b5 bf ff ff call 10cd80 <_Thread_Enable_dispatch> 110dcb: 83 c4 10 add $0x10,%esp return 0; 110dce: 31 c0 xor %eax,%eax 110dd0: e9 61 ff ff ff jmp 110d36 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110dd5: 8d 76 00 lea 0x0(%esi),%esi Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 110dd8: ff 31 pushl (%ecx) 110dda: 9d popf return 0; 110ddb: 31 c0 xor %eax,%eax 110ddd: e9 54 ff ff ff jmp 110d36 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010b6d4 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10b6d4: 55 push %ebp 10b6d5: 89 e5 mov %esp,%ebp 10b6d7: 53 push %ebx 10b6d8: 83 ec 04 sub $0x4,%esp 10b6db: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10b6de: 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 ) { 10b6e1: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10b6e5: 74 15 je 10b6fc <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10b6e7: 3b 05 98 7d 12 00 cmp 0x127d98,%eax 10b6ed: 74 0d je 10b6fc <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10b6ef: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b6f4: 8b 5d fc mov -0x4(%ebp),%ebx 10b6f7: c9 leave 10b6f8: c3 ret 10b6f9: 8d 76 00 lea 0x0(%esi),%esi return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10b6fc: 8b 53 54 mov 0x54(%ebx),%edx 10b6ff: 85 d2 test %edx,%edx 10b701: 74 51 je 10b754 <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10b703: 4a dec %edx 10b704: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10b707: 85 d2 test %edx,%edx 10b709: 75 49 jne 10b754 <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b70b: 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 ) || 10b70e: 83 fa 02 cmp $0x2,%edx 10b711: 74 69 je 10b77c <_CORE_mutex_Surrender+0xa8> 10b713: 83 fa 03 cmp $0x3,%edx 10b716: 74 64 je 10b77c <_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; 10b718: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10b71f: 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 ) ) ) { 10b726: 83 ec 0c sub $0xc,%esp 10b729: 53 push %ebx 10b72a: e8 d1 19 00 00 call 10d100 <_Thread_queue_Dequeue> 10b72f: 83 c4 10 add $0x10,%esp 10b732: 85 c0 test %eax,%eax 10b734: 74 7a je 10b7b0 <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10b736: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10b739: 8b 50 08 mov 0x8(%eax),%edx 10b73c: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10b73f: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10b746: 8b 53 48 mov 0x48(%ebx),%edx 10b749: 83 fa 02 cmp $0x2,%edx 10b74c: 74 56 je 10b7a4 <_CORE_mutex_Surrender+0xd0> 10b74e: 83 fa 03 cmp $0x3,%edx 10b751: 74 09 je 10b75c <_CORE_mutex_Surrender+0x88> 10b753: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10b754: 31 c0 xor %eax,%eax } 10b756: 8b 5d fc mov -0x4(%ebp),%ebx 10b759: c9 leave 10b75a: c3 ret 10b75b: 90 nop _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++; 10b75c: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10b75f: 8b 53 4c mov 0x4c(%ebx),%edx 10b762: 3b 50 14 cmp 0x14(%eax),%edx 10b765: 73 ed jae 10b754 <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10b767: 51 push %ecx 10b768: 6a 00 push $0x0 10b76a: 52 push %edx 10b76b: 50 push %eax 10b76c: e8 d7 11 00 00 call 10c948 <_Thread_Change_priority> 10b771: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10b774: 31 c0 xor %eax,%eax 10b776: e9 79 ff ff ff jmp 10b6f4 <_CORE_mutex_Surrender+0x20> 10b77b: 90 nop _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10b77c: 8b 50 1c mov 0x1c(%eax),%edx 10b77f: 4a dec %edx 10b780: 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 && 10b783: 85 d2 test %edx,%edx 10b785: 75 91 jne 10b718 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10b787: 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 && 10b78a: 3b 50 14 cmp 0x14(%eax),%edx 10b78d: 74 89 je 10b718 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10b78f: 51 push %ecx 10b790: 6a 01 push $0x1 10b792: 52 push %edx 10b793: 50 push %eax 10b794: e8 af 11 00 00 call 10c948 <_Thread_Change_priority> 10b799: 83 c4 10 add $0x10,%esp 10b79c: e9 77 ff ff ff jmp 10b718 <_CORE_mutex_Surrender+0x44> 10b7a1: 8d 76 00 lea 0x0(%esi),%esi 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++; 10b7a4: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10b7a7: 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; 10b7a9: e9 46 ff ff ff jmp 10b6f4 <_CORE_mutex_Surrender+0x20> 10b7ae: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10b7b0: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10b7b7: 31 c0 xor %eax,%eax 10b7b9: e9 36 ff ff ff jmp 10b6f4 <_CORE_mutex_Surrender+0x20> =============================================================================== 00114d5c <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 114d5c: 55 push %ebp 114d5d: 89 e5 mov %esp,%ebp 114d5f: 57 push %edi 114d60: 56 push %esi 114d61: 53 push %ebx 114d62: 83 ec 1c sub $0x1c,%esp 114d65: 8b 45 08 mov 0x8(%ebp),%eax 114d68: 8b 7d 0c mov 0xc(%ebp),%edi 114d6b: 8b 75 14 mov 0x14(%ebp),%esi 114d6e: 8a 5d 10 mov 0x10(%ebp),%bl Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 114d71: 8b 15 98 cc 12 00 mov 0x12cc98,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 114d77: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 114d7e: 9c pushf 114d7f: fa cli 114d80: 8f 45 e4 popl -0x1c(%ebp) if ( the_semaphore->count != 0 ) { 114d83: 8b 48 48 mov 0x48(%eax),%ecx 114d86: 85 c9 test %ecx,%ecx 114d88: 75 46 jne 114dd0 <_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 ) { 114d8a: 84 db test %bl,%bl 114d8c: 75 16 jne 114da4 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 114d8e: ff 75 e4 pushl -0x1c(%ebp) 114d91: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 114d92: 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 ); } 114d99: 83 c4 1c add $0x1c,%esp 114d9c: 5b pop %ebx 114d9d: 5e pop %esi 114d9e: 5f pop %edi 114d9f: c9 leave 114da0: c3 ret 114da1: 8d 76 00 lea 0x0(%esi),%esi 114da4: 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; 114dab: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 114dae: 89 7a 20 mov %edi,0x20(%edx) _ISR_Enable( level ); 114db1: ff 75 e4 pushl -0x1c(%ebp) 114db4: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 114db5: c7 45 10 f0 0e 11 00 movl $0x110ef0,0x10(%ebp) 114dbc: 89 75 0c mov %esi,0xc(%ebp) 114dbf: 89 45 08 mov %eax,0x8(%ebp) } 114dc2: 83 c4 1c add $0x1c,%esp 114dc5: 5b pop %ebx 114dc6: 5e pop %esi 114dc7: 5f pop %edi 114dc8: 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 ); 114dc9: e9 f6 bd ff ff jmp 110bc4 <_Thread_queue_Enqueue_with_handler> 114dce: 66 90 xchg %ax,%ax executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 114dd0: 49 dec %ecx 114dd1: 89 48 48 mov %ecx,0x48(%eax) _ISR_Enable( level ); 114dd4: ff 75 e4 pushl -0x1c(%ebp) 114dd7: 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 ); } 114dd8: 83 c4 1c add $0x1c,%esp 114ddb: 5b pop %ebx 114ddc: 5e pop %esi 114ddd: 5f pop %edi 114dde: c9 leave 114ddf: c3 ret =============================================================================== 0010b80c <_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 ) { 10b80c: 55 push %ebp 10b80d: 89 e5 mov %esp,%ebp 10b80f: 53 push %ebx 10b810: 83 ec 10 sub $0x10,%esp 10b813: 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)) ) { 10b816: 53 push %ebx 10b817: e8 e4 18 00 00 call 10d100 <_Thread_queue_Dequeue> 10b81c: 83 c4 10 add $0x10,%esp 10b81f: 85 c0 test %eax,%eax 10b821: 74 09 je 10b82c <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b823: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10b825: 8b 5d fc mov -0x4(%ebp),%ebx 10b828: c9 leave 10b829: c3 ret 10b82a: 66 90 xchg %ax,%ax if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10b82c: 9c pushf 10b82d: fa cli 10b82e: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10b82f: 8b 43 48 mov 0x48(%ebx),%eax 10b832: 3b 43 40 cmp 0x40(%ebx),%eax 10b835: 72 0d jb 10b844 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10b837: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10b83c: 52 push %edx 10b83d: 9d popf } return status; } 10b83e: 8b 5d fc mov -0x4(%ebp),%ebx 10b841: c9 leave 10b842: c3 ret 10b843: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10b844: 40 inc %eax 10b845: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b848: 31 c0 xor %eax,%eax 10b84a: eb f0 jmp 10b83c <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010bc74 <_Chain_Get_with_empty_check>: bool _Chain_Get_with_empty_check( Chain_Control *chain, Chain_Node **node ) { 10bc74: 55 push %ebp 10bc75: 89 e5 mov %esp,%ebp 10bc77: 57 push %edi 10bc78: 56 push %esi 10bc79: 53 push %ebx 10bc7a: 8b 45 08 mov 0x8(%ebp),%eax 10bc7d: 8b 7d 0c mov 0xc(%ebp),%edi ISR_Level level; bool is_empty_now; _ISR_Disable( level ); 10bc80: 9c pushf 10bc81: fa cli 10bc82: 5e pop %esi Chain_Node **the_node ) { bool is_empty_now = true; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10bc83: 8d 58 04 lea 0x4(%eax),%ebx Chain_Node *old_first = head->next; 10bc86: 8b 10 mov (%eax),%edx if ( old_first != tail ) { 10bc88: 39 d3 cmp %edx,%ebx 10bc8a: 74 18 je 10bca4 <_Chain_Get_with_empty_check+0x30> Chain_Node *new_first = old_first->next; 10bc8c: 8b 0a mov (%edx),%ecx head->next = new_first; 10bc8e: 89 08 mov %ecx,(%eax) new_first->previous = head; 10bc90: 89 41 04 mov %eax,0x4(%ecx) *the_node = old_first; 10bc93: 89 17 mov %edx,(%edi) is_empty_now = new_first == tail; 10bc95: 39 cb cmp %ecx,%ebx 10bc97: 0f 94 c0 sete %al is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); _ISR_Enable( level ); 10bc9a: 56 push %esi 10bc9b: 9d popf return is_empty_now; } 10bc9c: 5b pop %ebx 10bc9d: 5e pop %esi 10bc9e: 5f pop %edi 10bc9f: c9 leave 10bca0: c3 ret 10bca1: 8d 76 00 lea 0x0(%esi),%esi } else *the_node = NULL; 10bca4: c7 07 00 00 00 00 movl $0x0,(%edi) RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected( Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; 10bcaa: b0 01 mov $0x1,%al 10bcac: eb ec jmp 10bc9a <_Chain_Get_with_empty_check+0x26> =============================================================================== 001108e8 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 1108e8: 55 push %ebp 1108e9: 89 e5 mov %esp,%ebp 1108eb: 57 push %edi 1108ec: 56 push %esi 1108ed: 53 push %ebx 1108ee: 83 ec 08 sub $0x8,%esp 1108f1: 8b 7d 08 mov 0x8(%ebp),%edi 1108f4: 8b 4d 10 mov 0x10(%ebp),%ecx 1108f7: 8b 75 14 mov 0x14(%ebp),%esi size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 1108fa: 8d 47 04 lea 0x4(%edi),%eax 1108fd: 89 45 f0 mov %eax,-0x10(%ebp) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 110900: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) while ( count-- ) { 110907: 85 c9 test %ecx,%ecx 110909: 74 35 je 110940 <_Chain_Initialize+0x58><== NEVER TAKEN 11090b: 49 dec %ecx 11090c: 89 4d ec mov %ecx,-0x14(%ebp) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; 11090f: 8b 45 0c mov 0xc(%ebp),%eax ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 110912: 89 fa mov %edi,%edx 110914: eb 07 jmp 11091d <_Chain_Initialize+0x35> 110916: 66 90 xchg %ax,%ax Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 110918: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 11091a: 89 d8 mov %ebx,%eax 11091c: 49 dec %ecx Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 11091d: 89 02 mov %eax,(%edx) next->previous = current; 11091f: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 110922: 8d 1c 30 lea (%eax,%esi,1),%ebx Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 110925: 85 c9 test %ecx,%ecx 110927: 75 ef jne 110918 <_Chain_Initialize+0x30> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 110929: 0f af 75 ec imul -0x14(%ebp),%esi 11092d: 03 75 0c add 0xc(%ebp),%esi current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 110930: 8b 45 f0 mov -0x10(%ebp),%eax 110933: 89 06 mov %eax,(%esi) tail->previous = current; 110935: 89 77 08 mov %esi,0x8(%edi) } 110938: 83 c4 08 add $0x8,%esp 11093b: 5b pop %ebx 11093c: 5e pop %esi 11093d: 5f pop %edi 11093e: c9 leave 11093f: c3 ret ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 110940: 89 fe mov %edi,%esi <== NOT EXECUTED 110942: eb ec jmp 110930 <_Chain_Initialize+0x48><== NOT EXECUTED =============================================================================== 0010a618 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10a618: 55 push %ebp 10a619: 89 e5 mov %esp,%ebp 10a61b: 57 push %edi 10a61c: 56 push %esi 10a61d: 53 push %ebx 10a61e: 83 ec 2c sub $0x2c,%esp 10a621: 8b 45 08 mov 0x8(%ebp),%eax 10a624: 8b 4d 0c mov 0xc(%ebp),%ecx 10a627: 8b 55 10 mov 0x10(%ebp),%edx 10a62a: 89 55 dc mov %edx,-0x24(%ebp) 10a62d: 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; 10a630: 8b 1d 98 7d 12 00 mov 0x127d98,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10a636: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10a63d: 8b b3 e8 00 00 00 mov 0xe8(%ebx),%esi _ISR_Disable( level ); 10a643: 9c pushf 10a644: fa cli 10a645: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10a648: 8b 16 mov (%esi),%edx 10a64a: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10a64d: 21 c2 and %eax,%edx 10a64f: 89 55 e4 mov %edx,-0x1c(%ebp) 10a652: 74 0d je 10a661 <_Event_Seize+0x49> 10a654: 39 d0 cmp %edx,%eax 10a656: 0f 84 84 00 00 00 je 10a6e0 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10a65c: f6 c1 02 test $0x2,%cl 10a65f: 75 7f jne 10a6e0 <_Event_Seize+0xc8> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10a661: f6 c1 01 test $0x1,%cl 10a664: 75 62 jne 10a6c8 <_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; 10a666: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10a669: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10a66c: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10a66f: c7 05 c8 81 12 00 01 movl $0x1,0x1281c8 10a676: 00 00 00 _ISR_Enable( level ); 10a679: ff 75 e0 pushl -0x20(%ebp) 10a67c: 9d popf if ( ticks ) { 10a67d: 8b 45 dc mov -0x24(%ebp),%eax 10a680: 85 c0 test %eax,%eax 10a682: 0f 85 80 00 00 00 jne 10a708 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10a688: 83 ec 08 sub $0x8,%esp 10a68b: 68 00 01 00 00 push $0x100 10a690: 53 push %ebx 10a691: e8 0e 2f 00 00 call 10d5a4 <_Thread_Set_state> _ISR_Disable( level ); 10a696: 9c pushf 10a697: fa cli 10a698: 5a pop %edx sync_state = _Event_Sync_state; 10a699: a1 c8 81 12 00 mov 0x1281c8,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10a69e: c7 05 c8 81 12 00 00 movl $0x0,0x1281c8 10a6a5: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10a6a8: 83 c4 10 add $0x10,%esp 10a6ab: 83 f8 01 cmp $0x1,%eax 10a6ae: 74 4c je 10a6fc <_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 ); 10a6b0: 89 55 10 mov %edx,0x10(%ebp) 10a6b3: 89 5d 0c mov %ebx,0xc(%ebp) 10a6b6: 89 45 08 mov %eax,0x8(%ebp) } 10a6b9: 8d 65 f4 lea -0xc(%ebp),%esp 10a6bc: 5b pop %ebx 10a6bd: 5e pop %esi 10a6be: 5f pop %edi 10a6bf: 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 ); 10a6c0: e9 37 22 00 00 jmp 10c8fc <_Thread_blocking_operation_Cancel> 10a6c5: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10a6c8: ff 75 e0 pushl -0x20(%ebp) 10a6cb: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10a6cc: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10a6d3: 8b 55 e4 mov -0x1c(%ebp),%edx 10a6d6: 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 ); } 10a6d8: 8d 65 f4 lea -0xc(%ebp),%esp 10a6db: 5b pop %ebx 10a6dc: 5e pop %esi 10a6dd: 5f pop %edi 10a6de: c9 leave 10a6df: 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) ); 10a6e0: 8b 45 e4 mov -0x1c(%ebp),%eax 10a6e3: f7 d0 not %eax 10a6e5: 23 45 d4 and -0x2c(%ebp),%eax 10a6e8: 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 ); 10a6ea: ff 75 e0 pushl -0x20(%ebp) 10a6ed: 9d popf *event_out = seized_events; 10a6ee: 8b 45 e4 mov -0x1c(%ebp),%eax 10a6f1: 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 ); } 10a6f3: 8d 65 f4 lea -0xc(%ebp),%esp 10a6f6: 5b pop %ebx 10a6f7: 5e pop %esi 10a6f8: 5f pop %edi 10a6f9: c9 leave 10a6fa: c3 ret 10a6fb: 90 nop _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 ); 10a6fc: 52 push %edx 10a6fd: 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 ); } 10a6fe: 8d 65 f4 lea -0xc(%ebp),%esp 10a701: 5b pop %ebx 10a702: 5e pop %esi 10a703: 5f pop %edi 10a704: c9 leave 10a705: c3 ret 10a706: 66 90 xchg %ax,%ax _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10a708: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a70b: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10a712: c7 43 64 bc a8 10 00 movl $0x10a8bc,0x64(%ebx) the_watchdog->id = id; 10a719: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10a71c: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a723: 8b 45 dc mov -0x24(%ebp),%eax 10a726: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a729: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10a72c: 8d 43 48 lea 0x48(%ebx),%eax 10a72f: 50 push %eax 10a730: 68 c0 78 12 00 push $0x1278c0 10a735: e8 ba 33 00 00 call 10daf4 <_Watchdog_Insert> 10a73a: 83 c4 10 add $0x10,%esp 10a73d: e9 46 ff ff ff jmp 10a688 <_Event_Seize+0x70> =============================================================================== 0010a798 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10a798: 55 push %ebp 10a799: 89 e5 mov %esp,%ebp 10a79b: 57 push %edi 10a79c: 56 push %esi 10a79d: 53 push %ebx 10a79e: 83 ec 2c sub $0x2c,%esp 10a7a1: 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 ]; 10a7a4: 8b 8b e8 00 00 00 mov 0xe8(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10a7aa: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10a7ad: 9c pushf 10a7ae: fa cli 10a7af: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10a7b2: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10a7b4: 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 ) ) { 10a7b7: 89 c6 mov %eax,%esi 10a7b9: 21 d6 and %edx,%esi 10a7bb: 89 75 e4 mov %esi,-0x1c(%ebp) 10a7be: 74 74 je 10a834 <_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() && 10a7c0: 8b 35 94 7d 12 00 mov 0x127d94,%esi 10a7c6: 85 f6 test %esi,%esi 10a7c8: 74 0c je 10a7d6 <_Event_Surrender+0x3e> 10a7ca: 3b 1d 98 7d 12 00 cmp 0x127d98,%ebx 10a7d0: 0f 84 96 00 00 00 je 10a86c <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10a7d6: f6 43 11 01 testb $0x1,0x11(%ebx) 10a7da: 74 4c je 10a828 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10a7dc: 3b 45 e4 cmp -0x1c(%ebp),%eax 10a7df: 74 05 je 10a7e6 <_Event_Surrender+0x4e> 10a7e1: 83 e7 02 and $0x2,%edi 10a7e4: 74 42 je 10a828 <_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) ); 10a7e6: 8b 45 e4 mov -0x1c(%ebp),%eax 10a7e9: f7 d0 not %eax 10a7eb: 21 d0 and %edx,%eax 10a7ed: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 10a7ef: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a7f6: 8b 43 28 mov 0x28(%ebx),%eax 10a7f9: 8b 75 e4 mov -0x1c(%ebp),%esi 10a7fc: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10a7fe: ff 75 d4 pushl -0x2c(%ebp) 10a801: 9d popf 10a802: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10a803: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10a807: 74 37 je 10a840 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10a809: ff 75 d4 pushl -0x2c(%ebp) 10a80c: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10a80d: 83 ec 08 sub $0x8,%esp 10a810: 68 f8 ff 03 10 push $0x1003fff8 10a815: 53 push %ebx 10a816: e8 01 22 00 00 call 10ca1c <_Thread_Clear_state> 10a81b: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10a81e: 8d 65 f4 lea -0xc(%ebp),%esp 10a821: 5b pop %ebx 10a822: 5e pop %esi 10a823: 5f pop %edi 10a824: c9 leave 10a825: c3 ret 10a826: 66 90 xchg %ax,%ax _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10a828: ff 75 d4 pushl -0x2c(%ebp) 10a82b: 9d popf } 10a82c: 8d 65 f4 lea -0xc(%ebp),%esp 10a82f: 5b pop %ebx 10a830: 5e pop %esi 10a831: 5f pop %edi 10a832: c9 leave 10a833: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10a834: ff 75 d4 pushl -0x2c(%ebp) 10a837: 9d popf } return; } } _ISR_Enable( level ); } 10a838: 8d 65 f4 lea -0xc(%ebp),%esp 10a83b: 5b pop %ebx 10a83c: 5e pop %esi 10a83d: 5f pop %edi 10a83e: c9 leave 10a83f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10a840: 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 ); 10a847: ff 75 d4 pushl -0x2c(%ebp) 10a84a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10a84b: 83 ec 0c sub $0xc,%esp 10a84e: 8d 43 48 lea 0x48(%ebx),%eax 10a851: 50 push %eax 10a852: e8 dd 33 00 00 call 10dc34 <_Watchdog_Remove> 10a857: 58 pop %eax 10a858: 5a pop %edx 10a859: 68 f8 ff 03 10 push $0x1003fff8 10a85e: 53 push %ebx 10a85f: e8 b8 21 00 00 call 10ca1c <_Thread_Clear_state> 10a864: 83 c4 10 add $0x10,%esp 10a867: eb c3 jmp 10a82c <_Event_Surrender+0x94> 10a869: 8d 76 00 lea 0x0(%esi),%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) || 10a86c: 8b 35 c8 81 12 00 mov 0x1281c8,%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 ) && 10a872: 83 fe 02 cmp $0x2,%esi 10a875: 74 0d je 10a884 <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10a877: 8b 35 c8 81 12 00 mov 0x1281c8,%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) || 10a87d: 4e dec %esi 10a87e: 0f 85 52 ff ff ff jne 10a7d6 <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10a884: 3b 45 e4 cmp -0x1c(%ebp),%eax 10a887: 74 05 je 10a88e <_Event_Surrender+0xf6> 10a889: 83 e7 02 and $0x2,%edi 10a88c: 74 22 je 10a8b0 <_Event_Surrender+0x118><== NEVER TAKEN 10a88e: 8b 45 e4 mov -0x1c(%ebp),%eax 10a891: f7 d0 not %eax 10a893: 21 d0 and %edx,%eax 10a895: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10a897: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a89e: 8b 43 28 mov 0x28(%ebx),%eax 10a8a1: 8b 55 e4 mov -0x1c(%ebp),%edx 10a8a4: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10a8a6: c7 05 c8 81 12 00 03 movl $0x3,0x1281c8 10a8ad: 00 00 00 } _ISR_Enable( level ); 10a8b0: ff 75 d4 pushl -0x2c(%ebp) 10a8b3: 9d popf return; 10a8b4: e9 73 ff ff ff jmp 10a82c <_Event_Surrender+0x94> =============================================================================== 0010a8bc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10a8bc: 55 push %ebp 10a8bd: 89 e5 mov %esp,%ebp 10a8bf: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10a8c2: 8d 45 f4 lea -0xc(%ebp),%eax 10a8c5: 50 push %eax 10a8c6: ff 75 08 pushl 0x8(%ebp) 10a8c9: e8 d6 24 00 00 call 10cda4 <_Thread_Get> switch ( location ) { 10a8ce: 83 c4 10 add $0x10,%esp 10a8d1: 8b 55 f4 mov -0xc(%ebp),%edx 10a8d4: 85 d2 test %edx,%edx 10a8d6: 75 37 jne 10a90f <_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 ); 10a8d8: 9c pushf 10a8d9: fa cli 10a8da: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10a8db: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10a8e2: 3b 05 98 7d 12 00 cmp 0x127d98,%eax 10a8e8: 74 2a je 10a914 <_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; 10a8ea: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10a8f1: 52 push %edx 10a8f2: 9d popf 10a8f3: 83 ec 08 sub $0x8,%esp 10a8f6: 68 f8 ff 03 10 push $0x1003fff8 10a8fb: 50 push %eax 10a8fc: e8 1b 21 00 00 call 10ca1c <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10a901: a1 ec 77 12 00 mov 0x1277ec,%eax 10a906: 48 dec %eax 10a907: a3 ec 77 12 00 mov %eax,0x1277ec _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10a90c: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a90f: c9 leave 10a910: c3 ret 10a911: 8d 76 00 lea 0x0(%esi),%esi } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10a914: 8b 0d c8 81 12 00 mov 0x1281c8,%ecx 10a91a: 49 dec %ecx 10a91b: 75 cd jne 10a8ea <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10a91d: c7 05 c8 81 12 00 02 movl $0x2,0x1281c8 10a924: 00 00 00 10a927: eb c1 jmp 10a8ea <_Event_Timeout+0x2e> =============================================================================== 00110e38 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110e38: 55 push %ebp 110e39: 89 e5 mov %esp,%ebp 110e3b: 57 push %edi 110e3c: 56 push %esi 110e3d: 53 push %ebx 110e3e: 83 ec 2c sub $0x2c,%esp 110e41: 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 110e44: 8d 47 04 lea 0x4(%edi),%eax 110e47: 89 45 dc mov %eax,-0x24(%ebp) - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 110e4a: 8b 55 08 mov 0x8(%ebp),%edx 110e4d: 8b 52 10 mov 0x10(%edx),%edx 110e50: 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 ) { 110e53: 39 c7 cmp %eax,%edi 110e55: 0f 87 69 01 00 00 ja 110fc4 <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 110e5b: 8b 5d 14 mov 0x14(%ebp),%ebx 110e5e: 85 db test %ebx,%ebx 110e60: 0f 85 56 01 00 00 jne 110fbc <_Heap_Allocate_aligned_with_boundary+0x184> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 110e66: 8b 45 08 mov 0x8(%ebp),%eax 110e69: 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 ) { 110e6c: 39 c8 cmp %ecx,%eax 110e6e: 0f 84 50 01 00 00 je 110fc4 <_Heap_Allocate_aligned_with_boundary+0x18c> 110e74: 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 110e7b: 8b 55 cc mov -0x34(%ebp),%edx 110e7e: 83 c2 07 add $0x7,%edx 110e81: 89 55 c8 mov %edx,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 110e84: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 110e8b: 29 7d d0 sub %edi,-0x30(%ebp) 110e8e: eb 1e jmp 110eae <_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; 110e90: 8d 59 08 lea 0x8(%ecx),%ebx } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 110e93: 85 db test %ebx,%ebx 110e95: 0f 85 f1 00 00 00 jne 110f8c <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN break; } block = block->next; 110e9b: 8b 49 08 mov 0x8(%ecx),%ecx 110e9e: 8b 45 e4 mov -0x1c(%ebp),%eax 110ea1: 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 ) { 110ea2: 39 4d 08 cmp %ecx,0x8(%ebp) 110ea5: 0f 84 25 01 00 00 je 110fd0 <_Heap_Allocate_aligned_with_boundary+0x198> 110eab: 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 ) { 110eae: 8b 59 04 mov 0x4(%ecx),%ebx 110eb1: 39 5d dc cmp %ebx,-0x24(%ebp) 110eb4: 73 e5 jae 110e9b <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 110eb6: 8b 55 10 mov 0x10(%ebp),%edx 110eb9: 85 d2 test %edx,%edx 110ebb: 74 d3 je 110e90 <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 110ebd: 8b 45 08 mov 0x8(%ebp),%eax 110ec0: 8b 40 14 mov 0x14(%eax),%eax 110ec3: 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; 110ec6: 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; 110ec9: 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; 110ecc: 8d 51 08 lea 0x8(%ecx),%edx 110ecf: 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; 110ed2: 8b 75 c8 mov -0x38(%ebp),%esi 110ed5: 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 110ed7: 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; 110ed9: 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); 110edc: 89 d8 mov %ebx,%eax 110ede: 31 d2 xor %edx,%edx 110ee0: f7 75 10 divl 0x10(%ebp) 110ee3: 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 ) { 110ee5: 39 de cmp %ebx,%esi 110ee7: 73 0b jae 110ef4 <_Heap_Allocate_aligned_with_boundary+0xbc> 110ee9: 89 f0 mov %esi,%eax 110eeb: 31 d2 xor %edx,%edx 110eed: f7 75 10 divl 0x10(%ebp) 110ef0: 89 f3 mov %esi,%ebx 110ef2: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 110ef4: 8b 45 14 mov 0x14(%ebp),%eax 110ef7: 85 c0 test %eax,%eax 110ef9: 74 5b je 110f56 <_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; 110efb: 8d 34 3b lea (%ebx,%edi,1),%esi 110efe: 89 f0 mov %esi,%eax 110f00: 31 d2 xor %edx,%edx 110f02: f7 75 14 divl 0x14(%ebp) 110f05: 89 f0 mov %esi,%eax 110f07: 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 ) { 110f09: 39 c3 cmp %eax,%ebx 110f0b: 73 49 jae 110f56 <_Heap_Allocate_aligned_with_boundary+0x11e> 110f0d: 39 c6 cmp %eax,%esi 110f0f: 76 45 jbe 110f56 <_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; 110f11: 8b 55 d4 mov -0x2c(%ebp),%edx 110f14: 01 fa add %edi,%edx 110f16: 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 ) { 110f19: 39 c2 cmp %eax,%edx 110f1b: 0f 87 7a ff ff ff ja 110e9b <_Heap_Allocate_aligned_with_boundary+0x63> 110f21: 89 ce mov %ecx,%esi 110f23: eb 10 jmp 110f35 <_Heap_Allocate_aligned_with_boundary+0xfd> 110f25: 8d 76 00 lea 0x0(%esi),%esi /* 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 ) { 110f28: 39 c1 cmp %eax,%ecx 110f2a: 76 28 jbe 110f54 <_Heap_Allocate_aligned_with_boundary+0x11c> if ( boundary_line < boundary_floor ) { 110f2c: 39 45 e0 cmp %eax,-0x20(%ebp) 110f2f: 0f 87 9f 00 00 00 ja 110fd4 <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110f35: 89 c3 mov %eax,%ebx 110f37: 29 fb sub %edi,%ebx 110f39: 89 d8 mov %ebx,%eax 110f3b: 31 d2 xor %edx,%edx 110f3d: f7 75 10 divl 0x10(%ebp) 110f40: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110f42: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110f45: 89 c8 mov %ecx,%eax 110f47: 31 d2 xor %edx,%edx 110f49: f7 75 14 divl 0x14(%ebp) 110f4c: 89 c8 mov %ecx,%eax 110f4e: 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 ) { 110f50: 39 c3 cmp %eax,%ebx 110f52: 72 d4 jb 110f28 <_Heap_Allocate_aligned_with_boundary+0xf0> 110f54: 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 ) { 110f56: 39 5d d4 cmp %ebx,-0x2c(%ebp) 110f59: 0f 87 3c ff ff ff ja 110e9b <_Heap_Allocate_aligned_with_boundary+0x63> 110f5f: be f8 ff ff ff mov $0xfffffff8,%esi 110f64: 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); 110f66: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 110f68: 89 d8 mov %ebx,%eax 110f6a: 31 d2 xor %edx,%edx 110f6c: 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; 110f6f: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 110f71: 39 75 d8 cmp %esi,-0x28(%ebp) 110f74: 0f 86 19 ff ff ff jbe 110e93 <_Heap_Allocate_aligned_with_boundary+0x5b> 110f7a: 85 f6 test %esi,%esi 110f7c: 0f 85 19 ff ff ff jne 110e9b <_Heap_Allocate_aligned_with_boundary+0x63> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 110f82: 85 db test %ebx,%ebx 110f84: 0f 84 11 ff ff ff je 110e9b <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 110f8a: 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; 110f8c: 8b 45 08 mov 0x8(%ebp),%eax 110f8f: ff 40 48 incl 0x48(%eax) stats->searches += search_count; 110f92: 8b 55 e4 mov -0x1c(%ebp),%edx 110f95: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 110f98: 57 push %edi 110f99: 53 push %ebx 110f9a: 51 push %ecx 110f9b: 50 push %eax 110f9c: e8 1f ac ff ff call 10bbc0 <_Heap_Block_allocate> 110fa1: 89 d8 mov %ebx,%eax 110fa3: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 110fa6: 8b 55 e4 mov -0x1c(%ebp),%edx 110fa9: 8b 4d 08 mov 0x8(%ebp),%ecx 110fac: 39 51 44 cmp %edx,0x44(%ecx) 110faf: 73 15 jae 110fc6 <_Heap_Allocate_aligned_with_boundary+0x18e> stats->max_search = search_count; 110fb1: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 110fb4: 8d 65 f4 lea -0xc(%ebp),%esp 110fb7: 5b pop %ebx 110fb8: 5e pop %esi 110fb9: 5f pop %edi 110fba: c9 leave 110fbb: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 110fbc: 3b 7d 14 cmp 0x14(%ebp),%edi 110fbf: 76 1a jbe 110fdb <_Heap_Allocate_aligned_with_boundary+0x1a3> 110fc1: 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 ) { 110fc4: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 110fc6: 8d 65 f4 lea -0xc(%ebp),%esp 110fc9: 5b pop %ebx 110fca: 5e pop %esi 110fcb: 5f pop %edi 110fcc: c9 leave 110fcd: c3 ret 110fce: 66 90 xchg %ax,%ax do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 110fd0: 31 c0 xor %eax,%eax 110fd2: eb d2 jmp 110fa6 <_Heap_Allocate_aligned_with_boundary+0x16e> 110fd4: 89 f1 mov %esi,%ecx <== NOT EXECUTED 110fd6: e9 c0 fe ff ff jmp 110e9b <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 110fdb: 8b 4d 10 mov 0x10(%ebp),%ecx 110fde: 85 c9 test %ecx,%ecx 110fe0: 0f 85 80 fe ff ff jne 110e66 <_Heap_Allocate_aligned_with_boundary+0x2e> alignment = page_size; 110fe6: 89 55 10 mov %edx,0x10(%ebp) 110fe9: e9 78 fe ff ff jmp 110e66 <_Heap_Allocate_aligned_with_boundary+0x2e> =============================================================================== 0011134c <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 11134c: 55 push %ebp 11134d: 89 e5 mov %esp,%ebp 11134f: 57 push %edi 111350: 56 push %esi 111351: 53 push %ebx 111352: 83 ec 4c sub $0x4c,%esp 111355: 8b 5d 08 mov 0x8(%ebp),%ebx 111358: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 11135b: 8b 43 20 mov 0x20(%ebx),%eax 11135e: 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; 111361: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 111368: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 11136f: 8b 53 10 mov 0x10(%ebx),%edx 111372: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 111375: 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; 111378: 8b 73 30 mov 0x30(%ebx),%esi 11137b: 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 ) { 11137e: 8b 55 0c mov 0xc(%ebp),%edx 111381: 01 ca add %ecx,%edx 111383: 89 55 cc mov %edx,-0x34(%ebp) 111386: 73 0c jae 111394 <_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; 111388: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 11138a: 8d 65 f4 lea -0xc(%ebp),%esp 11138d: 5b pop %ebx 11138e: 5e pop %esi 11138f: 5f pop %edi 111390: c9 leave 111391: c3 ret 111392: 66 90 xchg %ax,%ax if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 111394: 83 ec 08 sub $0x8,%esp 111397: 8d 55 e0 lea -0x20(%ebp),%edx 11139a: 52 push %edx 11139b: 8d 55 e4 lea -0x1c(%ebp),%edx 11139e: 52 push %edx 11139f: 50 push %eax 1113a0: ff 75 d4 pushl -0x2c(%ebp) 1113a3: 51 push %ecx 1113a4: ff 75 0c pushl 0xc(%ebp) 1113a7: e8 20 aa ff ff call 10bdcc <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 1113ac: 83 c4 20 add $0x20,%esp 1113af: 84 c0 test %al,%al 1113b1: 74 d5 je 111388 <_Heap_Extend+0x3c> 1113b3: 8b 7d d0 mov -0x30(%ebp),%edi 1113b6: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 1113bd: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 1113c4: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 1113cb: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 1113d2: 8b 75 cc mov -0x34(%ebp),%esi 1113d5: 89 5d b4 mov %ebx,-0x4c(%ebp) 1113d8: eb 30 jmp 11140a <_Heap_Extend+0xbe> 1113da: 66 90 xchg %ax,%ax return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 1113dc: 39 ce cmp %ecx,%esi 1113de: 73 03 jae 1113e3 <_Heap_Extend+0x97> 1113e0: 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); 1113e3: 8d 59 f8 lea -0x8(%ecx),%ebx 1113e6: 89 c8 mov %ecx,%eax 1113e8: 31 d2 xor %edx,%edx 1113ea: 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); 1113ed: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 1113ef: 3b 4d 0c cmp 0xc(%ebp),%ecx 1113f2: 74 3c je 111430 <_Heap_Extend+0xe4> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 1113f4: 39 4d 0c cmp %ecx,0xc(%ebp) 1113f7: 76 03 jbe 1113fc <_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 ) 1113f9: 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; 1113fc: 8b 7b 04 mov 0x4(%ebx),%edi 1113ff: 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); 111402: 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 ); 111405: 39 7d d0 cmp %edi,-0x30(%ebp) 111408: 74 39 je 111443 <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 11140a: 3b 7d d0 cmp -0x30(%ebp),%edi 11140d: 0f 84 39 01 00 00 je 11154c <_Heap_Extend+0x200> 111413: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 111415: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 111417: 39 4d 0c cmp %ecx,0xc(%ebp) 11141a: 73 08 jae 111424 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 11141c: 39 f0 cmp %esi,%eax 11141e: 0f 82 64 ff ff ff jb 111388 <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 111424: 39 f0 cmp %esi,%eax 111426: 75 b4 jne 1113dc <_Heap_Extend+0x90> 111428: 89 7d c4 mov %edi,-0x3c(%ebp) 11142b: eb b6 jmp 1113e3 <_Heap_Extend+0x97> 11142d: 8d 76 00 lea 0x0(%esi),%esi } 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; 111430: 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 ) 111432: 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; 111435: 8b 7b 04 mov 0x4(%ebx),%edi 111438: 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); 11143b: 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 ); 11143e: 39 7d d0 cmp %edi,-0x30(%ebp) 111441: 75 c7 jne 11140a <_Heap_Extend+0xbe> <== NEVER TAKEN 111443: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 111446: 8b 75 0c mov 0xc(%ebp),%esi 111449: 3b 73 18 cmp 0x18(%ebx),%esi 11144c: 0f 82 06 01 00 00 jb 111558 <_Heap_Extend+0x20c> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 111452: 8b 45 cc mov -0x34(%ebp),%eax 111455: 3b 43 1c cmp 0x1c(%ebx),%eax 111458: 76 03 jbe 11145d <_Heap_Extend+0x111> heap->area_end = extend_area_end; 11145a: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 11145d: 8b 55 e0 mov -0x20(%ebp),%edx 111460: 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 = 111463: 89 d1 mov %edx,%ecx 111465: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 111467: 8b 75 cc mov -0x34(%ebp),%esi 11146a: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 11146c: 89 ce mov %ecx,%esi 11146e: 83 ce 01 or $0x1,%esi 111471: 89 70 04 mov %esi,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 111474: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 111476: 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 ) { 11147d: 39 43 20 cmp %eax,0x20(%ebx) 111480: 0f 86 da 00 00 00 jbe 111560 <_Heap_Extend+0x214> heap->first_block = extend_first_block; 111486: 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 ) { 111489: 8b 75 c4 mov -0x3c(%ebp),%esi 11148c: 85 f6 test %esi,%esi 11148e: 0f 84 10 01 00 00 je 1115a4 <_Heap_Extend+0x258> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 111494: 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 ); 111497: 8b 4d 0c mov 0xc(%ebp),%ecx 11149a: 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; 11149d: 89 c8 mov %ecx,%eax 11149f: 31 d2 xor %edx,%edx 1114a1: f7 f6 div %esi if ( remainder != 0 ) { 1114a3: 85 d2 test %edx,%edx 1114a5: 0f 84 c9 00 00 00 je 111574 <_Heap_Extend+0x228> return value - remainder + alignment; 1114ab: 8d 04 31 lea (%ecx,%esi,1),%eax 1114ae: 29 d0 sub %edx,%eax uintptr_t const new_first_block_begin = 1114b0: 8d 50 f8 lea -0x8(%eax),%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; 1114b3: 8b 75 c4 mov -0x3c(%ebp),%esi 1114b6: 8b 0e mov (%esi),%ecx 1114b8: 89 48 f8 mov %ecx,-0x8(%eax) 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 = 1114bb: 89 f0 mov %esi,%eax 1114bd: 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; 1114bf: 83 c8 01 or $0x1,%eax 1114c2: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 1114c5: 89 d8 mov %ebx,%eax 1114c7: e8 64 fe ff ff call 111330 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 1114cc: 8b 45 c8 mov -0x38(%ebp),%eax 1114cf: 85 c0 test %eax,%eax 1114d1: 0f 84 a5 00 00 00 je 11157c <_Heap_Extend+0x230> ) { 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, 1114d7: 8b 4d cc mov -0x34(%ebp),%ecx 1114da: 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( 1114dd: 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); 1114e0: 89 c8 mov %ecx,%eax 1114e2: 31 d2 xor %edx,%edx 1114e4: f7 73 10 divl 0x10(%ebx) 1114e7: 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) 1114e9: 8b 55 c8 mov -0x38(%ebp),%edx 1114ec: 8b 42 04 mov 0x4(%edx),%eax 1114ef: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 1114f1: 83 c8 01 or $0x1,%eax 1114f4: 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; 1114f8: 8b 42 04 mov 0x4(%edx),%eax 1114fb: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 1114fe: 09 c8 or %ecx,%eax 111500: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 111503: 89 d8 mov %ebx,%eax 111505: e8 26 fe ff ff call 111330 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 11150a: 8b 75 c4 mov -0x3c(%ebp),%esi 11150d: 85 f6 test %esi,%esi 11150f: 0f 84 ab 00 00 00 je 1115c0 <_Heap_Extend+0x274> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 111515: 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( 111518: 8b 43 20 mov 0x20(%ebx),%eax 11151b: 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; 11151d: 8b 4a 04 mov 0x4(%edx),%ecx 111520: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 111523: 09 c8 or %ecx,%eax 111525: 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; 111528: 8b 43 30 mov 0x30(%ebx),%eax 11152b: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 11152e: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 111531: 8b 55 14 mov 0x14(%ebp),%edx 111534: 85 d2 test %edx,%edx 111536: 0f 84 a0 00 00 00 je 1115dc <_Heap_Extend+0x290> <== NEVER TAKEN *extended_size_ptr = extended_size; 11153c: 8b 55 14 mov 0x14(%ebp),%edx 11153f: 89 02 mov %eax,(%edx) return true; 111541: b0 01 mov $0x1,%al } 111543: 8d 65 f4 lea -0xc(%ebp),%esp 111546: 5b pop %ebx 111547: 5e pop %esi 111548: 5f pop %edi 111549: c9 leave 11154a: c3 ret 11154b: 90 nop return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 11154c: 8b 55 b4 mov -0x4c(%ebp),%edx 11154f: 8b 42 18 mov 0x18(%edx),%eax 111552: e9 be fe ff ff jmp 111415 <_Heap_Extend+0xc9> 111557: 90 nop 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; 111558: 89 73 18 mov %esi,0x18(%ebx) 11155b: e9 fd fe ff ff jmp 11145d <_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 ) { 111560: 39 53 24 cmp %edx,0x24(%ebx) 111563: 0f 83 20 ff ff ff jae 111489 <_Heap_Extend+0x13d> heap->last_block = extend_last_block; 111569: 89 53 24 mov %edx,0x24(%ebx) 11156c: e9 18 ff ff ff jmp 111489 <_Heap_Extend+0x13d> 111571: 8d 76 00 lea 0x0(%esi),%esi uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 111574: 89 c8 mov %ecx,%eax 111576: e9 35 ff ff ff jmp 1114b0 <_Heap_Extend+0x164> 11157b: 90 nop ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 11157c: 8b 7d bc mov -0x44(%ebp),%edi 11157f: 85 ff test %edi,%edi 111581: 74 87 je 11150a <_Heap_Extend+0x1be> _Heap_Link_above( 111583: 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 ); 111586: 8b 45 e4 mov -0x1c(%ebp),%eax 111589: 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; 11158c: 8b 75 bc mov -0x44(%ebp),%esi 11158f: 8b 56 04 mov 0x4(%esi),%edx 111592: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 111595: 09 d0 or %edx,%eax 111597: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11159a: 83 49 04 01 orl $0x1,0x4(%ecx) 11159e: e9 67 ff ff ff jmp 11150a <_Heap_Extend+0x1be> 1115a3: 90 nop 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 ) { 1115a4: 8b 4d b8 mov -0x48(%ebp),%ecx 1115a7: 85 c9 test %ecx,%ecx 1115a9: 0f 84 1d ff ff ff je 1114cc <_Heap_Extend+0x180> { 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; 1115af: 8b 45 b8 mov -0x48(%ebp),%eax 1115b2: 29 d0 sub %edx,%eax 1115b4: 83 c8 01 or $0x1,%eax 1115b7: 89 42 04 mov %eax,0x4(%edx) 1115ba: e9 0d ff ff ff jmp 1114cc <_Heap_Extend+0x180> 1115bf: 90 nop extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 1115c0: 8b 4d c8 mov -0x38(%ebp),%ecx 1115c3: 85 c9 test %ecx,%ecx 1115c5: 0f 85 4a ff ff ff jne 111515 <_Heap_Extend+0x1c9> _Heap_Free_block( heap, extend_first_block ); 1115cb: 8b 55 e4 mov -0x1c(%ebp),%edx 1115ce: 89 d8 mov %ebx,%eax 1115d0: e8 5b fd ff ff call 111330 <_Heap_Free_block> 1115d5: e9 3b ff ff ff jmp 111515 <_Heap_Extend+0x1c9> 1115da: 66 90 xchg %ax,%ax stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 1115dc: b0 01 mov $0x1,%al <== NOT EXECUTED 1115de: e9 a7 fd ff ff jmp 11138a <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 00110ff0 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110ff0: 55 push %ebp 110ff1: 89 e5 mov %esp,%ebp 110ff3: 57 push %edi 110ff4: 56 push %esi 110ff5: 53 push %ebx 110ff6: 83 ec 10 sub $0x10,%esp 110ff9: 8b 4d 08 mov 0x8(%ebp),%ecx 110ffc: 8b 45 0c mov 0xc(%ebp),%eax /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 110fff: 85 c0 test %eax,%eax 111001: 0f 84 e9 00 00 00 je 1110f0 <_Heap_Free+0x100> 111007: 8d 58 f8 lea -0x8(%eax),%ebx 11100a: 31 d2 xor %edx,%edx 11100c: f7 71 10 divl 0x10(%ecx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11100f: 29 d3 sub %edx,%ebx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 111011: 8b 41 20 mov 0x20(%ecx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 111014: 39 c3 cmp %eax,%ebx 111016: 72 1c jb 111034 <_Heap_Free+0x44> 111018: 8b 71 24 mov 0x24(%ecx),%esi 11101b: 39 f3 cmp %esi,%ebx 11101d: 77 15 ja 111034 <_Heap_Free+0x44> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 11101f: 8b 53 04 mov 0x4(%ebx),%edx 111022: 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; 111025: 83 e2 fe and $0xfffffffe,%edx 111028: 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); 11102b: 8d 14 13 lea (%ebx,%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; 11102e: 39 d0 cmp %edx,%eax 111030: 76 0e jbe 111040 <_Heap_Free+0x50> <== ALWAYS TAKEN 111032: 66 90 xchg %ax,%ax /* 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 ); 111034: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 111036: 83 c4 10 add $0x10,%esp 111039: 5b pop %ebx 11103a: 5e pop %esi 11103b: 5f pop %edi 11103c: c9 leave 11103d: c3 ret 11103e: 66 90 xchg %ax,%ax 111040: 39 d6 cmp %edx,%esi 111042: 72 f0 jb 111034 <_Heap_Free+0x44> <== NEVER TAKEN 111044: 8b 7a 04 mov 0x4(%edx),%edi return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 111047: f7 c7 01 00 00 00 test $0x1,%edi 11104d: 74 e5 je 111034 <_Heap_Free+0x44> <== 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; 11104f: 83 e7 fe and $0xfffffffe,%edi 111052: 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 )); 111055: 39 d6 cmp %edx,%esi 111057: 0f 84 d3 00 00 00 je 111130 <_Heap_Free+0x140> return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 11105d: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 111062: 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 ) ) { 111066: f6 45 f0 01 testb $0x1,-0x10(%ebp) 11106a: 75 44 jne 1110b0 <_Heap_Free+0xc0> uintptr_t const prev_size = block->prev_size; 11106c: 8b 3b mov (%ebx),%edi 11106e: 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); 111071: 29 fb sub %edi,%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 111073: 39 d8 cmp %ebx,%eax 111075: 77 bd ja 111034 <_Heap_Free+0x44> <== NEVER TAKEN 111077: 39 de cmp %ebx,%esi 111079: 72 b9 jb 111034 <_Heap_Free+0x44> <== 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) ) { 11107b: f6 43 04 01 testb $0x1,0x4(%ebx) 11107f: 74 b3 je 111034 <_Heap_Free+0x44> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 111081: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 111085: 0f 84 b1 00 00 00 je 11113c <_Heap_Free+0x14c> uintptr_t const size = block_size + prev_size + next_block_size; 11108b: 8b 7d e4 mov -0x1c(%ebp),%edi 11108e: 03 7d ec add -0x14(%ebp),%edi 111091: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 111094: 8b 42 08 mov 0x8(%edx),%eax 111097: 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; 11109a: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 11109d: 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; 1110a0: ff 49 38 decl 0x38(%ecx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1110a3: 89 f8 mov %edi,%eax 1110a5: 83 c8 01 or $0x1,%eax 1110a8: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 1110ab: 89 3c 3b mov %edi,(%ebx,%edi,1) 1110ae: eb 29 jmp 1110d9 <_Heap_Free+0xe9> 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 */ 1110b0: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1110b4: 74 46 je 1110fc <_Heap_Free+0x10c> uintptr_t const size = block_size + next_block_size; 1110b6: 8b 7d e4 mov -0x1c(%ebp),%edi 1110b9: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1110bc: 8b 42 08 mov 0x8(%edx),%eax 1110bf: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 1110c2: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = prev; 1110c5: 89 53 0c mov %edx,0xc(%ebx) next->prev = new_block; 1110c8: 89 58 0c mov %ebx,0xc(%eax) prev->next = new_block; 1110cb: 89 5a 08 mov %ebx,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; 1110ce: 89 f8 mov %edi,%eax 1110d0: 83 c8 01 or $0x1,%eax 1110d3: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 1110d6: 89 3c 3b mov %edi,(%ebx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 1110d9: ff 49 40 decl 0x40(%ecx) ++stats->frees; 1110dc: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 1110df: 8b 55 ec mov -0x14(%ebp),%edx 1110e2: 01 51 30 add %edx,0x30(%ecx) return( true ); 1110e5: b0 01 mov $0x1,%al } 1110e7: 83 c4 10 add $0x10,%esp 1110ea: 5b pop %ebx 1110eb: 5e pop %esi 1110ec: 5f pop %edi 1110ed: c9 leave 1110ee: c3 ret 1110ef: 90 nop * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 1110f0: b0 01 mov $0x1,%al --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1110f2: 83 c4 10 add $0x10,%esp 1110f5: 5b pop %ebx 1110f6: 5e pop %esi 1110f7: 5f pop %edi 1110f8: c9 leave 1110f9: c3 ret 1110fa: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 1110fc: 8b 41 08 mov 0x8(%ecx),%eax new_block->next = next; 1110ff: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = block_before; 111102: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 111105: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 111108: 89 58 0c mov %ebx,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; 11110b: 8b 45 ec mov -0x14(%ebp),%eax 11110e: 83 c8 01 or $0x1,%eax 111111: 89 43 04 mov %eax,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 111114: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 111118: 8b 45 ec mov -0x14(%ebp),%eax 11111b: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 11111d: 8b 41 38 mov 0x38(%ecx),%eax 111120: 40 inc %eax 111121: 89 41 38 mov %eax,0x38(%ecx) if ( stats->max_free_blocks < stats->free_blocks ) { 111124: 3b 41 3c cmp 0x3c(%ecx),%eax 111127: 76 b0 jbe 1110d9 <_Heap_Free+0xe9> stats->max_free_blocks = stats->free_blocks; 111129: 89 41 3c mov %eax,0x3c(%ecx) 11112c: eb ab jmp 1110d9 <_Heap_Free+0xe9> 11112e: 66 90 xchg %ax,%ax 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 )); 111130: c6 45 eb 00 movb $0x0,-0x15(%ebp) 111134: e9 2d ff ff ff jmp 111066 <_Heap_Free+0x76> 111139: 8d 76 00 lea 0x0(%esi),%esi 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; 11113c: 8b 45 ec mov -0x14(%ebp),%eax 11113f: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111142: 89 c6 mov %eax,%esi 111144: 83 ce 01 or $0x1,%esi 111147: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 11114a: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 11114e: 89 02 mov %eax,(%edx) 111150: eb 87 jmp 1110d9 <_Heap_Free+0xe9> =============================================================================== 0010ba50 <_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 ) { 10ba50: 55 push %ebp 10ba51: 89 e5 mov %esp,%ebp 10ba53: 57 push %edi 10ba54: 56 push %esi 10ba55: 53 push %ebx 10ba56: 8b 4d 08 mov 0x8(%ebp),%ecx 10ba59: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10ba5c: 8d 34 0f lea (%edi,%ecx,1),%esi uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10ba5f: 8d 59 08 lea 0x8(%ecx),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10ba62: 89 d8 mov %ebx,%eax 10ba64: 31 d2 xor %edx,%edx 10ba66: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10ba69: 85 d2 test %edx,%edx 10ba6b: 74 05 je 10ba72 <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10ba6d: 03 5d 10 add 0x10(%ebp),%ebx 10ba70: 29 d3 sub %edx,%ebx _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 ( 10ba72: 39 f1 cmp %esi,%ecx 10ba74: 77 2e ja 10baa4 <_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); 10ba76: 8d 73 f8 lea -0x8(%ebx),%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 = 10ba79: 29 cb sub %ecx,%ebx Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead 10ba7b: 39 df cmp %ebx,%edi 10ba7d: 76 25 jbe 10baa4 <_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 ); 10ba7f: 29 df sub %ebx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10ba81: 89 f8 mov %edi,%eax 10ba83: 31 d2 xor %edx,%edx 10ba85: f7 75 10 divl 0x10(%ebp) 10ba88: 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 10ba8a: 39 7d 14 cmp %edi,0x14(%ebp) 10ba8d: 77 15 ja 10baa4 <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10ba8f: 8b 45 18 mov 0x18(%ebp),%eax 10ba92: 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); 10ba94: 01 f7 add %esi,%edi 10ba96: 8b 45 1c mov 0x1c(%ebp),%eax 10ba99: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10ba9b: b0 01 mov $0x1,%al } 10ba9d: 5b pop %ebx 10ba9e: 5e pop %esi 10ba9f: 5f pop %edi 10baa0: c9 leave 10baa1: c3 ret 10baa2: 66 90 xchg %ax,%ax heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size ) { /* Invalid area or area too small */ return false; 10baa4: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10baa6: 5b pop %ebx 10baa7: 5e pop %esi 10baa8: 5f pop %edi 10baa9: c9 leave 10baaa: c3 ret =============================================================================== 00114d74 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 114d74: 55 push %ebp 114d75: 89 e5 mov %esp,%ebp 114d77: 57 push %edi 114d78: 56 push %esi 114d79: 53 push %ebx 114d7a: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 114d7d: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 114d83: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 114d8a: 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; } } 114d91: 8b 45 08 mov 0x8(%ebp),%eax 114d94: 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); 114d97: 39 d0 cmp %edx,%eax 114d99: 74 31 je 114dcc <_Heap_Get_free_information+0x58> 114d9b: b9 01 00 00 00 mov $0x1,%ecx 114da0: 31 f6 xor %esi,%esi 114da2: 31 db xor %ebx,%ebx 114da4: eb 07 jmp 114dad <_Heap_Get_free_information+0x39> 114da6: 66 90 xchg %ax,%ax 114da8: 8b 77 04 mov 0x4(%edi),%esi 114dab: 89 c1 mov %eax,%ecx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 114dad: 8b 42 04 mov 0x4(%edx),%eax 114db0: 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; 114db3: 01 c3 add %eax,%ebx if ( info->largest < the_size ) 114db5: 39 f0 cmp %esi,%eax 114db7: 76 03 jbe 114dbc <_Heap_Get_free_information+0x48> info->largest = the_size; 114db9: 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) 114dbc: 8b 52 08 mov 0x8(%edx),%edx 114dbf: 8d 41 01 lea 0x1(%ecx),%eax info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 114dc2: 39 55 08 cmp %edx,0x8(%ebp) 114dc5: 75 e1 jne 114da8 <_Heap_Get_free_information+0x34> 114dc7: 89 0f mov %ecx,(%edi) 114dc9: 89 5f 08 mov %ebx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 114dcc: 5b pop %ebx 114dcd: 5e pop %esi 114dce: 5f pop %edi 114dcf: c9 leave 114dd0: c3 ret =============================================================================== 00111b0c <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 111b0c: 55 push %ebp 111b0d: 89 e5 mov %esp,%ebp 111b0f: 57 push %edi 111b10: 56 push %esi 111b11: 53 push %ebx 111b12: 83 ec 04 sub $0x4,%esp 111b15: 8b 45 08 mov 0x8(%ebp),%eax 111b18: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 111b1b: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 111b1e: 8b 40 24 mov 0x24(%eax),%eax 111b21: 89 45 f0 mov %eax,-0x10(%ebp) memset(the_info, 0, sizeof(*the_info)); 111b24: b9 18 00 00 00 mov $0x18,%ecx 111b29: 31 c0 xor %eax,%eax 111b2b: 89 df mov %ebx,%edi 111b2d: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 111b2f: 3b 55 f0 cmp -0x10(%ebp),%edx 111b32: 74 38 je 111b6c <_Heap_Get_information+0x60><== NEVER TAKEN 111b34: 8b 7a 04 mov 0x4(%edx),%edi 111b37: eb 18 jmp 111b51 <_Heap_Get_information+0x45> 111b39: 8d 76 00 lea 0x0(%esi),%esi 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; 111b3c: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 111b3f: ff 00 incl (%eax) info->total += the_size; 111b41: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 111b44: 39 48 04 cmp %ecx,0x4(%eax) 111b47: 73 03 jae 111b4c <_Heap_Get_information+0x40> info->largest = the_size; 111b49: 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 ) { 111b4c: 39 75 f0 cmp %esi,-0x10(%ebp) 111b4f: 74 1b je 111b6c <_Heap_Get_information+0x60> - 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; 111b51: 89 f9 mov %edi,%ecx 111b53: 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); 111b56: 8d 34 0a lea (%edx,%ecx,1),%esi 111b59: 89 f2 mov %esi,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 111b5b: 8b 7e 04 mov 0x4(%esi),%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) ) 111b5e: f7 c7 01 00 00 00 test $0x1,%edi 111b64: 75 d6 jne 111b3c <_Heap_Get_information+0x30> info = &the_info->Used; else info = &the_info->Free; 111b66: 89 d8 mov %ebx,%eax 111b68: eb d5 jmp 111b3f <_Heap_Get_information+0x33> 111b6a: 66 90 xchg %ax,%ax if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 111b6c: 58 pop %eax 111b6d: 5b pop %ebx 111b6e: 5e pop %esi 111b6f: 5f pop %edi 111b70: c9 leave 111b71: c3 ret =============================================================================== 0011f118 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11f118: 55 push %ebp 11f119: 89 e5 mov %esp,%ebp 11f11b: 57 push %edi 11f11c: 56 push %esi 11f11d: 53 push %ebx 11f11e: 83 ec 2c sub $0x2c,%esp 11f121: 8b 5d 08 mov 0x8(%ebp),%ebx 11f124: 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); 11f127: 8d 4e f8 lea -0x8(%esi),%ecx 11f12a: 89 f0 mov %esi,%eax 11f12c: 31 d2 xor %edx,%edx 11f12e: 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); 11f131: 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; 11f133: 8b 45 14 mov 0x14(%ebp),%eax 11f136: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11f13c: 8b 55 18 mov 0x18(%ebp),%edx 11f13f: 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; 11f145: 39 4b 20 cmp %ecx,0x20(%ebx) 11f148: 77 05 ja 11f14f <_Heap_Resize_block+0x37> 11f14a: 39 4b 24 cmp %ecx,0x24(%ebx) 11f14d: 73 0d jae 11f15c <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; 11f14f: b8 02 00 00 00 mov $0x2,%eax } 11f154: 8d 65 f4 lea -0xc(%ebp),%esp 11f157: 5b pop %ebx 11f158: 5e pop %esi 11f159: 5f pop %edi 11f15a: c9 leave 11f15b: 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; 11f15c: 8b 41 04 mov 0x4(%ecx),%eax 11f15f: 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; 11f162: 8d 3c 01 lea (%ecx,%eax,1),%edi 11f165: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS; 11f168: 89 fa mov %edi,%edx 11f16a: 29 f2 sub %esi,%edx 11f16c: 83 c2 04 add $0x4,%edx 11f16f: 89 55 e0 mov %edx,-0x20(%ebp) 11f172: 8b 57 04 mov 0x4(%edi),%edx 11f175: 83 e2 fe and $0xfffffffe,%edx 11f178: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11f17b: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11f180: 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; 11f184: 8b 55 e0 mov -0x20(%ebp),%edx 11f187: 8b 7d 14 mov 0x14(%ebp),%edi 11f18a: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11f18c: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11f190: 75 6e jne 11f200 <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11f192: 8b 55 e0 mov -0x20(%ebp),%edx 11f195: 39 55 10 cmp %edx,0x10(%ebp) 11f198: 77 79 ja 11f213 <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11f19a: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11f19e: 74 31 je 11f1d1 <_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; 11f1a0: 8b 79 04 mov 0x4(%ecx),%edi 11f1a3: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11f1a6: 09 c7 or %eax,%edi 11f1a8: 89 79 04 mov %edi,0x4(%ecx) old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; } 11f1ab: 8b 7d d4 mov -0x2c(%ebp),%edi 11f1ae: 8b 7f 08 mov 0x8(%edi),%edi 11f1b1: 89 7d e4 mov %edi,-0x1c(%ebp) 11f1b4: 8b 55 d4 mov -0x2c(%ebp),%edx 11f1b7: 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; 11f1ba: 8b 55 e4 mov -0x1c(%ebp),%edx 11f1bd: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11f1c0: 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; 11f1c3: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11f1c8: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11f1cb: 8b 7d d0 mov -0x30(%ebp),%edi 11f1ce: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11f1d1: ff 75 10 pushl 0x10(%ebp) 11f1d4: 56 push %esi 11f1d5: 51 push %ecx 11f1d6: 53 push %ebx 11f1d7: e8 e4 c9 fe ff call 10bbc0 <_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; 11f1dc: 8b 50 04 mov 0x4(%eax),%edx 11f1df: 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; 11f1e2: 29 f0 sub %esi,%eax 11f1e4: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11f1e8: 8b 55 18 mov 0x18(%ebp),%edx 11f1eb: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11f1ed: ff 43 54 incl 0x54(%ebx) 11f1f0: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11f1f3: 31 c0 xor %eax,%eax old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; } 11f1f5: 8d 65 f4 lea -0xc(%ebp),%esp 11f1f8: 5b pop %ebx 11f1f9: 5e pop %esi 11f1fa: 5f pop %edi 11f1fb: c9 leave 11f1fc: c3 ret 11f1fd: 8d 76 00 lea 0x0(%esi),%esi _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11f200: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11f203: 8b 7d d0 mov -0x30(%ebp),%edi 11f206: 01 fa add %edi,%edx 11f208: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11f20b: 8b 55 e0 mov -0x20(%ebp),%edx 11f20e: 39 55 10 cmp %edx,0x10(%ebp) 11f211: 76 87 jbe 11f19a <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11f213: b8 01 00 00 00 mov $0x1,%eax old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; } 11f218: 8d 65 f4 lea -0xc(%ebp),%esp 11f21b: 5b pop %ebx 11f21c: 5e pop %esi 11f21d: 5f pop %edi 11f21e: c9 leave 11f21f: c3 ret =============================================================================== 0011f220 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11f220: 55 push %ebp 11f221: 89 e5 mov %esp,%ebp 11f223: 56 push %esi 11f224: 53 push %ebx 11f225: 8b 5d 08 mov 0x8(%ebp),%ebx 11f228: 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); 11f22b: 8d 4e f8 lea -0x8(%esi),%ecx 11f22e: 89 f0 mov %esi,%eax 11f230: 31 d2 xor %edx,%edx 11f232: 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); 11f235: 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 11f237: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11f23a: 39 c1 cmp %eax,%ecx 11f23c: 72 07 jb 11f245 <_Heap_Size_of_alloc_area+0x25> 11f23e: 8b 53 24 mov 0x24(%ebx),%edx 11f241: 39 d1 cmp %edx,%ecx 11f243: 76 07 jbe 11f24c <_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; 11f245: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 11f247: 5b pop %ebx 11f248: 5e pop %esi 11f249: c9 leave 11f24a: c3 ret 11f24b: 90 nop - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11f24c: 8b 59 04 mov 0x4(%ecx),%ebx 11f24f: 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); 11f252: 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; 11f254: 39 c8 cmp %ecx,%eax 11f256: 77 ed ja 11f245 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11f258: 39 ca cmp %ecx,%edx 11f25a: 72 e9 jb 11f245 <_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 ) 11f25c: f6 41 04 01 testb $0x1,0x4(%ecx) 11f260: 74 e3 je 11f245 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11f262: 29 f1 sub %esi,%ecx 11f264: 8d 51 04 lea 0x4(%ecx),%edx 11f267: 8b 45 10 mov 0x10(%ebp),%eax 11f26a: 89 10 mov %edx,(%eax) return true; 11f26c: b0 01 mov $0x1,%al } 11f26e: 5b pop %ebx 11f26f: 5e pop %esi 11f270: c9 leave 11f271: c3 ret =============================================================================== 0010c728 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10c728: 55 push %ebp 10c729: 89 e5 mov %esp,%ebp 10c72b: 57 push %edi 10c72c: 56 push %esi 10c72d: 53 push %ebx 10c72e: 83 ec 4c sub $0x4c,%esp 10c731: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10c734: 8b 43 10 mov 0x10(%ebx),%eax 10c737: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10c73a: 8b 53 14 mov 0x14(%ebx),%edx 10c73d: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10c740: 8b 43 20 mov 0x20(%ebx),%eax 10c743: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10c746: 8b 53 24 mov 0x24(%ebx),%edx 10c749: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10c74c: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10c750: 74 1a je 10c76c <_Heap_Walk+0x44> 10c752: c7 45 d8 e0 c6 10 00 movl $0x10c6e0,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10c759: 83 3d 40 9e 12 00 03 cmpl $0x3,0x129e40 10c760: 74 1a je 10c77c <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10c762: b0 01 mov $0x1,%al } 10c764: 8d 65 f4 lea -0xc(%ebp),%esp 10c767: 5b pop %ebx 10c768: 5e pop %esi 10c769: 5f pop %edi 10c76a: c9 leave 10c76b: 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; 10c76c: c7 45 d8 d8 c6 10 00 movl $0x10c6d8,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10c773: 83 3d 40 9e 12 00 03 cmpl $0x3,0x129e40 10c77a: 75 e6 jne 10c762 <_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)( 10c77c: 52 push %edx 10c77d: ff 73 0c pushl 0xc(%ebx) 10c780: ff 73 08 pushl 0x8(%ebx) 10c783: ff 75 cc pushl -0x34(%ebp) 10c786: ff 75 dc pushl -0x24(%ebp) 10c789: ff 73 1c pushl 0x1c(%ebx) 10c78c: ff 73 18 pushl 0x18(%ebx) 10c78f: ff 75 d0 pushl -0x30(%ebp) 10c792: ff 75 e0 pushl -0x20(%ebp) 10c795: 68 44 20 12 00 push $0x122044 10c79a: 6a 00 push $0x0 10c79c: ff 75 0c pushl 0xc(%ebp) 10c79f: 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 ) { 10c7a2: 83 c4 30 add $0x30,%esp 10c7a5: 8b 45 e0 mov -0x20(%ebp),%eax 10c7a8: 85 c0 test %eax,%eax 10c7aa: 74 70 je 10c81c <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10c7ac: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10c7b0: 75 72 jne 10c824 <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10c7b2: 8b 45 d0 mov -0x30(%ebp),%eax 10c7b5: 31 d2 xor %edx,%edx 10c7b7: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10c7ba: 85 d2 test %edx,%edx 10c7bc: 75 72 jne 10c830 <_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; 10c7be: 8b 45 dc mov -0x24(%ebp),%eax 10c7c1: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10c7c4: 31 d2 xor %edx,%edx 10c7c6: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10c7c9: 85 d2 test %edx,%edx 10c7cb: 75 6f jne 10c83c <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10c7cd: 8b 45 dc mov -0x24(%ebp),%eax 10c7d0: 8b 40 04 mov 0x4(%eax),%eax 10c7d3: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10c7d6: a8 01 test $0x1,%al 10c7d8: 0f 84 ce 02 00 00 je 10caac <_Heap_Walk+0x384> - 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; 10c7de: 8b 55 cc mov -0x34(%ebp),%edx 10c7e1: 8b 42 04 mov 0x4(%edx),%eax 10c7e4: 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); 10c7e7: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10c7e9: f6 40 04 01 testb $0x1,0x4(%eax) 10c7ed: 74 25 je 10c814 <_Heap_Walk+0xec> ); return false; } if ( 10c7ef: 39 45 dc cmp %eax,-0x24(%ebp) 10c7f2: 74 54 je 10c848 <_Heap_Walk+0x120> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10c7f4: 51 push %ecx 10c7f5: 68 60 21 12 00 push $0x122160 10c7fa: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10c7fc: 6a 01 push $0x1 10c7fe: ff 75 0c pushl 0xc(%ebp) 10c801: ff 55 d8 call *-0x28(%ebp) 10c804: 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; 10c807: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10c809: 8d 65 f4 lea -0xc(%ebp),%esp 10c80c: 5b pop %ebx 10c80d: 5e pop %esi 10c80e: 5f pop %edi 10c80f: c9 leave 10c810: c3 ret 10c811: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10c814: 53 push %ebx 10c815: 68 fa 1f 12 00 push $0x121ffa 10c81a: eb e0 jmp 10c7fc <_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" ); 10c81c: 57 push %edi 10c81d: 68 c9 1f 12 00 push $0x121fc9 10c822: eb d8 jmp 10c7fc <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10c824: ff 75 e0 pushl -0x20(%ebp) 10c827: 68 dc 1f 12 00 push $0x121fdc 10c82c: eb ce jmp 10c7fc <_Heap_Walk+0xd4> 10c82e: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10c830: ff 75 d0 pushl -0x30(%ebp) 10c833: 68 d8 20 12 00 push $0x1220d8 10c838: eb c2 jmp 10c7fc <_Heap_Walk+0xd4> 10c83a: 66 90 xchg %ax,%ax } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10c83c: ff 75 dc pushl -0x24(%ebp) 10c83f: 68 fc 20 12 00 push $0x1220fc 10c844: eb b6 jmp 10c7fc <_Heap_Walk+0xd4> 10c846: 66 90 xchg %ax,%ax int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10c848: 8b 43 10 mov 0x10(%ebx),%eax 10c84b: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10c84e: 8b 73 08 mov 0x8(%ebx),%esi 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 ) { 10c851: 39 f3 cmp %esi,%ebx 10c853: 74 65 je 10c8ba <_Heap_Walk+0x192> block = next_block; } while ( block != first_block ); return true; } 10c855: 8b 43 20 mov 0x20(%ebx),%eax 10c858: 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; 10c85b: 39 f0 cmp %esi,%eax 10c85d: 0f 87 55 02 00 00 ja 10cab8 <_Heap_Walk+0x390> <== NEVER TAKEN 10c863: 8b 7b 24 mov 0x24(%ebx),%edi 10c866: 39 f7 cmp %esi,%edi 10c868: 0f 82 4a 02 00 00 jb 10cab8 <_Heap_Walk+0x390> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c86e: 8d 46 08 lea 0x8(%esi),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10c871: 31 d2 xor %edx,%edx 10c873: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10c876: 85 d2 test %edx,%edx 10c878: 0f 85 71 02 00 00 jne 10caef <_Heap_Walk+0x3c7> <== 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; 10c87e: 8b 46 04 mov 0x4(%esi),%eax 10c881: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c884: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1) 10c889: 0f 85 6d 02 00 00 jne 10cafc <_Heap_Walk+0x3d4> <== NEVER TAKEN 10c88f: 89 da mov %ebx,%edx 10c891: 8d 76 00 lea 0x0(%esi),%esi ); return false; } if ( free_block->prev != prev_block ) { 10c894: 8b 46 0c mov 0xc(%esi),%eax 10c897: 39 d0 cmp %edx,%eax 10c899: 0f 85 6a 02 00 00 jne 10cb09 <_Heap_Walk+0x3e1> return false; } prev_block = free_block; free_block = free_block->next; 10c89f: 8b 4e 08 mov 0x8(%esi),%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 ) { 10c8a2: 39 cb cmp %ecx,%ebx 10c8a4: 74 1a je 10c8c0 <_Heap_Walk+0x198> 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; 10c8a6: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10c8a9: 0f 86 7d 01 00 00 jbe 10ca2c <_Heap_Walk+0x304> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10c8af: 51 push %ecx 10c8b0: 68 90 21 12 00 push $0x122190 10c8b5: e9 42 ff ff ff jmp 10c7fc <_Heap_Walk+0xd4> 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 ) { 10c8ba: 8b 53 20 mov 0x20(%ebx),%edx 10c8bd: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c8c0: 8b 7d dc mov -0x24(%ebp),%edi 10c8c3: 8b 45 d4 mov -0x2c(%ebp),%eax 10c8c6: 66 90 xchg %ax,%ax - 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; 10c8c8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c8cb: 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); 10c8ce: 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; 10c8d1: 39 f0 cmp %esi,%eax 10c8d3: 76 23 jbe 10c8f8 <_Heap_Walk+0x1d0> <== 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)( 10c8d5: 83 ec 0c sub $0xc,%esp 10c8d8: 56 push %esi 10c8d9: 57 push %edi 10c8da: 68 14 22 12 00 push $0x122214 10c8df: 90 nop 10c8e0: 6a 01 push $0x1 10c8e2: ff 75 0c pushl 0xc(%ebp) 10c8e5: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10c8e8: 83 c4 20 add $0x20,%esp 10c8eb: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10c8ed: 8d 65 f4 lea -0xc(%ebp),%esp 10c8f0: 5b pop %ebx 10c8f1: 5e pop %esi 10c8f2: 5f pop %edi 10c8f3: c9 leave 10c8f4: c3 ret 10c8f5: 8d 76 00 lea 0x0(%esi),%esi 10c8f8: 39 73 24 cmp %esi,0x24(%ebx) 10c8fb: 72 d8 jb 10c8d5 <_Heap_Walk+0x1ad> 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; 10c8fd: 3b 7d cc cmp -0x34(%ebp),%edi 10c900: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10c904: 89 c8 mov %ecx,%eax 10c906: 31 d2 xor %edx,%edx 10c908: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10c90b: 85 d2 test %edx,%edx 10c90d: 74 0a je 10c919 <_Heap_Walk+0x1f1> 10c90f: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10c913: 0f 85 a6 01 00 00 jne 10cabf <_Heap_Walk+0x397> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10c919: 39 4d d0 cmp %ecx,-0x30(%ebp) 10c91c: 76 0a jbe 10c928 <_Heap_Walk+0x200> 10c91e: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10c922: 0f 85 a6 01 00 00 jne 10cace <_Heap_Walk+0x3a6> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10c928: 39 f7 cmp %esi,%edi 10c92a: 72 0a jb 10c936 <_Heap_Walk+0x20e> 10c92c: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10c930: 0f 85 aa 01 00 00 jne 10cae0 <_Heap_Walk+0x3b8> 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; 10c936: 8b 55 e4 mov -0x1c(%ebp),%edx 10c939: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10c93c: f6 46 04 01 testb $0x1,0x4(%esi) 10c940: 74 4e je 10c990 <_Heap_Walk+0x268> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10c942: 85 d2 test %edx,%edx 10c944: 74 2e je 10c974 <_Heap_Walk+0x24c> (*printer)( 10c946: 83 ec 0c sub $0xc,%esp 10c949: 51 push %ecx 10c94a: 57 push %edi 10c94b: 68 2b 20 12 00 push $0x12202b 10c950: 6a 00 push $0x0 10c952: ff 75 0c pushl 0xc(%ebp) 10c955: ff 55 d8 call *-0x28(%ebp) 10c958: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10c95b: 39 75 dc cmp %esi,-0x24(%ebp) 10c95e: 0f 84 fe fd ff ff je 10c762 <_Heap_Walk+0x3a> 10c964: 8b 56 04 mov 0x4(%esi),%edx 10c967: 89 55 e4 mov %edx,-0x1c(%ebp) 10c96a: 8b 43 20 mov 0x20(%ebx),%eax 10c96d: 89 f7 mov %esi,%edi 10c96f: e9 54 ff ff ff jmp 10c8c8 <_Heap_Walk+0x1a0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10c974: 83 ec 08 sub $0x8,%esp 10c977: ff 37 pushl (%edi) 10c979: 51 push %ecx 10c97a: 57 push %edi 10c97b: 68 78 23 12 00 push $0x122378 10c980: 6a 00 push $0x0 10c982: ff 75 0c pushl 0xc(%ebp) 10c985: ff 55 d8 call *-0x28(%ebp) 10c988: 83 c4 20 add $0x20,%esp 10c98b: eb ce jmp 10c95b <_Heap_Walk+0x233> 10c98d: 8d 76 00 lea 0x0(%esi),%esi block = next_block; } while ( block != first_block ); return true; } 10c990: 8b 43 08 mov 0x8(%ebx),%eax 10c993: 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 ? 10c996: 8b 47 08 mov 0x8(%edi),%eax 10c999: 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)( 10c99c: 39 43 0c cmp %eax,0xc(%ebx) 10c99f: 0f 84 cb 00 00 00 je 10ca70 <_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)" : "") 10c9a5: 39 c3 cmp %eax,%ebx 10c9a7: 0f 84 db 00 00 00 je 10ca88 <_Heap_Walk+0x360> 10c9ad: c7 45 c8 c9 1e 12 00 movl $0x121ec9,-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 ? 10c9b4: 8b 47 0c mov 0xc(%edi),%eax 10c9b7: 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)( 10c9ba: 39 45 b4 cmp %eax,-0x4c(%ebp) 10c9bd: 0f 84 b9 00 00 00 je 10ca7c <_Heap_Walk+0x354> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10c9c3: 39 c3 cmp %eax,%ebx 10c9c5: 0f 84 c9 00 00 00 je 10ca94 <_Heap_Walk+0x36c> 10c9cb: b8 c9 1e 12 00 mov $0x121ec9,%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)( 10c9d0: 83 ec 0c sub $0xc,%esp 10c9d3: ff 75 c8 pushl -0x38(%ebp) 10c9d6: ff 75 e4 pushl -0x1c(%ebp) 10c9d9: 50 push %eax 10c9da: ff 75 d4 pushl -0x2c(%ebp) 10c9dd: 51 push %ecx 10c9de: 57 push %edi 10c9df: 68 d4 22 12 00 push $0x1222d4 10c9e4: 6a 00 push $0x0 10c9e6: ff 75 0c pushl 0xc(%ebp) 10c9e9: 89 55 c4 mov %edx,-0x3c(%ebp) 10c9ec: 89 4d c0 mov %ecx,-0x40(%ebp) 10c9ef: 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 ) { 10c9f2: 8b 06 mov (%esi),%eax 10c9f4: 83 c4 30 add $0x30,%esp 10c9f7: 8b 4d c0 mov -0x40(%ebp),%ecx 10c9fa: 39 c1 cmp %eax,%ecx 10c9fc: 8b 55 c4 mov -0x3c(%ebp),%edx 10c9ff: 75 5f jne 10ca60 <_Heap_Walk+0x338> ); return false; } if ( !prev_used ) { 10ca01: 85 d2 test %edx,%edx 10ca03: 0f 84 97 00 00 00 je 10caa0 <_Heap_Walk+0x378> block = next_block; } while ( block != first_block ); return true; } 10ca09: 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 ) { 10ca0c: 39 c3 cmp %eax,%ebx 10ca0e: 74 0f je 10ca1f <_Heap_Walk+0x2f7> <== NEVER TAKEN if ( free_block == block ) { 10ca10: 39 c7 cmp %eax,%edi 10ca12: 0f 84 43 ff ff ff je 10c95b <_Heap_Walk+0x233> return true; } free_block = free_block->next; 10ca18: 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 ) { 10ca1b: 39 c3 cmp %eax,%ebx 10ca1d: 75 f1 jne 10ca10 <_Heap_Walk+0x2e8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10ca1f: 57 push %edi 10ca20: 68 a0 23 12 00 push $0x1223a0 10ca25: e9 d2 fd ff ff jmp 10c7fc <_Heap_Walk+0xd4> 10ca2a: 66 90 xchg %ax,%ax 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; 10ca2c: 39 f9 cmp %edi,%ecx 10ca2e: 0f 87 7b fe ff ff ja 10c8af <_Heap_Walk+0x187> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10ca34: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10ca37: 31 d2 xor %edx,%edx 10ca39: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10ca3c: 85 d2 test %edx,%edx 10ca3e: 0f 85 ad 00 00 00 jne 10caf1 <_Heap_Walk+0x3c9> - 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; 10ca44: 8b 41 04 mov 0x4(%ecx),%eax 10ca47: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10ca4a: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10ca4f: 0f 85 a9 00 00 00 jne 10cafe <_Heap_Walk+0x3d6> 10ca55: 89 f2 mov %esi,%edx 10ca57: 89 ce mov %ecx,%esi 10ca59: e9 36 fe ff ff jmp 10c894 <_Heap_Walk+0x16c> 10ca5e: 66 90 xchg %ax,%ax " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10ca60: 52 push %edx 10ca61: 56 push %esi 10ca62: 50 push %eax 10ca63: 51 push %ecx 10ca64: 57 push %edi 10ca65: 68 0c 23 12 00 push $0x12230c 10ca6a: e9 71 fe ff ff jmp 10c8e0 <_Heap_Walk+0x1b8> 10ca6f: 90 nop 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)( 10ca70: c7 45 c8 96 1f 12 00 movl $0x121f96,-0x38(%ebp) 10ca77: e9 38 ff ff ff jmp 10c9b4 <_Heap_Walk+0x28c> 10ca7c: b8 af 1f 12 00 mov $0x121faf,%eax 10ca81: e9 4a ff ff ff jmp 10c9d0 <_Heap_Walk+0x2a8> 10ca86: 66 90 xchg %ax,%ax " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10ca88: c7 45 c8 a5 1f 12 00 movl $0x121fa5,-0x38(%ebp) 10ca8f: e9 20 ff ff ff jmp 10c9b4 <_Heap_Walk+0x28c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10ca94: b8 bf 1f 12 00 mov $0x121fbf,%eax 10ca99: e9 32 ff ff ff jmp 10c9d0 <_Heap_Walk+0x2a8> 10ca9e: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10caa0: 57 push %edi 10caa1: 68 48 23 12 00 push $0x122348 10caa6: e9 51 fd ff ff jmp 10c7fc <_Heap_Walk+0xd4> 10caab: 90 nop return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10caac: 56 push %esi 10caad: 68 30 21 12 00 push $0x122130 10cab2: e9 45 fd ff ff jmp 10c7fc <_Heap_Walk+0xd4> 10cab7: 90 nop 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; 10cab8: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10caba: e9 f0 fd ff ff jmp 10c8af <_Heap_Walk+0x187> <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10cabf: 83 ec 0c sub $0xc,%esp 10cac2: 51 push %ecx 10cac3: 57 push %edi 10cac4: 68 44 22 12 00 push $0x122244 10cac9: e9 12 fe ff ff jmp 10c8e0 <_Heap_Walk+0x1b8> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10cace: 83 ec 08 sub $0x8,%esp 10cad1: ff 75 d0 pushl -0x30(%ebp) 10cad4: 51 push %ecx 10cad5: 57 push %edi 10cad6: 68 74 22 12 00 push $0x122274 10cadb: e9 00 fe ff ff jmp 10c8e0 <_Heap_Walk+0x1b8> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10cae0: 83 ec 0c sub $0xc,%esp 10cae3: 56 push %esi 10cae4: 57 push %edi 10cae5: 68 a0 22 12 00 push $0x1222a0 10caea: e9 f1 fd ff ff jmp 10c8e0 <_Heap_Walk+0x1b8> ); return false; } if ( 10caef: 89 f1 mov %esi,%ecx <== NOT EXECUTED !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10caf1: 51 push %ecx 10caf2: 68 b0 21 12 00 push $0x1221b0 10caf7: e9 00 fd ff ff jmp 10c7fc <_Heap_Walk+0xd4> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10cafc: 89 f1 mov %esi,%ecx <== NOT EXECUTED (*printer)( 10cafe: 51 push %ecx 10caff: 68 0f 20 12 00 push $0x12200f 10cb04: e9 f3 fc ff ff jmp 10c7fc <_Heap_Walk+0xd4> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10cb09: 83 ec 0c sub $0xc,%esp 10cb0c: 50 push %eax 10cb0d: 56 push %esi 10cb0e: 68 e0 21 12 00 push $0x1221e0 10cb13: e9 c8 fd ff ff jmp 10c8e0 <_Heap_Walk+0x1b8> =============================================================================== 0010b298 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10b298: 55 push %ebp 10b299: 89 e5 mov %esp,%ebp 10b29b: 53 push %ebx 10b29c: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10b29f: 8b 0d 20 82 12 00 mov 0x128220,%ecx 10b2a5: 85 c9 test %ecx,%ecx 10b2a7: 74 1a je 10b2c3 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10b2a9: 31 db xor %ebx,%ebx 10b2ab: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10b2ac: 52 push %edx 10b2ad: 6a 00 push $0x0 10b2af: 6a 00 push $0x0 10b2b1: 53 push %ebx 10b2b2: e8 f1 55 00 00 call 1108a8 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10b2b7: 43 inc %ebx 10b2b8: 83 c4 10 add $0x10,%esp 10b2bb: 39 1d 20 82 12 00 cmp %ebx,0x128220 10b2c1: 77 e9 ja 10b2ac <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10b2c3: 8b 5d fc mov -0x4(%ebp),%ebx 10b2c6: c9 leave 10b2c7: c3 ret =============================================================================== 0010b200 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10b200: 55 push %ebp 10b201: 89 e5 mov %esp,%ebp 10b203: 57 push %edi 10b204: 56 push %esi 10b205: 53 push %ebx 10b206: 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; 10b209: 8b 1d 94 35 12 00 mov 0x123594,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10b20f: a1 90 35 12 00 mov 0x123590,%eax 10b214: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10b217: 8b 35 8c 35 12 00 mov 0x12358c,%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 ) 10b21d: 39 f0 cmp %esi,%eax 10b21f: 73 5f jae 10b280 <_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( 10b221: 8d 0c 76 lea (%esi,%esi,2),%ecx 10b224: c1 e1 03 shl $0x3,%ecx 10b227: 83 ec 0c sub $0xc,%esp 10b22a: 51 push %ecx 10b22b: 89 4d dc mov %ecx,-0x24(%ebp) 10b22e: e8 5d 2b 00 00 call 10dd90 <_Workspace_Allocate_or_fatal_error> 10b233: 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 *) 10b235: a3 24 82 12 00 mov %eax,0x128224 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10b23a: 89 35 20 82 12 00 mov %esi,0x128220 memset( 10b240: 31 c0 xor %eax,%eax 10b242: 8b 4d dc mov -0x24(%ebp),%ecx 10b245: 89 d7 mov %edx,%edi 10b247: 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++ ) 10b249: 83 c4 10 add $0x10,%esp 10b24c: 8b 45 e4 mov -0x1c(%ebp),%eax 10b24f: 85 c0 test %eax,%eax 10b251: 74 25 je 10b278 <_IO_Manager_initialization+0x78><== NEVER TAKEN 10b253: a1 24 82 12 00 mov 0x128224,%eax 10b258: 89 45 e0 mov %eax,-0x20(%ebp) 10b25b: 31 c0 xor %eax,%eax 10b25d: 31 d2 xor %edx,%edx 10b25f: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10b260: 8b 7d e0 mov -0x20(%ebp),%edi 10b263: 01 c7 add %eax,%edi 10b265: 8d 34 03 lea (%ebx,%eax,1),%esi 10b268: b9 06 00 00 00 mov $0x6,%ecx 10b26d: 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++ ) 10b26f: 42 inc %edx 10b270: 83 c0 18 add $0x18,%eax 10b273: 39 55 e4 cmp %edx,-0x1c(%ebp) 10b276: 77 e8 ja 10b260 <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; } 10b278: 8d 65 f4 lea -0xc(%ebp),%esp 10b27b: 5b pop %ebx 10b27c: 5e pop %esi 10b27d: 5f pop %edi 10b27e: c9 leave 10b27f: 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; 10b280: 89 1d 24 82 12 00 mov %ebx,0x128224 _IO_Number_of_drivers = number_of_drivers; 10b286: 8b 45 e4 mov -0x1c(%ebp),%eax 10b289: a3 20 82 12 00 mov %eax,0x128220 sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } 10b28e: 8d 65 f4 lea -0xc(%ebp),%esp 10b291: 5b pop %ebx 10b292: 5e pop %esi 10b293: 5f pop %edi 10b294: c9 leave 10b295: c3 ret =============================================================================== 0010bcb4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10bcb4: 55 push %ebp 10bcb5: 89 e5 mov %esp,%ebp 10bcb7: 53 push %ebx 10bcb8: 83 ec 08 sub $0x8,%esp 10bcbb: 8b 45 08 mov 0x8(%ebp),%eax 10bcbe: 8b 55 0c mov 0xc(%ebp),%edx 10bcc1: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10bcc4: a3 94 78 12 00 mov %eax,0x127894 _Internal_errors_What_happened.is_internal = is_internal; 10bcc9: 88 15 98 78 12 00 mov %dl,0x127898 _Internal_errors_What_happened.the_error = the_error; 10bccf: 89 1d 9c 78 12 00 mov %ebx,0x12789c _User_extensions_Fatal( the_source, is_internal, the_error ); 10bcd5: 53 push %ebx 10bcd6: 0f b6 d2 movzbl %dl,%edx 10bcd9: 52 push %edx 10bcda: 50 push %eax 10bcdb: e8 b0 1c 00 00 call 10d990 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10bce0: c7 05 80 79 12 00 05 movl $0x5,0x127980 <== NOT EXECUTED 10bce7: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10bcea: fa cli <== NOT EXECUTED 10bceb: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10bced: f4 hlt <== NOT EXECUTED 10bcee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bcf1: eb fe jmp 10bcf1 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00111154 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 111154: 55 push %ebp 111155: 89 e5 mov %esp,%ebp 111157: 8b 45 08 mov 0x8(%ebp),%eax 11115a: 48 dec %eax 11115b: 83 f8 02 cmp $0x2,%eax 11115e: 77 0c ja 11116c <_Objects_API_maximum_class+0x18> 111160: 8b 04 85 80 16 12 00 mov 0x121680(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 111167: c9 leave 111168: c3 ret 111169: 8d 76 00 lea 0x0(%esi),%esi #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 11116c: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 11116e: c9 leave 11116f: c3 ret =============================================================================== 0010bd44 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10bd44: 55 push %ebp 10bd45: 89 e5 mov %esp,%ebp 10bd47: 56 push %esi 10bd48: 53 push %ebx 10bd49: 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 ) 10bd4c: 8b 43 18 mov 0x18(%ebx),%eax 10bd4f: 85 c0 test %eax,%eax 10bd51: 75 0d jne 10bd60 <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10bd53: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10bd55: 89 c8 mov %ecx,%eax 10bd57: 8d 65 f8 lea -0x8(%ebp),%esp 10bd5a: 5b pop %ebx 10bd5b: 5e pop %esi 10bd5c: c9 leave 10bd5d: c3 ret 10bd5e: 66 90 xchg %ax,%ax /* * 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 ); 10bd60: 8d 73 20 lea 0x20(%ebx),%esi 10bd63: 83 ec 0c sub $0xc,%esp 10bd66: 56 push %esi 10bd67: e8 a0 f7 ff ff call 10b50c <_Chain_Get> 10bd6c: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10bd6e: 83 c4 10 add $0x10,%esp 10bd71: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10bd75: 74 de je 10bd55 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10bd77: 85 c0 test %eax,%eax 10bd79: 74 29 je 10bda4 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10bd7b: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10bd7f: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10bd83: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10bd85: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10bd89: 31 d2 xor %edx,%edx 10bd8b: f7 f6 div %esi information->inactive_per_block[ block ]--; 10bd8d: c1 e0 02 shl $0x2,%eax 10bd90: 03 43 30 add 0x30(%ebx),%eax 10bd93: ff 08 decl (%eax) information->inactive--; 10bd95: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10bd99: 89 c8 mov %ecx,%eax 10bd9b: 8d 65 f8 lea -0x8(%ebp),%esp 10bd9e: 5b pop %ebx 10bd9f: 5e pop %esi 10bda0: c9 leave 10bda1: c3 ret 10bda2: 66 90 xchg %ax,%ax * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10bda4: 83 ec 0c sub $0xc,%esp 10bda7: 53 push %ebx 10bda8: e8 3b 00 00 00 call 10bde8 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10bdad: 89 34 24 mov %esi,(%esp) 10bdb0: e8 57 f7 ff ff call 10b50c <_Chain_Get> 10bdb5: 89 c1 mov %eax,%ecx } if ( the_object ) { 10bdb7: 83 c4 10 add $0x10,%esp 10bdba: 85 c0 test %eax,%eax 10bdbc: 74 97 je 10bd55 <_Objects_Allocate+0x11> 10bdbe: eb bb jmp 10bd7b <_Objects_Allocate+0x37> =============================================================================== 0010bde8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10bde8: 55 push %ebp 10bde9: 89 e5 mov %esp,%ebp 10bdeb: 57 push %edi 10bdec: 56 push %esi 10bded: 53 push %ebx 10bdee: 83 ec 4c sub $0x4c,%esp 10bdf1: 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 ); 10bdf4: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10bdf8: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10bdfb: 8b 4b 34 mov 0x34(%ebx),%ecx 10bdfe: 85 c9 test %ecx,%ecx 10be00: 0f 84 62 02 00 00 je 10c068 <_Objects_Extend_information+0x280> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10be06: 8b 73 10 mov 0x10(%ebx),%esi 10be09: 66 89 75 d0 mov %si,-0x30(%ebp) 10be0d: 8b 7b 14 mov 0x14(%ebx),%edi 10be10: 89 f0 mov %esi,%eax 10be12: 31 d2 xor %edx,%edx 10be14: 66 f7 f7 div %di 10be17: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10be1a: 85 f6 test %esi,%esi 10be1c: 0f 84 5f 02 00 00 je 10c081 <_Objects_Extend_information+0x299><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10be22: 8b 01 mov (%ecx),%eax 10be24: 85 c0 test %eax,%eax 10be26: 0f 84 67 02 00 00 je 10c093 <_Objects_Extend_information+0x2ab><== NEVER TAKEN 10be2c: 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 ); 10be2f: 8b 55 cc mov -0x34(%ebp),%edx 10be32: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10be35: 31 d2 xor %edx,%edx 10be37: 8b 45 d4 mov -0x2c(%ebp),%eax 10be3a: eb 0a jmp 10be46 <_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 ) { 10be3c: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10be40: 0f 84 c2 01 00 00 je 10c008 <_Objects_Extend_information+0x220> do_extend = false; break; } else index_base += information->allocation_size; 10be46: 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++ ) { 10be48: 42 inc %edx 10be49: 39 d6 cmp %edx,%esi 10be4b: 77 ef ja 10be3c <_Objects_Extend_information+0x54> 10be4d: 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; 10be50: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10be52: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10be56: 01 f8 add %edi,%eax 10be58: 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 ) { 10be5b: 3d ff ff 00 00 cmp $0xffff,%eax 10be60: 0f 87 9a 01 00 00 ja 10c000 <_Objects_Extend_information+0x218> /* * 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; 10be66: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10be6a: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10be6e: 0f 84 a0 01 00 00 je 10c014 <_Objects_Extend_information+0x22c> new_object_block = _Workspace_Allocate( block_size ); 10be74: 83 ec 0c sub $0xc,%esp 10be77: 57 push %edi 10be78: 89 55 b8 mov %edx,-0x48(%ebp) 10be7b: 88 4d b4 mov %cl,-0x4c(%ebp) 10be7e: e8 d9 1e 00 00 call 10dd5c <_Workspace_Allocate> 10be83: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10be86: 83 c4 10 add $0x10,%esp 10be89: 85 c0 test %eax,%eax 10be8b: 8b 55 b8 mov -0x48(%ebp),%edx 10be8e: 8a 4d b4 mov -0x4c(%ebp),%cl 10be91: 0f 84 69 01 00 00 je 10c000 <_Objects_Extend_information+0x218> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10be97: 84 c9 test %cl,%cl 10be99: 0f 84 e6 00 00 00 je 10bf85 <_Objects_Extend_information+0x19d> */ /* * Up the block count and maximum */ block_count++; 10be9f: 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 ); 10bea2: 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 *)) + 10bea5: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10bea8: 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 *)) + 10beab: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10beae: 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 ); 10beb1: 50 push %eax 10beb2: 89 55 b8 mov %edx,-0x48(%ebp) 10beb5: e8 a2 1e 00 00 call 10dd5c <_Workspace_Allocate> 10beba: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10bebd: 83 c4 10 add $0x10,%esp 10bec0: 85 c0 test %eax,%eax 10bec2: 8b 55 b8 mov -0x48(%ebp),%edx 10bec5: 0f 84 da 01 00 00 je 10c0a5 <_Objects_Extend_information+0x2bd> 10becb: 8b 45 c4 mov -0x3c(%ebp),%eax 10bece: 8d 04 b8 lea (%eax,%edi,4),%eax 10bed1: 89 45 bc mov %eax,-0x44(%ebp) 10bed4: 8b 4d c4 mov -0x3c(%ebp),%ecx 10bed7: 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 ) { 10beda: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10bede: 39 4d cc cmp %ecx,-0x34(%ebp) 10bee1: 0f 82 4d 01 00 00 jb 10c034 <_Objects_Extend_information+0x24c> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10bee7: 8b 4d cc mov -0x34(%ebp),%ecx 10beea: 85 c9 test %ecx,%ecx 10beec: 74 12 je 10bf00 <_Objects_Extend_information+0x118><== NEVER TAKEN 10beee: 31 c9 xor %ecx,%ecx 10bef0: 8b 7d cc mov -0x34(%ebp),%edi 10bef3: 90 nop local_table[ index ] = NULL; 10bef4: 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++ ) { 10befb: 41 inc %ecx 10befc: 39 cf cmp %ecx,%edi 10befe: 77 f4 ja 10bef4 <_Objects_Extend_information+0x10c><== NEVER TAKEN 10bf00: c1 e6 02 shl $0x2,%esi 10bf03: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10bf06: 8b 4d c4 mov -0x3c(%ebp),%ecx 10bf09: 8b 75 c0 mov -0x40(%ebp),%esi 10bf0c: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10bf13: 8b 4d bc mov -0x44(%ebp),%ecx 10bf16: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10bf1d: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10bf21: 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 ; 10bf24: 39 75 d4 cmp %esi,-0x2c(%ebp) 10bf27: 73 0f jae 10bf38 <_Objects_Extend_information+0x150><== NEVER TAKEN 10bf29: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10bf2c: 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++ ) { 10bf33: 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 ; 10bf34: 39 f1 cmp %esi,%ecx 10bf36: 72 f4 jb 10bf2c <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10bf38: 9c pushf 10bf39: fa cli 10bf3a: 5f pop %edi old_tables = information->object_blocks; 10bf3b: 8b 73 34 mov 0x34(%ebx),%esi information->object_blocks = object_blocks; 10bf3e: 8b 4d c4 mov -0x3c(%ebp),%ecx 10bf41: 89 4b 34 mov %ecx,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10bf44: 8b 4d bc mov -0x44(%ebp),%ecx 10bf47: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10bf4a: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10bf4d: 8b 45 d0 mov -0x30(%ebp),%eax 10bf50: 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) | 10bf54: 8b 0b mov (%ebx),%ecx 10bf56: c1 e1 18 shl $0x18,%ecx 10bf59: 81 c9 00 00 01 00 or $0x10000,%ecx information->maximum_id = _Objects_Build_id( 10bf5f: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10bf63: c1 e0 1b shl $0x1b,%eax 10bf66: 09 c1 or %eax,%ecx 10bf68: 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) | 10bf6c: 09 c1 or %eax,%ecx 10bf6e: 89 4b 0c mov %ecx,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10bf71: 57 push %edi 10bf72: 9d popf _Workspace_Free( old_tables ); 10bf73: 83 ec 0c sub $0xc,%esp 10bf76: 56 push %esi 10bf77: 89 55 b8 mov %edx,-0x48(%ebp) 10bf7a: e8 f9 1d 00 00 call 10dd78 <_Workspace_Free> 10bf7f: 83 c4 10 add $0x10,%esp 10bf82: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10bf85: c1 e2 02 shl $0x2,%edx 10bf88: 89 55 d0 mov %edx,-0x30(%ebp) 10bf8b: 8b 43 34 mov 0x34(%ebx),%eax 10bf8e: 8b 4d c8 mov -0x38(%ebp),%ecx 10bf91: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10bf94: ff 73 18 pushl 0x18(%ebx) 10bf97: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10bf9b: 50 push %eax 10bf9c: 51 push %ecx 10bf9d: 8d 7d dc lea -0x24(%ebp),%edi 10bfa0: 57 push %edi 10bfa1: e8 42 49 00 00 call 1108e8 <_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 ) { 10bfa6: 83 c4 10 add $0x10,%esp 10bfa9: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10bfac: 8d 43 20 lea 0x20(%ebx),%eax 10bfaf: 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 ) { 10bfb2: eb 29 jmp 10bfdd <_Objects_Extend_information+0x1f5> 10bfb4: 8b 13 mov (%ebx),%edx 10bfb6: c1 e2 18 shl $0x18,%edx 10bfb9: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10bfbf: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10bfc3: c1 e1 1b shl $0x1b,%ecx 10bfc6: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10bfc8: 09 f2 or %esi,%edx 10bfca: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10bfcd: 83 ec 08 sub $0x8,%esp 10bfd0: 50 push %eax 10bfd1: ff 75 d4 pushl -0x2c(%ebp) 10bfd4: e8 f7 f4 ff ff call 10b4d0 <_Chain_Append> index++; 10bfd9: 46 inc %esi 10bfda: 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 ) { 10bfdd: 83 ec 0c sub $0xc,%esp 10bfe0: 57 push %edi 10bfe1: e8 26 f5 ff ff call 10b50c <_Chain_Get> 10bfe6: 83 c4 10 add $0x10,%esp 10bfe9: 85 c0 test %eax,%eax 10bfeb: 75 c7 jne 10bfb4 <_Objects_Extend_information+0x1cc> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10bfed: 8b 43 14 mov 0x14(%ebx),%eax 10bff0: 8b 53 30 mov 0x30(%ebx),%edx 10bff3: 0f b7 c8 movzwl %ax,%ecx 10bff6: 8b 75 d0 mov -0x30(%ebp),%esi 10bff9: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10bffc: 66 01 43 2c add %ax,0x2c(%ebx) } 10c000: 8d 65 f4 lea -0xc(%ebp),%esp 10c003: 5b pop %ebx 10c004: 5e pop %esi 10c005: 5f pop %edi 10c006: c9 leave 10c007: c3 ret 10c008: 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; 10c00b: 31 c9 xor %ecx,%ecx 10c00d: e9 40 fe ff ff jmp 10be52 <_Objects_Extend_information+0x6a> 10c012: 66 90 xchg %ax,%ax 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 ); 10c014: 83 ec 0c sub $0xc,%esp 10c017: 57 push %edi 10c018: 89 55 b8 mov %edx,-0x48(%ebp) 10c01b: 88 4d b4 mov %cl,-0x4c(%ebp) 10c01e: e8 6d 1d 00 00 call 10dd90 <_Workspace_Allocate_or_fatal_error> 10c023: 89 45 c8 mov %eax,-0x38(%ebp) 10c026: 83 c4 10 add $0x10,%esp 10c029: 8a 4d b4 mov -0x4c(%ebp),%cl 10c02c: 8b 55 b8 mov -0x48(%ebp),%edx 10c02f: e9 63 fe ff ff jmp 10be97 <_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, 10c034: c1 e6 02 shl $0x2,%esi 10c037: 89 75 c0 mov %esi,-0x40(%ebp) 10c03a: 8b 73 34 mov 0x34(%ebx),%esi 10c03d: 8b 7d c4 mov -0x3c(%ebp),%edi 10c040: 8b 4d c0 mov -0x40(%ebp),%ecx 10c043: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10c045: 8b 73 30 mov 0x30(%ebx),%esi 10c048: 8b 7d bc mov -0x44(%ebp),%edi 10c04b: 8b 4d c0 mov -0x40(%ebp),%ecx 10c04e: 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 *) ); 10c050: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10c054: 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, 10c057: c1 e1 02 shl $0x2,%ecx 10c05a: 8b 73 1c mov 0x1c(%ebx),%esi 10c05d: 89 c7 mov %eax,%edi 10c05f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10c061: e9 a0 fe ff ff jmp 10bf06 <_Objects_Extend_information+0x11e> 10c066: 66 90 xchg %ax,%ax minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c068: 8b 53 10 mov 0x10(%ebx),%edx 10c06b: 66 89 55 d0 mov %dx,-0x30(%ebp) 10c06f: 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 ); 10c073: 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; 10c076: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10c078: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10c07a: 31 f6 xor %esi,%esi 10c07c: e9 d1 fd ff ff jmp 10be52 <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10c081: 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 ); 10c084: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10c087: 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; 10c08a: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10c08c: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c08e: e9 bf fd ff ff jmp 10be52 <_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 ) { 10c093: 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 ); 10c096: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10c099: 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; 10c09c: 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; 10c09e: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c0a0: e9 ad fd ff ff jmp 10be52 <_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 ); 10c0a5: 83 ec 0c sub $0xc,%esp 10c0a8: ff 75 c8 pushl -0x38(%ebp) 10c0ab: e8 c8 1c 00 00 call 10dd78 <_Workspace_Free> return; 10c0b0: 83 c4 10 add $0x10,%esp 10c0b3: e9 48 ff ff ff jmp 10c000 <_Objects_Extend_information+0x218> =============================================================================== 0010c148 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10c148: 55 push %ebp 10c149: 89 e5 mov %esp,%ebp 10c14b: 56 push %esi 10c14c: 53 push %ebx 10c14d: 8b 75 08 mov 0x8(%ebp),%esi 10c150: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10c153: 66 85 db test %bx,%bx 10c156: 75 0c jne 10c164 <_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; 10c158: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10c15a: 8d 65 f8 lea -0x8(%ebp),%esp 10c15d: 5b pop %ebx 10c15e: 5e pop %esi 10c15f: c9 leave 10c160: c3 ret 10c161: 8d 76 00 lea 0x0(%esi),%esi /* * 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 ); 10c164: 83 ec 0c sub $0xc,%esp 10c167: 56 push %esi 10c168: e8 e7 4f 00 00 call 111154 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10c16d: 83 c4 10 add $0x10,%esp 10c170: 85 c0 test %eax,%eax 10c172: 74 e4 je 10c158 <_Objects_Get_information+0x10> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10c174: 0f b7 db movzwl %bx,%ebx 10c177: 39 d8 cmp %ebx,%eax 10c179: 72 dd jb 10c158 <_Objects_Get_information+0x10> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10c17b: 8b 14 b5 c4 77 12 00 mov 0x1277c4(,%esi,4),%edx return NULL; 10c182: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10c184: 85 d2 test %edx,%edx 10c186: 74 d2 je 10c15a <_Objects_Get_information+0x12><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10c188: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10c18b: 85 c0 test %eax,%eax 10c18d: 74 cb je 10c15a <_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; 10c18f: 31 d2 xor %edx,%edx 10c191: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10c196: 0f 95 c2 setne %dl 10c199: f7 da neg %edx 10c19b: 21 d0 and %edx,%eax 10c19d: eb bb jmp 10c15a <_Objects_Get_information+0x12> =============================================================================== 0010c1a0 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10c1a0: 55 push %ebp 10c1a1: 89 e5 mov %esp,%ebp 10c1a3: 56 push %esi 10c1a4: 53 push %ebx 10c1a5: 8b 55 08 mov 0x8(%ebp),%edx 10c1a8: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10c1ab: b8 01 00 00 00 mov $0x1,%eax 10c1b0: 2b 42 08 sub 0x8(%edx),%eax 10c1b3: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10c1b6: 9c pushf 10c1b7: fa cli 10c1b8: 5e pop %esi if ( information->maximum >= index ) { 10c1b9: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10c1bd: 39 c8 cmp %ecx,%eax 10c1bf: 77 1b ja 10c1dc <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10c1c1: 8b 52 1c mov 0x1c(%edx),%edx 10c1c4: 8b 04 82 mov (%edx,%eax,4),%eax 10c1c7: 85 c0 test %eax,%eax 10c1c9: 74 21 je 10c1ec <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10c1cb: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10c1d1: 8b 55 14 mov 0x14(%ebp),%edx 10c1d4: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10c1d6: 5b pop %ebx 10c1d7: 5e pop %esi 10c1d8: c9 leave 10c1d9: c3 ret 10c1da: 66 90 xchg %ax,%ax } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10c1dc: 56 push %esi 10c1dd: 9d popf *location = OBJECTS_ERROR; 10c1de: 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; 10c1e4: 31 c0 xor %eax,%eax #endif } 10c1e6: 5b pop %ebx 10c1e7: 5e pop %esi 10c1e8: c9 leave 10c1e9: c3 ret 10c1ea: 66 90 xchg %ax,%ax if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10c1ec: 56 push %esi 10c1ed: 9d popf *location = OBJECTS_ERROR; 10c1ee: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10c1f4: eb e0 jmp 10c1d6 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010d8b4 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10d8b4: 55 push %ebp 10d8b5: 89 e5 mov %esp,%ebp 10d8b7: 57 push %edi 10d8b8: 56 push %esi 10d8b9: 53 push %ebx 10d8ba: 83 ec 2c sub $0x2c,%esp 10d8bd: 8b 55 08 mov 0x8(%ebp),%edx 10d8c0: 8b 75 0c mov 0xc(%ebp),%esi 10d8c3: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10d8c6: 85 f6 test %esi,%esi 10d8c8: 75 0e jne 10d8d8 <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10d8ca: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10d8cc: 89 d8 mov %ebx,%eax 10d8ce: 8d 65 f4 lea -0xc(%ebp),%esp 10d8d1: 5b pop %ebx 10d8d2: 5e pop %esi 10d8d3: 5f pop %edi 10d8d4: c9 leave 10d8d5: c3 ret 10d8d6: 66 90 xchg %ax,%ax Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10d8d8: 85 db test %ebx,%ebx 10d8da: 74 f0 je 10d8cc <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d8dc: 85 d2 test %edx,%edx 10d8de: 75 08 jne 10d8e8 <_Objects_Get_name_as_string+0x34> 10d8e0: a1 58 b9 12 00 mov 0x12b958,%eax 10d8e5: 8b 50 08 mov 0x8(%eax),%edx information = _Objects_Get_information_id( tmpId ); 10d8e8: 83 ec 0c sub $0xc,%esp 10d8eb: 52 push %edx 10d8ec: 89 55 cc mov %edx,-0x34(%ebp) 10d8ef: e8 f0 fe ff ff call 10d7e4 <_Objects_Get_information_id> 10d8f4: 89 c7 mov %eax,%edi if ( !information ) 10d8f6: 83 c4 10 add $0x10,%esp 10d8f9: 85 c0 test %eax,%eax 10d8fb: 8b 55 cc mov -0x34(%ebp),%edx 10d8fe: 74 ca je 10d8ca <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10d900: 51 push %ecx 10d901: 8d 45 e4 lea -0x1c(%ebp),%eax 10d904: 50 push %eax 10d905: 52 push %edx 10d906: 57 push %edi 10d907: e8 90 00 00 00 call 10d99c <_Objects_Get> switch ( location ) { 10d90c: 83 c4 10 add $0x10,%esp 10d90f: 8b 55 e4 mov -0x1c(%ebp),%edx 10d912: 85 d2 test %edx,%edx 10d914: 75 b4 jne 10d8ca <_Objects_Get_name_as_string+0x16> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10d916: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10d91a: 74 54 je 10d970 <_Objects_Get_name_as_string+0xbc> s = the_object->name.name_p; 10d91c: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 10d91f: 85 ff test %edi,%edi 10d921: 74 74 je 10d997 <_Objects_Get_name_as_string+0xe3> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10d923: 4e dec %esi 10d924: 89 75 d4 mov %esi,-0x2c(%ebp) 10d927: 74 6e je 10d997 <_Objects_Get_name_as_string+0xe3><== NEVER TAKEN 10d929: 8a 17 mov (%edi),%dl 10d92b: 84 d2 test %dl,%dl 10d92d: 74 68 je 10d997 <_Objects_Get_name_as_string+0xe3> 10d92f: 89 d9 mov %ebx,%ecx 10d931: 31 c0 xor %eax,%eax 10d933: 89 5d d0 mov %ebx,-0x30(%ebp) 10d936: eb 07 jmp 10d93f <_Objects_Get_name_as_string+0x8b> 10d938: 8a 14 07 mov (%edi,%eax,1),%dl 10d93b: 84 d2 test %dl,%dl 10d93d: 74 21 je 10d960 <_Objects_Get_name_as_string+0xac> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10d93f: 0f b6 da movzbl %dl,%ebx 10d942: 8b 35 88 8c 12 00 mov 0x128c88,%esi 10d948: 0f be 5c 1e 01 movsbl 0x1(%esi,%ebx,1),%ebx 10d94d: 81 e3 97 00 00 00 and $0x97,%ebx 10d953: 75 02 jne 10d957 <_Objects_Get_name_as_string+0xa3> 10d955: b2 2a mov $0x2a,%dl 10d957: 88 11 mov %dl,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10d959: 40 inc %eax 10d95a: 41 inc %ecx 10d95b: 3b 45 d4 cmp -0x2c(%ebp),%eax 10d95e: 72 d8 jb 10d938 <_Objects_Get_name_as_string+0x84> 10d960: 8b 5d d0 mov -0x30(%ebp),%ebx *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10d963: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10d966: e8 41 0b 00 00 call 10e4ac <_Thread_Enable_dispatch> return name; 10d96b: e9 5c ff ff ff jmp 10d8cc <_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; 10d970: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 10d973: 89 c2 mov %eax,%edx 10d975: c1 ea 18 shr $0x18,%edx 10d978: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10d97b: 89 c2 mov %eax,%edx 10d97d: c1 ea 10 shr $0x10,%edx 10d980: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10d983: 89 c2 mov %eax,%edx 10d985: c1 ea 08 shr $0x8,%edx 10d988: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10d98b: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 10d98e: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; 10d992: 8d 7d df lea -0x21(%ebp),%edi 10d995: eb 8c jmp 10d923 <_Objects_Get_name_as_string+0x6f> } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10d997: 89 d9 mov %ebx,%ecx 10d999: eb c8 jmp 10d963 <_Objects_Get_name_as_string+0xaf> =============================================================================== 0010c340 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10c340: 55 push %ebp 10c341: 89 e5 mov %esp,%ebp 10c343: 57 push %edi 10c344: 56 push %esi 10c345: 53 push %ebx 10c346: 83 ec 0c sub $0xc,%esp 10c349: 8b 5d 08 mov 0x8(%ebp),%ebx 10c34c: 8b 75 0c mov 0xc(%ebp),%esi 10c34f: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10c352: 85 db test %ebx,%ebx 10c354: 75 0a jne 10c360 <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10c356: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10c358: 8d 65 f4 lea -0xc(%ebp),%esp 10c35b: 5b pop %ebx 10c35c: 5e pop %esi 10c35d: 5f pop %edi 10c35e: c9 leave 10c35f: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10c360: 85 ff test %edi,%edi 10c362: 74 f2 je 10c356 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10c364: 8b 45 14 mov 0x14(%ebp),%eax 10c367: 85 c0 test %eax,%eax 10c369: 74 eb je 10c356 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10c36b: 66 85 f6 test %si,%si 10c36e: 75 04 jne 10c374 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10c370: 8b 73 08 mov 0x8(%ebx),%esi 10c373: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10c374: 66 39 73 10 cmp %si,0x10(%ebx) 10c378: 72 22 jb 10c39c <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10c37a: 51 push %ecx 10c37b: 57 push %edi 10c37c: 56 push %esi 10c37d: 53 push %ebx 10c37e: e8 2d 00 00 00 call 10c3b0 <_Objects_Get> next_id++; 10c383: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10c384: 83 c4 10 add $0x10,%esp 10c387: 8b 17 mov (%edi),%edx 10c389: 85 d2 test %edx,%edx 10c38b: 75 e7 jne 10c374 <_Objects_Get_next+0x34> *next_id_p = next_id; 10c38d: 8b 55 14 mov 0x14(%ebp),%edx 10c390: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10c392: 8d 65 f4 lea -0xc(%ebp),%esp 10c395: 5b pop %ebx 10c396: 5e pop %esi 10c397: 5f pop %edi 10c398: c9 leave 10c399: c3 ret 10c39a: 66 90 xchg %ax,%ax do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10c39c: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10c3a2: 8b 45 14 mov 0x14(%ebp),%eax 10c3a5: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10c3ab: 31 c0 xor %eax,%eax 10c3ad: eb a9 jmp 10c358 <_Objects_Get_next+0x18> =============================================================================== 0011a8c0 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11a8c0: 55 push %ebp 11a8c1: 89 e5 mov %esp,%ebp 11a8c3: 53 push %ebx 11a8c4: 8b 55 08 mov 0x8(%ebp),%edx 11a8c7: 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; 11a8ca: b8 01 00 00 00 mov $0x1,%eax 11a8cf: 2b 42 08 sub 0x8(%edx),%eax 11a8d2: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11a8d5: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11a8d9: 39 c8 cmp %ecx,%eax 11a8db: 77 13 ja 11a8f0 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11a8dd: 8b 52 1c mov 0x1c(%edx),%edx 11a8e0: 8b 04 82 mov (%edx,%eax,4),%eax 11a8e3: 85 c0 test %eax,%eax 11a8e5: 74 09 je 11a8f0 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11a8e7: 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; } 11a8ed: 5b pop %ebx 11a8ee: c9 leave 11a8ef: 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; 11a8f0: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11a8f6: 31 c0 xor %eax,%eax } 11a8f8: 5b pop %ebx 11a8f9: c9 leave 11a8fa: c3 ret =============================================================================== 0010d4a4 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10d4a4: 55 push %ebp 10d4a5: 89 e5 mov %esp,%ebp 10d4a7: 83 ec 18 sub $0x18,%esp 10d4aa: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d4ad: 85 d2 test %edx,%edx 10d4af: 75 08 jne 10d4b9 <_Objects_Id_to_name+0x15> 10d4b1: a1 18 9b 12 00 mov 0x129b18,%eax 10d4b6: 8b 50 08 mov 0x8(%eax),%edx 10d4b9: 89 d0 mov %edx,%eax 10d4bb: c1 e8 18 shr $0x18,%eax 10d4be: 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 ) 10d4c1: 8d 48 ff lea -0x1(%eax),%ecx 10d4c4: 83 f9 02 cmp $0x2,%ecx 10d4c7: 77 1d ja 10d4e6 <_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 ] ) 10d4c9: 8b 04 85 44 95 12 00 mov 0x129544(,%eax,4),%eax 10d4d0: 85 c0 test %eax,%eax 10d4d2: 74 12 je 10d4e6 <_Objects_Id_to_name+0x42> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d4d4: 89 d1 mov %edx,%ecx 10d4d6: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10d4d9: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10d4dc: 85 c0 test %eax,%eax 10d4de: 74 06 je 10d4e6 <_Objects_Id_to_name+0x42><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10d4e0: 80 78 38 00 cmpb $0x0,0x38(%eax) 10d4e4: 74 0a je 10d4f0 <_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; 10d4e6: 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; } 10d4eb: c9 leave 10d4ec: c3 ret 10d4ed: 8d 76 00 lea 0x0(%esi),%esi #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 ); 10d4f0: 51 push %ecx 10d4f1: 8d 4d f4 lea -0xc(%ebp),%ecx 10d4f4: 51 push %ecx 10d4f5: 52 push %edx 10d4f6: 50 push %eax 10d4f7: e8 40 ff ff ff call 10d43c <_Objects_Get> if ( !the_object ) 10d4fc: 83 c4 10 add $0x10,%esp 10d4ff: 85 c0 test %eax,%eax 10d501: 74 e3 je 10d4e6 <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; *name = the_object->name; 10d503: 8b 50 0c mov 0xc(%eax),%edx 10d506: 8b 45 0c mov 0xc(%ebp),%eax 10d509: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10d50b: e8 24 0b 00 00 call 10e034 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10d510: 31 c0 xor %eax,%eax } 10d512: c9 leave 10d513: c3 ret =============================================================================== 001172cc <_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 ) { 1172cc: 55 push %ebp 1172cd: 89 e5 mov %esp,%ebp 1172cf: 57 push %edi 1172d0: 56 push %esi 1172d1: 53 push %ebx 1172d2: 83 ec 1c sub $0x1c,%esp 1172d5: 8b 7d 08 mov 0x8(%ebp),%edi Objects_Control *the_object; uint32_t index; /* ASSERT: information->is_string == true */ if ( !id ) 1172d8: 8b 5d 10 mov 0x10(%ebp),%ebx 1172db: 85 db test %ebx,%ebx 1172dd: 74 75 je 117354 <_Objects_Name_to_id_string+0x88> return OBJECTS_INVALID_ADDRESS; if ( !name ) 1172df: 8b 4d 0c mov 0xc(%ebp),%ecx 1172e2: 85 c9 test %ecx,%ecx 1172e4: 74 4b je 117331 <_Objects_Name_to_id_string+0x65> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 1172e6: 8b 47 10 mov 0x10(%edi),%eax 1172e9: 66 85 c0 test %ax,%ax 1172ec: 74 43 je 117331 <_Objects_Name_to_id_string+0x65> for ( index = 1; index <= information->maximum; index++ ) { 1172ee: 0f b7 c0 movzwl %ax,%eax 1172f1: 89 45 e4 mov %eax,-0x1c(%ebp) 1172f4: 8b 47 1c mov 0x1c(%edi),%eax 1172f7: bb 01 00 00 00 mov $0x1,%ebx 1172fc: 89 7d e0 mov %edi,-0x20(%ebp) 1172ff: 89 c7 mov %eax,%edi 117301: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; 117304: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 117307: 85 f6 test %esi,%esi 117309: 74 20 je 11732b <_Objects_Name_to_id_string+0x5f> continue; if ( !the_object->name.name_p ) 11730b: 8b 46 0c mov 0xc(%esi),%eax 11730e: 85 c0 test %eax,%eax 117310: 74 19 je 11732b <_Objects_Name_to_id_string+0x5f> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 117312: 52 push %edx 117313: 8b 4d e0 mov -0x20(%ebp),%ecx 117316: 0f b7 51 3a movzwl 0x3a(%ecx),%edx 11731a: 52 push %edx 11731b: 50 push %eax 11731c: ff 75 0c pushl 0xc(%ebp) 11731f: e8 68 34 00 00 call 11a78c 117324: 83 c4 10 add $0x10,%esp 117327: 85 c0 test %eax,%eax 117329: 74 15 je 117340 <_Objects_Name_to_id_string+0x74> if ( !name ) return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { for ( index = 1; index <= information->maximum; index++ ) { 11732b: 43 inc %ebx 11732c: 3b 5d e4 cmp -0x1c(%ebp),%ebx 11732f: 76 d3 jbe 117304 <_Objects_Name_to_id_string+0x38> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } } } return OBJECTS_INVALID_NAME; 117331: b8 01 00 00 00 mov $0x1,%eax } 117336: 8d 65 f4 lea -0xc(%ebp),%esp 117339: 5b pop %ebx 11733a: 5e pop %esi 11733b: 5f pop %edi 11733c: c9 leave 11733d: c3 ret 11733e: 66 90 xchg %ax,%ax if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id; 117340: 8b 46 08 mov 0x8(%esi),%eax 117343: 8b 55 10 mov 0x10(%ebp),%edx 117346: 89 02 mov %eax,(%edx) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 117348: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 11734a: 8d 65 f4 lea -0xc(%ebp),%esp 11734d: 5b pop %ebx 11734e: 5e pop %esi 11734f: 5f pop %edi 117350: c9 leave 117351: c3 ret 117352: 66 90 xchg %ax,%ax uint32_t index; /* ASSERT: information->is_string == true */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 117354: b8 02 00 00 00 mov $0x2,%eax } } } return OBJECTS_INVALID_NAME; } 117359: 8d 65 f4 lea -0xc(%ebp),%esp 11735c: 5b pop %ebx 11735d: 5e pop %esi 11735e: 5f pop %edi 11735f: c9 leave 117360: c3 ret =============================================================================== 0010c378 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10c378: 55 push %ebp 10c379: 89 e5 mov %esp,%ebp 10c37b: 57 push %edi 10c37c: 56 push %esi 10c37d: 53 push %ebx 10c37e: 8b 45 08 mov 0x8(%ebp),%eax 10c381: 8b 4d 0c mov 0xc(%ebp),%ecx 10c384: 8b 55 10 mov 0x10(%ebp),%edx 10c387: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10c38a: 85 ff test %edi,%edi 10c38c: 74 56 je 10c3e4 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10c38e: 85 c9 test %ecx,%ecx 10c390: 74 08 je 10c39a <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10c392: 8b 70 10 mov 0x10(%eax),%esi 10c395: 66 85 f6 test %si,%si 10c398: 75 0a jne 10c3a4 <_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; 10c39a: b8 01 00 00 00 mov $0x1,%eax #endif } 10c39f: 5b pop %ebx 10c3a0: 5e pop %esi 10c3a1: 5f pop %edi 10c3a2: c9 leave 10c3a3: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10c3a4: 85 d2 test %edx,%edx 10c3a6: 75 20 jne 10c3c8 <_Objects_Name_to_id_u32+0x50> _Objects_Is_local_node( node ) )) search_local_node = true; if ( search_local_node ) { for ( index = 1; index <= information->maximum; index++ ) { 10c3a8: 0f b7 f6 movzwl %si,%esi 10c3ab: 8b 58 1c mov 0x1c(%eax),%ebx 10c3ae: b8 01 00 00 00 mov $0x1,%eax 10c3b3: 90 nop the_object = information->local_table[ index ]; 10c3b4: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10c3b7: 85 d2 test %edx,%edx 10c3b9: 74 05 je 10c3c0 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10c3bb: 39 4a 0c cmp %ecx,0xc(%edx) 10c3be: 74 18 je 10c3d8 <_Objects_Name_to_id_u32+0x60> _Objects_Is_local_node( node ) )) search_local_node = true; if ( search_local_node ) { for ( index = 1; index <= information->maximum; index++ ) { 10c3c0: 40 inc %eax 10c3c1: 39 c6 cmp %eax,%esi 10c3c3: 73 ef jae 10c3b4 <_Objects_Name_to_id_u32+0x3c> 10c3c5: eb d3 jmp 10c39a <_Objects_Name_to_id_u32+0x22> 10c3c7: 90 nop return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10c3c8: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10c3ce: 74 d8 je 10c3a8 <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10c3d0: 4a dec %edx 10c3d1: 75 c7 jne 10c39a <_Objects_Name_to_id_u32+0x22> 10c3d3: eb d3 jmp 10c3a8 <_Objects_Name_to_id_u32+0x30> 10c3d5: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10c3d8: 8b 42 08 mov 0x8(%edx),%eax 10c3db: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10c3dd: 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 } 10c3df: 5b pop %ebx 10c3e0: 5e pop %esi 10c3e1: 5f pop %edi 10c3e2: c9 leave 10c3e3: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10c3e4: 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 } 10c3e9: 5b pop %ebx 10c3ea: 5e pop %esi 10c3eb: 5f pop %edi 10c3ec: c9 leave 10c3ed: c3 ret =============================================================================== 0010c9e8 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10c9e8: 55 push %ebp 10c9e9: 89 e5 mov %esp,%ebp 10c9eb: 57 push %edi 10c9ec: 56 push %esi 10c9ed: 53 push %ebx 10c9ee: 83 ec 14 sub $0x14,%esp 10c9f1: 8b 7d 08 mov 0x8(%ebp),%edi 10c9f4: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10c9f7: 0f b7 47 3a movzwl 0x3a(%edi),%eax 10c9fb: 50 push %eax 10c9fc: 53 push %ebx 10c9fd: e8 96 81 00 00 call 114b98 10ca02: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10ca04: 83 c4 10 add $0x10,%esp 10ca07: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10ca0b: 75 57 jne 10ca64 <_Objects_Set_name+0x7c> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10ca0d: 0f be 13 movsbl (%ebx),%edx 10ca10: c1 e2 18 shl $0x18,%edx 10ca13: 83 f8 01 cmp $0x1,%eax 10ca16: 76 38 jbe 10ca50 <_Objects_Set_name+0x68> 10ca18: 0f be 43 01 movsbl 0x1(%ebx),%eax 10ca1c: c1 e0 10 shl $0x10,%eax 10ca1f: 09 d0 or %edx,%eax 10ca21: 83 fe 02 cmp $0x2,%esi 10ca24: 74 31 je 10ca57 <_Objects_Set_name+0x6f> 10ca26: 0f be 53 02 movsbl 0x2(%ebx),%edx 10ca2a: c1 e2 08 shl $0x8,%edx 10ca2d: 09 c2 or %eax,%edx 10ca2f: 83 fe 03 cmp $0x3,%esi 10ca32: 0f 84 80 00 00 00 je 10cab8 <_Objects_Set_name+0xd0> 10ca38: 0f be 43 03 movsbl 0x3(%ebx),%eax 10ca3c: 09 c2 or %eax,%edx 10ca3e: 8b 45 0c mov 0xc(%ebp),%eax 10ca41: 89 50 0c mov %edx,0xc(%eax) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 10ca44: b0 01 mov $0x1,%al } 10ca46: 8d 65 f4 lea -0xc(%ebp),%esp 10ca49: 5b pop %ebx 10ca4a: 5e pop %esi 10ca4b: 5f pop %edi 10ca4c: c9 leave 10ca4d: c3 ret 10ca4e: 66 90 xchg %ax,%ax d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10ca50: 89 d0 mov %edx,%eax 10ca52: 0d 00 00 20 00 or $0x200000,%eax 10ca57: 89 c2 mov %eax,%edx 10ca59: 80 ce 20 or $0x20,%dh 10ca5c: b8 20 00 00 00 mov $0x20,%eax 10ca61: eb d9 jmp 10ca3c <_Objects_Set_name+0x54> 10ca63: 90 nop #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 10ca64: 83 ec 0c sub $0xc,%esp 10ca67: 8d 40 01 lea 0x1(%eax),%eax 10ca6a: 50 push %eax 10ca6b: e8 c0 19 00 00 call 10e430 <_Workspace_Allocate> 10ca70: 89 c7 mov %eax,%edi if ( !d ) 10ca72: 83 c4 10 add $0x10,%esp 10ca75: 85 c0 test %eax,%eax 10ca77: 74 3b je 10cab4 <_Objects_Set_name+0xcc> return false; _Workspace_Free( (void *)the_object->name.name_p ); 10ca79: 83 ec 0c sub $0xc,%esp 10ca7c: 8b 45 0c mov 0xc(%ebp),%eax 10ca7f: ff 70 0c pushl 0xc(%eax) 10ca82: e8 c5 19 00 00 call 10e44c <_Workspace_Free> the_object->name.name_p = NULL; 10ca87: 8b 45 0c mov 0xc(%ebp),%eax 10ca8a: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) strncpy( d, name, length ); 10ca91: 83 c4 0c add $0xc,%esp 10ca94: 56 push %esi 10ca95: 53 push %ebx 10ca96: 57 push %edi 10ca97: e8 80 80 00 00 call 114b1c d[length] = '\0'; 10ca9c: c6 04 37 00 movb $0x0,(%edi,%esi,1) the_object->name.name_p = d; 10caa0: 8b 45 0c mov 0xc(%ebp),%eax 10caa3: 89 78 0c mov %edi,0xc(%eax) 10caa6: 83 c4 10 add $0x10,%esp ((3 < length) ? s[ 3 ] : ' ') ); } return true; 10caa9: b0 01 mov $0x1,%al } 10caab: 8d 65 f4 lea -0xc(%ebp),%esp 10caae: 5b pop %ebx 10caaf: 5e pop %esi 10cab0: 5f pop %edi 10cab1: c9 leave 10cab2: c3 ret 10cab3: 90 nop if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 10cab4: 31 c0 xor %eax,%eax 10cab6: eb 8e jmp 10ca46 <_Objects_Set_name+0x5e> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10cab8: b8 20 00 00 00 mov $0x20,%eax 10cabd: e9 7a ff ff ff jmp 10ca3c <_Objects_Set_name+0x54> =============================================================================== 0010c3f0 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10c3f0: 55 push %ebp 10c3f1: 89 e5 mov %esp,%ebp 10c3f3: 57 push %edi 10c3f4: 56 push %esi 10c3f5: 53 push %ebx 10c3f6: 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 ); 10c3f9: 8b 45 08 mov 0x8(%ebp),%eax 10c3fc: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10c400: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10c404: 0f b7 40 10 movzwl 0x10(%eax),%eax 10c408: 29 d8 sub %ebx,%eax 10c40a: 31 d2 xor %edx,%edx 10c40c: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10c40e: 85 c0 test %eax,%eax 10c410: 74 21 je 10c433 <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10c412: 8b 55 08 mov 0x8(%ebp),%edx 10c415: 8b 72 30 mov 0x30(%edx),%esi 10c418: 3b 0e cmp (%esi),%ecx 10c41a: 74 1f je 10c43b <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10c41c: 31 d2 xor %edx,%edx 10c41e: eb 0e jmp 10c42e <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10c420: 01 cb add %ecx,%ebx 10c422: 8d 3c 95 00 00 00 00 lea 0x0(,%edx,4),%edi 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 ] == 10c429: 3b 0c 96 cmp (%esi,%edx,4),%ecx 10c42c: 74 12 je 10c440 <_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++ ) { 10c42e: 42 inc %edx 10c42f: 39 d0 cmp %edx,%eax 10c431: 77 ed ja 10c420 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10c433: 8d 65 f4 lea -0xc(%ebp),%esp 10c436: 5b pop %ebx 10c437: 5e pop %esi 10c438: 5f pop %edi 10c439: c9 leave 10c43a: 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 ] == 10c43b: 31 ff xor %edi,%edi <== NOT EXECUTED 10c43d: 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 *) _Chain_First( &information->Inactive ); 10c440: 8b 55 08 mov 0x8(%ebp),%edx 10c443: 8b 42 20 mov 0x20(%edx),%eax 10c446: 89 7d e4 mov %edi,-0x1c(%ebp) 10c449: eb 07 jmp 10c452 <_Objects_Shrink_information+0x62> 10c44b: 90 nop if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10c44c: 85 f6 test %esi,%esi 10c44e: 74 2c je 10c47c <_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; 10c450: 89 f0 mov %esi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 10c452: 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; 10c456: 8b 30 mov (%eax),%esi if ((index >= index_base) && 10c458: 39 da cmp %ebx,%edx 10c45a: 72 f0 jb 10c44c <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10c45c: 8b 7d 08 mov 0x8(%ebp),%edi 10c45f: 0f b7 4f 14 movzwl 0x14(%edi),%ecx 10c463: 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) && 10c466: 39 ca cmp %ecx,%edx 10c468: 73 e2 jae 10c44c <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10c46a: 83 ec 0c sub $0xc,%esp 10c46d: 50 push %eax 10c46e: e8 81 f0 ff ff call 10b4f4 <_Chain_Extract> 10c473: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10c476: 85 f6 test %esi,%esi 10c478: 75 d6 jne 10c450 <_Objects_Shrink_information+0x60> 10c47a: 66 90 xchg %ax,%ax 10c47c: 8b 7d e4 mov -0x1c(%ebp),%edi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10c47f: 83 ec 0c sub $0xc,%esp 10c482: 8b 55 08 mov 0x8(%ebp),%edx 10c485: 8b 42 34 mov 0x34(%edx),%eax 10c488: ff 34 38 pushl (%eax,%edi,1) 10c48b: e8 e8 18 00 00 call 10dd78 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10c490: 8b 55 08 mov 0x8(%ebp),%edx 10c493: 8b 42 34 mov 0x34(%edx),%eax 10c496: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive_per_block[ block ] = 0; 10c49d: 8b 42 30 mov 0x30(%edx),%eax 10c4a0: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive -= information->allocation_size; 10c4a7: 8b 42 14 mov 0x14(%edx),%eax 10c4aa: 66 29 42 2c sub %ax,0x2c(%edx) return; 10c4ae: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10c4b1: 8d 65 f4 lea -0xc(%ebp),%esp 10c4b4: 5b pop %ebx 10c4b5: 5e pop %esi 10c4b6: 5f pop %edi 10c4b7: c9 leave 10c4b8: c3 ret =============================================================================== 0010cabc <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10cabc: 55 push %ebp 10cabd: 89 e5 mov %esp,%ebp 10cabf: 57 push %edi 10cac0: 56 push %esi 10cac1: 53 push %ebx 10cac2: 83 ec 38 sub $0x38,%esp 10cac5: 8b 5d 08 mov 0x8(%ebp),%ebx 10cac8: 8b 75 0c mov 0xc(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10cacb: c7 06 00 00 00 00 movl $0x0,(%esi) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10cad1: 53 push %ebx 10cad2: e8 6d 3b 00 00 call 110644 <_Timespec_Is_valid> 10cad7: 83 c4 10 add $0x10,%esp 10cada: 84 c0 test %al,%al 10cadc: 75 0a jne 10cae8 <_POSIX_Absolute_timeout_to_ticks+0x2c> return POSIX_ABSOLUTE_TIMEOUT_INVALID; 10cade: 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; } 10cae0: 8d 65 f4 lea -0xc(%ebp),%esp 10cae3: 5b pop %ebx 10cae4: 5e pop %esi 10cae5: 5f pop %edi 10cae6: c9 leave 10cae7: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10cae8: 83 ec 0c sub $0xc,%esp 10caeb: 8d 7d e0 lea -0x20(%ebp),%edi 10caee: 57 push %edi 10caef: e8 94 1b 00 00 call 10e688 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10caf4: 5a pop %edx 10caf5: 59 pop %ecx 10caf6: 57 push %edi 10caf7: 53 push %ebx 10caf8: e8 6f 3b 00 00 call 11066c <_Timespec_Less_than> 10cafd: 83 c4 10 add $0x10,%esp 10cb00: 84 c0 test %al,%al 10cb02: 74 10 je 10cb14 <_POSIX_Absolute_timeout_to_ticks+0x58> return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; 10cb04: 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; } 10cb09: 8d 65 f4 lea -0xc(%ebp),%esp 10cb0c: 5b pop %ebx 10cb0d: 5e pop %esi 10cb0e: 5f pop %edi 10cb0f: c9 leave 10cb10: c3 ret 10cb11: 8d 76 00 lea 0x0(%esi),%esi return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); 10cb14: 50 push %eax 10cb15: 8d 45 d8 lea -0x28(%ebp),%eax 10cb18: 50 push %eax 10cb19: 53 push %ebx 10cb1a: 57 push %edi 10cb1b: 89 45 d4 mov %eax,-0x2c(%ebp) 10cb1e: e8 6d 3b 00 00 call 110690 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10cb23: 8b 45 d4 mov -0x2c(%ebp),%eax 10cb26: 89 04 24 mov %eax,(%esp) 10cb29: e8 a2 3b 00 00 call 1106d0 <_Timespec_To_ticks> 10cb2e: 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 ) 10cb30: 83 c4 10 add $0x10,%esp return POSIX_ABSOLUTE_TIMEOUT_IS_NOW; 10cb33: 83 f8 01 cmp $0x1,%eax 10cb36: 19 c0 sbb %eax,%eax 10cb38: 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; } 10cb3b: 8d 65 f4 lea -0xc(%ebp),%esp 10cb3e: 5b pop %ebx 10cb3f: 5e pop %esi 10cb40: 5f pop %edi 10cb41: c9 leave 10cb42: c3 ret =============================================================================== 0010b674 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10b674: 55 push %ebp 10b675: 89 e5 mov %esp,%ebp 10b677: 56 push %esi 10b678: 53 push %ebx 10b679: 8b 5d 08 mov 0x8(%ebp),%ebx 10b67c: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10b67f: 85 db test %ebx,%ebx 10b681: 74 39 je 10b6bc <_POSIX_Condition_variables_Get+0x48> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10b683: 8b 03 mov (%ebx),%eax 10b685: 83 f8 ff cmp $0xffffffff,%eax 10b688: 74 1a je 10b6a4 <_POSIX_Condition_variables_Get+0x30> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10b68a: 52 push %edx 10b68b: 56 push %esi 10b68c: 50 push %eax 10b68d: 68 80 a3 12 00 push $0x12a380 10b692: e8 8d 29 00 00 call 10e024 <_Objects_Get> 10b697: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10b69a: 8d 65 f8 lea -0x8(%ebp),%esp 10b69d: 5b pop %ebx 10b69e: 5e pop %esi 10b69f: c9 leave 10b6a0: c3 ret 10b6a1: 8d 76 00 lea 0x0(%esi),%esi if ( *cond == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 10b6a4: 83 ec 08 sub $0x8,%esp 10b6a7: 6a 00 push $0x0 10b6a9: 53 push %ebx 10b6aa: e8 19 00 00 00 call 10b6c8 if ( status ) { 10b6af: 83 c4 10 add $0x10,%esp 10b6b2: 85 c0 test %eax,%eax 10b6b4: 75 06 jne 10b6bc <_POSIX_Condition_variables_Get+0x48> 10b6b6: 8b 03 mov (%ebx),%eax 10b6b8: eb d0 jmp 10b68a <_POSIX_Condition_variables_Get+0x16> 10b6ba: 66 90 xchg %ax,%ax *location = OBJECTS_ERROR; 10b6bc: c7 06 01 00 00 00 movl $0x1,(%esi) return (POSIX_Condition_variables_Control *) 0; 10b6c2: 31 c0 xor %eax,%eax 10b6c4: eb d4 jmp 10b69a <_POSIX_Condition_variables_Get+0x26> =============================================================================== 0010b790 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10b790: 55 push %ebp 10b791: 89 e5 mov %esp,%ebp 10b793: 57 push %edi 10b794: 56 push %esi 10b795: 53 push %ebx 10b796: 83 ec 24 sub $0x24,%esp 10b799: 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 ); 10b79c: 8d 45 e4 lea -0x1c(%ebp),%eax 10b79f: 50 push %eax 10b7a0: ff 75 08 pushl 0x8(%ebp) 10b7a3: e8 cc fe ff ff call 10b674 <_POSIX_Condition_variables_Get> 10b7a8: 89 c7 mov %eax,%edi switch ( location ) { 10b7aa: 83 c4 10 add $0x10,%esp 10b7ad: 8b 45 e4 mov -0x1c(%ebp),%eax 10b7b0: 85 c0 test %eax,%eax 10b7b2: 74 10 je 10b7c4 <_POSIX_Condition_variables_Signal_support+0x34> #endif case OBJECTS_ERROR: break; } return EINVAL; 10b7b4: b8 16 00 00 00 mov $0x16,%eax } 10b7b9: 8d 65 f4 lea -0xc(%ebp),%esp 10b7bc: 5b pop %ebx 10b7bd: 5e pop %esi 10b7be: 5f pop %edi 10b7bf: c9 leave 10b7c0: c3 ret 10b7c1: 8d 76 00 lea 0x0(%esi),%esi 10b7c4: 8d 77 18 lea 0x18(%edi),%esi 10b7c7: eb 0b jmp 10b7d4 <_POSIX_Condition_variables_Signal_support+0x44> 10b7c9: 8d 76 00 lea 0x0(%esi),%esi 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 ); 10b7cc: 84 db test %bl,%bl 10b7ce: 74 20 je 10b7f0 <_POSIX_Condition_variables_Signal_support+0x60> 10b7d0: 85 c0 test %eax,%eax 10b7d2: 74 1c je 10b7f0 <_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 ); 10b7d4: 83 ec 0c sub $0xc,%esp 10b7d7: 56 push %esi 10b7d8: e8 d7 36 00 00 call 10eeb4 <_Thread_queue_Dequeue> if ( !the_thread ) 10b7dd: 83 c4 10 add $0x10,%esp 10b7e0: 85 c0 test %eax,%eax 10b7e2: 75 e8 jne 10b7cc <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10b7e4: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) } while ( is_broadcast && the_thread ); 10b7eb: 84 db test %bl,%bl 10b7ed: 75 e1 jne 10b7d0 <_POSIX_Condition_variables_Signal_support+0x40> 10b7ef: 90 nop _Thread_Enable_dispatch(); 10b7f0: e8 3f 33 00 00 call 10eb34 <_Thread_Enable_dispatch> return 0; 10b7f5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7f7: 8d 65 f4 lea -0xc(%ebp),%esp 10b7fa: 5b pop %ebx 10b7fb: 5e pop %esi 10b7fc: 5f pop %edi 10b7fd: c9 leave 10b7fe: c3 ret =============================================================================== 0010b858 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10b858: 55 push %ebp 10b859: 89 e5 mov %esp,%ebp 10b85b: 57 push %edi 10b85c: 56 push %esi 10b85d: 53 push %ebx 10b85e: 83 ec 34 sub $0x34,%esp 10b861: 8b 7d 08 mov 0x8(%ebp),%edi 10b864: 8b 5d 0c mov 0xc(%ebp),%ebx 10b867: 8a 45 14 mov 0x14(%ebp),%al 10b86a: 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 ) ) { 10b86d: 8d 75 e4 lea -0x1c(%ebp),%esi 10b870: 56 push %esi 10b871: 53 push %ebx 10b872: e8 59 01 00 00 call 10b9d0 <_POSIX_Mutex_Get> 10b877: 83 c4 10 add $0x10,%esp 10b87a: 85 c0 test %eax,%eax 10b87c: 74 21 je 10b89f <_POSIX_Condition_variables_Wait_support+0x47> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b87e: a1 cc 9e 12 00 mov 0x129ecc,%eax 10b883: 48 dec %eax 10b884: a3 cc 9e 12 00 mov %eax,0x129ecc return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10b889: 83 ec 08 sub $0x8,%esp 10b88c: 56 push %esi 10b88d: 57 push %edi 10b88e: e8 e1 fd ff ff call 10b674 <_POSIX_Condition_variables_Get> 10b893: 89 c6 mov %eax,%esi switch ( location ) { 10b895: 83 c4 10 add $0x10,%esp 10b898: 8b 55 e4 mov -0x1c(%ebp),%edx 10b89b: 85 d2 test %edx,%edx 10b89d: 74 11 je 10b8b0 <_POSIX_Condition_variables_Wait_support+0x58> #endif case OBJECTS_ERROR: break; } return EINVAL; 10b89f: be 16 00 00 00 mov $0x16,%esi } 10b8a4: 89 f0 mov %esi,%eax 10b8a6: 8d 65 f4 lea -0xc(%ebp),%esp 10b8a9: 5b pop %ebx 10b8aa: 5e pop %esi 10b8ab: 5f pop %edi 10b8ac: c9 leave 10b8ad: c3 ret 10b8ae: 66 90 xchg %ax,%ax the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10b8b0: 8b 40 14 mov 0x14(%eax),%eax 10b8b3: 85 c0 test %eax,%eax 10b8b5: 74 19 je 10b8d0 <_POSIX_Condition_variables_Wait_support+0x78> 10b8b7: 3b 03 cmp (%ebx),%eax 10b8b9: 74 15 je 10b8d0 <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 10b8bb: e8 74 32 00 00 call 10eb34 <_Thread_Enable_dispatch> return EINVAL; 10b8c0: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10b8c5: 89 f0 mov %esi,%eax 10b8c7: 8d 65 f4 lea -0xc(%ebp),%esp 10b8ca: 5b pop %ebx 10b8cb: 5e pop %esi 10b8cc: 5f pop %edi 10b8cd: c9 leave 10b8ce: c3 ret 10b8cf: 90 nop if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10b8d0: 83 ec 0c sub $0xc,%esp 10b8d3: 53 push %ebx 10b8d4: e8 73 03 00 00 call 10bc4c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10b8d9: 83 c4 10 add $0x10,%esp 10b8dc: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10b8e0: 75 4e jne 10b930 <_POSIX_Condition_variables_Wait_support+0xd8> the_cond->Mutex = *mutex; 10b8e2: 8b 03 mov (%ebx),%eax 10b8e4: 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; 10b8e7: 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; 10b8ee: a1 78 a4 12 00 mov 0x12a478,%eax 10b8f3: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10b8fa: 83 c6 18 add $0x18,%esi 10b8fd: 89 70 44 mov %esi,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10b900: 8b 17 mov (%edi),%edx 10b902: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10b905: 50 push %eax 10b906: 68 58 f3 10 00 push $0x10f358 10b90b: ff 75 10 pushl 0x10(%ebp) 10b90e: 56 push %esi 10b90f: e8 c8 36 00 00 call 10efdc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b914: e8 1b 32 00 00 call 10eb34 <_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; 10b919: a1 78 a4 12 00 mov 0x12a478,%eax 10b91e: 8b 70 34 mov 0x34(%eax),%esi if ( status == EINTR ) 10b921: 83 c4 10 add $0x10,%esp 10b924: 83 fe 04 cmp $0x4,%esi 10b927: 75 11 jne 10b93a <_POSIX_Condition_variables_Wait_support+0xe2> status = 0; 10b929: 31 f6 xor %esi,%esi 10b92b: eb 0d jmp 10b93a <_POSIX_Condition_variables_Wait_support+0xe2> 10b92d: 8d 76 00 lea 0x0(%esi),%esi } else { _Thread_Enable_dispatch(); 10b930: e8 ff 31 00 00 call 10eb34 <_Thread_Enable_dispatch> status = ETIMEDOUT; 10b935: be 74 00 00 00 mov $0x74,%esi /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10b93a: 83 ec 0c sub $0xc,%esp 10b93d: 53 push %ebx 10b93e: e8 81 02 00 00 call 10bbc4 if ( mutex_status ) 10b943: 83 c4 10 add $0x10,%esp 10b946: 85 c0 test %eax,%eax 10b948: 0f 85 51 ff ff ff jne 10b89f <_POSIX_Condition_variables_Wait_support+0x47> case OBJECTS_ERROR: break; } return EINVAL; } 10b94e: 89 f0 mov %esi,%eax 10b950: 8d 65 f4 lea -0xc(%ebp),%esp 10b953: 5b pop %ebx 10b954: 5e pop %esi 10b955: 5f pop %edi 10b956: c9 leave 10b957: c3 ret =============================================================================== 00115a48 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 115a48: 55 push %ebp 115a49: 89 e5 mov %esp,%ebp 115a4b: 57 push %edi 115a4c: 56 push %esi 115a4d: 53 push %ebx 115a4e: 83 ec 24 sub $0x24,%esp 115a51: 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 ); 115a54: 68 ff 00 00 00 push $0xff 115a59: ff 75 08 pushl 0x8(%ebp) 115a5c: e8 37 4e 00 00 call 11a898 115a61: 89 c6 mov %eax,%esi 115a63: a1 8c fa 12 00 mov 0x12fa8c,%eax 115a68: 40 inc %eax 115a69: a3 8c fa 12 00 mov %eax,0x12fa8c * 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 ) { 115a6e: 83 c4 10 add $0x10,%esp 115a71: 85 db test %ebx,%ebx 115a73: 0f 84 b7 00 00 00 je 115b30 <_POSIX_Message_queue_Create_support+0xe8> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 115a79: 8b 7b 04 mov 0x4(%ebx),%edi 115a7c: 85 ff test %edi,%edi 115a7e: 0f 8e f0 00 00 00 jle 115b74 <_POSIX_Message_queue_Create_support+0x12c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 115a84: 8b 5b 08 mov 0x8(%ebx),%ebx 115a87: 89 5d e4 mov %ebx,-0x1c(%ebp) 115a8a: 85 db test %ebx,%ebx 115a8c: 0f 8e e2 00 00 00 jle 115b74 <_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 ); 115a92: 83 ec 0c sub $0xc,%esp 115a95: 68 20 fe 12 00 push $0x12fe20 115a9a: e8 fd c1 ff ff call 111c9c <_Objects_Allocate> 115a9f: 89 c3 mov %eax,%ebx attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 115aa1: 83 c4 10 add $0x10,%esp 115aa4: 85 c0 test %eax,%eax 115aa6: 0f 84 0a 01 00 00 je 115bb6 <_POSIX_Message_queue_Create_support+0x16e> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 115aac: 8b 45 0c mov 0xc(%ebp),%eax 115aaf: 89 43 10 mov %eax,0x10(%ebx) the_mq->named = true; 115ab2: c6 43 14 01 movb $0x1,0x14(%ebx) the_mq->open_count = 1; 115ab6: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx) the_mq->linked = true; 115abd: 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); 115ac1: 8d 56 01 lea 0x1(%esi),%edx 115ac4: 83 ec 0c sub $0xc,%esp 115ac7: 52 push %edx 115ac8: 89 55 e0 mov %edx,-0x20(%ebp) 115acb: e8 c8 e2 ff ff call 113d98 <_Workspace_Allocate> 115ad0: 89 c6 mov %eax,%esi if (!name) { 115ad2: 83 c4 10 add $0x10,%esp 115ad5: 85 c0 test %eax,%eax 115ad7: 8b 55 e0 mov -0x20(%ebp),%edx 115ada: 0f 84 ab 00 00 00 je 115b8b <_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 ); 115ae0: 50 push %eax 115ae1: 52 push %edx 115ae2: ff 75 08 pushl 0x8(%ebp) 115ae5: 56 push %esi 115ae6: e8 31 4d 00 00 call 11a81c * * 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; 115aeb: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) if ( !_CORE_message_queue_Initialize( 115af2: ff 75 e4 pushl -0x1c(%ebp) 115af5: 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; 115af6: 8d 43 5c lea 0x5c(%ebx),%eax the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( !_CORE_message_queue_Initialize( 115af9: 50 push %eax 115afa: 8d 43 1c lea 0x1c(%ebx),%eax 115afd: 50 push %eax 115afe: e8 a9 11 00 00 call 116cac <_CORE_message_queue_Initialize> 115b03: 83 c4 20 add $0x20,%esp 115b06: 84 c0 test %al,%al 115b08: 74 3a je 115b44 <_POSIX_Message_queue_Create_support+0xfc> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 115b0a: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115b0e: a1 3c fe 12 00 mov 0x12fe3c,%eax 115b13: 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; 115b16: 89 73 0c mov %esi,0xc(%ebx) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 115b19: 8b 45 14 mov 0x14(%ebp),%eax 115b1c: 89 18 mov %ebx,(%eax) _Thread_Enable_dispatch(); 115b1e: e8 bd d1 ff ff call 112ce0 <_Thread_Enable_dispatch> return 0; 115b23: 31 c0 xor %eax,%eax } 115b25: 8d 65 f4 lea -0xc(%ebp),%esp 115b28: 5b pop %ebx 115b29: 5e pop %esi 115b2a: 5f pop %edi 115b2b: c9 leave 115b2c: c3 ret 115b2d: 8d 76 00 lea 0x0(%esi),%esi * 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; 115b30: 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; 115b37: bf 0a 00 00 00 mov $0xa,%edi 115b3c: e9 51 ff ff ff jmp 115a92 <_POSIX_Message_queue_Create_support+0x4a> 115b41: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 115b44: 83 ec 08 sub $0x8,%esp 115b47: 53 push %ebx 115b48: 68 20 fe 12 00 push $0x12fe20 115b4d: e8 be c4 ff ff call 112010 <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 115b52: 89 34 24 mov %esi,(%esp) 115b55: e8 5a e2 ff ff call 113db4 <_Workspace_Free> _Thread_Enable_dispatch(); 115b5a: e8 81 d1 ff ff call 112ce0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 115b5f: e8 b8 35 00 00 call 11911c <__errno> 115b64: c7 00 1c 00 00 00 movl $0x1c,(%eax) 115b6a: 83 c4 10 add $0x10,%esp 115b6d: b8 ff ff ff ff mov $0xffffffff,%eax 115b72: eb b1 jmp 115b25 <_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(); 115b74: e8 67 d1 ff ff call 112ce0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 115b79: e8 9e 35 00 00 call 11911c <__errno> 115b7e: c7 00 16 00 00 00 movl $0x16,(%eax) 115b84: b8 ff ff ff ff mov $0xffffffff,%eax 115b89: eb 9a jmp 115b25 <_POSIX_Message_queue_Create_support+0xdd> 115b8b: 83 ec 08 sub $0x8,%esp 115b8e: 53 push %ebx 115b8f: 68 20 fe 12 00 push $0x12fe20 115b94: e8 77 c4 ff ff call 112010 <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 115b99: e8 42 d1 ff ff call 112ce0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 115b9e: e8 79 35 00 00 call 11911c <__errno> 115ba3: c7 00 0c 00 00 00 movl $0xc,(%eax) 115ba9: 83 c4 10 add $0x10,%esp 115bac: b8 ff ff ff ff mov $0xffffffff,%eax 115bb1: e9 6f ff ff ff jmp 115b25 <_POSIX_Message_queue_Create_support+0xdd> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 115bb6: e8 25 d1 ff ff call 112ce0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 115bbb: e8 5c 35 00 00 call 11911c <__errno> 115bc0: c7 00 17 00 00 00 movl $0x17,(%eax) 115bc6: b8 ff ff ff ff mov $0xffffffff,%eax 115bcb: e9 55 ff ff ff jmp 115b25 <_POSIX_Message_queue_Create_support+0xdd> =============================================================================== 00115bd0 <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 115bd0: 55 push %ebp 115bd1: 89 e5 mov %esp,%ebp 115bd3: 53 push %ebx 115bd4: 83 ec 14 sub $0x14,%esp 115bd7: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 115bda: 85 db test %ebx,%ebx 115bdc: 74 05 je 115be3 <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 115bde: 80 3b 00 cmpb $0x0,(%ebx) 115be1: 75 0d jne 115bf0 <_POSIX_Message_queue_Name_to_id+0x20> return EINVAL; 115be3: b8 16 00 00 00 mov $0x16,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 115be8: 8b 5d fc mov -0x4(%ebp),%ebx 115beb: c9 leave 115bec: c3 ret 115bed: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 115bf0: 83 ec 08 sub $0x8,%esp 115bf3: 68 ff 00 00 00 push $0xff 115bf8: 53 push %ebx 115bf9: e8 9a 4c 00 00 call 11a898 115bfe: 83 c4 10 add $0x10,%esp 115c01: 3d fe 00 00 00 cmp $0xfe,%eax 115c06: 76 0c jbe 115c14 <_POSIX_Message_queue_Name_to_id+0x44> return ENAMETOOLONG; 115c08: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 115c0d: 8b 5d fc mov -0x4(%ebp),%ebx 115c10: c9 leave 115c11: c3 ret 115c12: 66 90 xchg %ax,%ax return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 115c14: 50 push %eax 115c15: 8d 45 f4 lea -0xc(%ebp),%eax 115c18: 50 push %eax 115c19: 53 push %ebx 115c1a: 68 20 fe 12 00 push $0x12fe20 115c1f: e8 a8 16 00 00 call 1172cc <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 115c24: 8b 4d f4 mov -0xc(%ebp),%ecx 115c27: 8b 55 0c mov 0xc(%ebp),%edx 115c2a: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 115c2c: 83 c4 10 add $0x10,%esp return 0; 115c2f: 83 f8 01 cmp $0x1,%eax 115c32: 19 c0 sbb %eax,%eax 115c34: f7 d0 not %eax 115c36: 83 e0 02 and $0x2,%eax return ENOENT; } 115c39: 8b 5d fc mov -0x4(%ebp),%ebx 115c3c: c9 leave 115c3d: c3 ret =============================================================================== 0010f290 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10f290: 55 push %ebp 10f291: 89 e5 mov %esp,%ebp 10f293: 53 push %ebx 10f294: 83 ec 28 sub $0x28,%esp 10f297: 8b 5d 08 mov 0x8(%ebp),%ebx 10f29a: 8a 45 18 mov 0x18(%ebp),%al 10f29d: 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 ); 10f2a0: 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( 10f2a3: 50 push %eax 10f2a4: 53 push %ebx 10f2a5: 68 c0 ff 12 00 push $0x12ffc0 10f2aa: e8 a1 2e 00 00 call 112150 <_Objects_Get> switch ( location ) { 10f2af: 83 c4 10 add $0x10,%esp 10f2b2: 8b 55 f4 mov -0xc(%ebp),%edx 10f2b5: 85 d2 test %edx,%edx 10f2b7: 74 17 je 10f2d0 <_POSIX_Message_queue_Receive_support+0x40> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10f2b9: e8 5e 9e 00 00 call 11911c <__errno> 10f2be: c7 00 09 00 00 00 movl $0x9,(%eax) 10f2c4: b8 ff ff ff ff mov $0xffffffff,%eax } 10f2c9: 8b 5d fc mov -0x4(%ebp),%ebx 10f2cc: c9 leave 10f2cd: c3 ret 10f2ce: 66 90 xchg %ax,%ax the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10f2d0: 8b 50 14 mov 0x14(%eax),%edx 10f2d3: 89 d1 mov %edx,%ecx 10f2d5: 83 e1 03 and $0x3,%ecx 10f2d8: 49 dec %ecx 10f2d9: 0f 84 af 00 00 00 je 10f38e <_POSIX_Message_queue_Receive_support+0xfe> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10f2df: 8b 40 10 mov 0x10(%eax),%eax if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10f2e2: 8b 4d 10 mov 0x10(%ebp),%ecx 10f2e5: 39 48 68 cmp %ecx,0x68(%eax) 10f2e8: 77 62 ja 10f34c <_POSIX_Message_queue_Receive_support+0xbc> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10f2ea: 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 ) 10f2f1: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10f2f5: 75 45 jne 10f33c <_POSIX_Message_queue_Receive_support+0xac><== ALWAYS TAKEN 10f2f7: 31 d2 xor %edx,%edx <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10f2f9: 83 ec 08 sub $0x8,%esp 10f2fc: ff 75 1c pushl 0x1c(%ebp) 10f2ff: 52 push %edx 10f300: 8d 55 f0 lea -0x10(%ebp),%edx 10f303: 52 push %edx 10f304: ff 75 0c pushl 0xc(%ebp) 10f307: 53 push %ebx 10f308: 83 c0 1c add $0x1c,%eax 10f30b: 50 push %eax 10f30c: e8 ef 1e 00 00 call 111200 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10f311: 83 c4 20 add $0x20,%esp 10f314: e8 c7 39 00 00 call 112ce0 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10f319: 8b 15 38 00 13 00 mov 0x130038,%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); 10f31f: 8b 42 24 mov 0x24(%edx),%eax 10f322: 85 c0 test %eax,%eax 10f324: 78 22 js 10f348 <_POSIX_Message_queue_Receive_support+0xb8> do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10f326: 8b 4d 14 mov 0x14(%ebp),%ecx 10f329: 89 01 mov %eax,(%ecx) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10f32b: 8b 42 34 mov 0x34(%edx),%eax 10f32e: 85 c0 test %eax,%eax 10f330: 75 36 jne 10f368 <_POSIX_Message_queue_Receive_support+0xd8> return length_out; 10f332: 8b 45 f0 mov -0x10(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10f335: 8b 5d fc mov -0x4(%ebp),%ebx 10f338: c9 leave 10f339: c3 ret 10f33a: 66 90 xchg %ax,%ax length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10f33c: 80 e6 40 and $0x40,%dh 10f33f: 0f 94 c2 sete %dl 10f342: 0f b6 d2 movzbl %dl,%edx 10f345: eb b2 jmp 10f2f9 <_POSIX_Message_queue_Receive_support+0x69> 10f347: 90 nop 10f348: f7 d8 neg %eax 10f34a: eb da jmp 10f326 <_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(); 10f34c: e8 8f 39 00 00 call 112ce0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10f351: e8 c6 9d 00 00 call 11911c <__errno> 10f356: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10f35c: b8 ff ff ff ff mov $0xffffffff,%eax 10f361: e9 63 ff ff ff jmp 10f2c9 <_POSIX_Message_queue_Receive_support+0x39> 10f366: 66 90 xchg %ax,%ax _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( 10f368: e8 af 9d 00 00 call 11911c <__errno> 10f36d: 89 c3 mov %eax,%ebx 10f36f: 83 ec 0c sub $0xc,%esp 10f372: a1 38 00 13 00 mov 0x130038,%eax 10f377: ff 70 34 pushl 0x34(%eax) 10f37a: e8 29 02 00 00 call 10f5a8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10f37f: 89 03 mov %eax,(%ebx) 10f381: 83 c4 10 add $0x10,%esp 10f384: b8 ff ff ff ff mov $0xffffffff,%eax 10f389: e9 3b ff ff ff jmp 10f2c9 <_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(); 10f38e: e8 4d 39 00 00 call 112ce0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10f393: e8 84 9d 00 00 call 11911c <__errno> 10f398: c7 00 09 00 00 00 movl $0x9,(%eax) 10f39e: b8 ff ff ff ff mov $0xffffffff,%eax 10f3a3: e9 21 ff ff ff jmp 10f2c9 <_POSIX_Message_queue_Receive_support+0x39> =============================================================================== 0010f3c8 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10f3c8: 55 push %ebp 10f3c9: 89 e5 mov %esp,%ebp 10f3cb: 56 push %esi 10f3cc: 53 push %ebx 10f3cd: 83 ec 20 sub $0x20,%esp 10f3d0: 8b 75 08 mov 0x8(%ebp),%esi 10f3d3: 8b 5d 14 mov 0x14(%ebp),%ebx 10f3d6: 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 ) 10f3d9: 83 fb 20 cmp $0x20,%ebx 10f3dc: 0f 87 92 00 00 00 ja 10f474 <_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( 10f3e2: 51 push %ecx rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10f3e3: 8d 45 f4 lea -0xc(%ebp),%eax 10f3e6: 50 push %eax 10f3e7: 56 push %esi 10f3e8: 68 c0 ff 12 00 push $0x12ffc0 10f3ed: 88 55 e4 mov %dl,-0x1c(%ebp) 10f3f0: e8 5b 2d 00 00 call 112150 <_Objects_Get> switch ( location ) { 10f3f5: 83 c4 10 add $0x10,%esp 10f3f8: 8b 55 f4 mov -0xc(%ebp),%edx 10f3fb: 85 d2 test %edx,%edx 10f3fd: 8a 55 e4 mov -0x1c(%ebp),%dl 10f400: 75 5e jne 10f460 <_POSIX_Message_queue_Send_support+0x98> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10f402: 8b 48 14 mov 0x14(%eax),%ecx 10f405: f6 c1 03 test $0x3,%cl 10f408: 74 7e je 10f488 <_POSIX_Message_queue_Send_support+0xc0> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10f40a: 8b 40 10 mov 0x10(%eax),%eax /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10f40d: 84 d2 test %dl,%dl 10f40f: 75 37 jne 10f448 <_POSIX_Message_queue_Send_support+0x80> 10f411: 31 d2 xor %edx,%edx do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10f413: ff 75 1c pushl 0x1c(%ebp) 10f416: 52 push %edx RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core( unsigned int priority ) { return priority * -1; 10f417: f7 db neg %ebx 10f419: 53 push %ebx 10f41a: 6a 00 push $0x0 10f41c: 56 push %esi 10f41d: ff 75 10 pushl 0x10(%ebp) 10f420: ff 75 0c pushl 0xc(%ebp) 10f423: 83 c0 1c add $0x1c,%eax 10f426: 50 push %eax 10f427: e8 00 1f 00 00 call 11132c <_CORE_message_queue_Submit> 10f42c: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10f42e: 83 c4 20 add $0x20,%esp 10f431: e8 aa 38 00 00 call 112ce0 <_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 ) 10f436: 83 fb 07 cmp $0x7,%ebx 10f439: 74 19 je 10f454 <_POSIX_Message_queue_Send_support+0x8c> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 10f43b: 85 db test %ebx,%ebx 10f43d: 75 61 jne 10f4a0 <_POSIX_Message_queue_Send_support+0xd8> return msg_status; 10f43f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10f441: 8d 65 f8 lea -0x8(%ebp),%esp 10f444: 5b pop %ebx 10f445: 5e pop %esi 10f446: c9 leave 10f447: c3 ret the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10f448: 31 d2 xor %edx,%edx 10f44a: f6 c5 40 test $0x40,%ch 10f44d: 0f 94 c2 sete %dl 10f450: eb c1 jmp 10f413 <_POSIX_Message_queue_Send_support+0x4b> 10f452: 66 90 xchg %ax,%ax * 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; 10f454: a1 38 00 13 00 mov 0x130038,%eax 10f459: 8b 58 34 mov 0x34(%eax),%ebx 10f45c: eb dd jmp 10f43b <_POSIX_Message_queue_Send_support+0x73> 10f45e: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10f460: e8 b7 9c 00 00 call 11911c <__errno> 10f465: c7 00 09 00 00 00 movl $0x9,(%eax) 10f46b: b8 ff ff ff ff mov $0xffffffff,%eax 10f470: eb cf jmp 10f441 <_POSIX_Message_queue_Send_support+0x79> 10f472: 66 90 xchg %ax,%ax * 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 ); 10f474: e8 a3 9c 00 00 call 11911c <__errno> 10f479: c7 00 16 00 00 00 movl $0x16,(%eax) 10f47f: b8 ff ff ff ff mov $0xffffffff,%eax 10f484: eb bb jmp 10f441 <_POSIX_Message_queue_Send_support+0x79> 10f486: 66 90 xchg %ax,%ax 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(); 10f488: e8 53 38 00 00 call 112ce0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10f48d: e8 8a 9c 00 00 call 11911c <__errno> 10f492: c7 00 09 00 00 00 movl $0x9,(%eax) 10f498: b8 ff ff ff ff mov $0xffffffff,%eax 10f49d: eb a2 jmp 10f441 <_POSIX_Message_queue_Send_support+0x79> 10f49f: 90 nop msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 10f4a0: e8 77 9c 00 00 call 11911c <__errno> 10f4a5: 89 c6 mov %eax,%esi 10f4a7: 83 ec 0c sub $0xc,%esp 10f4aa: 53 push %ebx 10f4ab: e8 f8 00 00 00 call 10f5a8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10f4b0: 89 06 mov %eax,(%esi) 10f4b2: 83 c4 10 add $0x10,%esp 10f4b5: b8 ff ff ff ff mov $0xffffffff,%eax 10f4ba: eb 85 jmp 10f441 <_POSIX_Message_queue_Send_support+0x79> =============================================================================== 0010c68c <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10c68c: 55 push %ebp 10c68d: 89 e5 mov %esp,%ebp 10c68f: 56 push %esi 10c690: 53 push %ebx 10c691: 8b 5d 08 mov 0x8(%ebp),%ebx 10c694: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10c697: 85 db test %ebx,%ebx 10c699: 74 39 je 10c6d4 <_POSIX_Mutex_Get+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10c69b: 8b 03 mov (%ebx),%eax 10c69d: 83 f8 ff cmp $0xffffffff,%eax 10c6a0: 74 1a je 10c6bc <_POSIX_Mutex_Get+0x30> return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); 10c6a2: 52 push %edx 10c6a3: 56 push %esi 10c6a4: 50 push %eax 10c6a5: 68 60 ca 12 00 push $0x12ca60 10c6aa: e8 f1 29 00 00 call 10f0a0 <_Objects_Get> { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); return (POSIX_Mutex_Control *) 10c6af: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10c6b2: 8d 65 f8 lea -0x8(%ebp),%esp 10c6b5: 5b pop %ebx 10c6b6: 5e pop %esi 10c6b7: c9 leave 10c6b8: c3 ret 10c6b9: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations *location ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10c6bc: 83 ec 08 sub $0x8,%esp 10c6bf: 6a 00 push $0x0 10c6c1: 53 push %ebx 10c6c2: e8 b9 00 00 00 call 10c780 10c6c7: 83 c4 10 add $0x10,%esp 10c6ca: 85 c0 test %eax,%eax 10c6cc: 75 06 jne 10c6d4 <_POSIX_Mutex_Get+0x48> 10c6ce: 8b 03 mov (%ebx),%eax 10c6d0: eb d0 jmp 10c6a2 <_POSIX_Mutex_Get+0x16> 10c6d2: 66 90 xchg %ax,%ax 10c6d4: c7 06 01 00 00 00 movl $0x1,(%esi) 10c6da: 31 c0 xor %eax,%eax 10c6dc: eb d4 jmp 10c6b2 <_POSIX_Mutex_Get+0x26> =============================================================================== 0010c6e0 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10c6e0: 55 push %ebp 10c6e1: 89 e5 mov %esp,%ebp 10c6e3: 56 push %esi 10c6e4: 53 push %ebx 10c6e5: 8b 5d 08 mov 0x8(%ebp),%ebx 10c6e8: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10c6eb: 85 db test %ebx,%ebx 10c6ed: 74 39 je 10c728 <_POSIX_Mutex_Get_interrupt_disable+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10c6ef: 8b 03 mov (%ebx),%eax 10c6f1: 83 f8 ff cmp $0xffffffff,%eax 10c6f4: 74 1a je 10c710 <_POSIX_Mutex_Get_interrupt_disable+0x30> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10c6f6: ff 75 10 pushl 0x10(%ebp) 10c6f9: 56 push %esi 10c6fa: 50 push %eax 10c6fb: 68 60 ca 12 00 push $0x12ca60 10c700: e8 43 29 00 00 call 10f048 <_Objects_Get_isr_disable> 10c705: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10c708: 8d 65 f8 lea -0x8(%ebp),%esp 10c70b: 5b pop %ebx 10c70c: 5e pop %esi 10c70d: c9 leave 10c70e: c3 ret 10c70f: 90 nop ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10c710: 83 ec 08 sub $0x8,%esp 10c713: 6a 00 push $0x0 10c715: 53 push %ebx 10c716: e8 65 00 00 00 call 10c780 10c71b: 83 c4 10 add $0x10,%esp 10c71e: 85 c0 test %eax,%eax 10c720: 75 06 jne 10c728 <_POSIX_Mutex_Get_interrupt_disable+0x48> 10c722: 8b 03 mov (%ebx),%eax 10c724: eb d0 jmp 10c6f6 <_POSIX_Mutex_Get_interrupt_disable+0x16> 10c726: 66 90 xchg %ax,%ax 10c728: c7 06 01 00 00 00 movl $0x1,(%esi) 10c72e: 31 c0 xor %eax,%eax 10c730: eb d6 jmp 10c708 <_POSIX_Mutex_Get_interrupt_disable+0x28> =============================================================================== 0010c8e0 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10c8e0: 55 push %ebp 10c8e1: 89 e5 mov %esp,%ebp 10c8e3: 53 push %ebx 10c8e4: 83 ec 18 sub $0x18,%esp 10c8e7: 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 ); 10c8ea: 8d 45 f0 lea -0x10(%ebp),%eax 10c8ed: 50 push %eax 10c8ee: 8d 45 f4 lea -0xc(%ebp),%eax 10c8f1: 50 push %eax 10c8f2: ff 75 08 pushl 0x8(%ebp) 10c8f5: e8 e6 fd ff ff call 10c6e0 <_POSIX_Mutex_Get_interrupt_disable> switch ( location ) { 10c8fa: 83 c4 10 add $0x10,%esp 10c8fd: 8b 55 f4 mov -0xc(%ebp),%edx 10c900: 85 d2 test %edx,%edx 10c902: 75 34 jne 10c938 <_POSIX_Mutex_Lock_support+0x58> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10c904: 83 ec 0c sub $0xc,%esp 10c907: ff 75 f0 pushl -0x10(%ebp) 10c90a: ff 75 10 pushl 0x10(%ebp) 10c90d: 0f b6 db movzbl %bl,%ebx 10c910: 53 push %ebx 10c911: ff 70 08 pushl 0x8(%eax) 10c914: 83 c0 14 add $0x14,%eax 10c917: 50 push %eax 10c918: e8 53 1b 00 00 call 10e470 <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10c91d: 83 c4 14 add $0x14,%esp (CORE_mutex_Status) _Thread_Executing->Wait.return_code 10c920: a1 38 cc 12 00 mov 0x12cc38,%eax the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10c925: ff 70 34 pushl 0x34(%eax) 10c928: e8 1b 01 00 00 call 10ca48 <_POSIX_Mutex_Translate_core_mutex_return_code> 10c92d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c930: 8b 5d fc mov -0x4(%ebp),%ebx 10c933: c9 leave 10c934: c3 ret 10c935: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return EINVAL; 10c938: b8 16 00 00 00 mov $0x16,%eax } 10c93d: 8b 5d fc mov -0x4(%ebp),%ebx 10c940: c9 leave 10c941: c3 ret =============================================================================== 00113ed8 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 113ed8: 55 push %ebp 113ed9: 89 e5 mov %esp,%ebp 113edb: 56 push %esi 113edc: 53 push %ebx 113edd: 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) 113ee0: 8b 55 0c mov 0xc(%ebp),%edx 113ee3: 85 d2 test %edx,%edx 113ee5: 0f 85 b9 00 00 00 jne 113fa4 <_POSIX_Semaphore_Create_support+0xcc> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 113eeb: 85 db test %ebx,%ebx 113eed: 74 1c je 113f0b <_POSIX_Semaphore_Create_support+0x33> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 113eef: 83 ec 08 sub $0x8,%esp 113ef2: 68 ff 00 00 00 push $0xff 113ef7: 53 push %ebx 113ef8: e8 3b 43 00 00 call 118238 113efd: 83 c4 10 add $0x10,%esp 113f00: 3d fe 00 00 00 cmp $0xfe,%eax 113f05: 0f 87 ad 00 00 00 ja 113fb8 <_POSIX_Semaphore_Create_support+0xe0> 113f0b: a1 ec c6 12 00 mov 0x12c6ec,%eax 113f10: 40 inc %eax 113f11: a3 ec c6 12 00 mov %eax,0x12c6ec */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) _Objects_Allocate( &_POSIX_Semaphore_Information ); 113f16: 83 ec 0c sub $0xc,%esp 113f19: 68 00 ca 12 00 push $0x12ca00 113f1e: e8 b5 b7 ff ff call 10f6d8 <_Objects_Allocate> 113f23: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 113f25: 83 c4 10 add $0x10,%esp 113f28: 85 c0 test %eax,%eax 113f2a: 0f 84 9a 00 00 00 je 113fca <_POSIX_Semaphore_Create_support+0xf2> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 113f30: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 113f37: 85 db test %ebx,%ebx 113f39: 74 55 je 113f90 <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; 113f3b: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 113f3f: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 113f46: 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; 113f4a: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 113f51: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 113f58: 50 push %eax 113f59: 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; 113f5c: 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 ); 113f5f: 50 push %eax 113f60: 8d 46 1c lea 0x1c(%esi),%eax 113f63: 50 push %eax 113f64: e8 f7 b1 ff ff call 10f160 <_CORE_semaphore_Initialize> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 113f69: 0f b7 56 08 movzwl 0x8(%esi),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113f6d: a1 1c ca 12 00 mov 0x12ca1c,%eax 113f72: 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; 113f75: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 113f78: 8b 45 14 mov 0x14(%ebp),%eax 113f7b: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 113f7d: e8 9a c7 ff ff call 11071c <_Thread_Enable_dispatch> return 0; 113f82: 83 c4 10 add $0x10,%esp 113f85: 31 c0 xor %eax,%eax } 113f87: 8d 65 f8 lea -0x8(%ebp),%esp 113f8a: 5b pop %ebx 113f8b: 5e pop %esi 113f8c: c9 leave 113f8d: c3 ret 113f8e: 66 90 xchg %ax,%ax if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 113f90: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 113f94: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 113f9b: c6 40 15 00 movb $0x0,0x15(%eax) 113f9f: eb a9 jmp 113f4a <_POSIX_Semaphore_Create_support+0x72> 113fa1: 8d 76 00 lea 0x0(%esi),%esi 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 ); 113fa4: e8 63 31 00 00 call 11710c <__errno> 113fa9: c7 00 58 00 00 00 movl $0x58,(%eax) 113faf: b8 ff ff ff ff mov $0xffffffff,%eax 113fb4: eb d1 jmp 113f87 <_POSIX_Semaphore_Create_support+0xaf> 113fb6: 66 90 xchg %ax,%ax if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 113fb8: e8 4f 31 00 00 call 11710c <__errno> 113fbd: c7 00 5b 00 00 00 movl $0x5b,(%eax) 113fc3: b8 ff ff ff ff mov $0xffffffff,%eax 113fc8: eb bd jmp 113f87 <_POSIX_Semaphore_Create_support+0xaf> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 113fca: e8 4d c7 ff ff call 11071c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 113fcf: e8 38 31 00 00 call 11710c <__errno> 113fd4: c7 00 1c 00 00 00 movl $0x1c,(%eax) 113fda: b8 ff ff ff ff mov $0xffffffff,%eax 113fdf: eb a6 jmp 113f87 <_POSIX_Semaphore_Create_support+0xaf> =============================================================================== 00113fe4 <_POSIX_Semaphore_Delete>: */ void _POSIX_Semaphore_Delete( POSIX_Semaphore_Control *the_semaphore ) { 113fe4: 55 push %ebp 113fe5: 89 e5 mov %esp,%ebp 113fe7: 53 push %ebx 113fe8: 83 ec 04 sub $0x4,%esp 113feb: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !the_semaphore->linked && !the_semaphore->open_count ) { 113fee: 80 7b 15 00 cmpb $0x0,0x15(%ebx) 113ff2: 75 07 jne 113ffb <_POSIX_Semaphore_Delete+0x17> 113ff4: 8b 4b 18 mov 0x18(%ebx),%ecx 113ff7: 85 c9 test %ecx,%ecx 113ff9: 74 05 je 114000 <_POSIX_Semaphore_Delete+0x1c><== NEVER TAKEN -1 ); _POSIX_Semaphore_Free( the_semaphore ); } } 113ffb: 8b 5d fc mov -0x4(%ebp),%ebx 113ffe: c9 leave 113fff: c3 ret void _POSIX_Semaphore_Delete( POSIX_Semaphore_Control *the_semaphore ) { if ( !the_semaphore->linked && !the_semaphore->open_count ) { _Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 114000: 83 ec 08 sub $0x8,%esp 114003: 53 push %ebx 114004: 68 00 ca 12 00 push $0x12ca00 114009: e8 46 b7 ff ff call 10f754 <_Objects_Close> _CORE_semaphore_Flush( 11400e: 83 c4 0c add $0xc,%esp 114011: 6a ff push $0xffffffff 114013: 6a 00 push $0x0 114015: 8d 43 1c lea 0x1c(%ebx),%eax 114018: 50 push %eax 114019: e8 36 b1 ff ff call 10f154 <_CORE_semaphore_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 11401e: 58 pop %eax 11401f: 5a pop %edx 114020: 53 push %ebx 114021: 68 00 ca 12 00 push $0x12ca00 114026: e8 21 ba ff ff call 10fa4c <_Objects_Free> 11402b: 83 c4 10 add $0x10,%esp -1 ); _POSIX_Semaphore_Free( the_semaphore ); } } 11402e: 8b 5d fc mov -0x4(%ebp),%ebx 114031: c9 leave 114032: c3 ret =============================================================================== 00114034 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 114034: 55 push %ebp 114035: 89 e5 mov %esp,%ebp 114037: 83 ec 18 sub $0x18,%esp 11403a: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 11403d: 85 c0 test %eax,%eax 11403f: 74 05 je 114046 <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 114041: 80 38 00 cmpb $0x0,(%eax) 114044: 75 0a jne 114050 <_POSIX_Semaphore_Name_to_id+0x1c> return EINVAL; 114046: b8 16 00 00 00 mov $0x16,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 11404b: c9 leave 11404c: c3 ret 11404d: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 114050: 52 push %edx 114051: 8d 55 f4 lea -0xc(%ebp),%edx 114054: 52 push %edx 114055: 50 push %eax 114056: 68 00 ca 12 00 push $0x12ca00 11405b: e8 d4 11 00 00 call 115234 <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 114060: 8b 4d f4 mov -0xc(%ebp),%ecx 114063: 8b 55 0c mov 0xc(%ebp),%edx 114066: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 114068: 83 c4 10 add $0x10,%esp return 0; 11406b: 83 f8 01 cmp $0x1,%eax 11406e: 19 c0 sbb %eax,%eax 114070: f7 d0 not %eax 114072: 83 e0 02 and $0x2,%eax return ENOENT; } 114075: c9 leave 114076: c3 ret =============================================================================== 001140a0 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 1140a0: 55 push %ebp 1140a1: 89 e5 mov %esp,%ebp 1140a3: 53 push %ebx 1140a4: 83 ec 18 sub $0x18,%esp 1140a7: 8a 5d 0c mov 0xc(%ebp),%bl POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 1140aa: 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 ); 1140ad: 50 push %eax 1140ae: 8b 45 08 mov 0x8(%ebp),%eax 1140b1: ff 30 pushl (%eax) 1140b3: 68 00 ca 12 00 push $0x12ca00 1140b8: e8 cf ba ff ff call 10fb8c <_Objects_Get> switch ( location ) { 1140bd: 83 c4 10 add $0x10,%esp 1140c0: 8b 55 f4 mov -0xc(%ebp),%edx 1140c3: 85 d2 test %edx,%edx 1140c5: 74 15 je 1140dc <_POSIX_Semaphore_Wait_support+0x3c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 1140c7: e8 40 30 00 00 call 11710c <__errno> 1140cc: c7 00 16 00 00 00 movl $0x16,(%eax) 1140d2: b8 ff ff ff ff mov $0xffffffff,%eax } 1140d7: 8b 5d fc mov -0x4(%ebp),%ebx 1140da: c9 leave 1140db: c3 ret the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 1140dc: ff 75 10 pushl 0x10(%ebp) 1140df: 0f b6 db movzbl %bl,%ebx 1140e2: 53 push %ebx 1140e3: ff 70 08 pushl 0x8(%eax) 1140e6: 83 c0 1c add $0x1c,%eax 1140e9: 50 push %eax 1140ea: e8 6d 0c 00 00 call 114d5c <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 1140ef: e8 28 c6 ff ff call 11071c <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 1140f4: 83 c4 10 add $0x10,%esp 1140f7: a1 98 cc 12 00 mov 0x12cc98,%eax 1140fc: 8b 40 34 mov 0x34(%eax),%eax 1140ff: 85 c0 test %eax,%eax 114101: 75 09 jne 11410c <_POSIX_Semaphore_Wait_support+0x6c> return 0; 114103: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 114105: 8b 5d fc mov -0x4(%ebp),%ebx 114108: c9 leave 114109: c3 ret 11410a: 66 90 xchg %ax,%ax _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one( 11410c: e8 fb 2f 00 00 call 11710c <__errno> 114111: 89 c3 mov %eax,%ebx 114113: 83 ec 0c sub $0xc,%esp 114116: a1 98 cc 12 00 mov 0x12cc98,%eax 11411b: ff 70 34 pushl 0x34(%eax) 11411e: e8 6d 2a 00 00 call 116b90 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 114123: 89 03 mov %eax,(%ebx) 114125: 83 c4 10 add $0x10,%esp 114128: b8 ff ff ff ff mov $0xffffffff,%eax 11412d: eb a8 jmp 1140d7 <_POSIX_Semaphore_Wait_support+0x37> =============================================================================== 0010fc6c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 10fc6c: 55 push %ebp 10fc6d: 89 e5 mov %esp,%ebp 10fc6f: 83 ec 08 sub $0x8,%esp 10fc72: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10fc75: 8b 82 ec 00 00 00 mov 0xec(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10fc7b: 8b 88 d8 00 00 00 mov 0xd8(%eax),%ecx 10fc81: 85 c9 test %ecx,%ecx 10fc83: 75 09 jne 10fc8e <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN 10fc85: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax) 10fc8c: 74 06 je 10fc94 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 10fc8e: 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(); 10fc8f: e9 bc d4 ff ff jmp 10d150 <_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 && 10fc94: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax 10fc9a: 85 c0 test %eax,%eax 10fc9c: 74 f0 je 10fc8e <_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; 10fc9e: a1 6c 8a 12 00 mov 0x128a6c,%eax 10fca3: 48 dec %eax 10fca4: a3 6c 8a 12 00 mov %eax,0x128a6c thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 10fca9: 83 ec 08 sub $0x8,%esp 10fcac: 6a ff push $0xffffffff 10fcae: 52 push %edx 10fcaf: e8 c0 08 00 00 call 110574 <_POSIX_Thread_Exit> 10fcb4: 83 c4 10 add $0x10,%esp } else _Thread_Enable_dispatch(); } 10fcb7: c9 leave 10fcb8: c3 ret =============================================================================== 00110fcc <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 110fcc: 55 push %ebp 110fcd: 89 e5 mov %esp,%ebp 110fcf: 57 push %edi 110fd0: 56 push %esi 110fd1: 53 push %ebx 110fd2: 83 ec 18 sub $0x18,%esp 110fd5: 8b 5d 08 mov 0x8(%ebp),%ebx 110fd8: 8b 75 0c mov 0xc(%ebp),%esi 110fdb: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 110fde: ff 36 pushl (%esi) 110fe0: e8 cb ff ff ff call 110fb0 <_POSIX_Priority_Is_valid> 110fe5: 83 c4 10 add $0x10,%esp 110fe8: 84 c0 test %al,%al 110fea: 74 2a je 111016 <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 110fec: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 110ff2: 8b 45 14 mov 0x14(%ebp),%eax 110ff5: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 110ffb: 85 db test %ebx,%ebx 110ffd: 74 25 je 111024 <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 110fff: 83 fb 01 cmp $0x1,%ebx 111002: 0f 84 90 00 00 00 je 111098 <_POSIX_Thread_Translate_sched_param+0xcc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 111008: 83 fb 02 cmp $0x2,%ebx 11100b: 0f 84 8f 00 00 00 je 1110a0 <_POSIX_Thread_Translate_sched_param+0xd4> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 111011: 83 fb 04 cmp $0x4,%ebx 111014: 74 1e je 111034 <_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; 111016: b8 16 00 00 00 mov $0x16,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 11101b: 8d 65 f4 lea -0xc(%ebp),%esp 11101e: 5b pop %ebx 11101f: 5e pop %esi 111020: 5f pop %edi 111021: c9 leave 111022: c3 ret 111023: 90 nop *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 111024: c7 07 01 00 00 00 movl $0x1,(%edi) return 0; 11102a: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 11102c: 8d 65 f4 lea -0xc(%ebp),%esp 11102f: 5b pop %ebx 111030: 5e pop %esi 111031: 5f pop %edi 111032: c9 leave 111033: 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) && 111034: 8b 5e 08 mov 0x8(%esi),%ebx 111037: 85 db test %ebx,%ebx 111039: 75 07 jne 111042 <_POSIX_Thread_Translate_sched_param+0x76> 11103b: 8b 4e 0c mov 0xc(%esi),%ecx 11103e: 85 c9 test %ecx,%ecx 111040: 74 d4 je 111016 <_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) && 111042: 8b 56 10 mov 0x10(%esi),%edx 111045: 85 d2 test %edx,%edx 111047: 75 07 jne 111050 <_POSIX_Thread_Translate_sched_param+0x84> 111049: 8b 46 14 mov 0x14(%esi),%eax 11104c: 85 c0 test %eax,%eax 11104e: 74 c6 je 111016 <_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 ) < 111050: 83 ec 0c sub $0xc,%esp 111053: 8d 46 08 lea 0x8(%esi),%eax 111056: 50 push %eax 111057: e8 fc d7 ff ff call 10e858 <_Timespec_To_ticks> 11105c: 89 c3 mov %eax,%ebx _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 11105e: 8d 46 10 lea 0x10(%esi),%eax 111061: 89 04 24 mov %eax,(%esp) 111064: e8 ef d7 ff ff call 10e858 <_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 ) < 111069: 83 c4 10 add $0x10,%esp 11106c: 39 c3 cmp %eax,%ebx 11106e: 72 a6 jb 111016 <_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 ) ) 111070: 83 ec 0c sub $0xc,%esp 111073: ff 76 04 pushl 0x4(%esi) 111076: e8 35 ff ff ff call 110fb0 <_POSIX_Priority_Is_valid> 11107b: 83 c4 10 add $0x10,%esp 11107e: 84 c0 test %al,%al 111080: 74 94 je 111016 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 111082: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 111088: 8b 45 14 mov 0x14(%ebp),%eax 11108b: c7 00 bc b2 10 00 movl $0x10b2bc,(%eax) return 0; 111091: 31 c0 xor %eax,%eax 111093: eb 86 jmp 11101b <_POSIX_Thread_Translate_sched_param+0x4f> 111095: 8d 76 00 lea 0x0(%esi),%esi return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 111098: 31 c0 xor %eax,%eax 11109a: e9 7c ff ff ff jmp 11101b <_POSIX_Thread_Translate_sched_param+0x4f> 11109f: 90 nop } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 1110a0: c7 07 02 00 00 00 movl $0x2,(%edi) return 0; 1110a6: 31 c0 xor %eax,%eax 1110a8: e9 6e ff ff ff jmp 11101b <_POSIX_Thread_Translate_sched_param+0x4f> =============================================================================== 0010fef8 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 10fef8: 55 push %ebp 10fef9: 89 e5 mov %esp,%ebp 10fefb: 57 push %edi 10fefc: 56 push %esi 10fefd: 53 push %ebx 10fefe: 83 ec 28 sub $0x28,%esp 10ff01: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 10ff04: 68 f0 00 00 00 push $0xf0 10ff09: 89 55 e4 mov %edx,-0x1c(%ebp) 10ff0c: e8 4b de ff ff call 10dd5c <_Workspace_Allocate> 10ff11: 89 c3 mov %eax,%ebx if ( !api ) 10ff13: 83 c4 10 add $0x10,%esp 10ff16: 85 c0 test %eax,%eax 10ff18: 8b 55 e4 mov -0x1c(%ebp),%edx 10ff1b: 0f 84 2f 01 00 00 je 110050 <_POSIX_Threads_Create_extension+0x158> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 10ff21: 89 82 ec 00 00 00 mov %eax,0xec(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 10ff27: b9 40 00 00 00 mov $0x40,%ecx 10ff2c: 31 c0 xor %eax,%eax 10ff2e: 89 df mov %ebx,%edi 10ff30: f3 aa rep stos %al,%es:(%edi) 10ff32: c7 03 01 00 00 00 movl $0x1,(%ebx) 10ff38: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) 10ff3f: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx) 10ff46: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx) 10ff4d: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) 10ff54: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 10ff5b: c7 43 40 01 00 00 00 movl $0x1,0x40(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 10ff62: c7 83 84 00 00 00 01 movl $0x1,0x84(%ebx) 10ff69: 00 00 00 api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 10ff6c: be 58 16 12 00 mov $0x121658,%esi 10ff71: 8d bb 88 00 00 00 lea 0x88(%ebx),%edi 10ff77: b1 07 mov $0x7,%cl 10ff79: 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); 10ff7b: 0f b6 05 54 35 12 00 movzbl 0x123554,%eax 10ff82: 2b 42 14 sub 0x14(%edx),%eax 10ff85: 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; 10ff8b: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx) 10ff92: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 10ff95: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx) 10ff9c: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 10ff9f: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 10ffa6: 00 00 00 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10ffa9: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10ffaf: 89 83 e4 00 00 00 mov %eax,0xe4(%ebx) head->next = tail; head->previous = NULL; 10ffb5: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10ffbc: 00 00 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 10ffbf: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax 10ffc5: 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; 10ffcb: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 10ffd2: 00 00 00 10ffd5: 0f b6 42 0b movzbl 0xb(%edx),%eax 10ffd9: 83 e0 07 and $0x7,%eax if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 10ffdc: 83 f8 03 cmp $0x3,%eax 10ffdf: 74 53 je 110034 <_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; 10ffe1: c7 83 d0 00 00 00 ff movl $0xffffffff,0xd0(%ebx) 10ffe8: ff ff ff } _Thread_queue_Initialize( 10ffeb: 6a 00 push $0x0 10ffed: 68 00 10 00 00 push $0x1000 10fff2: 6a 00 push $0x0 10fff4: 8d 43 44 lea 0x44(%ebx),%eax 10fff7: 50 push %eax 10fff8: 89 55 e4 mov %edx,-0x1c(%ebp) 10fffb: e8 90 d4 ff ff call 10d490 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 110000: 8b 55 e4 mov -0x1c(%ebp),%edx 110003: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 110006: c7 83 b0 00 00 00 00 movl $0x0,0xb0(%ebx) 11000d: 00 00 00 the_watchdog->routine = routine; 110010: c7 83 c4 00 00 00 5c movl $0x11005c,0xc4(%ebx) 110017: 00 11 00 the_watchdog->id = id; 11001a: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) the_watchdog->user_data = user_data; 110020: 89 93 cc 00 00 00 mov %edx,0xcc(%ebx) _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 110026: 83 c4 10 add $0x10,%esp 110029: b0 01 mov $0x1,%al } 11002b: 8d 65 f4 lea -0xc(%ebp),%esp 11002e: 5b pop %ebx 11002f: 5e pop %esi 110030: 5f pop %edi 110031: c9 leave 110032: c3 ret 110033: 90 nop 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 ]; 110034: a1 98 7d 12 00 mov 0x127d98,%eax api->signals_blocked = executing_api->signals_blocked; 110039: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax 11003f: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 110045: 89 83 d0 00 00 00 mov %eax,0xd0(%ebx) 11004b: eb 9e jmp 10ffeb <_POSIX_Threads_Create_extension+0xf3> 11004d: 8d 76 00 lea 0x0(%esi),%esi POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) return false; 110050: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 110052: 8d 65 f4 lea -0xc(%ebp),%esp 110055: 5b pop %ebx 110056: 5e pop %esi 110057: 5f pop %edi 110058: c9 leave 110059: c3 ret =============================================================================== 0010fe70 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 10fe70: 55 push %ebp 10fe71: 89 e5 mov %esp,%ebp 10fe73: 57 push %edi 10fe74: 56 push %esi 10fe75: 53 push %ebx 10fe76: 83 ec 28 sub $0x28,%esp 10fe79: 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 ]; 10fe7c: 8b 87 ec 00 00 00 mov 0xec(%edi),%eax 10fe82: 89 45 e4 mov %eax,-0x1c(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 10fe85: 57 push %edi 10fe86: e8 15 27 00 00 call 1125a0 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 10fe8b: 89 3c 24 mov %edi,(%esp) 10fe8e: e8 75 27 00 00 call 112608 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 10fe93: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 10fe96: 83 c4 10 add $0x10,%esp 10fe99: 8b 45 e4 mov -0x1c(%ebp),%eax 10fe9c: 8d 58 44 lea 0x44(%eax),%ebx 10fe9f: eb 08 jmp 10fea9 <_POSIX_Threads_Delete_extension+0x39> 10fea1: 8d 76 00 lea 0x0(%esi),%esi *(void **)the_thread->Wait.return_argument = value_ptr; 10fea4: 8b 40 28 mov 0x28(%eax),%eax 10fea7: 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 )) ) 10fea9: 83 ec 0c sub $0xc,%esp 10feac: 53 push %ebx 10fead: e8 4e d2 ff ff call 10d100 <_Thread_queue_Dequeue> 10feb2: 83 c4 10 add $0x10,%esp 10feb5: 85 c0 test %eax,%eax 10feb7: 75 eb jne 10fea4 <_POSIX_Threads_Delete_extension+0x34> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 10feb9: 8b 45 e4 mov -0x1c(%ebp),%eax 10febc: 83 b8 84 00 00 00 04 cmpl $0x4,0x84(%eax) 10fec3: 74 1f je 10fee4 <_POSIX_Threads_Delete_extension+0x74> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 10fec5: c7 87 ec 00 00 00 00 movl $0x0,0xec(%edi) 10fecc: 00 00 00 _Workspace_Free( api ); 10fecf: 8b 45 e4 mov -0x1c(%ebp),%eax 10fed2: 89 45 08 mov %eax,0x8(%ebp) } 10fed5: 8d 65 f4 lea -0xc(%ebp),%esp 10fed8: 5b pop %ebx 10fed9: 5e pop %esi 10feda: 5f pop %edi 10fedb: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); 10fedc: e9 97 de ff ff jmp 10dd78 <_Workspace_Free> 10fee1: 8d 76 00 lea 0x0(%esi),%esi 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 ); 10fee4: 83 ec 0c sub $0xc,%esp 10fee7: 05 a8 00 00 00 add $0xa8,%eax 10feec: 50 push %eax 10feed: e8 42 dd ff ff call 10dc34 <_Watchdog_Remove> 10fef2: 83 c4 10 add $0x10,%esp 10fef5: eb ce jmp 10fec5 <_POSIX_Threads_Delete_extension+0x55> =============================================================================== 0010fe34 <_POSIX_Threads_Initialize_user_threads>: * * This routine creates and starts all configured user * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { 10fe34: 55 push %ebp 10fe35: 89 e5 mov %esp,%ebp 10fe37: 83 ec 08 sub $0x8,%esp if ( _POSIX_Threads_Initialize_user_threads_p ) 10fe3a: a1 b8 5a 12 00 mov 0x125ab8,%eax 10fe3f: 85 c0 test %eax,%eax 10fe41: 74 05 je 10fe48 <_POSIX_Threads_Initialize_user_threads+0x14> (*_POSIX_Threads_Initialize_user_threads_p)(); } 10fe43: c9 leave * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); 10fe44: ff e0 jmp *%eax 10fe46: 66 90 xchg %ax,%ax } 10fe48: c9 leave 10fe49: c3 ret =============================================================================== 0010af9c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10af9c: 55 push %ebp 10af9d: 89 e5 mov %esp,%ebp 10af9f: 57 push %edi 10afa0: 56 push %esi 10afa1: 53 push %ebx 10afa2: 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; 10afa5: 8b 3d d4 47 12 00 mov 0x1247d4,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10afab: a1 d0 47 12 00 mov 0x1247d0,%eax 10afb0: 89 45 94 mov %eax,-0x6c(%ebp) if ( !user_threads || maximum == 0 ) 10afb3: 85 ff test %edi,%edi 10afb5: 74 44 je 10affb <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10afb7: 85 c0 test %eax,%eax 10afb9: 74 40 je 10affb <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10afbb: 31 db xor %ebx,%ebx 10afbd: 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 ); 10afc0: 83 ec 0c sub $0xc,%esp 10afc3: 56 push %esi 10afc4: e8 e7 60 00 00 call 1110b0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10afc9: 5a pop %edx 10afca: 59 pop %ecx 10afcb: 6a 02 push $0x2 10afcd: 56 push %esi 10afce: e8 09 61 00 00 call 1110dc (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10afd3: 59 pop %ecx 10afd4: 58 pop %eax 10afd5: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10afd9: 56 push %esi 10afda: e8 31 61 00 00 call 111110 status = pthread_create( 10afdf: 6a 00 push $0x0 10afe1: ff 34 df pushl (%edi,%ebx,8) 10afe4: 56 push %esi 10afe5: 8d 45 e4 lea -0x1c(%ebp),%eax 10afe8: 50 push %eax 10afe9: e8 92 fc ff ff call 10ac80 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10afee: 83 c4 20 add $0x20,%esp 10aff1: 85 c0 test %eax,%eax 10aff3: 75 0e jne 10b003 <_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++ ) { 10aff5: 43 inc %ebx 10aff6: 39 5d 94 cmp %ebx,-0x6c(%ebp) 10aff9: 77 c5 ja 10afc0 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10affb: 8d 65 f4 lea -0xc(%ebp),%esp 10affe: 5b pop %ebx 10afff: 5e pop %esi 10b000: 5f pop %edi 10b001: c9 leave 10b002: c3 ret &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10b003: 52 push %edx 10b004: 50 push %eax 10b005: 6a 01 push $0x1 10b007: 6a 02 push $0x2 10b009: e8 da 1c 00 00 call 10cce8 <_Internal_error_Occurred> =============================================================================== 0011005c <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 11005c: 55 push %ebp 11005d: 89 e5 mov %esp,%ebp 11005f: 56 push %esi 110060: 53 push %ebx 110061: 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 ]; 110064: 8b 9e ec 00 00 00 mov 0xec(%esi),%ebx /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 11006a: 83 ec 0c sub $0xc,%esp 11006d: 8d 83 98 00 00 00 lea 0x98(%ebx),%eax 110073: 50 push %eax 110074: e8 97 13 00 00 call 111410 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 110079: 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); 11007c: 0f b6 05 54 35 12 00 movzbl 0x123554,%eax 110083: 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; 110089: 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 ) { 11008c: 83 c4 10 add $0x10,%esp 11008f: 8b 4e 1c mov 0x1c(%esi),%ecx 110092: 85 c9 test %ecx,%ecx 110094: 75 05 jne 11009b <_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 ) { 110096: 39 46 14 cmp %eax,0x14(%esi) 110099: 77 35 ja 1100d0 <_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 ); 11009b: 83 ec 0c sub $0xc,%esp 11009e: 8d 83 90 00 00 00 lea 0x90(%ebx),%eax 1100a4: 50 push %eax 1100a5: e8 66 13 00 00 call 111410 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1100aa: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1100b0: 83 c4 10 add $0x10,%esp _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 1100b3: 81 c3 a8 00 00 00 add $0xa8,%ebx 1100b9: 89 5d 0c mov %ebx,0xc(%ebp) 1100bc: c7 45 08 c0 78 12 00 movl $0x1278c0,0x8(%ebp) } 1100c3: 8d 65 f8 lea -0x8(%ebp),%esp 1100c6: 5b pop %ebx 1100c7: 5e pop %esi 1100c8: c9 leave 1100c9: e9 26 da ff ff jmp 10daf4 <_Watchdog_Insert> 1100ce: 66 90 xchg %ax,%ax 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 ); 1100d0: 52 push %edx 1100d1: 6a 01 push $0x1 1100d3: 50 push %eax 1100d4: 56 push %esi 1100d5: e8 6e c8 ff ff call 10c948 <_Thread_Change_priority> 1100da: 83 c4 10 add $0x10,%esp 1100dd: eb bc jmp 11009b <_POSIX_Threads_Sporadic_budget_TSR+0x3f> =============================================================================== 001100e0 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 1100e0: 55 push %ebp 1100e1: 89 e5 mov %esp,%ebp 1100e3: 83 ec 08 sub $0x8,%esp 1100e6: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1100e9: 8b 88 ec 00 00 00 mov 0xec(%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 */ 1100ef: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) 1100f6: 0f b6 15 54 35 12 00 movzbl 0x123554,%edx 1100fd: 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; 110103: 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 ) { 110106: 8b 48 1c mov 0x1c(%eax),%ecx 110109: 85 c9 test %ecx,%ecx 11010b: 75 05 jne 110112 <_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 ) { 11010d: 39 50 14 cmp %edx,0x14(%eax) 110110: 72 02 jb 110114 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 110112: c9 leave <== NOT EXECUTED 110113: 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 ); 110114: 51 push %ecx 110115: 6a 01 push $0x1 110117: 52 push %edx 110118: 50 push %eax 110119: e8 2a c8 ff ff call 10c948 <_Thread_Change_priority> 11011e: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 110121: c9 leave 110122: c3 ret =============================================================================== 001125a0 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 1125a0: 55 push %ebp 1125a1: 89 e5 mov %esp,%ebp 1125a3: 57 push %edi 1125a4: 56 push %esi 1125a5: 53 push %ebx 1125a6: 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 ]; 1125a9: 8b 45 08 mov 0x8(%ebp),%eax 1125ac: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 1125b2: c7 86 d8 00 00 00 01 movl $0x1,0xd8(%esi) 1125b9: 00 00 00 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 1125bc: 8d be e8 00 00 00 lea 0xe8(%esi),%edi while ( !_Chain_Is_empty( handler_stack ) ) { 1125c2: 39 be e4 00 00 00 cmp %edi,0xe4(%esi) 1125c8: 74 33 je 1125fd <_POSIX_Threads_cancel_run+0x5d> 1125ca: 66 90 xchg %ax,%ax _ISR_Disable( level ); 1125cc: 9c pushf 1125cd: fa cli 1125ce: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 1125cf: 8b 9e ec 00 00 00 mov 0xec(%esi),%ebx ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1125d5: 8b 13 mov (%ebx),%edx previous = the_node->previous; 1125d7: 8b 43 04 mov 0x4(%ebx),%eax next->previous = previous; 1125da: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 1125dd: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 1125df: 51 push %ecx 1125e0: 9d popf (*handler->routine)( handler->arg ); 1125e1: 83 ec 0c sub $0xc,%esp 1125e4: ff 73 0c pushl 0xc(%ebx) 1125e7: ff 53 08 call *0x8(%ebx) _Workspace_Free( handler ); 1125ea: 89 1c 24 mov %ebx,(%esp) 1125ed: e8 86 b7 ff ff call 10dd78 <_Workspace_Free> handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 1125f2: 83 c4 10 add $0x10,%esp 1125f5: 39 be e4 00 00 00 cmp %edi,0xe4(%esi) 1125fb: 75 cf jne 1125cc <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 1125fd: 8d 65 f4 lea -0xc(%ebp),%esp 112600: 5b pop %ebx 112601: 5e pop %esi 112602: 5f pop %edi 112603: c9 leave 112604: c3 ret =============================================================================== 00110db8 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 110db8: 55 push %ebp 110db9: 89 e5 mov %esp,%ebp 110dbb: 56 push %esi 110dbc: 53 push %ebx 110dbd: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 110dc0: 83 ec 0c sub $0xc,%esp 110dc3: 53 push %ebx 110dc4: e8 f3 d8 ff ff call 10e6bc <_Watchdog_Remove> _ISR_Disable( level ); 110dc9: 9c pushf 110dca: fa cli 110dcb: 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 ) { 110dcc: 83 c4 10 add $0x10,%esp 110dcf: 8b 43 08 mov 0x8(%ebx),%eax 110dd2: 85 c0 test %eax,%eax 110dd4: 74 0e je 110de4 <_POSIX_Timer_Insert_helper+0x2c> _ISR_Enable( level ); 110dd6: 56 push %esi 110dd7: 9d popf return false; 110dd8: 31 c0 xor %eax,%eax */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 110dda: 8d 65 f8 lea -0x8(%ebp),%esp 110ddd: 5b pop %ebx 110dde: 5e pop %esi 110ddf: c9 leave 110de0: c3 ret 110de1: 8d 76 00 lea 0x0(%esi),%esi Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 110de4: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 110deb: 8b 45 14 mov 0x14(%ebp),%eax 110dee: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 110df1: 8b 45 10 mov 0x10(%ebp),%eax 110df4: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 110df7: 8b 45 18 mov 0x18(%ebp),%eax 110dfa: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 110dfd: 8b 45 0c mov 0xc(%ebp),%eax 110e00: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 110e03: 83 ec 08 sub $0x8,%esp 110e06: 53 push %ebx 110e07: 68 60 9b 12 00 push $0x129b60 110e0c: e8 6b d7 ff ff call 10e57c <_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 ); 110e11: 56 push %esi 110e12: 9d popf return true; 110e13: 83 c4 10 add $0x10,%esp 110e16: b0 01 mov $0x1,%al } 110e18: 8d 65 f8 lea -0x8(%ebp),%esp 110e1b: 5b pop %ebx 110e1c: 5e pop %esi 110e1d: c9 leave 110e1e: c3 ret =============================================================================== 0010ad9c <_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) { 10ad9c: 55 push %ebp 10ad9d: 89 e5 mov %esp,%ebp 10ad9f: 53 push %ebx 10ada0: 83 ec 04 sub $0x4,%esp 10ada3: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10ada6: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10ada9: 8b 53 54 mov 0x54(%ebx),%edx 10adac: 85 d2 test %edx,%edx 10adae: 75 28 jne 10add8 <_POSIX_Timer_TSR+0x3c> 10adb0: 8b 43 58 mov 0x58(%ebx),%eax 10adb3: 85 c0 test %eax,%eax 10adb5: 75 21 jne 10add8 <_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; 10adb7: 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 ) ) { 10adbb: 83 ec 08 sub $0x8,%esp 10adbe: ff 73 44 pushl 0x44(%ebx) 10adc1: ff 73 38 pushl 0x38(%ebx) 10adc4: e8 83 5b 00 00 call 11094c } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10adc9: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10add0: 83 c4 10 add $0x10,%esp } 10add3: 8b 5d fc mov -0x4(%ebp),%ebx 10add6: c9 leave 10add7: 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( 10add8: 83 ec 0c sub $0xc,%esp 10addb: 53 push %ebx 10addc: 68 9c ad 10 00 push $0x10ad9c 10ade1: ff 73 08 pushl 0x8(%ebx) 10ade4: ff 73 64 pushl 0x64(%ebx) 10ade7: 8d 43 10 lea 0x10(%ebx),%eax 10adea: 50 push %eax 10adeb: e8 c8 5f 00 00 call 110db8 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10adf0: 83 c4 20 add $0x20,%esp 10adf3: 84 c0 test %al,%al 10adf5: 74 dc je 10add3 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10adf7: 83 ec 0c sub $0xc,%esp 10adfa: 8d 43 6c lea 0x6c(%ebx),%eax 10adfd: 50 push %eax 10adfe: e8 a9 14 00 00 call 10c2ac <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10ae03: c6 43 3c 03 movb $0x3,0x3c(%ebx) 10ae07: 83 c4 10 add $0x10,%esp 10ae0a: eb af jmp 10adbb <_POSIX_Timer_TSR+0x1f> =============================================================================== 0011268c <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 11268c: 55 push %ebp 11268d: 89 e5 mov %esp,%ebp 11268f: 57 push %edi 112690: 56 push %esi 112691: 53 push %ebx 112692: 83 ec 78 sub $0x78,%esp 112695: 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, 112698: 6a 01 push $0x1 11269a: 0f b6 45 10 movzbl 0x10(%ebp),%eax 11269e: 50 push %eax 11269f: 8d 55 dc lea -0x24(%ebp),%edx 1126a2: 52 push %edx 1126a3: 53 push %ebx 1126a4: ff 75 08 pushl 0x8(%ebp) 1126a7: 89 55 9c mov %edx,-0x64(%ebp) 1126aa: e8 b5 00 00 00 call 112764 <_POSIX_signals_Clear_signals> 1126af: 83 c4 20 add $0x20,%esp 1126b2: 84 c0 test %al,%al 1126b4: 8b 55 9c mov -0x64(%ebp),%edx 1126b7: 0f 84 9b 00 00 00 je 112758 <_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 ) 1126bd: 8d 04 5b lea (%ebx,%ebx,2),%eax 1126c0: c1 e0 02 shl $0x2,%eax 1126c3: 8b 88 08 7e 12 00 mov 0x127e08(%eax),%ecx 1126c9: 89 4d a4 mov %ecx,-0x5c(%ebp) 1126cc: 49 dec %ecx 1126cd: 0f 84 85 00 00 00 je 112758 <_POSIX_signals_Check_signal+0xcc><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 1126d3: 8b 75 08 mov 0x8(%ebp),%esi 1126d6: 8b b6 d0 00 00 00 mov 0xd0(%esi),%esi 1126dc: 89 75 a0 mov %esi,-0x60(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 1126df: 8b 88 04 7e 12 00 mov 0x127e04(%eax),%ecx 1126e5: 09 f1 or %esi,%ecx 1126e7: 8b 75 08 mov 0x8(%ebp),%esi 1126ea: 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, 1126f0: 8d 75 b4 lea -0x4c(%ebp),%esi 1126f3: 89 75 94 mov %esi,-0x6c(%ebp) 1126f6: 8b 35 98 7d 12 00 mov 0x127d98,%esi 1126fc: 83 c6 20 add $0x20,%esi 1126ff: b9 0a 00 00 00 mov $0xa,%ecx 112704: 8b 7d 94 mov -0x6c(%ebp),%edi 112707: 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 ) { 112709: 83 b8 00 7e 12 00 02 cmpl $0x2,0x127e00(%eax) 112710: 74 36 je 112748 <_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 ); 112712: 83 ec 0c sub $0xc,%esp 112715: 53 push %ebx 112716: ff 55 a4 call *-0x5c(%ebp) break; 112719: 83 c4 10 add $0x10,%esp } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 11271c: 8b 3d 98 7d 12 00 mov 0x127d98,%edi 112722: 83 c7 20 add $0x20,%edi 112725: b9 0a 00 00 00 mov $0xa,%ecx 11272a: 8b 75 94 mov -0x6c(%ebp),%esi 11272d: 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; 11272f: 8b 55 a0 mov -0x60(%ebp),%edx 112732: 8b 45 08 mov 0x8(%ebp),%eax 112735: 89 90 d0 00 00 00 mov %edx,0xd0(%eax) return true; 11273b: b0 01 mov $0x1,%al } 11273d: 8d 65 f4 lea -0xc(%ebp),%esp 112740: 5b pop %ebx 112741: 5e pop %esi 112742: 5f pop %edi 112743: c9 leave 112744: c3 ret 112745: 8d 76 00 lea 0x0(%esi),%esi /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 112748: 50 push %eax 112749: 6a 00 push $0x0 11274b: 52 push %edx 11274c: 53 push %ebx 11274d: ff 55 a4 call *-0x5c(%ebp) signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 112750: 83 c4 10 add $0x10,%esp 112753: eb c7 jmp 11271c <_POSIX_signals_Check_signal+0x90> 112755: 8d 76 00 lea 0x0(%esi),%esi /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) return false; 112758: 31 c0 xor %eax,%eax * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } 11275a: 8d 65 f4 lea -0xc(%ebp),%esp 11275d: 5b pop %ebx 11275e: 5e pop %esi 11275f: 5f pop %edi 112760: c9 leave 112761: c3 ret =============================================================================== 00112e00 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 112e00: 55 push %ebp 112e01: 89 e5 mov %esp,%ebp 112e03: 53 push %ebx 112e04: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 112e07: 9c pushf 112e08: fa cli 112e09: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 112e0a: 8d 04 49 lea (%ecx,%ecx,2),%eax 112e0d: c1 e0 02 shl $0x2,%eax 112e10: 83 b8 00 7e 12 00 02 cmpl $0x2,0x127e00(%eax) 112e17: 74 13 je 112e2c <_POSIX_signals_Clear_process_signals+0x2c> 112e19: 49 dec %ecx 112e1a: 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; 112e1f: d3 c0 rol %cl,%eax 112e21: 21 05 08 80 12 00 and %eax,0x128008 } _ISR_Enable( level ); 112e27: 52 push %edx 112e28: 9d popf } 112e29: 5b pop %ebx 112e2a: c9 leave 112e2b: c3 ret RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 112e2c: 8d 98 24 80 12 00 lea 0x128024(%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 ] ) ) 112e32: 39 98 20 80 12 00 cmp %ebx,0x128020(%eax) 112e38: 75 ed jne 112e27 <_POSIX_signals_Clear_process_signals+0x27><== NEVER TAKEN 112e3a: eb dd jmp 112e19 <_POSIX_signals_Clear_process_signals+0x19> =============================================================================== 00112764 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 112764: 55 push %ebp 112765: 89 e5 mov %esp,%ebp 112767: 57 push %edi 112768: 56 push %esi 112769: 53 push %ebx 11276a: 83 ec 1c sub $0x1c,%esp 11276d: 8b 5d 0c mov 0xc(%ebp),%ebx 112770: 0f b6 7d 14 movzbl 0x14(%ebp),%edi static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 112774: 8d 4b ff lea -0x1(%ebx),%ecx 112777: b8 01 00 00 00 mov $0x1,%eax 11277c: 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 ) 11277e: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 112782: 74 40 je 1127c4 <_POSIX_signals_Clear_signals+0x60> signals_blocked = ~api->signals_blocked; 112784: 8b 55 08 mov 0x8(%ebp),%edx 112787: 8b 8a d0 00 00 00 mov 0xd0(%edx),%ecx 11278d: 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 ); 11278f: 9c pushf 112790: fa cli 112791: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 112794: 89 fa mov %edi,%edx 112796: 84 d2 test %dl,%dl 112798: 74 32 je 1127cc <_POSIX_signals_Clear_signals+0x68> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 11279a: 23 05 08 80 12 00 and 0x128008,%eax 1127a0: 85 c8 test %ecx,%eax 1127a2: 74 54 je 1127f8 <_POSIX_signals_Clear_signals+0x94> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 1127a4: 8d 14 5b lea (%ebx,%ebx,2),%edx 1127a7: c1 e2 02 shl $0x2,%edx 1127aa: 83 ba 00 7e 12 00 02 cmpl $0x2,0x127e00(%edx) 1127b1: 74 49 je 1127fc <_POSIX_signals_Clear_signals+0x98> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 1127b3: 83 ec 0c sub $0xc,%esp 1127b6: 53 push %ebx 1127b7: e8 44 06 00 00 call 112e00 <_POSIX_signals_Clear_process_signals> 1127bc: 83 c4 10 add $0x10,%esp do_callout = true; 1127bf: b0 01 mov $0x1,%al 1127c1: eb 26 jmp 1127e9 <_POSIX_signals_Clear_signals+0x85> 1127c3: 90 nop */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; else signals_blocked = SIGNAL_ALL_MASK; 1127c4: b9 ff ff ff ff mov $0xffffffff,%ecx 1127c9: eb c4 jmp 11278f <_POSIX_signals_Clear_signals+0x2b> 1127cb: 90 nop } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 1127cc: 8b 55 08 mov 0x8(%ebp),%edx 1127cf: 8b 9a d4 00 00 00 mov 0xd4(%edx),%ebx 1127d5: 89 c6 mov %eax,%esi 1127d7: 21 de and %ebx,%esi 1127d9: 85 ce test %ecx,%esi 1127db: 74 1b je 1127f8 <_POSIX_signals_Clear_signals+0x94> api->signals_pending &= ~mask; 1127dd: f7 d0 not %eax 1127df: 21 d8 and %ebx,%eax 1127e1: 89 82 d4 00 00 00 mov %eax,0xd4(%edx) do_callout = true; 1127e7: b0 01 mov $0x1,%al } } _ISR_Enable( level ); 1127e9: ff 75 e4 pushl -0x1c(%ebp) 1127ec: 9d popf return do_callout; } 1127ed: 8d 65 f4 lea -0xc(%ebp),%esp 1127f0: 5b pop %ebx 1127f1: 5e pop %esi 1127f2: 5f pop %edi 1127f3: c9 leave 1127f4: c3 ret 1127f5: 8d 76 00 lea 0x0(%esi),%esi bool do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); do_callout = false; 1127f8: 31 c0 xor %eax,%eax 1127fa: eb ed jmp 1127e9 <_POSIX_signals_Clear_signals+0x85> do_callout = true; } } _ISR_Enable( level ); return do_callout; } 1127fc: 8d 8a 20 80 12 00 lea 0x128020(%edx),%ecx 112802: 8b 82 20 80 12 00 mov 0x128020(%edx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 112808: 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)) 11280b: 39 f0 cmp %esi,%eax 11280d: 74 45 je 112854 <_POSIX_signals_Clear_signals+0xf0> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 11280f: 8b 30 mov (%eax),%esi head->next = new_first; 112811: 89 b2 20 80 12 00 mov %esi,0x128020(%edx) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 112817: 89 4e 04 mov %ecx,0x4(%esi) 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 ); 11281a: 83 ec 0c sub $0xc,%esp 11281d: 53 push %ebx 11281e: 89 45 e0 mov %eax,-0x20(%ebp) 112821: e8 da 05 00 00 call 112e00 <_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; 112826: 8b 45 e0 mov -0x20(%ebp),%eax 112829: 8d 70 08 lea 0x8(%eax),%esi 11282c: b9 03 00 00 00 mov $0x3,%ecx 112831: 8b 7d 10 mov 0x10(%ebp),%edi 112834: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 112836: 8b 15 88 7f 12 00 mov 0x127f88,%edx the_node->next = tail; 11283c: c7 00 84 7f 12 00 movl $0x127f84,(%eax) tail->previous = the_node; 112842: a3 88 7f 12 00 mov %eax,0x127f88 old_last->next = the_node; 112847: 89 02 mov %eax,(%edx) the_node->previous = old_last; 112849: 89 50 04 mov %edx,0x4(%eax) 11284c: 83 c4 10 add $0x10,%esp 11284f: e9 5f ff ff ff jmp 1127b3 <_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 ); 112854: 83 ec 0c sub $0xc,%esp 112857: 53 push %ebx 112858: e8 a3 05 00 00 call 112e00 <_POSIX_signals_Clear_process_signals> 11285d: 83 c4 10 add $0x10,%esp 112860: e9 4e ff ff ff jmp 1127b3 <_POSIX_signals_Clear_signals+0x4f> =============================================================================== 0010b670 <_POSIX_signals_Get_lowest>: #include int _POSIX_signals_Get_lowest( sigset_t set ) { 10b670: 55 push %ebp 10b671: 89 e5 mov %esp,%ebp 10b673: 56 push %esi 10b674: 53 push %ebx 10b675: 8b 55 08 mov 0x8(%ebp),%edx int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10b678: b8 1b 00 00 00 mov $0x1b,%eax 10b67d: bb 01 00 00 00 mov $0x1,%ebx #include #include #include #include int _POSIX_signals_Get_lowest( 10b682: 8d 48 ff lea -0x1(%eax),%ecx 10b685: 89 de mov %ebx,%esi 10b687: d3 e6 shl %cl,%esi ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10b689: 85 d6 test %edx,%esi 10b68b: 75 20 jne 10b6ad <_POSIX_signals_Get_lowest+0x3d><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10b68d: 40 inc %eax 10b68e: 83 f8 20 cmp $0x20,%eax 10b691: 75 ef jne 10b682 <_POSIX_signals_Get_lowest+0x12> 10b693: b0 01 mov $0x1,%al 10b695: bb 01 00 00 00 mov $0x1,%ebx 10b69a: eb 06 jmp 10b6a2 <_POSIX_signals_Get_lowest+0x32> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10b69c: 40 inc %eax 10b69d: 83 f8 1b cmp $0x1b,%eax 10b6a0: 74 0b je 10b6ad <_POSIX_signals_Get_lowest+0x3d><== NEVER TAKEN #include #include #include #include int _POSIX_signals_Get_lowest( 10b6a2: 8d 48 ff lea -0x1(%eax),%ecx 10b6a5: 89 de mov %ebx,%esi 10b6a7: 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 ) ) { 10b6a9: 85 d6 test %edx,%esi 10b6ab: 74 ef je 10b69c <_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; } 10b6ad: 5b pop %ebx 10b6ae: 5e pop %esi 10b6af: c9 leave 10b6b0: c3 ret =============================================================================== 001247cc <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 1247cc: 55 push %ebp 1247cd: 89 e5 mov %esp,%ebp 1247cf: 57 push %edi 1247d0: 56 push %esi 1247d1: 53 push %ebx 1247d2: 83 ec 0c sub $0xc,%esp 1247d5: 8b 5d 08 mov 0x8(%ebp),%ebx 1247d8: 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 ]; 1247db: 8b b3 ec 00 00 00 mov 0xec(%ebx),%esi 1247e1: 8d 4a ff lea -0x1(%edx),%ecx 1247e4: b8 01 00 00 00 mov $0x1,%eax 1247e9: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1247eb: 8b 4b 10 mov 0x10(%ebx),%ecx 1247ee: 89 cf mov %ecx,%edi 1247f0: 81 e7 00 80 00 10 and $0x10008000,%edi 1247f6: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1247fc: 74 72 je 124870 <_POSIX_signals_Unblock_thread+0xa4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 1247fe: 8b 96 d0 00 00 00 mov 0xd0(%esi),%edx 124804: f7 d2 not %edx 124806: 85 d0 test %edx,%eax 124808: 74 5a je 124864 <_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 ) ) { 12480a: f7 c1 00 00 00 10 test $0x10000000,%ecx 124810: 74 3a je 12484c <_POSIX_signals_Unblock_thread+0x80> the_thread->Wait.return_code = EINTR; 124812: 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) ) 124819: f7 c1 e0 be 03 00 test $0x3bee0,%ecx 12481f: 0f 85 93 00 00 00 jne 1248b8 <_POSIX_signals_Unblock_thread+0xec> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 124825: 83 e1 08 and $0x8,%ecx 124828: 74 3a je 124864 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 12482a: 83 ec 0c sub $0xc,%esp 12482d: 8d 43 48 lea 0x48(%ebx),%eax 124830: 50 push %eax 124831: e8 9e e4 fe ff call 112cd4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 124836: 5a pop %edx 124837: 59 pop %ecx 124838: 68 f8 ff 03 10 push $0x1003fff8 12483d: 53 push %ebx 12483e: e8 79 d2 fe ff call 111abc <_Thread_Clear_state> 124843: 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; 124846: 31 c0 xor %eax,%eax 124848: eb 1c jmp 124866 <_POSIX_signals_Unblock_thread+0x9a> 12484a: 66 90 xchg %ax,%ax 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 ) { 12484c: 85 c9 test %ecx,%ecx 12484e: 75 14 jne 124864 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 124850: a1 34 dc 12 00 mov 0x12dc34,%eax 124855: 85 c0 test %eax,%eax 124857: 74 0b je 124864 <_POSIX_signals_Unblock_thread+0x98> 124859: 3b 1d 38 dc 12 00 cmp 0x12dc38,%ebx 12485f: 74 7b je 1248dc <_POSIX_signals_Unblock_thread+0x110><== ALWAYS TAKEN 124861: 8d 76 00 lea 0x0(%esi),%esi _Thread_Dispatch_necessary = true; } } return false; 124864: 31 c0 xor %eax,%eax } 124866: 8d 65 f4 lea -0xc(%ebp),%esp 124869: 5b pop %ebx 12486a: 5e pop %esi 12486b: 5f pop %edi 12486c: c9 leave 12486d: c3 ret 12486e: 66 90 xchg %ax,%ax * 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) ) { 124870: 85 43 30 test %eax,0x30(%ebx) 124873: 74 33 je 1248a8 <_POSIX_signals_Unblock_thread+0xdc> the_thread->Wait.return_code = EINTR; 124875: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 12487c: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 12487f: 8b 75 10 mov 0x10(%ebp),%esi 124882: 85 f6 test %esi,%esi 124884: 74 42 je 1248c8 <_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; 124886: b9 03 00 00 00 mov $0x3,%ecx 12488b: 89 c7 mov %eax,%edi 12488d: 8b 75 10 mov 0x10(%ebp),%esi 124890: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 124892: 83 ec 0c sub $0xc,%esp 124895: 53 push %ebx 124896: e8 3d dc fe ff call 1124d8 <_Thread_queue_Extract_with_proxy> return true; 12489b: 83 c4 10 add $0x10,%esp 12489e: b0 01 mov $0x1,%al if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 1248a0: 8d 65 f4 lea -0xc(%ebp),%esp 1248a3: 5b pop %ebx 1248a4: 5e pop %esi 1248a5: 5f pop %edi 1248a6: c9 leave 1248a7: 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) ) { 1248a8: 8b 8e d0 00 00 00 mov 0xd0(%esi),%ecx 1248ae: f7 d1 not %ecx 1248b0: 85 c8 test %ecx,%eax 1248b2: 75 c1 jne 124875 <_POSIX_signals_Unblock_thread+0xa9> 1248b4: eb ae jmp 124864 <_POSIX_signals_Unblock_thread+0x98> 1248b6: 66 90 xchg %ax,%ax /* * 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 ); 1248b8: 83 ec 0c sub $0xc,%esp 1248bb: 53 push %ebx 1248bc: e8 17 dc fe ff call 1124d8 <_Thread_queue_Extract_with_proxy> 1248c1: 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; 1248c4: 31 c0 xor %eax,%eax 1248c6: eb 9e jmp 124866 <_POSIX_signals_Unblock_thread+0x9a> the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 1248c8: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 1248ca: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 1248d1: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 1248d8: eb b8 jmp 124892 <_POSIX_signals_Unblock_thread+0xc6> 1248da: 66 90 xchg %ax,%ax _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; 1248dc: c6 05 44 dc 12 00 01 movb $0x1,0x12dc44 } } return false; 1248e3: 31 c0 xor %eax,%eax 1248e5: e9 7c ff ff ff jmp 124866 <_POSIX_signals_Unblock_thread+0x9a> =============================================================================== 0010cba0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10cba0: 55 push %ebp 10cba1: 89 e5 mov %esp,%ebp 10cba3: 56 push %esi 10cba4: 53 push %ebx 10cba5: 8b 5d 08 mov 0x8(%ebp),%ebx 10cba8: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 10cbab: 85 db test %ebx,%ebx 10cbad: 74 35 je 10cbe4 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 10cbaf: 85 f6 test %esi,%esi 10cbb1: 74 31 je 10cbe4 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 10cbb3: 83 ec 0c sub $0xc,%esp 10cbb6: ff 35 20 82 12 00 pushl 0x128220 10cbbc: e8 87 ef ff ff call 10bb48 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 10cbc1: 5a pop %edx 10cbc2: 59 pop %ecx 10cbc3: 56 push %esi 10cbc4: 53 push %ebx 10cbc5: e8 42 4f 00 00 call 111b0c <_Heap_Get_information> _RTEMS_Unlock_allocator(); 10cbca: 58 pop %eax 10cbcb: ff 35 20 82 12 00 pushl 0x128220 10cbd1: e8 ba ef ff ff call 10bb90 <_API_Mutex_Unlock> return true; 10cbd6: 83 c4 10 add $0x10,%esp 10cbd9: b0 01 mov $0x1,%al } 10cbdb: 8d 65 f8 lea -0x8(%ebp),%esp 10cbde: 5b pop %ebx 10cbdf: 5e pop %esi 10cbe0: c9 leave 10cbe1: c3 ret 10cbe2: 66 90 xchg %ax,%ax { if ( !the_heap ) return false; if ( !the_info ) return false; 10cbe4: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 10cbe6: 8d 65 f8 lea -0x8(%ebp),%esp 10cbe9: 5b pop %ebx 10cbea: 5e pop %esi 10cbeb: c9 leave 10cbec: c3 ret =============================================================================== 00110048 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110048: 55 push %ebp 110049: 89 e5 mov %esp,%ebp 11004b: 56 push %esi 11004c: 53 push %ebx 11004d: 83 ec 10 sub $0x10,%esp 110050: 8b 5d 08 mov 0x8(%ebp),%ebx 110053: 8b 75 0c mov 0xc(%ebp),%esi 110056: 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 ) { 110059: 8b 15 0c de 12 00 mov 0x12de0c,%edx 11005f: 85 d2 test %edx,%edx 110061: 74 19 je 11007c <_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 ); 110063: 0f b6 c0 movzbl %al,%eax 110066: 89 45 10 mov %eax,0x10(%ebp) 110069: 89 75 0c mov %esi,0xc(%ebp) 11006c: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 11006f: 8d 65 f8 lea -0x8(%ebp),%esp 110072: 5b pop %ebx 110073: 5e pop %esi 110074: 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 ); 110075: e9 22 f2 ff ff jmp 10f29c <_Heap_Walk> 11007a: 66 90 xchg %ax,%ax * 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(); 11007c: 83 ec 0c sub $0xc,%esp 11007f: ff 35 c0 de 12 00 pushl 0x12dec0 110085: 88 45 f4 mov %al,-0xc(%ebp) 110088: e8 d3 e4 ff ff call 10e560 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 11008d: 83 c4 0c add $0xc,%esp 110090: 8a 45 f4 mov -0xc(%ebp),%al 110093: 0f b6 c0 movzbl %al,%eax 110096: 50 push %eax 110097: 56 push %esi 110098: 53 push %ebx 110099: e8 fe f1 ff ff call 10f29c <_Heap_Walk> _RTEMS_Unlock_allocator(); 11009e: 5a pop %edx 11009f: ff 35 c0 de 12 00 pushl 0x12dec0 1100a5: 88 45 f4 mov %al,-0xc(%ebp) 1100a8: e8 fb e4 ff ff call 10e5a8 <_API_Mutex_Unlock> 1100ad: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 1100b0: 8a 45 f4 mov -0xc(%ebp),%al 1100b3: 8d 65 f8 lea -0x8(%ebp),%esp 1100b6: 5b pop %ebx 1100b7: 5e pop %esi 1100b8: c9 leave 1100b9: c3 ret =============================================================================== 001106f8 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 1106f8: 55 push %ebp 1106f9: 89 e5 mov %esp,%ebp 1106fb: 53 push %ebx 1106fc: 83 ec 10 sub $0x10,%esp 1106ff: 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 ); 110702: 80 3d 24 35 12 00 01 cmpb $0x1,0x123524 110709: 19 c0 sbb %eax,%eax 11070b: 83 e0 c0 and $0xffffffc0,%eax 11070e: 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 ); 110711: 50 push %eax 110712: e8 45 d6 ff ff call 10dd5c <_Workspace_Allocate> if ( !api ) 110717: 83 c4 10 add $0x10,%esp 11071a: 85 c0 test %eax,%eax 11071c: 74 6a je 110788 <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 11071e: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 110724: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 11072a: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 110731: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 110735: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 11073c: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 110743: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 11074a: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 110751: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 110758: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 11075f: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 110762: 80 3d 24 35 12 00 00 cmpb $0x0,0x123524 110769: 74 13 je 11077e <_RTEMS_tasks_Create_extension+0x86> 11076b: 31 d2 xor %edx,%edx 11076d: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 110770: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 110777: 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++) 110778: 42 inc %edx 110779: 83 fa 10 cmp $0x10,%edx 11077c: 75 f2 jne 110770 <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 11077e: b0 01 mov $0x1,%al } 110780: 8b 5d fc mov -0x4(%ebp),%ebx 110783: c9 leave 110784: c3 ret 110785: 8d 76 00 lea 0x0(%esi),%esi to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 110788: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 11078a: 8b 5d fc mov -0x4(%ebp),%ebx 11078d: c9 leave 11078e: c3 ret =============================================================================== 001106a0 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 1106a0: 55 push %ebp 1106a1: 89 e5 mov %esp,%ebp 1106a3: 56 push %esi 1106a4: 53 push %ebx 1106a5: 8b 75 0c mov 0xc(%ebp),%esi /* * Free per task variable memory */ tvp = deleted->task_variables; 1106a8: 8b 86 f4 00 00 00 mov 0xf4(%esi),%eax deleted->task_variables = NULL; 1106ae: c7 86 f4 00 00 00 00 movl $0x0,0xf4(%esi) 1106b5: 00 00 00 while (tvp) { 1106b8: 85 c0 test %eax,%eax 1106ba: 75 06 jne 1106c2 <_RTEMS_tasks_Delete_extension+0x22> 1106bc: eb 17 jmp 1106d5 <_RTEMS_tasks_Delete_extension+0x35> 1106be: 66 90 xchg %ax,%ax next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 1106c0: 89 d8 mov %ebx,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 1106c2: 8b 18 mov (%eax),%ebx _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 1106c4: 83 ec 08 sub $0x8,%esp 1106c7: 50 push %eax 1106c8: 56 push %esi 1106c9: e8 56 01 00 00 call 110824 <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 1106ce: 83 c4 10 add $0x10,%esp 1106d1: 85 db test %ebx,%ebx 1106d3: 75 eb jne 1106c0 <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 1106d5: 83 ec 0c sub $0xc,%esp 1106d8: ff b6 e8 00 00 00 pushl 0xe8(%esi) 1106de: e8 95 d6 ff ff call 10dd78 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 1106e3: c7 86 e8 00 00 00 00 movl $0x0,0xe8(%esi) 1106ea: 00 00 00 1106ed: 83 c4 10 add $0x10,%esp } 1106f0: 8d 65 f8 lea -0x8(%ebp),%esp 1106f3: 5b pop %ebx 1106f4: 5e pop %esi 1106f5: c9 leave 1106f6: c3 ret =============================================================================== 00110624 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 110624: 55 push %ebp 110625: 89 e5 mov %esp,%ebp 110627: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 11062a: a1 a0 35 12 00 mov 0x1235a0,%eax 11062f: 85 c0 test %eax,%eax 110631: 74 05 je 110638 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 110633: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 110634: ff e0 jmp *%eax 110636: 66 90 xchg %ax,%ax } 110638: c9 leave 110639: c3 ret =============================================================================== 0010af78 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10af78: 55 push %ebp 10af79: 89 e5 mov %esp,%ebp 10af7b: 57 push %edi 10af7c: 56 push %esi 10af7d: 53 push %ebx 10af7e: 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; 10af81: 8b 1d 4c 35 12 00 mov 0x12354c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10af87: 8b 3d 48 35 12 00 mov 0x123548,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10af8d: 85 db test %ebx,%ebx 10af8f: 74 46 je 10afd7 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10af91: 85 ff test %edi,%edi 10af93: 74 42 je 10afd7 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10af95: 31 f6 xor %esi,%esi 10af97: 90 nop return_value = rtems_task_create( 10af98: 83 ec 08 sub $0x8,%esp 10af9b: 8d 45 e4 lea -0x1c(%ebp),%eax 10af9e: 50 push %eax 10af9f: ff 73 0c pushl 0xc(%ebx) 10afa2: ff 73 14 pushl 0x14(%ebx) 10afa5: ff 73 04 pushl 0x4(%ebx) 10afa8: ff 73 08 pushl 0x8(%ebx) 10afab: ff 33 pushl (%ebx) 10afad: e8 92 fd ff ff call 10ad44 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10afb2: 83 c4 20 add $0x20,%esp 10afb5: 85 c0 test %eax,%eax 10afb7: 75 26 jne 10afdf <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10afb9: 51 push %ecx 10afba: ff 73 18 pushl 0x18(%ebx) 10afbd: ff 73 10 pushl 0x10(%ebx) 10afc0: ff 75 e4 pushl -0x1c(%ebp) 10afc3: e8 24 00 00 00 call 10afec id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10afc8: 83 c4 10 add $0x10,%esp 10afcb: 85 c0 test %eax,%eax 10afcd: 75 10 jne 10afdf <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10afcf: 46 inc %esi 10afd0: 83 c3 1c add $0x1c,%ebx 10afd3: 39 f7 cmp %esi,%edi 10afd5: 77 c1 ja 10af98 <_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 ); } } 10afd7: 8d 65 f4 lea -0xc(%ebp),%esp 10afda: 5b pop %ebx 10afdb: 5e pop %esi 10afdc: 5f pop %edi 10afdd: c9 leave 10afde: 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 ); 10afdf: 52 push %edx 10afe0: 50 push %eax 10afe1: 6a 01 push $0x1 10afe3: 6a 01 push $0x1 10afe5: e8 ca 0c 00 00 call 10bcb4 <_Internal_error_Occurred> =============================================================================== 001105dc <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 1105dc: 55 push %ebp 1105dd: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 1105df: 8b 45 08 mov 0x8(%ebp),%eax 1105e2: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax while (tvp) { 1105e8: 85 c0 test %eax,%eax 1105ea: 74 13 je 1105ff <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 1105ec: 8b 50 04 mov 0x4(%eax),%edx 1105ef: 8b 0a mov (%edx),%ecx 1105f1: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 1105f4: 8b 48 08 mov 0x8(%eax),%ecx 1105f7: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1105f9: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 1105fb: 85 c0 test %eax,%eax 1105fd: 75 ed jne 1105ec <_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; 1105ff: 8b 45 0c mov 0xc(%ebp),%eax 110602: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax while (tvp) { 110608: 85 c0 test %eax,%eax 11060a: 74 13 je 11061f <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 11060c: 8b 50 04 mov 0x4(%eax),%edx 11060f: 8b 0a mov (%edx),%ecx 110611: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 110614: 8b 48 0c mov 0xc(%eax),%ecx 110617: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110619: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 11061b: 85 c0 test %eax,%eax 11061d: 75 ed jne 11060c <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 11061f: c9 leave 110620: c3 ret =============================================================================== 0010b9d8 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10b9d8: 55 push %ebp 10b9d9: 89 e5 mov %esp,%ebp 10b9db: 57 push %edi 10b9dc: 56 push %esi 10b9dd: 53 push %ebx 10b9de: 83 ec 28 sub $0x28,%esp 10b9e1: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10b9e4: 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 ); 10b9e7: 8d 7d e0 lea -0x20(%ebp),%edi 10b9ea: 57 push %edi 10b9eb: e8 60 17 00 00 call 10d150 <_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; 10b9f0: 8b 45 e0 mov -0x20(%ebp),%eax 10b9f3: 8b 55 e4 mov -0x1c(%ebp),%edx 10b9f6: 89 43 4c mov %eax,0x4c(%ebx) 10b9f9: 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; 10b9fc: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10ba02: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10ba08: 89 43 44 mov %eax,0x44(%ebx) 10ba0b: 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) { 10ba0e: 83 c4 10 add $0x10,%esp 10ba11: 39 35 18 b1 12 00 cmp %esi,0x12b118 10ba17: 74 0b je 10ba24 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10ba19: 8d 65 f4 lea -0xc(%ebp),%esp 10ba1c: 5b pop %ebx 10ba1d: 5e pop %esi 10ba1e: 5f pop %edi 10ba1f: c9 leave 10ba20: c3 ret 10ba21: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10ba24: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10ba25: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10ba28: 56 push %esi 10ba29: 57 push %edi 10ba2a: 68 2c ac 12 00 push $0x12ac2c 10ba2f: e8 8c 38 00 00 call 10f2c0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10ba34: 59 pop %ecx 10ba35: 5f pop %edi 10ba36: 56 push %esi 10ba37: 83 c3 44 add $0x44,%ebx 10ba3a: 53 push %ebx 10ba3b: e8 84 37 00 00 call 10f1c4 <_Timespec_Add_to> 10ba40: 83 c4 10 add $0x10,%esp } #endif } 10ba43: 8d 65 f4 lea -0xc(%ebp),%esp 10ba46: 5b pop %ebx 10ba47: 5e pop %esi 10ba48: 5f pop %edi 10ba49: c9 leave 10ba4a: c3 ret =============================================================================== 0010bf94 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10bf94: 55 push %ebp 10bf95: 89 e5 mov %esp,%ebp 10bf97: 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 ); 10bf9a: 8d 45 f4 lea -0xc(%ebp),%eax 10bf9d: 50 push %eax 10bf9e: ff 75 08 pushl 0x8(%ebp) 10bfa1: 68 80 aa 12 00 push $0x12aa80 10bfa6: e8 39 1c 00 00 call 10dbe4 <_Objects_Get> switch ( location ) { 10bfab: 83 c4 10 add $0x10,%esp 10bfae: 8b 55 f4 mov -0xc(%ebp),%edx 10bfb1: 85 d2 test %edx,%edx 10bfb3: 75 29 jne 10bfde <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10bfb5: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10bfb8: f6 42 11 40 testb $0x40,0x11(%edx) 10bfbc: 74 08 je 10bfc6 <_Rate_monotonic_Timeout+0x32> 10bfbe: 8b 48 08 mov 0x8(%eax),%ecx 10bfc1: 39 4a 20 cmp %ecx,0x20(%edx) 10bfc4: 74 4e je 10c014 <_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 ) { 10bfc6: 83 78 38 01 cmpl $0x1,0x38(%eax) 10bfca: 74 14 je 10bfe0 <_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; 10bfcc: 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; 10bfd3: a1 6c ab 12 00 mov 0x12ab6c,%eax 10bfd8: 48 dec %eax 10bfd9: a3 6c ab 12 00 mov %eax,0x12ab6c case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10bfde: c9 leave 10bfdf: 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; 10bfe0: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10bfe7: 83 ec 0c sub $0xc,%esp 10bfea: 50 push %eax 10bfeb: 89 45 e4 mov %eax,-0x1c(%ebp) 10bfee: e8 e5 f9 ff ff call 10b9d8 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bff3: 8b 45 e4 mov -0x1c(%ebp),%eax 10bff6: 8b 50 3c mov 0x3c(%eax),%edx 10bff9: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bffc: 5a pop %edx 10bffd: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10bffe: 83 c0 10 add $0x10,%eax 10c001: 50 push %eax 10c002: 68 40 ac 12 00 push $0x12ac40 10c007: e8 94 35 00 00 call 10f5a0 <_Watchdog_Insert> 10c00c: 83 c4 10 add $0x10,%esp 10c00f: eb c2 jmp 10bfd3 <_Rate_monotonic_Timeout+0x3f> 10c011: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10c014: 83 ec 08 sub $0x8,%esp 10c017: 68 f8 ff 03 10 push $0x1003fff8 10c01c: 52 push %edx 10c01d: 89 45 e4 mov %eax,-0x1c(%ebp) 10c020: e8 e3 23 00 00 call 10e408 <_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 ); 10c025: 8b 45 e4 mov -0x1c(%ebp),%eax 10c028: 89 04 24 mov %eax,(%esp) 10c02b: eb c1 jmp 10bfee <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010ba4c <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10ba4c: 55 push %ebp 10ba4d: 89 e5 mov %esp,%ebp 10ba4f: 57 push %edi 10ba50: 56 push %esi 10ba51: 53 push %ebx 10ba52: 83 ec 1c sub $0x1c,%esp 10ba55: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10ba58: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10ba5b: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10ba5f: 0f 84 bf 00 00 00 je 10bb24 <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10ba65: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10ba66: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10ba69: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10ba6a: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10ba6d: 56 push %esi 10ba6e: 53 push %ebx 10ba6f: e8 cc fe ff ff call 10b940 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10ba74: 83 c4 10 add $0x10,%esp 10ba77: 84 c0 test %al,%al 10ba79: 75 09 jne 10ba84 <_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 } 10ba7b: 8d 65 f4 lea -0xc(%ebp),%esp 10ba7e: 5b pop %ebx 10ba7f: 5e pop %esi 10ba80: 5f pop %edi 10ba81: c9 leave 10ba82: c3 ret 10ba83: 90 nop /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10ba84: 83 ec 08 sub $0x8,%esp 10ba87: 57 push %edi 10ba88: 8d 43 6c lea 0x6c(%ebx),%eax 10ba8b: 50 push %eax 10ba8c: e8 33 37 00 00 call 10f1c4 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10ba91: 58 pop %eax 10ba92: 5a pop %edx 10ba93: 8d 43 5c lea 0x5c(%ebx),%eax 10ba96: 50 push %eax 10ba97: 57 push %edi 10ba98: e8 ff 37 00 00 call 10f29c <_Timespec_Less_than> 10ba9d: 83 c4 10 add $0x10,%esp 10baa0: 84 c0 test %al,%al 10baa2: 74 0c je 10bab0 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10baa4: 8b 45 e0 mov -0x20(%ebp),%eax 10baa7: 8b 55 e4 mov -0x1c(%ebp),%edx 10baaa: 89 43 5c mov %eax,0x5c(%ebx) 10baad: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10bab0: 83 ec 08 sub $0x8,%esp 10bab3: 8d 43 64 lea 0x64(%ebx),%eax 10bab6: 50 push %eax 10bab7: 57 push %edi 10bab8: e8 bb 37 00 00 call 10f278 <_Timespec_Greater_than> 10babd: 83 c4 10 add $0x10,%esp 10bac0: 84 c0 test %al,%al 10bac2: 74 0c je 10bad0 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10bac4: 8b 45 e0 mov -0x20(%ebp),%eax 10bac7: 8b 55 e4 mov -0x1c(%ebp),%edx 10baca: 89 43 64 mov %eax,0x64(%ebx) 10bacd: 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 ); 10bad0: 83 ec 08 sub $0x8,%esp 10bad3: 56 push %esi 10bad4: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10bada: 50 push %eax 10badb: e8 e4 36 00 00 call 10f1c4 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10bae0: 5a pop %edx 10bae1: 59 pop %ecx 10bae2: 8d 43 74 lea 0x74(%ebx),%eax 10bae5: 50 push %eax 10bae6: 56 push %esi 10bae7: e8 b0 37 00 00 call 10f29c <_Timespec_Less_than> 10baec: 83 c4 10 add $0x10,%esp 10baef: 84 c0 test %al,%al 10baf1: 75 39 jne 10bb2c <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10baf3: 83 ec 08 sub $0x8,%esp 10baf6: 8d 43 7c lea 0x7c(%ebx),%eax 10baf9: 50 push %eax 10bafa: 56 push %esi 10bafb: e8 78 37 00 00 call 10f278 <_Timespec_Greater_than> 10bb00: 83 c4 10 add $0x10,%esp 10bb03: 84 c0 test %al,%al 10bb05: 0f 84 70 ff ff ff je 10ba7b <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10bb0b: 8b 45 d8 mov -0x28(%ebp),%eax 10bb0e: 8b 55 dc mov -0x24(%ebp),%edx 10bb11: 89 43 7c mov %eax,0x7c(%ebx) 10bb14: 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 } 10bb1a: 8d 65 f4 lea -0xc(%ebp),%esp 10bb1d: 5b pop %ebx 10bb1e: 5e pop %esi 10bb1f: 5f pop %edi 10bb20: c9 leave 10bb21: c3 ret 10bb22: 66 90 xchg %ax,%ax */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10bb24: ff 43 58 incl 0x58(%ebx) 10bb27: e9 39 ff ff ff jmp 10ba65 <_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; 10bb2c: 8b 45 d8 mov -0x28(%ebp),%eax 10bb2f: 8b 55 dc mov -0x24(%ebp),%edx 10bb32: 89 43 74 mov %eax,0x74(%ebx) 10bb35: 89 53 78 mov %edx,0x78(%ebx) 10bb38: eb b9 jmp 10baf3 <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010c55c <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 10c55c: 55 push %ebp 10c55d: 89 e5 mov %esp,%ebp 10c55f: 53 push %ebx 10c560: 8b 45 08 mov 0x8(%ebp),%eax ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; 10c563: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx ready = sched_info->ready_chain; 10c569: 8b 11 mov (%ecx),%edx if ( _Chain_Has_only_one_node( ready ) ) { 10c56b: 8b 5a 08 mov 0x8(%edx),%ebx 10c56e: 39 1a cmp %ebx,(%edx) 10c570: 74 6e je 10c5e0 <_Scheduler_priority_Block+0x84> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c572: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10c574: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10c577: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10c57a: 89 0a mov %ecx,(%edx) _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 10c57c: 3b 05 9c 7d 12 00 cmp 0x127d9c,%eax 10c582: 74 18 je 10c59c <_Scheduler_priority_Block+0x40> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 10c584: 3b 05 98 7d 12 00 cmp 0x127d98,%eax 10c58a: 74 04 je 10c590 <_Scheduler_priority_Block+0x34> _Thread_Dispatch_necessary = true; } 10c58c: 5b pop %ebx 10c58d: c9 leave 10c58e: c3 ret 10c58f: 90 nop if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 10c590: c6 05 a4 7d 12 00 01 movb $0x1,0x127da4 } 10c597: 5b pop %ebx 10c598: c9 leave 10c599: c3 ret 10c59a: 66 90 xchg %ax,%ax 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 ); 10c59c: 66 8b 1d c0 7d 12 00 mov 0x127dc0,%bx 10c5a3: 31 d2 xor %edx,%edx 10c5a5: 89 d1 mov %edx,%ecx 10c5a7: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10c5ab: 0f b7 c9 movzwl %cx,%ecx 10c5ae: 66 8b 9c 09 e0 7d 12 mov 0x127de0(%ecx,%ecx,1),%bx 10c5b5: 00 10c5b6: 66 0f bc d3 bsf %bx,%dx return (_Priority_Bits_index( major ) << 4) + 10c5ba: c1 e1 04 shl $0x4,%ecx 10c5bd: 0f b7 d2 movzwl %dx,%edx 10c5c0: 8d 14 11 lea (%ecx,%edx,1),%edx Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 10c5c3: 8d 14 52 lea (%edx,%edx,2),%edx 10c5c6: c1 e2 02 shl $0x2,%edx 10c5c9: 03 15 60 34 12 00 add 0x123460,%edx 10c5cf: 8b 0a mov (%edx),%ecx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10c5d1: 83 c2 04 add $0x4,%edx 10c5d4: 39 d1 cmp %edx,%ecx 10c5d6: 74 44 je 10c61c <_Scheduler_priority_Block+0xc0><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 10c5d8: 89 0d 9c 7d 12 00 mov %ecx,0x127d9c 10c5de: eb a4 jmp 10c584 <_Scheduler_priority_Block+0x28> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10c5e0: 8d 5a 04 lea 0x4(%edx),%ebx 10c5e3: 89 1a mov %ebx,(%edx) head->next = tail; head->previous = NULL; 10c5e5: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) tail->previous = head; 10c5ec: 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; 10c5ef: 8b 59 04 mov 0x4(%ecx),%ebx 10c5f2: 66 8b 13 mov (%ebx),%dx 10c5f5: 66 23 51 0e and 0xe(%ecx),%dx 10c5f9: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10c5fc: 66 85 d2 test %dx,%dx 10c5ff: 0f 85 77 ff ff ff jne 10c57c <_Scheduler_priority_Block+0x20> _Priority_Major_bit_map &= the_priority_map->block_major; 10c605: 66 8b 15 c0 7d 12 00 mov 0x127dc0,%dx 10c60c: 23 51 0c and 0xc(%ecx),%edx 10c60f: 66 89 15 c0 7d 12 00 mov %dx,0x127dc0 10c616: e9 61 ff ff ff jmp 10c57c <_Scheduler_priority_Block+0x20> 10c61b: 90 nop Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 10c61c: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 10c61e: eb b8 jmp 10c5d8 <_Scheduler_priority_Block+0x7c><== NOT EXECUTED =============================================================================== 0010c770 <_Scheduler_priority_Schedule>: #include #include #include void _Scheduler_priority_Schedule(void) { 10c770: 55 push %ebp 10c771: 89 e5 mov %esp,%ebp 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 ); 10c773: 66 8b 0d c0 7d 12 00 mov 0x127dc0,%cx 10c77a: 31 c0 xor %eax,%eax 10c77c: 89 c2 mov %eax,%edx 10c77e: 66 0f bc d1 bsf %cx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10c782: 0f b7 d2 movzwl %dx,%edx 10c785: 66 8b 8c 12 e0 7d 12 mov 0x127de0(%edx,%edx,1),%cx 10c78c: 00 10c78d: 66 0f bc c1 bsf %cx,%ax return (_Priority_Bits_index( major ) << 4) + 10c791: c1 e2 04 shl $0x4,%edx 10c794: 0f b7 c0 movzwl %ax,%eax 10c797: 8d 04 02 lea (%edx,%eax,1),%eax Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 10c79a: 8d 04 40 lea (%eax,%eax,2),%eax 10c79d: c1 e0 02 shl $0x2,%eax 10c7a0: 03 05 60 34 12 00 add 0x123460,%eax _Scheduler_priority_Schedule_body(); } 10c7a6: 8b 10 mov (%eax),%edx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10c7a8: 83 c0 04 add $0x4,%eax 10c7ab: 39 c2 cmp %eax,%edx 10c7ad: 74 09 je 10c7b8 <_Scheduler_priority_Schedule+0x48><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 10c7af: 89 15 9c 7d 12 00 mov %edx,0x127d9c 10c7b5: c9 leave 10c7b6: c3 ret 10c7b7: 90 nop Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 10c7b8: 31 d2 xor %edx,%edx <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 10c7ba: 89 15 9c 7d 12 00 mov %edx,0x127d9c <== NOT EXECUTED 10c7c0: c9 leave <== NOT EXECUTED 10c7c1: c3 ret <== NOT EXECUTED =============================================================================== 0010c894 <_Scheduler_priority_Yield>: * ready chain * select heir */ void _Scheduler_priority_Yield(void) { 10c894: 55 push %ebp 10c895: 89 e5 mov %esp,%ebp 10c897: 56 push %esi 10c898: 53 push %ebx Scheduler_priority_Per_thread *sched_info; ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10c899: a1 98 7d 12 00 mov 0x127d98,%eax sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info; ready = sched_info->ready_chain; 10c89e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx 10c8a4: 8b 12 mov (%edx),%edx _ISR_Disable( level ); 10c8a6: 9c pushf 10c8a7: fa cli 10c8a8: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10c8a9: 8b 5a 08 mov 0x8(%edx),%ebx 10c8ac: 39 1a cmp %ebx,(%edx) 10c8ae: 74 40 je 10c8f0 <_Scheduler_priority_Yield+0x5c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c8b0: 8b 30 mov (%eax),%esi previous = the_node->previous; 10c8b2: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10c8b5: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10c8b8: 89 33 mov %esi,(%ebx) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 10c8ba: 8b 5a 08 mov 0x8(%edx),%ebx RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 10c8bd: 8d 72 04 lea 0x4(%edx),%esi 10c8c0: 89 30 mov %esi,(%eax) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 10c8c2: 89 42 08 mov %eax,0x8(%edx) old_last->next = the_node; 10c8c5: 89 03 mov %eax,(%ebx) the_node->previous = old_last; 10c8c7: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10c8ca: 51 push %ecx 10c8cb: 9d popf 10c8cc: fa cli if ( _Thread_Is_heir( executing ) ) 10c8cd: 3b 05 9c 7d 12 00 cmp 0x127d9c,%eax 10c8d3: 74 0f je 10c8e4 <_Scheduler_priority_Yield+0x50> _Thread_Heir = (Thread_Control *) _Chain_First( ready ); _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 10c8d5: c6 05 a4 7d 12 00 01 movb $0x1,0x127da4 _ISR_Enable( level ); 10c8dc: 51 push %ecx 10c8dd: 9d popf } 10c8de: 5b pop %ebx 10c8df: 5e pop %esi 10c8e0: c9 leave 10c8e1: c3 ret 10c8e2: 66 90 xchg %ax,%ax _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) _Chain_First( ready ); 10c8e4: 8b 02 mov (%edx),%eax 10c8e6: a3 9c 7d 12 00 mov %eax,0x127d9c 10c8eb: eb e8 jmp 10c8d5 <_Scheduler_priority_Yield+0x41> 10c8ed: 8d 76 00 lea 0x0(%esi),%esi _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10c8f0: 3b 05 9c 7d 12 00 cmp 0x127d9c,%eax 10c8f6: 75 dd jne 10c8d5 <_Scheduler_priority_Yield+0x41> 10c8f8: eb e2 jmp 10c8dc <_Scheduler_priority_Yield+0x48> =============================================================================== 0010cb28 <_Scheduler_simple_Ready_queue_Enqueue>: #include void _Scheduler_simple_Ready_queue_Enqueue( Thread_Control *the_thread ) { 10cb28: 55 push %ebp 10cb29: 89 e5 mov %esp,%ebp 10cb2b: 56 push %esi 10cb2c: 53 push %ebx 10cb2d: 8b 75 08 mov 0x8(%ebp),%esi Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; 10cb30: 8b 15 a0 3e 12 00 mov 0x123ea0,%edx } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 10cb36: 8b 02 mov (%edx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 10cb38: 8d 4a 04 lea 0x4(%edx),%ecx ready = (Chain_Control *)_Scheduler.information; the_node = _Chain_First( ready ); current = (Thread_Control *)ready; for ( ; !_Chain_Is_tail( ready, the_node ) ; the_node = the_node->next ) { 10cb3b: 39 c8 cmp %ecx,%eax 10cb3d: 74 1a je 10cb59 <_Scheduler_simple_Ready_queue_Enqueue+0x31> current = (Thread_Control *) the_node; 10cb3f: 89 c2 mov %eax,%edx /* break when AT END OR PAST our priority */ if ( the_thread->current_priority < current->current_priority ) { 10cb41: 8b 5e 14 mov 0x14(%esi),%ebx 10cb44: 3b 58 14 cmp 0x14(%eax),%ebx 10cb47: 73 0a jae 10cb53 <_Scheduler_simple_Ready_queue_Enqueue+0x2b> 10cb49: eb 21 jmp 10cb6c <_Scheduler_simple_Ready_queue_Enqueue+0x44> 10cb4b: 90 nop ready = (Chain_Control *)_Scheduler.information; the_node = _Chain_First( ready ); current = (Thread_Control *)ready; for ( ; !_Chain_Is_tail( ready, the_node ) ; the_node = the_node->next ) { current = (Thread_Control *) the_node; 10cb4c: 89 c2 mov %eax,%edx /* break when AT END OR PAST our priority */ if ( the_thread->current_priority < current->current_priority ) { 10cb4e: 39 58 14 cmp %ebx,0x14(%eax) 10cb51: 77 19 ja 10cb6c <_Scheduler_simple_Ready_queue_Enqueue+0x44> ready = (Chain_Control *)_Scheduler.information; the_node = _Chain_First( ready ); current = (Thread_Control *)ready; for ( ; !_Chain_Is_tail( ready, the_node ) ; the_node = the_node->next ) { 10cb53: 8b 00 mov (%eax),%eax 10cb55: 39 c8 cmp %ecx,%eax 10cb57: 75 f3 jne 10cb4c <_Scheduler_simple_Ready_queue_Enqueue+0x24> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10cb59: 89 56 04 mov %edx,0x4(%esi) before_node = after_node->next; 10cb5c: 8b 02 mov (%edx),%eax after_node->next = the_node; 10cb5e: 89 32 mov %esi,(%edx) the_node->next = before_node; 10cb60: 89 06 mov %eax,(%esi) before_node->previous = the_node; 10cb62: 89 70 04 mov %esi,0x4(%eax) } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 10cb65: 5b pop %ebx 10cb66: 5e pop %esi 10cb67: c9 leave 10cb68: c3 ret 10cb69: 8d 76 00 lea 0x0(%esi),%esi for ( ; !_Chain_Is_tail( ready, the_node ) ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT END OR PAST our priority */ if ( the_thread->current_priority < current->current_priority ) { current = (Thread_Control *)current->Object.Node.previous; 10cb6c: 8b 50 04 mov 0x4(%eax),%edx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10cb6f: 89 56 04 mov %edx,0x4(%esi) before_node = after_node->next; 10cb72: 8b 02 mov (%edx),%eax after_node->next = the_node; 10cb74: 89 32 mov %esi,(%edx) the_node->next = before_node; 10cb76: 89 06 mov %eax,(%esi) before_node->previous = the_node; 10cb78: 89 70 04 mov %esi,0x4(%eax) } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 10cb7b: 5b pop %ebx 10cb7c: 5e pop %esi 10cb7d: c9 leave 10cb7e: c3 ret =============================================================================== 0010caf8 <_Scheduler_simple_Ready_queue_Enqueue_first>: #include void _Scheduler_simple_Ready_queue_Enqueue_first( Thread_Control *the_thread ) { 10caf8: 55 push %ebp 10caf9: 89 e5 mov %esp,%ebp 10cafb: 8b 4d 08 mov 0x8(%ebp),%ecx } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 10cafe: a1 a0 3e 12 00 mov 0x123ea0,%eax 10cb03: 8b 00 mov (%eax),%eax */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 10cb05: 8b 51 14 mov 0x14(%ecx),%edx 10cb08: 3b 50 14 cmp 0x14(%eax),%edx 10cb0b: 76 0a jbe 10cb17 <_Scheduler_simple_Ready_queue_Enqueue_first+0x1f> 10cb0d: 8d 76 00 lea 0x0(%esi),%esi * Do NOT need to check for end of chain because there is always * at least one task on the ready chain -- the IDLE task. It can * never block, should never attempt to obtain a semaphore or mutex, * and thus will always be there. */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { 10cb10: 8b 00 mov (%eax),%eax current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 10cb12: 39 50 14 cmp %edx,0x14(%eax) 10cb15: 72 f9 jb 10cb10 <_Scheduler_simple_Ready_queue_Enqueue_first+0x18><== NEVER TAKEN current = (Thread_Control *)current->Object.Node.previous; 10cb17: 8b 40 04 mov 0x4(%eax),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10cb1a: 89 41 04 mov %eax,0x4(%ecx) before_node = after_node->next; 10cb1d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10cb1f: 89 08 mov %ecx,(%eax) the_node->next = before_node; 10cb21: 89 11 mov %edx,(%ecx) before_node->previous = the_node; 10cb23: 89 4a 04 mov %ecx,0x4(%edx) } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 10cb26: c9 leave 10cb27: c3 ret =============================================================================== 0010cec0 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10cec0: 55 push %ebp 10cec1: 89 e5 mov %esp,%ebp 10cec3: 53 push %ebx 10cec4: 83 ec 04 sub $0x4,%esp 10cec7: 8b 5d 08 mov 0x8(%ebp),%ebx 10ceca: a1 6c b3 12 00 mov 0x12b36c,%eax 10cecf: 40 inc %eax 10ced0: a3 6c b3 12 00 mov %eax,0x12b36c long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10ced5: a1 08 b4 12 00 mov 0x12b408,%eax if ( time->tv_sec < seconds ) 10ceda: 8b 13 mov (%ebx),%edx 10cedc: 39 d0 cmp %edx,%eax 10cede: 7f 34 jg 10cf14 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10cee0: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10cee1: 29 c2 sub %eax,%edx 10cee3: 52 push %edx 10cee4: 6a 00 push $0x0 10cee6: 68 34 b4 12 00 push $0x12b434 10ceeb: e8 30 24 00 00 call 10f320 <_Watchdog_Adjust> 10cef0: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10cef3: 8b 03 mov (%ebx),%eax 10cef5: a3 08 b4 12 00 mov %eax,0x12b408 10cefa: 8b 43 04 mov 0x4(%ebx),%eax 10cefd: a3 0c b4 12 00 mov %eax,0x12b40c _TOD_Is_set = true; 10cf02: c6 05 7c b3 12 00 01 movb $0x1,0x12b37c _TOD_Activate(); _Thread_Enable_dispatch(); } 10cf09: 8b 5d fc mov -0x4(%ebp),%ebx 10cf0c: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10cf0d: e9 9a 15 00 00 jmp 10e4ac <_Thread_Enable_dispatch> 10cf12: 66 90 xchg %ax,%ax 10cf14: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10cf15: 29 d0 sub %edx,%eax 10cf17: 50 push %eax 10cf18: 6a 01 push $0x1 10cf1a: 68 34 b4 12 00 push $0x12b434 10cf1f: e8 fc 23 00 00 call 10f320 <_Watchdog_Adjust> 10cf24: 83 c4 10 add $0x10,%esp 10cf27: eb ca jmp 10cef3 <_TOD_Set+0x33> =============================================================================== 0010b7b4 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10b7b4: 55 push %ebp 10b7b5: 89 e5 mov %esp,%ebp 10b7b7: 56 push %esi 10b7b8: 53 push %ebx 10b7b9: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10b7bc: 8b 72 08 mov 0x8(%edx),%esi 10b7bf: 4e dec %esi year_mod_4 = the_tod->year & 3; 10b7c0: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10b7c2: 89 c3 mov %eax,%ebx 10b7c4: 83 e3 03 and $0x3,%ebx 10b7c7: 74 67 je 10b830 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10b7c9: 8b 4a 04 mov 0x4(%edx),%ecx 10b7cc: 0f b7 8c 09 00 3d 12 movzwl 0x123d00(%ecx,%ecx,1),%ecx 10b7d3: 00 10b7d4: 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 ]; 10b7d7: 0f b7 8c 1b 34 3d 12 movzwl 0x123d34(%ebx,%ebx,1),%ecx 10b7de: 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 ) * 10b7df: 2d c4 07 00 00 sub $0x7c4,%eax 10b7e4: c1 e8 02 shr $0x2,%eax 10b7e7: 8d 1c c0 lea (%eax,%eax,8),%ebx 10b7ea: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10b7ed: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10b7f0: 8d 04 98 lea (%eax,%ebx,4),%eax 10b7f3: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10b7f5: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10b7f7: 8d 04 89 lea (%ecx,%ecx,4),%eax 10b7fa: 8d 04 81 lea (%ecx,%eax,4),%eax 10b7fd: 8d 04 c1 lea (%ecx,%eax,8),%eax 10b800: c1 e0 02 shl $0x2,%eax 10b803: 29 c8 sub %ecx,%eax 10b805: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10b808: 8b 5a 14 mov 0x14(%edx),%ebx 10b80b: 8b 4a 0c mov 0xc(%edx),%ecx 10b80e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10b811: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10b814: c1 e1 02 shl $0x2,%ecx 10b817: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10b81a: 8d 14 49 lea (%ecx,%ecx,2),%edx 10b81d: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10b820: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10b827: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10b82a: 5b pop %ebx 10b82b: 5e pop %esi 10b82c: c9 leave 10b82d: c3 ret 10b82e: 66 90 xchg %ax,%ax 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 ]; 10b830: 8b 4a 04 mov 0x4(%edx),%ecx 10b833: 0f b7 8c 09 1a 3d 12 movzwl 0x123d1a(%ecx,%ecx,1),%ecx 10b83a: 00 10b83b: 8d 34 31 lea (%ecx,%esi,1),%esi 10b83e: eb 97 jmp 10b7d7 <_TOD_To_seconds+0x23> =============================================================================== 0010b840 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10b840: 55 push %ebp 10b841: 89 e5 mov %esp,%ebp 10b843: 53 push %ebx 10b844: 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(); 10b847: 8b 1d 6c 6c 12 00 mov 0x126c6c,%ebx if ((!the_tod) || 10b84d: 85 c9 test %ecx,%ecx 10b84f: 74 53 je 10b8a4 <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10b851: b8 40 42 0f 00 mov $0xf4240,%eax 10b856: 31 d2 xor %edx,%edx 10b858: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10b85a: 3b 41 18 cmp 0x18(%ecx),%eax 10b85d: 76 45 jbe 10b8a4 <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10b85f: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10b863: 77 3f ja 10b8a4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10b865: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10b869: 77 39 ja 10b8a4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10b86b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10b86f: 77 33 ja 10b8a4 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10b871: 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) || 10b874: 85 c0 test %eax,%eax 10b876: 74 2c je 10b8a4 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10b878: 83 f8 0c cmp $0xc,%eax 10b87b: 77 27 ja 10b8a4 <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10b87d: 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) || 10b87f: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10b885: 76 1d jbe 10b8a4 <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10b887: 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) || 10b88a: 85 c9 test %ecx,%ecx 10b88c: 74 16 je 10b8a4 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10b88e: 83 e2 03 and $0x3,%edx 10b891: 75 16 jne 10b8a9 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10b893: 8b 04 85 74 3d 12 00 mov 0x123d74(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10b89a: 39 c8 cmp %ecx,%eax 10b89c: 0f 93 c0 setae %al 10b89f: eb 05 jmp 10b8a6 <_TOD_Validate+0x66> 10b8a1: 8d 76 00 lea 0x0(%esi),%esi (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; 10b8a4: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10b8a6: 5b pop %ebx 10b8a7: c9 leave 10b8a8: 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 ]; 10b8a9: 8b 04 85 40 3d 12 00 mov 0x123d40(,%eax,4),%eax 10b8b0: eb e8 jmp 10b89a <_TOD_Validate+0x5a> =============================================================================== 0010c948 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10c948: 55 push %ebp 10c949: 89 e5 mov %esp,%ebp 10c94b: 57 push %edi 10c94c: 56 push %esi 10c94d: 53 push %ebx 10c94e: 83 ec 28 sub $0x28,%esp 10c951: 8b 5d 08 mov 0x8(%ebp),%ebx 10c954: 8b 75 0c mov 0xc(%ebp),%esi 10c957: 8a 45 10 mov 0x10(%ebp),%al 10c95a: 88 45 e7 mov %al,-0x19(%ebp) States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 10c95d: 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 ); 10c960: 53 push %ebx 10c961: e8 7a 0c 00 00 call 10d5e0 <_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 ) 10c966: 83 c4 10 add $0x10,%esp 10c969: 39 73 14 cmp %esi,0x14(%ebx) 10c96c: 74 0d je 10c97b <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10c96e: 83 ec 08 sub $0x8,%esp 10c971: 56 push %esi 10c972: 53 push %ebx 10c973: e8 14 0c 00 00 call 10d58c <_Thread_Set_priority> 10c978: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10c97b: 9c pushf 10c97c: fa cli 10c97d: 5e pop %esi /* * 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; 10c97e: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10c981: 83 f8 04 cmp $0x4,%eax 10c984: 74 22 je 10c9a8 <_Thread_Change_priority+0x60> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10c986: 83 e7 04 and $0x4,%edi 10c989: 74 11 je 10c99c <_Thread_Change_priority+0x54><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10c98b: 56 push %esi 10c98c: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10c98d: a9 e0 be 03 00 test $0x3bee0,%eax 10c992: 75 60 jne 10c9f4 <_Thread_Change_priority+0xac> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10c994: 8d 65 f4 lea -0xc(%ebp),%esp 10c997: 5b pop %ebx 10c998: 5e pop %esi 10c999: 5f pop %edi 10c99a: c9 leave 10c99b: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10c99c: 89 c2 mov %eax,%edx 10c99e: 83 e2 fb and $0xfffffffb,%edx 10c9a1: 89 53 10 mov %edx,0x10(%ebx) 10c9a4: eb e5 jmp 10c98b <_Thread_Change_priority+0x43> 10c9a6: 66 90 xchg %ax,%ax } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10c9a8: 83 e7 04 and $0x4,%edi 10c9ab: 75 1a jne 10c9c7 <_Thread_Change_priority+0x7f><== 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 ); 10c9ad: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) if ( prepend_it ) 10c9b4: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10c9b8: 74 52 je 10ca0c <_Thread_Change_priority+0xc4> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 10c9ba: 83 ec 0c sub $0xc,%esp 10c9bd: 53 push %ebx 10c9be: ff 15 88 34 12 00 call *0x123488 10c9c4: 83 c4 10 add $0x10,%esp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 10c9c7: 56 push %esi 10c9c8: 9d popf 10c9c9: fa cli * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 10c9ca: ff 15 68 34 12 00 call *0x123468 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10c9d0: a1 98 7d 12 00 mov 0x127d98,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 10c9d5: 3b 05 9c 7d 12 00 cmp 0x127d9c,%eax 10c9db: 74 0d je 10c9ea <_Thread_Change_priority+0xa2> 10c9dd: 80 78 74 00 cmpb $0x0,0x74(%eax) 10c9e1: 74 07 je 10c9ea <_Thread_Change_priority+0xa2> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10c9e3: c6 05 a4 7d 12 00 01 movb $0x1,0x127da4 _ISR_Enable( level ); 10c9ea: 56 push %esi 10c9eb: 9d popf } 10c9ec: 8d 65 f4 lea -0xc(%ebp),%esp 10c9ef: 5b pop %ebx 10c9f0: 5e pop %esi 10c9f1: 5f pop %edi 10c9f2: c9 leave 10c9f3: 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 ); 10c9f4: 89 5d 0c mov %ebx,0xc(%ebp) 10c9f7: 8b 43 44 mov 0x44(%ebx),%eax 10c9fa: 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 ); } 10c9fd: 8d 65 f4 lea -0xc(%ebp),%esp 10ca00: 5b pop %ebx 10ca01: 5e pop %esi 10ca02: 5f pop %edi 10ca03: 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 ); 10ca04: e9 eb 0a 00 00 jmp 10d4f4 <_Thread_queue_Requeue> 10ca09: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 10ca0c: 83 ec 0c sub $0xc,%esp 10ca0f: 53 push %ebx 10ca10: ff 15 84 34 12 00 call *0x123484 10ca16: 83 c4 10 add $0x10,%esp 10ca19: eb ac jmp 10c9c7 <_Thread_Change_priority+0x7f> =============================================================================== 0010ca1c <_Thread_Clear_state>: */ void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10ca1c: 55 push %ebp 10ca1d: 89 e5 mov %esp,%ebp 10ca1f: 53 push %ebx 10ca20: 83 ec 04 sub $0x4,%esp 10ca23: 8b 55 08 mov 0x8(%ebp),%edx 10ca26: 8b 45 0c mov 0xc(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10ca29: 9c pushf 10ca2a: fa cli 10ca2b: 5b pop %ebx current_state = the_thread->current_state; 10ca2c: 8b 4a 10 mov 0x10(%edx),%ecx if ( current_state & state ) { 10ca2f: 85 c8 test %ecx,%eax 10ca31: 74 0b je 10ca3e <_Thread_Clear_state+0x22> 10ca33: f7 d0 not %eax 10ca35: 21 c8 and %ecx,%eax current_state = the_thread->current_state = _States_Clear( state, current_state ); 10ca37: 89 42 10 mov %eax,0x10(%edx) if ( _States_Is_ready( current_state ) ) { 10ca3a: 85 c0 test %eax,%eax 10ca3c: 74 0a je 10ca48 <_Thread_Clear_state+0x2c> _Scheduler_Unblock( the_thread ); } } _ISR_Enable( level ); 10ca3e: 53 push %ebx 10ca3f: 9d popf } 10ca40: 8b 5d fc mov -0x4(%ebp),%ebx 10ca43: c9 leave 10ca44: c3 ret 10ca45: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Thread_Control *the_thread ) { _Scheduler.Operations.unblock( the_thread ); 10ca48: 83 ec 0c sub $0xc,%esp 10ca4b: 52 push %edx 10ca4c: ff 15 74 34 12 00 call *0x123474 10ca52: 83 c4 10 add $0x10,%esp 10ca55: eb e7 jmp 10ca3e <_Thread_Clear_state+0x22> =============================================================================== 0010cbcc <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10cbcc: 55 push %ebp 10cbcd: 89 e5 mov %esp,%ebp 10cbcf: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10cbd2: 8d 45 f4 lea -0xc(%ebp),%eax 10cbd5: 50 push %eax 10cbd6: ff 75 08 pushl 0x8(%ebp) 10cbd9: e8 c6 01 00 00 call 10cda4 <_Thread_Get> switch ( location ) { 10cbde: 83 c4 10 add $0x10,%esp 10cbe1: 8b 55 f4 mov -0xc(%ebp),%edx 10cbe4: 85 d2 test %edx,%edx 10cbe6: 75 1c jne 10cc04 <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10cbe8: 83 ec 08 sub $0x8,%esp 10cbeb: 68 18 00 00 10 push $0x10000018 10cbf0: 50 push %eax 10cbf1: e8 26 fe ff ff call 10ca1c <_Thread_Clear_state> 10cbf6: a1 ec 77 12 00 mov 0x1277ec,%eax 10cbfb: 48 dec %eax 10cbfc: a3 ec 77 12 00 mov %eax,0x1277ec 10cc01: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10cc04: c9 leave 10cc05: c3 ret =============================================================================== 0010cc08 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10cc08: 55 push %ebp 10cc09: 89 e5 mov %esp,%ebp 10cc0b: 57 push %edi 10cc0c: 56 push %esi 10cc0d: 53 push %ebx 10cc0e: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10cc11: 8b 1d 98 7d 12 00 mov 0x127d98,%ebx _ISR_Disable( level ); 10cc17: 9c pushf 10cc18: fa cli 10cc19: 58 pop %eax while ( _Thread_Dispatch_necessary == true ) { 10cc1a: 8a 15 a4 7d 12 00 mov 0x127da4,%dl 10cc20: 84 d2 test %dl,%dl 10cc22: 0f 84 3c 01 00 00 je 10cd64 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10cc28: 8b 35 9c 7d 12 00 mov 0x127d9c,%esi _Thread_Dispatch_disable_level = 1; 10cc2e: c7 05 ec 77 12 00 01 movl $0x1,0x1277ec 10cc35: 00 00 00 _Thread_Dispatch_necessary = false; 10cc38: c6 05 a4 7d 12 00 00 movb $0x0,0x127da4 _Thread_Executing = heir; 10cc3f: 89 35 98 7d 12 00 mov %esi,0x127d98 /* * 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 ) 10cc45: 39 f3 cmp %esi,%ebx 10cc47: 0f 84 17 01 00 00 je 10cd64 <_Thread_Dispatch+0x15c> 10cc4d: 8d 7d d8 lea -0x28(%ebp),%edi 10cc50: e9 f5 00 00 00 jmp 10cd4a <_Thread_Dispatch+0x142> 10cc55: 8d 76 00 lea 0x0(%esi),%esi 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 ); 10cc58: 50 push %eax 10cc59: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10cc5a: 83 ec 0c sub $0xc,%esp 10cc5d: 8d 45 e0 lea -0x20(%ebp),%eax 10cc60: 50 push %eax 10cc61: e8 7e 41 00 00 call 110de4 <_TOD_Get_uptime> _Timestamp_Subtract( 10cc66: 83 c4 0c add $0xc,%esp 10cc69: 57 push %edi 10cc6a: 8d 45 e0 lea -0x20(%ebp),%eax 10cc6d: 50 push %eax 10cc6e: 68 ac 78 12 00 push $0x1278ac 10cc73: e8 9c 0b 00 00 call 10d814 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10cc78: 58 pop %eax 10cc79: 5a pop %edx 10cc7a: 57 push %edi 10cc7b: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10cc81: 50 push %eax 10cc82: e8 51 0b 00 00 call 10d7d8 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10cc87: 8b 45 e0 mov -0x20(%ebp),%eax 10cc8a: 8b 55 e4 mov -0x1c(%ebp),%edx 10cc8d: a3 ac 78 12 00 mov %eax,0x1278ac 10cc92: 89 15 b0 78 12 00 mov %edx,0x1278b0 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10cc98: a1 84 78 12 00 mov 0x127884,%eax 10cc9d: 83 c4 10 add $0x10,%esp 10cca0: 85 c0 test %eax,%eax 10cca2: 74 10 je 10ccb4 <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10cca4: 8b 10 mov (%eax),%edx 10cca6: 89 93 e4 00 00 00 mov %edx,0xe4(%ebx) *_Thread_libc_reent = heir->libc_reent; 10ccac: 8b 96 e4 00 00 00 mov 0xe4(%esi),%edx 10ccb2: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10ccb4: 83 ec 08 sub $0x8,%esp 10ccb7: 56 push %esi 10ccb8: 53 push %ebx 10ccb9: e8 f6 0d 00 00 call 10dab4 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10ccbe: 5a pop %edx 10ccbf: 59 pop %ecx 10ccc0: 81 c6 c8 00 00 00 add $0xc8,%esi 10ccc6: 56 push %esi 10ccc7: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax 10cccd: 50 push %eax 10ccce: e8 ed 10 00 00 call 10ddc0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10ccd3: 83 c4 10 add $0x10,%esp 10ccd6: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax 10ccdc: 85 c0 test %eax,%eax 10ccde: 74 36 je 10cd16 <_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 ); 10cce0: a1 80 78 12 00 mov 0x127880,%eax 10cce5: 39 c3 cmp %eax,%ebx 10cce7: 74 2d je 10cd16 <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10cce9: 85 c0 test %eax,%eax 10cceb: 74 11 je 10ccfe <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10cced: 83 ec 0c sub $0xc,%esp 10ccf0: 05 e0 00 00 00 add $0xe0,%eax 10ccf5: 50 push %eax 10ccf6: e8 f9 10 00 00 call 10ddf4 <_CPU_Context_save_fp> 10ccfb: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10ccfe: 83 ec 0c sub $0xc,%esp 10cd01: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax 10cd07: 50 push %eax 10cd08: e8 f1 10 00 00 call 10ddfe <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10cd0d: 89 1d 80 78 12 00 mov %ebx,0x127880 10cd13: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10cd16: 8b 1d 98 7d 12 00 mov 0x127d98,%ebx _ISR_Disable( level ); 10cd1c: 9c pushf 10cd1d: fa cli 10cd1e: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10cd1f: 8a 15 a4 7d 12 00 mov 0x127da4,%dl 10cd25: 84 d2 test %dl,%dl 10cd27: 74 3b je 10cd64 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10cd29: 8b 35 9c 7d 12 00 mov 0x127d9c,%esi _Thread_Dispatch_disable_level = 1; 10cd2f: c7 05 ec 77 12 00 01 movl $0x1,0x1277ec 10cd36: 00 00 00 _Thread_Dispatch_necessary = false; 10cd39: c6 05 a4 7d 12 00 00 movb $0x0,0x127da4 _Thread_Executing = heir; 10cd40: 89 35 98 7d 12 00 mov %esi,0x127d98 /* * 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 ) 10cd46: 39 de cmp %ebx,%esi 10cd48: 74 1a je 10cd64 <_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 ) 10cd4a: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10cd4e: 0f 85 04 ff ff ff jne 10cc58 <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10cd54: 8b 15 c0 77 12 00 mov 0x1277c0,%edx 10cd5a: 89 56 78 mov %edx,0x78(%esi) 10cd5d: e9 f6 fe ff ff jmp 10cc58 <_Thread_Dispatch+0x50> 10cd62: 66 90 xchg %ax,%ax _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10cd64: c7 05 ec 77 12 00 00 movl $0x0,0x1277ec 10cd6b: 00 00 00 _ISR_Enable( level ); 10cd6e: 50 push %eax 10cd6f: 9d popf _API_extensions_Run_postswitch(); 10cd70: e8 4b e6 ff ff call 10b3c0 <_API_extensions_Run_postswitch> } 10cd75: 8d 65 f4 lea -0xc(%ebp),%esp 10cd78: 5b pop %ebx 10cd79: 5e pop %esi 10cd7a: 5f pop %edi 10cd7b: c9 leave 10cd7c: c3 ret =============================================================================== 0010cda4 <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10cda4: 55 push %ebp 10cda5: 89 e5 mov %esp,%ebp 10cda7: 53 push %ebx 10cda8: 83 ec 04 sub $0x4,%esp 10cdab: 8b 45 08 mov 0x8(%ebp),%eax 10cdae: 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 ) ) { 10cdb1: 85 c0 test %eax,%eax 10cdb3: 74 4b je 10ce00 <_Thread_Get+0x5c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10cdb5: 89 c2 mov %eax,%edx 10cdb7: c1 ea 18 shr $0x18,%edx 10cdba: 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 ) 10cdbd: 8d 5a ff lea -0x1(%edx),%ebx 10cdc0: 83 fb 02 cmp $0x2,%ebx 10cdc3: 77 2b ja 10cdf0 <_Thread_Get+0x4c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10cdc5: 89 c3 mov %eax,%ebx 10cdc7: 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 :) */ 10cdca: 4b dec %ebx 10cdcb: 75 23 jne 10cdf0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10cdcd: 8b 14 95 c4 77 12 00 mov 0x1277c4(,%edx,4),%edx * There is no way for this to happen if POSIX is enabled. But there * is actually a test case in sp43 for this which trips it whether or * not POSIX is enabled. So in the interest of safety, this is left * on in all configurations. */ if ( !api_information ) { 10cdd4: 85 d2 test %edx,%edx 10cdd6: 74 18 je 10cdf0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10cdd8: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10cddb: 85 d2 test %edx,%edx 10cddd: 74 11 je 10cdf0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10cddf: 53 push %ebx 10cde0: 51 push %ecx 10cde1: 50 push %eax 10cde2: 52 push %edx 10cde3: e8 10 f4 ff ff call 10c1f8 <_Objects_Get> 10cde8: 83 c4 10 add $0x10,%esp done: return tp; } 10cdeb: 8b 5d fc mov -0x4(%ebp),%ebx 10cdee: c9 leave 10cdef: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10cdf0: 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; 10cdf6: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10cdf8: 8b 5d fc mov -0x4(%ebp),%ebx 10cdfb: c9 leave 10cdfc: c3 ret 10cdfd: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ce00: a1 ec 77 12 00 mov 0x1277ec,%eax 10ce05: 40 inc %eax 10ce06: a3 ec 77 12 00 mov %eax,0x1277ec 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; 10ce0b: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10ce11: a1 98 7d 12 00 mov 0x127d98,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10ce16: 8b 5d fc mov -0x4(%ebp),%ebx 10ce19: c9 leave 10ce1a: c3 ret =============================================================================== 00112c8c <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112c8c: 55 push %ebp 112c8d: 89 e5 mov %esp,%ebp 112c8f: 53 push %ebx 112c90: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112c93: 8b 1d 98 7d 12 00 mov 0x127d98,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 112c99: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax _ISR_Set_level(level); 112c9f: 85 c0 test %eax,%eax 112ca1: 74 79 je 112d1c <_Thread_Handler+0x90> 112ca3: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 112ca4: a0 54 74 12 00 mov 0x127454,%al 112ca9: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112cac: c6 05 54 74 12 00 01 movb $0x1,0x127454 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 112cb3: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax 112cb9: 85 c0 test %eax,%eax 112cbb: 74 24 je 112ce1 <_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 ); 112cbd: a1 80 78 12 00 mov 0x127880,%eax 112cc2: 39 c3 cmp %eax,%ebx 112cc4: 74 1b je 112ce1 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 112cc6: 85 c0 test %eax,%eax 112cc8: 74 11 je 112cdb <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 112cca: 83 ec 0c sub $0xc,%esp 112ccd: 05 e0 00 00 00 add $0xe0,%eax 112cd2: 50 push %eax 112cd3: e8 1c b1 ff ff call 10ddf4 <_CPU_Context_save_fp> 112cd8: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 112cdb: 89 1d 80 78 12 00 mov %ebx,0x127880 /* * 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 ); 112ce1: 83 ec 0c sub $0xc,%esp 112ce4: 53 push %ebx 112ce5: e8 2e ac ff ff call 10d918 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 112cea: e8 91 a0 ff ff call 10cd80 <_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) */ { 112cef: 83 c4 10 add $0x10,%esp 112cf2: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 112cf6: 74 28 je 112d20 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112cf8: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 112cfe: 85 c0 test %eax,%eax 112d00: 74 2d je 112d2f <_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 ) { 112d02: 48 dec %eax 112d03: 74 43 je 112d48 <_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 ); 112d05: 83 ec 0c sub $0xc,%esp 112d08: 53 push %ebx 112d09: e8 46 ac ff ff call 10d954 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 112d0e: 83 c4 0c add $0xc,%esp 112d11: 6a 05 push $0x5 112d13: 6a 01 push $0x1 112d15: 6a 00 push $0x0 112d17: e8 98 8f ff ff call 10bcb4 <_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); 112d1c: fb sti 112d1d: eb 85 jmp 112ca4 <_Thread_Handler+0x18> 112d1f: 90 nop * _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 (); 112d20: e8 4b c7 00 00 call 11f470 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112d25: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 112d2b: 85 c0 test %eax,%eax 112d2d: 75 d3 jne 112d02 <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 112d2f: 83 ec 0c sub $0xc,%esp 112d32: ff b3 9c 00 00 00 pushl 0x9c(%ebx) 112d38: ff 93 90 00 00 00 call *0x90(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 112d3e: 89 43 28 mov %eax,0x28(%ebx) 112d41: 83 c4 10 add $0x10,%esp 112d44: eb bf jmp 112d05 <_Thread_Handler+0x79> 112d46: 66 90 xchg %ax,%ax ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 112d48: 83 ec 0c sub $0xc,%esp 112d4b: ff b3 98 00 00 00 pushl 0x98(%ebx) 112d51: ff 93 90 00 00 00 call *0x90(%ebx) executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 112d57: 89 43 28 mov %eax,0x28(%ebx) 112d5a: 83 c4 10 add $0x10,%esp 112d5d: eb a6 jmp 112d05 <_Thread_Handler+0x79> =============================================================================== 0010ce1c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10ce1c: 55 push %ebp 10ce1d: 89 e5 mov %esp,%ebp 10ce1f: 57 push %edi 10ce20: 56 push %esi 10ce21: 53 push %ebx 10ce22: 83 ec 1c sub $0x1c,%esp 10ce25: 8b 5d 0c mov 0xc(%ebp),%ebx 10ce28: 8b 4d 10 mov 0x10(%ebp),%ecx 10ce2b: 8b 75 14 mov 0x14(%ebp),%esi 10ce2e: 8b 7d 1c mov 0x1c(%ebp),%edi 10ce31: 8a 55 18 mov 0x18(%ebp),%dl 10ce34: 8a 45 20 mov 0x20(%ebp),%al 10ce37: 88 45 df mov %al,-0x21(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10ce3a: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10ce41: 00 00 00 10ce44: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10ce4b: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10ce4e: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10ce55: 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 ) { 10ce58: 85 c9 test %ecx,%ecx 10ce5a: 0f 84 d3 01 00 00 je 10d033 <_Thread_Initialize+0x217> 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; 10ce60: c6 83 b4 00 00 00 00 movb $0x0,0xb4(%ebx) 10ce67: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10ce69: 89 8b bc 00 00 00 mov %ecx,0xbc(%ebx) the_stack->size = size; 10ce6f: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10ce75: 84 d2 test %dl,%dl 10ce77: 0f 85 4f 01 00 00 jne 10cfcc <_Thread_Initialize+0x1b0> 10ce7d: 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; 10ce7f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10ce86: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) the_thread->Start.fp_context = fp_area; 10ce8c: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ce92: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10ce99: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10cea0: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10cea7: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10ceae: a1 90 78 12 00 mov 0x127890,%eax 10ceb3: 85 c0 test %eax,%eax 10ceb5: 0f 85 39 01 00 00 jne 10cff4 <_Thread_Initialize+0x1d8> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10cebb: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10cec2: 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; 10cec5: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10cec7: 8a 45 df mov -0x21(%ebp),%al 10ceca: 88 83 a0 00 00 00 mov %al,0xa0(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10ced0: 8b 45 24 mov 0x24(%ebp),%eax 10ced3: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.budget_callout = budget_callout; 10ced9: 8b 45 28 mov 0x28(%ebp),%eax 10cedc: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) switch ( budget_algorithm ) { 10cee2: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10cee6: 75 08 jne 10cef0 <_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; 10cee8: a1 c0 77 12 00 mov 0x1277c0,%eax 10ceed: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10cef0: 8b 45 2c mov 0x2c(%ebp),%eax 10cef3: 89 83 ac 00 00 00 mov %eax,0xac(%ebx) the_thread->current_state = STATES_DORMANT; 10cef9: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10cf00: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10cf07: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10cf0e: 89 7b 18 mov %edi,0x18(%ebx) the_thread->Start.initial_priority = priority; 10cf11: 89 bb b0 00 00 00 mov %edi,0xb0(%ebx) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 10cf17: 83 ec 0c sub $0xc,%esp 10cf1a: 53 push %ebx 10cf1b: ff 15 78 34 12 00 call *0x123478 10cf21: 89 45 e4 mov %eax,-0x1c(%ebp) sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 10cf24: 83 c4 10 add $0x10,%esp 10cf27: 85 c0 test %eax,%eax 10cf29: 74 40 je 10cf6b <_Thread_Initialize+0x14f> goto failed; _Thread_Set_priority( the_thread, priority ); 10cf2b: 83 ec 08 sub $0x8,%esp 10cf2e: 57 push %edi 10cf2f: 53 push %ebx 10cf30: e8 57 06 00 00 call 10d58c <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10cf35: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10cf3c: 00 00 00 10cf3f: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10cf46: 00 00 00 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10cf49: 8b 45 08 mov 0x8(%ebp),%eax 10cf4c: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10cf4f: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10cf53: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10cf56: 8b 45 30 mov 0x30(%ebp),%eax 10cf59: 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 ); 10cf5c: 89 1c 24 mov %ebx,(%esp) 10cf5f: e8 7c 0a 00 00 call 10d9e0 <_User_extensions_Thread_create> if ( extension_status ) 10cf64: 83 c4 10 add $0x10,%esp 10cf67: 84 c0 test %al,%al 10cf69: 75 55 jne 10cfc0 <_Thread_Initialize+0x1a4> return true; failed: _Workspace_Free( the_thread->libc_reent ); 10cf6b: 83 ec 0c sub $0xc,%esp 10cf6e: ff b3 e4 00 00 00 pushl 0xe4(%ebx) 10cf74: e8 ff 0d 00 00 call 10dd78 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 10cf79: 5f pop %edi 10cf7a: ff b3 e8 00 00 00 pushl 0xe8(%ebx) 10cf80: e8 f3 0d 00 00 call 10dd78 <_Workspace_Free> 10cf85: 59 pop %ecx 10cf86: ff b3 ec 00 00 00 pushl 0xec(%ebx) 10cf8c: e8 e7 0d 00 00 call 10dd78 <_Workspace_Free> _Workspace_Free( extensions_area ); 10cf91: 89 34 24 mov %esi,(%esp) 10cf94: e8 df 0d 00 00 call 10dd78 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 10cf99: 5a pop %edx 10cf9a: ff 75 e0 pushl -0x20(%ebp) 10cf9d: e8 d6 0d 00 00 call 10dd78 <_Workspace_Free> #endif _Workspace_Free( sched ); 10cfa2: 58 pop %eax 10cfa3: ff 75 e4 pushl -0x1c(%ebp) 10cfa6: e8 cd 0d 00 00 call 10dd78 <_Workspace_Free> _Thread_Stack_Free( the_thread ); 10cfab: 89 1c 24 mov %ebx,(%esp) 10cfae: e8 c1 06 00 00 call 10d674 <_Thread_Stack_Free> return false; 10cfb3: 83 c4 10 add $0x10,%esp 10cfb6: 31 c0 xor %eax,%eax } 10cfb8: 8d 65 f4 lea -0xc(%ebp),%esp 10cfbb: 5b pop %ebx 10cfbc: 5e pop %esi 10cfbd: 5f pop %edi 10cfbe: c9 leave 10cfbf: 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; 10cfc0: b0 01 mov $0x1,%al _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10cfc2: 8d 65 f4 lea -0xc(%ebp),%esp 10cfc5: 5b pop %ebx 10cfc6: 5e pop %esi 10cfc7: 5f pop %edi 10cfc8: c9 leave 10cfc9: c3 ret 10cfca: 66 90 xchg %ax,%ax /* * 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 ); 10cfcc: 83 ec 0c sub $0xc,%esp 10cfcf: 6a 6c push $0x6c 10cfd1: e8 86 0d 00 00 call 10dd5c <_Workspace_Allocate> 10cfd6: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10cfd9: 83 c4 10 add $0x10,%esp 10cfdc: 85 c0 test %eax,%eax 10cfde: 0f 85 a2 fe ff ff jne 10ce86 <_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; 10cfe4: 31 f6 xor %esi,%esi size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 10cfe6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10cfed: e9 79 ff ff ff jmp 10cf6b <_Thread_Initialize+0x14f> 10cff2: 66 90 xchg %ax,%ax /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10cff4: 83 ec 0c sub $0xc,%esp 10cff7: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10cffe: 50 push %eax 10cfff: e8 58 0d 00 00 call 10dd5c <_Workspace_Allocate> 10d004: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d006: 83 c4 10 add $0x10,%esp 10d009: 85 c0 test %eax,%eax 10d00b: 74 5a je 10d067 <_Thread_Initialize+0x24b> goto failed; } the_thread->extensions = (void **) extensions_area; 10d00d: 89 83 f0 00 00 00 mov %eax,0xf0(%ebx) 10d013: 8b 0d 90 78 12 00 mov 0x127890,%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++ ) 10d019: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d01b: 31 c0 xor %eax,%eax 10d01d: 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; 10d020: 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++ ) 10d027: 40 inc %eax 10d028: 89 c2 mov %eax,%edx 10d02a: 39 c1 cmp %eax,%ecx 10d02c: 73 f2 jae 10d020 <_Thread_Initialize+0x204> 10d02e: e9 94 fe ff ff jmp 10cec7 <_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 ); 10d033: 83 ec 08 sub $0x8,%esp 10d036: 56 push %esi 10d037: 53 push %ebx 10d038: 88 55 d8 mov %dl,-0x28(%ebp) 10d03b: e8 d0 05 00 00 call 10d610 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d040: 83 c4 10 add $0x10,%esp 10d043: 85 c0 test %eax,%eax 10d045: 8a 55 d8 mov -0x28(%ebp),%dl 10d048: 74 16 je 10d060 <_Thread_Initialize+0x244> 10d04a: 39 c6 cmp %eax,%esi 10d04c: 77 12 ja 10d060 <_Thread_Initialize+0x244><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10d04e: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10d054: c6 83 b4 00 00 00 01 movb $0x1,0xb4(%ebx) 10d05b: e9 09 fe ff ff jmp 10ce69 <_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 */ 10d060: 31 c0 xor %eax,%eax 10d062: e9 51 ff ff ff jmp 10cfb8 <_Thread_Initialize+0x19c> size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 10d067: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10d06e: e9 f8 fe ff ff jmp 10cf6b <_Thread_Initialize+0x14f> =============================================================================== 00112028 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 112028: 55 push %ebp 112029: 89 e5 mov %esp,%ebp 11202b: 53 push %ebx 11202c: 83 ec 10 sub $0x10,%esp 11202f: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 112032: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 112039: 8a 83 a0 00 00 00 mov 0xa0(%ebx),%al 11203f: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 112042: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax 112048: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 11204b: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax 112051: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 112057: 8b 45 0c mov 0xc(%ebp),%eax 11205a: 89 83 98 00 00 00 mov %eax,0x98(%ebx) the_thread->Start.numeric_argument = numeric_argument; 112060: 8b 45 10 mov 0x10(%ebp),%eax 112063: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 112069: 53 push %ebx 11206a: e8 8d be ff ff call 10defc <_Thread_queue_Extract_with_proxy> 11206f: 83 c4 10 add $0x10,%esp 112072: 84 c0 test %al,%al 112074: 75 06 jne 11207c <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 112076: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11207a: 74 28 je 1120a4 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 11207c: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 112082: 39 43 14 cmp %eax,0x14(%ebx) 112085: 74 15 je 11209c <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 112087: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 11208a: 89 45 0c mov %eax,0xc(%ebp) 11208d: 89 5d 08 mov %ebx,0x8(%ebp) } } 112090: 8b 5d fc mov -0x4(%ebp),%ebx 112093: 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 ); 112094: e9 3f c0 ff ff jmp 10e0d8 <_Thread_Set_priority> 112099: 8d 76 00 lea 0x0(%esi),%esi } } 11209c: 8b 5d fc mov -0x4(%ebp),%ebx 11209f: c9 leave 1120a0: c3 ret 1120a1: 8d 76 00 lea 0x0(%esi),%esi 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 ); 1120a4: 83 ec 0c sub $0xc,%esp 1120a7: 8d 43 48 lea 0x48(%ebx),%eax 1120aa: 50 push %eax 1120ab: e8 10 c7 ff ff call 10e7c0 <_Watchdog_Remove> 1120b0: 83 c4 10 add $0x10,%esp 1120b3: eb c7 jmp 11207c <_Thread_Reset+0x54> =============================================================================== 0010d610 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10d610: 55 push %ebp 10d611: 89 e5 mov %esp,%ebp 10d613: 53 push %ebx 10d614: 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; 10d617: a1 50 35 12 00 mov 0x123550,%eax 10d61c: 8b 5d 0c mov 0xc(%ebp),%ebx 10d61f: 39 c3 cmp %eax,%ebx 10d621: 73 02 jae 10d625 <_Thread_Stack_Allocate+0x15> 10d623: 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 ) { 10d625: a1 80 35 12 00 mov 0x123580,%eax 10d62a: 85 c0 test %eax,%eax 10d62c: 74 32 je 10d660 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10d62e: 83 ec 0c sub $0xc,%esp 10d631: 53 push %ebx 10d632: ff d0 call *%eax 10d634: 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 ) 10d637: 85 c0 test %eax,%eax 10d639: 74 11 je 10d64c <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10d63b: 8b 55 08 mov 0x8(%ebp),%edx 10d63e: 89 82 c4 00 00 00 mov %eax,0xc4(%edx) return the_stack_size; } 10d644: 89 d8 mov %ebx,%eax 10d646: 8b 5d fc mov -0x4(%ebp),%ebx 10d649: c9 leave 10d64a: c3 ret 10d64b: 90 nop the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10d64c: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10d64e: 8b 55 08 mov 0x8(%ebp),%edx 10d651: 89 82 c4 00 00 00 mov %eax,0xc4(%edx) return the_stack_size; } 10d657: 89 d8 mov %ebx,%eax 10d659: 8b 5d fc mov -0x4(%ebp),%ebx 10d65c: c9 leave 10d65d: c3 ret 10d65e: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10d660: 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 ); 10d663: 83 ec 0c sub $0xc,%esp 10d666: 53 push %ebx 10d667: e8 f0 06 00 00 call 10dd5c <_Workspace_Allocate> 10d66c: 83 c4 10 add $0x10,%esp 10d66f: eb c6 jmp 10d637 <_Thread_Stack_Allocate+0x27> =============================================================================== 0010d674 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10d674: 55 push %ebp 10d675: 89 e5 mov %esp,%ebp 10d677: 83 ec 08 sub $0x8,%esp 10d67a: 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 ) 10d67d: 80 b8 b4 00 00 00 00 cmpb $0x0,0xb4(%eax) 10d684: 74 16 je 10d69c <_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 ) 10d686: 8b 15 84 35 12 00 mov 0x123584,%edx 10d68c: 85 d2 test %edx,%edx 10d68e: 74 10 je 10d6a0 <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10d690: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax 10d696: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10d699: 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 ); 10d69a: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10d69c: c9 leave 10d69d: c3 ret 10d69e: 66 90 xchg %ax,%ax */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10d6a0: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax 10d6a6: 89 45 08 mov %eax,0x8(%ebp) } 10d6a9: 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 ); 10d6aa: e9 c9 06 00 00 jmp 10dd78 <_Workspace_Free> =============================================================================== 0010d76c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10d76c: 55 push %ebp 10d76d: 89 e5 mov %esp,%ebp 10d76f: 53 push %ebx 10d770: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10d773: 8b 1d 98 7d 12 00 mov 0x127d98,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10d779: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10d77d: 74 19 je 10d798 <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10d77f: 8b 43 10 mov 0x10(%ebx),%eax 10d782: 85 c0 test %eax,%eax 10d784: 75 12 jne 10d798 <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10d786: 8b 43 7c mov 0x7c(%ebx),%eax 10d789: 83 f8 01 cmp $0x1,%eax 10d78c: 72 0a jb 10d798 <_Thread_Tickle_timeslice+0x2c> 10d78e: 83 f8 02 cmp $0x2,%eax 10d791: 76 29 jbe 10d7bc <_Thread_Tickle_timeslice+0x50> 10d793: 83 f8 03 cmp $0x3,%eax 10d796: 74 08 je 10d7a0 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10d798: 8b 5d fc mov -0x4(%ebp),%ebx 10d79b: c9 leave 10d79c: c3 ret 10d79d: 8d 76 00 lea 0x0(%esi),%esi } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10d7a0: 8b 43 78 mov 0x78(%ebx),%eax 10d7a3: 48 dec %eax 10d7a4: 89 43 78 mov %eax,0x78(%ebx) 10d7a7: 85 c0 test %eax,%eax 10d7a9: 75 ed jne 10d798 <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10d7ab: 83 ec 0c sub $0xc,%esp 10d7ae: 53 push %ebx 10d7af: ff 93 80 00 00 00 call *0x80(%ebx) 10d7b5: 83 c4 10 add $0x10,%esp 10d7b8: eb de jmp 10d798 <_Thread_Tickle_timeslice+0x2c> 10d7ba: 66 90 xchg %ax,%ax 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 ) { 10d7bc: 8b 43 78 mov 0x78(%ebx),%eax 10d7bf: 48 dec %eax 10d7c0: 89 43 78 mov %eax,0x78(%ebx) 10d7c3: 85 c0 test %eax,%eax 10d7c5: 7f d1 jg 10d798 <_Thread_Tickle_timeslice+0x2c> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 10d7c7: ff 15 6c 34 12 00 call *0x12346c * 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. */ _Scheduler_Yield( ); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d7cd: a1 c0 77 12 00 mov 0x1277c0,%eax 10d7d2: 89 43 78 mov %eax,0x78(%ebx) 10d7d5: eb c1 jmp 10d798 <_Thread_Tickle_timeslice+0x2c> =============================================================================== 0010d14c <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10d14c: 55 push %ebp 10d14d: 89 e5 mov %esp,%ebp 10d14f: 57 push %edi 10d150: 56 push %esi 10d151: 53 push %ebx 10d152: 83 ec 2c sub $0x2c,%esp 10d155: 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 ); 10d158: 9c pushf 10d159: fa cli 10d15a: 58 pop %eax 10d15b: 89 f9 mov %edi,%ecx for( index=0 ; 10d15d: 31 d2 xor %edx,%edx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10d15f: 8b 19 mov (%ecx),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10d161: 8d 34 52 lea (%edx,%edx,2),%esi 10d164: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi _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 ] ) ) { 10d168: 39 f3 cmp %esi,%ebx 10d16a: 75 18 jne 10d184 <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10d16c: 42 inc %edx 10d16d: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10d170: 83 fa 04 cmp $0x4,%edx 10d173: 75 ea jne 10d15f <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10d175: 50 push %eax 10d176: 9d popf return NULL; 10d177: 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 ); } 10d179: 89 f0 mov %esi,%eax 10d17b: 8d 65 f4 lea -0xc(%ebp),%esp 10d17e: 5b pop %ebx 10d17f: 5e pop %esi 10d180: 5f pop %edi 10d181: c9 leave 10d182: c3 ret 10d183: 90 nop _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 *) _Chain_First( 10d184: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10d186: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10d18d: 8b 53 38 mov 0x38(%ebx),%edx dequeue: the_thread->Wait.queue = NULL; new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10d190: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10d192: 8b 7b 04 mov 0x4(%ebx),%edi 10d195: 89 7d d4 mov %edi,-0x2c(%ebp) 10d198: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10d19b: 39 fa cmp %edi,%edx 10d19d: 74 7f je 10d21e <_Thread_queue_Dequeue_priority+0xd2> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10d19f: 8b 7b 40 mov 0x40(%ebx),%edi 10d1a2: 89 7d e4 mov %edi,-0x1c(%ebp) next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 10d1a5: 8b 3a mov (%edx),%edi 10d1a7: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10d1aa: 8b 7d d4 mov -0x2c(%ebp),%edi 10d1ad: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10d1af: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10d1b2: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10d1b4: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10d1b7: 8b 4b 40 mov 0x40(%ebx),%ecx 10d1ba: 39 4b 38 cmp %ecx,0x38(%ebx) 10d1bd: 74 17 je 10d1d6 <_Thread_queue_Dequeue_priority+0x8a> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 10d1bf: 8d 4a 38 lea 0x38(%edx),%ecx 10d1c2: 8b 7d e0 mov -0x20(%ebp),%edi 10d1c5: 89 4f 04 mov %ecx,0x4(%edi) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 10d1c8: 89 7a 38 mov %edi,0x38(%edx) tail->previous = last_node; 10d1cb: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d1ce: 89 4a 40 mov %ecx,0x40(%edx) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10d1d1: 83 c2 3c add $0x3c,%edx 10d1d4: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10d1d6: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d1da: 74 18 je 10d1f4 <_Thread_queue_Dequeue_priority+0xa8> _ISR_Enable( level ); 10d1dc: 50 push %eax 10d1dd: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d1de: 83 ec 08 sub $0x8,%esp 10d1e1: 68 f8 ff 03 10 push $0x1003fff8 10d1e6: 53 push %ebx 10d1e7: e8 30 f8 ff ff call 10ca1c <_Thread_Clear_state> 10d1ec: 83 c4 10 add $0x10,%esp 10d1ef: eb 88 jmp 10d179 <_Thread_queue_Dequeue_priority+0x2d> 10d1f1: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d1f4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d1fb: 50 push %eax 10d1fc: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d1fd: 83 ec 0c sub $0xc,%esp 10d200: 8d 43 48 lea 0x48(%ebx),%eax 10d203: 50 push %eax 10d204: e8 2b 0a 00 00 call 10dc34 <_Watchdog_Remove> 10d209: 58 pop %eax 10d20a: 5a pop %edx 10d20b: 68 f8 ff 03 10 push $0x1003fff8 10d210: 53 push %ebx 10d211: e8 06 f8 ff ff call 10ca1c <_Thread_Clear_state> 10d216: 83 c4 10 add $0x10,%esp 10d219: e9 5b ff ff ff jmp 10d179 <_Thread_queue_Dequeue_priority+0x2d> head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 10d21e: 8b 7d d4 mov -0x2c(%ebp),%edi 10d221: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10d223: 89 79 04 mov %edi,0x4(%ecx) 10d226: eb ae jmp 10d1d6 <_Thread_queue_Dequeue_priority+0x8a> =============================================================================== 001112b8 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 1112b8: 55 push %ebp 1112b9: 89 e5 mov %esp,%ebp 1112bb: 83 ec 08 sub $0x8,%esp 1112be: 8b 45 08 mov 0x8(%ebp),%eax 1112c1: 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 ) 1112c4: 83 78 34 01 cmpl $0x1,0x34(%eax) 1112c8: 74 0e je 1112d8 <_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 ); 1112ca: 89 55 0c mov %edx,0xc(%ebp) 1112cd: 89 45 08 mov %eax,0x8(%ebp) } 1112d0: 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 ); 1112d1: e9 8a 1a 00 00 jmp 112d60 <_Thread_queue_Extract_fifo> 1112d6: 66 90 xchg %ax,%ax /* * 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 ); 1112d8: 51 push %ecx 1112d9: 6a 00 push $0x0 1112db: 52 push %edx 1112dc: 50 push %eax 1112dd: e8 06 00 00 00 call 1112e8 <_Thread_queue_Extract_priority_helper> 1112e2: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 1112e5: c9 leave 1112e6: c3 ret =============================================================================== 00112d60 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 112d60: 55 push %ebp 112d61: 89 e5 mov %esp,%ebp 112d63: 53 push %ebx 112d64: 83 ec 04 sub $0x4,%esp 112d67: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 112d6a: 9c pushf 112d6b: fa cli 112d6c: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 112d6d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 112d74: 74 2e je 112da4 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112d76: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 112d78: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 112d7b: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 112d7e: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 112d80: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 112d87: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112d8b: 74 1f je 112dac <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 112d8d: 50 push %eax 112d8e: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 112d8f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 112d96: 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 } 112d99: 8b 5d fc mov -0x4(%ebp),%ebx 112d9c: c9 leave 112d9d: e9 7a 9c ff ff jmp 10ca1c <_Thread_Clear_state> 112da2: 66 90 xchg %ax,%ax ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 112da4: 50 push %eax 112da5: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112da6: 8b 5d fc mov -0x4(%ebp),%ebx 112da9: c9 leave 112daa: c3 ret 112dab: 90 nop 112dac: 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 ); 112db3: 50 push %eax 112db4: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 112db5: 83 ec 0c sub $0xc,%esp 112db8: 8d 43 48 lea 0x48(%ebx),%eax 112dbb: 50 push %eax 112dbc: e8 73 ae ff ff call 10dc34 <_Watchdog_Remove> 112dc1: 83 c4 10 add $0x10,%esp 112dc4: eb c9 jmp 112d8f <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 001112e8 <_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 ) { 1112e8: 55 push %ebp 1112e9: 89 e5 mov %esp,%ebp 1112eb: 57 push %edi 1112ec: 56 push %esi 1112ed: 53 push %ebx 1112ee: 83 ec 1c sub $0x1c,%esp 1112f1: 8b 5d 0c mov 0xc(%ebp),%ebx 1112f4: 8a 45 10 mov 0x10(%ebp),%al 1112f7: 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 ); 1112fa: 9c pushf 1112fb: fa cli 1112fc: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1112ff: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 111306: 74 6c je 111374 <_Thread_queue_Extract_priority_helper+0x8c> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 111308: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 11130a: 8b 4b 04 mov 0x4(%ebx),%ecx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 11130d: 8b 43 38 mov 0x38(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 111310: 8d 73 3c lea 0x3c(%ebx),%esi */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 111313: 39 f0 cmp %esi,%eax 111315: 74 69 je 111380 <_Thread_queue_Extract_priority_helper+0x98> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111317: 8b 7b 40 mov 0x40(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 11131a: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 11131c: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 11131e: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 111321: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 111323: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 111326: 8b 53 40 mov 0x40(%ebx),%edx 111329: 39 53 38 cmp %edx,0x38(%ebx) 11132c: 74 11 je 11133f <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 11132e: 8d 50 38 lea 0x38(%eax),%edx 111331: 89 56 04 mov %edx,0x4(%esi) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 111334: 89 70 38 mov %esi,0x38(%eax) tail->previous = last_node; 111337: 89 78 40 mov %edi,0x40(%eax) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 11133a: 83 c0 3c add $0x3c,%eax 11133d: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 11133f: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 111343: 75 23 jne 111368 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111345: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111349: 74 3d je 111388 <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 11134b: ff 75 e4 pushl -0x1c(%ebp) 11134e: 9d popf 11134f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111356: 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 } 111359: 8d 65 f4 lea -0xc(%ebp),%esp 11135c: 5b pop %ebx 11135d: 5e pop %esi 11135e: 5f pop %edi 11135f: c9 leave 111360: e9 b7 b6 ff ff jmp 10ca1c <_Thread_Clear_state> 111365: 8d 76 00 lea 0x0(%esi),%esi /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 111368: ff 75 e4 pushl -0x1c(%ebp) 11136b: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 11136c: 8d 65 f4 lea -0xc(%ebp),%esp 11136f: 5b pop %ebx 111370: 5e pop %esi 111371: 5f pop %edi 111372: c9 leave 111373: 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 ); 111374: ff 75 e4 pushl -0x1c(%ebp) 111377: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111378: 8d 65 f4 lea -0xc(%ebp),%esp 11137b: 5b pop %ebx 11137c: 5e pop %esi 11137d: 5f pop %edi 11137e: c9 leave 11137f: c3 ret head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 111380: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 111382: 89 4a 04 mov %ecx,0x4(%edx) 111385: eb b8 jmp 11133f <_Thread_queue_Extract_priority_helper+0x57> 111387: 90 nop 111388: 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 ); 11138f: ff 75 e4 pushl -0x1c(%ebp) 111392: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111393: 83 ec 0c sub $0xc,%esp 111396: 8d 43 48 lea 0x48(%ebx),%eax 111399: 50 push %eax 11139a: e8 95 c8 ff ff call 10dc34 <_Watchdog_Remove> 11139f: 83 c4 10 add $0x10,%esp 1113a2: eb ab jmp 11134f <_Thread_queue_Extract_priority_helper+0x67> =============================================================================== 0010d438 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10d438: 55 push %ebp 10d439: 89 e5 mov %esp,%ebp 10d43b: 83 ec 08 sub $0x8,%esp 10d43e: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d441: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10d448: 75 06 jne 10d450 <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10d44a: 31 c0 xor %eax,%eax } 10d44c: c9 leave 10d44d: c3 ret 10d44e: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10d450: 83 ec 08 sub $0x8,%esp 10d453: 50 push %eax 10d454: ff 70 44 pushl 0x44(%eax) 10d457: e8 5c 3e 00 00 call 1112b8 <_Thread_queue_Extract> return true; 10d45c: 83 c4 10 add $0x10,%esp 10d45f: b0 01 mov $0x1,%al } return false; } 10d461: c9 leave 10d462: c3 ret =============================================================================== 0010f218 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 10f218: 55 push %ebp 10f219: 89 e5 mov %esp,%ebp 10f21b: 83 ec 08 sub $0x8,%esp 10f21e: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10f221: 83 78 34 01 cmpl $0x1,0x34(%eax) 10f225: 74 0d je 10f234 <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 10f227: ba cc 31 11 00 mov $0x1131cc,%edx return (*first_p)( the_thread_queue ); 10f22c: 89 45 08 mov %eax,0x8(%ebp) } 10f22f: 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 ); 10f230: ff e2 jmp *%edx 10f232: 66 90 xchg %ax,%ax ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; 10f234: ba 40 f2 10 00 mov $0x10f240,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 10f239: 89 45 08 mov %eax,0x8(%ebp) } 10f23c: 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 ); 10f23d: ff e2 jmp *%edx =============================================================================== 001131cc <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1131cc: 55 push %ebp 1131cd: 89 e5 mov %esp,%ebp 1131cf: 8b 55 08 mov 0x8(%ebp),%edx if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo ); return NULL; } 1131d2: 8b 02 mov (%edx),%eax 1131d4: 83 c2 04 add $0x4,%edx Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) 1131d7: 39 d0 cmp %edx,%eax 1131d9: 74 05 je 1131e0 <_Thread_queue_First_fifo+0x14> return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo ); return NULL; } 1131db: c9 leave 1131dc: c3 ret 1131dd: 8d 76 00 lea 0x0(%esi),%esi ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo ); return NULL; 1131e0: 31 c0 xor %eax,%eax } 1131e2: c9 leave 1131e3: c3 ret =============================================================================== 0010d464 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10d464: 55 push %ebp 10d465: 89 e5 mov %esp,%ebp 10d467: 56 push %esi 10d468: 53 push %ebx 10d469: 8b 5d 08 mov 0x8(%ebp),%ebx 10d46c: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10d46f: eb 06 jmp 10d477 <_Thread_queue_Flush+0x13> 10d471: 8d 76 00 lea 0x0(%esi),%esi #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; 10d474: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10d477: 83 ec 0c sub $0xc,%esp 10d47a: 53 push %ebx 10d47b: e8 80 fc ff ff call 10d100 <_Thread_queue_Dequeue> 10d480: 83 c4 10 add $0x10,%esp 10d483: 85 c0 test %eax,%eax 10d485: 75 ed jne 10d474 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10d487: 8d 65 f8 lea -0x8(%ebp),%esp 10d48a: 5b pop %ebx 10d48b: 5e pop %esi 10d48c: c9 leave 10d48d: c3 ret =============================================================================== 0010d490 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10d490: 55 push %ebp 10d491: 89 e5 mov %esp,%ebp 10d493: 56 push %esi 10d494: 53 push %ebx 10d495: 8b 45 08 mov 0x8(%ebp),%eax 10d498: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10d49b: 8b 4d 10 mov 0x10(%ebp),%ecx 10d49e: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10d4a1: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10d4a4: 8b 4d 14 mov 0x14(%ebp),%ecx 10d4a7: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10d4aa: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10d4b1: 83 fa 01 cmp $0x1,%edx 10d4b4: 74 16 je 10d4cc <_Thread_queue_Initialize+0x3c> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10d4b6: 8d 50 04 lea 0x4(%eax),%edx 10d4b9: 89 10 mov %edx,(%eax) head->next = tail; head->previous = NULL; 10d4bb: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) tail->previous = head; 10d4c2: 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 ); } } 10d4c5: 5b pop %ebx 10d4c6: 5e pop %esi 10d4c7: c9 leave 10d4c8: c3 ret 10d4c9: 8d 76 00 lea 0x0(%esi),%esi 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 ) { 10d4cc: 89 c1 mov %eax,%ecx 10d4ce: 30 d2 xor %dl,%dl RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10d4d0: 8d 1c 52 lea (%edx,%edx,2),%ebx 10d4d3: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10d4d6: 8d 73 04 lea 0x4(%ebx),%esi 10d4d9: 89 31 mov %esi,(%ecx) head->next = tail; head->previous = NULL; 10d4db: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 10d4e2: 89 59 08 mov %ebx,0x8(%ecx) uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 10d4e5: 42 inc %edx 10d4e6: 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 ; 10d4e9: 83 fa 04 cmp $0x4,%edx 10d4ec: 75 e2 jne 10d4d0 <_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 ); } } 10d4ee: 5b pop %ebx 10d4ef: 5e pop %esi 10d4f0: c9 leave 10d4f1: c3 ret =============================================================================== 0010d4f4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 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 1c sub $0x1c,%esp 10d4fd: 8b 75 08 mov 0x8(%ebp),%esi 10d500: 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 ) 10d503: 85 f6 test %esi,%esi 10d505: 74 06 je 10d50d <_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 ) { 10d507: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10d50b: 74 0b je 10d518 <_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 ); } } 10d50d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d510: 5b pop %ebx <== NOT EXECUTED 10d511: 5e pop %esi <== NOT EXECUTED 10d512: 5f pop %edi <== NOT EXECUTED 10d513: c9 leave <== NOT EXECUTED 10d514: c3 ret <== NOT EXECUTED 10d515: 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 ); 10d518: 9c pushf 10d519: fa cli 10d51a: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10d51b: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10d522: 75 0c jne 10d530 <_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 ); 10d524: 53 push %ebx 10d525: 9d popf } } 10d526: 8d 65 f4 lea -0xc(%ebp),%esp 10d529: 5b pop %ebx 10d52a: 5e pop %esi 10d52b: 5f pop %edi 10d52c: c9 leave 10d52d: c3 ret 10d52e: 66 90 xchg %ax,%ax 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; 10d530: 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 ); 10d537: 50 push %eax 10d538: 6a 01 push $0x1 10d53a: 57 push %edi 10d53b: 56 push %esi 10d53c: e8 a7 3d 00 00 call 1112e8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10d541: 83 c4 0c add $0xc,%esp 10d544: 8d 45 e4 lea -0x1c(%ebp),%eax 10d547: 50 push %eax 10d548: 57 push %edi 10d549: 56 push %esi 10d54a: e8 71 fd ff ff call 10d2c0 <_Thread_queue_Enqueue_priority> 10d54f: 83 c4 10 add $0x10,%esp 10d552: eb d0 jmp 10d524 <_Thread_queue_Requeue+0x30> =============================================================================== 0010d554 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d554: 55 push %ebp 10d555: 89 e5 mov %esp,%ebp 10d557: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d55a: 8d 45 f4 lea -0xc(%ebp),%eax 10d55d: 50 push %eax 10d55e: ff 75 08 pushl 0x8(%ebp) 10d561: e8 3e f8 ff ff call 10cda4 <_Thread_Get> switch ( location ) { 10d566: 83 c4 10 add $0x10,%esp 10d569: 8b 55 f4 mov -0xc(%ebp),%edx 10d56c: 85 d2 test %edx,%edx 10d56e: 75 17 jne 10d587 <_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 ); 10d570: 83 ec 0c sub $0xc,%esp 10d573: 50 push %eax 10d574: e8 2b 3e 00 00 call 1113a4 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d579: a1 ec 77 12 00 mov 0x1277ec,%eax 10d57e: 48 dec %eax 10d57f: a3 ec 77 12 00 mov %eax,0x1277ec 10d584: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10d587: c9 leave 10d588: c3 ret =============================================================================== 001183e0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 1183e0: 55 push %ebp 1183e1: 89 e5 mov %esp,%ebp 1183e3: 57 push %edi 1183e4: 56 push %esi 1183e5: 53 push %ebx 1183e6: 83 ec 4c sub $0x4c,%esp 1183e9: 8b 5d 08 mov 0x8(%ebp),%ebx ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 1183ec: 8d 45 e0 lea -0x20(%ebp),%eax 1183ef: 89 45 b4 mov %eax,-0x4c(%ebp) 1183f2: 89 45 dc mov %eax,-0x24(%ebp) head->previous = NULL; 1183f5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) tail->previous = head; 1183fc: 8d 4d dc lea -0x24(%ebp),%ecx 1183ff: 89 4d e4 mov %ecx,-0x1c(%ebp) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 118402: 8d 7d d0 lea -0x30(%ebp),%edi 118405: 8d 45 d4 lea -0x2c(%ebp),%eax 118408: 89 45 b0 mov %eax,-0x50(%ebp) 11840b: 89 45 d0 mov %eax,-0x30(%ebp) head->previous = NULL; 11840e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) tail->previous = head; 118415: 89 7d d8 mov %edi,-0x28(%ebp) 118418: 8d 73 30 lea 0x30(%ebx),%esi 11841b: 8d 4b 68 lea 0x68(%ebx),%ecx 11841e: 89 4d c4 mov %ecx,-0x3c(%ebp) 118421: 8d 43 08 lea 0x8(%ebx),%eax 118424: 89 45 c0 mov %eax,-0x40(%ebp) 118427: 8d 53 40 lea 0x40(%ebx),%edx 11842a: 89 55 bc mov %edx,-0x44(%ebp) 11842d: 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; 118430: 8d 4d dc lea -0x24(%ebp),%ecx 118433: 89 4b 78 mov %ecx,0x78(%ebx) 118436: 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; 118438: a1 e4 21 14 00 mov 0x1421e4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 11843d: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118440: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118443: 51 push %ecx 118444: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118445: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118447: 50 push %eax 118448: 56 push %esi 118449: e8 32 3f 00 00 call 11c380 <_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(); 11844e: a1 48 21 14 00 mov 0x142148,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118453: 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 ) { 118456: 83 c4 10 add $0x10,%esp 118459: 39 d0 cmp %edx,%eax 11845b: 77 63 ja 1184c0 <_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 ) { 11845d: 72 7d jb 1184dc <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 11845f: 89 43 74 mov %eax,0x74(%ebx) 118462: 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 ); 118464: 8b 43 78 mov 0x78(%ebx),%eax 118467: 83 ec 0c sub $0xc,%esp 11846a: 50 push %eax 11846b: e8 f8 09 00 00 call 118e68 <_Chain_Get> if ( timer == NULL ) { 118470: 83 c4 10 add $0x10,%esp 118473: 85 c0 test %eax,%eax 118475: 74 35 je 1184ac <_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 ) { 118477: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 11847a: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 11847d: 74 19 je 118498 <_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 ) { 11847f: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118482: 75 e0 jne 118464 <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118484: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118487: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 11848a: 50 push %eax <== NOT EXECUTED 11848b: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 11848e: e8 79 3f 00 00 call 11c40c <_Watchdog_Insert> <== NOT EXECUTED 118493: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118496: eb cc jmp 118464 <_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 ); 118498: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11849b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 11849e: 50 push %eax <== NOT EXECUTED 11849f: 56 push %esi <== NOT EXECUTED 1184a0: e8 67 3f 00 00 call 11c40c <_Watchdog_Insert> <== NOT EXECUTED 1184a5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1184a8: eb ba jmp 118464 <_Timer_server_Body+0x84><== NOT EXECUTED 1184aa: 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 ); 1184ac: 9c pushf 1184ad: fa cli 1184ae: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 1184af: 8b 55 b4 mov -0x4c(%ebp),%edx 1184b2: 39 55 dc cmp %edx,-0x24(%ebp) 1184b5: 74 41 je 1184f8 <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 1184b7: 50 push %eax <== NOT EXECUTED 1184b8: 9d popf <== NOT EXECUTED 1184b9: e9 7a ff ff ff jmp 118438 <_Timer_server_Body+0x58><== NOT EXECUTED 1184be: 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 ); 1184c0: 51 push %ecx 1184c1: 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; 1184c2: 89 c1 mov %eax,%ecx 1184c4: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1184c6: 51 push %ecx 1184c7: ff 75 c4 pushl -0x3c(%ebp) 1184ca: 89 45 b8 mov %eax,-0x48(%ebp) 1184cd: e8 ae 3e 00 00 call 11c380 <_Watchdog_Adjust_to_chain> 1184d2: 83 c4 10 add $0x10,%esp 1184d5: 8b 45 b8 mov -0x48(%ebp),%eax 1184d8: eb 85 jmp 11845f <_Timer_server_Body+0x7f> 1184da: 66 90 xchg %ax,%ax /* * 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 ); 1184dc: 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; 1184dd: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 1184df: 52 push %edx 1184e0: 6a 01 push $0x1 1184e2: ff 75 c4 pushl -0x3c(%ebp) 1184e5: 89 45 b8 mov %eax,-0x48(%ebp) 1184e8: e8 1b 3e 00 00 call 11c308 <_Watchdog_Adjust> 1184ed: 83 c4 10 add $0x10,%esp 1184f0: 8b 45 b8 mov -0x48(%ebp),%eax 1184f3: e9 67 ff ff ff jmp 11845f <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 1184f8: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 1184ff: 50 push %eax 118500: 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 ) ) { 118501: 8b 4d b0 mov -0x50(%ebp),%ecx 118504: 39 4d d0 cmp %ecx,-0x30(%ebp) 118507: 75 23 jne 11852c <_Timer_server_Body+0x14c> 118509: eb 33 jmp 11853e <_Timer_server_Body+0x15e> 11850b: 90 nop Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 11850c: 8b 10 mov (%eax),%edx head->next = new_first; 11850e: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = head; 118511: 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; 118514: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 11851b: 51 push %ecx 11851c: 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 ); 11851d: 83 ec 08 sub $0x8,%esp 118520: ff 70 24 pushl 0x24(%eax) 118523: ff 70 20 pushl 0x20(%eax) 118526: ff 50 1c call *0x1c(%eax) } 118529: 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 ); 11852c: 9c pushf 11852d: fa cli 11852e: 59 pop %ecx initialized = false; } #endif return status; } 11852f: 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)) 118532: 3b 45 b0 cmp -0x50(%ebp),%eax 118535: 75 d5 jne 11850c <_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 ); 118537: 51 push %ecx 118538: 9d popf 118539: e9 f2 fe ff ff jmp 118430 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 11853e: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118542: a1 ac 20 14 00 mov 0x1420ac,%eax 118547: 40 inc %eax 118548: a3 ac 20 14 00 mov %eax,0x1420ac /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 11854d: 83 ec 08 sub $0x8,%esp 118550: 6a 08 push $0x8 118552: ff 33 pushl (%ebx) 118554: e8 d7 37 00 00 call 11bd30 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118559: 89 d8 mov %ebx,%eax 11855b: e8 e0 fd ff ff call 118340 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 118560: 89 d8 mov %ebx,%eax 118562: e8 29 fe ff ff call 118390 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 118567: e8 18 2f 00 00 call 11b484 <_Thread_Enable_dispatch> ts->active = true; 11856c: 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 ); 118570: 5a pop %edx 118571: ff 75 c0 pushl -0x40(%ebp) 118574: e8 d3 3f 00 00 call 11c54c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118579: 58 pop %eax 11857a: ff 75 bc pushl -0x44(%ebp) 11857d: e8 ca 3f 00 00 call 11c54c <_Watchdog_Remove> 118582: 83 c4 10 add $0x10,%esp 118585: e9 a6 fe ff ff jmp 118430 <_Timer_server_Body+0x50> =============================================================================== 0011858c <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 11858c: 55 push %ebp 11858d: 89 e5 mov %esp,%ebp 11858f: 57 push %edi 118590: 56 push %esi 118591: 53 push %ebx 118592: 83 ec 2c sub $0x2c,%esp 118595: 8b 5d 08 mov 0x8(%ebp),%ebx 118598: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 11859b: 8b 53 78 mov 0x78(%ebx),%edx 11859e: 85 d2 test %edx,%edx 1185a0: 74 16 je 1185b8 <_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 ); 1185a2: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1185a5: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1185a8: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1185ab: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1185ae: 5b pop %ebx <== NOT EXECUTED 1185af: 5e pop %esi <== NOT EXECUTED 1185b0: 5f pop %edi <== NOT EXECUTED 1185b1: 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 ); 1185b2: e9 75 08 00 00 jmp 118e2c <_Chain_Append> <== NOT EXECUTED 1185b7: 90 nop <== NOT EXECUTED 1185b8: 8b 15 ac 20 14 00 mov 0x1420ac,%edx 1185be: 42 inc %edx 1185bf: 89 15 ac 20 14 00 mov %edx,0x1420ac * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1185c5: 8b 50 38 mov 0x38(%eax),%edx 1185c8: 83 fa 01 cmp $0x1,%edx 1185cb: 74 7b je 118648 <_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 ) { 1185cd: 83 fa 03 cmp $0x3,%edx 1185d0: 74 0e je 1185e0 <_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 ); } } 1185d2: 8d 65 f4 lea -0xc(%ebp),%esp 1185d5: 5b pop %ebx 1185d6: 5e pop %esi 1185d7: 5f pop %edi 1185d8: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1185d9: e9 a6 2e 00 00 jmp 11b484 <_Thread_Enable_dispatch> 1185de: 66 90 xchg %ax,%ax } 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 ); 1185e0: 9c pushf 1185e1: fa cli 1185e2: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1185e5: 8b 0d 48 21 14 00 mov 0x142148,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 1185eb: 8b 53 74 mov 0x74(%ebx),%edx 1185ee: 89 55 d4 mov %edx,-0x2c(%ebp) initialized = false; } #endif return status; } 1185f1: 8b 53 68 mov 0x68(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 1185f4: 8d 7b 6c lea 0x6c(%ebx),%edi * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 1185f7: 39 fa cmp %edi,%edx 1185f9: 74 21 je 11861c <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 1185fb: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 1185fe: 3b 4d d4 cmp -0x2c(%ebp),%ecx 118601: 0f 86 a1 00 00 00 jbe 1186a8 <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118607: 89 ce mov %ecx,%esi 118609: 2b 75 d4 sub -0x2c(%ebp),%esi 11860c: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 11860f: 39 f7 cmp %esi,%edi 118611: 0f 86 9b 00 00 00 jbe 1186b2 <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 118617: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 118619: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 11861c: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 11861f: ff 75 e4 pushl -0x1c(%ebp) 118622: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118623: 83 ec 08 sub $0x8,%esp 118626: 83 c0 10 add $0x10,%eax 118629: 50 push %eax 11862a: 8d 43 68 lea 0x68(%ebx),%eax 11862d: 50 push %eax 11862e: e8 d9 3d 00 00 call 11c40c <_Watchdog_Insert> if ( !ts->active ) { 118633: 8a 43 7c mov 0x7c(%ebx),%al 118636: 83 c4 10 add $0x10,%esp 118639: 84 c0 test %al,%al 11863b: 75 95 jne 1185d2 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 11863d: 89 d8 mov %ebx,%eax 11863f: e8 4c fd ff ff call 118390 <_Timer_server_Reset_tod_system_watchdog> 118644: eb 8c jmp 1185d2 <_Timer_server_Schedule_operation_method+0x46> 118646: 66 90 xchg %ax,%ax 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 ); 118648: 9c pushf 118649: fa cli 11864a: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 11864d: 8b 0d e4 21 14 00 mov 0x1421e4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 118653: 8b 7b 3c mov 0x3c(%ebx),%edi initialized = false; } #endif return status; } 118656: 8b 53 30 mov 0x30(%ebx),%edx 118659: 8d 73 34 lea 0x34(%ebx),%esi * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 11865c: 39 f2 cmp %esi,%edx 11865e: 74 10 je 118670 <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 118660: 89 ce mov %ecx,%esi 118662: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 118664: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 118667: 39 fe cmp %edi,%esi 118669: 73 39 jae 1186a4 <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 11866b: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 11866d: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 118670: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 118673: ff 75 e4 pushl -0x1c(%ebp) 118676: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118677: 83 ec 08 sub $0x8,%esp 11867a: 83 c0 10 add $0x10,%eax 11867d: 50 push %eax 11867e: 8d 43 30 lea 0x30(%ebx),%eax 118681: 50 push %eax 118682: e8 85 3d 00 00 call 11c40c <_Watchdog_Insert> if ( !ts->active ) { 118687: 8a 43 7c mov 0x7c(%ebx),%al 11868a: 83 c4 10 add $0x10,%esp 11868d: 84 c0 test %al,%al 11868f: 0f 85 3d ff ff ff jne 1185d2 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 118695: 89 d8 mov %ebx,%eax 118697: e8 a4 fc ff ff call 118340 <_Timer_server_Reset_interval_system_watchdog> 11869c: e9 31 ff ff ff jmp 1185d2 <_Timer_server_Schedule_operation_method+0x46> 1186a1: 8d 76 00 lea 0x0(%esi),%esi delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1186a4: 31 ff xor %edi,%edi 1186a6: eb c5 jmp 11866d <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1186a8: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 1186ab: 29 cf sub %ecx,%edi 1186ad: e9 67 ff ff ff jmp 118619 <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1186b2: 31 ff xor %edi,%edi <== NOT EXECUTED 1186b4: e9 60 ff ff ff jmp 118619 <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010ef40 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10ef40: 55 push %ebp 10ef41: 89 e5 mov %esp,%ebp 10ef43: 57 push %edi 10ef44: 56 push %esi 10ef45: 53 push %ebx 10ef46: 83 ec 2c sub $0x2c,%esp 10ef49: 8b 45 08 mov 0x8(%ebp),%eax 10ef4c: 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; 10ef4f: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10ef51: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10ef54: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10ef59: 8b 01 mov (%ecx),%eax 10ef5b: f7 eb imul %ebx 10ef5d: 89 45 e0 mov %eax,-0x20(%ebp) 10ef60: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10ef63: 8b 41 04 mov 0x4(%ecx),%eax 10ef66: 99 cltd 10ef67: 01 45 e0 add %eax,-0x20(%ebp) 10ef6a: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10ef6d: 8b 55 e4 mov -0x1c(%ebp),%edx 10ef70: 0b 55 e0 or -0x20(%ebp),%edx 10ef73: 74 73 je 10efe8 <_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; 10ef75: 89 f8 mov %edi,%eax 10ef77: f7 eb imul %ebx 10ef79: 89 45 d0 mov %eax,-0x30(%ebp) 10ef7c: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10ef7f: 89 f7 mov %esi,%edi 10ef81: c1 ff 1f sar $0x1f,%edi 10ef84: 01 75 d0 add %esi,-0x30(%ebp) 10ef87: 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; 10ef8a: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10ef91: bb a0 86 01 00 mov $0x186a0,%ebx 10ef96: 8b 45 d0 mov -0x30(%ebp),%eax 10ef99: f7 e3 mul %ebx 10ef9b: 8d 34 11 lea (%ecx,%edx,1),%esi 10ef9e: ff 75 e4 pushl -0x1c(%ebp) 10efa1: ff 75 e0 pushl -0x20(%ebp) 10efa4: 56 push %esi 10efa5: 50 push %eax 10efa6: e8 71 1a 01 00 call 120a1c <__udivdi3> 10efab: 83 c4 10 add $0x10,%esp 10efae: 89 c3 mov %eax,%ebx 10efb0: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10efb2: 6a 00 push $0x0 10efb4: 68 e8 03 00 00 push $0x3e8 10efb9: 52 push %edx 10efba: 50 push %eax 10efbb: e8 5c 1a 01 00 call 120a1c <__udivdi3> 10efc0: 83 c4 10 add $0x10,%esp 10efc3: 8b 55 10 mov 0x10(%ebp),%edx 10efc6: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10efc8: 6a 00 push $0x0 10efca: 68 e8 03 00 00 push $0x3e8 10efcf: 56 push %esi 10efd0: 53 push %ebx 10efd1: e8 56 1b 01 00 call 120b2c <__umoddi3> 10efd6: 83 c4 10 add $0x10,%esp 10efd9: 8b 55 14 mov 0x14(%ebp),%edx 10efdc: 89 02 mov %eax,(%edx) } 10efde: 8d 65 f4 lea -0xc(%ebp),%esp 10efe1: 5b pop %ebx 10efe2: 5e pop %esi 10efe3: 5f pop %edi 10efe4: c9 leave 10efe5: c3 ret 10efe6: 66 90 xchg %ax,%ax left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 10efe8: 8b 45 10 mov 0x10(%ebp),%eax 10efeb: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10eff1: 8b 55 14 mov 0x14(%ebp),%edx 10eff4: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10effa: 8d 65 f4 lea -0xc(%ebp),%esp 10effd: 5b pop %ebx 10effe: 5e pop %esi 10efff: 5f pop %edi 10f000: c9 leave 10f001: c3 ret =============================================================================== 00120258 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 120258: 55 push %ebp 120259: 89 e5 mov %esp,%ebp 12025b: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 12025e: 85 c0 test %eax,%eax 120260: 74 1a je 12027c <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 120262: 8b 10 mov (%eax),%edx 120264: 85 d2 test %edx,%edx 120266: 78 14 js 12027c <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 120268: 8b 40 04 mov 0x4(%eax),%eax 12026b: 85 c0 test %eax,%eax 12026d: 78 0d js 12027c <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 12026f: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 120274: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 120277: c9 leave 120278: c3 ret 120279: 8d 76 00 lea 0x0(%esi),%esi if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 12027c: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 12027e: c9 leave 12027f: c3 ret =============================================================================== 00111410 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 111410: 55 push %ebp 111411: 89 e5 mov %esp,%ebp 111413: 56 push %esi 111414: 53 push %ebx 111415: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 111418: 8b 33 mov (%ebx),%esi 11141a: 85 f6 test %esi,%esi 11141c: 75 07 jne 111425 <_Timespec_To_ticks+0x15> 11141e: 8b 43 04 mov 0x4(%ebx),%eax 111421: 85 c0 test %eax,%eax 111423: 74 37 je 11145c <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 111425: e8 4e 18 00 00 call 112c78 11142a: 89 c1 mov %eax,%ecx 11142c: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 11142f: a1 6c 35 12 00 mov 0x12356c,%eax 111434: 8d 04 80 lea (%eax,%eax,4),%eax 111437: 8d 04 80 lea (%eax,%eax,4),%eax 11143a: 8d 34 80 lea (%eax,%eax,4),%esi 11143d: c1 e6 03 shl $0x3,%esi 111440: 8b 43 04 mov 0x4(%ebx),%eax 111443: 31 d2 xor %edx,%edx 111445: f7 f6 div %esi if (ticks) 111447: 01 c8 add %ecx,%eax 111449: 74 05 je 111450 <_Timespec_To_ticks+0x40> return ticks; return 1; } 11144b: 5b pop %ebx 11144c: 5e pop %esi 11144d: c9 leave 11144e: c3 ret 11144f: 90 nop ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 111450: b8 01 00 00 00 mov $0x1,%eax } 111455: 5b pop %ebx 111456: 5e pop %esi 111457: c9 leave 111458: c3 ret 111459: 8d 76 00 lea 0x0(%esi),%esi ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 11145c: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 11145e: 5b pop %ebx 11145f: 5e pop %esi 111460: c9 leave 111461: c3 ret =============================================================================== 0010d990 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10d990: 55 push %ebp 10d991: 89 e5 mov %esp,%ebp 10d993: 57 push %edi 10d994: 56 push %esi 10d995: 53 push %ebx 10d996: 83 ec 1c sub $0x1c,%esp 10d999: 8b 75 08 mov 0x8(%ebp),%esi 10d99c: 8b 7d 10 mov 0x10(%ebp),%edi 10d99f: 8a 45 0c mov 0xc(%ebp),%al the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10d9a2: 8b 1d 14 7a 12 00 mov 0x127a14,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10d9a8: 81 fb 0c 7a 12 00 cmp $0x127a0c,%ebx 10d9ae: 74 25 je 10d9d5 <_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 ); 10d9b0: 0f b6 c0 movzbl %al,%eax 10d9b3: 89 45 e4 mov %eax,-0x1c(%ebp) 10d9b6: 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 ) 10d9b8: 8b 43 30 mov 0x30(%ebx),%eax 10d9bb: 85 c0 test %eax,%eax 10d9bd: 74 0b je 10d9ca <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10d9bf: 52 push %edx 10d9c0: 57 push %edi 10d9c1: ff 75 e4 pushl -0x1c(%ebp) 10d9c4: 56 push %esi 10d9c5: ff d0 call *%eax 10d9c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10d9ca: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10d9cd: 81 fb 0c 7a 12 00 cmp $0x127a0c,%ebx 10d9d3: 75 e3 jne 10d9b8 <_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 ); } } 10d9d5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d9d8: 5b pop %ebx <== NOT EXECUTED 10d9d9: 5e pop %esi <== NOT EXECUTED 10d9da: 5f pop %edi <== NOT EXECUTED 10d9db: c9 leave <== NOT EXECUTED 10d9dc: c3 ret <== NOT EXECUTED =============================================================================== 0010d854 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10d854: 55 push %ebp 10d855: 89 e5 mov %esp,%ebp 10d857: 57 push %edi 10d858: 56 push %esi 10d859: 53 push %ebx 10d85a: 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; 10d85d: a1 98 35 12 00 mov 0x123598,%eax 10d862: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10d865: 8b 35 9c 35 12 00 mov 0x12359c,%esi Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10d86b: c7 05 0c 7a 12 00 10 movl $0x127a10,0x127a0c 10d872: 7a 12 00 head->previous = NULL; 10d875: c7 05 10 7a 12 00 00 movl $0x0,0x127a10 10d87c: 00 00 00 tail->previous = head; 10d87f: c7 05 14 7a 12 00 0c movl $0x127a0c,0x127a14 10d886: 7a 12 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10d889: c7 05 f0 77 12 00 f4 movl $0x1277f4,0x1277f0 10d890: 77 12 00 head->previous = NULL; 10d893: c7 05 f4 77 12 00 00 movl $0x0,0x1277f4 10d89a: 00 00 00 tail->previous = head; 10d89d: c7 05 f8 77 12 00 f0 movl $0x1277f0,0x1277f8 10d8a4: 77 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10d8a7: 85 f6 test %esi,%esi 10d8a9: 74 64 je 10d90f <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10d8ab: 89 c2 mov %eax,%edx 10d8ad: 8d 04 40 lea (%eax,%eax,2),%eax 10d8b0: 8d 0c 82 lea (%edx,%eax,4),%ecx 10d8b3: c1 e1 02 shl $0x2,%ecx 10d8b6: 83 ec 0c sub $0xc,%esp 10d8b9: 51 push %ecx 10d8ba: 89 4d d8 mov %ecx,-0x28(%ebp) 10d8bd: e8 ce 04 00 00 call 10dd90 <_Workspace_Allocate_or_fatal_error> 10d8c2: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10d8c4: 31 c0 xor %eax,%eax 10d8c6: 8b 4d d8 mov -0x28(%ebp),%ecx 10d8c9: 89 df mov %ebx,%edi 10d8cb: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10d8cd: 83 c4 10 add $0x10,%esp 10d8d0: 8b 45 dc mov -0x24(%ebp),%eax 10d8d3: 85 c0 test %eax,%eax 10d8d5: 74 38 je 10d90f <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10d8d7: 89 75 e4 mov %esi,-0x1c(%ebp) 10d8da: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10d8e1: 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; 10d8e4: 8d 7b 14 lea 0x14(%ebx),%edi 10d8e7: 8b 75 e4 mov -0x1c(%ebp),%esi 10d8ea: b9 08 00 00 00 mov $0x8,%ecx 10d8ef: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d8f1: 83 ec 0c sub $0xc,%esp 10d8f4: 53 push %ebx 10d8f5: e8 6a 3b 00 00 call 111464 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10d8fa: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10d8fd: ff 45 e0 incl -0x20(%ebp) 10d900: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10d904: 83 c4 10 add $0x10,%esp 10d907: 8b 45 e0 mov -0x20(%ebp),%eax 10d90a: 39 45 dc cmp %eax,-0x24(%ebp) 10d90d: 77 d5 ja 10d8e4 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10d90f: 8d 65 f4 lea -0xc(%ebp),%esp 10d912: 5b pop %ebx 10d913: 5e pop %esi 10d914: 5f pop %edi 10d915: c9 leave 10d916: c3 ret =============================================================================== 0010ece4 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10ece4: 55 push %ebp 10ece5: 89 e5 mov %esp,%ebp 10ece7: 53 push %ebx 10ece8: 83 ec 10 sub $0x10,%esp 10eceb: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10ecee: 53 push %ebx 10ecef: e8 9c db ff ff call 10c890 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10ecf4: 83 c4 10 add $0x10,%esp 10ecf7: 8b 43 24 mov 0x24(%ebx),%eax 10ecfa: 85 c0 test %eax,%eax 10ecfc: 74 12 je 10ed10 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10ecfe: 83 c3 08 add $0x8,%ebx 10ed01: 89 5d 08 mov %ebx,0x8(%ebp) } 10ed04: 8b 5d fc mov -0x4(%ebp),%ebx 10ed07: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10ed08: e9 83 db ff ff jmp 10c890 <_Chain_Extract> 10ed0d: 8d 76 00 lea 0x0(%esi),%esi } 10ed10: 8b 5d fc mov -0x4(%ebp),%ebx 10ed13: c9 leave 10ed14: c3 ret =============================================================================== 0010d918 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10d918: 55 push %ebp 10d919: 89 e5 mov %esp,%ebp 10d91b: 56 push %esi 10d91c: 53 push %ebx 10d91d: 8b 75 08 mov 0x8(%ebp),%esi the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10d920: 8b 1d 0c 7a 12 00 mov 0x127a0c,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10d926: 81 fb 10 7a 12 00 cmp $0x127a10,%ebx 10d92c: 74 1c je 10d94a <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10d92e: 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 ) 10d930: 8b 43 28 mov 0x28(%ebx),%eax 10d933: 85 c0 test %eax,%eax 10d935: 74 09 je 10d940 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10d937: 83 ec 0c sub $0xc,%esp 10d93a: 56 push %esi 10d93b: ff d0 call *%eax 10d93d: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10d940: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10d942: 81 fb 10 7a 12 00 cmp $0x127a10,%ebx 10d948: 75 e6 jne 10d930 <_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 ); } } 10d94a: 8d 65 f8 lea -0x8(%ebp),%esp 10d94d: 5b pop %ebx 10d94e: 5e pop %esi 10d94f: c9 leave 10d950: c3 ret =============================================================================== 0010d9e0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10d9e0: 55 push %ebp 10d9e1: 89 e5 mov %esp,%ebp 10d9e3: 56 push %esi 10d9e4: 53 push %ebx 10d9e5: 8b 75 08 mov 0x8(%ebp),%esi return false; } } return true; } 10d9e8: 8b 1d 0c 7a 12 00 mov 0x127a0c,%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 10d9ee: 81 fb 10 7a 12 00 cmp $0x127a10,%ebx 10d9f4: 74 26 je 10da1c <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10d9f6: 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 ) { 10d9f8: 8b 43 14 mov 0x14(%ebx),%eax 10d9fb: 85 c0 test %eax,%eax 10d9fd: 74 13 je 10da12 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10d9ff: 83 ec 08 sub $0x8,%esp 10da02: 56 push %esi 10da03: ff 35 98 7d 12 00 pushl 0x127d98 10da09: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10da0b: 83 c4 10 add $0x10,%esp 10da0e: 84 c0 test %al,%al 10da10: 74 16 je 10da28 <_User_extensions_Thread_create+0x48> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10da12: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 10da14: 81 fb 10 7a 12 00 cmp $0x127a10,%ebx 10da1a: 75 dc jne 10d9f8 <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10da1c: b0 01 mov $0x1,%al } 10da1e: 8d 65 f8 lea -0x8(%ebp),%esp 10da21: 5b pop %ebx 10da22: 5e pop %esi 10da23: c9 leave 10da24: c3 ret 10da25: 8d 76 00 lea 0x0(%esi),%esi status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10da28: 31 c0 xor %eax,%eax } } return true; } 10da2a: 8d 65 f8 lea -0x8(%ebp),%esp 10da2d: 5b pop %ebx 10da2e: 5e pop %esi 10da2f: c9 leave 10da30: c3 ret =============================================================================== 0010da34 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10da34: 55 push %ebp 10da35: 89 e5 mov %esp,%ebp 10da37: 56 push %esi 10da38: 53 push %ebx 10da39: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10da3c: 8b 1d 14 7a 12 00 mov 0x127a14,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10da42: 81 fb 0c 7a 12 00 cmp $0x127a0c,%ebx 10da48: 74 23 je 10da6d <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10da4a: 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 ) 10da4c: 8b 43 20 mov 0x20(%ebx),%eax 10da4f: 85 c0 test %eax,%eax 10da51: 74 0f je 10da62 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10da53: 83 ec 08 sub $0x8,%esp 10da56: 56 push %esi 10da57: ff 35 98 7d 12 00 pushl 0x127d98 10da5d: ff d0 call *%eax 10da5f: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10da62: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10da65: 81 fb 0c 7a 12 00 cmp $0x127a0c,%ebx 10da6b: 75 df jne 10da4c <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10da6d: 8d 65 f8 lea -0x8(%ebp),%esp 10da70: 5b pop %ebx 10da71: 5e pop %esi 10da72: c9 leave 10da73: c3 ret =============================================================================== 0010d954 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10d954: 55 push %ebp 10d955: 89 e5 mov %esp,%ebp 10d957: 56 push %esi 10d958: 53 push %ebx 10d959: 8b 75 08 mov 0x8(%ebp),%esi the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10d95c: 8b 1d 14 7a 12 00 mov 0x127a14,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10d962: 81 fb 0c 7a 12 00 cmp $0x127a0c,%ebx 10d968: 74 1d je 10d987 <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10d96a: 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 ) 10d96c: 8b 43 2c mov 0x2c(%ebx),%eax 10d96f: 85 c0 test %eax,%eax 10d971: 74 09 je 10d97c <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10d973: 83 ec 0c sub $0xc,%esp 10d976: 56 push %esi 10d977: ff d0 call *%eax 10d979: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10d97c: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10d97f: 81 fb 0c 7a 12 00 cmp $0x127a0c,%ebx 10d985: 75 e5 jne 10d96c <_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 ); } } 10d987: 8d 65 f8 lea -0x8(%ebp),%esp 10d98a: 5b pop %ebx 10d98b: 5e pop %esi 10d98c: c9 leave 10d98d: c3 ret =============================================================================== 0010e5c0 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10e5c0: 55 push %ebp 10e5c1: 89 e5 mov %esp,%ebp 10e5c3: 56 push %esi 10e5c4: 53 push %ebx 10e5c5: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10e5c8: 8b 1d ac 9c 12 00 mov 0x129cac,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10e5ce: 81 fb b0 9c 12 00 cmp $0x129cb0,%ebx 10e5d4: 74 22 je 10e5f8 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10e5d6: 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 ) 10e5d8: 8b 43 1c mov 0x1c(%ebx),%eax 10e5db: 85 c0 test %eax,%eax 10e5dd: 74 0f je 10e5ee <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10e5df: 83 ec 08 sub $0x8,%esp 10e5e2: 56 push %esi 10e5e3: ff 35 38 a0 12 00 pushl 0x12a038 10e5e9: ff d0 call *%eax 10e5eb: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e5ee: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10e5f0: 81 fb b0 9c 12 00 cmp $0x129cb0,%ebx 10e5f6: 75 e0 jne 10e5d8 <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10e5f8: 8d 65 f8 lea -0x8(%ebp),%esp 10e5fb: 5b pop %ebx 10e5fc: 5e pop %esi 10e5fd: c9 leave 10e5fe: c3 ret =============================================================================== 0010da74 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10da74: 55 push %ebp 10da75: 89 e5 mov %esp,%ebp 10da77: 56 push %esi 10da78: 53 push %ebx 10da79: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10da7c: 8b 1d 0c 7a 12 00 mov 0x127a0c,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10da82: 81 fb 10 7a 12 00 cmp $0x127a10,%ebx 10da88: 74 22 je 10daac <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10da8a: 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 ) 10da8c: 8b 43 18 mov 0x18(%ebx),%eax 10da8f: 85 c0 test %eax,%eax 10da91: 74 0f je 10daa2 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10da93: 83 ec 08 sub $0x8,%esp 10da96: 56 push %esi 10da97: ff 35 98 7d 12 00 pushl 0x127d98 10da9d: ff d0 call *%eax 10da9f: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10daa2: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10daa4: 81 fb 10 7a 12 00 cmp $0x127a10,%ebx 10daaa: 75 e0 jne 10da8c <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10daac: 8d 65 f8 lea -0x8(%ebp),%esp 10daaf: 5b pop %ebx 10dab0: 5e pop %esi 10dab1: c9 leave 10dab2: c3 ret =============================================================================== 0010dab4 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10dab4: 55 push %ebp 10dab5: 89 e5 mov %esp,%ebp 10dab7: 57 push %edi 10dab8: 56 push %esi 10dab9: 53 push %ebx 10daba: 83 ec 0c sub $0xc,%esp 10dabd: 8b 7d 08 mov 0x8(%ebp),%edi 10dac0: 8b 75 0c mov 0xc(%ebp),%esi the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10dac3: 8b 1d f0 77 12 00 mov 0x1277f0,%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 10dac9: 81 fb f4 77 12 00 cmp $0x1277f4,%ebx 10dacf: 74 18 je 10dae9 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10dad1: 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 ); 10dad4: 83 ec 08 sub $0x8,%esp 10dad7: 56 push %esi 10dad8: 57 push %edi 10dad9: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 10dadc: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 10dade: 83 c4 10 add $0x10,%esp 10dae1: 81 fb f4 77 12 00 cmp $0x1277f4,%ebx 10dae7: 75 eb jne 10dad4 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10dae9: 8d 65 f4 lea -0xc(%ebp),%esp 10daec: 5b pop %ebx 10daed: 5e pop %esi 10daee: 5f pop %edi 10daef: c9 leave 10daf0: c3 ret =============================================================================== 0010f320 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10f320: 55 push %ebp 10f321: 89 e5 mov %esp,%ebp 10f323: 57 push %edi 10f324: 56 push %esi 10f325: 53 push %ebx 10f326: 83 ec 1c sub $0x1c,%esp 10f329: 8b 75 08 mov 0x8(%ebp),%esi 10f32c: 8b 4d 0c mov 0xc(%ebp),%ecx 10f32f: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10f332: 9c pushf 10f333: fa cli 10f334: 58 pop %eax } } _ISR_Enable( level ); } 10f335: 8b 16 mov (%esi),%edx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10f337: 8d 7e 04 lea 0x4(%esi),%edi 10f33a: 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 ) ) { 10f33d: 39 fa cmp %edi,%edx 10f33f: 74 3d je 10f37e <_Watchdog_Adjust+0x5e> switch ( direction ) { 10f341: 85 c9 test %ecx,%ecx 10f343: 75 43 jne 10f388 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10f345: 85 db test %ebx,%ebx 10f347: 74 35 je 10f37e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10f349: 8b 7a 10 mov 0x10(%edx),%edi 10f34c: 39 fb cmp %edi,%ebx 10f34e: 73 0f jae 10f35f <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 10f350: eb 3e jmp 10f390 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10f352: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10f354: 29 fb sub %edi,%ebx 10f356: 74 26 je 10f37e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10f358: 8b 7a 10 mov 0x10(%edx),%edi 10f35b: 39 df cmp %ebx,%edi 10f35d: 77 31 ja 10f390 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10f35f: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10f366: 50 push %eax 10f367: 9d popf _Watchdog_Tickle( header ); 10f368: 83 ec 0c sub $0xc,%esp 10f36b: 56 push %esi 10f36c: e8 d3 01 00 00 call 10f544 <_Watchdog_Tickle> _ISR_Disable( level ); 10f371: 9c pushf 10f372: fa cli 10f373: 58 pop %eax } } _ISR_Enable( level ); } 10f374: 8b 16 mov (%esi),%edx _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 10f376: 83 c4 10 add $0x10,%esp 10f379: 39 55 e4 cmp %edx,-0x1c(%ebp) 10f37c: 75 d6 jne 10f354 <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10f37e: 50 push %eax 10f37f: 9d popf } 10f380: 8d 65 f4 lea -0xc(%ebp),%esp 10f383: 5b pop %ebx 10f384: 5e pop %esi 10f385: 5f pop %edi 10f386: c9 leave 10f387: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10f388: 49 dec %ecx 10f389: 75 f3 jne 10f37e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10f38b: 01 5a 10 add %ebx,0x10(%edx) break; 10f38e: eb ee jmp 10f37e <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10f390: 29 df sub %ebx,%edi 10f392: 89 7a 10 mov %edi,0x10(%edx) break; 10f395: eb e7 jmp 10f37e <_Watchdog_Adjust+0x5e> =============================================================================== 0010daf4 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10daf4: 55 push %ebp 10daf5: 89 e5 mov %esp,%ebp 10daf7: 57 push %edi 10daf8: 56 push %esi 10daf9: 53 push %ebx 10dafa: 83 ec 04 sub $0x4,%esp 10dafd: 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; 10db00: 8b 3d 94 7d 12 00 mov 0x127d94,%edi _ISR_Disable( level ); 10db06: 9c pushf 10db07: fa cli 10db08: 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 ) { 10db0b: 8b 43 08 mov 0x8(%ebx),%eax 10db0e: 85 c0 test %eax,%eax 10db10: 0f 85 9e 00 00 00 jne 10dbb4 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10db16: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10db1d: a1 20 79 12 00 mov 0x127920,%eax 10db22: 40 inc %eax 10db23: a3 20 79 12 00 mov %eax,0x127920 restart: delta_interval = the_watchdog->initial; 10db28: 8b 43 0c mov 0xc(%ebx),%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 10db2b: 8b 4d 08 mov 0x8(%ebp),%ecx 10db2e: 8b 11 mov (%ecx),%edx for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10db30: 85 c0 test %eax,%eax 10db32: 74 5d je 10db91 <_Watchdog_Insert+0x9d> 10db34: 8b 32 mov (%edx),%esi 10db36: 85 f6 test %esi,%esi 10db38: 74 57 je 10db91 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10db3a: 8b 4a 10 mov 0x10(%edx),%ecx 10db3d: 39 c8 cmp %ecx,%eax 10db3f: 73 22 jae 10db63 <_Watchdog_Insert+0x6f> 10db41: eb 49 jmp 10db8c <_Watchdog_Insert+0x98> 10db43: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10db44: 8b 35 a4 78 12 00 mov 0x1278a4,%esi 10db4a: 39 f7 cmp %esi,%edi 10db4c: 72 72 jb 10dbc0 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10db4e: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10db50: 8b 12 mov (%edx),%edx for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10db52: 85 c0 test %eax,%eax 10db54: 74 3b je 10db91 <_Watchdog_Insert+0x9d> 10db56: 8b 0a mov (%edx),%ecx 10db58: 85 c9 test %ecx,%ecx 10db5a: 74 35 je 10db91 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10db5c: 8b 4a 10 mov 0x10(%edx),%ecx 10db5f: 39 c1 cmp %eax,%ecx 10db61: 77 29 ja 10db8c <_Watchdog_Insert+0x98> break; } delta_interval -= after->delta_interval; _ISR_Flash( level ); 10db63: ff 75 f0 pushl -0x10(%ebp) 10db66: 9d popf 10db67: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10db68: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10db6c: 74 d6 je 10db44 <_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; 10db6e: 89 3d a4 78 12 00 mov %edi,0x1278a4 _Watchdog_Sync_count--; 10db74: a1 20 79 12 00 mov 0x127920,%eax 10db79: 48 dec %eax 10db7a: a3 20 79 12 00 mov %eax,0x127920 _ISR_Enable( level ); 10db7f: ff 75 f0 pushl -0x10(%ebp) 10db82: 9d popf } 10db83: 58 pop %eax 10db84: 5b pop %ebx 10db85: 5e pop %esi 10db86: 5f pop %edi 10db87: c9 leave 10db88: c3 ret 10db89: 8d 76 00 lea 0x0(%esi),%esi if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10db8c: 29 c1 sub %eax,%ecx 10db8e: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10db91: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10db98: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10db9b: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10db9e: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10dba1: 8b 10 mov (%eax),%edx after_node->next = the_node; 10dba3: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10dba5: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10dba7: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10dbaa: a1 24 79 12 00 mov 0x127924,%eax 10dbaf: 89 43 14 mov %eax,0x14(%ebx) 10dbb2: eb ba jmp 10db6e <_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 ); 10dbb4: ff 75 f0 pushl -0x10(%ebp) 10dbb7: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10dbb8: 58 pop %eax 10dbb9: 5b pop %ebx 10dbba: 5e pop %esi 10dbbb: 5f pop %edi 10dbbc: c9 leave 10dbbd: c3 ret 10dbbe: 66 90 xchg %ax,%ax 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; 10dbc0: 89 3d a4 78 12 00 mov %edi,0x1278a4 goto restart; 10dbc6: e9 5d ff ff ff jmp 10db28 <_Watchdog_Insert+0x34> =============================================================================== 0010dc34 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10dc34: 55 push %ebp 10dc35: 89 e5 mov %esp,%ebp 10dc37: 56 push %esi 10dc38: 53 push %ebx 10dc39: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10dc3c: 9c pushf 10dc3d: fa cli 10dc3e: 59 pop %ecx previous_state = the_watchdog->state; 10dc3f: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10dc42: 83 f8 01 cmp $0x1,%eax 10dc45: 74 4d je 10dc94 <_Watchdog_Remove+0x60> 10dc47: 73 0f jae 10dc58 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10dc49: 8b 1d 24 79 12 00 mov 0x127924,%ebx 10dc4f: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10dc52: 51 push %ecx 10dc53: 9d popf return( previous_state ); } 10dc54: 5b pop %ebx 10dc55: 5e pop %esi 10dc56: c9 leave 10dc57: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10dc58: 83 f8 03 cmp $0x3,%eax 10dc5b: 77 ec ja 10dc49 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10dc5d: 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 ); } 10dc64: 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) ) 10dc66: 8b 33 mov (%ebx),%esi 10dc68: 85 f6 test %esi,%esi 10dc6a: 74 06 je 10dc72 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10dc6c: 8b 72 10 mov 0x10(%edx),%esi 10dc6f: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10dc72: 8b 35 20 79 12 00 mov 0x127920,%esi 10dc78: 85 f6 test %esi,%esi 10dc7a: 74 0c je 10dc88 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10dc7c: 8b 35 94 7d 12 00 mov 0x127d94,%esi 10dc82: 89 35 a4 78 12 00 mov %esi,0x1278a4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10dc88: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10dc8b: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10dc8e: 89 1e mov %ebx,(%esi) 10dc90: eb b7 jmp 10dc49 <_Watchdog_Remove+0x15> 10dc92: 66 90 xchg %ax,%ax /* * 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; 10dc94: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10dc9b: eb ac jmp 10dc49 <_Watchdog_Remove+0x15> =============================================================================== 0010ef58 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10ef58: 55 push %ebp 10ef59: 89 e5 mov %esp,%ebp 10ef5b: 57 push %edi 10ef5c: 56 push %esi 10ef5d: 53 push %ebx 10ef5e: 83 ec 2c sub $0x2c,%esp 10ef61: 8b 55 08 mov 0x8(%ebp),%edx 10ef64: 8b 45 0c mov 0xc(%ebp),%eax printk( 10ef67: 8b 78 24 mov 0x24(%eax),%edi 10ef6a: 8b 70 20 mov 0x20(%eax),%esi 10ef6d: 8b 58 1c mov 0x1c(%eax),%ebx 10ef70: 8b 48 0c mov 0xc(%eax),%ecx 10ef73: 89 4d d4 mov %ecx,-0x2c(%ebp) 10ef76: 8b 48 10 mov 0x10(%eax),%ecx 10ef79: 89 4d e4 mov %ecx,-0x1c(%ebp) 10ef7c: 85 d2 test %edx,%edx 10ef7e: 74 2c je 10efac <_Watchdog_Report+0x54> 10ef80: b9 03 2f 12 00 mov $0x122f03,%ecx 10ef85: 83 ec 0c sub $0xc,%esp 10ef88: 57 push %edi 10ef89: 56 push %esi 10ef8a: 53 push %ebx 10ef8b: 50 push %eax 10ef8c: ff 75 d4 pushl -0x2c(%ebp) 10ef8f: ff 75 e4 pushl -0x1c(%ebp) 10ef92: 51 push %ecx 10ef93: 52 push %edx 10ef94: 68 56 39 12 00 push $0x123956 10ef99: e8 92 a0 ff ff call 109030 10ef9e: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10efa1: 8d 65 f4 lea -0xc(%ebp),%esp 10efa4: 5b pop %ebx 10efa5: 5e pop %esi 10efa6: 5f pop %edi 10efa7: c9 leave 10efa8: c3 ret 10efa9: 8d 76 00 lea 0x0(%esi),%esi void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10efac: b9 c9 37 12 00 mov $0x1237c9,%ecx 10efb1: 89 ca mov %ecx,%edx 10efb3: eb d0 jmp 10ef85 <_Watchdog_Report+0x2d> =============================================================================== 0010eee8 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10eee8: 55 push %ebp 10eee9: 89 e5 mov %esp,%ebp 10eeeb: 57 push %edi 10eeec: 56 push %esi 10eeed: 53 push %ebx 10eeee: 83 ec 20 sub $0x20,%esp 10eef1: 8b 7d 08 mov 0x8(%ebp),%edi 10eef4: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10eef7: 9c pushf 10eef8: fa cli 10eef9: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10eefc: 56 push %esi 10eefd: 57 push %edi 10eefe: 68 20 39 12 00 push $0x123920 10ef03: e8 28 a1 ff ff call 109030 printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } 10ef08: 8b 1e mov (%esi),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10ef0a: 83 c6 04 add $0x4,%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { 10ef0d: 83 c4 10 add $0x10,%esp 10ef10: 39 f3 cmp %esi,%ebx 10ef12: 74 31 je 10ef45 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10ef14: 83 ec 08 sub $0x8,%esp 10ef17: 53 push %ebx 10ef18: 6a 00 push $0x0 10ef1a: e8 39 00 00 00 call 10ef58 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) 10ef1f: 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 = _Chain_First( header ) ; 10ef21: 83 c4 10 add $0x10,%esp 10ef24: 39 f3 cmp %esi,%ebx 10ef26: 75 ec jne 10ef14 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10ef28: 83 ec 08 sub $0x8,%esp 10ef2b: 57 push %edi 10ef2c: 68 37 39 12 00 push $0x123937 10ef31: e8 fa a0 ff ff call 109030 10ef36: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10ef39: ff 75 e4 pushl -0x1c(%ebp) 10ef3c: 9d popf } 10ef3d: 8d 65 f4 lea -0xc(%ebp),%esp 10ef40: 5b pop %ebx 10ef41: 5e pop %esi 10ef42: 5f pop %edi 10ef43: c9 leave 10ef44: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10ef45: 83 ec 0c sub $0xc,%esp 10ef48: 68 46 39 12 00 push $0x123946 10ef4d: e8 de a0 ff ff call 109030 10ef52: 83 c4 10 add $0x10,%esp 10ef55: eb e2 jmp 10ef39 <_Watchdog_Report_chain+0x51> =============================================================================== 0010dd0c <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10dd0c: 55 push %ebp 10dd0d: 89 e5 mov %esp,%ebp 10dd0f: 57 push %edi 10dd10: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10dd11: 8b 1d 60 35 12 00 mov 0x123560,%ebx uintptr_t size = Configuration.work_space_size; 10dd17: 8b 15 64 35 12 00 mov 0x123564,%edx if ( Configuration.do_zero_of_workspace ) 10dd1d: 80 3d 88 35 12 00 00 cmpb $0x0,0x123588 10dd24: 75 1e jne 10dd44 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10dd26: 6a 04 push $0x4 10dd28: 52 push %edx 10dd29: 53 push %ebx 10dd2a: 68 20 78 12 00 push $0x127820 10dd2f: e8 78 dd ff ff call 10baac <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10dd34: 83 c4 10 add $0x10,%esp 10dd37: 85 c0 test %eax,%eax 10dd39: 74 13 je 10dd4e <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10dd3b: 8d 65 f8 lea -0x8(%ebp),%esp 10dd3e: 5b pop %ebx 10dd3f: 5f pop %edi 10dd40: c9 leave 10dd41: c3 ret 10dd42: 66 90 xchg %ax,%ax 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 ); 10dd44: 31 c0 xor %eax,%eax 10dd46: 89 df mov %ebx,%edi 10dd48: 89 d1 mov %edx,%ecx 10dd4a: f3 aa rep stos %al,%es:(%edi) 10dd4c: eb d8 jmp 10dd26 <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10dd4e: 50 push %eax 10dd4f: 6a 02 push $0x2 10dd51: 6a 01 push $0x1 10dd53: 6a 00 push $0x0 10dd55: e8 5a df ff ff call 10bcb4 <_Internal_error_Occurred> =============================================================================== 0010ba44 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 10ba44: 55 push %ebp 10ba45: 89 e5 mov %esp,%ebp 10ba47: 57 push %edi 10ba48: 56 push %esi 10ba49: 53 push %ebx 10ba4a: 83 ec 78 sub $0x78,%esp 10ba4d: 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 ); 10ba50: 53 push %ebx 10ba51: e8 2a ea ff ff call 10a480 if ( old_parent_pathlen == 0 ) 10ba56: 83 c4 10 add $0x10,%esp 10ba59: 85 c0 test %eax,%eax 10ba5b: 0f 85 57 01 00 00 jne 10bbb8 <_rename_r+0x174> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 10ba61: 52 push %edx 10ba62: 8d 45 b8 lea -0x48(%ebp),%eax 10ba65: 89 45 94 mov %eax,-0x6c(%ebp) 10ba68: 50 push %eax 10ba69: 8d 45 e4 lea -0x1c(%ebp),%eax 10ba6c: 50 push %eax 10ba6d: 53 push %ebx 10ba6e: e8 e1 03 00 00 call 10be54 10ba73: 83 c4 10 add $0x10,%esp 10ba76: 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; 10ba78: 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; 10ba7c: 8d 7d cc lea -0x34(%ebp),%edi 10ba7f: b9 05 00 00 00 mov $0x5,%ecx 10ba84: 8b 75 94 mov -0x6c(%ebp),%esi 10ba87: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 10ba89: 01 d3 add %edx,%ebx 10ba8b: 89 5d e0 mov %ebx,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10ba8e: be ff ff ff ff mov $0xffffffff,%esi 10ba93: 89 f1 mov %esi,%ecx 10ba95: 89 df mov %ebx,%edi 10ba97: 31 c0 xor %eax,%eax 10ba99: f2 ae repnz scas %es:(%edi),%al 10ba9b: f7 d1 not %ecx 10ba9d: 49 dec %ecx 10ba9e: 83 ec 08 sub $0x8,%esp 10baa1: 51 push %ecx 10baa2: 53 push %ebx 10baa3: e8 1c ea ff ff call 10a4c4 10baa8: 01 c3 add %eax,%ebx 10baaa: 89 5d e0 mov %ebx,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10baad: 89 f1 mov %esi,%ecx 10baaf: 89 df mov %ebx,%edi 10bab1: 31 c0 xor %eax,%eax 10bab3: f2 ae repnz scas %es:(%edi),%al 10bab5: f7 d1 not %ecx 10bab7: 49 dec %ecx 10bab8: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10babf: 8d 75 cc lea -0x34(%ebp),%esi 10bac2: 56 push %esi 10bac3: 6a 00 push $0x0 10bac5: 51 push %ecx 10bac6: 53 push %ebx 10bac7: e8 08 e9 ff ff call 10a3d4 0, &old_loc, false ); if ( result != 0 ) { 10bacc: 83 c4 20 add $0x20,%esp 10bacf: 85 c0 test %eax,%eax 10bad1: 0f 85 c9 00 00 00 jne 10bba0 <_rename_r+0x15c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 10bad7: 50 push %eax 10bad8: 8d 5d a4 lea -0x5c(%ebp),%ebx 10badb: 53 push %ebx 10badc: 8d 45 e4 lea -0x1c(%ebp),%eax 10badf: 50 push %eax 10bae0: ff 75 10 pushl 0x10(%ebp) 10bae3: e8 6c 03 00 00 call 10be54 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 10bae8: 83 c4 0c add $0xc,%esp 10baeb: 8d 45 e0 lea -0x20(%ebp),%eax 10baee: 50 push %eax 10baef: 53 push %ebx 10baf0: 8b 45 10 mov 0x10(%ebp),%eax 10baf3: 03 45 e4 add -0x1c(%ebp),%eax 10baf6: 50 push %eax 10baf7: 8b 45 b0 mov -0x50(%ebp),%eax 10bafa: ff 50 04 call *0x4(%eax) if ( result != 0 ) { 10bafd: 83 c4 10 add $0x10,%esp 10bb00: 85 c0 test %eax,%eax 10bb02: 0f 85 e0 00 00 00 jne 10bbe8 <_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 ) { 10bb08: 8b 45 b4 mov -0x4c(%ebp),%eax 10bb0b: 39 45 c8 cmp %eax,-0x38(%ebp) 10bb0e: 75 48 jne 10bb58 <_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 ); 10bb10: ff 75 e0 pushl -0x20(%ebp) 10bb13: 53 push %ebx 10bb14: 56 push %esi 10bb15: ff 75 94 pushl -0x6c(%ebp) 10bb18: 8b 45 b0 mov -0x50(%ebp),%eax 10bb1b: ff 50 40 call *0x40(%eax) 10bb1e: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &new_parent_loc ); 10bb20: 89 1c 24 mov %ebx,(%esp) 10bb23: e8 c8 eb ff ff call 10a6f0 if ( free_old_parentloc ) 10bb28: 83 c4 10 add $0x10,%esp 10bb2b: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10bb2f: 75 17 jne 10bb48 <_rename_r+0x104> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 10bb31: 83 ec 0c sub $0xc,%esp 10bb34: 56 push %esi 10bb35: e8 b6 eb ff ff call 10a6f0 return result; 10bb3a: 83 c4 10 add $0x10,%esp } 10bb3d: 89 f8 mov %edi,%eax 10bb3f: 8d 65 f4 lea -0xc(%ebp),%esp 10bb42: 5b pop %ebx 10bb43: 5e pop %esi 10bb44: 5f pop %edi 10bb45: c9 leave 10bb46: c3 ret 10bb47: 90 nop 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 ); 10bb48: 83 ec 0c sub $0xc,%esp 10bb4b: ff 75 94 pushl -0x6c(%ebp) 10bb4e: e8 9d eb ff ff call 10a6f0 10bb53: 83 c4 10 add $0x10,%esp 10bb56: eb d9 jmp 10bb31 <_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 ); 10bb58: 83 ec 0c sub $0xc,%esp 10bb5b: 53 push %ebx 10bb5c: e8 8f eb ff ff call 10a6f0 if ( free_old_parentloc ) 10bb61: 83 c4 10 add $0x10,%esp 10bb64: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10bb68: 74 0e je 10bb78 <_rename_r+0x134> rtems_filesystem_freenode( &old_parent_loc ); 10bb6a: 83 ec 0c sub $0xc,%esp 10bb6d: ff 75 94 pushl -0x6c(%ebp) 10bb70: e8 7b eb ff ff call 10a6f0 10bb75: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10bb78: 83 ec 0c sub $0xc,%esp 10bb7b: 56 push %esi 10bb7c: e8 6f eb ff ff call 10a6f0 rtems_set_errno_and_return_minus_one( EXDEV ); 10bb81: e8 3a ae 00 00 call 1169c0 <__errno> 10bb86: c7 00 12 00 00 00 movl $0x12,(%eax) 10bb8c: 83 c4 10 add $0x10,%esp 10bb8f: 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; } 10bb94: 89 f8 mov %edi,%eax 10bb96: 8d 65 f4 lea -0xc(%ebp),%esp 10bb99: 5b pop %ebx 10bb9a: 5e pop %esi 10bb9b: 5f pop %edi 10bb9c: c9 leave 10bb9d: c3 ret 10bb9e: 66 90 xchg %ax,%ax 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 ) 10bba0: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10bba4: 75 78 jne 10bc1e <_rename_r+0x1da> <== ALWAYS TAKEN rtems_filesystem_freenode( &old_parent_loc ); return -1; 10bba6: 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; } 10bbab: 89 f8 mov %edi,%eax <== NOT EXECUTED 10bbad: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10bbb0: 5b pop %ebx <== NOT EXECUTED 10bbb1: 5e pop %esi <== NOT EXECUTED 10bbb2: 5f pop %edi <== NOT EXECUTED 10bbb3: c9 leave <== NOT EXECUTED 10bbb4: c3 ret <== NOT EXECUTED 10bbb5: 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, 10bbb8: 89 c2 mov %eax,%edx 10bbba: 83 ec 0c sub $0xc,%esp 10bbbd: 6a 00 push $0x0 10bbbf: 8d 45 b8 lea -0x48(%ebp),%eax 10bbc2: 89 45 94 mov %eax,-0x6c(%ebp) 10bbc5: 50 push %eax 10bbc6: 6a 02 push $0x2 10bbc8: 52 push %edx 10bbc9: 53 push %ebx 10bbca: 89 55 8c mov %edx,-0x74(%ebp) 10bbcd: e8 6a e8 ff ff call 10a43c RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10bbd2: 83 c4 20 add $0x20,%esp 10bbd5: 85 c0 test %eax,%eax 10bbd7: 8b 55 8c mov -0x74(%ebp),%edx 10bbda: 75 ca jne 10bba6 <_rename_r+0x162> <== NEVER TAKEN return -1; free_old_parentloc = true; 10bbdc: c6 45 93 01 movb $0x1,-0x6d(%ebp) 10bbe0: e9 97 fe ff ff jmp 10ba7c <_rename_r+0x38> 10bbe5: 8d 76 00 lea 0x0(%esi),%esi 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 ); 10bbe8: 83 ec 0c sub $0xc,%esp 10bbeb: 53 push %ebx 10bbec: e8 ff ea ff ff call 10a6f0 if ( free_old_parentloc ) 10bbf1: 83 c4 10 add $0x10,%esp 10bbf4: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10bbf8: 74 0e je 10bc08 <_rename_r+0x1c4> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10bbfa: 83 ec 0c sub $0xc,%esp 10bbfd: ff 75 94 pushl -0x6c(%ebp) 10bc00: e8 eb ea ff ff call 10a6f0 10bc05: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10bc08: 83 ec 0c sub $0xc,%esp 10bc0b: 56 push %esi 10bc0c: e8 df ea ff ff call 10a6f0 return -1; 10bc11: 83 c4 10 add $0x10,%esp 10bc14: bf ff ff ff ff mov $0xffffffff,%edi 10bc19: e9 1f ff ff ff jmp 10bb3d <_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 ); 10bc1e: 83 ec 0c sub $0xc,%esp 10bc21: ff 75 94 pushl -0x6c(%ebp) 10bc24: e8 c7 ea ff ff call 10a6f0 10bc29: 83 c4 10 add $0x10,%esp return -1; 10bc2c: bf ff ff ff ff mov $0xffffffff,%edi 10bc31: e9 07 ff ff ff jmp 10bb3d <_rename_r+0xf9> =============================================================================== 0010a314 <_times>: #endif clock_t _times( struct tms *ptms ) { 10a314: 55 push %ebp 10a315: 89 e5 mov %esp,%ebp 10a317: 56 push %esi 10a318: 53 push %ebx 10a319: 83 ec 10 sub $0x10,%esp 10a31c: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_interval ticks; if ( !ptms ) 10a31f: 85 db test %ebx,%ebx 10a321: 74 75 je 10a398 <_times+0x84> /* * This call does not depend on TOD being initialized and can't fail. */ ticks = rtems_clock_get_ticks_since_boot(); 10a323: e8 84 04 00 00 call 10a7ac 10a328: 89 c6 mov %eax,%esi { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 10a32a: 8b 0d 0c 38 12 00 mov 0x12380c,%ecx 10a330: ba 83 de 1b 43 mov $0x431bde83,%edx 10a335: 89 c8 mov %ecx,%eax 10a337: f7 e2 mul %edx 10a339: c1 ea 12 shr $0x12,%edx 10a33c: 89 55 e8 mov %edx,-0x18(%ebp) 10a33f: 8d 04 89 lea (%ecx,%ecx,4),%eax 10a342: 8d 04 80 lea (%eax,%eax,4),%eax 10a345: 8d 04 80 lea (%eax,%eax,4),%eax 10a348: c1 e0 03 shl $0x3,%eax 10a34b: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10a350: 31 d2 xor %edx,%edx 10a352: f7 f1 div %ecx 10a354: 89 55 ec mov %edx,-0x14(%ebp) TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 10a357: 8d 45 f0 lea -0x10(%ebp),%eax 10a35a: 50 push %eax 10a35b: 8d 45 f4 lea -0xc(%ebp),%eax 10a35e: 50 push %eax 10a35f: 8d 45 e8 lea -0x18(%ebp),%eax 10a362: 50 push %eax 10a363: a1 38 80 12 00 mov 0x128038,%eax 10a368: 05 84 00 00 00 add $0x84,%eax 10a36d: 50 push %eax 10a36e: e8 3d 36 00 00 call 10d9b0 <_Timespec_Divide> &_Thread_Executing->cpu_time_used, &per_tick, &ticks, &fractional_ticks ); ptms->tms_utime = ticks; 10a373: 8b 45 f4 mov -0xc(%ebp),%eax 10a376: 89 03 mov %eax,(%ebx) } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; 10a378: 89 73 04 mov %esi,0x4(%ebx) ptms->tms_cutime = 0; 10a37b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) ptms->tms_cstime = 0; 10a382: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) return ticks; 10a389: 83 c4 10 add $0x10,%esp 10a38c: 89 f0 mov %esi,%eax } 10a38e: 8d 65 f8 lea -0x8(%ebp),%esp 10a391: 5b pop %ebx 10a392: 5e pop %esi 10a393: c9 leave 10a394: c3 ret 10a395: 8d 76 00 lea 0x0(%esi),%esi ) { rtems_interval ticks; if ( !ptms ) rtems_set_errno_and_return_minus_one( EFAULT ); 10a398: e8 17 8d 00 00 call 1130b4 <__errno> 10a39d: c7 00 0e 00 00 00 movl $0xe,(%eax) 10a3a3: b8 ff ff ff ff mov $0xffffffff,%eax ptms->tms_stime = ticks; ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; } 10a3a8: 8d 65 f8 lea -0x8(%ebp),%esp 10a3ab: 5b pop %ebx 10a3ac: 5e pop %esi 10a3ad: c9 leave 10a3ae: c3 ret =============================================================================== 001090ac : int access( const char *path, int amode ) { 1090ac: 55 push %ebp 1090ad: 89 e5 mov %esp,%ebp 1090af: 53 push %ebx 1090b0: 83 ec 5c sub $0x5c,%esp 1090b3: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 1090b6: 8d 45 b0 lea -0x50(%ebp),%eax 1090b9: 50 push %eax 1090ba: ff 75 08 pushl 0x8(%ebp) 1090bd: e8 6a 17 00 00 call 10a82c 1090c2: 83 c4 10 add $0x10,%esp 1090c5: 85 c0 test %eax,%eax 1090c7: 75 1f jne 1090e8 return -1; if ( amode & R_OK ) { 1090c9: f6 c3 04 test $0x4,%bl 1090cc: 75 26 jne 1090f4 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 1090ce: f6 c3 02 test $0x2,%bl 1090d1: 75 0d jne 1090e0 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 1090d3: 83 e3 01 and $0x1,%ebx 1090d6: 75 24 jne 1090fc if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; 1090d8: 31 c0 xor %eax,%eax } 1090da: 8b 5d fc mov -0x4(%ebp),%ebx 1090dd: c9 leave 1090de: c3 ret 1090df: 90 nop if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 1090e0: f6 45 bc 80 testb $0x80,-0x44(%ebp) 1090e4: 75 ed jne 1090d3 1090e6: 66 90 xchg %ax,%ax return -1; 1090e8: b8 ff ff ff ff mov $0xffffffff,%eax if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; } 1090ed: 8b 5d fc mov -0x4(%ebp),%ebx 1090f0: c9 leave 1090f1: c3 ret 1090f2: 66 90 xchg %ax,%ax if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 1090f4: f6 45 bd 01 testb $0x1,-0x43(%ebp) 1090f8: 75 d4 jne 1090ce 1090fa: eb ec jmp 1090e8 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 1090fc: 8b 45 bc mov -0x44(%ebp),%eax 1090ff: 83 e0 40 and $0x40,%eax return -1; } return 0; 109102: 83 f8 01 cmp $0x1,%eax 109105: 19 c0 sbb %eax,%eax 109107: eb d1 jmp 1090da =============================================================================== 0010ab7c : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10ab7c: 55 push %ebp 10ab7d: 89 e5 mov %esp,%ebp 10ab7f: 57 push %edi 10ab80: 56 push %esi 10ab81: 53 push %ebx 10ab82: 83 ec 1c sub $0x1c,%esp 10ab85: 8b 5d 08 mov 0x8(%ebp),%ebx 10ab88: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10ab8b: 85 db test %ebx,%ebx 10ab8d: 0f 84 f1 00 00 00 je 10ac84 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10ab93: 8b 53 04 mov 0x4(%ebx),%edx 10ab96: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10ab9c: 0f 87 e2 00 00 00 ja 10ac84 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10aba2: 85 f6 test %esi,%esi 10aba4: 74 10 je 10abb6 olddelta->tv_sec = 0; 10aba6: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10abac: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10abb3: 8b 53 04 mov 0x4(%ebx),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10abb6: 8b 03 mov (%ebx),%eax 10abb8: 8d 04 80 lea (%eax,%eax,4),%eax 10abbb: 8d 04 80 lea (%eax,%eax,4),%eax 10abbe: 8d 04 80 lea (%eax,%eax,4),%eax 10abc1: 8d 04 80 lea (%eax,%eax,4),%eax 10abc4: 8d 04 80 lea (%eax,%eax,4),%eax 10abc7: 8d 04 80 lea (%eax,%eax,4),%eax 10abca: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; 10abcd: 8d 04 02 lea (%edx,%eax,1),%eax /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10abd0: 3b 05 ec 49 12 00 cmp 0x1249ec,%eax 10abd6: 73 0c jae 10abe4 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; 10abd8: 31 c0 xor %eax,%eax } 10abda: 8d 65 f4 lea -0xc(%ebp),%esp 10abdd: 5b pop %ebx 10abde: 5e pop %esi 10abdf: 5f pop %edi 10abe0: c9 leave 10abe1: c3 ret 10abe2: 66 90 xchg %ax,%ax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10abe4: a1 ac 8d 12 00 mov 0x128dac,%eax 10abe9: 40 inc %eax 10abea: a3 ac 8d 12 00 mov %eax,0x128dac * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10abef: 83 ec 0c sub $0xc,%esp 10abf2: 8d 7d e0 lea -0x20(%ebp),%edi 10abf5: 57 push %edi 10abf6: e8 9d 15 00 00 call 10c198 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10abfb: 8b 03 mov (%ebx),%eax 10abfd: 01 45 e0 add %eax,-0x20(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10ac00: 8b 43 04 mov 0x4(%ebx),%eax 10ac03: 8d 04 80 lea (%eax,%eax,4),%eax 10ac06: 8d 04 80 lea (%eax,%eax,4),%eax 10ac09: 8d 04 80 lea (%eax,%eax,4),%eax 10ac0c: c1 e0 03 shl $0x3,%eax 10ac0f: 03 45 e4 add -0x1c(%ebp),%eax 10ac12: 89 45 e4 mov %eax,-0x1c(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10ac15: 83 c4 10 add $0x10,%esp 10ac18: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10ac1d: 76 18 jbe 10ac37 10ac1f: 8b 55 e0 mov -0x20(%ebp),%edx 10ac22: 66 90 xchg %ax,%ax ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10ac24: 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( 10ac29: 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 ) { 10ac2a: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10ac2f: 77 f3 ja 10ac24 <== NEVER TAKEN 10ac31: 89 45 e4 mov %eax,-0x1c(%ebp) 10ac34: 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) ) { 10ac37: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10ac3c: 77 19 ja 10ac57 <== NEVER TAKEN 10ac3e: 8b 55 e0 mov -0x20(%ebp),%edx 10ac41: 8d 76 00 lea 0x0(%esi),%esi ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10ac44: 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( 10ac49: 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) ) { 10ac4a: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10ac4f: 76 f3 jbe 10ac44 10ac51: 89 45 e4 mov %eax,-0x1c(%ebp) 10ac54: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10ac57: 83 ec 0c sub $0xc,%esp 10ac5a: 57 push %edi 10ac5b: e8 c0 15 00 00 call 10c220 <_TOD_Set> _Thread_Enable_dispatch(); 10ac60: e8 5b 2a 00 00 call 10d6c0 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10ac65: 83 c4 10 add $0x10,%esp 10ac68: 85 f6 test %esi,%esi 10ac6a: 0f 84 68 ff ff ff je 10abd8 *olddelta = *delta; 10ac70: 8b 03 mov (%ebx),%eax 10ac72: 8b 53 04 mov 0x4(%ebx),%edx 10ac75: 89 06 mov %eax,(%esi) 10ac77: 89 56 04 mov %edx,0x4(%esi) return 0; 10ac7a: 31 c0 xor %eax,%eax } 10ac7c: 8d 65 f4 lea -0xc(%ebp),%esp 10ac7f: 5b pop %ebx 10ac80: 5e pop %esi 10ac81: 5f pop %edi 10ac82: c9 leave 10ac83: 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 ); 10ac84: e8 0f 8c 00 00 call 113898 <__errno> 10ac89: c7 00 16 00 00 00 movl $0x16,(%eax) 10ac8f: b8 ff ff ff ff mov $0xffffffff,%eax 10ac94: e9 41 ff ff ff jmp 10abda =============================================================================== 0010b2bc : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 10b2bc: 55 push %ebp 10b2bd: 89 e5 mov %esp,%ebp 10b2bf: 57 push %edi 10b2c0: 56 push %esi 10b2c1: 53 push %ebx 10b2c2: 83 ec 18 sub $0x18,%esp 10b2c5: 8b 75 08 mov 0x8(%ebp),%esi 10b2c8: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 10b2cb: 68 a0 94 12 00 push $0x1294a0 10b2d0: e8 bf 11 00 00 call 10c494 if (fcntl (fildes, F_GETFD) < 0) { 10b2d5: 5a pop %edx 10b2d6: 59 pop %ecx 10b2d7: 6a 01 push $0x1 10b2d9: 56 push %esi 10b2da: e8 65 6a 00 00 call 111d44 10b2df: 83 c4 10 add $0x10,%esp 10b2e2: 85 c0 test %eax,%eax 10b2e4: 0f 88 9b 01 00 00 js 10b485 pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { 10b2ea: 85 db test %ebx,%ebx 10b2ec: 0f 84 ea 00 00 00 je 10b3dc pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 10b2f2: 8b 3b mov (%ebx),%edi 10b2f4: 39 f7 cmp %esi,%edi 10b2f6: 0f 85 b8 00 00 00 jne 10b3b4 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 10b2fc: 56 push %esi 10b2fd: 6a 00 push $0x0 10b2ff: 57 push %edi 10b300: 68 e8 94 12 00 push $0x1294e8 10b305: e8 9e 03 00 00 call 10b6a8 10b30a: 89 c6 mov %eax,%esi if (r_chain == NULL) { 10b30c: 83 c4 10 add $0x10,%esp 10b30f: 85 c0 test %eax,%eax 10b311: 74 3d je 10b350 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 10b313: 8d 78 1c lea 0x1c(%eax),%edi 10b316: 83 ec 0c sub $0xc,%esp 10b319: 57 push %edi 10b31a: e8 75 11 00 00 call 10c494 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 10b31f: 58 pop %eax 10b320: 5a pop %edx 10b321: 53 push %ebx 10b322: 83 c6 08 add $0x8,%esi 10b325: 56 push %esi 10b326: e8 5d 07 00 00 call 10ba88 10b32b: 89 c3 mov %eax,%ebx pthread_mutex_unlock (&r_chain->mutex); 10b32d: 89 3c 24 mov %edi,(%esp) 10b330: e8 e7 11 00 00 call 10c51c pthread_mutex_unlock (&aio_request_queue.mutex); 10b335: c7 04 24 a0 94 12 00 movl $0x1294a0,(%esp) 10b33c: e8 db 11 00 00 call 10c51c return result; 10b341: 83 c4 10 add $0x10,%esp } return AIO_ALLDONE; } 10b344: 89 d8 mov %ebx,%eax 10b346: 8d 65 f4 lea -0xc(%ebp),%esp 10b349: 5b pop %ebx 10b34a: 5e pop %esi 10b34b: 5f pop %edi 10b34c: c9 leave 10b34d: c3 ret 10b34e: 66 90 xchg %ax,%ax rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 10b350: 81 3d f4 94 12 00 f8 cmpl $0x1294f8,0x1294f4 10b357: 94 12 00 10b35a: 74 40 je 10b39c <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 10b35c: 51 push %ecx 10b35d: 6a 00 push $0x0 10b35f: 57 push %edi 10b360: 68 f4 94 12 00 push $0x1294f4 10b365: e8 3e 03 00 00 call 10b6a8 if (r_chain == NULL) { 10b36a: 83 c4 10 add $0x10,%esp 10b36d: 85 c0 test %eax,%eax 10b36f: 74 43 je 10b3b4 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 10b371: 83 ec 08 sub $0x8,%esp 10b374: 53 push %ebx 10b375: 83 c0 08 add $0x8,%eax 10b378: 50 push %eax 10b379: e8 0a 07 00 00 call 10ba88 10b37e: 89 c3 mov %eax,%ebx pthread_mutex_unlock (&aio_request_queue.mutex); 10b380: c7 04 24 a0 94 12 00 movl $0x1294a0,(%esp) 10b387: e8 90 11 00 00 call 10c51c return result; 10b38c: 83 c4 10 add $0x10,%esp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 10b38f: 89 d8 mov %ebx,%eax 10b391: 8d 65 f4 lea -0xc(%ebp),%esp 10b394: 5b pop %ebx 10b395: 5e pop %esi 10b396: 5f pop %edi 10b397: c9 leave 10b398: c3 ret 10b399: 8d 76 00 lea 0x0(%esi),%esi result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } else { pthread_mutex_unlock (&aio_request_queue.mutex); 10b39c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b39f: 68 a0 94 12 00 push $0x1294a0 <== NOT EXECUTED 10b3a4: e8 73 11 00 00 call 10c51c <== NOT EXECUTED return AIO_ALLDONE; 10b3a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b3ac: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED 10b3b1: eb 91 jmp 10b344 <== NOT EXECUTED 10b3b3: 90 nop <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); 10b3b4: 83 ec 0c sub $0xc,%esp 10b3b7: 68 a0 94 12 00 push $0x1294a0 10b3bc: e8 5b 11 00 00 call 10c51c rtems_set_errno_and_return_minus_one (EINVAL); 10b3c1: e8 36 a3 00 00 call 1156fc <__errno> 10b3c6: c7 00 16 00 00 00 movl $0x16,(%eax) 10b3cc: 83 c4 10 add $0x10,%esp 10b3cf: bb ff ff ff ff mov $0xffffffff,%ebx 10b3d4: e9 6b ff ff ff jmp 10b344 10b3d9: 8d 76 00 lea 0x0(%esi),%esi /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 10b3dc: 50 push %eax 10b3dd: 6a 00 push $0x0 10b3df: 56 push %esi 10b3e0: 68 e8 94 12 00 push $0x1294e8 10b3e5: e8 be 02 00 00 call 10b6a8 10b3ea: 89 c3 mov %eax,%ebx if (r_chain == NULL) { 10b3ec: 83 c4 10 add $0x10,%esp 10b3ef: 85 c0 test %eax,%eax 10b3f1: 74 3d je 10b430 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 10b3f3: 8d 70 1c lea 0x1c(%eax),%esi 10b3f6: 83 ec 0c sub $0xc,%esp 10b3f9: 56 push %esi 10b3fa: e8 95 10 00 00 call 10c494 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10b3ff: 89 1c 24 mov %ebx,(%esp) 10b402: e8 a5 29 00 00 call 10ddac <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 10b407: 89 1c 24 mov %ebx,(%esp) 10b40a: e8 29 06 00 00 call 10ba38 pthread_mutex_unlock (&r_chain->mutex); 10b40f: 89 34 24 mov %esi,(%esp) 10b412: e8 05 11 00 00 call 10c51c pthread_mutex_unlock (&aio_request_queue.mutex); 10b417: c7 04 24 a0 94 12 00 movl $0x1294a0,(%esp) 10b41e: e8 f9 10 00 00 call 10c51c return AIO_CANCELED; 10b423: 83 c4 10 add $0x10,%esp 10b426: 31 db xor %ebx,%ebx 10b428: e9 17 ff ff ff jmp 10b344 10b42d: 8d 76 00 lea 0x0(%esi),%esi r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 10b430: 81 3d f4 94 12 00 f8 cmpl $0x1294f8,0x1294f4 10b437: 94 12 00 10b43a: 0f 84 5c ff ff ff je 10b39c <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 10b440: 57 push %edi 10b441: 6a 00 push $0x0 10b443: 56 push %esi 10b444: 68 f4 94 12 00 push $0x1294f4 10b449: e8 5a 02 00 00 call 10b6a8 10b44e: 89 c3 mov %eax,%ebx if (r_chain == NULL) { 10b450: 83 c4 10 add $0x10,%esp 10b453: 85 c0 test %eax,%eax 10b455: 74 53 je 10b4aa 10b457: 83 ec 0c sub $0xc,%esp 10b45a: 50 push %eax 10b45b: e8 4c 29 00 00 call 10ddac <_Chain_Extract> } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 10b460: 89 1c 24 mov %ebx,(%esp) 10b463: e8 d0 05 00 00 call 10ba38 pthread_mutex_destroy (&r_chain->mutex); 10b468: 8d 73 1c lea 0x1c(%ebx),%esi 10b46b: 89 34 24 mov %esi,(%esp) 10b46e: e8 b5 0d 00 00 call 10c228 pthread_cond_destroy (&r_chain->mutex); 10b473: 89 34 24 mov %esi,(%esp) 10b476: e8 69 0a 00 00 call 10bee4 free (r_chain); 10b47b: 89 1c 24 mov %ebx,(%esp) 10b47e: e8 31 cc ff ff call 1080b4 10b483: eb 92 jmp 10b417 int result; pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); 10b485: 83 ec 0c sub $0xc,%esp 10b488: 68 a0 94 12 00 push $0x1294a0 10b48d: e8 8a 10 00 00 call 10c51c rtems_set_errno_and_return_minus_one (EBADF); 10b492: e8 65 a2 00 00 call 1156fc <__errno> 10b497: c7 00 09 00 00 00 movl $0x9,(%eax) 10b49d: 83 c4 10 add $0x10,%esp 10b4a0: bb ff ff ff ff mov $0xffffffff,%ebx 10b4a5: e9 9a fe ff ff jmp 10b344 AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock(&aio_request_queue.mutex); 10b4aa: 83 ec 0c sub $0xc,%esp 10b4ad: 68 a0 94 12 00 push $0x1294a0 10b4b2: e8 65 10 00 00 call 10c51c return AIO_ALLDONE; 10b4b7: 83 c4 10 add $0x10,%esp 10b4ba: b3 02 mov $0x2,%bl 10b4bc: e9 83 fe ff ff jmp 10b344 =============================================================================== 0010b4d0 : int aio_fsync( int op, struct aiocb *aiocbp ) { 10b4d0: 55 push %ebp 10b4d1: 89 e5 mov %esp,%ebp 10b4d3: 53 push %ebx 10b4d4: 83 ec 04 sub $0x4,%esp 10b4d7: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_aio_request *req; int mode; if (op != O_SYNC) 10b4da: 81 7d 08 00 20 00 00 cmpl $0x2000,0x8(%ebp) 10b4e1: 75 41 jne 10b524 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 10b4e3: 83 ec 08 sub $0x8,%esp 10b4e6: 6a 03 push $0x3 10b4e8: ff 33 pushl (%ebx) 10b4ea: e8 55 68 00 00 call 111d44 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 10b4ef: 83 e0 03 and $0x3,%eax 10b4f2: 48 dec %eax 10b4f3: 83 c4 10 add $0x10,%esp 10b4f6: 83 f8 01 cmp $0x1,%eax 10b4f9: 77 4d ja 10b548 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 10b4fb: 83 ec 0c sub $0xc,%esp 10b4fe: 6a 18 push $0x18 10b500: e8 c3 d0 ff ff call 1085c8 if (req == NULL) 10b505: 83 c4 10 add $0x10,%esp 10b508: 85 c0 test %eax,%eax 10b50a: 74 57 je 10b563 <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 10b50c: 89 58 14 mov %ebx,0x14(%eax) req->aiocbp->aio_lio_opcode = LIO_SYNC; 10b50f: c7 43 2c 03 00 00 00 movl $0x3,0x2c(%ebx) return rtems_aio_enqueue (req); 10b516: 89 45 08 mov %eax,0x8(%ebp) } 10b519: 8b 5d fc mov -0x4(%ebp),%ebx 10b51c: c9 leave rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 10b51d: e9 d6 05 00 00 jmp 10baf8 10b522: 66 90 xchg %ax,%ax { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 10b524: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx) 10b52b: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10b532: e8 c5 a1 00 00 call 1156fc <__errno> 10b537: c7 00 16 00 00 00 movl $0x16,(%eax) req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 10b53d: b8 ff ff ff ff mov $0xffffffff,%eax 10b542: 8b 5d fc mov -0x4(%ebp),%ebx 10b545: c9 leave 10b546: c3 ret 10b547: 90 nop if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 10b548: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx) 10b54f: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10b556: e8 a1 a1 00 00 call 1156fc <__errno> 10b55b: c7 00 09 00 00 00 movl $0x9,(%eax) 10b561: eb da jmp 10b53d req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 10b563: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED 10b56a: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED 10b571: e8 86 a1 00 00 call 1156fc <__errno> <== NOT EXECUTED 10b576: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 10b57c: eb bf jmp 10b53d <== NOT EXECUTED =============================================================================== 0010bd08 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 10bd08: 55 push %ebp 10bd09: 89 e5 mov %esp,%ebp 10bd0b: 53 push %ebx 10bd0c: 83 ec 0c sub $0xc,%esp 10bd0f: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 10bd12: 6a 03 push $0x3 10bd14: ff 33 pushl (%ebx) 10bd16: e8 29 60 00 00 call 111d44 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 10bd1b: 83 c4 10 add $0x10,%esp 10bd1e: 83 e0 03 and $0x3,%eax 10bd21: 74 05 je 10bd28 <== NEVER TAKEN 10bd23: 83 f8 02 cmp $0x2,%eax 10bd26: 75 38 jne 10bd60 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 10bd28: 8b 53 14 mov 0x14(%ebx),%edx 10bd2b: 85 d2 test %edx,%edx 10bd2d: 75 55 jne 10bd84 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 10bd2f: 8b 43 08 mov 0x8(%ebx),%eax 10bd32: 85 c0 test %eax,%eax 10bd34: 78 4e js 10bd84 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 10bd36: 83 ec 0c sub $0xc,%esp 10bd39: 6a 18 push $0x18 10bd3b: e8 88 c8 ff ff call 1085c8 if (req == NULL) 10bd40: 83 c4 10 add $0x10,%esp 10bd43: 85 c0 test %eax,%eax 10bd45: 74 58 je 10bd9f <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 10bd47: 89 58 14 mov %ebx,0x14(%eax) req->aiocbp->aio_lio_opcode = LIO_READ; 10bd4a: c7 43 2c 01 00 00 00 movl $0x1,0x2c(%ebx) return rtems_aio_enqueue (req); 10bd51: 89 45 08 mov %eax,0x8(%ebp) } 10bd54: 8b 5d fc mov -0x4(%ebp),%ebx 10bd57: c9 leave rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 10bd58: e9 9b fd ff ff jmp 10baf8 10bd5d: 8d 76 00 lea 0x0(%esi),%esi rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 10bd60: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx) 10bd67: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10bd6e: e8 89 99 00 00 call 1156fc <__errno> 10bd73: c7 00 09 00 00 00 movl $0x9,(%eax) req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 10bd79: b8 ff ff ff ff mov $0xffffffff,%eax 10bd7e: 8b 5d fc mov -0x4(%ebp),%ebx 10bd81: c9 leave 10bd82: c3 ret 10bd83: 90 nop if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 10bd84: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx) 10bd8b: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10bd92: e8 65 99 00 00 call 1156fc <__errno> 10bd97: c7 00 16 00 00 00 movl $0x16,(%eax) 10bd9d: eb da jmp 10bd79 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 10bd9f: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED 10bda6: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED 10bdad: e8 4a 99 00 00 call 1156fc <__errno> <== NOT EXECUTED 10bdb2: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 10bdb8: eb bf jmp 10bd79 <== NOT EXECUTED =============================================================================== 0010bdc8 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 10bdc8: 55 push %ebp 10bdc9: 89 e5 mov %esp,%ebp 10bdcb: 53 push %ebx 10bdcc: 83 ec 0c sub $0xc,%esp 10bdcf: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 10bdd2: 6a 03 push $0x3 10bdd4: ff 33 pushl (%ebx) 10bdd6: e8 69 5f 00 00 call 111d44 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 10bddb: 83 e0 03 and $0x3,%eax 10bdde: 48 dec %eax 10bddf: 83 c4 10 add $0x10,%esp 10bde2: 83 f8 01 cmp $0x1,%eax 10bde5: 77 35 ja 10be1c rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 10bde7: 8b 53 14 mov 0x14(%ebx),%edx 10bdea: 85 d2 test %edx,%edx 10bdec: 75 52 jne 10be40 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 10bdee: 8b 43 08 mov 0x8(%ebx),%eax 10bdf1: 85 c0 test %eax,%eax 10bdf3: 78 4b js 10be40 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 10bdf5: 83 ec 0c sub $0xc,%esp 10bdf8: 6a 18 push $0x18 10bdfa: e8 c9 c7 ff ff call 1085c8 if (req == NULL) 10bdff: 83 c4 10 add $0x10,%esp 10be02: 85 c0 test %eax,%eax 10be04: 74 55 je 10be5b <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 10be06: 89 58 14 mov %ebx,0x14(%eax) req->aiocbp->aio_lio_opcode = LIO_WRITE; 10be09: c7 43 2c 02 00 00 00 movl $0x2,0x2c(%ebx) return rtems_aio_enqueue (req); 10be10: 89 45 08 mov %eax,0x8(%ebp) } 10be13: 8b 5d fc mov -0x4(%ebp),%ebx 10be16: c9 leave rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 10be17: e9 dc fc ff ff jmp 10baf8 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 10be1c: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx) 10be23: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10be2a: e8 cd 98 00 00 call 1156fc <__errno> 10be2f: c7 00 09 00 00 00 movl $0x9,(%eax) req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 10be35: b8 ff ff ff ff mov $0xffffffff,%eax 10be3a: 8b 5d fc mov -0x4(%ebp),%ebx 10be3d: c9 leave 10be3e: c3 ret 10be3f: 90 nop if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 10be40: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx) 10be47: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10be4e: e8 a9 98 00 00 call 1156fc <__errno> 10be53: c7 00 16 00 00 00 movl $0x16,(%eax) 10be59: eb da jmp 10be35 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 10be5b: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED 10be62: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED 10be69: e8 8e 98 00 00 call 1156fc <__errno> <== NOT EXECUTED 10be6e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 10be74: eb bf jmp 10be35 <== NOT EXECUTED =============================================================================== 00108870 : int cfsetospeed( struct termios *tp, speed_t speed ) { 108870: 55 push %ebp 108871: 89 e5 mov %esp,%ebp 108873: 83 ec 08 sub $0x8,%esp 108876: 8b 4d 08 mov 0x8(%ebp),%ecx 108879: 8b 55 0c mov 0xc(%ebp),%edx if ( speed & ~CBAUD ) 10887c: f7 c2 f0 ef ff ff test $0xffffeff0,%edx 108882: 75 14 jne 108898 rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 108884: 8b 41 08 mov 0x8(%ecx),%eax 108887: 25 f0 ef ff ff and $0xffffeff0,%eax 10888c: 09 d0 or %edx,%eax 10888e: 89 41 08 mov %eax,0x8(%ecx) return 0; 108891: 31 c0 xor %eax,%eax } 108893: c9 leave 108894: c3 ret 108895: 8d 76 00 lea 0x0(%esi),%esi struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 108898: e8 6b c0 00 00 call 114908 <__errno> 10889d: c7 00 16 00 00 00 movl $0x16,(%eax) 1088a3: b8 ff ff ff ff mov $0xffffffff,%eax tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; return 0; } 1088a8: c9 leave 1088a9: c3 ret =============================================================================== 0010fbe4 : #include int chdir( const char *pathname ) { 10fbe4: 55 push %ebp 10fbe5: 89 e5 mov %esp,%ebp 10fbe7: 57 push %edi 10fbe8: 56 push %esi 10fbe9: 83 ec 20 sub $0x20,%esp 10fbec: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 10fbef: 85 d2 test %edx,%edx 10fbf1: 74 75 je 10fc68 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 10fbf3: 31 c0 xor %eax,%eax 10fbf5: b9 ff ff ff ff mov $0xffffffff,%ecx 10fbfa: 89 d7 mov %edx,%edi 10fbfc: f2 ae repnz scas %es:(%edi),%al 10fbfe: f7 d1 not %ecx 10fc00: 49 dec %ecx 10fc01: 83 ec 0c sub $0xc,%esp 10fc04: 6a 01 push $0x1 10fc06: 8d 75 e4 lea -0x1c(%ebp),%esi 10fc09: 56 push %esi 10fc0a: 6a 01 push $0x1 10fc0c: 51 push %ecx 10fc0d: 52 push %edx 10fc0e: e8 75 7d ff ff call 107988 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 10fc13: 83 c4 20 add $0x20,%esp 10fc16: 85 c0 test %eax,%eax 10fc18: 74 0e je 10fc28 return -1; 10fc1a: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 10fc1f: 8d 65 f8 lea -0x8(%ebp),%esp 10fc22: 5e pop %esi 10fc23: 5f pop %edi 10fc24: c9 leave 10fc25: c3 ret 10fc26: 66 90 xchg %ax,%ax return -1; /* * Verify you can change directory into this node. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 10fc28: 83 ec 0c sub $0xc,%esp 10fc2b: 56 push %esi 10fc2c: 8b 45 f0 mov -0x10(%ebp),%eax 10fc2f: ff 50 10 call *0x10(%eax) 10fc32: 83 c4 10 add $0x10,%esp 10fc35: 48 dec %eax 10fc36: 75 48 jne 10fc80 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 10fc38: 83 ec 0c sub $0xc,%esp 10fc3b: a1 b0 5c 12 00 mov 0x125cb0,%eax 10fc40: 83 c0 04 add $0x4,%eax 10fc43: 50 push %eax 10fc44: e8 17 7e ff ff call 107a60 rtems_filesystem_current = loc; 10fc49: 8b 3d b0 5c 12 00 mov 0x125cb0,%edi 10fc4f: 83 c7 04 add $0x4,%edi 10fc52: b9 05 00 00 00 mov $0x5,%ecx 10fc57: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 10fc59: 83 c4 10 add $0x10,%esp 10fc5c: 31 c0 xor %eax,%eax } 10fc5e: 8d 65 f8 lea -0x8(%ebp),%esp 10fc61: 5e pop %esi 10fc62: 5f pop %edi 10fc63: c9 leave 10fc64: c3 ret 10fc65: 8d 76 00 lea 0x0(%esi),%esi { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 10fc68: e8 13 3a 00 00 call 113680 <__errno> 10fc6d: c7 00 0e 00 00 00 movl $0xe,(%eax) 10fc73: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 10fc78: 8d 65 f8 lea -0x8(%ebp),%esp 10fc7b: 5e pop %esi 10fc7c: 5f pop %edi 10fc7d: c9 leave 10fc7e: c3 ret 10fc7f: 90 nop /* * Verify you can change directory into this node. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 10fc80: 83 ec 0c sub $0xc,%esp 10fc83: 56 push %esi 10fc84: e8 d7 7d ff ff call 107a60 rtems_set_errno_and_return_minus_one( ENOTDIR ); 10fc89: e8 f2 39 00 00 call 113680 <__errno> 10fc8e: c7 00 14 00 00 00 movl $0x14,(%eax) 10fc94: 83 c4 10 add $0x10,%esp 10fc97: b8 ff ff ff ff mov $0xffffffff,%eax 10fc9c: eb 81 jmp 10fc1f =============================================================================== 001077f0 : #include int chroot( const char *pathname ) { 1077f0: 55 push %ebp 1077f1: 89 e5 mov %esp,%ebp 1077f3: 57 push %edi 1077f4: 56 push %esi 1077f5: 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) { 1077f8: 81 3d b0 5c 12 00 80 cmpl $0x127f80,0x125cb0 1077ff: 7f 12 00 107802: 74 60 je 107864 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); 107804: 83 ec 0c sub $0xc,%esp 107807: ff 75 08 pushl 0x8(%ebp) 10780a: e8 d5 83 00 00 call 10fbe4 if (result) { 10780f: 83 c4 10 add $0x10,%esp 107812: 85 c0 test %eax,%eax 107814: 75 72 jne 107888 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 107816: 83 ec 0c sub $0xc,%esp 107819: 6a 00 push $0x0 10781b: 8d 75 e4 lea -0x1c(%ebp),%esi 10781e: 56 push %esi 10781f: 6a 00 push $0x0 107821: 6a 01 push $0x1 107823: 68 16 1c 12 00 push $0x121c16 107828: e8 5b 01 00 00 call 107988 10782d: 83 c4 20 add $0x20,%esp 107830: 85 c0 test %eax,%eax 107832: 75 54 jne 107888 <== 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); 107834: 83 ec 0c sub $0xc,%esp 107837: a1 b0 5c 12 00 mov 0x125cb0,%eax 10783c: 83 c0 18 add $0x18,%eax 10783f: 50 push %eax 107840: e8 1b 02 00 00 call 107a60 rtems_filesystem_root = loc; 107845: 8b 3d b0 5c 12 00 mov 0x125cb0,%edi 10784b: 83 c7 18 add $0x18,%edi 10784e: b9 05 00 00 00 mov $0x5,%ecx 107853: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 107855: 83 c4 10 add $0x10,%esp 107858: 31 c0 xor %eax,%eax } 10785a: 8d 65 f8 lea -0x8(%ebp),%esp 10785d: 5e pop %esi 10785e: 5f pop %edi 10785f: c9 leave 107860: c3 ret 107861: 8d 76 00 lea 0x0(%esi),%esi 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*/ 107864: e8 cf 12 00 00 call 108b38 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 107869: 81 3d b0 5c 12 00 80 cmpl $0x127f80,0x125cb0 107870: 7f 12 00 107873: 75 8f jne 107804 rtems_set_errno_and_return_minus_one( ENOTSUP ); 107875: e8 06 be 00 00 call 113680 <__errno> 10787a: c7 00 86 00 00 00 movl $0x86,(%eax) 107880: 83 c8 ff or $0xffffffff,%eax 107883: eb d5 jmp 10785a 107885: 8d 76 00 lea 0x0(%esi),%esi } /* 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 ); 107888: e8 f3 bd 00 00 call 113680 <__errno> 10788d: 89 c6 mov %eax,%esi 10788f: e8 ec bd 00 00 call 113680 <__errno> 107894: 8b 00 mov (%eax),%eax 107896: 89 06 mov %eax,(%esi) 107898: b8 ff ff ff ff mov $0xffffffff,%eax 10789d: eb bb jmp 10785a =============================================================================== 0010a9fc : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10a9fc: 55 push %ebp 10a9fd: 89 e5 mov %esp,%ebp 10a9ff: 83 ec 08 sub $0x8,%esp 10aa02: 8b 45 08 mov 0x8(%ebp),%eax 10aa05: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10aa08: 85 d2 test %edx,%edx 10aa0a: 74 14 je 10aa20 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10aa0c: 83 f8 01 cmp $0x1,%eax 10aa0f: 74 47 je 10aa58 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10aa11: 83 f8 04 cmp $0x4,%eax 10aa14: 74 32 je 10aa48 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 10aa16: 83 f8 02 cmp $0x2,%eax 10aa19: 74 2d je 10aa48 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 10aa1b: 83 f8 03 cmp $0x3,%eax 10aa1e: 74 14 je 10aa34 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10aa20: e8 bb 93 00 00 call 113de0 <__errno> 10aa25: c7 00 16 00 00 00 movl $0x16,(%eax) 10aa2b: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10aa30: c9 leave 10aa31: c3 ret 10aa32: 66 90 xchg %ax,%ax } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 10aa34: e8 a7 93 00 00 call 113de0 <__errno> 10aa39: c7 00 58 00 00 00 movl $0x58,(%eax) 10aa3f: b8 ff ff ff ff mov $0xffffffff,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10aa44: c9 leave 10aa45: c3 ret 10aa46: 66 90 xchg %ax,%ax } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 10aa48: 83 ec 0c sub $0xc,%esp 10aa4b: 52 push %edx 10aa4c: e8 ab 1c 00 00 call 10c6fc <_TOD_Get_uptime_as_timespec> return 0; 10aa51: 83 c4 10 add $0x10,%esp 10aa54: 31 c0 xor %eax,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10aa56: c9 leave 10aa57: c3 ret { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 10aa58: 83 ec 0c sub $0xc,%esp 10aa5b: 52 push %edx 10aa5c: e8 47 1c 00 00 call 10c6a8 <_TOD_Get> return 0; 10aa61: 83 c4 10 add $0x10,%esp 10aa64: 31 c0 xor %eax,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10aa66: c9 leave 10aa67: c3 ret =============================================================================== 0010aa68 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 10aa68: 55 push %ebp 10aa69: 89 e5 mov %esp,%ebp 10aa6b: 83 ec 08 sub $0x8,%esp 10aa6e: 8b 45 08 mov 0x8(%ebp),%eax 10aa71: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10aa74: 85 d2 test %edx,%edx 10aa76: 74 0f je 10aa87 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10aa78: 83 f8 01 cmp $0x1,%eax 10aa7b: 74 1f je 10aa9c _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 10aa7d: 83 f8 02 cmp $0x2,%eax 10aa80: 74 42 je 10aac4 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 10aa82: 83 f8 03 cmp $0x3,%eax 10aa85: 74 3d je 10aac4 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 10aa87: e8 54 93 00 00 call 113de0 <__errno> 10aa8c: c7 00 16 00 00 00 movl $0x16,(%eax) 10aa92: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10aa97: c9 leave 10aa98: c3 ret 10aa99: 8d 76 00 lea 0x0(%esi),%esi { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 10aa9c: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 10aaa2: 76 e3 jbe 10aa87 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aaa4: a1 4c 97 12 00 mov 0x12974c,%eax 10aaa9: 40 inc %eax 10aaaa: a3 4c 97 12 00 mov %eax,0x12974c rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 10aaaf: 83 ec 0c sub $0xc,%esp 10aab2: 52 push %edx 10aab3: e8 9c 1c 00 00 call 10c754 <_TOD_Set> _Thread_Enable_dispatch(); 10aab8: e8 37 31 00 00 call 10dbf4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 10aabd: 83 c4 10 add $0x10,%esp 10aac0: 31 c0 xor %eax,%eax } 10aac2: c9 leave 10aac3: 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 ); 10aac4: e8 17 93 00 00 call 113de0 <__errno> 10aac9: c7 00 58 00 00 00 movl $0x58,(%eax) 10aacf: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10aad4: c9 leave 10aad5: c3 ret =============================================================================== 0010f1c8 : #include int close( int fd ) { 10f1c8: 55 push %ebp 10f1c9: 89 e5 mov %esp,%ebp 10f1cb: 53 push %ebx 10f1cc: 83 ec 14 sub $0x14,%esp 10f1cf: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10f1d2: 3b 05 4c 34 12 00 cmp 0x12344c,%eax 10f1d8: 73 46 jae 10f220 iop = rtems_libio_iop(fd); 10f1da: c1 e0 03 shl $0x3,%eax 10f1dd: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 10f1e4: 29 c3 sub %eax,%ebx 10f1e6: 03 1d 80 76 12 00 add 0x127680,%ebx rtems_libio_check_is_open(iop); 10f1ec: f6 43 15 01 testb $0x1,0x15(%ebx) 10f1f0: 74 2e je 10f220 rc = RTEMS_SUCCESSFUL; rc = (*iop->pathinfo.handlers->close_h)( iop ); 10f1f2: 83 ec 0c sub $0xc,%esp 10f1f5: 8b 43 20 mov 0x20(%ebx),%eax 10f1f8: 53 push %ebx 10f1f9: ff 50 04 call *0x4(%eax) rtems_filesystem_freenode( &iop->pathinfo ); 10f1fc: 8d 53 18 lea 0x18(%ebx),%edx 10f1ff: 89 14 24 mov %edx,(%esp) 10f202: 89 45 f4 mov %eax,-0xc(%ebp) 10f205: e8 16 84 ff ff call 107620 rtems_libio_free( iop ); 10f20a: 89 1c 24 mov %ebx,(%esp) 10f20d: e8 7a 02 00 00 call 10f48c return rc; 10f212: 83 c4 10 add $0x10,%esp 10f215: 8b 45 f4 mov -0xc(%ebp),%eax } 10f218: 8b 5d fc mov -0x4(%ebp),%ebx 10f21b: c9 leave 10f21c: c3 ret 10f21d: 8d 76 00 lea 0x0(%esi),%esi rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 10f220: e8 2f 3c 00 00 call 112e54 <__errno> 10f225: c7 00 09 00 00 00 movl $0x9,(%eax) 10f22b: b8 ff ff ff ff mov $0xffffffff,%eax 10f230: eb e6 jmp 10f218 =============================================================================== 0010778c : static char *ctermid_name = "/dev/console"; char *ctermid( char *s ) { 10778c: 55 push %ebp 10778d: 89 e5 mov %esp,%ebp 10778f: 57 push %edi 107790: 56 push %esi 107791: 8b 45 08 mov 0x8(%ebp),%eax if ( !s ) 107794: 85 c0 test %eax,%eax 107796: 74 14 je 1077ac /* * 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 ); 107798: be 03 da 11 00 mov $0x11da03,%esi 10779d: b9 0d 00 00 00 mov $0xd,%ecx 1077a2: 89 c7 mov %eax,%edi 1077a4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) return s; } 1077a6: 5e pop %esi 1077a7: 5f pop %edi 1077a8: c9 leave 1077a9: c3 ret 1077aa: 66 90 xchg %ax,%ax char *ctermid( char *s ) { if ( !s ) return ctermid_name; 1077ac: b8 03 da 11 00 mov $0x11da03,%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; } 1077b1: 5e pop %esi 1077b2: 5f pop %edi 1077b3: c9 leave 1077b4: c3 ret =============================================================================== 00106fec : #include #include "devfs.h" int devFS_Show(void) { 106fec: 55 push %ebp 106fed: 89 e5 mov %esp,%ebp 106fef: 56 push %esi 106ff0: 53 push %ebx int i; rtems_filesystem_location_info_t *temp_loc; rtems_device_name_t *device_name_table; temp_loc = &rtems_filesystem_root; 106ff1: a1 d0 2f 12 00 mov 0x122fd0,%eax device_name_table = (rtems_device_name_t *)temp_loc->node_access; 106ff6: 8b 70 18 mov 0x18(%eax),%esi if (!device_name_table) 106ff9: 85 f6 test %esi,%esi 106ffb: 74 43 je 107040 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++){ 106ffd: a1 50 0f 12 00 mov 0x120f50,%eax 107002: 85 c0 test %eax,%eax 107004: 74 31 je 107037 107006: 31 c0 xor %eax,%eax 107008: 31 db xor %ebx,%ebx 10700a: 66 90 xchg %ax,%ax if (device_name_table[i].device_name){ 10700c: 8d 04 80 lea (%eax,%eax,4),%eax 10700f: 8d 04 86 lea (%esi,%eax,4),%eax 107012: 8b 10 mov (%eax),%edx 107014: 85 d2 test %edx,%edx 107016: 74 14 je 10702c printk("/%s %d %d\n", device_name_table[i].device_name, 107018: ff 70 0c pushl 0xc(%eax) 10701b: ff 70 08 pushl 0x8(%eax) 10701e: 52 push %edx 10701f: 68 d3 ea 11 00 push $0x11ead3 107024: e8 6b 12 00 00 call 108294 107029: 83 c4 10 add $0x10,%esp temp_loc = &rtems_filesystem_root; device_name_table = (rtems_device_name_t *)temp_loc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++){ 10702c: 43 inc %ebx 10702d: 89 d8 mov %ebx,%eax 10702f: 3b 1d 50 0f 12 00 cmp 0x120f50,%ebx 107035: 72 d5 jb 10700c if (device_name_table[i].device_name){ printk("/%s %d %d\n", device_name_table[i].device_name, device_name_table[i].major, device_name_table[i].minor); } } return 0; 107037: 31 c0 xor %eax,%eax } 107039: 8d 65 f8 lea -0x8(%ebp),%esp 10703c: 5b pop %ebx 10703d: 5e pop %esi 10703e: c9 leave 10703f: c3 ret rtems_device_name_t *device_name_table; temp_loc = &rtems_filesystem_root; device_name_table = (rtems_device_name_t *)temp_loc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107040: e8 53 9f 00 00 call 110f98 <__errno> 107045: c7 00 0e 00 00 00 movl $0xe,(%eax) 10704b: 83 c8 ff or $0xffffffff,%eax 10704e: eb e9 jmp 107039 =============================================================================== 0010f074 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10f074: 55 push %ebp 10f075: 89 e5 mov %esp,%ebp 10f077: 57 push %edi 10f078: 56 push %esi 10f079: 53 push %ebx 10f07a: 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 ) ) 10f07d: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10f084: 0f 85 96 00 00 00 jne 10f120 <== 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; 10f08a: 8b 45 14 mov 0x14(%ebp),%eax 10f08d: 8b 00 mov (%eax),%eax 10f08f: 89 45 e4 mov %eax,-0x1c(%ebp) if (!device_name_table) 10f092: 85 c0 test %eax,%eax 10f094: 0f 84 98 00 00 00 je 10f132 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10f09a: 8b 15 f0 1e 12 00 mov 0x121ef0,%edx 10f0a0: 89 55 e0 mov %edx,-0x20(%ebp) 10f0a3: 85 d2 test %edx,%edx 10f0a5: 74 38 je 10f0df <== NEVER TAKEN 10f0a7: 31 c0 xor %eax,%eax 10f0a9: 31 db xor %ebx,%ebx if (!device_name_table[i].device_name) 10f0ab: 8d 04 80 lea (%eax,%eax,4),%eax 10f0ae: 8b 55 e4 mov -0x1c(%ebp),%edx 10f0b1: 8d 3c 82 lea (%edx,%eax,4),%edi 10f0b4: 8b 37 mov (%edi),%esi 10f0b6: 85 f6 test %esi,%esi 10f0b8: 74 1d je 10f0d7 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10f0ba: 50 push %eax 10f0bb: ff 75 0c pushl 0xc(%ebp) 10f0be: 56 push %esi 10f0bf: ff 75 08 pushl 0x8(%ebp) 10f0c2: e8 7d 38 00 00 call 112944 10f0c7: 83 c4 10 add $0x10,%esp 10f0ca: 85 c0 test %eax,%eax 10f0cc: 75 09 jne 10f0d7 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10f0ce: 8b 45 0c mov 0xc(%ebp),%eax 10f0d1: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1) 10f0d5: 74 21 je 10f0f8 <== 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++) { 10f0d7: 43 inc %ebx 10f0d8: 89 d8 mov %ebx,%eax 10f0da: 39 5d e0 cmp %ebx,-0x20(%ebp) 10f0dd: 77 cc ja 10f0ab pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10f0df: e8 a4 2b 00 00 call 111c88 <__errno> 10f0e4: c7 00 02 00 00 00 movl $0x2,(%eax) 10f0ea: b8 ff ff ff ff mov $0xffffffff,%eax } 10f0ef: 8d 65 f4 lea -0xc(%ebp),%esp 10f0f2: 5b pop %ebx 10f0f3: 5e pop %esi 10f0f4: 5f pop %edi 10f0f5: c9 leave 10f0f6: c3 ret 10f0f7: 90 nop if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10f0f8: 8b 55 14 mov 0x14(%ebp),%edx 10f0fb: 89 3a mov %edi,(%edx) pathloc->handlers = &devFS_file_handlers; 10f0fd: c7 42 08 00 3e 12 00 movl $0x123e00,0x8(%edx) pathloc->ops = &devFS_ops; 10f104: c7 42 0c a0 3d 12 00 movl $0x123da0,0xc(%edx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10f10b: a1 70 3f 12 00 mov 0x123f70,%eax 10f110: 8b 40 28 mov 0x28(%eax),%eax 10f113: 89 42 10 mov %eax,0x10(%edx) return 0; 10f116: 31 c0 xor %eax,%eax } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 10f118: 8d 65 f4 lea -0xc(%ebp),%esp 10f11b: 5b pop %ebx 10f11c: 5e pop %esi 10f11d: 5f pop %edi 10f11e: c9 leave 10f11f: 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 ); 10f120: e8 63 2b 00 00 call 111c88 <__errno> <== NOT EXECUTED 10f125: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10f12b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f130: eb e6 jmp 10f118 <== 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 ); 10f132: e8 51 2b 00 00 call 111c88 <__errno> 10f137: c7 00 0e 00 00 00 movl $0xe,(%eax) 10f13d: 83 c8 ff or $0xffffffff,%eax 10f140: eb d6 jmp 10f118 =============================================================================== 00107d3c : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 107d3c: 55 push %ebp 107d3d: 89 e5 mov %esp,%ebp 107d3f: 83 ec 1c sub $0x1c,%esp 107d42: 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; 107d45: 8b 42 18 mov 0x18(%edx),%eax args.iop = iop; 107d48: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 107d4b: 8b 55 0c mov 0xc(%ebp),%edx 107d4e: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 107d51: 8b 55 10 mov 0x10(%ebp),%edx 107d54: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( np->major, np->minor, (void *) &args 107d57: 8d 55 e8 lea -0x18(%ebp),%edx args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 107d5a: 52 push %edx 107d5b: ff 70 0c pushl 0xc(%eax) 107d5e: ff 70 08 pushl 0x8(%eax) 107d61: e8 8e 3f 00 00 call 10bcf4 np->major, np->minor, (void *) &args ); if ( status ) 107d66: 83 c4 10 add $0x10,%esp 107d69: 85 c0 test %eax,%eax 107d6b: 75 07 jne 107d74 return rtems_deviceio_errno(status); return args.ioctl_return; 107d6d: 8b 45 f4 mov -0xc(%ebp),%eax } 107d70: c9 leave 107d71: c3 ret 107d72: 66 90 xchg %ax,%ax np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107d74: 83 ec 0c sub $0xc,%esp 107d77: 50 push %eax 107d78: e8 d7 73 00 00 call 10f154 107d7d: 83 c4 10 add $0x10,%esp return args.ioctl_return; } 107d80: c9 leave 107d81: c3 ret =============================================================================== 00107be4 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 107be4: 55 push %ebp 107be5: 89 e5 mov %esp,%ebp 107be7: 57 push %edi 107be8: 56 push %esi 107be9: 53 push %ebx 107bea: 83 ec 1c sub $0x1c,%esp 107bed: 8b 7d 08 mov 0x8(%ebp),%edi 107bf0: 8b 4d 10 mov 0x10(%ebp),%ecx 107bf3: 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') && 107bf6: 80 3f 64 cmpb $0x64,(%edi) 107bf9: 0f 84 dd 00 00 00 je 107cdc (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 107bff: 8b 45 0c mov 0xc(%ebp),%eax 107c02: 25 00 f0 00 00 and $0xf000,%eax 107c07: 3d 00 60 00 00 cmp $0x6000,%eax 107c0c: 74 0b je 107c19 107c0e: 3d 00 20 00 00 cmp $0x2000,%eax 107c13: 0f 85 e5 00 00 00 jne 107cfe ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 107c19: 89 4d dc mov %ecx,-0x24(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107c1c: 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; 107c1f: 8b 45 18 mov 0x18(%ebp),%eax 107c22: 8b 30 mov (%eax),%esi if (!device_name_table) 107c24: 85 f6 test %esi,%esi 107c26: 0f 84 f4 00 00 00 je 107d20 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107c2c: 8b 15 f0 1e 12 00 mov 0x121ef0,%edx 107c32: 85 d2 test %edx,%edx 107c34: 0f 84 d6 00 00 00 je 107d10 107c3a: 31 c0 xor %eax,%eax 107c3c: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 107c43: 31 db xor %ebx,%ebx 107c45: 89 7d e4 mov %edi,-0x1c(%ebp) 107c48: 89 d7 mov %edx,%edi 107c4a: eb 1a jmp 107c66 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 107c4c: 83 ec 08 sub $0x8,%esp 107c4f: 50 push %eax 107c50: ff 75 e4 pushl -0x1c(%ebp) 107c53: e8 94 ac 00 00 call 1128ec 107c58: 83 c4 10 add $0x10,%esp 107c5b: 85 c0 test %eax,%eax 107c5d: 74 65 je 107cc4 /* 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++){ 107c5f: 43 inc %ebx 107c60: 89 d8 mov %ebx,%eax 107c62: 39 fb cmp %edi,%ebx 107c64: 73 16 jae 107c7c if (device_name_table[i].device_name == NULL) 107c66: 8d 04 80 lea (%eax,%eax,4),%eax 107c69: 8b 04 86 mov (%esi,%eax,4),%eax 107c6c: 85 c0 test %eax,%eax 107c6e: 75 dc jne 107c4c 107c70: 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++){ 107c73: 43 inc %ebx 107c74: 89 d8 mov %ebx,%eax 107c76: 39 fb cmp %edi,%ebx 107c78: 72 ec jb 107c66 107c7a: 66 90 xchg %ax,%ax 107c7c: 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) 107c7f: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp) 107c83: 0f 84 87 00 00 00 je 107d10 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 107c89: 9c pushf 107c8a: fa cli 107c8b: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 107c8c: 8b 55 e0 mov -0x20(%ebp),%edx 107c8f: 8d 04 92 lea (%edx,%edx,4),%eax 107c92: 8d 14 86 lea (%esi,%eax,4),%edx 107c95: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 107c97: 31 c0 xor %eax,%eax 107c99: b9 ff ff ff ff mov $0xffffffff,%ecx 107c9e: f2 ae repnz scas %es:(%edi),%al 107ca0: f7 d1 not %ecx 107ca2: 49 dec %ecx 107ca3: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 107ca6: 8b 45 dc mov -0x24(%ebp),%eax 107ca9: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 107cac: 8b 45 d8 mov -0x28(%ebp),%eax 107caf: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 107cb2: 8b 45 0c mov 0xc(%ebp),%eax 107cb5: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 107cb8: 53 push %ebx 107cb9: 9d popf return 0; 107cba: 31 c0 xor %eax,%eax } 107cbc: 8d 65 f4 lea -0xc(%ebp),%esp 107cbf: 5b pop %ebx 107cc0: 5e pop %esi 107cc1: 5f pop %edi 107cc2: c9 leave 107cc3: 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 ); 107cc4: e8 bf 9f 00 00 call 111c88 <__errno> 107cc9: c7 00 11 00 00 00 movl $0x11,(%eax) 107ccf: 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; } 107cd4: 8d 65 f4 lea -0xc(%ebp),%esp 107cd7: 5b pop %ebx 107cd8: 5e pop %esi 107cd9: 5f pop %edi 107cda: c9 leave 107cdb: 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') && 107cdc: 80 7f 01 65 cmpb $0x65,0x1(%edi) 107ce0: 0f 85 19 ff ff ff jne 107bff <== NEVER TAKEN 107ce6: 80 7f 02 76 cmpb $0x76,0x2(%edi) 107cea: 0f 85 0f ff ff ff jne 107bff <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 107cf0: 80 7f 03 00 cmpb $0x0,0x3(%edi) 107cf4: 0f 85 05 ff ff ff jne 107bff return 0; 107cfa: 31 c0 xor %eax,%eax 107cfc: eb be jmp 107cbc /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 107cfe: e8 85 9f 00 00 call 111c88 <__errno> 107d03: c7 00 16 00 00 00 movl $0x16,(%eax) 107d09: b8 ff ff ff ff mov $0xffffffff,%eax 107d0e: eb ac jmp 107cbc 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 ); 107d10: e8 73 9f 00 00 call 111c88 <__errno> 107d15: c7 00 0c 00 00 00 movl $0xc,(%eax) 107d1b: 83 c8 ff or $0xffffffff,%eax 107d1e: eb 9c jmp 107cbc 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 ); 107d20: e8 63 9f 00 00 call 111c88 <__errno> 107d25: c7 00 0e 00 00 00 movl $0xe,(%eax) 107d2b: 83 c8 ff or $0xffffffff,%eax 107d2e: eb 8c jmp 107cbc =============================================================================== 00112168 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 112168: 55 push %ebp 112169: 89 e5 mov %esp,%ebp 11216b: 83 ec 1c sub $0x1c,%esp 11216e: 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; 112171: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 112174: 8b 55 0c mov 0xc(%ebp),%edx 112177: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 11217a: 8b 55 10 mov 0x10(%ebp),%edx 11217d: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->pathinfo.node_access; 112180: 8b 40 18 mov 0x18(%eax),%eax status = rtems_io_control( the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args 112183: 8d 55 e8 lea -0x18(%ebp),%edx args.command = command; args.buffer = buffer; the_jnode = iop->pathinfo.node_access; status = rtems_io_control( 112186: 52 push %edx 112187: ff 70 54 pushl 0x54(%eax) 11218a: ff 70 50 pushl 0x50(%eax) 11218d: e8 0e 09 00 00 call 112aa0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 112192: 83 c4 10 add $0x10,%esp 112195: 85 c0 test %eax,%eax 112197: 75 07 jne 1121a0 return rtems_deviceio_errno(status); return args.ioctl_return; 112199: 8b 45 f4 mov -0xc(%ebp),%eax } 11219c: c9 leave 11219d: c3 ret 11219e: 66 90 xchg %ax,%ax the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1121a0: 83 ec 0c sub $0xc,%esp 1121a3: 50 push %eax 1121a4: e8 1f 0c 00 00 call 112dc8 1121a9: 83 c4 10 add $0x10,%esp return args.ioctl_return; } 1121ac: c9 leave 1121ad: c3 ret =============================================================================== 0010854c : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 10854c: 55 push %ebp 10854d: 89 e5 mov %esp,%ebp 10854f: 53 push %ebx 108550: 83 ec 04 sub $0x4,%esp 108553: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 108555: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx 10855b: 85 d2 test %edx,%edx 10855d: 74 4d je 1085ac rtems_interrupt_disable (level); 10855f: 9c pushf 108560: fa cli 108561: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 108562: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 108568: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10856e: 39 d1 cmp %edx,%ecx 108570: 74 38 je 1085aa 108572: 66 90 xchg %ax,%ax tty->rawOutBufState = rob_wait; 108574: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 10857b: 00 00 00 rtems_interrupt_enable (level); 10857e: 50 push %eax 10857f: 9d popf sc = rtems_semaphore_obtain( 108580: 50 push %eax 108581: 6a 00 push $0x0 108583: 6a 00 push $0x0 108585: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10858b: e8 18 26 00 00 call 10aba8 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 108590: 83 c4 10 add $0x10,%esp 108593: 85 c0 test %eax,%eax 108595: 75 1a jne 1085b1 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 108597: 9c pushf 108598: fa cli 108599: 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) { 10859a: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 1085a0: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 1085a6: 39 d1 cmp %edx,%ecx 1085a8: 75 ca jne 108574 <== 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); 1085aa: 50 push %eax 1085ab: 9d popf } } 1085ac: 8b 5d fc mov -0x4(%ebp),%ebx 1085af: c9 leave 1085b0: 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); 1085b1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1085b4: 50 push %eax <== NOT EXECUTED 1085b5: e8 32 2c 00 00 call 10b1ec <== NOT EXECUTED =============================================================================== 001092e4 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 1092e4: 55 push %ebp 1092e5: 89 e5 mov %esp,%ebp 1092e7: 53 push %ebx 1092e8: 83 ec 24 sub $0x24,%esp if ((tty->termios.c_lflag & ECHOCTL) && 1092eb: f6 42 3d 02 testb $0x2,0x3d(%edx) 1092ef: 74 1b je 10930c <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 1092f1: 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) && 1092f4: 8b 1d 14 55 12 00 mov 0x125514,%ebx 1092fa: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) 1092ff: 74 0b je 10930c iscntrl(c) && (c != '\t') && (c != '\n')) { 109301: 3c 09 cmp $0x9,%al 109303: 74 07 je 10930c 109305: 3c 0a cmp $0xa,%al 109307: 75 13 jne 10931c 109309: 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); 10930c: 0f b6 c0 movzbl %al,%eax 10930f: e8 94 fe ff ff call 1091a8 } } 109314: 8b 5d fc mov -0x4(%ebp),%ebx 109317: c9 leave 109318: c3 ret 109319: 8d 76 00 lea 0x0(%esi),%esi { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 10931c: c6 45 f6 5e movb $0x5e,-0xa(%ebp) echobuf[1] = c ^ 0x40; 109320: 83 f0 40 xor $0x40,%eax 109323: 88 45 f7 mov %al,-0x9(%ebp) rtems_termios_puts (echobuf, 2, tty); 109326: 53 push %ebx 109327: 52 push %edx 109328: 6a 02 push $0x2 10932a: 8d 45 f6 lea -0xa(%ebp),%eax 10932d: 50 push %eax 10932e: 89 55 e4 mov %edx,-0x1c(%ebp) 109331: e8 3e fd ff ff call 109074 tty->column += 2; 109336: 8b 55 e4 mov -0x1c(%ebp),%edx 109339: 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')) { 10933d: 83 c4 10 add $0x10,%esp rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); } } 109340: 8b 5d fc mov -0x4(%ebp),%ebx 109343: c9 leave 109344: c3 ret =============================================================================== 001084e4 : void endgrent(void) { 1084e4: 55 push %ebp 1084e5: 89 e5 mov %esp,%ebp 1084e7: 83 ec 08 sub $0x8,%esp if (group_fp != NULL) 1084ea: a1 a0 8c 12 00 mov 0x128ca0,%eax 1084ef: 85 c0 test %eax,%eax 1084f1: 74 0c je 1084ff <== NEVER TAKEN fclose(group_fp); 1084f3: 83 ec 0c sub $0xc,%esp 1084f6: 50 push %eax 1084f7: e8 90 b8 00 00 call 113d8c 1084fc: 83 c4 10 add $0x10,%esp } 1084ff: c9 leave 108500: c3 ret =============================================================================== 0010838c : void endpwent(void) { 10838c: 55 push %ebp 10838d: 89 e5 mov %esp,%ebp 10838f: 83 ec 08 sub $0x8,%esp if (passwd_fp != NULL) 108392: a1 88 8d 12 00 mov 0x128d88,%eax 108397: 85 c0 test %eax,%eax 108399: 74 0c je 1083a7 <== NEVER TAKEN fclose(passwd_fp); 10839b: 83 ec 0c sub $0xc,%esp 10839e: 50 push %eax 10839f: e8 e8 b9 00 00 call 113d8c 1083a4: 83 c4 10 add $0x10,%esp } 1083a7: c9 leave 1083a8: c3 ret =============================================================================== 00109348 : * 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) { 109348: 55 push %ebp 109349: 89 e5 mov %esp,%ebp 10934b: 57 push %edi 10934c: 56 push %esi 10934d: 53 push %ebx 10934e: 83 ec 1c sub $0x1c,%esp 109351: 89 c3 mov %eax,%ebx 109353: 89 d7 mov %edx,%edi if (tty->ccount == 0) 109355: 8b 48 20 mov 0x20(%eax),%ecx 109358: 85 c9 test %ecx,%ecx 10935a: 0f 84 84 00 00 00 je 1093e4 return; if (lineFlag) { 109360: 85 d2 test %edx,%edx 109362: 0f 85 84 00 00 00 jne 1093ec echo ('\n', tty); return; } } while (tty->ccount) { 109368: 8b 50 3c mov 0x3c(%eax),%edx 10936b: 89 7d e4 mov %edi,-0x1c(%ebp) 10936e: eb 1d jmp 10938d rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109370: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 109373: 0f 85 37 01 00 00 jne 1094b0 <== NOT EXECUTED 109379: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 10937c: 8b 75 e4 mov -0x1c(%ebp),%esi 10937f: 85 f6 test %esi,%esi 109381: 74 61 je 1093e4 <== NEVER TAKEN echo ('\n', tty); return; } } while (tty->ccount) { 109383: 8b 4b 20 mov 0x20(%ebx),%ecx 109386: 85 c9 test %ecx,%ecx 109388: 74 5a je 1093e4 } 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); 10938a: 8b 53 3c mov 0x3c(%ebx),%edx return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 10938d: 8b 7b 1c mov 0x1c(%ebx),%edi 109390: 49 dec %ecx 109391: 89 4b 20 mov %ecx,0x20(%ebx) 109394: 8a 04 0f mov (%edi,%ecx,1),%al if (tty->termios.c_lflag & ECHO) { 109397: f6 c2 08 test $0x8,%dl 10939a: 74 e0 je 10937c <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 10939c: 8b 75 e4 mov -0x1c(%ebp),%esi 10939f: 85 f6 test %esi,%esi 1093a1: 75 09 jne 1093ac 1093a3: f6 c2 10 test $0x10,%dl 1093a6: 0f 84 f0 00 00 00 je 10949c <== NEVER TAKEN echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 1093ac: 3c 09 cmp $0x9,%al 1093ae: 74 58 je 109408 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 1093b0: 0f b6 c0 movzbl %al,%eax 1093b3: 8d 70 01 lea 0x1(%eax),%esi 1093b6: a1 14 55 12 00 mov 0x125514,%eax 1093bb: f6 04 30 20 testb $0x20,(%eax,%esi,1) 1093bf: 75 af jne 109370 <== 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); 1093c1: 57 push %edi 1093c2: 53 push %ebx 1093c3: 6a 03 push $0x3 1093c5: 68 e6 0e 12 00 push $0x120ee6 1093ca: e8 a5 fc ff ff call 109074 if (tty->column) 1093cf: 8b 43 28 mov 0x28(%ebx),%eax 1093d2: 83 c4 10 add $0x10,%esp 1093d5: 85 c0 test %eax,%eax 1093d7: 74 a3 je 10937c <== NEVER TAKEN tty->column--; 1093d9: 48 dec %eax 1093da: 89 43 28 mov %eax,0x28(%ebx) } } } if (!lineFlag) 1093dd: 8b 75 e4 mov -0x1c(%ebp),%esi 1093e0: 85 f6 test %esi,%esi 1093e2: 75 9f jne 109383 break; } } 1093e4: 8d 65 f4 lea -0xc(%ebp),%esp 1093e7: 5b pop %ebx 1093e8: 5e pop %esi 1093e9: 5f pop %edi 1093ea: c9 leave 1093eb: c3 ret erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 1093ec: 8b 50 3c mov 0x3c(%eax),%edx 1093ef: f6 c2 08 test $0x8,%dl 1093f2: 0f 84 94 00 00 00 je 10948c <== NEVER TAKEN tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 1093f8: f6 c2 10 test $0x10,%dl 1093fb: 0f 84 eb 00 00 00 je 1094ec <== NEVER TAKEN 109401: 89 7d e4 mov %edi,-0x1c(%ebp) 109404: eb 87 jmp 10938d 109406: 66 90 xchg %ax,%ax 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; 109408: 8b 73 2c mov 0x2c(%ebx),%esi int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 10940b: 85 c9 test %ecx,%ecx 10940d: 74 46 je 109455 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 10940f: a1 14 55 12 00 mov 0x125514,%eax 109414: 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; 109417: 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) 109419: 81 e2 00 02 00 00 and $0x200,%edx 10941f: 89 55 e0 mov %edx,-0x20(%ebp) 109422: 89 5d d8 mov %ebx,-0x28(%ebp) 109425: 8b 5d dc mov -0x24(%ebp),%ebx 109428: eb 10 jmp 10943a 10942a: 66 90 xchg %ax,%ax 10942c: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 10942f: 85 d2 test %edx,%edx <== NOT EXECUTED 109431: 74 03 je 109436 <== NOT EXECUTED col += 2; 109433: 83 c6 02 add $0x2,%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109436: 39 c1 cmp %eax,%ecx 109438: 74 18 je 109452 <== NEVER TAKEN c = tty->cbuf[i++]; 10943a: 8a 14 07 mov (%edi,%eax,1),%dl 10943d: 40 inc %eax if (c == '\t') { 10943e: 80 fa 09 cmp $0x9,%dl 109441: 74 41 je 109484 <== NEVER TAKEN col = (col | 7) + 1; } else if (iscntrl (c)) { 109443: 0f b6 d2 movzbl %dl,%edx 109446: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) 10944b: 75 df jne 10942c <== NEVER TAKEN if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 10944d: 46 inc %esi int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 10944e: 39 c1 cmp %eax,%ecx 109450: 75 e8 jne 10943a 109452: 8b 5d d8 mov -0x28(%ebp),%ebx } /* * Back up over the tab */ while (tty->column > col) { 109455: 3b 73 28 cmp 0x28(%ebx),%esi 109458: 0f 8d 1e ff ff ff jge 10937c <== NEVER TAKEN 10945e: 66 90 xchg %ax,%ax rtems_termios_puts ("\b", 1, tty); 109460: 52 push %edx 109461: 53 push %ebx 109462: 6a 01 push $0x1 109464: 68 e8 0e 12 00 push $0x120ee8 109469: e8 06 fc ff ff call 109074 tty->column--; 10946e: 8b 43 28 mov 0x28(%ebx),%eax 109471: 48 dec %eax 109472: 89 43 28 mov %eax,0x28(%ebx) } /* * Back up over the tab */ while (tty->column > col) { 109475: 83 c4 10 add $0x10,%esp 109478: 39 f0 cmp %esi,%eax 10947a: 7f e4 jg 109460 10947c: e9 fb fe ff ff jmp 10937c 109481: 8d 76 00 lea 0x0(%esi),%esi * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 109484: 83 ce 07 or $0x7,%esi 109487: 46 inc %esi 109488: eb ac jmp 109436 10948a: 66 90 xchg %ax,%ax { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 10948c: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED } } if (!lineFlag) break; } } 109493: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109496: 5b pop %ebx <== NOT EXECUTED 109497: 5e pop %esi <== NOT EXECUTED 109498: 5f pop %edi <== NOT EXECUTED 109499: c9 leave <== NOT EXECUTED 10949a: c3 ret <== NOT EXECUTED 10949b: 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); 10949c: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 1094a0: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 1094a2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1094a5: 5b pop %ebx <== NOT EXECUTED 1094a6: 5e pop %esi <== NOT EXECUTED 1094a7: 5f pop %edi <== NOT EXECUTED 1094a8: 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); 1094a9: e9 36 fe ff ff jmp 1092e4 <== NOT EXECUTED 1094ae: 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); 1094b0: 50 push %eax <== NOT EXECUTED 1094b1: 53 push %ebx <== NOT EXECUTED 1094b2: 6a 03 push $0x3 <== NOT EXECUTED 1094b4: 68 e6 0e 12 00 push $0x120ee6 <== NOT EXECUTED 1094b9: e8 b6 fb ff ff call 109074 <== NOT EXECUTED if (tty->column) 1094be: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 1094c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1094c4: 85 c0 test %eax,%eax <== NOT EXECUTED 1094c6: 74 04 je 1094cc <== NOT EXECUTED tty->column--; 1094c8: 48 dec %eax <== NOT EXECUTED 1094c9: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 1094cc: a1 14 55 12 00 mov 0x125514,%eax <== NOT EXECUTED 1094d1: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 1094d5: 0f 84 e6 fe ff ff je 1093c1 <== NOT EXECUTED 1094db: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 1094df: 0f 85 dc fe ff ff jne 1093c1 <== NOT EXECUTED 1094e5: e9 92 fe ff ff jmp 10937c <== NOT EXECUTED 1094ea: 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; 1094ec: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 1094f3: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED 1094f7: 89 da mov %ebx,%edx <== NOT EXECUTED 1094f9: e8 e6 fd ff ff call 1092e4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 1094fe: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 109502: 0f 84 dc fe ff ff je 1093e4 <== NOT EXECUTED echo ('\n', tty); 109508: 89 da mov %ebx,%edx <== NOT EXECUTED 10950a: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10950f: eb 91 jmp 1094a2 <== NOT EXECUTED =============================================================================== 001080b0 : #include int fchdir( int fd ) { 1080b0: 55 push %ebp 1080b1: 89 e5 mov %esp,%ebp 1080b3: 57 push %edi 1080b4: 56 push %esi 1080b5: 53 push %ebx 1080b6: 83 ec 4c sub $0x4c,%esp 1080b9: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 1080bc: 3b 05 0c 48 12 00 cmp 0x12480c,%eax 1080c2: 0f 83 d0 00 00 00 jae 108198 iop = rtems_libio_iop( fd ); 1080c8: c1 e0 03 shl $0x3,%eax 1080cb: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 1080d2: 29 c3 sub %eax,%ebx 1080d4: 03 1d 40 8a 12 00 add 0x128a40,%ebx rtems_libio_check_is_open(iop); 1080da: 8b 43 14 mov 0x14(%ebx),%eax 1080dd: f6 c4 01 test $0x1,%ah 1080e0: 0f 84 b2 00 00 00 je 108198 /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 1080e6: a8 02 test $0x2,%al 1080e8: 0f 84 be 00 00 00 je 1081ac /* * Verify you can change directory into this node. */ if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 1080ee: 83 ec 0c sub $0xc,%esp 1080f1: 8b 43 24 mov 0x24(%ebx),%eax 1080f4: 83 c3 18 add $0x18,%ebx 1080f7: 53 push %ebx 1080f8: ff 50 10 call *0x10(%eax) 1080fb: 83 c4 10 add $0x10,%esp 1080fe: 48 dec %eax 1080ff: 75 67 jne 108168 * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 108101: a1 d0 67 12 00 mov 0x1267d0,%eax 108106: 8d 55 c0 lea -0x40(%ebp),%edx 108109: 89 55 b4 mov %edx,-0x4c(%ebp) 10810c: 8d 70 04 lea 0x4(%eax),%esi 10810f: b9 05 00 00 00 mov $0x5,%ecx 108114: 89 d7 mov %edx,%edi 108116: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_current = iop->pathinfo; 108118: 8d 78 04 lea 0x4(%eax),%edi 10811b: b1 05 mov $0x5,%cl 10811d: 89 de mov %ebx,%esi 10811f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 108121: 83 ec 0c sub $0xc,%esp 108124: 6a 00 push $0x0 108126: 8d 75 d4 lea -0x2c(%ebp),%esi 108129: 56 push %esi 10812a: 6a 00 push $0x0 10812c: 6a 01 push $0x1 10812e: 68 36 27 12 00 push $0x122736 108133: e8 a0 fe ff ff call 107fd8 108138: 83 c4 20 add $0x20,%esp 10813b: 85 c0 test %eax,%eax 10813d: 75 3d jne 10817c /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 10813f: 83 ec 0c sub $0xc,%esp 108142: 8d 45 c0 lea -0x40(%ebp),%eax 108145: 50 push %eax 108146: e8 61 01 00 00 call 1082ac rtems_filesystem_current = loc; 10814b: 8b 3d d0 67 12 00 mov 0x1267d0,%edi 108151: 83 c7 04 add $0x4,%edi 108154: b9 05 00 00 00 mov $0x5,%ecx 108159: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 10815b: 83 c4 10 add $0x10,%esp 10815e: 31 c0 xor %eax,%eax } 108160: 8d 65 f4 lea -0xc(%ebp),%esp 108163: 5b pop %ebx 108164: 5e pop %esi 108165: 5f pop %edi 108166: c9 leave 108167: 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 ); 108168: e8 27 bb 00 00 call 113c94 <__errno> 10816d: c7 00 14 00 00 00 movl $0x14,(%eax) 108173: b8 ff ff ff ff mov $0xffffffff,%eax 108178: eb e6 jmp 108160 10817a: 66 90 xchg %ax,%ax 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; 10817c: 8b 3d d0 67 12 00 mov 0x1267d0,%edi 108182: 83 c7 04 add $0x4,%edi 108185: b9 05 00 00 00 mov $0x5,%ecx 10818a: 8b 75 b4 mov -0x4c(%ebp),%esi 10818d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return -1; 10818f: b8 ff ff ff ff mov $0xffffffff,%eax 108194: eb ca jmp 108160 108196: 66 90 xchg %ax,%ax 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); 108198: e8 f7 ba 00 00 call 113c94 <__errno> 10819d: c7 00 09 00 00 00 movl $0x9,(%eax) 1081a3: b8 ff ff ff ff mov $0xffffffff,%eax 1081a8: eb b6 jmp 108160 1081aa: 66 90 xchg %ax,%ax /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 1081ac: e8 e3 ba 00 00 call 113c94 <__errno> 1081b1: c7 00 16 00 00 00 movl $0x16,(%eax) 1081b7: b8 ff ff ff ff mov $0xffffffff,%eax 1081bc: eb a2 jmp 108160 =============================================================================== 001081c0 : int fchmod( int fd, mode_t mode ) { 1081c0: 55 push %ebp 1081c1: 89 e5 mov %esp,%ebp 1081c3: 83 ec 08 sub $0x8,%esp 1081c6: 8b 45 08 mov 0x8(%ebp),%eax 1081c9: 8b 4d 0c mov 0xc(%ebp),%ecx rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1081cc: 3b 05 0c 48 12 00 cmp 0x12480c,%eax 1081d2: 73 38 jae 10820c iop = rtems_libio_iop( fd ); 1081d4: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 1081db: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 1081e2: 29 d0 sub %edx,%eax 1081e4: 03 05 40 8a 12 00 add 0x128a40,%eax rtems_libio_check_is_open(iop); 1081ea: 8b 50 14 mov 0x14(%eax),%edx 1081ed: f6 c6 01 test $0x1,%dh 1081f0: 74 1a je 10820c /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1081f2: 83 e2 04 and $0x4,%edx 1081f5: 74 29 je 108220 return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 1081f7: 8b 50 20 mov 0x20(%eax),%edx 1081fa: 89 4d 0c mov %ecx,0xc(%ebp) 1081fd: 83 c0 18 add $0x18,%eax 108200: 89 45 08 mov %eax,0x8(%ebp) 108203: 8b 42 1c mov 0x1c(%edx),%eax } 108206: c9 leave * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 108207: ff e0 jmp *%eax 108209: 8d 76 00 lea 0x0(%esi),%esi { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 10820c: e8 83 ba 00 00 call 113c94 <__errno> 108211: 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 ); } 108217: b8 ff ff ff ff mov $0xffffffff,%eax 10821c: c9 leave 10821d: c3 ret 10821e: 66 90 xchg %ax,%ax /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108220: e8 6f ba 00 00 call 113c94 <__errno> 108225: c7 00 16 00 00 00 movl $0x16,(%eax) 10822b: eb ea jmp 108217 =============================================================================== 00108060 : int fcntl( int fd, int cmd, ... ) { 108060: 55 push %ebp 108061: 89 e5 mov %esp,%ebp 108063: 57 push %edi 108064: 56 push %esi 108065: 53 push %ebx 108066: 83 ec 1c sub $0x1c,%esp 108069: 8b 5d 08 mov 0x8(%ebp),%ebx 10806c: 8b 55 0c mov 0xc(%ebp),%edx int ret; va_list ap; va_start( ap, cmd ); 10806f: 8d 7d 10 lea 0x10(%ebp),%edi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 108072: 8b 0d 0c 50 12 00 mov 0x12500c,%ecx 108078: 39 cb cmp %ecx,%ebx 10807a: 0f 83 5c 01 00 00 jae 1081dc iop = rtems_libio_iop( fd ); 108080: a1 40 92 12 00 mov 0x129240,%eax 108085: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 10808c: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx 108093: 29 f3 sub %esi,%ebx 108095: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 108098: 8b 73 14 mov 0x14(%ebx),%esi 10809b: f7 c6 00 01 00 00 test $0x100,%esi 1080a1: 0f 84 35 01 00 00 je 1081dc /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 1080a7: 83 fa 09 cmp $0x9,%edx 1080aa: 76 10 jbe 1080bc errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 1080ac: e8 93 be 00 00 call 113f44 <__errno> 1080b1: c7 00 16 00 00 00 movl $0x16,(%eax) 1080b7: eb 16 jmp 1080cf 1080b9: 8d 76 00 lea 0x0(%esi),%esi /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 1080bc: ff 24 95 50 29 12 00 jmp *0x122950(,%edx,4) 1080c3: 90 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 1080c4: e8 7b be 00 00 call 113f44 <__errno> 1080c9: 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; 1080cf: 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; } 1080d4: 89 f0 mov %esi,%eax 1080d6: 8d 65 f4 lea -0xc(%ebp),%esp 1080d9: 5b pop %ebx 1080da: 5e pop %esi 1080db: 5f pop %edi 1080dc: c9 leave 1080dd: c3 ret 1080de: 66 90 xchg %ax,%ax 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 ) ); 1080e0: 83 ec 0c sub $0xc,%esp 1080e3: ff 37 pushl (%edi) 1080e5: 89 55 e0 mov %edx,-0x20(%ebp) 1080e8: e8 33 05 00 00 call 108620 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 1080ed: 25 01 02 00 00 and $0x201,%eax 1080f2: 8b 4b 14 mov 0x14(%ebx),%ecx 1080f5: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 1080fb: 09 c8 or %ecx,%eax 1080fd: 89 43 14 mov %eax,0x14(%ebx) 108100: 83 c4 10 add $0x10,%esp rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108103: 31 f6 xor %esi,%esi 108105: 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 ); 108108: 83 ec 08 sub $0x8,%esp 10810b: 8b 43 20 mov 0x20(%ebx),%eax 10810e: 53 push %ebx 10810f: 52 push %edx 108110: ff 50 30 call *0x30(%eax) 108113: 89 c3 mov %eax,%ebx if (err) { 108115: 83 c4 10 add $0x10,%esp 108118: 85 c0 test %eax,%eax 10811a: 74 b8 je 1080d4 <== ALWAYS TAKEN errno = err; 10811c: e8 23 be 00 00 call 113f44 <__errno> <== NOT EXECUTED 108121: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 108123: eb aa jmp 1080cf <== NOT EXECUTED 108125: 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 ); 108128: 83 ec 0c sub $0xc,%esp 10812b: 56 push %esi 10812c: 89 55 e0 mov %edx,-0x20(%ebp) 10812f: e8 24 05 00 00 call 108658 108134: 89 c6 mov %eax,%esi 108136: 83 c4 10 add $0x10,%esp 108139: 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) { 10813c: 85 f6 test %esi,%esi 10813e: 79 c8 jns 108108 <== ALWAYS TAKEN 108140: eb 92 jmp 1080d4 <== NOT EXECUTED 108142: 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 ) ) 108144: 8b 07 mov (%edi),%eax 108146: 85 c0 test %eax,%eax 108148: 74 6a je 1081b4 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 10814a: 81 ce 00 08 00 00 or $0x800,%esi 108150: 89 73 14 mov %esi,0x14(%ebx) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108153: 31 f6 xor %esi,%esi 108155: eb b1 jmp 108108 108157: 90 nop 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); 108158: 31 c0 xor %eax,%eax 10815a: f7 c6 00 08 00 00 test $0x800,%esi 108160: 0f 95 c0 setne %al 108163: 89 c6 mov %eax,%esi 108165: eb a1 jmp 108108 108167: 90 nop * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 108168: 8b 3f mov (%edi),%edi if ( fd2 ) 10816a: 85 ff test %edi,%edi 10816c: 0f 84 82 00 00 00 je 1081f4 diop = rtems_libio_iop( fd2 ); 108172: 39 f9 cmp %edi,%ecx 108174: 77 4e ja 1081c4 <== ALWAYS TAKEN 108176: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 10817d: 31 ff xor %edi,%edi <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 10817f: 89 77 14 mov %esi,0x14(%edi) diop->pathinfo = iop->pathinfo; 108182: 83 c7 18 add $0x18,%edi 108185: 8d 73 18 lea 0x18(%ebx),%esi 108188: b9 05 00 00 00 mov $0x5,%ecx 10818d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 10818f: 8b 4d e4 mov -0x1c(%ebp),%ecx 108192: 29 c1 sub %eax,%ecx 108194: 89 c8 mov %ecx,%eax 108196: c1 f8 03 sar $0x3,%eax 108199: 8d 0c c0 lea (%eax,%eax,8),%ecx 10819c: 8d 0c c8 lea (%eax,%ecx,8),%ecx 10819f: 8d 0c c8 lea (%eax,%ecx,8),%ecx 1081a2: 8d 0c c8 lea (%eax,%ecx,8),%ecx 1081a5: 89 ce mov %ecx,%esi 1081a7: c1 e6 0f shl $0xf,%esi 1081aa: 01 f1 add %esi,%ecx 1081ac: 8d 34 c8 lea (%eax,%ecx,8),%esi 1081af: f7 de neg %esi 1081b1: eb 89 jmp 10813c 1081b3: 90 nop */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 1081b4: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi 1081ba: 89 73 14 mov %esi,0x14(%ebx) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 1081bd: 31 f6 xor %esi,%esi 1081bf: e9 44 ff ff ff jmp 108108 switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 1081c4: 8d 0c fd 00 00 00 00 lea 0x0(,%edi,8),%ecx 1081cb: 8d 3c cd 00 00 00 00 lea 0x0(,%ecx,8),%edi 1081d2: 29 cf sub %ecx,%edi 1081d4: 8d 3c 38 lea (%eax,%edi,1),%edi 1081d7: 89 7d e4 mov %edi,-0x1c(%ebp) 1081da: eb a3 jmp 10817f int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 1081dc: e8 63 bd 00 00 call 113f44 <__errno> 1081e1: c7 00 09 00 00 00 movl $0x9,(%eax) 1081e7: be ff ff ff ff mov $0xffffffff,%esi 1081ec: e9 e3 fe ff ff jmp 1080d4 1081f1: 8d 76 00 lea 0x0(%esi),%esi fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 1081f4: 89 55 e0 mov %edx,-0x20(%ebp) 1081f7: e8 a0 04 00 00 call 10869c 1081fc: 89 c7 mov %eax,%edi if ( diop == 0 ) { 1081fe: 85 c0 test %eax,%eax 108200: 8b 55 e0 mov -0x20(%ebp),%edx 108203: 0f 84 c6 fe ff ff je 1080cf <== NEVER TAKEN 108209: 8b 73 14 mov 0x14(%ebx),%esi 10820c: 89 45 e4 mov %eax,-0x1c(%ebp) 10820f: a1 40 92 12 00 mov 0x129240,%eax 108214: e9 66 ff ff ff jmp 10817f =============================================================================== 0010823c : #include int fdatasync( int fd ) { 10823c: 55 push %ebp 10823d: 89 e5 mov %esp,%ebp 10823f: 83 ec 08 sub $0x8,%esp 108242: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108245: 3b 05 0c 50 12 00 cmp 0x12500c,%eax 10824b: 73 2f jae 10827c iop = rtems_libio_iop( fd ); 10824d: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 108254: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 10825b: 29 d0 sub %edx,%eax 10825d: 03 05 40 92 12 00 add 0x129240,%eax rtems_libio_check_is_open(iop); 108263: 8b 50 14 mov 0x14(%eax),%edx 108266: f6 c6 01 test $0x1,%dh 108269: 74 11 je 10827c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10826b: 83 e2 04 and $0x4,%edx 10826e: 74 20 je 108290 /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); 108270: 8b 50 20 mov 0x20(%eax),%edx 108273: 89 45 08 mov %eax,0x8(%ebp) 108276: 8b 42 2c mov 0x2c(%edx),%eax } 108279: c9 leave /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); 10827a: ff e0 jmp *%eax { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 10827c: e8 c3 bc 00 00 call 113f44 <__errno> 108281: c7 00 09 00 00 00 movl $0x9,(%eax) /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); } 108287: b8 ff ff ff ff mov $0xffffffff,%eax 10828c: c9 leave 10828d: c3 ret 10828e: 66 90 xchg %ax,%ax 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 ); 108290: e8 af bc 00 00 call 113f44 <__errno> 108295: c7 00 16 00 00 00 movl $0x16,(%eax) 10829b: eb ea jmp 108287 =============================================================================== 00110f9c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 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 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 110fa8: a1 b4 9d 12 00 mov 0x129db4,%eax 110fad: 85 c0 test %eax,%eax 110faf: 0f 84 8b 00 00 00 je 111040 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 110fb5: 53 push %ebx 110fb6: 6a 00 push $0x0 110fb8: 6a 00 push $0x0 110fba: 50 push %eax 110fbb: e8 fc b9 ff ff call 10c9bc } if (sc == RTEMS_SUCCESSFUL) { 110fc0: 83 c4 10 add $0x10,%esp 110fc3: 85 c0 test %eax,%eax 110fc5: 0f 85 4c 03 00 00 jne 111317 <== NEVER TAKEN err = pipe_lock(); if (err) return err; pipe = *pipep; 110fcb: 8b 1e mov (%esi),%ebx if (pipe == NULL) { 110fcd: 85 db test %ebx,%ebx 110fcf: 0f 84 df 01 00 00 je 1111b4 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 110fd5: 52 push %edx 110fd6: 6a 00 push $0x0 110fd8: 6a 00 push $0x0 110fda: ff 73 28 pushl 0x28(%ebx) 110fdd: e8 da b9 ff ff call 10c9bc 110fe2: 83 c4 10 add $0x10,%esp 110fe5: 83 f8 01 cmp $0x1,%eax 110fe8: 19 ff sbb %edi,%edi 110fea: f7 d7 not %edi 110fec: 83 e7 fc and $0xfffffffc,%edi err = -EINTR; if (*pipep == NULL) { 110fef: 8b 06 mov (%esi),%eax 110ff1: 85 c0 test %eax,%eax 110ff3: 0f 84 d7 02 00 00 je 1112d0 else *pipep = pipe; } out: pipe_unlock(); 110ff9: e8 aa fe ff ff call 110ea8 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 110ffe: 85 ff test %edi,%edi 111000: 75 32 jne 111034 <== NEVER TAKEN return err; pipe = *pipep; 111002: 8b 1e mov (%esi),%ebx switch (LIBIO_ACCMODE(iop)) { 111004: 8b 55 0c mov 0xc(%ebp),%edx 111007: 8b 42 14 mov 0x14(%edx),%eax 11100a: 83 e0 06 and $0x6,%eax 11100d: 83 f8 04 cmp $0x4,%eax 111010: 74 6a je 11107c 111012: 83 f8 06 cmp $0x6,%eax 111015: 0f 84 59 01 00 00 je 111174 11101b: 83 f8 02 cmp $0x2,%eax 11101e: 0f 84 dc 00 00 00 je 111100 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 111024: 83 ec 0c sub $0xc,%esp 111027: ff 73 28 pushl 0x28(%ebx) 11102a: e8 89 ba ff ff call 10cab8 return 0; 11102f: 83 c4 10 add $0x10,%esp 111032: 31 ff xor %edi,%edi out_error: pipe_release(pipep, iop); return err; } 111034: 89 f8 mov %edi,%eax 111036: 8d 65 f4 lea -0xc(%ebp),%esp 111039: 5b pop %ebx 11103a: 5e pop %esi 11103b: 5f pop %edi 11103c: c9 leave 11103d: c3 ret 11103e: 66 90 xchg %ax,%ax 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 ); 111040: 50 push %eax 111041: 6a 00 push $0x0 111043: 6a 00 push $0x0 111045: ff 35 e8 9f 12 00 pushl 0x129fe8 11104b: e8 6c b9 ff ff call 10c9bc rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 111050: 83 c4 10 add $0x10,%esp 111053: 8b 3d b4 9d 12 00 mov 0x129db4,%edi 111059: 85 ff test %edi,%edi 11105b: 0f 84 83 02 00 00 je 1112e4 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 111061: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111064: ff 35 e8 9f 12 00 pushl 0x129fe8 <== NOT EXECUTED 11106a: e8 49 ba ff ff call 10cab8 <== NOT EXECUTED 11106f: a1 b4 9d 12 00 mov 0x129db4,%eax <== NOT EXECUTED 111074: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111077: e9 39 ff ff ff jmp 110fb5 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 11107c: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 11107f: 8b 43 14 mov 0x14(%ebx),%eax 111082: 8d 50 01 lea 0x1(%eax),%edx 111085: 89 53 14 mov %edx,0x14(%ebx) 111088: 85 c0 test %eax,%eax 11108a: 0f 84 c4 02 00 00 je 111354 <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 111090: 8b 4b 10 mov 0x10(%ebx),%ecx 111093: 85 c9 test %ecx,%ecx 111095: 75 8d jne 111024 111097: 8b 55 0c mov 0xc(%ebp),%edx 11109a: f6 42 14 01 testb $0x1,0x14(%edx) 11109e: 0f 85 04 03 00 00 jne 1113a8 <== NEVER TAKEN err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 1110a4: 8b 7b 20 mov 0x20(%ebx),%edi 1110a7: eb 20 jmp 1110c9 1110a9: 8d 76 00 lea 0x0(%esi),%esi err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 1110ac: 51 push %ecx 1110ad: 6a 00 push $0x0 1110af: 6a 00 push $0x0 1110b1: ff 73 28 pushl 0x28(%ebx) 1110b4: e8 03 b9 ff ff call 10c9bc 1110b9: 83 c4 10 add $0x10,%esp 1110bc: 85 c0 test %eax,%eax 1110be: 75 27 jne 1110e7 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 1110c0: 39 7b 20 cmp %edi,0x20(%ebx) 1110c3: 0f 85 5b ff ff ff jne 111024 <== ALWAYS TAKEN if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 1110c9: 83 ec 0c sub $0xc,%esp 1110cc: ff 73 28 pushl 0x28(%ebx) 1110cf: e8 e4 b9 ff ff call 10cab8 if (! PIPE_WRITEWAIT(pipe)) 1110d4: 58 pop %eax 1110d5: 5a pop %edx 1110d6: 6a 00 push $0x0 1110d8: ff 73 30 pushl 0x30(%ebx) 1110db: e8 04 1d 00 00 call 112de4 1110e0: 83 c4 10 add $0x10,%esp 1110e3: 85 c0 test %eax,%eax 1110e5: 74 c5 je 1110ac <== ALWAYS TAKEN goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 1110e7: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 1110ec: 83 ec 08 sub $0x8,%esp 1110ef: ff 75 0c pushl 0xc(%ebp) 1110f2: 56 push %esi 1110f3: e8 c8 fd ff ff call 110ec0 return err; 1110f8: 83 c4 10 add $0x10,%esp 1110fb: e9 34 ff ff ff jmp 111034 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 111100: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 111103: 8b 43 10 mov 0x10(%ebx),%eax 111106: 8d 50 01 lea 0x1(%eax),%edx 111109: 89 53 10 mov %edx,0x10(%ebx) 11110c: 85 c0 test %eax,%eax 11110e: 0f 84 10 02 00 00 je 111324 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 111114: 8b 7b 14 mov 0x14(%ebx),%edi 111117: 85 ff test %edi,%edi 111119: 0f 85 05 ff ff ff jne 111024 /* Not an error */ if (LIBIO_NODELAY(iop)) 11111f: 8b 45 0c mov 0xc(%ebp),%eax 111122: f6 40 14 01 testb $0x1,0x14(%eax) 111126: 0f 85 f8 fe ff ff jne 111024 break; prevCounter = pipe->writerCounter; 11112c: 8b 7b 24 mov 0x24(%ebx),%edi 11112f: eb 20 jmp 111151 111131: 8d 76 00 lea 0x0(%esi),%esi /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 111134: 50 push %eax 111135: 6a 00 push $0x0 111137: 6a 00 push $0x0 111139: ff 73 28 pushl 0x28(%ebx) 11113c: e8 7b b8 ff ff call 10c9bc 111141: 83 c4 10 add $0x10,%esp 111144: 85 c0 test %eax,%eax 111146: 75 9f jne 1110e7 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); 111148: 39 7b 24 cmp %edi,0x24(%ebx) 11114b: 0f 85 d3 fe ff ff jne 111024 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 111151: 83 ec 0c sub $0xc,%esp 111154: ff 73 28 pushl 0x28(%ebx) 111157: e8 5c b9 ff ff call 10cab8 if (! PIPE_READWAIT(pipe)) 11115c: 5a pop %edx 11115d: 59 pop %ecx 11115e: 6a 00 push $0x0 111160: ff 73 2c pushl 0x2c(%ebx) 111163: e8 7c 1c 00 00 call 112de4 111168: 83 c4 10 add $0x10,%esp 11116b: 85 c0 test %eax,%eax 11116d: 74 c5 je 111134 <== ALWAYS TAKEN 11116f: e9 73 ff ff ff jmp 1110e7 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 111174: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 111177: 8b 43 10 mov 0x10(%ebx),%eax 11117a: 8d 50 01 lea 0x1(%eax),%edx 11117d: 89 53 10 mov %edx,0x10(%ebx) 111180: 85 c0 test %eax,%eax 111182: 0f 84 b4 01 00 00 je 11133c PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 111188: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 11118b: 8b 43 14 mov 0x14(%ebx),%eax 11118e: 8d 50 01 lea 0x1(%eax),%edx 111191: 89 53 14 mov %edx,0x14(%ebx) 111194: 85 c0 test %eax,%eax 111196: 0f 85 88 fe ff ff jne 111024 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 11119c: 83 ec 08 sub $0x8,%esp 11119f: 8d 45 e4 lea -0x1c(%ebp),%eax 1111a2: 50 push %eax 1111a3: ff 73 2c pushl 0x2c(%ebx) 1111a6: e8 d5 1b 00 00 call 112d80 1111ab: 83 c4 10 add $0x10,%esp 1111ae: e9 71 fe ff ff jmp 111024 1111b3: 90 nop { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 1111b4: 83 ec 0c sub $0xc,%esp 1111b7: 6a 34 push $0x34 1111b9: e8 72 84 ff ff call 109630 1111be: 89 c3 mov %eax,%ebx 1111c0: 89 45 d4 mov %eax,-0x2c(%ebp) if (pipe == NULL) 1111c3: 83 c4 10 add $0x10,%esp 1111c6: 85 c0 test %eax,%eax 1111c8: 0f 84 32 02 00 00 je 111400 <== NEVER TAKEN return err; memset(pipe, 0, sizeof(pipe_control_t)); 1111ce: b9 34 00 00 00 mov $0x34,%ecx 1111d3: 31 c0 xor %eax,%eax 1111d5: 89 df mov %ebx,%edi 1111d7: f3 aa rep stos %al,%es:(%edi) pipe->Size = PIPE_BUF; 1111d9: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) pipe->Buffer = malloc(pipe->Size); 1111e0: 83 ec 0c sub $0xc,%esp 1111e3: 68 00 02 00 00 push $0x200 1111e8: e8 43 84 ff ff call 109630 1111ed: 89 03 mov %eax,(%ebx) if (! pipe->Buffer) 1111ef: 83 c4 10 add $0x10,%esp 1111f2: 85 c0 test %eax,%eax 1111f4: 0f 84 f8 01 00 00 je 1113f2 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 1111fa: 8d 43 2c lea 0x2c(%ebx),%eax 1111fd: 50 push %eax 1111fe: 6a 00 push $0x0 111200: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'r', c), 111202: 0f be 05 5c 7d 12 00 movsbl 0x127d5c,%eax if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 111209: 0d 00 72 49 50 or $0x50497200,%eax 11120e: 50 push %eax 11120f: e8 f0 19 00 00 call 112c04 111214: 83 c4 10 add $0x10,%esp 111217: 85 c0 test %eax,%eax 111219: 0f 85 c3 01 00 00 jne 1113e2 <== NEVER TAKEN rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 11121f: 8d 43 30 lea 0x30(%ebx),%eax 111222: 50 push %eax 111223: 6a 00 push $0x0 111225: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'w', c), 111227: 0f be 05 5c 7d 12 00 movsbl 0x127d5c,%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( 11122e: 0d 00 77 49 50 or $0x50497700,%eax 111233: 50 push %eax 111234: e8 cb 19 00 00 call 112c04 111239: 83 c4 10 add $0x10,%esp 11123c: 85 c0 test %eax,%eax 11123e: 0f 85 8d 01 00 00 jne 1113d1 <== NEVER TAKEN rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 111244: 83 ec 0c sub $0xc,%esp 111247: 8d 43 28 lea 0x28(%ebx),%eax 11124a: 50 push %eax 11124b: 6a 00 push $0x0 11124d: 6a 10 push $0x10 11124f: 6a 01 push $0x1 rtems_build_name ('P', 'I', 's', c), 1, 111251: 0f be 05 5c 7d 12 00 movsbl 0x127d5c,%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( 111258: 0d 00 73 49 50 or $0x50497300,%eax 11125d: 50 push %eax 11125e: e8 dd b4 ff ff call 10c740 111263: 83 c4 20 add $0x20,%esp 111266: 85 c0 test %eax,%eax 111268: 0f 85 52 01 00 00 jne 1113c0 <== NEVER TAKEN Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 11126e: 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 11126f: 8d 7d e0 lea -0x20(%ebp),%edi 111272: 57 push %edi 111273: ff 73 2c pushl 0x2c(%ebx) 111276: 68 40 ab 12 00 push $0x12ab40 11127b: e8 44 cd ff ff call 10dfc4 <_Objects_Get> |= STATES_INTERRUPTIBLE_BY_SIGNAL; 111280: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) _Thread_Enable_dispatch(); 111287: e8 78 d8 ff ff call 10eb04 <_Thread_Enable_dispatch> 11128c: 83 c4 0c add $0xc,%esp 11128f: 57 push %edi 111290: ff 73 30 pushl 0x30(%ebx) 111293: 68 40 ab 12 00 push $0x12ab40 111298: e8 27 cd ff ff call 10dfc4 <_Objects_Get> _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 11129d: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) _Thread_Enable_dispatch(); 1112a4: e8 5b d8 ff ff call 10eb04 <_Thread_Enable_dispatch> #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 1112a9: a0 5c 7d 12 00 mov 0x127d5c,%al 1112ae: 8d 50 01 lea 0x1(%eax),%edx 1112b1: 88 15 5c 7d 12 00 mov %dl,0x127d5c 1112b7: 83 c4 10 add $0x10,%esp 1112ba: 3c 7a cmp $0x7a,%al 1112bc: 0f 85 13 fd ff ff jne 110fd5 c = 'a'; 1112c2: c6 05 5c 7d 12 00 61 movb $0x61,0x127d5c 1112c9: e9 07 fd ff ff jmp 110fd5 1112ce: 66 90 xchg %ax,%ax if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 1112d0: 85 ff test %edi,%edi 1112d2: 0f 85 94 00 00 00 jne 11136c <== NEVER TAKEN pipe_free(pipe); else *pipep = pipe; 1112d8: 89 1e mov %ebx,(%esi) } out: pipe_unlock(); 1112da: e8 c9 fb ff ff call 110ea8 1112df: e9 1e fd ff ff jmp 111002 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( 1112e4: 83 ec 0c sub $0xc,%esp 1112e7: 68 b4 9d 12 00 push $0x129db4 1112ec: 6a 00 push $0x0 1112ee: 6a 54 push $0x54 1112f0: 6a 01 push $0x1 1112f2: 68 45 50 49 50 push $0x50495045 1112f7: e8 44 b4 ff ff call 10c740 1112fc: 89 c3 mov %eax,%ebx 1112fe: 83 c4 14 add $0x14,%esp 111301: ff 35 e8 9f 12 00 pushl 0x129fe8 111307: e8 ac b7 ff ff call 10cab8 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 11130c: 83 c4 10 add $0x10,%esp 11130f: 85 db test %ebx,%ebx 111311: 0f 84 f0 00 00 00 je 111407 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 111317: bf f4 ff ff ff mov $0xfffffff4,%edi 11131c: e9 13 fd ff ff jmp 111034 111321: 8d 76 00 lea 0x0(%esi),%esi switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 111324: 83 ec 08 sub $0x8,%esp 111327: 8d 45 e4 lea -0x1c(%ebp),%eax 11132a: 50 push %eax 11132b: ff 73 30 pushl 0x30(%ebx) 11132e: e8 4d 1a 00 00 call 112d80 111333: 83 c4 10 add $0x10,%esp 111336: e9 d9 fd ff ff jmp 111114 11133b: 90 nop break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 11133c: 83 ec 08 sub $0x8,%esp 11133f: 8d 45 e4 lea -0x1c(%ebp),%eax 111342: 50 push %eax 111343: ff 73 30 pushl 0x30(%ebx) 111346: e8 35 1a 00 00 call 112d80 11134b: 83 c4 10 add $0x10,%esp 11134e: e9 35 fe ff ff jmp 111188 111353: 90 nop case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 111354: 83 ec 08 sub $0x8,%esp 111357: 8d 45 e4 lea -0x1c(%ebp),%eax 11135a: 50 push %eax 11135b: ff 73 2c pushl 0x2c(%ebx) 11135e: e8 1d 1a 00 00 call 112d80 111363: 83 c4 10 add $0x10,%esp 111366: e9 25 fd ff ff jmp 111090 11136b: 90 nop /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 11136c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11136f: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111372: e8 79 19 00 00 call 112cf0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 111377: 59 pop %ecx <== NOT EXECUTED 111378: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 11137b: e8 70 19 00 00 call 112cf0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 111380: 5a pop %edx <== NOT EXECUTED 111381: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111384: e8 8f b5 ff ff call 10c918 <== NOT EXECUTED free(pipe->Buffer); 111389: 58 pop %eax <== NOT EXECUTED 11138a: ff 33 pushl (%ebx) <== NOT EXECUTED 11138c: e8 af 7b ff ff call 108f40 <== NOT EXECUTED free(pipe); 111391: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 111394: e8 a7 7b ff ff call 108f40 <== NOT EXECUTED 111399: 83 c4 10 add $0x10,%esp <== NOT EXECUTED else *pipep = pipe; } out: pipe_unlock(); 11139c: e8 07 fb ff ff call 110ea8 1113a1: e9 8e fc ff ff jmp 111034 1113a6: 66 90 xchg %ax,%ax if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 1113a8: 83 ec 0c sub $0xc,%esp 1113ab: ff 73 28 pushl 0x28(%ebx) 1113ae: e8 05 b7 ff ff call 10cab8 err = -ENXIO; goto out_error; 1113b3: 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; 1113b6: bf fa ff ff ff mov $0xfffffffa,%edi goto out_error; 1113bb: e9 2c fd ff ff jmp 1110ec if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 1113c0: 83 ec 0c sub $0xc,%esp 1113c3: 8b 45 d4 mov -0x2c(%ebp),%eax 1113c6: ff 70 30 pushl 0x30(%eax) 1113c9: e8 22 19 00 00 call 112cf0 1113ce: 83 c4 10 add $0x10,%esp err_wbar: rtems_barrier_delete(pipe->readBarrier); 1113d1: 83 ec 0c sub $0xc,%esp 1113d4: 8b 55 d4 mov -0x2c(%ebp),%edx 1113d7: ff 72 2c pushl 0x2c(%edx) 1113da: e8 11 19 00 00 call 112cf0 1113df: 83 c4 10 add $0x10,%esp err_rbar: free(pipe->Buffer); 1113e2: 83 ec 0c sub $0xc,%esp 1113e5: 8b 45 d4 mov -0x2c(%ebp),%eax 1113e8: ff 30 pushl (%eax) 1113ea: e8 51 7b ff ff call 108f40 1113ef: 83 c4 10 add $0x10,%esp err_buf: free(pipe); 1113f2: 83 ec 0c sub $0xc,%esp 1113f5: ff 75 d4 pushl -0x2c(%ebp) 1113f8: e8 43 7b ff ff call 108f40 1113fd: 83 c4 10 add $0x10,%esp ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 111400: bf f4 ff ff ff mov $0xfffffff4,%edi 111405: eb 95 jmp 11139c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 111407: a1 b4 9d 12 00 mov 0x129db4,%eax 11140c: e9 a4 fb ff ff jmp 110fb5 =============================================================================== 0010f5ac : const char *type; rtems_filesystem_fsmount_me_t mount_h; } find_arg; static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { 10f5ac: 55 push %ebp 10f5ad: 89 e5 mov %esp,%ebp 10f5af: 56 push %esi 10f5b0: 53 push %ebx 10f5b1: 8b 75 08 mov 0x8(%ebp),%esi 10f5b4: 8b 5d 0c mov 0xc(%ebp),%ebx find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 10f5b7: 83 ec 08 sub $0x8,%esp 10f5ba: ff 33 pushl (%ebx) 10f5bc: ff 36 pushl (%esi) 10f5be: e8 09 45 00 00 call 113acc 10f5c3: 83 c4 10 add $0x10,%esp 10f5c6: 85 c0 test %eax,%eax 10f5c8: 75 12 jne 10f5dc return false; } else { fa->mount_h = entry->mount_h; 10f5ca: 8b 46 04 mov 0x4(%esi),%eax 10f5cd: 89 43 04 mov %eax,0x4(%ebx) return true; 10f5d0: b0 01 mov $0x1,%al } } 10f5d2: 8d 65 f8 lea -0x8(%ebp),%esp 10f5d5: 5b pop %ebx 10f5d6: 5e pop %esi 10f5d7: c9 leave 10f5d8: c3 ret 10f5d9: 8d 76 00 lea 0x0(%esi),%esi 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; 10f5dc: 31 c0 xor %eax,%eax } else { fa->mount_h = entry->mount_h; return true; } } 10f5de: 8d 65 f8 lea -0x8(%ebp),%esp 10f5e1: 5b pop %ebx 10f5e2: 5e pop %esi 10f5e3: c9 leave 10f5e4: c3 ret =============================================================================== 001082a0 : long fpathconf( int fd, int name ) { 1082a0: 55 push %ebp 1082a1: 89 e5 mov %esp,%ebp 1082a3: 83 ec 08 sub $0x8,%esp 1082a6: 8b 45 08 mov 0x8(%ebp),%eax 1082a9: 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); 1082ac: 3b 05 0c 50 12 00 cmp 0x12500c,%eax 1082b2: 0f 83 ac 00 00 00 jae 108364 iop = rtems_libio_iop(fd); 1082b8: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx 1082bf: 8d 04 cd 00 00 00 00 lea 0x0(,%ecx,8),%eax 1082c6: 29 c8 sub %ecx,%eax 1082c8: 03 05 40 92 12 00 add 0x129240,%eax rtems_libio_check_is_open(iop); 1082ce: 8b 48 14 mov 0x14(%eax),%ecx 1082d1: f6 c5 01 test $0x1,%ch 1082d4: 0f 84 8a 00 00 00 je 108364 <== NEVER TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 1082da: 83 e1 02 and $0x2,%ecx 1082dd: 74 08 je 1082e7 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 1082df: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 1082e2: 83 fa 0b cmp $0xb,%edx 1082e5: 76 15 jbe 1082fc break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1082e7: e8 58 bc 00 00 call 113f44 <__errno> 1082ec: c7 00 16 00 00 00 movl $0x16,(%eax) 1082f2: b8 ff ff ff ff mov $0xffffffff,%eax break; } return return_value; } 1082f7: c9 leave 1082f8: c3 ret 1082f9: 8d 76 00 lea 0x0(%esi),%esi * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 1082fc: ff 24 95 78 29 12 00 jmp *0x122978(,%edx,4) 108303: 90 nop break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 108304: 8b 40 5c mov 0x5c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108307: c9 leave 108308: c3 ret 108309: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 10830c: 8b 40 50 mov 0x50(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10830f: c9 leave 108310: c3 ret 108311: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 108314: 8b 40 64 mov 0x64(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108317: c9 leave 108318: c3 ret 108319: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 10831c: 8b 40 58 mov 0x58(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10831f: c9 leave 108320: c3 ret 108321: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 108324: 8b 40 54 mov 0x54(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108327: c9 leave 108328: c3 ret 108329: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 10832c: 8b 40 4c mov 0x4c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10832f: c9 leave 108330: c3 ret 108331: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 108334: 8b 40 48 mov 0x48(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108337: c9 leave 108338: c3 ret 108339: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 10833c: 8b 40 44 mov 0x44(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10833f: c9 leave 108340: c3 ret 108341: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 108344: 8b 40 40 mov 0x40(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108347: c9 leave 108348: c3 ret 108349: 8d 76 00 lea 0x0(%esi),%esi switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 10834c: 8b 40 3c mov 0x3c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10834f: c9 leave 108350: c3 ret 108351: 8d 76 00 lea 0x0(%esi),%esi the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 108354: 8b 40 38 mov 0x38(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108357: c9 leave 108358: c3 ret 108359: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 10835c: 8b 40 60 mov 0x60(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10835f: c9 leave 108360: c3 ret 108361: 8d 76 00 lea 0x0(%esi),%esi 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); 108364: e8 db bb 00 00 call 113f44 <__errno> 108369: c7 00 09 00 00 00 movl $0x9,(%eax) 10836f: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108374: c9 leave 108375: c3 ret =============================================================================== 00107634 : #include void free( void *ptr ) { 107634: 55 push %ebp 107635: 89 e5 mov %esp,%ebp 107637: 53 push %ebx 107638: 83 ec 04 sub $0x4,%esp 10763b: 8b 5d 08 mov 0x8(%ebp),%ebx MSBUMP(free_calls, 1); 10763e: ff 05 ac 76 12 00 incl 0x1276ac if ( !ptr ) 107644: 85 db test %ebx,%ebx 107646: 74 4b je 107693 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 107648: 83 3d 80 79 12 00 03 cmpl $0x3,0x127980 10764f: 74 47 je 107698 <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 107651: a1 68 5a 12 00 mov 0x125a68,%eax 107656: 85 c0 test %eax,%eax 107658: 74 0a je 107664 (*rtems_malloc_statistics_helpers->at_free)(ptr); 10765a: 83 ec 0c sub $0xc,%esp 10765d: 53 push %ebx 10765e: ff 50 08 call *0x8(%eax) 107661: 83 c4 10 add $0x10,%esp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 107664: 83 ec 08 sub $0x8,%esp 107667: 53 push %ebx 107668: ff 35 90 34 12 00 pushl 0x123490 10766e: e8 81 4e 00 00 call 10c4f4 <_Protected_heap_Free> 107673: 83 c4 10 add $0x10,%esp 107676: 84 c0 test %al,%al 107678: 75 19 jne 107693 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 10767a: a1 90 34 12 00 mov 0x123490,%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", 10767f: ff 70 1c pushl 0x1c(%eax) 107682: ff 70 18 pushl 0x18(%eax) 107685: 53 push %ebx 107686: 68 f0 0d 12 00 push $0x120df0 10768b: e8 b4 0d 00 00 call 108444 107690: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 107693: 8b 5d fc mov -0x4(%ebp),%ebx 107696: c9 leave 107697: 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() ) { 107698: e8 3b 01 00 00 call 1077d8 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 10769d: 84 c0 test %al,%al 10769f: 75 b0 jne 107651 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1076a1: 89 5d 08 mov %ebx,0x8(%ebp) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1076a4: 8b 5d fc mov -0x4(%ebp),%ebx 1076a7: 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); 1076a8: e9 97 01 00 00 jmp 107844 =============================================================================== 00108af8 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 108af8: 55 push %ebp 108af9: 89 e5 mov %esp,%ebp 108afb: 53 push %ebx 108afc: 83 ec 04 sub $0x4,%esp 108aff: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 108b02: 81 fb 80 7f 12 00 cmp $0x127f80,%ebx 108b08: 74 26 je 108b30 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 108b0a: 83 ec 0c sub $0xc,%esp 108b0d: 8d 43 04 lea 0x4(%ebx),%eax 108b10: 50 push %eax 108b11: e8 4a ef ff ff call 107a60 rtems_filesystem_freenode( &env->root_directory); 108b16: 8d 43 18 lea 0x18(%ebx),%eax 108b19: 89 04 24 mov %eax,(%esp) 108b1c: e8 3f ef ff ff call 107a60 free(env); 108b21: 83 c4 10 add $0x10,%esp 108b24: 89 5d 08 mov %ebx,0x8(%ebp) } } 108b27: 8b 5d fc mov -0x4(%ebp),%ebx 108b2a: c9 leave && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 108b2b: e9 44 ef ff ff jmp 107a74 } } 108b30: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108b33: c9 leave <== NOT EXECUTED 108b34: c3 ret <== NOT EXECUTED =============================================================================== 0011ebac : int fstat( int fd, struct stat *sbuf ) { 11ebac: 55 push %ebp 11ebad: 89 e5 mov %esp,%ebp 11ebaf: 57 push %edi 11ebb0: 53 push %ebx 11ebb1: 8b 45 08 mov 0x8(%ebp),%eax 11ebb4: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11ebb7: 85 db test %ebx,%ebx 11ebb9: 74 55 je 11ec10 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11ebbb: 3b 05 4c 34 12 00 cmp 0x12344c,%eax 11ebc1: 73 39 jae 11ebfc 11ebc3: c1 e0 03 shl $0x3,%eax 11ebc6: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 11ebcd: 29 c2 sub %eax,%edx 11ebcf: 03 15 80 76 12 00 add 0x127680,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11ebd5: f6 42 15 01 testb $0x1,0x15(%edx) 11ebd9: 74 21 je 11ebfc <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11ebdb: b9 48 00 00 00 mov $0x48,%ecx 11ebe0: 31 c0 xor %eax,%eax 11ebe2: 89 df mov %ebx,%edi 11ebe4: f3 aa rep stos %al,%es:(%edi) return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 11ebe6: 8b 42 20 mov 0x20(%edx),%eax 11ebe9: 89 5d 0c mov %ebx,0xc(%ebp) 11ebec: 83 c2 18 add $0x18,%edx 11ebef: 89 55 08 mov %edx,0x8(%ebp) 11ebf2: 8b 40 18 mov 0x18(%eax),%eax } 11ebf5: 5b pop %ebx 11ebf6: 5f pop %edi 11ebf7: 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 ); 11ebf8: ff e0 jmp *%eax 11ebfa: 66 90 xchg %ax,%ax /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11ebfc: e8 53 42 ff ff call 112e54 <__errno> 11ec01: 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 ); } 11ec07: b8 ff ff ff ff mov $0xffffffff,%eax 11ec0c: 5b pop %ebx 11ec0d: 5f pop %edi 11ec0e: c9 leave 11ec0f: c3 ret /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 11ec10: e8 3f 42 ff ff call 112e54 <__errno> 11ec15: c7 00 0e 00 00 00 movl $0xe,(%eax) 11ec1b: eb ea jmp 11ec07 =============================================================================== 00108494 : #include int fsync( int fd ) { 108494: 55 push %ebp 108495: 89 e5 mov %esp,%ebp 108497: 83 ec 08 sub $0x8,%esp 10849a: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 10849d: 3b 05 0c 50 12 00 cmp 0x12500c,%eax 1084a3: 73 2f jae 1084d4 iop = rtems_libio_iop( fd ); 1084a5: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 1084ac: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 1084b3: 29 d0 sub %edx,%eax 1084b5: 03 05 40 92 12 00 add 0x129240,%eax rtems_libio_check_is_open(iop); 1084bb: 8b 50 14 mov 0x14(%eax),%edx 1084be: f6 c6 01 test $0x1,%dh 1084c1: 74 11 je 1084d4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1084c3: 83 e2 04 and $0x4,%edx 1084c6: 74 20 je 1084e8 /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); 1084c8: 8b 50 20 mov 0x20(%eax),%edx 1084cb: 89 45 08 mov %eax,0x8(%ebp) 1084ce: 8b 42 28 mov 0x28(%edx),%eax } 1084d1: c9 leave /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); 1084d2: ff e0 jmp *%eax { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 1084d4: e8 6b ba 00 00 call 113f44 <__errno> 1084d9: c7 00 09 00 00 00 movl $0x9,(%eax) /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); } 1084df: b8 ff ff ff ff mov $0xffffffff,%eax 1084e4: c9 leave 1084e5: c3 ret 1084e6: 66 90 xchg %ax,%ax 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 ); 1084e8: e8 57 ba 00 00 call 113f44 <__errno> 1084ed: c7 00 16 00 00 00 movl $0x16,(%eax) 1084f3: eb ea jmp 1084df =============================================================================== 0010f248 : int ftruncate( int fd, off_t length ) { 10f248: 55 push %ebp 10f249: 89 e5 mov %esp,%ebp 10f24b: 57 push %edi 10f24c: 56 push %esi 10f24d: 53 push %ebx 10f24e: 83 ec 3c sub $0x3c,%esp 10f251: 8b 45 08 mov 0x8(%ebp),%eax 10f254: 8b 55 0c mov 0xc(%ebp),%edx 10f257: 8b 4d 10 mov 0x10(%ebp),%ecx 10f25a: 89 55 c0 mov %edx,-0x40(%ebp) 10f25d: 89 4d c4 mov %ecx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10f260: 3b 05 4c 34 12 00 cmp 0x12344c,%eax 10f266: 73 58 jae 10f2c0 iop = rtems_libio_iop( fd ); 10f268: c1 e0 03 shl $0x3,%eax 10f26b: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 10f272: 29 c3 sub %eax,%ebx 10f274: 03 1d 80 76 12 00 add 0x127680,%ebx rtems_libio_check_is_open(iop); 10f27a: f6 43 15 01 testb $0x1,0x15(%ebx) 10f27e: 74 40 je 10f2c0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10f280: 8d 7d d4 lea -0x2c(%ebp),%edi 10f283: 8d 73 18 lea 0x18(%ebx),%esi 10f286: b9 05 00 00 00 mov $0x5,%ecx 10f28b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10f28d: 83 ec 0c sub $0xc,%esp 10f290: 8d 45 d4 lea -0x2c(%ebp),%eax 10f293: 50 push %eax 10f294: 8b 45 e0 mov -0x20(%ebp),%eax 10f297: ff 50 10 call *0x10(%eax) 10f29a: 83 c4 10 add $0x10,%esp 10f29d: 48 dec %eax 10f29e: 74 46 je 10f2e6 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10f2a0: f6 43 14 04 testb $0x4,0x14(%ebx) 10f2a4: 74 2e je 10f2d4 return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); 10f2a6: 50 push %eax 10f2a7: 8b 43 20 mov 0x20(%ebx),%eax 10f2aa: ff 75 c4 pushl -0x3c(%ebp) 10f2ad: ff 75 c0 pushl -0x40(%ebp) 10f2b0: 53 push %ebx 10f2b1: ff 50 20 call *0x20(%eax) 10f2b4: 83 c4 10 add $0x10,%esp } 10f2b7: 8d 65 f4 lea -0xc(%ebp),%esp 10f2ba: 5b pop %ebx 10f2bb: 5e pop %esi 10f2bc: 5f pop %edi 10f2bd: c9 leave 10f2be: c3 ret 10f2bf: 90 nop 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); 10f2c0: e8 8f 3b 00 00 call 112e54 <__errno> 10f2c5: c7 00 09 00 00 00 movl $0x9,(%eax) 10f2cb: b8 ff ff ff ff mov $0xffffffff,%eax 10f2d0: eb e5 jmp 10f2b7 10f2d2: 66 90 xchg %ax,%ax 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 ); 10f2d4: e8 7b 3b 00 00 call 112e54 <__errno> 10f2d9: c7 00 16 00 00 00 movl $0x16,(%eax) 10f2df: b8 ff ff ff ff mov $0xffffffff,%eax 10f2e4: eb d1 jmp 10f2b7 * 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 ); 10f2e6: e8 69 3b 00 00 call 112e54 <__errno> 10f2eb: c7 00 15 00 00 00 movl $0x15,(%eax) 10f2f1: b8 ff ff ff ff mov $0xffffffff,%eax 10f2f6: eb bf jmp 10f2b7 =============================================================================== 00107880 : #include #include int getchark(void) { 107880: 55 push %ebp 107881: 89 e5 mov %esp,%ebp 107883: 83 ec 08 sub $0x8,%esp if ( BSP_poll_char ) 107886: a1 cc 38 12 00 mov 0x1238cc,%eax 10788b: 85 c0 test %eax,%eax 10788d: 74 05 je 107894 return (*BSP_poll_char)(); return -1; } 10788f: c9 leave #include int getchark(void) { if ( BSP_poll_char ) return (*BSP_poll_char)(); 107890: ff e0 jmp *%eax 107892: 66 90 xchg %ax,%ax return -1; } 107894: b8 ff ff ff ff mov $0xffffffff,%eax 107899: c9 leave 10789a: c3 ret =============================================================================== 00120520 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 120520: 55 push %ebp 120521: 89 e5 mov %esp,%ebp 120523: 57 push %edi 120524: 56 push %esi 120525: 53 push %ebx 120526: 83 ec 2c sub $0x2c,%esp 120529: 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 ); 12052c: 3b 05 ec 5e 12 00 cmp 0x125eec,%eax 120532: 73 4c jae 120580 <== NEVER TAKEN 120534: c1 e0 03 shl $0x3,%eax 120537: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 12053e: 29 c3 sub %eax,%ebx 120540: 03 1d 40 a2 12 00 add 0x12a240,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 120546: 8d 7d d4 lea -0x2c(%ebp),%edi 120549: 8d 73 18 lea 0x18(%ebx),%esi 12054c: b9 05 00 00 00 mov $0x5,%ecx 120551: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 120553: 83 ec 0c sub $0xc,%esp 120556: 8d 45 d4 lea -0x2c(%ebp),%eax 120559: 50 push %eax 12055a: 8b 45 e0 mov -0x20(%ebp),%eax 12055d: ff 50 10 call *0x10(%eax) 120560: 83 c4 10 add $0x10,%esp 120563: 48 dec %eax 120564: 75 1e jne 120584 /* * 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 ); 120566: 50 push %eax 120567: 8b 43 20 mov 0x20(%ebx),%eax 12056a: ff 75 10 pushl 0x10(%ebp) 12056d: ff 75 0c pushl 0xc(%ebp) 120570: 53 push %ebx 120571: ff 50 08 call *0x8(%eax) 120574: 83 c4 10 add $0x10,%esp } 120577: 8d 65 f4 lea -0xc(%ebp),%esp 12057a: 5b pop %ebx 12057b: 5e pop %esi 12057c: 5f pop %edi 12057d: c9 leave 12057e: c3 ret 12057f: 90 nop rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 120580: 31 db xor %ebx,%ebx 120582: eb c2 jmp 120546 <== 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 ); 120584: e8 9b 38 ff ff call 113e24 <__errno> 120589: c7 00 14 00 00 00 movl $0x14,(%eax) 12058f: b8 ff ff ff ff mov $0xffffffff,%eax 120594: eb e1 jmp 120577 =============================================================================== 001080b4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 1080b4: 55 push %ebp 1080b5: 89 e5 mov %esp,%ebp 1080b7: 57 push %edi 1080b8: 56 push %esi 1080b9: 53 push %ebx 1080ba: 83 ec 1c sub $0x1c,%esp 1080bd: 89 c3 mov %eax,%ebx 1080bf: 89 55 e4 mov %edx,-0x1c(%ebp) 1080c2: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 1080c4: e8 eb fe ff ff call 107fb4 if ((fp = fopen("/etc/group", "r")) == NULL) 1080c9: 83 ec 08 sub $0x8,%esp 1080cc: 68 32 13 12 00 push $0x121332 1080d1: 68 f9 26 12 00 push $0x1226f9 1080d6: e8 b5 c3 00 00 call 114490 1080db: 89 c7 mov %eax,%edi 1080dd: 83 c4 10 add $0x10,%esp 1080e0: 85 c0 test %eax,%eax 1080e2: 75 22 jne 108106 1080e4: e9 8b 00 00 00 jmp 108174 1080e9: 8d 76 00 lea 0x0(%esi),%esi for(;;) { if (!scangr(fp, grp, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(grp->gr_name, name) == 0); 1080ec: 83 ec 08 sub $0x8,%esp 1080ef: 53 push %ebx 1080f0: ff 36 pushl (%esi) 1080f2: e8 15 d2 00 00 call 11530c 1080f7: 83 c4 10 add $0x10,%esp 1080fa: 85 c0 test %eax,%eax 1080fc: 0f 94 c0 sete %al 1080ff: 0f b6 c0 movzbl %al,%eax } else { match = (grp->gr_gid == gid); } if (match) { 108102: 85 c0 test %eax,%eax 108104: 75 2e jne 108134 if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scangr(fp, grp, buffer, bufsize)) 108106: 83 ec 0c sub $0xc,%esp 108109: ff 75 0c pushl 0xc(%ebp) 10810c: 8b 4d 08 mov 0x8(%ebp),%ecx 10810f: 89 f2 mov %esi,%edx 108111: 89 f8 mov %edi,%eax 108113: e8 88 fc ff ff call 107da0 108118: 83 c4 10 add $0x10,%esp 10811b: 85 c0 test %eax,%eax 10811d: 74 31 je 108150 goto error_einval; if (name) { 10811f: 85 db test %ebx,%ebx 108121: 75 c9 jne 1080ec match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 108123: 0f b7 46 08 movzwl 0x8(%esi),%eax 108127: 3b 45 e4 cmp -0x1c(%ebp),%eax 10812a: 0f 94 c0 sete %al 10812d: 0f b6 c0 movzbl %al,%eax } if (match) { 108130: 85 c0 test %eax,%eax 108132: 74 d2 je 108106 fclose(fp); 108134: 83 ec 0c sub $0xc,%esp 108137: 57 push %edi 108138: e8 4f bc 00 00 call 113d8c *result = grp; 10813d: 8b 45 10 mov 0x10(%ebp),%eax 108140: 89 30 mov %esi,(%eax) return 0; 108142: 83 c4 10 add $0x10,%esp 108145: 31 c0 xor %eax,%eax } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 108147: 8d 65 f4 lea -0xc(%ebp),%esp 10814a: 5b pop %ebx 10814b: 5e pop %esi 10814c: 5f pop %edi 10814d: c9 leave 10814e: c3 ret 10814f: 90 nop *result = grp; return 0; } } error_einval: fclose(fp); 108150: 83 ec 0c sub $0xc,%esp 108153: 57 push %edi 108154: e8 33 bc 00 00 call 113d8c rtems_set_errno_and_return_minus_one( EINVAL ); 108159: e8 d6 ba 00 00 call 113c34 <__errno> 10815e: c7 00 16 00 00 00 movl $0x16,(%eax) 108164: 83 c4 10 add $0x10,%esp 108167: b8 ff ff ff ff mov $0xffffffff,%eax } 10816c: 8d 65 f4 lea -0xc(%ebp),%esp 10816f: 5b pop %ebx 108170: 5e pop %esi 108171: 5f pop %edi 108172: c9 leave 108173: c3 ret int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 108174: e8 bb ba 00 00 call 113c34 <__errno> 108179: c7 00 16 00 00 00 movl $0x16,(%eax) 10817f: 83 c8 ff or $0xffffffff,%eax 108182: eb c3 jmp 108147 =============================================================================== 001083d8 : } struct group *getgrnam( const char *name ) { 1083d8: 55 push %ebp 1083d9: 89 e5 mov %esp,%ebp 1083db: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 1083de: 8d 45 f4 lea -0xc(%ebp),%eax 1083e1: 50 push %eax 1083e2: 68 c8 00 00 00 push $0xc8 1083e7: 68 c0 8c 12 00 push $0x128cc0 1083ec: 68 a4 8c 12 00 push $0x128ca4 1083f1: ff 75 08 pushl 0x8(%ebp) 1083f4: e8 b3 ff ff ff call 1083ac 1083f9: 83 c4 20 add $0x20,%esp 1083fc: 85 c0 test %eax,%eax 1083fe: 75 08 jne 108408 return NULL; return p; 108400: 8b 45 f4 mov -0xc(%ebp),%eax } 108403: c9 leave 108404: c3 ret 108405: 8d 76 00 lea 0x0(%esi),%esi ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) return NULL; 108408: 31 c0 xor %eax,%eax return p; } 10840a: c9 leave 10840b: c3 ret =============================================================================== 0010a7dc : int getitimer( int which, struct itimerval *value ) { 10a7dc: 55 push %ebp 10a7dd: 89 e5 mov %esp,%ebp 10a7df: 83 ec 08 sub $0x8,%esp if ( !value ) 10a7e2: 8b 45 0c mov 0xc(%ebp),%eax 10a7e5: 85 c0 test %eax,%eax 10a7e7: 74 2f je 10a818 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10a7e9: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10a7ed: 76 15 jbe 10a804 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a7ef: e8 00 8d 00 00 call 1134f4 <__errno> 10a7f4: c7 00 16 00 00 00 movl $0x16,(%eax) } 10a7fa: b8 ff ff ff ff mov $0xffffffff,%eax 10a7ff: c9 leave 10a800: c3 ret 10a801: 8d 76 00 lea 0x0(%esi),%esi switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10a804: e8 eb 8c 00 00 call 1134f4 <__errno> 10a809: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10a80f: b8 ff ff ff ff mov $0xffffffff,%eax 10a814: c9 leave 10a815: c3 ret 10a816: 66 90 xchg %ax,%ax int which, struct itimerval *value ) { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); 10a818: e8 d7 8c 00 00 call 1134f4 <__errno> 10a81d: c7 00 0e 00 00 00 movl $0xe,(%eax) 10a823: eb d5 jmp 10a7fa =============================================================================== 00107b78 : */ int getlogin_r( char *name, size_t namesize ) { 107b78: 55 push %ebp 107b79: 89 e5 mov %esp,%ebp 107b7b: 53 push %ebx 107b7c: 83 ec 04 sub $0x4,%esp 107b7f: 8b 5d 08 mov 0x8(%ebp),%ebx struct passwd *pw; char *pname; if ( !name ) 107b82: 85 db test %ebx,%ebx 107b84: 74 42 je 107bc8 return EFAULT; if ( namesize < LOGIN_NAME_MAX ) 107b86: 83 7d 0c 08 cmpl $0x8,0xc(%ebp) 107b8a: 77 0c ja 107b98 return ERANGE; 107b8c: b8 22 00 00 00 mov $0x22,%eax if ( pw ) pname = pw->pw_name; strncpy( name, pname, LOGIN_NAME_MAX ); return 0; } 107b91: 8b 5d fc mov -0x4(%ebp),%ebx 107b94: c9 leave 107b95: c3 ret 107b96: 66 90 xchg %ax,%ax return ERANGE; /* Set the pointer to a default name */ pname = ""; pw = getpwuid(getuid()); 107b98: e8 e7 09 00 00 call 108584 107b9d: 83 ec 0c sub $0xc,%esp 107ba0: 0f b7 c0 movzwl %ax,%eax 107ba3: 50 push %eax 107ba4: e8 37 07 00 00 call 1082e0 if ( pw ) 107ba9: 83 c4 10 add $0x10,%esp 107bac: 85 c0 test %eax,%eax 107bae: 74 20 je 107bd0 pname = pw->pw_name; 107bb0: 8b 00 mov (%eax),%eax strncpy( name, pname, LOGIN_NAME_MAX ); 107bb2: 52 push %edx 107bb3: 6a 09 push $0x9 107bb5: 50 push %eax 107bb6: 53 push %ebx 107bb7: e8 d0 d8 00 00 call 11548c return 0; 107bbc: 83 c4 10 add $0x10,%esp 107bbf: 31 c0 xor %eax,%eax } 107bc1: 8b 5d fc mov -0x4(%ebp),%ebx 107bc4: c9 leave 107bc5: c3 ret 107bc6: 66 90 xchg %ax,%ax { struct passwd *pw; char *pname; if ( !name ) return EFAULT; 107bc8: b8 0e 00 00 00 mov $0xe,%eax 107bcd: eb c2 jmp 107b91 107bcf: 90 nop if ( namesize < LOGIN_NAME_MAX ) return ERANGE; /* Set the pointer to a default name */ pname = ""; 107bd0: b8 49 28 12 00 mov $0x122849,%eax 107bd5: eb db jmp 107bb2 =============================================================================== 00108184 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 108184: 55 push %ebp 108185: 89 e5 mov %esp,%ebp 108187: 57 push %edi 108188: 56 push %esi 108189: 53 push %ebx 10818a: 83 ec 1c sub $0x1c,%esp 10818d: 89 c3 mov %eax,%ebx 10818f: 89 55 e4 mov %edx,-0x1c(%ebp) 108192: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108194: e8 1b fe ff ff call 107fb4 if ((fp = fopen("/etc/passwd", "r")) == NULL) 108199: 83 ec 08 sub $0x8,%esp 10819c: 68 32 13 12 00 push $0x121332 1081a1: 68 ed 26 12 00 push $0x1226ed 1081a6: e8 e5 c2 00 00 call 114490 1081ab: 89 c7 mov %eax,%edi 1081ad: 83 c4 10 add $0x10,%esp 1081b0: 85 c0 test %eax,%eax 1081b2: 75 22 jne 1081d6 1081b4: e9 8b 00 00 00 jmp 108244 1081b9: 8d 76 00 lea 0x0(%esi),%esi for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(pwd->pw_name, name) == 0); 1081bc: 83 ec 08 sub $0x8,%esp 1081bf: 53 push %ebx 1081c0: ff 36 pushl (%esi) 1081c2: e8 45 d1 00 00 call 11530c 1081c7: 83 c4 10 add $0x10,%esp 1081ca: 85 c0 test %eax,%eax 1081cc: 0f 94 c0 sete %al 1081cf: 0f b6 c0 movzbl %al,%eax } else { match = (pwd->pw_uid == uid); } if (match) { 1081d2: 85 c0 test %eax,%eax 1081d4: 75 2e jne 108204 if ((fp = fopen("/etc/passwd", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) 1081d6: 83 ec 0c sub $0xc,%esp 1081d9: ff 75 0c pushl 0xc(%ebp) 1081dc: 8b 4d 08 mov 0x8(%ebp),%ecx 1081df: 89 f2 mov %esi,%edx 1081e1: 89 f8 mov %edi,%eax 1081e3: e8 d0 fc ff ff call 107eb8 1081e8: 83 c4 10 add $0x10,%esp 1081eb: 85 c0 test %eax,%eax 1081ed: 74 31 je 108220 goto error_einval; if (name) { 1081ef: 85 db test %ebx,%ebx 1081f1: 75 c9 jne 1081bc match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 1081f3: 0f b7 46 08 movzwl 0x8(%esi),%eax 1081f7: 3b 45 e4 cmp -0x1c(%ebp),%eax 1081fa: 0f 94 c0 sete %al 1081fd: 0f b6 c0 movzbl %al,%eax } if (match) { 108200: 85 c0 test %eax,%eax 108202: 74 d2 je 1081d6 fclose(fp); 108204: 83 ec 0c sub $0xc,%esp 108207: 57 push %edi 108208: e8 7f bb 00 00 call 113d8c *result = pwd; 10820d: 8b 45 10 mov 0x10(%ebp),%eax 108210: 89 30 mov %esi,(%eax) return 0; 108212: 83 c4 10 add $0x10,%esp 108215: 31 c0 xor %eax,%eax } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 108217: 8d 65 f4 lea -0xc(%ebp),%esp 10821a: 5b pop %ebx 10821b: 5e pop %esi 10821c: 5f pop %edi 10821d: c9 leave 10821e: c3 ret 10821f: 90 nop *result = pwd; return 0; } } error_einval: fclose(fp); 108220: 83 ec 0c sub $0xc,%esp 108223: 57 push %edi 108224: e8 63 bb 00 00 call 113d8c rtems_set_errno_and_return_minus_one( EINVAL ); 108229: e8 06 ba 00 00 call 113c34 <__errno> 10822e: c7 00 16 00 00 00 movl $0x16,(%eax) 108234: 83 c4 10 add $0x10,%esp 108237: b8 ff ff ff ff mov $0xffffffff,%eax } 10823c: 8d 65 f4 lea -0xc(%ebp),%esp 10823f: 5b pop %ebx 108240: 5e pop %esi 108241: 5f pop %edi 108242: c9 leave 108243: c3 ret int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 108244: e8 eb b9 00 00 call 113c34 <__errno> 108249: c7 00 16 00 00 00 movl $0x16,(%eax) 10824f: 83 c8 ff or $0xffffffff,%eax 108252: eb c3 jmp 108217 =============================================================================== 00108280 : } struct passwd *getpwnam( const char *name ) { 108280: 55 push %ebp 108281: 89 e5 mov %esp,%ebp 108283: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108286: 8d 45 f4 lea -0xc(%ebp),%eax 108289: 50 push %eax 10828a: 68 c8 00 00 00 push $0xc8 10828f: 68 c0 8d 12 00 push $0x128dc0 108294: 68 8c 8d 12 00 push $0x128d8c 108299: ff 75 08 pushl 0x8(%ebp) 10829c: e8 b3 ff ff ff call 108254 1082a1: 83 c4 20 add $0x20,%esp 1082a4: 85 c0 test %eax,%eax 1082a6: 75 08 jne 1082b0 return NULL; return p; 1082a8: 8b 45 f4 mov -0xc(%ebp),%eax } 1082ab: c9 leave 1082ac: c3 ret 1082ad: 8d 76 00 lea 0x0(%esi),%esi ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) return NULL; 1082b0: 31 c0 xor %eax,%eax return p; } 1082b2: c9 leave 1082b3: c3 ret =============================================================================== 001121c4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1121c4: 55 push %ebp 1121c5: 89 e5 mov %esp,%ebp 1121c7: 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 ) 1121ca: 8b 50 18 mov 0x18(%eax),%edx 1121cd: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 1121d1: 74 09 je 1121dc <== ALWAYS TAKEN return -1; /* It wasn't a directory --> return error */ 1121d3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED iop->offset = 0; return 0; } 1121d8: c9 leave <== NOT EXECUTED 1121d9: c3 ret <== NOT EXECUTED 1121da: 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; 1121dc: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 1121e3: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) return 0; 1121ea: 31 c0 xor %eax,%eax } 1121ec: c9 leave 1121ed: c3 ret =============================================================================== 001121f0 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1121f0: 55 push %ebp 1121f1: 89 e5 mov %esp,%ebp 1121f3: 57 push %edi 1121f4: 56 push %esi 1121f5: 53 push %ebx 1121f6: 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; 1121fc: 8b 55 08 mov 0x8(%ebp),%edx 1121ff: 8b 42 18 mov 0x18(%edx),%eax IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 112202: 8b 58 50 mov 0x50(%eax),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 112205: 83 c0 54 add $0x54,%eax 112208: 89 85 cc fe ff ff mov %eax,-0x134(%ebp) struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 11220e: 39 c3 cmp %eax,%ebx 112210: 0f 84 2a 01 00 00 je 112340 /* Move to the first of the desired directory entries */ the_node = rtems_chain_first( the_chain ); bytes_transferred = 0; first_entry = iop->offset; 112216: 8b 42 0c mov 0xc(%edx),%eax 112219: 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); 11221f: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx 112224: 8b 45 10 mov 0x10(%ebp),%eax 112227: f7 e2 mul %edx 112229: c1 ea 08 shr $0x8,%edx 11222c: 89 d0 mov %edx,%eax 11222e: c1 e0 04 shl $0x4,%eax 112231: c1 e2 08 shl $0x8,%edx 112234: 8d 14 10 lea (%eax,%edx,1),%edx 112237: 03 95 d4 fe ff ff add -0x12c(%ebp),%edx 11223d: 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 ( 112243: 85 d2 test %edx,%edx 112245: 0f 8e f5 00 00 00 jle 112340 <== NEVER TAKEN 11224b: 31 d2 xor %edx,%edx 11224d: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 112254: 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 ); 112257: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax 11225d: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) 112263: eb 23 jmp 112288 112265: 8d 76 00 lea 0x0(%esi),%esi ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 112268: 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( 11226a: 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 ( 112270: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 112276: 0f 8e b4 00 00 00 jle 112330 <== 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 ) ){ 11227c: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 112282: 0f 84 a8 00 00 00 je 112330 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 112288: 39 95 d4 fe ff ff cmp %edx,-0x12c(%ebp) 11228e: 7f d8 jg 112268 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 112290: 89 95 dc fe ff ff mov %edx,-0x124(%ebp) 112296: 89 d0 mov %edx,%eax 112298: c1 f8 1f sar $0x1f,%eax 11229b: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 1122a1: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 1122a8: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 1122aa: 8b 43 38 mov 0x38(%ebx),%eax 1122ad: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 1122b3: 8d 73 0c lea 0xc(%ebx),%esi 1122b6: 31 c0 xor %eax,%eax 1122b8: b9 ff ff ff ff mov $0xffffffff,%ecx 1122bd: 89 f7 mov %esi,%edi 1122bf: f2 ae repnz scas %es:(%edi),%al 1122c1: f7 d1 not %ecx 1122c3: 49 dec %ecx 1122c4: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 1122cb: 83 ec 08 sub $0x8,%esp 1122ce: 56 push %esi 1122cf: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax 1122d5: 50 push %eax 1122d6: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp) 1122dc: e8 43 18 00 00 call 113b24 memcpy( 1122e1: 8b 45 0c mov 0xc(%ebp),%eax 1122e4: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 1122ea: b9 44 00 00 00 mov $0x44,%ecx 1122ef: 89 c7 mov %eax,%edi 1122f1: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 1122f7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 1122f9: 8b 45 08 mov 0x8(%ebp),%eax 1122fc: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax) 112303: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 112307: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp) 11230e: 01 00 00 112311: 83 c4 10 add $0x10,%esp 112314: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx } the_node = the_node->next; 11231a: 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( 11231c: 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 ( 112322: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 112328: 0f 8f 4e ff ff ff jg 11227c <== NEVER TAKEN 11232e: 66 90 xchg %ax,%ax current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 112330: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax the_node = the_node->next; } /* Success */ return bytes_transferred; } 112336: 8d 65 f4 lea -0xc(%ebp),%esp 112339: 5b pop %ebx 11233a: 5e pop %esi 11233b: 5f pop %edi 11233c: c9 leave 11233d: c3 ret 11233e: 66 90 xchg %ax,%ax 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; 112340: 31 c0 xor %eax,%eax the_node = the_node->next; } /* Success */ return bytes_transferred; } 112342: 8d 65 f4 lea -0xc(%ebp),%esp 112345: 5b pop %ebx 112346: 5e pop %esi 112347: 5f pop %edi 112348: c9 leave 112349: c3 ret =============================================================================== 0011247c : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 11247c: 55 push %ebp 11247d: 89 e5 mov %esp,%ebp 11247f: 53 push %ebx 112480: 83 ec 04 sub $0x4,%esp 112483: 8b 45 0c mov 0xc(%ebp),%eax IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 112486: 8b 18 mov (%eax),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 112488: 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 ) ) 11248b: 39 53 50 cmp %edx,0x50(%ebx) 11248e: 75 44 jne 1124d4 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 112490: 8b 40 10 mov 0x10(%eax),%eax 112493: 3b 58 1c cmp 0x1c(%eax),%ebx 112496: 74 24 je 1124bc /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 112498: 8b 4b 5c mov 0x5c(%ebx),%ecx 11249b: 85 c9 test %ecx,%ecx 11249d: 75 1d jne 1124bc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 11249f: 83 ec 0c sub $0xc,%esp 1124a2: 53 push %ebx 1124a3: e8 00 cb ff ff call 10efa8 IMFS_check_node_remove( the_jnode ); 1124a8: 89 1c 24 mov %ebx,(%esp) 1124ab: e8 3c cb ff ff call 10efec return 0; 1124b0: 83 c4 10 add $0x10,%esp 1124b3: 31 c0 xor %eax,%eax } 1124b5: 8b 5d fc mov -0x4(%ebp),%ebx 1124b8: c9 leave 1124b9: c3 ret 1124ba: 66 90 xchg %ax,%ax /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 1124bc: e8 93 09 00 00 call 112e54 <__errno> 1124c1: c7 00 10 00 00 00 movl $0x10,(%eax) 1124c7: b8 ff ff ff ff mov $0xffffffff,%eax IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 1124cc: 8b 5d fc mov -0x4(%ebp),%ebx 1124cf: c9 leave 1124d0: c3 ret 1124d1: 8d 76 00 lea 0x0(%esi),%esi /* * 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 ); 1124d4: e8 7b 09 00 00 call 112e54 <__errno> 1124d9: c7 00 5a 00 00 00 movl $0x5a,(%eax) 1124df: b8 ff ff ff ff mov $0xffffffff,%eax 1124e4: eb cf jmp 1124b5 =============================================================================== 00107fb4 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 107fb4: 55 push %ebp 107fb5: 89 e5 mov %esp,%ebp 107fb7: 53 push %ebx 107fb8: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 107fbb: 80 3d 88 8e 12 00 00 cmpb $0x0,0x128e88 107fc2: 74 08 je 107fcc fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 107fc4: 8b 5d fc mov -0x4(%ebp),%ebx 107fc7: c9 leave 107fc8: c3 ret 107fc9: 8d 76 00 lea 0x0(%esi),%esi FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 107fcc: c6 05 88 8e 12 00 01 movb $0x1,0x128e88 mkdir("/etc", 0777); 107fd3: 83 ec 08 sub $0x8,%esp 107fd6: 68 ff 01 00 00 push $0x1ff 107fdb: 68 e8 26 12 00 push $0x1226e8 107fe0: e8 37 08 00 00 call 10881c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 107fe5: 59 pop %ecx 107fe6: 5b pop %ebx 107fe7: 68 32 13 12 00 push $0x121332 107fec: 68 ed 26 12 00 push $0x1226ed 107ff1: e8 9a c4 00 00 call 114490 107ff6: 83 c4 10 add $0x10,%esp 107ff9: 85 c0 test %eax,%eax 107ffb: 74 77 je 108074 fclose(fp); 107ffd: 83 ec 0c sub $0xc,%esp 108000: 50 push %eax 108001: e8 86 bd 00 00 call 113d8c 108006: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 108009: 83 ec 08 sub $0x8,%esp 10800c: 68 32 13 12 00 push $0x121332 108011: 68 f9 26 12 00 push $0x1226f9 108016: e8 75 c4 00 00 call 114490 10801b: 83 c4 10 add $0x10,%esp 10801e: 85 c0 test %eax,%eax 108020: 74 12 je 108034 fclose(fp); 108022: 83 ec 0c sub $0xc,%esp 108025: 50 push %eax 108026: e8 61 bd 00 00 call 113d8c 10802b: 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); } } 10802e: 8b 5d fc mov -0x4(%ebp),%ebx 108031: c9 leave 108032: c3 ret 108033: 90 nop * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 108034: 83 ec 08 sub $0x8,%esp 108037: 68 14 12 12 00 push $0x121214 10803c: 68 f9 26 12 00 push $0x1226f9 108041: e8 4a c4 00 00 call 114490 108046: 89 c3 mov %eax,%ebx 108048: 83 c4 10 add $0x10,%esp 10804b: 85 c0 test %eax,%eax 10804d: 0f 84 71 ff ff ff je 107fc4 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 108053: 50 push %eax 108054: 6a 2a push $0x2a 108056: 6a 01 push $0x1 108058: 68 6c 27 12 00 push $0x12276c 10805d: e8 02 cc 00 00 call 114c64 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 108062: 89 1c 24 mov %ebx,(%esp) 108065: e8 22 bd 00 00 call 113d8c 10806a: 83 c4 10 add $0x10,%esp 10806d: e9 52 ff ff ff jmp 107fc4 108072: 66 90 xchg %ax,%ax * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 108074: 83 ec 08 sub $0x8,%esp 108077: 68 14 12 12 00 push $0x121214 10807c: 68 ed 26 12 00 push $0x1226ed 108081: e8 0a c4 00 00 call 114490 108086: 89 c3 mov %eax,%ebx 108088: 83 c4 10 add $0x10,%esp 10808b: 85 c0 test %eax,%eax 10808d: 0f 84 76 ff ff ff je 108009 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 108093: 50 push %eax 108094: 6a 66 push $0x66 108096: 6a 01 push $0x1 108098: 68 04 27 12 00 push $0x122704 10809d: e8 c2 cb 00 00 call 114c64 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 1080a2: 89 1c 24 mov %ebx,(%esp) 1080a5: e8 e2 bc 00 00 call 113d8c 1080aa: 83 c4 10 add $0x10,%esp 1080ad: e9 57 ff ff ff jmp 108009 =============================================================================== 00109514 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 109514: 55 push %ebp 109515: 89 e5 mov %esp,%ebp 109517: 56 push %esi 109518: 53 push %ebx 109519: 89 d6 mov %edx,%esi 10951b: 88 c3 mov %al,%bl if (tty->termios.c_iflag & ISTRIP) 10951d: 8b 42 30 mov 0x30(%edx),%eax 109520: a8 20 test $0x20,%al 109522: 74 03 je 109527 <== ALWAYS TAKEN c &= 0x7f; 109524: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 109527: f6 c4 02 test $0x2,%ah 10952a: 74 18 je 109544 c = tolower (c); 10952c: 0f b6 db movzbl %bl,%ebx 10952f: 8b 15 14 55 12 00 mov 0x125514,%edx 109535: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx 10953a: 83 e2 03 and $0x3,%edx 10953d: 4a dec %edx 10953e: 0f 84 9c 00 00 00 je 1095e0 if (c == '\r') { 109544: 80 fb 0d cmp $0xd,%bl 109547: 74 33 je 10957c 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)) { 109549: 80 fb 0a cmp $0xa,%bl 10954c: 0f 84 86 00 00 00 je 1095d8 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 109552: 84 db test %bl,%bl 109554: 75 3a jne 109590 <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 109556: 8b 46 20 mov 0x20(%esi),%eax 109559: 8b 15 00 54 12 00 mov 0x125400,%edx 10955f: 4a dec %edx 109560: 39 d0 cmp %edx,%eax 109562: 7d 1c jge 109580 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 109564: f6 46 3c 08 testb $0x8,0x3c(%esi) 109568: 75 7e jne 1095e8 <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; 10956a: 8b 56 1c mov 0x1c(%esi),%edx 10956d: 88 1c 02 mov %bl,(%edx,%eax,1) 109570: 40 inc %eax 109571: 89 46 20 mov %eax,0x20(%esi) } return 0; 109574: 31 c0 xor %eax,%eax } 109576: 5b pop %ebx 109577: 5e pop %esi 109578: c9 leave 109579: c3 ret 10957a: 66 90 xchg %ax,%ax if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 10957c: a8 80 test $0x80,%al 10957e: 74 08 je 109588 <== ALWAYS TAKEN if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 109580: 31 c0 xor %eax,%eax } 109582: 5b pop %ebx <== NOT EXECUTED 109583: 5e pop %esi <== NOT EXECUTED 109584: c9 leave <== NOT EXECUTED 109585: c3 ret <== NOT EXECUTED 109586: 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) 109588: f6 c4 01 test $0x1,%ah 10958b: 74 03 je 109590 <== NEVER TAKEN c = '\n'; 10958d: b3 0a mov $0xa,%bl 10958f: 90 nop } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 109590: 8b 46 3c mov 0x3c(%esi),%eax 109593: a8 02 test $0x2,%al 109595: 74 bf je 109556 if (c == tty->termios.c_cc[VERASE]) { 109597: 38 5e 43 cmp %bl,0x43(%esi) 10959a: 0f 84 b0 00 00 00 je 109650 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 1095a0: 38 5e 44 cmp %bl,0x44(%esi) 1095a3: 74 63 je 109608 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 1095a5: 38 5e 45 cmp %bl,0x45(%esi) 1095a8: 0f 84 96 00 00 00 je 109644 <== NEVER TAKEN return 1; } else if (c == '\n') { 1095ae: 80 fb 0a cmp $0xa,%bl 1095b1: 74 69 je 10961c 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]) || 1095b3: 38 5e 4c cmp %bl,0x4c(%esi) 1095b6: 74 05 je 1095bd <== NEVER TAKEN 1095b8: 38 5e 51 cmp %bl,0x51(%esi) 1095bb: 75 99 jne 109556 <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 1095bd: a8 08 test $0x8,%al <== NOT EXECUTED 1095bf: 75 3b jne 1095fc <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 1095c1: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 1095c4: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 1095c7: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 1095ca: 40 inc %eax <== NOT EXECUTED 1095cb: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED return 1; 1095ce: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1095d3: eb a1 jmp 109576 <== NOT EXECUTED 1095d5: 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)) { 1095d8: a8 40 test $0x40,%al 1095da: 74 b4 je 109590 <== ALWAYS TAKEN c = '\r'; 1095dc: b3 0d mov $0xd,%bl <== NOT EXECUTED 1095de: eb b0 jmp 109590 <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 1095e0: 83 c3 20 add $0x20,%ebx 1095e3: e9 5c ff ff ff jmp 109544 /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 1095e8: 0f b6 c3 movzbl %bl,%eax 1095eb: 89 f2 mov %esi,%edx 1095ed: e8 f2 fc ff ff call 1092e4 1095f2: 8b 46 20 mov 0x20(%esi),%eax 1095f5: e9 70 ff ff ff jmp 10956a 1095fa: 66 90 xchg %ax,%ax 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); 1095fc: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 1095ff: 89 f2 mov %esi,%edx <== NOT EXECUTED 109601: e8 de fc ff ff call 1092e4 <== NOT EXECUTED 109606: eb b9 jmp 1095c1 <== 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); 109608: ba 01 00 00 00 mov $0x1,%edx 10960d: 89 f0 mov %esi,%eax 10960f: e8 34 fd ff ff call 109348 return 0; 109614: 31 c0 xor %eax,%eax 109616: e9 5b ff ff ff jmp 109576 10961b: 90 nop } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 10961c: a8 48 test $0x48,%al 10961e: 74 0c je 10962c <== NEVER TAKEN echo (c, tty); 109620: 89 f2 mov %esi,%edx 109622: b8 0a 00 00 00 mov $0xa,%eax 109627: e8 b8 fc ff ff call 1092e4 tty->cbuf[tty->ccount++] = c; 10962c: 8b 46 20 mov 0x20(%esi),%eax 10962f: 8b 56 1c mov 0x1c(%esi),%edx 109632: c6 04 02 0a movb $0xa,(%edx,%eax,1) 109636: 40 inc %eax 109637: 89 46 20 mov %eax,0x20(%esi) return 1; 10963a: b8 01 00 00 00 mov $0x1,%eax 10963f: e9 32 ff ff ff jmp 109576 else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 109644: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 109649: e9 28 ff ff ff jmp 109576 <== NOT EXECUTED 10964e: 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); 109650: 31 d2 xor %edx,%edx 109652: 89 f0 mov %esi,%eax 109654: e8 ef fc ff ff call 109348 return 0; 109659: 31 c0 xor %eax,%eax 10965b: e9 16 ff ff ff jmp 109576 =============================================================================== 00124518 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 124518: 55 push %ebp 124519: 89 e5 mov %esp,%ebp 12451b: 57 push %edi 12451c: 56 push %esi 12451d: 53 push %ebx 12451e: 83 ec 3c sub $0x3c,%esp 124521: 8b 75 0c mov 0xc(%ebp),%esi 124524: 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() ) 124527: e8 00 fd ff ff call 12422c 12452c: 3b 45 08 cmp 0x8(%ebp),%eax 12452f: 0f 85 3f 02 00 00 jne 124774 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 124535: 85 f6 test %esi,%esi 124537: 0f 84 4c 02 00 00 je 124789 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 12453d: 8d 4e ff lea -0x1(%esi),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 124540: 83 f9 1f cmp $0x1f,%ecx 124543: 0f 87 40 02 00 00 ja 124789 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 ) 124549: 8d 04 76 lea (%esi,%esi,2),%eax 12454c: 83 3c 85 a8 dc 12 00 cmpl $0x1,0x12dca8(,%eax,4) 124553: 01 124554: 0f 84 e6 01 00 00 je 124740 /* * 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 ) ) 12455a: 83 fe 08 cmp $0x8,%esi 12455d: 0f 84 c9 00 00 00 je 12462c 124563: 83 fe 04 cmp $0x4,%esi 124566: 0f 84 c0 00 00 00 je 12462c 12456c: 83 fe 0b cmp $0xb,%esi 12456f: 0f 84 b7 00 00 00 je 12462c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 124575: bb 01 00 00 00 mov $0x1,%ebx 12457a: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 12457c: 89 75 dc mov %esi,-0x24(%ebp) siginfo->si_code = SI_USER; 12457f: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 124586: 85 ff test %edi,%edi 124588: 0f 84 ba 01 00 00 je 124748 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 12458e: 8b 07 mov (%edi),%eax 124590: 89 45 e4 mov %eax,-0x1c(%ebp) 124593: a1 8c d6 12 00 mov 0x12d68c,%eax 124598: 40 inc %eax 124599: a3 8c d6 12 00 mov %eax,0x12d68c /* * 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; 12459e: 8b 0d 38 dc 12 00 mov 0x12dc38,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 1245a4: 8b 81 ec 00 00 00 mov 0xec(%ecx),%eax 1245aa: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 1245b0: f7 d0 not %eax 1245b2: 85 c3 test %eax,%ebx 1245b4: 75 34 jne 1245ea } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 1245b6: a1 40 de 12 00 mov 0x12de40,%eax /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 1245bb: 3d 44 de 12 00 cmp $0x12de44,%eax 1245c0: 75 1b jne 1245dd 1245c2: e9 81 00 00 00 jmp 124648 1245c7: 90 nop /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 1245c8: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx 1245ce: f7 d2 not %edx 1245d0: 85 d3 test %edx,%ebx 1245d2: 75 16 jne 1245ea the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 1245d4: 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 = _Chain_First( the_chain ); 1245d6: 3d 44 de 12 00 cmp $0x12de44,%eax 1245db: 74 6b je 124648 <== ALWAYS TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 1245dd: 89 c1 mov %eax,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1245df: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 1245e5: 85 58 30 test %ebx,0x30(%eax) 1245e8: 74 de je 1245c8 /* * 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 ) ) { 1245ea: 50 push %eax mask = signo_to_mask( sig ); /* * Build up a siginfo structure */ siginfo = &siginfo_struct; 1245eb: 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 ) ) { 1245ee: 50 push %eax 1245ef: 56 push %esi 1245f0: 51 push %ecx 1245f1: e8 d6 01 00 00 call 1247cc <_POSIX_signals_Unblock_thread> 1245f6: 83 c4 10 add $0x10,%esp 1245f9: 84 c0 test %al,%al 1245fb: 75 1f jne 12461c /* * 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 ); 1245fd: 83 ec 0c sub $0xc,%esp 124600: 53 push %ebx 124601: e8 b2 01 00 00 call 1247b8 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 124606: 8d 1c 76 lea (%esi,%esi,2),%ebx 124609: c1 e3 02 shl $0x2,%ebx 12460c: 83 c4 10 add $0x10,%esp 12460f: 83 bb a0 dc 12 00 02 cmpl $0x2,0x12dca0(%ebx) 124616: 0f 84 e4 00 00 00 je 124700 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 12461c: e8 ff d7 fe ff call 111e20 <_Thread_Enable_dispatch> return 0; 124621: 31 c0 xor %eax,%eax } 124623: 8d 65 f4 lea -0xc(%ebp),%esp 124626: 5b pop %ebx 124627: 5e pop %esi 124628: 5f pop %edi 124629: c9 leave 12462a: c3 ret 12462b: 90 nop * 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 ); 12462c: e8 77 03 00 00 call 1249a8 124631: 83 ec 08 sub $0x8,%esp 124634: 56 push %esi 124635: 50 push %eax 124636: e8 b1 02 00 00 call 1248ec 12463b: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 12463e: 8d 65 f4 lea -0xc(%ebp),%esp 124641: 5b pop %ebx 124642: 5e pop %esi 124643: 5f pop %edi 124644: c9 leave 124645: c3 ret 124646: 66 90 xchg %ax,%ax * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 124648: 0f b6 05 54 92 12 00 movzbl 0x129254,%eax 12464f: 40 inc %eax 124650: 89 45 d4 mov %eax,-0x2c(%ebp) * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 124653: 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++) { 12465a: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp) 124661: 89 5d d0 mov %ebx,-0x30(%ebp) 124664: 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 ] ) 124667: 8b 55 cc mov -0x34(%ebp),%edx 12466a: 8b 04 95 64 d6 12 00 mov 0x12d664(,%edx,4),%eax 124671: 85 c0 test %eax,%eax 124673: 74 68 je 1246dd <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 124675: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 124678: 0f b7 70 10 movzwl 0x10(%eax),%esi object_table = the_info->local_table; 12467c: 8b 78 1c mov 0x1c(%eax),%edi for ( index = 1 ; index <= maximum ; index++ ) { 12467f: 85 f6 test %esi,%esi 124681: 74 5a je 1246dd 124683: b8 01 00 00 00 mov $0x1,%eax the_thread = (Thread_Control *) object_table[ index ]; 124688: 8b 14 87 mov (%edi,%eax,4),%edx if ( !the_thread ) 12468b: 85 d2 test %edx,%edx 12468d: 74 49 je 1246d8 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 12468f: 8b 4a 14 mov 0x14(%edx),%ecx 124692: 3b 4d d4 cmp -0x2c(%ebp),%ecx 124695: 77 41 ja 1246d8 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 124697: 8b 9a ec 00 00 00 mov 0xec(%edx),%ebx 12469d: 8b 9b d0 00 00 00 mov 0xd0(%ebx),%ebx 1246a3: f7 d3 not %ebx 1246a5: 85 5d d0 test %ebx,-0x30(%ebp) 1246a8: 74 2e je 1246d8 * * 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 ) { 1246aa: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1246ad: 72 21 jb 1246d0 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 1246af: 8b 5d c8 mov -0x38(%ebp),%ebx 1246b2: 85 db test %ebx,%ebx 1246b4: 74 22 je 1246d8 <== NEVER TAKEN 1246b6: 8b 5d c8 mov -0x38(%ebp),%ebx 1246b9: 8b 5b 10 mov 0x10(%ebx),%ebx 1246bc: 89 5d c4 mov %ebx,-0x3c(%ebp) 1246bf: 85 db test %ebx,%ebx 1246c1: 74 15 je 1246d8 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 1246c3: 8b 5a 10 mov 0x10(%edx),%ebx 1246c6: 85 db test %ebx,%ebx 1246c8: 0f 85 86 00 00 00 jne 124754 1246ce: 66 90 xchg %ax,%ax 1246d0: 89 4d d4 mov %ecx,-0x2c(%ebp) 1246d3: 89 55 c8 mov %edx,-0x38(%ebp) 1246d6: 66 90 xchg %ax,%ax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 1246d8: 40 inc %eax 1246d9: 39 c6 cmp %eax,%esi 1246db: 73 ab jae 124688 * + 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++) { 1246dd: ff 45 cc incl -0x34(%ebp) 1246e0: 83 7d cc 04 cmpl $0x4,-0x34(%ebp) 1246e4: 75 81 jne 124667 1246e6: 8b 5d d0 mov -0x30(%ebp),%ebx 1246e9: 8b 75 c0 mov -0x40(%ebp),%esi } } } } if ( interested ) { 1246ec: 8b 55 c8 mov -0x38(%ebp),%edx 1246ef: 85 d2 test %edx,%edx 1246f1: 0f 84 06 ff ff ff je 1245fd 1246f7: 8b 4d c8 mov -0x38(%ebp),%ecx 1246fa: e9 eb fe ff ff jmp 1245ea 1246ff: 90 nop _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 ); 124700: 83 ec 0c sub $0xc,%esp 124703: 68 20 de 12 00 push $0x12de20 124708: e8 77 be fe ff call 110584 <_Chain_Get> if ( !psiginfo ) { 12470d: 83 c4 10 add $0x10,%esp 124710: 85 c0 test %eax,%eax 124712: 0f 84 86 00 00 00 je 12479e _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 124718: 8d 78 08 lea 0x8(%eax),%edi 12471b: 8d 75 dc lea -0x24(%ebp),%esi 12471e: b9 03 00 00 00 mov $0x3,%ecx 124723: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 124725: 83 ec 08 sub $0x8,%esp 124728: 50 push %eax 124729: 81 c3 c0 de 12 00 add $0x12dec0,%ebx 12472f: 53 push %ebx 124730: e8 13 be fe ff call 110548 <_Chain_Append> 124735: 83 c4 10 add $0x10,%esp 124738: e9 df fe ff ff jmp 12461c 12473d: 8d 76 00 lea 0x0(%esi),%esi /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) return 0; 124740: 31 c0 xor %eax,%eax 124742: e9 f7 fe ff ff jmp 12463e 124747: 90 nop */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 124748: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 12474f: e9 3f fe ff ff jmp 124593 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 124754: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp) 12475b: 0f 85 77 ff ff ff jne 1246d8 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 124761: 81 e3 00 00 00 10 and $0x10000000,%ebx 124767: 0f 84 6b ff ff ff je 1246d8 12476d: e9 5e ff ff ff jmp 1246d0 124772: 66 90 xchg %ax,%ax /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 124774: e8 23 38 ff ff call 117f9c <__errno> 124779: c7 00 03 00 00 00 movl $0x3,(%eax) 12477f: b8 ff ff ff ff mov $0xffffffff,%eax 124784: e9 b5 fe ff ff jmp 12463e */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 124789: e8 0e 38 ff ff call 117f9c <__errno> 12478e: c7 00 16 00 00 00 movl $0x16,(%eax) 124794: b8 ff ff ff ff mov $0xffffffff,%eax 124799: e9 a0 fe ff ff jmp 12463e 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(); 12479e: e8 7d d6 fe ff call 111e20 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 1247a3: e8 f4 37 ff ff call 117f9c <__errno> 1247a8: c7 00 0b 00 00 00 movl $0xb,(%eax) 1247ae: 83 c8 ff or $0xffffffff,%eax 1247b1: e9 88 fe ff ff jmp 12463e =============================================================================== 0011ed74 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11ed74: 55 push %ebp 11ed75: 89 e5 mov %esp,%ebp 11ed77: 53 push %ebx 11ed78: 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())) 11ed7b: 83 3d 80 79 12 00 03 cmpl $0x3,0x127980 11ed82: 74 08 je 11ed8c <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } 11ed84: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11ed87: c9 leave <== NOT EXECUTED 11ed88: c3 ret <== NOT EXECUTED 11ed89: 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) { 11ed8c: a1 20 55 12 00 mov 0x125520,%eax 11ed91: 8b 1d c0 19 12 00 mov 0x1219c0,%ebx 11ed97: 39 d8 cmp %ebx,%eax 11ed99: 74 14 je 11edaf _wrapup_reent(_global_impure_ptr); 11ed9b: 83 ec 0c sub $0xc,%esp 11ed9e: 53 push %ebx 11ed9f: e8 f8 05 00 00 call 11f39c <_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; 11eda4: 89 1d 20 55 12 00 mov %ebx,0x125520 11edaa: 83 c4 10 add $0x10,%esp 11edad: 89 d8 mov %ebx,%eax * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11edaf: 83 ec 0c sub $0xc,%esp 11edb2: ff 70 04 pushl 0x4(%eax) 11edb5: e8 f2 41 ff ff call 112fac fclose (stdout); 11edba: 5a pop %edx 11edbb: a1 20 55 12 00 mov 0x125520,%eax 11edc0: ff 70 08 pushl 0x8(%eax) 11edc3: e8 e4 41 ff ff call 112fac fclose (stderr); 11edc8: 58 pop %eax 11edc9: a1 20 55 12 00 mov 0x125520,%eax 11edce: ff 70 0c pushl 0xc(%eax) 11edd1: e8 d6 41 ff ff call 112fac 11edd6: 83 c4 10 add $0x10,%esp } 11edd9: 8b 5d fc mov -0x4(%ebp),%ebx 11eddc: c9 leave 11eddd: c3 ret =============================================================================== 0010aae8 : int link( const char *existing, const char *new ) { 10aae8: 55 push %ebp 10aae9: 89 e5 mov %esp,%ebp 10aaeb: 57 push %edi 10aaec: 56 push %esi 10aaed: 53 push %ebx 10aaee: 83 ec 58 sub $0x58,%esp 10aaf1: 8b 55 08 mov 0x8(%ebp),%edx 10aaf4: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 10aaf7: 31 c0 xor %eax,%eax 10aaf9: b9 ff ff ff ff mov $0xffffffff,%ecx 10aafe: 89 d7 mov %edx,%edi 10ab00: f2 ae repnz scas %es:(%edi),%al 10ab02: f7 d1 not %ecx 10ab04: 49 dec %ecx 10ab05: 6a 01 push $0x1 10ab07: 8d 75 cc lea -0x34(%ebp),%esi 10ab0a: 56 push %esi 10ab0b: 6a 00 push $0x0 10ab0d: 51 push %ecx 10ab0e: 52 push %edx 10ab0f: e8 28 f9 ff ff call 10a43c 0, &existing_loc, true ); if ( result != 0 ) 10ab14: 83 c4 20 add $0x20,%esp 10ab17: 85 c0 test %eax,%eax 10ab19: 74 0d je 10ab28 return -1; 10ab1b: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 10ab20: 8d 65 f4 lea -0xc(%ebp),%esp 10ab23: 5b pop %ebx 10ab24: 5e pop %esi 10ab25: 5f pop %edi 10ab26: c9 leave 10ab27: c3 ret /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 10ab28: 52 push %edx 10ab29: 8d 7d b8 lea -0x48(%ebp),%edi 10ab2c: 57 push %edi 10ab2d: 8d 45 e4 lea -0x1c(%ebp),%eax 10ab30: 50 push %eax 10ab31: 53 push %ebx 10ab32: e8 1d 13 00 00 call 10be54 result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 10ab37: 83 c4 0c add $0xc,%esp 10ab3a: 8d 45 e0 lea -0x20(%ebp),%eax 10ab3d: 50 push %eax 10ab3e: 57 push %edi 10ab3f: 03 5d e4 add -0x1c(%ebp),%ebx 10ab42: 53 push %ebx 10ab43: 8b 45 c4 mov -0x3c(%ebp),%eax 10ab46: ff 50 04 call *0x4(%eax) if ( result != 0 ) { 10ab49: 83 c4 10 add $0x10,%esp 10ab4c: 85 c0 test %eax,%eax 10ab4e: 75 61 jne 10abb1 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 10ab50: 8b 45 dc mov -0x24(%ebp),%eax 10ab53: 39 45 c8 cmp %eax,-0x38(%ebp) 10ab56: 75 30 jne 10ab88 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 ); 10ab58: 50 push %eax 10ab59: ff 75 e0 pushl -0x20(%ebp) 10ab5c: 57 push %edi 10ab5d: 56 push %esi 10ab5e: 8b 45 c4 mov -0x3c(%ebp),%eax 10ab61: ff 50 08 call *0x8(%eax) rtems_filesystem_freenode( &existing_loc ); 10ab64: 89 34 24 mov %esi,(%esp) 10ab67: 89 45 b4 mov %eax,-0x4c(%ebp) 10ab6a: e8 81 fb ff ff call 10a6f0 rtems_filesystem_freenode( &parent_loc ); 10ab6f: 89 3c 24 mov %edi,(%esp) 10ab72: e8 79 fb ff ff call 10a6f0 return result; 10ab77: 83 c4 10 add $0x10,%esp 10ab7a: 8b 45 b4 mov -0x4c(%ebp),%eax } 10ab7d: 8d 65 f4 lea -0xc(%ebp),%esp 10ab80: 5b pop %ebx 10ab81: 5e pop %esi 10ab82: 5f pop %edi 10ab83: c9 leave 10ab84: c3 ret 10ab85: 8d 76 00 lea 0x0(%esi),%esi * 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 ); 10ab88: 83 ec 0c sub $0xc,%esp 10ab8b: 56 push %esi 10ab8c: e8 5f fb ff ff call 10a6f0 rtems_filesystem_freenode( &parent_loc ); 10ab91: 89 3c 24 mov %edi,(%esp) 10ab94: e8 57 fb ff ff call 10a6f0 rtems_set_errno_and_return_minus_one( EXDEV ); 10ab99: e8 22 be 00 00 call 1169c0 <__errno> 10ab9e: c7 00 12 00 00 00 movl $0x12,(%eax) 10aba4: 83 c4 10 add $0x10,%esp 10aba7: b8 ff ff ff ff mov $0xffffffff,%eax 10abac: e9 6f ff ff ff jmp 10ab20 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 ); 10abb1: 83 ec 0c sub $0xc,%esp 10abb4: 56 push %esi 10abb5: e8 36 fb ff ff call 10a6f0 return -1; 10abba: 83 c4 10 add $0x10,%esp 10abbd: b8 ff ff ff ff mov $0xffffffff,%eax 10abc2: e9 59 ff ff ff jmp 10ab20 =============================================================================== 0011ec4c : off_t lseek( int fd, off_t offset, int whence ) { 11ec4c: 55 push %ebp 11ec4d: 89 e5 mov %esp,%ebp 11ec4f: 57 push %edi 11ec50: 56 push %esi 11ec51: 53 push %ebx 11ec52: 83 ec 1c sub $0x1c,%esp 11ec55: 8b 5d 08 mov 0x8(%ebp),%ebx 11ec58: 8b 55 0c mov 0xc(%ebp),%edx 11ec5b: 8b 4d 10 mov 0x10(%ebp),%ecx 11ec5e: 8b 45 14 mov 0x14(%ebp),%eax rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11ec61: 3b 1d 4c 34 12 00 cmp 0x12344c,%ebx 11ec67: 0f 83 b3 00 00 00 jae 11ed20 iop = rtems_libio_iop( fd ); 11ec6d: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 11ec74: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx 11ec7b: 29 f3 sub %esi,%ebx 11ec7d: 03 1d 80 76 12 00 add 0x127680,%ebx rtems_libio_check_is_open(iop); 11ec83: f6 43 15 01 testb $0x1,0x15(%ebx) 11ec87: 0f 84 93 00 00 00 je 11ed20 /* * Now process the lseek(). */ old_offset = iop->offset; 11ec8d: 8b 73 0c mov 0xc(%ebx),%esi 11ec90: 8b 7b 10 mov 0x10(%ebx),%edi 11ec93: 89 75 e0 mov %esi,-0x20(%ebp) 11ec96: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11ec99: 83 f8 01 cmp $0x1,%eax 11ec9c: 74 6e je 11ed0c 11ec9e: 83 f8 02 cmp $0x2,%eax 11eca1: 74 35 je 11ecd8 11eca3: 85 c0 test %eax,%eax 11eca5: 75 45 jne 11ecec case SEEK_SET: iop->offset = offset; 11eca7: 89 53 0c mov %edx,0xc(%ebx) 11ecaa: 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 ); 11ecad: 8b 73 20 mov 0x20(%ebx),%esi 11ecb0: 50 push %eax 11ecb1: 51 push %ecx 11ecb2: 52 push %edx 11ecb3: 53 push %ebx 11ecb4: ff 56 14 call *0x14(%esi) if ( status == (off_t) -1 ) 11ecb7: 83 c4 10 add $0x10,%esp 11ecba: 89 c1 mov %eax,%ecx 11ecbc: 21 d1 and %edx,%ecx 11ecbe: 41 inc %ecx 11ecbf: 75 0c jne 11eccd iop->offset = old_offset; 11ecc1: 8b 75 e0 mov -0x20(%ebp),%esi 11ecc4: 8b 7d e4 mov -0x1c(%ebp),%edi 11ecc7: 89 73 0c mov %esi,0xc(%ebx) 11ecca: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11eccd: 8d 65 f4 lea -0xc(%ebp),%esp 11ecd0: 5b pop %ebx 11ecd1: 5e pop %esi 11ecd2: 5f pop %edi 11ecd3: c9 leave 11ecd4: c3 ret 11ecd5: 8d 76 00 lea 0x0(%esi),%esi case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 11ecd8: 89 d6 mov %edx,%esi 11ecda: 89 cf mov %ecx,%edi 11ecdc: 03 73 04 add 0x4(%ebx),%esi 11ecdf: 13 7b 08 adc 0x8(%ebx),%edi 11ece2: 89 73 0c mov %esi,0xc(%ebx) 11ece5: 89 7b 10 mov %edi,0x10(%ebx) break; 11ece8: eb c3 jmp 11ecad 11ecea: 66 90 xchg %ax,%ax default: rtems_set_errno_and_return_minus_one( EINVAL ); 11ecec: e8 63 41 ff ff call 112e54 <__errno> 11ecf1: c7 00 16 00 00 00 movl $0x16,(%eax) 11ecf7: b8 ff ff ff ff mov $0xffffffff,%eax 11ecfc: ba ff ff ff ff mov $0xffffffff,%edx /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11ed01: 8d 65 f4 lea -0xc(%ebp),%esp 11ed04: 5b pop %ebx 11ed05: 5e pop %esi 11ed06: 5f pop %edi 11ed07: c9 leave 11ed08: c3 ret 11ed09: 8d 76 00 lea 0x0(%esi),%esi case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 11ed0c: 8b 75 e0 mov -0x20(%ebp),%esi 11ed0f: 8b 7d e4 mov -0x1c(%ebp),%edi 11ed12: 01 d6 add %edx,%esi 11ed14: 11 cf adc %ecx,%edi 11ed16: 89 73 0c mov %esi,0xc(%ebx) 11ed19: 89 7b 10 mov %edi,0x10(%ebx) break; 11ed1c: eb 8f jmp 11ecad 11ed1e: 66 90 xchg %ax,%ax off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 11ed20: e8 2f 41 ff ff call 112e54 <__errno> 11ed25: c7 00 09 00 00 00 movl $0x9,(%eax) 11ed2b: b8 ff ff ff ff mov $0xffffffff,%eax 11ed30: ba ff ff ff ff mov $0xffffffff,%edx 11ed35: eb 96 jmp 11eccd =============================================================================== 0010943c : int _STAT_NAME( const char *path, struct stat *buf ) { 10943c: 55 push %ebp 10943d: 89 e5 mov %esp,%ebp 10943f: 57 push %edi 109440: 56 push %esi 109441: 53 push %ebx 109442: 83 ec 3c sub $0x3c,%esp 109445: 8b 55 08 mov 0x8(%ebp),%edx 109448: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 10944b: 85 f6 test %esi,%esi 10944d: 74 65 je 1094b4 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 10944f: b9 ff ff ff ff mov $0xffffffff,%ecx 109454: 89 d7 mov %edx,%edi 109456: 31 c0 xor %eax,%eax 109458: f2 ae repnz scas %es:(%edi),%al 10945a: f7 d1 not %ecx 10945c: 49 dec %ecx 10945d: 83 ec 0c sub $0xc,%esp 109460: 6a 00 push $0x0 109462: 8d 5d d4 lea -0x2c(%ebp),%ebx 109465: 53 push %ebx 109466: 6a 00 push $0x0 109468: 51 push %ecx 109469: 52 push %edx 10946a: e8 e5 f9 ff ff call 108e54 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 10946f: 83 c4 20 add $0x20,%esp 109472: 85 c0 test %eax,%eax 109474: 74 0e je 109484 return -1; 109476: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10947b: 8d 65 f4 lea -0xc(%ebp),%esp 10947e: 5b pop %ebx 10947f: 5e pop %esi 109480: 5f pop %edi 109481: c9 leave 109482: c3 ret 109483: 90 nop /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 109484: b9 48 00 00 00 mov $0x48,%ecx 109489: 89 f7 mov %esi,%edi 10948b: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 10948d: 83 ec 08 sub $0x8,%esp 109490: 56 push %esi 109491: 53 push %ebx 109492: 8b 45 dc mov -0x24(%ebp),%eax 109495: ff 50 18 call *0x18(%eax) rtems_filesystem_freenode( &loc ); 109498: 89 1c 24 mov %ebx,(%esp) 10949b: 89 45 c4 mov %eax,-0x3c(%ebp) 10949e: e8 89 fa ff ff call 108f2c return status; 1094a3: 83 c4 10 add $0x10,%esp 1094a6: 8b 45 c4 mov -0x3c(%ebp),%eax } 1094a9: 8d 65 f4 lea -0xc(%ebp),%esp 1094ac: 5b pop %ebx 1094ad: 5e pop %esi 1094ae: 5f pop %edi 1094af: c9 leave 1094b0: c3 ret 1094b1: 8d 76 00 lea 0x0(%esi),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 1094b4: e8 ff ba 00 00 call 114fb8 <__errno> 1094b9: c7 00 0e 00 00 00 movl $0xe,(%eax) 1094bf: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 1094c4: 8d 65 f4 lea -0xc(%ebp),%esp 1094c7: 5b pop %ebx 1094c8: 5e pop %esi 1094c9: 5f pop %edi 1094ca: c9 leave 1094cb: c3 ret =============================================================================== 00107908 : #include "malloc_p.h" void *malloc( size_t size ) { 107908: 55 push %ebp 107909: 89 e5 mov %esp,%ebp 10790b: 56 push %esi 10790c: 53 push %ebx 10790d: 8b 75 08 mov 0x8(%ebp),%esi void *return_this; MSBUMP(malloc_calls, 1); 107910: ff 05 a4 76 12 00 incl 0x1276a4 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 107916: e8 fd fe ff ff call 107818 /* * Validate the parameters */ if ( !size ) 10791b: 85 f6 test %esi,%esi 10791d: 74 5d je 10797c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 10791f: 83 3d 80 79 12 00 03 cmpl $0x3,0x127980 107926: 74 48 je 107970 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 107928: 6a 00 push $0x0 10792a: 6a 00 push $0x0 10792c: 56 push %esi 10792d: ff 35 90 34 12 00 pushl 0x123490 107933: e8 84 4b 00 00 call 10c4bc <_Protected_heap_Allocate_aligned_with_boundary> 107938: 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 ) { 10793a: 83 c4 10 add $0x10,%esp 10793d: 85 c0 test %eax,%eax 10793f: 74 47 je 107988 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 107941: a1 70 5a 12 00 mov 0x125a70,%eax 107946: 85 c0 test %eax,%eax 107948: 74 0a je 107954 (*rtems_malloc_dirty_helper)( return_this, size ); 10794a: 83 ec 08 sub $0x8,%esp 10794d: 56 push %esi 10794e: 53 push %ebx 10794f: ff d0 call *%eax 107951: 83 c4 10 add $0x10,%esp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 107954: a1 68 5a 12 00 mov 0x125a68,%eax 107959: 85 c0 test %eax,%eax 10795b: 74 0a je 107967 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 10795d: 83 ec 0c sub $0xc,%esp 107960: 53 push %ebx 107961: ff 50 04 call *0x4(%eax) 107964: 83 c4 10 add $0x10,%esp return return_this; } 107967: 89 d8 mov %ebx,%eax 107969: 8d 65 f8 lea -0x8(%ebp),%esp 10796c: 5b pop %ebx 10796d: 5e pop %esi 10796e: c9 leave 10796f: 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() ) 107970: e8 63 fe ff ff call 1077d8 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 107975: 84 c0 test %al,%al 107977: 75 af jne 107928 <== ALWAYS TAKEN 107979: 8d 76 00 lea 0x0(%esi),%esi !malloc_is_system_state_OK() ) return NULL; 10797c: 31 db xor %ebx,%ebx */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 10797e: 89 d8 mov %ebx,%eax 107980: 8d 65 f8 lea -0x8(%ebp),%esp 107983: 5b pop %ebx 107984: 5e pop %esi 107985: c9 leave 107986: c3 ret 107987: 90 nop */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 107988: a1 6c 5a 12 00 mov 0x125a6c,%eax 10798d: 85 c0 test %eax,%eax 10798f: 74 12 je 1079a3 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 107991: 83 ec 0c sub $0xc,%esp 107994: 56 push %esi 107995: ff 50 04 call *0x4(%eax) if ( !return_this ) { 107998: 83 c4 10 add $0x10,%esp 10799b: 85 c0 test %eax,%eax 10799d: 74 04 je 1079a3 10799f: 89 c3 mov %eax,%ebx 1079a1: eb 9e jmp 107941 errno = ENOMEM; 1079a3: e8 ac b4 00 00 call 112e54 <__errno> 1079a8: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 1079ae: eb b7 jmp 107967 =============================================================================== 0010787c : #include "malloc_p.h" int malloc_get_statistics( rtems_malloc_statistics_t *stats ) { 10787c: 55 push %ebp 10787d: 89 e5 mov %esp,%ebp 10787f: 57 push %edi 107880: 56 push %esi 107881: 53 push %ebx 107882: 83 ec 0c sub $0xc,%esp 107885: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !stats ) 107888: 85 db test %ebx,%ebx 10788a: 74 38 je 1078c4 return -1; _RTEMS_Lock_allocator(); 10788c: 83 ec 0c sub $0xc,%esp 10788f: ff 35 e0 77 12 00 pushl 0x1277e0 107895: e8 ee 3b 00 00 call 10b488 <_API_Mutex_Lock> *stats = rtems_malloc_statistics; 10789a: be e0 75 12 00 mov $0x1275e0,%esi 10789f: b9 0b 00 00 00 mov $0xb,%ecx 1078a4: 89 df mov %ebx,%edi 1078a6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _RTEMS_Unlock_allocator(); 1078a8: 58 pop %eax 1078a9: ff 35 e0 77 12 00 pushl 0x1277e0 1078af: e8 1c 3c 00 00 call 10b4d0 <_API_Mutex_Unlock> return 0; 1078b4: 83 c4 10 add $0x10,%esp 1078b7: 31 c0 xor %eax,%eax } 1078b9: 8d 65 f4 lea -0xc(%ebp),%esp 1078bc: 5b pop %ebx 1078bd: 5e pop %esi 1078be: 5f pop %edi 1078bf: c9 leave 1078c0: c3 ret 1078c1: 8d 76 00 lea 0x0(%esi),%esi int malloc_get_statistics( rtems_malloc_statistics_t *stats ) { if ( !stats ) return -1; 1078c4: b8 ff ff ff ff mov $0xffffffff,%eax _RTEMS_Lock_allocator(); *stats = rtems_malloc_statistics; _RTEMS_Unlock_allocator(); return 0; } 1078c9: 8d 65 f4 lea -0xc(%ebp),%esp 1078cc: 5b pop %ebx 1078cd: 5e pop %esi 1078ce: 5f pop %edi 1078cf: c9 leave 1078d0: c3 ret =============================================================================== 00107c9c : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 107c9c: 55 push %ebp 107c9d: 89 e5 mov %esp,%ebp 107c9f: 56 push %esi 107ca0: 53 push %ebx 107ca1: 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; 107ca4: 8b 0d 4c 7e 12 00 mov 0x127e4c,%ecx if ( sbrk_amount == 0 ) 107caa: 85 c9 test %ecx,%ecx 107cac: 75 0a jne 107cb8 <== 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; 107cae: 31 c0 xor %eax,%eax MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 107cb0: 8d 65 f8 lea -0x8(%ebp),%esp 107cb3: 5b pop %ebx 107cb4: 5e pop %esi 107cb5: c9 leave 107cb6: c3 ret 107cb7: 90 nop sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 107cb8: 8d 04 0e lea (%esi,%ecx,1),%eax 107cbb: 31 d2 xor %edx,%edx 107cbd: f7 f1 div %ecx 107cbf: 89 c3 mov %eax,%ebx 107cc1: 0f af d9 imul %ecx,%ebx starting_address = (void *) sbrk(the_size); 107cc4: 83 ec 0c sub $0xc,%esp 107cc7: 53 push %ebx 107cc8: e8 8f 87 ff ff call 10045c if ( starting_address == (void*) -1 ) 107ccd: 83 c4 10 add $0x10,%esp 107cd0: 83 f8 ff cmp $0xffffffff,%eax 107cd3: 74 d9 je 107cae return (void *) 0; if ( !_Protected_heap_Extend( 107cd5: 52 push %edx 107cd6: 53 push %ebx 107cd7: 50 push %eax 107cd8: ff 35 b0 3a 12 00 pushl 0x123ab0 107cde: e8 15 4b 00 00 call 10c7f8 <_Protected_heap_Extend> 107ce3: 83 c4 10 add $0x10,%esp 107ce6: 84 c0 test %al,%al 107ce8: 74 1b je 107d05 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); 107cea: 01 1d 20 7e 12 00 add %ebx,0x127e20 107cf0: 6a 00 push $0x0 107cf2: 6a 00 push $0x0 107cf4: 56 push %esi 107cf5: ff 35 b0 3a 12 00 pushl 0x123ab0 107cfb: e8 c0 4a 00 00 call 10c7c0 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 107d00: 83 c4 10 add $0x10,%esp 107d03: eb ab jmp 107cb0 if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 107d05: 83 ec 0c sub $0xc,%esp 107d08: f7 db neg %ebx 107d0a: 53 push %ebx 107d0b: e8 4c 87 ff ff call 10045c errno = ENOMEM; 107d10: e8 33 b7 00 00 call 113448 <__errno> 107d15: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 107d1b: 83 c4 10 add $0x10,%esp 107d1e: 31 c0 xor %eax,%eax 107d20: eb 8e jmp 107cb0 =============================================================================== 0011191c : */ void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 11191c: 55 push %ebp 11191d: 89 e5 mov %esp,%ebp 11191f: 57 push %edi 111920: 56 push %esi 111921: 53 push %ebx 111922: 83 ec 0c sub $0xc,%esp 111925: 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; 111928: 8b 45 08 mov 0x8(%ebp),%eax 11192b: 8b 30 mov (%eax),%esi for ( i=0 ; i<== NEVER TAKEN 111931: 31 db xor %ebx,%ebx 111933: 90 nop if ( b[i] ) { 111934: 8b 04 9e mov (%esi,%ebx,4),%eax 111937: 85 c0 test %eax,%eax 111939: 74 13 je 11194e memfile_free_block( b[i] ); 11193b: 83 ec 0c sub $0xc,%esp 11193e: 50 push %eax 11193f: e8 bc ff ff ff call 111900 b[i] = 0; 111944: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4) 11194b: 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 111953: 8b 45 08 mov 0x8(%ebp),%eax 111956: 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 ); 111958: 83 ec 0c sub $0xc,%esp 11195b: 56 push %esi 11195c: e8 9f ff ff ff call 111900 *block_table = 0; 111961: 8b 45 08 mov 0x8(%ebp),%eax 111964: c7 00 00 00 00 00 movl $0x0,(%eax) 11196a: 83 c4 10 add $0x10,%esp } 11196d: 8d 65 f4 lea -0xc(%ebp),%esp 111970: 5b pop %ebx 111971: 5e pop %esi 111972: 5f pop %edi 111973: c9 leave 111974: c3 ret =============================================================================== 00111e98 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 111e98: 55 push %ebp 111e99: 89 e5 mov %esp,%ebp 111e9b: 53 push %ebx 111e9c: 83 ec 14 sub $0x14,%esp 111e9f: 8b 4d 08 mov 0x8(%ebp),%ecx 111ea2: 8b 45 0c mov 0xc(%ebp),%eax 111ea5: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 111ea8: 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 ) 111eab: 39 53 54 cmp %edx,0x54(%ebx) 111eae: 7f 19 jg 111ec9 <== NEVER TAKEN 111eb0: 7d 12 jge 111ec4 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 111eb2: 51 push %ecx 111eb3: 52 push %edx 111eb4: 50 push %eax 111eb5: 53 push %ebx 111eb6: e8 45 fc ff ff call 111b00 111ebb: 83 c4 10 add $0x10,%esp iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 111ebe: 8b 5d fc mov -0x4(%ebp),%ebx 111ec1: c9 leave 111ec2: c3 ret 111ec3: 90 nop * 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 ) 111ec4: 39 43 50 cmp %eax,0x50(%ebx) 111ec7: 72 e9 jb 111eb2 /* * 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; 111ec9: 89 43 50 mov %eax,0x50(%ebx) 111ecc: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 111ecf: 89 41 04 mov %eax,0x4(%ecx) 111ed2: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 111ed5: 83 ec 08 sub $0x8,%esp 111ed8: 6a 00 push $0x0 111eda: 8d 45 f0 lea -0x10(%ebp),%eax 111edd: 50 push %eax 111ede: e8 cd 57 ff ff call 1076b0 111ee3: 8b 45 f0 mov -0x10(%ebp),%eax 111ee6: 89 43 40 mov %eax,0x40(%ebx) return 0; 111ee9: 83 c4 10 add $0x10,%esp 111eec: 31 c0 xor %eax,%eax } 111eee: 8b 5d fc mov -0x4(%ebp),%ebx 111ef1: c9 leave 111ef2: c3 ret =============================================================================== 00111ef4 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 111ef4: 55 push %ebp 111ef5: 89 e5 mov %esp,%ebp 111ef7: 57 push %edi 111ef8: 56 push %esi 111ef9: 53 push %ebx 111efa: 83 ec 0c sub $0xc,%esp 111efd: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 111f00: 8b 73 18 mov 0x18(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 111f03: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 111f07: 74 2f je 111f38 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 )) 111f09: 57 push %edi 111f0a: ff 73 10 pushl 0x10(%ebx) 111f0d: ff 73 0c pushl 0xc(%ebx) 111f10: 56 push %esi 111f11: e8 ea fb ff ff call 111b00 111f16: 83 c4 10 add $0x10,%esp 111f19: 85 c0 test %eax,%eax 111f1b: 75 45 jne 111f62 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 111f1d: 8b 46 50 mov 0x50(%esi),%eax 111f20: 8b 56 54 mov 0x54(%esi),%edx 111f23: 89 43 04 mov %eax,0x4(%ebx) 111f26: 89 53 08 mov %edx,0x8(%ebx) 111f29: 8b 43 0c mov 0xc(%ebx),%eax 111f2c: 8b 53 10 mov 0x10(%ebx),%edx } return iop->offset; } 111f2f: 8d 65 f4 lea -0xc(%ebp),%esp 111f32: 5b pop %ebx 111f33: 5e pop %esi 111f34: 5f pop %edi 111f35: c9 leave 111f36: c3 ret 111f37: 90 nop 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) 111f38: 8b 43 0c mov 0xc(%ebx),%eax 111f3b: 8b 53 10 mov 0x10(%ebx),%edx 111f3e: 8b 7e 50 mov 0x50(%esi),%edi 111f41: 8b 4e 54 mov 0x54(%esi),%ecx 111f44: 39 ca cmp %ecx,%edx 111f46: 7c e7 jl 111f2f <== NEVER TAKEN 111f48: 7e 12 jle 111f5c <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; 111f4a: 89 7b 0c mov %edi,0xc(%ebx) <== NOT EXECUTED 111f4d: 89 4b 10 mov %ecx,0x10(%ebx) <== NOT EXECUTED 111f50: 89 f8 mov %edi,%eax <== NOT EXECUTED 111f52: 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; } 111f54: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111f57: 5b pop %ebx <== NOT EXECUTED 111f58: 5e pop %esi <== NOT EXECUTED 111f59: 5f pop %edi <== NOT EXECUTED 111f5a: c9 leave <== NOT EXECUTED 111f5b: 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) 111f5c: 39 f8 cmp %edi,%eax 111f5e: 76 cf jbe 111f2f <== ALWAYS TAKEN 111f60: eb e8 jmp 111f4a <== 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 ); 111f62: e8 ed 0e 00 00 call 112e54 <__errno> 111f67: c7 00 1c 00 00 00 movl $0x1c,(%eax) 111f6d: b8 ff ff ff ff mov $0xffffffff,%eax 111f72: ba ff ff ff ff mov $0xffffffff,%edx 111f77: eb b6 jmp 111f2f =============================================================================== 00111df0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 111df0: 55 push %ebp 111df1: 89 e5 mov %esp,%ebp 111df3: 56 push %esi 111df4: 53 push %ebx 111df5: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 111df8: 8b 73 18 mov 0x18(%ebx),%esi /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 111dfb: 8b 43 14 mov 0x14(%ebx),%eax 111dfe: a9 04 02 00 00 test $0x204,%eax 111e03: 74 06 je 111e0b && (the_jnode->type == IMFS_LINEAR_FILE)) { 111e05: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 111e09: 74 2d je 111e38 <== 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)) 111e0b: 8b 56 50 mov 0x50(%esi),%edx 111e0e: 8b 4e 54 mov 0x54(%esi),%ecx return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 111e11: f6 c4 02 test $0x2,%ah 111e14: 75 12 jne 111e28 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 111e16: 89 53 04 mov %edx,0x4(%ebx) 111e19: 89 4b 08 mov %ecx,0x8(%ebx) return 0; 111e1c: 31 c0 xor %eax,%eax } 111e1e: 8d 65 f8 lea -0x8(%ebp),%esp 111e21: 5b pop %ebx 111e22: 5e pop %esi 111e23: c9 leave 111e24: c3 ret 111e25: 8d 76 00 lea 0x0(%esi),%esi 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; 111e28: 89 53 0c mov %edx,0xc(%ebx) 111e2b: 89 4b 10 mov %ecx,0x10(%ebx) 111e2e: 8b 56 50 mov 0x50(%esi),%edx 111e31: 8b 4e 54 mov 0x54(%esi),%ecx 111e34: eb e0 jmp 111e16 111e36: 66 90 xchg %ax,%ax /* * 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; 111e38: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 111e3b: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 111e3e: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED the_jnode->info.file.size = 0; 111e45: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED 111e4c: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 111e53: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 111e5a: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 111e61: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED if ((count != 0) 111e68: 85 c0 test %eax,%eax <== NOT EXECUTED 111e6a: 75 09 jne 111e75 <== NOT EXECUTED 111e6c: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111e6f: 31 d2 xor %edx,%edx <== NOT EXECUTED 111e71: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 111e73: eb 9c jmp 111e11 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 111e75: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111e78: 50 push %eax <== NOT EXECUTED 111e79: 52 push %edx <== NOT EXECUTED 111e7a: 6a 00 push $0x0 <== NOT EXECUTED 111e7c: 6a 00 push $0x0 <== NOT EXECUTED 111e7e: 56 push %esi <== NOT EXECUTED 111e7f: e8 94 fd ff ff call 111c18 <== NOT EXECUTED 111e84: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 111e87: 40 inc %eax <== NOT EXECUTED 111e88: 74 08 je 111e92 <== NOT EXECUTED 111e8a: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111e8d: e9 79 ff ff ff jmp 111e0b <== NOT EXECUTED return -1; 111e92: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 111e95: eb 87 jmp 111e1e <== NOT EXECUTED =============================================================================== 001079cc : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1079cc: 55 push %ebp 1079cd: 89 e5 mov %esp,%ebp 1079cf: 57 push %edi 1079d0: 56 push %esi 1079d1: 53 push %ebx 1079d2: 83 ec 3c sub $0x3c,%esp 1079d5: 8b 7d 08 mov 0x8(%ebp),%edi 1079d8: 8b 5d 0c mov 0xc(%ebp),%ebx 1079db: 8b 55 10 mov 0x10(%ebp),%edx 1079de: 8b 4d 14 mov 0x14(%ebp),%ecx int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 1079e1: 89 d8 mov %ebx,%eax 1079e3: 25 00 f0 00 00 and $0xf000,%eax 1079e8: 3d 00 40 00 00 cmp $0x4000,%eax 1079ed: 74 39 je 107a28 1079ef: 76 27 jbe 107a18 1079f1: 3d 00 60 00 00 cmp $0x6000,%eax 1079f6: 74 30 je 107a28 1079f8: 3d 00 80 00 00 cmp $0x8000,%eax 1079fd: 74 29 je 107a28 <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1079ff: e8 50 b4 00 00 call 112e54 <__errno> 107a04: c7 00 16 00 00 00 movl $0x16,(%eax) 107a0a: 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; } 107a0f: 8d 65 f4 lea -0xc(%ebp),%esp 107a12: 5b pop %ebx 107a13: 5e pop %esi 107a14: 5f pop %edi 107a15: c9 leave 107a16: c3 ret 107a17: 90 nop int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 107a18: 3d 00 10 00 00 cmp $0x1000,%eax 107a1d: 74 09 je 107a28 107a1f: 3d 00 20 00 00 cmp $0x2000,%eax 107a24: 75 d9 jne 1079ff 107a26: 66 90 xchg %ax,%ax break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 107a28: 50 push %eax 107a29: 8d 75 cc lea -0x34(%ebp),%esi 107a2c: 56 push %esi 107a2d: 8d 45 e4 lea -0x1c(%ebp),%eax 107a30: 50 push %eax 107a31: 57 push %edi 107a32: 89 55 c4 mov %edx,-0x3c(%ebp) 107a35: 89 4d c0 mov %ecx,-0x40(%ebp) 107a38: e8 1f 0a 00 00 call 10845c result = (*temp_loc.ops->evalformake_h)( 107a3d: 83 c4 0c add $0xc,%esp 107a40: 8d 45 e0 lea -0x20(%ebp),%eax 107a43: 50 push %eax 107a44: 56 push %esi 107a45: 03 7d e4 add -0x1c(%ebp),%edi 107a48: 57 push %edi 107a49: 8b 45 d8 mov -0x28(%ebp),%eax 107a4c: ff 50 04 call *0x4(%eax) &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 107a4f: 83 c4 10 add $0x10,%esp 107a52: 85 c0 test %eax,%eax 107a54: 8b 55 c4 mov -0x3c(%ebp),%edx 107a57: 8b 4d c0 mov -0x40(%ebp),%ecx 107a5a: 74 10 je 107a6c return -1; 107a5c: 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; } 107a61: 8d 65 f4 lea -0xc(%ebp),%esp 107a64: 5b pop %ebx 107a65: 5e pop %esi 107a66: 5f pop %edi 107a67: c9 leave 107a68: c3 ret 107a69: 8d 76 00 lea 0x0(%esi),%esi &name_start ); if ( result != 0 ) return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 107a6c: 83 ec 0c sub $0xc,%esp 107a6f: 56 push %esi 107a70: 51 push %ecx 107a71: 52 push %edx 107a72: 53 push %ebx 107a73: ff 75 e0 pushl -0x20(%ebp) 107a76: 8b 45 d8 mov -0x28(%ebp),%eax 107a79: ff 50 14 call *0x14(%eax) rtems_filesystem_freenode( &temp_loc ); 107a7c: 83 c4 14 add $0x14,%esp 107a7f: 56 push %esi 107a80: 89 45 c4 mov %eax,-0x3c(%ebp) 107a83: e8 98 fb ff ff call 107620 return result; 107a88: 83 c4 10 add $0x10,%esp 107a8b: 8b 45 c4 mov -0x3c(%ebp),%eax } 107a8e: 8d 65 f4 lea -0xc(%ebp),%esp 107a91: 5b pop %ebx 107a92: 5e pop %esi 107a93: 5f pop %edi 107a94: c9 leave 107a95: c3 ret =============================================================================== 00107b1c : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 107b1c: 55 push %ebp 107b1d: 89 e5 mov %esp,%ebp 107b1f: 57 push %edi 107b20: 56 push %esi 107b21: 53 push %ebx 107b22: 83 ec 4c sub $0x4c,%esp 107b25: 8b 75 10 mov 0x10(%ebp),%esi /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 107b28: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 107b2c: 0f 87 36 02 00 00 ja 107d68 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 107b32: 83 ec 0c sub $0xc,%esp 107b35: 56 push %esi 107b36: e8 51 7b 00 00 call 10f68c 107b3b: 89 45 b8 mov %eax,-0x48(%ebp) if ( !mount_h ) 107b3e: 83 c4 10 add $0x10,%esp 107b41: 85 c0 test %eax,%eax 107b43: 0f 84 1f 02 00 00 je 107d68 { 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; 107b49: 8b 45 0c mov 0xc(%ebp),%eax 107b4c: 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 : "/"; 107b4e: 0f 95 45 b7 setne -0x49(%ebp) 107b52: 0f 84 e8 01 00 00 je 107d40 * 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( 107b58: 31 c0 xor %eax,%eax 107b5a: b9 ff ff ff ff mov $0xffffffff,%ecx 107b5f: 8b 7d 0c mov 0xc(%ebp),%edi 107b62: f2 ae repnz scas %es:(%edi),%al 107b64: f7 d1 not %ecx 107b66: 8d 41 ff lea -0x1(%ecx),%eax 107b69: 89 45 ac mov %eax,-0x54(%ebp) 107b6c: 89 4d bc mov %ecx,-0x44(%ebp) 107b6f: 8b 55 0c mov 0xc(%ebp),%edx 107b72: 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; 107b75: ba ff ff ff ff mov $0xffffffff,%edx 107b7a: 31 c0 xor %eax,%eax 107b7c: 89 d1 mov %edx,%ecx 107b7e: 89 f7 mov %esi,%edi 107b80: f2 ae repnz scas %es:(%edi),%al 107b82: f7 d1 not %ecx 107b84: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 107b87: 8b 7d 08 mov 0x8(%ebp),%edi 107b8a: 85 ff test %edi,%edi 107b8c: 0f 84 ca 01 00 00 je 107d5c 107b92: 89 d1 mov %edx,%ecx 107b94: 8b 7d 08 mov 0x8(%ebp),%edi 107b97: f2 ae repnz scas %es:(%edi),%al 107b99: f7 d1 not %ecx 107b9b: 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 ); 107b9e: 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; 107ba1: 8b 55 bc mov -0x44(%ebp),%edx 107ba4: 8b 7d c4 mov -0x3c(%ebp),%edi 107ba7: 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 ) 107bab: 03 45 c0 add -0x40(%ebp),%eax + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 107bae: 50 push %eax 107baf: 6a 01 push $0x1 107bb1: e8 ee f8 ff ff call 1074a4 107bb6: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 107bb8: 83 c4 10 add $0x10,%esp 107bbb: 85 c0 test %eax,%eax 107bbd: 0f 84 65 01 00 00 je 107d28 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 107bc3: 8d 40 74 lea 0x74(%eax),%eax memcpy( str, filesystemtype, filesystemtype_size ); 107bc6: 89 c7 mov %eax,%edi 107bc8: 8b 4d c4 mov -0x3c(%ebp),%ecx 107bcb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 107bcd: 89 fa mov %edi,%edx mt_entry->type = str; 107bcf: 89 43 6c mov %eax,0x6c(%ebx) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 107bd2: 8b 75 08 mov 0x8(%ebp),%esi 107bd5: 8b 4d c0 mov -0x40(%ebp),%ecx 107bd8: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 107bda: 89 f8 mov %edi,%eax mt_entry->dev = str; 107bdc: 89 53 70 mov %edx,0x70(%ebx) str += source_size; memcpy( str, target, target_size ); 107bdf: 8b 75 b0 mov -0x50(%ebp),%esi 107be2: 8b 4d bc mov -0x44(%ebp),%ecx 107be5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) mt_entry->target = str; 107be7: 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; 107bea: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 107bed: 8b 45 14 mov 0x14(%ebp),%eax 107bf0: 89 43 30 mov %eax,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 107bf3: 8d 7b 38 lea 0x38(%ebx),%edi 107bf6: be 40 0e 12 00 mov $0x120e40,%esi 107bfb: b1 0c mov $0xc,%cl 107bfd: 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 ) { 107bff: 80 7d b7 00 cmpb $0x0,-0x49(%ebp) 107c03: 0f 85 83 00 00 00 jne 107c8c } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 107c09: 81 3d e4 52 12 00 e8 cmpl $0x1252e8,0x1252e4 107c10: 52 12 00 107c13: 0f 85 67 01 00 00 jne 107d80 <== 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; 107c19: 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 ) ) { 107c1b: 83 ec 08 sub $0x8,%esp 107c1e: ff 75 18 pushl 0x18(%ebp) 107c21: 53 push %ebx 107c22: ff 55 b8 call *-0x48(%ebp) 107c25: 83 c4 10 add $0x10,%esp 107c28: 85 c0 test %eax,%eax 107c2a: 0f 85 74 01 00 00 jne 107da4 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 ); 107c30: 56 push %esi 107c31: 6a 00 push $0x0 107c33: 6a 00 push $0x0 107c35: ff 35 88 76 12 00 pushl 0x127688 107c3b: e8 68 2f 00 00 call 10aba8 107c40: 5a pop %edx 107c41: 59 pop %ecx 107c42: 53 push %ebx 107c43: 68 e4 52 12 00 push $0x1252e4 107c48: e8 83 38 00 00 call 10b4d0 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 107c4d: 58 pop %eax 107c4e: ff 35 88 76 12 00 pushl 0x127688 107c54: e8 4b 30 00 00 call 10aca4 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 107c59: 83 c4 10 add $0x10,%esp 107c5c: 80 7d b7 00 cmpb $0x0,-0x49(%ebp) 107c60: 74 0a je 107c6c rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 107c62: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 107c64: 8d 65 f4 lea -0xc(%ebp),%esp 107c67: 5b pop %ebx 107c68: 5e pop %esi 107c69: 5f pop %edi 107c6a: c9 leave 107c6b: 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; 107c6c: 8b 3d 10 54 12 00 mov 0x125410,%edi 107c72: 83 c7 18 add $0x18,%edi 107c75: 8d 73 1c lea 0x1c(%ebx),%esi 107c78: b9 05 00 00 00 mov $0x5,%ecx 107c7d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 107c7f: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 107c81: 8d 65 f4 lea -0xc(%ebp),%esp 107c84: 5b pop %ebx 107c85: 5e pop %esi 107c86: 5f pop %edi 107c87: c9 leave 107c88: c3 ret 107c89: 8d 76 00 lea 0x0(%esi),%esi * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 107c8c: 83 ec 0c sub $0xc,%esp 107c8f: 6a 01 push $0x1 107c91: 8d 75 d4 lea -0x2c(%ebp),%esi 107c94: 56 push %esi 107c95: 6a 07 push $0x7 107c97: ff 75 ac pushl -0x54(%ebp) 107c9a: ff 75 0c pushl 0xc(%ebp) 107c9d: e8 a6 f8 ff ff call 107548 107ca2: 83 c4 20 add $0x20,%esp 107ca5: 40 inc %eax 107ca6: 0f 84 df 00 00 00 je 107d8b <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 107cac: 83 ec 0c sub $0xc,%esp 107caf: 56 push %esi 107cb0: 8b 45 e0 mov -0x20(%ebp),%eax 107cb3: ff 50 10 call *0x10(%eax) 107cb6: 83 c4 10 add $0x10,%esp 107cb9: 48 dec %eax 107cba: 0f 85 0c 01 00 00 jne 107dcc /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 107cc0: 83 ec 08 sub $0x8,%esp 107cc3: ff 75 d4 pushl -0x2c(%ebp) 107cc6: 68 98 7a 10 00 push $0x107a98 107ccb: e8 dc fd ff ff call 107aac 107cd0: 83 c4 10 add $0x10,%esp 107cd3: 84 c0 test %al,%al 107cd5: 0f 85 01 01 00 00 jne 107ddc * 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; 107cdb: 8b 45 d4 mov -0x2c(%ebp),%eax 107cde: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 107ce1: 8b 45 dc mov -0x24(%ebp),%eax 107ce4: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 107ce7: 8b 45 e0 mov -0x20(%ebp),%eax 107cea: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 107ced: 8b 55 e4 mov -0x1c(%ebp),%edx 107cf0: 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 ) ) { 107cf3: 83 ec 0c sub $0xc,%esp 107cf6: 53 push %ebx 107cf7: ff 50 20 call *0x20(%eax) 107cfa: 83 c4 10 add $0x10,%esp 107cfd: 85 c0 test %eax,%eax 107cff: 0f 84 16 ff ff ff je 107c1b <== ALWAYS TAKEN return 0; cleanup_and_bail: free( mt_entry ); 107d05: 83 ec 0c sub $0xc,%esp 107d08: 53 push %ebx 107d09: e8 26 f9 ff ff call 107634 107d0e: 83 c4 10 add $0x10,%esp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 107d11: 83 ec 0c sub $0xc,%esp 107d14: 56 push %esi 107d15: e8 06 f9 ff ff call 107620 107d1a: 83 c4 10 add $0x10,%esp return -1; 107d1d: b8 ff ff ff ff mov $0xffffffff,%eax 107d22: e9 3d ff ff ff jmp 107c64 107d27: 90 nop target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107d28: e8 27 b1 00 00 call 112e54 <__errno> <== NOT EXECUTED 107d2d: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d33: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 107d38: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107d3b: 5b pop %ebx <== NOT EXECUTED 107d3c: 5e pop %esi <== NOT EXECUTED 107d3d: 5f pop %edi <== NOT EXECUTED 107d3e: c9 leave <== NOT EXECUTED 107d3f: 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 : "/"; 107d40: c7 45 bc 02 00 00 00 movl $0x2,-0x44(%ebp) 107d47: c7 45 ac 01 00 00 00 movl $0x1,-0x54(%ebp) 107d4e: c7 45 b0 e7 0d 12 00 movl $0x120de7,-0x50(%ebp) 107d55: e9 1b fe ff ff jmp 107b75 107d5a: 66 90 xchg %ax,%ax size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 107d5c: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 107d63: e9 36 fe ff ff jmp 107b9e /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 107d68: e8 e7 b0 00 00 call 112e54 <__errno> 107d6d: c7 00 16 00 00 00 movl $0x16,(%eax) 107d73: b8 ff ff ff ff mov $0xffffffff,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 107d78: 8d 65 f4 lea -0xc(%ebp),%esp 107d7b: 5b pop %ebx 107d7c: 5e pop %esi 107d7d: 5f pop %edi 107d7e: c9 leave 107d7f: c3 ret } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 107d80: e8 cf b0 00 00 call 112e54 <__errno> <== NOT EXECUTED 107d85: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 107d8b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d8e: 53 push %ebx <== NOT EXECUTED 107d8f: e8 a0 f8 ff ff call 107634 <== NOT EXECUTED 107d94: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 107d97: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107d9c: e9 c3 fe ff ff jmp 107c64 <== NOT EXECUTED 107da1: 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 ); 107da4: 83 ec 0c sub $0xc,%esp 107da7: 53 push %ebx 107da8: 8b 45 e0 mov -0x20(%ebp),%eax 107dab: ff 50 28 call *0x28(%eax) return 0; cleanup_and_bail: free( mt_entry ); 107dae: 89 1c 24 mov %ebx,(%esp) 107db1: e8 7e f8 ff ff call 107634 if ( loc_to_free ) 107db6: 83 c4 10 add $0x10,%esp 107db9: 85 f6 test %esi,%esi 107dbb: 0f 85 50 ff ff ff jne 107d11 <== ALWAYS TAKEN rtems_filesystem_freenode( loc_to_free ); return -1; 107dc1: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107dc6: e9 99 fe ff ff jmp 107c64 <== NOT EXECUTED 107dcb: 90 nop <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 107dcc: e8 83 b0 00 00 call 112e54 <__errno> 107dd1: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 107dd7: e9 29 ff ff ff jmp 107d05 /* * 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; 107ddc: e8 73 b0 00 00 call 112e54 <__errno> 107de1: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 107de7: e9 19 ff ff ff jmp 107d05 =============================================================================== 00108120 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 108120: 55 push %ebp 108121: 89 e5 mov %esp,%ebp 108123: 57 push %edi 108124: 56 push %esi 108125: 53 push %ebx 108126: 83 ec 1c sub $0x1c,%esp 108129: 8b 45 08 mov 0x8(%ebp),%eax 10812c: 89 45 e4 mov %eax,-0x1c(%ebp) 10812f: 8b 5d 0c mov 0xc(%ebp),%ebx 108132: 8b 75 10 mov 0x10(%ebp),%esi 108135: 8b 7d 14 mov 0x14(%ebp),%edi 108138: 8b 45 18 mov 0x18(%ebp),%eax 10813b: 89 45 e0 mov %eax,-0x20(%ebp) int rv = -1; if (target != NULL) { 10813e: 85 db test %ebx,%ebx 108140: 74 3f je 108181 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 108142: 83 ec 08 sub $0x8,%esp 108145: 68 ff 01 00 00 push $0x1ff 10814a: 53 push %ebx 10814b: e8 08 0a 00 00 call 108b58 if (rv == 0) { 108150: 83 c4 10 add $0x10,%esp 108153: 85 c0 test %eax,%eax 108155: 74 09 je 108160 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } 108157: 8d 65 f4 lea -0xc(%ebp),%esp 10815a: 5b pop %ebx 10815b: 5e pop %esi 10815c: 5f pop %edi 10815d: c9 leave 10815e: c3 ret 10815f: 90 nop int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 108160: 8b 45 e0 mov -0x20(%ebp),%eax 108163: 89 45 18 mov %eax,0x18(%ebp) 108166: 89 7d 14 mov %edi,0x14(%ebp) 108169: 89 75 10 mov %esi,0x10(%ebp) 10816c: 89 5d 0c mov %ebx,0xc(%ebp) 10816f: 8b 45 e4 mov -0x1c(%ebp),%eax 108172: 89 45 08 mov %eax,0x8(%ebp) } else { errno = EINVAL; } return rv; } 108175: 8d 65 f4 lea -0xc(%ebp),%esp 108178: 5b pop %ebx 108179: 5e pop %esi 10817a: 5f pop %edi 10817b: c9 leave int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 10817c: e9 97 00 00 00 jmp 108218 options, data ); } } else { errno = EINVAL; 108181: e8 32 b3 00 00 call 1134b8 <__errno> 108186: c7 00 16 00 00 00 movl $0x16,(%eax) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 10818c: b8 ff ff ff ff mov $0xffffffff,%eax 108191: eb c4 jmp 108157 =============================================================================== 0010f0bc : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10f0bc: 55 push %ebp 10f0bd: 89 e5 mov %esp,%ebp 10f0bf: 57 push %edi 10f0c0: 56 push %esi 10f0c1: 53 push %ebx 10f0c2: 83 ec 2c sub $0x2c,%esp 10f0c5: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10f0c8: a1 8c fa 12 00 mov 0x12fa8c,%eax 10f0cd: 40 inc %eax 10f0ce: a3 8c fa 12 00 mov %eax,0x12fa8c POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10f0d3: 89 f0 mov %esi,%eax 10f0d5: 25 00 02 00 00 and $0x200,%eax 10f0da: 89 45 d4 mov %eax,-0x2c(%ebp) 10f0dd: 0f 85 c9 00 00 00 jne 10f1ac /* struct mq_attr attr */ ) { va_list arg; mode_t mode; struct mq_attr *attr = NULL; 10f0e3: 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 ); 10f0ea: 83 ec 0c sub $0xc,%esp 10f0ed: 68 c0 ff 12 00 push $0x12ffc0 10f0f2: e8 a5 2b 00 00 call 111c9c <_Objects_Allocate> 10f0f7: 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 ) { 10f0f9: 83 c4 10 add $0x10,%esp 10f0fc: 85 c0 test %eax,%eax 10f0fe: 0f 84 b4 00 00 00 je 10f1b8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 10f104: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10f107: 83 ec 08 sub $0x8,%esp 10f10a: 8d 45 e4 lea -0x1c(%ebp),%eax 10f10d: 50 push %eax 10f10e: ff 75 08 pushl 0x8(%ebp) 10f111: e8 ba 6a 00 00 call 115bd0 <_POSIX_Message_queue_Name_to_id> 10f116: 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 ) { 10f118: 83 c4 10 add $0x10,%esp 10f11b: 85 c0 test %eax,%eax 10f11d: 75 59 jne 10f178 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10f11f: 81 e6 00 0a 00 00 and $0xa00,%esi 10f125: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10f12b: 0f 84 a7 00 00 00 je 10f1d8 Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) _Objects_Get( &_POSIX_Message_queue_Information, id, location ); 10f131: 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 ); 10f132: 8d 45 dc lea -0x24(%ebp),%eax 10f135: 50 push %eax 10f136: ff 75 e4 pushl -0x1c(%ebp) 10f139: 68 20 fe 12 00 push $0x12fe20 10f13e: e8 0d 30 00 00 call 112150 <_Objects_Get> 10f143: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 10f146: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10f149: 89 43 10 mov %eax,0x10(%ebx) Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 10f14c: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10f150: a1 dc ff 12 00 mov 0x12ffdc,%eax 10f155: 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; 10f158: 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(); 10f15f: e8 7c 3b 00 00 call 112ce0 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10f164: e8 77 3b 00 00 call 112ce0 <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10f169: 8b 43 08 mov 0x8(%ebx),%eax 10f16c: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f16f: 8d 65 f4 lea -0xc(%ebp),%esp 10f172: 5b pop %ebx 10f173: 5e pop %esi 10f174: 5f pop %edi 10f175: c9 leave 10f176: c3 ret 10f177: 90 nop 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) ) ) { 10f178: 83 f8 02 cmp $0x2,%eax 10f17b: 0f 84 87 00 00 00 je 10f208 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 ); 10f181: 83 ec 08 sub $0x8,%esp 10f184: 53 push %ebx 10f185: 68 c0 ff 12 00 push $0x12ffc0 10f18a: e8 81 2e 00 00 call 112010 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10f18f: e8 4c 3b 00 00 call 112ce0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10f194: e8 83 9f 00 00 call 11911c <__errno> 10f199: 89 38 mov %edi,(%eax) 10f19b: 83 c4 10 add $0x10,%esp 10f19e: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f1a3: 8d 65 f4 lea -0xc(%ebp),%esp 10f1a6: 5b pop %ebx 10f1a7: 5e pop %esi 10f1a8: 5f pop %edi 10f1a9: c9 leave 10f1aa: c3 ret 10f1ab: 90 nop _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 * ); 10f1ac: 8b 45 14 mov 0x14(%ebp),%eax 10f1af: 89 45 d0 mov %eax,-0x30(%ebp) 10f1b2: e9 33 ff ff ff jmp 10f0ea 10f1b7: 90 nop va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 10f1b8: e8 23 3b 00 00 call 112ce0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10f1bd: e8 5a 9f 00 00 call 11911c <__errno> 10f1c2: c7 00 17 00 00 00 movl $0x17,(%eax) 10f1c8: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f1cd: 8d 65 f4 lea -0xc(%ebp),%esp 10f1d0: 5b pop %ebx 10f1d1: 5e pop %esi 10f1d2: 5f pop %edi 10f1d3: c9 leave 10f1d4: c3 ret 10f1d5: 8d 76 00 lea 0x0(%esi),%esi 10f1d8: 83 ec 08 sub $0x8,%esp 10f1db: 53 push %ebx 10f1dc: 68 c0 ff 12 00 push $0x12ffc0 10f1e1: e8 2a 2e 00 00 call 112010 <_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(); 10f1e6: e8 f5 3a 00 00 call 112ce0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10f1eb: e8 2c 9f 00 00 call 11911c <__errno> 10f1f0: c7 00 11 00 00 00 movl $0x11,(%eax) 10f1f6: 83 c4 10 add $0x10,%esp 10f1f9: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f1fe: 8d 65 f4 lea -0xc(%ebp),%esp 10f201: 5b pop %ebx 10f202: 5e pop %esi 10f203: 5f pop %edi 10f204: c9 leave 10f205: c3 ret 10f206: 66 90 xchg %ax,%ax 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) ) ) { 10f208: 8b 55 d4 mov -0x2c(%ebp),%edx 10f20b: 85 d2 test %edx,%edx 10f20d: 0f 84 6e ff ff ff je 10f181 /* * 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( 10f213: 8d 45 e0 lea -0x20(%ebp),%eax 10f216: 50 push %eax 10f217: ff 75 d0 pushl -0x30(%ebp) 10f21a: 6a 01 push $0x1 10f21c: ff 75 08 pushl 0x8(%ebp) 10f21f: e8 24 68 00 00 call 115a48 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10f224: 83 c4 10 add $0x10,%esp 10f227: 40 inc %eax 10f228: 74 26 je 10f250 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10f22a: 8b 45 e0 mov -0x20(%ebp),%eax 10f22d: 89 43 10 mov %eax,0x10(%ebx) Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 10f230: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10f234: a1 dc ff 12 00 mov 0x12ffdc,%eax 10f239: 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; 10f23c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10f243: e8 98 3a 00 00 call 112ce0 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10f248: 8b 43 08 mov 0x8(%ebx),%eax 10f24b: e9 1f ff ff ff jmp 10f16f 10f250: 83 ec 08 sub $0x8,%esp 10f253: 53 push %ebx 10f254: 68 c0 ff 12 00 push $0x12ffc0 10f259: e8 b2 2d 00 00 call 112010 <_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(); 10f25e: e8 7d 3a 00 00 call 112ce0 <_Thread_Enable_dispatch> return (mqd_t) -1; 10f263: 83 c4 10 add $0x10,%esp 10f266: b8 ff ff ff ff mov $0xffffffff,%eax 10f26b: e9 ff fe ff ff jmp 10f16f =============================================================================== 001200c4 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 1200c4: 55 push %ebp 1200c5: 89 e5 mov %esp,%ebp 1200c7: 56 push %esi 1200c8: 53 push %ebx 1200c9: 8b 75 08 mov 0x8(%ebp),%esi 1200cc: 8b 5d 0c mov 0xc(%ebp),%ebx * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( !_Timespec_Is_valid( rqtp ) ) 1200cf: 83 ec 0c sub $0xc,%esp 1200d2: 56 push %esi 1200d3: e8 80 01 00 00 call 120258 <_Timespec_Is_valid> 1200d8: 83 c4 10 add $0x10,%esp 1200db: 84 c0 test %al,%al 1200dd: 0f 84 e1 00 00 00 je 1201c4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 1200e3: 83 ec 0c sub $0xc,%esp 1200e6: 56 push %esi 1200e7: e8 e8 1f ff ff call 1120d4 <_Timespec_To_ticks> 1200ec: 89 c6 mov %eax,%esi * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 1200ee: 83 c4 10 add $0x10,%esp 1200f1: 85 c0 test %eax,%eax 1200f3: 75 37 jne 12012c 1200f5: a1 2c 93 12 00 mov 0x12932c,%eax 1200fa: 40 inc %eax 1200fb: a3 2c 93 12 00 mov %eax,0x12932c * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 120100: ff 15 cc 4a 12 00 call *0x124acc _Thread_Disable_dispatch(); _Scheduler_Yield(); _Thread_Enable_dispatch(); 120106: e8 a5 d7 fe ff call 10d8b0 <_Thread_Enable_dispatch> if ( rmtp ) { 12010b: 85 db test %ebx,%ebx 12010d: 0f 84 93 00 00 00 je 1201a6 <== NEVER TAKEN rmtp->tv_sec = 0; 120113: c7 03 00 00 00 00 movl $0x0,(%ebx) rmtp->tv_nsec = 0; 120119: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) } return 0; 120120: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 120122: 8d 65 f8 lea -0x8(%ebp),%esp 120125: 5b pop %ebx 120126: 5e pop %esi 120127: c9 leave 120128: c3 ret 120129: 8d 76 00 lea 0x0(%esi),%esi 12012c: a1 2c 93 12 00 mov 0x12932c,%eax 120131: 40 inc %eax 120132: a3 2c 93 12 00 mov %eax,0x12932c /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 120137: 83 ec 08 sub $0x8,%esp 12013a: 68 08 00 00 10 push $0x10000008 12013f: ff 35 d8 98 12 00 pushl 0x1298d8 120145: e8 8a df fe ff call 10e0d4 <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 12014a: 8b 15 d8 98 12 00 mov 0x1298d8,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 120150: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 120153: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 12015a: c7 42 64 fc d6 10 00 movl $0x10d6fc,0x64(%edx) the_watchdog->id = id; 120161: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 120164: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12016b: 89 72 54 mov %esi,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12016e: 58 pop %eax 12016f: 59 pop %ecx &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); 120170: 83 c2 48 add $0x48,%edx 120173: 52 push %edx 120174: 68 00 94 12 00 push $0x129400 120179: e8 a6 e4 fe ff call 10e624 <_Watchdog_Insert> _Thread_Enable_dispatch(); 12017e: e8 2d d7 fe ff call 10d8b0 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 120183: 83 c4 10 add $0x10,%esp 120186: 85 db test %ebx,%ebx 120188: 74 1c je 1201a6 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 12018a: a1 d8 98 12 00 mov 0x1298d8,%eax 12018f: 03 70 5c add 0x5c(%eax),%esi _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 120192: 2b 70 60 sub 0x60(%eax),%esi _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 120195: 83 ec 08 sub $0x8,%esp 120198: 53 push %ebx 120199: 56 push %esi 12019a: e8 71 00 00 00 call 120210 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 12019f: 83 c4 10 add $0x10,%esp 1201a2: 85 f6 test %esi,%esi 1201a4: 75 09 jne 1201af rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; 1201a6: 31 c0 xor %eax,%eax } 1201a8: 8d 65 f8 lea -0x8(%ebp),%esp 1201ab: 5b pop %ebx 1201ac: 5e pop %esi 1201ad: c9 leave 1201ae: c3 ret #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 1201af: e8 dc 3d ff ff call 113f90 <__errno> 1201b4: c7 00 04 00 00 00 movl $0x4,(%eax) 1201ba: b8 ff ff ff ff mov $0xffffffff,%eax 1201bf: e9 5e ff ff ff jmp 120122 * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( !_Timespec_Is_valid( rqtp ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 1201c4: e8 c7 3d ff ff call 113f90 <__errno> 1201c9: c7 00 16 00 00 00 movl $0x16,(%eax) 1201cf: b8 ff ff ff ff mov $0xffffffff,%eax 1201d4: e9 49 ff ff ff jmp 120122 =============================================================================== 00107e50 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 107e50: 55 push %ebp 107e51: 89 e5 mov %esp,%ebp 107e53: 57 push %edi 107e54: 56 push %esi 107e55: 53 push %ebx 107e56: 83 ec 0c sub $0xc,%esp struct _reent *ptr; if (_Thread_libc_reent == 0) 107e59: a1 84 78 12 00 mov 0x127884,%eax 107e5e: 85 c0 test %eax,%eax 107e60: 0f 84 52 02 00 00 je 1080b8 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)); 107e66: 83 ec 0c sub $0xc,%esp 107e69: 68 24 04 00 00 push $0x424 107e6e: e8 e9 5e 00 00 call 10dd5c <_Workspace_Allocate> 107e73: 89 c2 mov %eax,%edx #endif if (ptr) { 107e75: 83 c4 10 add $0x10,%esp 107e78: 85 c0 test %eax,%eax 107e7a: 0f 84 2c 02 00 00 je 1080ac _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 107e80: c7 00 00 00 00 00 movl $0x0,(%eax) 107e86: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx 107e8c: 89 58 04 mov %ebx,0x4(%eax) 107e8f: 8d 80 54 03 00 00 lea 0x354(%eax),%eax 107e95: 89 42 08 mov %eax,0x8(%edx) 107e98: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax 107e9e: 89 42 0c mov %eax,0xc(%edx) 107ea1: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 107ea8: 8d 72 14 lea 0x14(%edx),%esi 107eab: 31 c0 xor %eax,%eax 107ead: b9 19 00 00 00 mov $0x19,%ecx 107eb2: 89 f7 mov %esi,%edi 107eb4: f3 aa rep stos %al,%es:(%edi) 107eb6: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 107ebd: c7 42 34 6a 0b 12 00 movl $0x120b6a,0x34(%edx) 107ec4: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) 107ecb: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx) 107ed2: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx) 107ed9: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx) 107ee0: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx) 107ee7: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx) 107eee: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) 107ef5: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) 107efc: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) 107f03: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) 107f0a: c6 42 60 00 movb $0x0,0x60(%edx) 107f0e: 8d 72 7c lea 0x7c(%edx),%esi 107f11: b1 24 mov $0x24,%cl 107f13: 89 f7 mov %esi,%edi 107f15: f3 aa rep stos %al,%es:(%edi) 107f17: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx) 107f1e: 00 00 00 107f21: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx) 107f28: 00 00 00 107f2b: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx) 107f32: 00 00 00 107f35: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx) 107f3c: 0e 33 107f3e: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx) 107f45: cd ab 107f47: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx) 107f4e: 34 12 107f50: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx) 107f57: 6d e6 107f59: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx) 107f60: ec de 107f62: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx) 107f69: 05 00 107f6b: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx) 107f72: 0b 00 107f74: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx) 107f7b: 00 00 00 107f7e: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx) 107f85: 00 00 00 107f88: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx) 107f8f: 00 00 00 107f92: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx) 107f99: 00 00 00 107f9c: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx) 107fa3: 00 00 00 107fa6: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx) 107fad: 00 00 00 107fb0: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx) 107fb7: 00 00 00 107fba: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx) 107fc1: 00 00 00 107fc4: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx) 107fcb: 00 00 00 107fce: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx) 107fd5: 00 00 00 107fd8: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx) 107fdf: 00 00 00 107fe2: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx) 107fe9: 00 00 00 107fec: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx) 107ff3: 00 00 00 107ff6: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx) 107ffd: 00 00 00 108000: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx) 108007: 00 00 00 10800a: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx) 108011: 00 00 00 108014: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx) 10801b: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx) 108022: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx) 108029: 00 00 00 10802c: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx) 108033: 00 00 00 108036: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx) 10803d: 00 00 00 108040: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx) 108047: 00 00 00 10804a: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx) 108051: 00 00 00 108054: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx) 10805b: 00 00 00 10805e: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx) 108065: 00 00 00 108068: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx) 10806f: 00 00 00 108072: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx) 108079: 00 00 00 10807c: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx) 108083: 00 00 00 108086: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx) 10808d: 00 00 00 108090: 66 b9 38 01 mov $0x138,%cx 108094: 89 df mov %ebx,%edi 108096: f3 aa rep stos %al,%es:(%edi) creating_task->libc_reent = ptr; 108098: 8b 45 0c mov 0xc(%ebp),%eax 10809b: 89 90 e4 00 00 00 mov %edx,0xe4(%eax) return TRUE; 1080a1: b0 01 mov $0x1,%al } return FALSE; } 1080a3: 8d 65 f4 lea -0xc(%ebp),%esp 1080a6: 5b pop %ebx 1080a7: 5e pop %esi 1080a8: 5f pop %edi 1080a9: c9 leave 1080aa: c3 ret 1080ab: 90 nop _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ creating_task->libc_reent = ptr; return TRUE; } return FALSE; 1080ac: 31 c0 xor %eax,%eax } 1080ae: 8d 65 f4 lea -0xc(%ebp),%esp 1080b1: 5b pop %ebx 1080b2: 5e pop %esi 1080b3: 5f pop %edi 1080b4: c9 leave 1080b5: c3 ret 1080b6: 66 90 xchg %ax,%ax { struct _reent *ptr; if (_Thread_libc_reent == 0) { _REENT = _global_impure_ptr; 1080b8: a1 c0 19 12 00 mov 0x1219c0,%eax 1080bd: a3 20 55 12 00 mov %eax,0x125520 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 1080c2: c7 05 84 78 12 00 20 movl $0x125520,0x127884 1080c9: 55 12 00 1080cc: e9 95 fd ff ff jmp 107e66 =============================================================================== 001080d4 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 1080d4: 55 push %ebp 1080d5: 89 e5 mov %esp,%ebp 1080d7: 57 push %edi 1080d8: 56 push %esi 1080d9: 53 push %ebx 1080da: 83 ec 0c sub $0xc,%esp 1080dd: 8b 7d 08 mov 0x8(%ebp),%edi 1080e0: 8b 5d 0c mov 0xc(%ebp),%ebx /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 1080e3: 39 df cmp %ebx,%edi 1080e5: 74 55 je 10813c ptr = _REENT; } else { ptr = deleted_task->libc_reent; 1080e7: 8b b3 e4 00 00 00 mov 0xe4(%ebx),%esi } if (ptr && ptr != _global_impure_ptr) { 1080ed: 85 f6 test %esi,%esi 1080ef: 74 21 je 108112 <== NEVER TAKEN 1080f1: 3b 35 c0 19 12 00 cmp 0x1219c0,%esi 1080f7: 74 19 je 108112 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 1080f9: 83 ec 08 sub $0x8,%esp 1080fc: 68 f4 7d 10 00 push $0x107df4 108101: 56 push %esi 108102: e8 35 b5 00 00 call 11363c <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 108107: 89 34 24 mov %esi,(%esp) 10810a: e8 69 5c 00 00 call 10dd78 <_Workspace_Free> 10810f: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 108112: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 108119: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 10811c: 39 df cmp %ebx,%edi 10811e: 74 08 je 108128 _REENT = 0; } } 108120: 8d 65 f4 lea -0xc(%ebp),%esp 108123: 5b pop %ebx 108124: 5e pop %esi 108125: 5f pop %edi 108126: c9 leave 108127: c3 ret /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 108128: c7 05 20 55 12 00 00 movl $0x0,0x125520 10812f: 00 00 00 } } 108132: 8d 65 f4 lea -0xc(%ebp),%esp 108135: 5b pop %ebx 108136: 5e pop %esi 108137: 5f pop %edi 108138: c9 leave 108139: c3 ret 10813a: 66 90 xchg %ax,%ax /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 10813c: 8b 35 20 55 12 00 mov 0x125520,%esi 108142: eb a9 jmp 1080ed =============================================================================== 00107df4 : */ int newlib_free_buffers( FILE *fp ) { 107df4: 55 push %ebp 107df5: 89 e5 mov %esp,%ebp 107df7: 53 push %ebx 107df8: 83 ec 10 sub $0x10,%esp 107dfb: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 107dfe: 53 push %ebx 107dff: e8 24 b4 00 00 call 113228 107e04: 83 c4 10 add $0x10,%esp 107e07: 83 f8 02 cmp $0x2,%eax 107e0a: 76 14 jbe 107e20 <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 107e0c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e0f: 53 push %ebx <== NOT EXECUTED 107e10: e8 97 b1 00 00 call 112fac <== NOT EXECUTED 107e15: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 107e18: 31 c0 xor %eax,%eax 107e1a: 8b 5d fc mov -0x4(%ebp),%ebx 107e1d: c9 leave 107e1e: c3 ret 107e1f: 90 nop { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 107e20: f6 43 0c 80 testb $0x80,0xc(%ebx) 107e24: 74 f2 je 107e18 <== ALWAYS TAKEN free( fp->_bf._base ); 107e26: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e29: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 107e2c: e8 03 f8 ff ff call 107634 <== NOT EXECUTED fp->_flags &= ~__SMBF; 107e31: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 107e37: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 107e3d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 107e44: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; default: fclose(fp); } return 0; } 107e47: 31 c0 xor %eax,%eax <== NOT EXECUTED 107e49: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e4c: c9 leave <== NOT EXECUTED 107e4d: c3 ret <== NOT EXECUTED =============================================================================== 00107264 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 107264: 55 push %ebp 107265: 89 e5 mov %esp,%ebp 107267: 53 push %ebx 107268: 83 ec 04 sub $0x4,%esp 10726b: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 10726e: 80 3d c0 52 12 00 00 cmpb $0x0,0x1252c0 107275: 74 09 je 107280 NULL_major = major; } return RTEMS_SUCCESSFUL; } 107277: 31 c0 xor %eax,%eax 107279: 8b 5d fc mov -0x4(%ebp),%ebx 10727c: c9 leave 10727d: c3 ret 10727e: 66 90 xchg %ax,%ax ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 107280: c6 05 c0 52 12 00 01 movb $0x1,0x1252c0 status = rtems_io_register_name( 107287: 50 push %eax 107288: 6a 00 push $0x0 10728a: 53 push %ebx 10728b: 68 f7 d4 11 00 push $0x11d4f7 107290: e8 7b 01 00 00 call 107410 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 107295: 83 c4 10 add $0x10,%esp 107298: 85 c0 test %eax,%eax 10729a: 75 0d jne 1072a9 rtems_fatal_error_occurred(status); NULL_major = major; 10729c: 89 1d 00 56 12 00 mov %ebx,0x125600 } return RTEMS_SUCCESSFUL; } 1072a2: 31 c0 xor %eax,%eax 1072a4: 8b 5d fc mov -0x4(%ebp),%ebx 1072a7: c9 leave 1072a8: c3 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 1072a9: 83 ec 0c sub $0xc,%esp 1072ac: 50 push %eax 1072ad: e8 26 41 00 00 call 10b3d8 =============================================================================== 001081a4 : int open( const char *pathname, int flags, ... ) { 1081a4: 55 push %ebp 1081a5: 89 e5 mov %esp,%ebp 1081a7: 57 push %edi 1081a8: 56 push %esi 1081a9: 53 push %ebx 1081aa: 83 ec 4c sub $0x4c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 1081ad: 8b 45 0c mov 0xc(%ebp),%eax 1081b0: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 1081b1: 89 c3 mov %eax,%ebx 1081b3: 83 e3 01 and $0x1,%ebx eval_flags |= RTEMS_LIBIO_PERMS_READ; 1081b6: f7 db neg %ebx 1081b8: 83 e3 04 and $0x4,%ebx if ( ( status & _FWRITE ) == _FWRITE ) 1081bb: a8 02 test $0x2,%al 1081bd: 74 03 je 1081c2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 1081bf: 83 cb 02 or $0x2,%ebx va_start(ap, flags); mode = va_arg( ap, int ); 1081c2: 8b 45 10 mov 0x10(%ebp),%eax 1081c5: 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(); 1081c8: e8 1b 72 00 00 call 10f3e8 1081cd: 89 c2 mov %eax,%edx if ( iop == 0 ) { 1081cf: 85 c0 test %eax,%eax 1081d1: 0f 84 c5 00 00 00 je 10829c } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1081d7: 31 f6 xor %esi,%esi 1081d9: b9 ff ff ff ff mov $0xffffffff,%ecx 1081de: 8b 7d 08 mov 0x8(%ebp),%edi 1081e1: 89 f0 mov %esi,%eax 1081e3: f2 ae repnz scas %es:(%edi),%al 1081e5: f7 d1 not %ecx 1081e7: 49 dec %ecx 1081e8: 83 ec 0c sub $0xc,%esp 1081eb: 6a 01 push $0x1 1081ed: 8d 45 d4 lea -0x2c(%ebp),%eax 1081f0: 89 45 b4 mov %eax,-0x4c(%ebp) 1081f3: 50 push %eax 1081f4: 53 push %ebx 1081f5: 51 push %ecx 1081f6: ff 75 08 pushl 0x8(%ebp) 1081f9: 89 55 c0 mov %edx,-0x40(%ebp) 1081fc: e8 47 f3 ff ff call 107548 108201: 89 c3 mov %eax,%ebx pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 108203: 83 c4 20 add $0x20,%esp 108206: 83 f8 ff cmp $0xffffffff,%eax 108209: 8b 55 c0 mov -0x40(%ebp),%edx 10820c: 0f 84 de 00 00 00 je 1082f0 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 108212: 8b 45 0c mov 0xc(%ebp),%eax 108215: 25 00 0a 00 00 and $0xa00,%eax 10821a: 3d 00 0a 00 00 cmp $0xa00,%eax 10821f: 0f 84 8b 00 00 00 je 1082b0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 108225: 8b 5a 14 mov 0x14(%edx),%ebx 108228: 83 ec 0c sub $0xc,%esp 10822b: ff 75 0c pushl 0xc(%ebp) 10822e: 89 55 c0 mov %edx,-0x40(%ebp) 108231: e8 36 71 00 00 call 10f36c 108236: 09 d8 or %ebx,%eax 108238: 8b 55 c0 mov -0x40(%ebp),%edx 10823b: 89 42 14 mov %eax,0x14(%edx) iop->pathinfo = loc; 10823e: 8d 7a 18 lea 0x18(%edx),%edi 108241: b9 05 00 00 00 mov $0x5,%ecx 108246: 8b 75 b4 mov -0x4c(%ebp),%esi 108249: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 10824b: 8b 42 20 mov 0x20(%edx),%eax 10824e: ff 75 c4 pushl -0x3c(%ebp) 108251: ff 75 0c pushl 0xc(%ebp) 108254: ff 75 08 pushl 0x8(%ebp) 108257: 52 push %edx 108258: ff 10 call *(%eax) if ( rc ) { 10825a: 83 c4 20 add $0x20,%esp 10825d: 85 c0 test %eax,%eax 10825f: 8b 55 c0 mov -0x40(%ebp),%edx 108262: 75 78 jne 1082dc } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 108264: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 10826b: 0f 85 9f 00 00 00 jne 108310 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 108271: 2b 15 80 76 12 00 sub 0x127680,%edx 108277: c1 fa 03 sar $0x3,%edx 10827a: 8d 04 d2 lea (%edx,%edx,8),%eax 10827d: 8d 04 c2 lea (%edx,%eax,8),%eax 108280: 8d 04 c2 lea (%edx,%eax,8),%eax 108283: 8d 04 c2 lea (%edx,%eax,8),%eax 108286: 89 c1 mov %eax,%ecx 108288: c1 e1 0f shl $0xf,%ecx 10828b: 01 c8 add %ecx,%eax 10828d: 8d 04 c2 lea (%edx,%eax,8),%eax 108290: f7 d8 neg %eax } 108292: 8d 65 f4 lea -0xc(%ebp),%esp 108295: 5b pop %ebx 108296: 5e pop %esi 108297: 5f pop %edi 108298: c9 leave 108299: c3 ret 10829a: 66 90 xchg %ax,%ax */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; 10829c: 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 ); 1082a1: e8 ae ab 00 00 call 112e54 <__errno> 1082a6: 89 18 mov %ebx,(%eax) 1082a8: b8 ff ff ff ff mov $0xffffffff,%eax 1082ad: eb e3 jmp 108292 1082af: 90 nop } } 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; 1082b0: 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; 1082b3: bb 11 00 00 00 mov $0x11,%ebx */ done: va_end(ap); if ( rc ) { if ( iop ) 1082b8: 85 d2 test %edx,%edx 1082ba: 74 0c je 1082c8 rtems_libio_free( iop ); 1082bc: 83 ec 0c sub $0xc,%esp 1082bf: 52 push %edx 1082c0: e8 c7 71 00 00 call 10f48c 1082c5: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 1082c8: 85 f6 test %esi,%esi 1082ca: 74 d5 je 1082a1 rtems_filesystem_freenode( loc_to_free ); 1082cc: 83 ec 0c sub $0xc,%esp 1082cf: 56 push %esi 1082d0: e8 4b f3 ff ff call 107620 1082d5: 83 c4 10 add $0x10,%esp 1082d8: eb c7 jmp 1082a1 1082da: 66 90 xchg %ax,%ax iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 1082dc: e8 73 ab 00 00 call 112e54 <__errno> 1082e1: 8b 18 mov (%eax),%ebx rc = EEXIST; loc_to_free = &loc; goto done; } loc_to_free = &loc; 1082e3: 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; 1082e6: 8b 55 c0 mov -0x40(%ebp),%edx * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { 1082e9: 85 db test %ebx,%ebx 1082eb: 74 84 je 108271 <== NEVER TAKEN 1082ed: eb c9 jmp 1082b8 1082ef: 90 nop */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 1082f0: e8 5f ab 00 00 call 112e54 <__errno> 1082f5: 83 38 02 cmpl $0x2,(%eax) 1082f8: 8b 55 c0 mov -0x40(%ebp),%edx 1082fb: 0f 84 9b 00 00 00 je 10839c } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 108301: e8 4e ab 00 00 call 112e54 <__errno> 108306: 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; 108308: 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; 10830a: 8b 55 c0 mov -0x40(%ebp),%edx 10830d: eb da jmp 1082e9 10830f: 90 nop /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 108310: 51 push %ecx 108311: 6a 00 push $0x0 108313: 6a 00 push $0x0 108315: 89 d0 mov %edx,%eax 108317: 2b 05 80 76 12 00 sub 0x127680,%eax 10831d: c1 f8 03 sar $0x3,%eax 108320: 8d 0c c0 lea (%eax,%eax,8),%ecx 108323: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108326: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108329: 8d 0c c8 lea (%eax,%ecx,8),%ecx 10832c: 89 cb mov %ecx,%ebx 10832e: c1 e3 0f shl $0xf,%ebx 108331: 01 d9 add %ebx,%ecx 108333: 8d 04 c8 lea (%eax,%ecx,8),%eax 108336: f7 d8 neg %eax 108338: 50 push %eax 108339: 89 55 c0 mov %edx,-0x40(%ebp) 10833c: e8 07 6f 00 00 call 10f248 108341: 89 c3 mov %eax,%ebx if ( rc ) { 108343: 83 c4 10 add $0x10,%esp 108346: 85 c0 test %eax,%eax 108348: 8b 55 c0 mov -0x40(%ebp),%edx 10834b: 0f 84 20 ff ff ff je 108271 if(errno) rc = errno; 108351: e8 fe aa 00 00 call 112e54 <__errno> 108356: 8b 00 mov (%eax),%eax 108358: 85 c0 test %eax,%eax 10835a: 8b 55 c0 mov -0x40(%ebp),%edx 10835d: 0f 85 b2 00 00 00 jne 108415 <== ALWAYS TAKEN close( iop - rtems_libio_iops ); 108363: 83 ec 0c sub $0xc,%esp 108366: 2b 15 80 76 12 00 sub 0x127680,%edx 10836c: c1 fa 03 sar $0x3,%edx 10836f: 8d 04 d2 lea (%edx,%edx,8),%eax 108372: 8d 04 c2 lea (%edx,%eax,8),%eax 108375: 8d 04 c2 lea (%edx,%eax,8),%eax 108378: 8d 04 c2 lea (%edx,%eax,8),%eax 10837b: 89 c1 mov %eax,%ecx 10837d: c1 e1 0f shl $0xf,%ecx 108380: 01 c8 add %ecx,%eax 108382: 8d 04 c2 lea (%edx,%eax,8),%eax 108385: f7 d8 neg %eax 108387: 50 push %eax 108388: e8 3b 6e 00 00 call 10f1c8 10838d: 83 c4 10 add $0x10,%esp /* those are released by close(): */ iop = 0; loc_to_free = NULL; 108390: 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; 108392: 31 d2 xor %edx,%edx 108394: e9 50 ff ff ff jmp 1082e9 108399: 8d 76 00 lea 0x0(%esi),%esi rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 10839c: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1083a3: 75 0f jne 1083b4 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; 1083a5: 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; 1083a7: bb 02 00 00 00 mov $0x2,%ebx 1083ac: e9 07 ff ff ff jmp 1082b8 1083b1: 8d 76 00 lea 0x0(%esi),%esi goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1083b4: 6a 00 push $0x0 1083b6: 6a 00 push $0x0 1083b8: 8b 45 c4 mov -0x3c(%ebp),%eax 1083bb: 80 cc 80 or $0x80,%ah 1083be: 50 push %eax 1083bf: ff 75 08 pushl 0x8(%ebp) 1083c2: 89 55 c0 mov %edx,-0x40(%ebp) 1083c5: e8 02 f6 ff ff call 1079cc if ( rc ) { 1083ca: 83 c4 10 add $0x10,%esp 1083cd: 85 c0 test %eax,%eax 1083cf: 8b 55 c0 mov -0x40(%ebp),%edx 1083d2: 0f 85 29 ff ff ff jne 108301 <== 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( 1083d8: 89 d9 mov %ebx,%ecx 1083da: 8b 7d 08 mov 0x8(%ebp),%edi 1083dd: 89 f0 mov %esi,%eax 1083df: f2 ae repnz scas %es:(%edi),%al 1083e1: f7 d1 not %ecx 1083e3: 49 dec %ecx 1083e4: 83 ec 0c sub $0xc,%esp 1083e7: 6a 01 push $0x1 1083e9: 8d 45 d4 lea -0x2c(%ebp),%eax 1083ec: 50 push %eax 1083ed: 6a 00 push $0x0 1083ef: 51 push %ecx 1083f0: ff 75 08 pushl 0x8(%ebp) 1083f3: 89 55 c0 mov %edx,-0x40(%ebp) 1083f6: e8 4d f1 ff ff call 107548 pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ 1083fb: 83 c4 20 add $0x20,%esp 1083fe: 85 c0 test %eax,%eax 108400: 8b 55 c0 mov -0x40(%ebp),%edx 108403: 0f 84 1c fe ff ff je 108225 <== 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; 108409: 31 f6 xor %esi,%esi * 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; 10840b: bb 0d 00 00 00 mov $0xd,%ebx <== NOT EXECUTED 108410: e9 a3 fe ff ff jmp 1082b8 <== 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; 108415: e8 3a aa 00 00 call 112e54 <__errno> 10841a: 8b 18 mov (%eax),%ebx 10841c: 8b 55 c0 mov -0x40(%ebp),%edx 10841f: e9 3f ff ff ff jmp 108363 =============================================================================== 001091a8 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 1091a8: 55 push %ebp 1091a9: 89 e5 mov %esp,%ebp 1091ab: 56 push %esi 1091ac: 53 push %ebx 1091ad: 83 ec 10 sub $0x10,%esp 1091b0: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 1091b3: 8b 4a 34 mov 0x34(%edx),%ecx 1091b6: f6 c1 01 test $0x1,%cl 1091b9: 74 31 je 1091ec <== NEVER TAKEN switch (c) { 1091bb: 3c 09 cmp $0x9,%al 1091bd: 0f 84 b1 00 00 00 je 109274 1091c3: 76 3f jbe 109204 <== NEVER TAKEN 1091c5: 3c 0a cmp $0xa,%al 1091c7: 74 4f je 109218 1091c9: 3c 0d cmp $0xd,%al 1091cb: 74 7f je 10924c <== NEVER TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 1091cd: 83 e1 02 and $0x2,%ecx 1091d0: 0f 85 c6 00 00 00 jne 10929c <== NEVER TAKEN 1091d6: 8b 0d 14 55 12 00 mov 0x125514,%ecx c = toupper(c); if (!iscntrl(c)) 1091dc: 0f b6 c0 movzbl %al,%eax 1091df: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) 1091e4: 75 06 jne 1091ec <== NEVER TAKEN tty->column++; 1091e6: ff 42 28 incl 0x28(%edx) 1091e9: 8d 76 00 lea 0x0(%esi),%esi break; } } rtems_termios_puts (&c, 1, tty); 1091ec: 53 push %ebx 1091ed: 52 push %edx 1091ee: 6a 01 push $0x1 1091f0: 8d 45 f4 lea -0xc(%ebp),%eax 1091f3: 50 push %eax 1091f4: e8 7b fe ff ff call 109074 1091f9: 83 c4 10 add $0x10,%esp } 1091fc: 8d 65 f8 lea -0x8(%ebp),%esp 1091ff: 5b pop %ebx 109200: 5e pop %esi 109201: c9 leave 109202: c3 ret 109203: 90 nop oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 109204: 3c 08 cmp $0x8,%al <== NOT EXECUTED 109206: 75 c5 jne 1091cd <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 109208: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 10920b: 85 c0 test %eax,%eax <== NOT EXECUTED 10920d: 7e dd jle 1091ec <== NOT EXECUTED tty->column--; 10920f: 48 dec %eax <== NOT EXECUTED 109210: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED 109213: eb d7 jmp 1091ec <== NOT EXECUTED 109215: 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) 109218: f6 c1 20 test $0x20,%cl 10921b: 74 07 je 109224 <== ALWAYS TAKEN tty->column = 0; 10921d: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 109224: 83 e1 04 and $0x4,%ecx 109227: 74 c3 je 1091ec <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 109229: 51 push %ecx 10922a: 52 push %edx 10922b: 6a 01 push $0x1 10922d: 68 e4 0e 12 00 push $0x120ee4 109232: 89 55 f0 mov %edx,-0x10(%ebp) 109235: e8 3a fe ff ff call 109074 tty->column = 0; 10923a: 8b 55 f0 mov -0x10(%ebp),%edx 10923d: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) 109244: 83 c4 10 add $0x10,%esp 109247: eb a3 jmp 1091ec 109249: 8d 76 00 lea 0x0(%esi),%esi } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 10924c: f6 c1 10 test $0x10,%cl <== NOT EXECUTED 10924f: 74 07 je 109258 <== NOT EXECUTED 109251: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 109254: 85 c0 test %eax,%eax <== NOT EXECUTED 109256: 74 a4 je 1091fc <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 109258: f6 c1 08 test $0x8,%cl <== NOT EXECUTED 10925b: 74 09 je 109266 <== NOT EXECUTED c = '\n'; 10925d: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 109261: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED 109264: 74 86 je 1091ec <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 109266: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED break; 10926d: e9 7a ff ff ff jmp 1091ec <== NOT EXECUTED 109272: 66 90 xchg %ax,%ax <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 109274: 8b 5a 28 mov 0x28(%edx),%ebx 109277: 89 de mov %ebx,%esi 109279: 83 e6 07 and $0x7,%esi 10927c: b8 08 00 00 00 mov $0x8,%eax 109281: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 109283: 81 e1 00 18 00 00 and $0x1800,%ecx 109289: 81 f9 00 18 00 00 cmp $0x1800,%ecx 10928f: 74 37 je 1092c8 <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 109291: 01 d8 add %ebx,%eax <== NOT EXECUTED 109293: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED break; 109296: e9 51 ff ff ff jmp 1091ec <== NOT EXECUTED 10929b: 90 nop <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 10929c: 8b 0d 14 55 12 00 mov 0x125514,%ecx <== NOT EXECUTED 1092a2: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1092a5: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED 1092aa: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED 1092ad: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED 1092b0: 74 0e je 1092c0 <== NOT EXECUTED 1092b2: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1092b4: 88 d8 mov %bl,%al <== NOT EXECUTED 1092b6: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED 1092b9: e9 1e ff ff ff jmp 1091dc <== NOT EXECUTED 1092be: 66 90 xchg %ax,%ax <== NOT EXECUTED 1092c0: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED 1092c3: eb ef jmp 1092b4 <== NOT EXECUTED 1092c5: 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; 1092c8: 8d 1c 18 lea (%eax,%ebx,1),%ebx 1092cb: 89 5a 28 mov %ebx,0x28(%edx) rtems_termios_puts ( " ", i, tty); 1092ce: 56 push %esi 1092cf: 52 push %edx 1092d0: 50 push %eax 1092d1: 68 7c 0a 12 00 push $0x120a7c 1092d6: e8 99 fd ff ff call 109074 return; 1092db: 83 c4 10 add $0x10,%esp 1092de: e9 19 ff ff ff jmp 1091fc =============================================================================== 001095e0 : long pathconf( const char *path, int name ) { 1095e0: 55 push %ebp 1095e1: 89 e5 mov %esp,%ebp 1095e3: 56 push %esi 1095e4: 53 push %ebx int status; int fd; fd = open( path, O_RDONLY ); 1095e5: 83 ec 08 sub $0x8,%esp 1095e8: 6a 00 push $0x0 1095ea: ff 75 08 pushl 0x8(%ebp) 1095ed: e8 4e fd ff ff call 109340 1095f2: 89 c3 mov %eax,%ebx if ( fd == -1 ) 1095f4: 83 c4 10 add $0x10,%esp 1095f7: 83 f8 ff cmp $0xffffffff,%eax 1095fa: 74 24 je 109620 return -1; status = fpathconf( fd, name ); 1095fc: 83 ec 08 sub $0x8,%esp 1095ff: ff 75 0c pushl 0xc(%ebp) 109602: 50 push %eax 109603: e8 98 ec ff ff call 1082a0 109608: 89 c6 mov %eax,%esi (void) close( fd ); 10960a: 89 1c 24 mov %ebx,(%esp) 10960d: e8 2e e8 ff ff call 107e40 return status; 109612: 83 c4 10 add $0x10,%esp 109615: 89 f0 mov %esi,%eax } 109617: 8d 65 f8 lea -0x8(%ebp),%esp 10961a: 5b pop %ebx 10961b: 5e pop %esi 10961c: c9 leave 10961d: c3 ret 10961e: 66 90 xchg %ax,%ax int status; int fd; fd = open( path, O_RDONLY ); if ( fd == -1 ) return -1; 109620: b8 ff ff ff ff mov $0xffffffff,%eax status = fpathconf( fd, name ); (void) close( fd ); return status; } 109625: 8d 65 f8 lea -0x8(%ebp),%esp 109628: 5b pop %ebx 109629: 5e pop %esi 10962a: c9 leave 10962b: c3 ret =============================================================================== 00110288 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 110288: 55 push %ebp 110289: 89 e5 mov %esp,%ebp 11028b: 57 push %edi 11028c: 56 push %esi 11028d: 53 push %ebx 11028e: 83 ec 24 sub $0x24,%esp rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 110291: 68 ff 01 00 00 push $0x1ff 110296: 68 ac 2f 12 00 push $0x122fac 11029b: e8 8c 17 00 00 call 111a2c 1102a0: 83 c4 10 add $0x10,%esp 1102a3: 85 c0 test %eax,%eax 1102a5: 74 0d je 1102b4 <== ALWAYS TAKEN return -1; 1102a7: 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; } 1102ac: 8d 65 f4 lea -0xc(%ebp),%esp 1102af: 5b pop %ebx 1102b0: 5e pop %esi 1102b1: 5f pop %edi 1102b2: c9 leave 1102b3: 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); 1102b4: 8d 5d d9 lea -0x27(%ebp),%ebx 1102b7: be b1 2f 12 00 mov $0x122fb1,%esi 1102bc: b9 0a 00 00 00 mov $0xa,%ecx 1102c1: 89 df mov %ebx,%edi 1102c3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 1102c5: 0f b7 05 14 90 12 00 movzwl 0x129014,%eax 1102cc: 8d 50 01 lea 0x1(%eax),%edx 1102cf: 66 89 15 14 90 12 00 mov %dx,0x129014 1102d6: 51 push %ecx 1102d7: 50 push %eax 1102d8: 68 bc 2f 12 00 push $0x122fbc 1102dd: 8d 45 e3 lea -0x1d(%ebp),%eax 1102e0: 50 push %eax 1102e1: e8 2a 50 00 00 call 115310 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 1102e6: 58 pop %eax 1102e7: 5a pop %edx 1102e8: 68 80 01 00 00 push $0x180 1102ed: 53 push %ebx 1102ee: e8 81 14 00 00 call 111774 1102f3: 83 c4 10 add $0x10,%esp 1102f6: 85 c0 test %eax,%eax 1102f8: 0f 85 a6 00 00 00 jne 1103a4 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); 1102fe: 83 ec 08 sub $0x8,%esp 110301: 68 00 40 00 00 push $0x4000 110306: 53 push %ebx 110307: e8 5c 91 ff ff call 109468 11030c: 8b 55 08 mov 0x8(%ebp),%edx 11030f: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 110311: 83 c4 10 add $0x10,%esp 110314: 85 c0 test %eax,%eax 110316: 78 58 js 110370 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]); 110318: 3b 05 ec 4f 12 00 cmp 0x124fec,%eax 11031e: 72 3c jb 11035c <== ALWAYS TAKEN 110320: 31 d2 xor %edx,%edx <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 110322: 83 62 14 fe andl $0xfffffffe,0x14(%edx) filsdes[1] = open(fifopath, O_WRONLY); 110326: 83 ec 08 sub $0x8,%esp 110329: 6a 01 push $0x1 11032b: 53 push %ebx 11032c: e8 37 91 ff ff call 109468 110331: 8b 55 08 mov 0x8(%ebp),%edx 110334: 89 42 04 mov %eax,0x4(%edx) if (filsdes[1] < 0) { 110337: 83 c4 10 add $0x10,%esp 11033a: 85 c0 test %eax,%eax 11033c: 78 4a js 110388 int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; 11033e: 31 f6 xor %esi,%esi if (filsdes[1] < 0) { err = errno; close(filsdes[0]); } unlink(fifopath); 110340: 83 ec 0c sub $0xc,%esp 110343: 53 push %ebx 110344: e8 6b b1 ff ff call 10b4b4 110349: 83 c4 10 add $0x10,%esp } if(err != 0) 11034c: 85 f6 test %esi,%esi 11034e: 75 63 jne 1103b3 rtems_set_errno_and_return_minus_one(err); return 0; 110350: 31 c0 xor %eax,%eax } 110352: 8d 65 f4 lea -0xc(%ebp),%esp 110355: 5b pop %ebx 110356: 5e pop %esi 110357: 5f pop %edi 110358: c9 leave 110359: c3 ret 11035a: 66 90 xchg %ax,%ax 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]); 11035c: c1 e0 03 shl $0x3,%eax 11035f: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 110366: 29 c2 sub %eax,%edx 110368: 03 15 40 92 12 00 add 0x129240,%edx 11036e: eb b2 jmp 110322 } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 110370: e8 03 46 00 00 call 114978 <__errno> 110375: 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); 110377: 83 ec 0c sub $0xc,%esp 11037a: 53 push %ebx 11037b: e8 34 b1 ff ff call 10b4b4 110380: 83 c4 10 add $0x10,%esp 110383: eb c7 jmp 11034c 110385: 8d 76 00 lea 0x0(%esi),%esi iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 110388: e8 eb 45 00 00 call 114978 <__errno> 11038d: 8b 30 mov (%eax),%esi close(filsdes[0]); 11038f: 83 ec 0c sub $0xc,%esp 110392: 8b 45 08 mov 0x8(%ebp),%eax 110395: ff 30 pushl (%eax) 110397: e8 0c 81 ff ff call 1084a8 11039c: 83 c4 10 add $0x10,%esp 11039f: eb 9f jmp 110340 1103a1: 8d 76 00 lea 0x0(%esi),%esi 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){ 1103a4: e8 cf 45 00 00 call 114978 <__errno> return -1; 1103a9: b8 ff ff ff ff mov $0xffffffff,%eax 1103ae: e9 f9 fe ff ff jmp 1102ac close(filsdes[0]); } unlink(fifopath); } if(err != 0) rtems_set_errno_and_return_minus_one(err); 1103b3: e8 c0 45 00 00 call 114978 <__errno> 1103b8: 89 30 mov %esi,(%eax) 1103ba: b8 ff ff ff ff mov $0xffffffff,%eax 1103bf: e9 e8 fe ff ff jmp 1102ac =============================================================================== 001117cc : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 1117cc: 55 push %ebp 1117cd: 89 e5 mov %esp,%ebp 1117cf: 56 push %esi 1117d0: 53 push %ebx 1117d1: 8b 75 08 mov 0x8(%ebp),%esi 1117d4: 8b 5d 10 mov 0x10(%ebp),%ebx if (cmd == FIONREAD) { 1117d7: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) 1117de: 74 0c je 1117ec *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; 1117e0: b8 ea ff ff ff mov $0xffffffea,%eax } 1117e5: 8d 65 f8 lea -0x8(%ebp),%esp 1117e8: 5b pop %ebx 1117e9: 5e pop %esi 1117ea: c9 leave 1117eb: c3 ret void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 1117ec: 85 db test %ebx,%ebx 1117ee: 75 07 jne 1117f7 return -EFAULT; 1117f0: b8 f2 ff ff ff mov $0xfffffff2,%eax 1117f5: eb ee jmp 1117e5 if (! PIPE_LOCK(pipe)) 1117f7: 50 push %eax 1117f8: 6a 00 push $0x0 1117fa: 6a 00 push $0x0 1117fc: ff 76 28 pushl 0x28(%esi) 1117ff: e8 b8 b1 ff ff call 10c9bc 111804: 83 c4 10 add $0x10,%esp 111807: 85 c0 test %eax,%eax 111809: 74 07 je 111812 <== ALWAYS TAKEN return -EINTR; 11180b: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 111810: eb d3 jmp 1117e5 <== NOT EXECUTED /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 111812: 8b 46 0c mov 0xc(%esi),%eax 111815: 89 03 mov %eax,(%ebx) PIPE_UNLOCK(pipe); 111817: 83 ec 0c sub $0xc,%esp 11181a: ff 76 28 pushl 0x28(%esi) 11181d: e8 96 b2 ff ff call 10cab8 return 0; 111822: 83 c4 10 add $0x10,%esp 111825: 31 c0 xor %eax,%eax 111827: eb bc jmp 1117e5 =============================================================================== 00111414 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 111414: 55 push %ebp 111415: 89 e5 mov %esp,%ebp 111417: 57 push %edi 111418: 56 push %esi 111419: 53 push %ebx 11141a: 83 ec 30 sub $0x30,%esp 11141d: 8b 5d 08 mov 0x8(%ebp),%ebx int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 111420: 6a 00 push $0x0 111422: 6a 00 push $0x0 111424: ff 73 28 pushl 0x28(%ebx) 111427: e8 90 b5 ff ff call 10c9bc 11142c: 83 c4 10 add $0x10,%esp 11142f: 85 c0 test %eax,%eax 111431: 0f 85 ad 00 00 00 jne 1114e4 <== NEVER TAKEN return -EINTR; while (read < count) { 111437: 8b 55 10 mov 0x10(%ebp),%edx 11143a: 85 d2 test %edx,%edx 11143c: 0f 84 7a 01 00 00 je 1115bc <== NEVER TAKEN 111442: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) 111449: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) while (PIPE_EMPTY(pipe)) { 111450: 8b 53 0c mov 0xc(%ebx),%edx 111453: 85 d2 test %edx,%edx 111455: 0f 85 99 00 00 00 jne 1114f4 /* Not an error */ if (pipe->Writers == 0) 11145b: 8b 43 14 mov 0x14(%ebx),%eax 11145e: 85 c0 test %eax,%eax 111460: 0f 84 fe 00 00 00 je 111564 goto out_locked; if (LIBIO_NODELAY(iop)) { 111466: 8b 45 14 mov 0x14(%ebp),%eax 111469: f6 40 14 01 testb $0x1,0x14(%eax) 11146d: 0f 85 f9 00 00 00 jne 11156c ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 111473: ff 43 18 incl 0x18(%ebx) PIPE_UNLOCK(pipe); 111476: 83 ec 0c sub $0xc,%esp 111479: ff 73 28 pushl 0x28(%ebx) 11147c: e8 37 b6 ff ff call 10cab8 if (! PIPE_READWAIT(pipe)) 111481: 5e pop %esi 111482: 5f pop %edi 111483: 6a 00 push $0x0 111485: ff 73 2c pushl 0x2c(%ebx) 111488: e8 57 19 00 00 call 112de4 11148d: 83 c4 0c add $0xc,%esp 111490: 83 f8 01 cmp $0x1,%eax 111493: 19 f6 sbb %esi,%esi 111495: f7 d6 not %esi 111497: 83 e6 fc and $0xfffffffc,%esi ret = -EINTR; if (! PIPE_LOCK(pipe)) { 11149a: 6a 00 push $0x0 11149c: 6a 00 push $0x0 11149e: ff 73 28 pushl 0x28(%ebx) 1114a1: e8 16 b5 ff ff call 10c9bc 1114a6: 83 c4 10 add $0x10,%esp 1114a9: 85 c0 test %eax,%eax 1114ab: 0f 85 c7 00 00 00 jne 111578 <== NEVER TAKEN /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 1114b1: ff 4b 18 decl 0x18(%ebx) if (ret != 0) 1114b4: 85 f6 test %esi,%esi 1114b6: 74 98 je 111450 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 1114b8: 83 ec 0c sub $0xc,%esp 1114bb: ff 73 28 pushl 0x28(%ebx) 1114be: e8 f5 b5 ff ff call 10cab8 1114c3: 83 c4 10 add $0x10,%esp out_nolock: if (read > 0) 1114c6: 8b 55 d4 mov -0x2c(%ebp),%edx 1114c9: 85 d2 test %edx,%edx 1114cb: 7e 0b jle 1114d8 1114cd: 8b 45 d4 mov -0x2c(%ebp),%eax return read; return ret; } 1114d0: 8d 65 f4 lea -0xc(%ebp),%esp 1114d3: 5b pop %ebx 1114d4: 5e pop %esi 1114d5: 5f pop %edi 1114d6: c9 leave 1114d7: c3 ret PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; 1114d8: 89 f0 mov %esi,%eax } 1114da: 8d 65 f4 lea -0xc(%ebp),%esp 1114dd: 5b pop %ebx 1114de: 5e pop %esi 1114df: 5f pop %edi 1114e0: c9 leave 1114e1: c3 ret 1114e2: 66 90 xchg %ax,%ax ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; 1114e4: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 1114e9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1114ec: 5b pop %ebx <== NOT EXECUTED 1114ed: 5e pop %esi <== NOT EXECUTED 1114ee: 5f pop %edi <== NOT EXECUTED 1114ef: c9 leave <== NOT EXECUTED 1114f0: c3 ret <== NOT EXECUTED 1114f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 1114f4: 8b 45 10 mov 0x10(%ebp),%eax 1114f7: 2b 45 d0 sub -0x30(%ebp),%eax 1114fa: 89 55 cc mov %edx,-0x34(%ebp) 1114fd: 39 c2 cmp %eax,%edx 1114ff: 76 03 jbe 111504 111501: 89 45 cc mov %eax,-0x34(%ebp) chunk1 = pipe->Size - pipe->Start; 111504: 8b 73 08 mov 0x8(%ebx),%esi 111507: 8b 43 04 mov 0x4(%ebx),%eax 11150a: 29 f0 sub %esi,%eax if (chunk > chunk1) { 11150c: 39 45 cc cmp %eax,-0x34(%ebp) 11150f: 7f 71 jg 111582 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); 111511: 8b 45 0c mov 0xc(%ebp),%eax 111514: 03 45 d0 add -0x30(%ebp),%eax 111517: 03 33 add (%ebx),%esi 111519: 89 c7 mov %eax,%edi 11151b: 8b 4d cc mov -0x34(%ebp),%ecx 11151e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) pipe->Start += chunk; 111520: 8b 45 cc mov -0x34(%ebp),%eax 111523: 03 43 08 add 0x8(%ebx),%eax pipe->Start %= pipe->Size; 111526: 31 d2 xor %edx,%edx 111528: f7 73 04 divl 0x4(%ebx) 11152b: 89 53 08 mov %edx,0x8(%ebx) pipe->Length -= chunk; 11152e: 8b 43 0c mov 0xc(%ebx),%eax 111531: 2b 45 cc sub -0x34(%ebp),%eax 111534: 89 43 0c mov %eax,0xc(%ebx) /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 111537: 85 c0 test %eax,%eax 111539: 75 07 jne 111542 pipe->Start = 0; 11153b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) if (pipe->waitingWriters > 0) 111542: 8b 4b 1c mov 0x1c(%ebx),%ecx 111545: 85 c9 test %ecx,%ecx 111547: 75 5f jne 1115a8 PIPE_WAKEUPWRITERS(pipe); read += chunk; 111549: 8b 45 cc mov -0x34(%ebp),%eax 11154c: 01 45 d4 add %eax,-0x2c(%ebp) int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 11154f: 8b 45 d4 mov -0x2c(%ebp),%eax 111552: 89 45 d0 mov %eax,-0x30(%ebp) 111555: 8b 45 10 mov 0x10(%ebp),%eax 111558: 39 45 d4 cmp %eax,-0x2c(%ebp) 11155b: 0f 82 ef fe ff ff jb 111450 <== NEVER TAKEN 111561: 8d 76 00 lea 0x0(%esi),%esi while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 111564: 31 f6 xor %esi,%esi 111566: e9 4d ff ff ff jmp 1114b8 11156b: 90 nop goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 11156c: be f5 ff ff ff mov $0xfffffff5,%esi 111571: e9 42 ff ff ff jmp 1114b8 111576: 66 90 xchg %ax,%ax PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; 111578: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 11157d: e9 44 ff ff ff jmp 1114c6 <== 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); 111582: 8b 55 0c mov 0xc(%ebp),%edx 111585: 03 55 d0 add -0x30(%ebp),%edx 111588: 03 33 add (%ebx),%esi 11158a: 89 d7 mov %edx,%edi 11158c: 89 c1 mov %eax,%ecx 11158e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 111590: 8b 55 d0 mov -0x30(%ebp),%edx 111593: 01 c2 add %eax,%edx 111595: 03 55 0c add 0xc(%ebp),%edx 111598: 8b 4d cc mov -0x34(%ebp),%ecx 11159b: 29 c1 sub %eax,%ecx 11159d: 8b 33 mov (%ebx),%esi 11159f: 89 d7 mov %edx,%edi 1115a1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 1115a3: e9 78 ff ff ff jmp 111520 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 1115a8: 83 ec 08 sub $0x8,%esp 1115ab: 8d 45 e4 lea -0x1c(%ebp),%eax 1115ae: 50 push %eax 1115af: ff 73 30 pushl 0x30(%ebx) 1115b2: e8 c9 17 00 00 call 112d80 1115b7: 83 c4 10 add $0x10,%esp 1115ba: eb 8d jmp 111549 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 1115bc: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 1115c3: 31 f6 xor %esi,%esi <== NOT EXECUTED 1115c5: e9 ee fe ff ff jmp 1114b8 <== NOT EXECUTED =============================================================================== 00110ec0 : */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 110ec0: 55 push %ebp 110ec1: 89 e5 mov %esp,%ebp 110ec3: 57 push %edi 110ec4: 56 push %esi 110ec5: 53 push %ebx 110ec6: 83 ec 1c sub $0x1c,%esp 110ec9: 8b 7d 08 mov 0x8(%ebp),%edi pipe_control_t *pipe = *pipep; 110ecc: 8b 1f mov (%edi),%ebx /* WARN pipe not released! */ if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); 110ece: 8b 45 0c mov 0xc(%ebp),%eax 110ed1: 8b 40 14 mov 0x14(%eax),%eax 110ed4: 89 c6 mov %eax,%esi 110ed6: 83 e6 06 and $0x6,%esi if (mode & LIBIO_FLAGS_READ) 110ed9: a8 02 test $0x2,%al 110edb: 74 03 je 110ee0 pipe->Readers --; 110edd: ff 4b 10 decl 0x10(%ebx) if (mode & LIBIO_FLAGS_WRITE) 110ee0: f7 c6 04 00 00 00 test $0x4,%esi 110ee6: 74 03 je 110eeb pipe->Writers --; 110ee8: ff 4b 14 decl 0x14(%ebx) PIPE_UNLOCK(pipe); 110eeb: 83 ec 0c sub $0xc,%esp 110eee: ff 73 28 pushl 0x28(%ebx) 110ef1: e8 c2 bb ff ff call 10cab8 if (pipe->Readers == 0 && pipe->Writers == 0) { 110ef6: 83 c4 10 add $0x10,%esp 110ef9: 8b 53 10 mov 0x10(%ebx),%edx 110efc: 85 d2 test %edx,%edx 110efe: 74 2c je 110f2c *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) 110f00: 8b 43 14 mov 0x14(%ebx),%eax 110f03: 85 c0 test %eax,%eax 110f05: 75 17 jne 110f1e <== NEVER TAKEN 110f07: 83 fe 02 cmp $0x2,%esi 110f0a: 74 12 je 110f1e <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 110f0c: 83 ec 08 sub $0x8,%esp 110f0f: 8d 45 e4 lea -0x1c(%ebp),%eax 110f12: 50 push %eax 110f13: ff 73 2c pushl 0x2c(%ebx) 110f16: e8 65 1e 00 00 call 112d80 110f1b: 83 c4 10 add $0x10,%esp pipe_unlock(); 110f1e: e8 85 ff ff ff call 110ea8 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 110f23: 8d 65 f4 lea -0xc(%ebp),%esp 110f26: 5b pop %ebx 110f27: 5e pop %esi 110f28: 5f pop %edi 110f29: c9 leave 110f2a: c3 ret 110f2b: 90 nop if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 110f2c: 8b 43 14 mov 0x14(%ebx),%eax 110f2f: 85 c0 test %eax,%eax 110f31: 74 25 je 110f58 delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 110f33: 83 fe 04 cmp $0x4,%esi 110f36: 74 e6 je 110f1e <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 110f38: 83 ec 08 sub $0x8,%esp 110f3b: 8d 45 e4 lea -0x1c(%ebp),%eax 110f3e: 50 push %eax 110f3f: ff 73 30 pushl 0x30(%ebx) 110f42: e8 39 1e 00 00 call 112d80 110f47: 83 c4 10 add $0x10,%esp else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); pipe_unlock(); 110f4a: e8 59 ff ff ff call 110ea8 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 110f4f: 8d 65 f4 lea -0xc(%ebp),%esp 110f52: 5b pop %ebx 110f53: 5e pop %esi 110f54: 5f pop %edi 110f55: c9 leave 110f56: c3 ret 110f57: 90 nop /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 110f58: 83 ec 0c sub $0xc,%esp 110f5b: ff 73 2c pushl 0x2c(%ebx) 110f5e: e8 8d 1d 00 00 call 112cf0 rtems_barrier_delete(pipe->writeBarrier); 110f63: 5e pop %esi 110f64: ff 73 30 pushl 0x30(%ebx) 110f67: e8 84 1d 00 00 call 112cf0 rtems_semaphore_delete(pipe->Semaphore); 110f6c: 59 pop %ecx 110f6d: ff 73 28 pushl 0x28(%ebx) 110f70: e8 a3 b9 ff ff call 10c918 free(pipe->Buffer); 110f75: 5a pop %edx 110f76: ff 33 pushl (%ebx) 110f78: e8 c3 7f ff ff call 108f40 free(pipe); 110f7d: 89 1c 24 mov %ebx,(%esp) 110f80: e8 bb 7f ff ff call 108f40 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 110f85: c7 07 00 00 00 00 movl $0x0,(%edi) 110f8b: 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(); 110f8e: e8 15 ff ff ff call 110ea8 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 110f93: 8d 65 f4 lea -0xc(%ebp),%esp 110f96: 5b pop %ebx 110f97: 5e pop %esi 110f98: 5f pop %edi 110f99: c9 leave 110f9a: c3 ret =============================================================================== 001115cc : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 1115cc: 55 push %ebp 1115cd: 89 e5 mov %esp,%ebp 1115cf: 57 push %edi 1115d0: 56 push %esi 1115d1: 53 push %ebx 1115d2: 83 ec 2c sub $0x2c,%esp 1115d5: 8b 5d 10 mov 0x10(%ebp),%ebx int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 1115d8: 85 db test %ebx,%ebx 1115da: 75 0c jne 1115e8 <== ALWAYS TAKEN return 0; 1115dc: 31 c0 xor %eax,%eax #endif if (written > 0) return written; return ret; } 1115de: 8d 65 f4 lea -0xc(%ebp),%esp 1115e1: 5b pop %ebx 1115e2: 5e pop %esi 1115e3: 5f pop %edi 1115e4: c9 leave 1115e5: c3 ret 1115e6: 66 90 xchg %ax,%ax /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 1115e8: 56 push %esi 1115e9: 6a 00 push $0x0 1115eb: 6a 00 push $0x0 1115ed: 8b 45 08 mov 0x8(%ebp),%eax 1115f0: ff 70 28 pushl 0x28(%eax) 1115f3: e8 c4 b3 ff ff call 10c9bc 1115f8: 83 c4 10 add $0x10,%esp 1115fb: 85 c0 test %eax,%eax 1115fd: 0f 85 4a 01 00 00 jne 11174d <== NEVER TAKEN return -EINTR; if (pipe->Readers == 0) { 111603: 8b 45 08 mov 0x8(%ebp),%eax 111606: 8b 48 10 mov 0x10(%eax),%ecx 111609: 85 c9 test %ecx,%ecx 11160b: 0f 84 57 01 00 00 je 111768 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 111611: 8b 48 04 mov 0x4(%eax),%ecx 111614: 39 cb cmp %ecx,%ebx 111616: 0f 87 42 01 00 00 ja 11175e <== NEVER TAKEN 11161c: 89 de mov %ebx,%esi 11161e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) 111625: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 11162c: 89 5d c8 mov %ebx,-0x38(%ebp) 11162f: 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) { 111632: 8b 43 0c mov 0xc(%ebx),%eax 111635: 89 ca mov %ecx,%edx 111637: 29 c2 sub %eax,%edx 111639: 39 f2 cmp %esi,%edx 11163b: 73 6f jae 1116ac if (LIBIO_NODELAY(iop)) { 11163d: 8b 45 14 mov 0x14(%ebp),%eax 111640: f6 40 14 01 testb $0x1,0x14(%eax) 111644: 0f 85 48 01 00 00 jne 111792 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 11164a: ff 43 1c incl 0x1c(%ebx) PIPE_UNLOCK(pipe); 11164d: 83 ec 0c sub $0xc,%esp 111650: ff 73 28 pushl 0x28(%ebx) 111653: e8 60 b4 ff ff call 10cab8 if (! PIPE_WRITEWAIT(pipe)) 111658: 58 pop %eax 111659: 5a pop %edx 11165a: 6a 00 push $0x0 11165c: ff 73 30 pushl 0x30(%ebx) 11165f: e8 80 17 00 00 call 112de4 111664: 83 c4 0c add $0xc,%esp 111667: 83 f8 01 cmp $0x1,%eax 11166a: 19 ff sbb %edi,%edi 11166c: f7 d7 not %edi 11166e: 83 e7 fc and $0xfffffffc,%edi ret = -EINTR; if (! PIPE_LOCK(pipe)) { 111671: 6a 00 push $0x0 111673: 6a 00 push $0x0 111675: ff 73 28 pushl 0x28(%ebx) 111678: e8 3f b3 ff ff call 10c9bc 11167d: 83 c4 10 add $0x10,%esp 111680: 85 c0 test %eax,%eax 111682: 0f 85 03 01 00 00 jne 11178b <== NEVER TAKEN /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 111688: ff 4b 1c decl 0x1c(%ebx) if (ret != 0) 11168b: 85 ff test %edi,%edi 11168d: 0f 85 95 00 00 00 jne 111728 <== NEVER TAKEN goto out_locked; if (pipe->Readers == 0) { 111693: 8b 7b 10 mov 0x10(%ebx),%edi 111696: 85 ff test %edi,%edi 111698: 0f 84 85 00 00 00 je 111723 <== NEVER TAKEN 11169e: 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) { 1116a1: 8b 43 0c mov 0xc(%ebx),%eax 1116a4: 89 ca mov %ecx,%edx 1116a6: 29 c2 sub %eax,%edx 1116a8: 39 f2 cmp %esi,%edx 1116aa: 72 91 jb 11163d <== NEVER TAKEN ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 1116ac: 8b 75 c8 mov -0x38(%ebp),%esi 1116af: 2b 75 d0 sub -0x30(%ebp),%esi 1116b2: 89 55 cc mov %edx,-0x34(%ebp) 1116b5: 39 f2 cmp %esi,%edx 1116b7: 76 03 jbe 1116bc 1116b9: 89 75 cc mov %esi,-0x34(%ebp) chunk1 = pipe->Size - PIPE_WSTART(pipe); 1116bc: 03 43 08 add 0x8(%ebx),%eax 1116bf: 31 d2 xor %edx,%edx 1116c1: f7 f1 div %ecx 1116c3: 89 c8 mov %ecx,%eax 1116c5: 29 d0 sub %edx,%eax if (chunk > chunk1) { 1116c7: 39 45 cc cmp %eax,-0x34(%ebp) 1116ca: 0f 8e c9 00 00 00 jle 111799 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 1116d0: 03 13 add (%ebx),%edx 1116d2: 8b 75 0c mov 0xc(%ebp),%esi 1116d5: 03 75 d0 add -0x30(%ebp),%esi 1116d8: 89 d7 mov %edx,%edi 1116da: 89 c1 mov %eax,%ecx 1116dc: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 1116de: 8b 13 mov (%ebx),%edx 1116e0: 8b 4d cc mov -0x34(%ebp),%ecx 1116e3: 29 c1 sub %eax,%ecx 1116e5: 03 45 d0 add -0x30(%ebp),%eax 1116e8: 8b 75 0c mov 0xc(%ebp),%esi 1116eb: 01 c6 add %eax,%esi 1116ed: 89 d7 mov %edx,%edi 1116ef: f3 a4 rep movsb %ds:(%esi),%es:(%edi) } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 1116f1: 8b 45 cc mov -0x34(%ebp),%eax 1116f4: 01 43 0c add %eax,0xc(%ebx) if (pipe->waitingReaders > 0) 1116f7: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 1116fb: 0f 85 ac 00 00 00 jne 1117ad PIPE_WAKEUPREADERS(pipe); written += chunk; 111701: 8b 45 cc mov -0x34(%ebp),%eax 111704: 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) { 111707: 8b 45 d4 mov -0x2c(%ebp),%eax 11170a: 89 45 d0 mov %eax,-0x30(%ebp) 11170d: 39 45 c8 cmp %eax,-0x38(%ebp) 111710: 0f 86 ad 00 00 00 jbe 1117c3 <== ALWAYS TAKEN 111716: 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; 111719: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED 11171e: e9 0f ff ff ff jmp 111632 <== NOT EXECUTED pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; 111723: bf e0 ff ff ff mov $0xffffffe0,%edi <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 111728: 83 ec 0c sub $0xc,%esp 11172b: 8b 45 08 mov 0x8(%ebp),%eax 11172e: ff 70 28 pushl 0x28(%eax) 111731: e8 82 b3 ff ff call 10cab8 111736: 83 c4 10 add $0x10,%esp out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 111739: 83 ff e0 cmp $0xffffffe0,%edi 11173c: 74 38 je 111776 kill(getpid(), SIGPIPE); #endif if (written > 0) 11173e: 8b 4d d4 mov -0x2c(%ebp),%ecx 111741: 85 c9 test %ecx,%ecx 111743: 7e 12 jle 111757 111745: 8b 45 d4 mov -0x2c(%ebp),%eax 111748: e9 91 fe ff ff jmp 1115de /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) return -EINTR; 11174d: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 111752: e9 87 fe ff ff jmp 1115de <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 111757: 89 f8 mov %edi,%eax 111759: e9 80 fe ff ff jmp 1115de ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 11175e: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED 111763: e9 b6 fe ff ff jmp 11161e <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; 111768: bf e0 ff ff ff mov $0xffffffe0,%edi const void *buffer, size_t count, rtems_libio_t *iop ) { int chunk, chunk1, written = 0, ret = 0; 11176d: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) 111774: eb b2 jmp 111728 out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); 111776: e8 21 08 00 00 call 111f9c 11177b: 83 ec 08 sub $0x8,%esp 11177e: 6a 0d push $0xd 111780: 50 push %eax 111781: e8 6e 0b 00 00 call 1122f4 111786: 83 c4 10 add $0x10,%esp 111789: eb b3 jmp 11173e PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; 11178b: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED 111790: eb ac jmp 11173e <== NOT EXECUTED chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 111792: bf f5 ff ff ff mov $0xfffffff5,%edi 111797: eb 8f jmp 111728 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); 111799: 03 13 add (%ebx),%edx 11179b: 8b 75 0c mov 0xc(%ebp),%esi 11179e: 03 75 d0 add -0x30(%ebp),%esi 1117a1: 89 d7 mov %edx,%edi 1117a3: 8b 4d cc mov -0x34(%ebp),%ecx 1117a6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 1117a8: e9 44 ff ff ff jmp 1116f1 pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 1117ad: 56 push %esi 1117ae: 56 push %esi 1117af: 8d 45 e4 lea -0x1c(%ebp),%eax 1117b2: 50 push %eax 1117b3: ff 73 2c pushl 0x2c(%ebx) 1117b6: e8 c5 15 00 00 call 112d80 1117bb: 83 c4 10 add $0x10,%esp 1117be: e9 3e ff ff ff jmp 111701 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 1117c3: 31 ff xor %edi,%edi 1117c5: e9 5e ff ff ff jmp 111728 =============================================================================== 0010b0d8 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10b0d8: 55 push %ebp 10b0d9: 89 e5 mov %esp,%ebp 10b0db: 53 push %ebx 10b0dc: 83 ec 04 sub $0x4,%esp 10b0df: 8b 45 0c mov 0xc(%ebp),%eax /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10b0e2: ff 05 c8 dc 12 00 incl 0x12dcc8 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10b0e8: 8d 50 ff lea -0x1(%eax),%edx 10b0eb: 85 c2 test %eax,%edx 10b0ed: 75 05 jne 10b0f4 <== NEVER TAKEN 10b0ef: 83 f8 03 cmp $0x3,%eax 10b0f2: 77 0c ja 10b100 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10b0f4: b8 16 00 00 00 mov $0x16,%eax 10b0f9: 5a pop %edx 10b0fa: 5b pop %ebx 10b0fb: c9 leave 10b0fc: c3 ret 10b0fd: 8d 76 00 lea 0x0(%esi),%esi 10b100: 59 pop %ecx 10b101: 5b pop %ebx 10b102: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10b103: e9 78 01 00 00 jmp 10b280 =============================================================================== 0010fee8 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 10fee8: 55 push %ebp 10fee9: 89 e5 mov %esp,%ebp 10feeb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10feee: 85 c0 test %eax,%eax 10fef0: 74 12 je 10ff04 10fef2: 8b 10 mov (%eax),%edx 10fef4: 85 d2 test %edx,%edx 10fef6: 74 0c je 10ff04 return EINVAL; attr->is_initialized = false; 10fef8: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10fefe: 31 c0 xor %eax,%eax } 10ff00: c9 leave 10ff01: c3 ret 10ff02: 66 90 xchg %ax,%ax int pthread_attr_destroy( pthread_attr_t *attr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 10ff04: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10ff09: c9 leave 10ff0a: c3 ret =============================================================================== 0010ffe4 : int pthread_attr_getscope( const pthread_attr_t *attr, int *contentionscope ) { 10ffe4: 55 push %ebp 10ffe5: 89 e5 mov %esp,%ebp 10ffe7: 8b 45 08 mov 0x8(%ebp),%eax 10ffea: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !contentionscope ) 10ffed: 85 c0 test %eax,%eax 10ffef: 74 13 je 110004 <== NEVER TAKEN 10fff1: 8b 08 mov (%eax),%ecx 10fff3: 85 c9 test %ecx,%ecx 10fff5: 74 0d je 110004 <== NEVER TAKEN 10fff7: 85 d2 test %edx,%edx 10fff9: 74 09 je 110004 <== NEVER TAKEN return EINVAL; *contentionscope = attr->contentionscope; 10fffb: 8b 40 0c mov 0xc(%eax),%eax 10fffe: 89 02 mov %eax,(%edx) return 0; 110000: 31 c0 xor %eax,%eax } 110002: c9 leave 110003: c3 ret const pthread_attr_t *attr, int *contentionscope ) { if ( !attr || !attr->is_initialized || !contentionscope ) return EINVAL; 110004: b8 16 00 00 00 mov $0x16,%eax *contentionscope = attr->contentionscope; return 0; } 110009: c9 leave 11000a: c3 ret =============================================================================== 00110034 : int pthread_attr_getstack( const pthread_attr_t *attr, void **stackaddr, size_t *stacksize ) { 110034: 55 push %ebp 110035: 89 e5 mov %esp,%ebp 110037: 53 push %ebx 110038: 8b 45 08 mov 0x8(%ebp),%eax 11003b: 8b 55 0c mov 0xc(%ebp),%edx 11003e: 8b 4d 10 mov 0x10(%ebp),%ecx if ( !attr || !attr->is_initialized || !stackaddr || !stacksize ) 110041: 85 c0 test %eax,%eax 110043: 74 1f je 110064 110045: 8b 18 mov (%eax),%ebx 110047: 85 db test %ebx,%ebx 110049: 74 19 je 110064 11004b: 85 d2 test %edx,%edx 11004d: 74 15 je 110064 11004f: 85 c9 test %ecx,%ecx 110051: 74 11 je 110064 return EINVAL; *stackaddr = attr->stackaddr; 110053: 8b 58 04 mov 0x4(%eax),%ebx 110056: 89 1a mov %ebx,(%edx) *stacksize = attr->stacksize; 110058: 8b 40 08 mov 0x8(%eax),%eax 11005b: 89 01 mov %eax,(%ecx) return 0; 11005d: 31 c0 xor %eax,%eax } 11005f: 5b pop %ebx 110060: c9 leave 110061: c3 ret 110062: 66 90 xchg %ax,%ax void **stackaddr, size_t *stacksize ) { if ( !attr || !attr->is_initialized || !stackaddr || !stacksize ) return EINVAL; 110064: b8 16 00 00 00 mov $0x16,%eax *stackaddr = attr->stackaddr; *stacksize = attr->stacksize; return 0; } 110069: 5b pop %ebx 11006a: c9 leave 11006b: c3 ret =============================================================================== 001100e8 : int pthread_attr_setguardsize( pthread_attr_t *attr, size_t guardsize ) { 1100e8: 55 push %ebp 1100e9: 89 e5 mov %esp,%ebp 1100eb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 1100ee: 85 c0 test %eax,%eax 1100f0: 74 12 je 110104 1100f2: 8b 10 mov (%eax),%edx 1100f4: 85 d2 test %edx,%edx 1100f6: 74 0c je 110104 return EINVAL; attr->guardsize = guardsize; 1100f8: 8b 55 0c mov 0xc(%ebp),%edx 1100fb: 89 50 34 mov %edx,0x34(%eax) return 0; 1100fe: 31 c0 xor %eax,%eax } 110100: c9 leave 110101: c3 ret 110102: 66 90 xchg %ax,%ax pthread_attr_t *attr, size_t guardsize ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110104: b8 16 00 00 00 mov $0x16,%eax attr->guardsize = guardsize; return 0; } 110109: c9 leave 11010a: c3 ret =============================================================================== 001110dc : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 1110dc: 55 push %ebp 1110dd: 89 e5 mov %esp,%ebp 1110df: 8b 45 08 mov 0x8(%ebp),%eax 1110e2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 1110e5: 85 c0 test %eax,%eax 1110e7: 74 1f je 111108 1110e9: 8b 08 mov (%eax),%ecx 1110eb: 85 c9 test %ecx,%ecx 1110ed: 74 19 je 111108 return EINVAL; switch ( inheritsched ) { 1110ef: 8d 4a ff lea -0x1(%edx),%ecx 1110f2: 83 f9 01 cmp $0x1,%ecx 1110f5: 76 09 jbe 111100 case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; return 0; default: return ENOTSUP; 1110f7: b8 86 00 00 00 mov $0x86,%eax } } 1110fc: c9 leave 1110fd: c3 ret 1110fe: 66 90 xchg %ax,%ax return EINVAL; switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 111100: 89 50 10 mov %edx,0x10(%eax) return 0; 111103: 31 c0 xor %eax,%eax default: return ENOTSUP; } } 111105: c9 leave 111106: c3 ret 111107: 90 nop pthread_attr_t *attr, int inheritsched ) { if ( !attr || !attr->is_initialized ) return EINVAL; 111108: b8 16 00 00 00 mov $0x16,%eax return 0; default: return ENOTSUP; } } 11110d: c9 leave 11110e: c3 ret =============================================================================== 00110140 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 110140: 55 push %ebp 110141: 89 e5 mov %esp,%ebp 110143: 57 push %edi 110144: 56 push %esi 110145: 8b 7d 08 mov 0x8(%ebp),%edi 110148: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 11014b: 85 ff test %edi,%edi 11014d: 74 1d je 11016c 11014f: 8b 07 mov (%edi),%eax 110151: 85 c0 test %eax,%eax 110153: 74 17 je 11016c 110155: 85 f6 test %esi,%esi 110157: 74 13 je 11016c return EINVAL; attr->schedparam = *param; 110159: 83 c7 18 add $0x18,%edi 11015c: b9 07 00 00 00 mov $0x7,%ecx 110161: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 110163: 31 c0 xor %eax,%eax } 110165: 5e pop %esi 110166: 5f pop %edi 110167: c9 leave 110168: c3 ret 110169: 8d 76 00 lea 0x0(%esi),%esi pthread_attr_t *attr, const struct sched_param *param ) { if ( !attr || !attr->is_initialized || !param ) return EINVAL; 11016c: b8 16 00 00 00 mov $0x16,%eax attr->schedparam = *param; return 0; } 110171: 5e pop %esi 110172: 5f pop %edi 110173: c9 leave 110174: c3 ret =============================================================================== 00110178 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 110178: 55 push %ebp 110179: 89 e5 mov %esp,%ebp 11017b: 8b 45 08 mov 0x8(%ebp),%eax 11017e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 110181: 85 c0 test %eax,%eax 110183: 74 23 je 1101a8 110185: 8b 08 mov (%eax),%ecx 110187: 85 c9 test %ecx,%ecx 110189: 74 1d je 1101a8 return EINVAL; switch ( policy ) { 11018b: 85 d2 test %edx,%edx 11018d: 78 0a js 110199 11018f: 83 fa 02 cmp $0x2,%edx 110192: 7e 0c jle 1101a0 110194: 83 fa 04 cmp $0x4,%edx 110197: 74 07 je 1101a0 <== ALWAYS TAKEN case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 110199: b8 86 00 00 00 mov $0x86,%eax } } 11019e: c9 leave 11019f: c3 ret switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 1101a0: 89 50 14 mov %edx,0x14(%eax) return 0; 1101a3: 31 c0 xor %eax,%eax default: return ENOTSUP; } } 1101a5: c9 leave 1101a6: c3 ret 1101a7: 90 nop pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; 1101a8: b8 16 00 00 00 mov $0x16,%eax return 0; default: return ENOTSUP; } } 1101ad: c9 leave 1101ae: c3 ret =============================================================================== 001101b0 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 1101b0: 55 push %ebp 1101b1: 89 e5 mov %esp,%ebp 1101b3: 8b 45 08 mov 0x8(%ebp),%eax 1101b6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 1101b9: 85 c0 test %eax,%eax 1101bb: 74 1a je 1101d7 1101bd: 8b 08 mov (%eax),%ecx 1101bf: 85 c9 test %ecx,%ecx 1101c1: 74 14 je 1101d7 return EINVAL; switch ( contentionscope ) { 1101c3: 85 d2 test %edx,%edx 1101c5: 75 0d jne 1101d4 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 1101c7: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) return 0; 1101ce: 31 c0 xor %eax,%eax return ENOTSUP; default: return EINVAL; } } 1101d0: c9 leave 1101d1: c3 ret 1101d2: 66 90 xchg %ax,%ax ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 1101d4: 4a dec %edx 1101d5: 74 09 je 1101e0 case PTHREAD_SCOPE_SYSTEM: return ENOTSUP; default: return EINVAL; 1101d7: b8 16 00 00 00 mov $0x16,%eax } } 1101dc: c9 leave 1101dd: c3 ret 1101de: 66 90 xchg %ax,%ax case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; case PTHREAD_SCOPE_SYSTEM: return ENOTSUP; 1101e0: b8 86 00 00 00 mov $0x86,%eax default: return EINVAL; } } 1101e5: c9 leave 1101e6: c3 ret =============================================================================== 0011020c : int pthread_attr_setstack( pthread_attr_t *attr, void *stackaddr, size_t stacksize ) { 11020c: 55 push %ebp 11020d: 89 e5 mov %esp,%ebp 11020f: 8b 45 08 mov 0x8(%ebp),%eax 110212: 8b 55 10 mov 0x10(%ebp),%edx if ( !attr || !attr->is_initialized ) 110215: 85 c0 test %eax,%eax 110217: 74 27 je 110240 110219: 8b 08 mov (%eax),%ecx 11021b: 85 c9 test %ecx,%ecx 11021d: 74 21 je 110240 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 11021f: 8b 0d 38 de 12 00 mov 0x12de38,%ecx 110225: d1 e1 shl %ecx 110227: 39 d1 cmp %edx,%ecx 110229: 77 0d ja 110238 attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 11022b: 89 50 08 mov %edx,0x8(%eax) attr->stackaddr = stackaddr; 11022e: 8b 55 0c mov 0xc(%ebp),%edx 110231: 89 50 04 mov %edx,0x4(%eax) return 0; 110234: 31 c0 xor %eax,%eax } 110236: c9 leave 110237: c3 ret { if ( !attr || !attr->is_initialized ) return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 110238: 89 48 08 mov %ecx,0x8(%eax) 11023b: eb f1 jmp 11022e 11023d: 8d 76 00 lea 0x0(%esi),%esi void *stackaddr, size_t stacksize ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110240: b8 16 00 00 00 mov $0x16,%eax else attr->stacksize = stacksize; attr->stackaddr = stackaddr; return 0; } 110245: c9 leave 110246: c3 ret =============================================================================== 001101e8 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 1101e8: 55 push %ebp 1101e9: 89 e5 mov %esp,%ebp 1101eb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 1101ee: 85 c0 test %eax,%eax 1101f0: 74 12 je 110204 1101f2: 8b 10 mov (%eax),%edx 1101f4: 85 d2 test %edx,%edx 1101f6: 74 0c je 110204 return EINVAL; attr->stackaddr = stackaddr; 1101f8: 8b 55 0c mov 0xc(%ebp),%edx 1101fb: 89 50 04 mov %edx,0x4(%eax) return 0; 1101fe: 31 c0 xor %eax,%eax } 110200: c9 leave 110201: c3 ret 110202: 66 90 xchg %ax,%ax pthread_attr_t *attr, void *stackaddr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110204: b8 16 00 00 00 mov $0x16,%eax attr->stackaddr = stackaddr; return 0; } 110209: c9 leave 11020a: c3 ret =============================================================================== 00111110 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 111110: 55 push %ebp 111111: 89 e5 mov %esp,%ebp 111113: 8b 45 08 mov 0x8(%ebp),%eax 111116: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111119: 85 c0 test %eax,%eax 11111b: 74 23 je 111140 11111d: 8b 08 mov (%eax),%ecx 11111f: 85 c9 test %ecx,%ecx 111121: 74 1d je 111140 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 111123: 8b 0d d8 47 12 00 mov 0x1247d8,%ecx 111129: d1 e1 shl %ecx 11112b: 39 d1 cmp %edx,%ecx 11112d: 77 09 ja 111138 attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 11112f: 89 50 08 mov %edx,0x8(%eax) return 0; 111132: 31 c0 xor %eax,%eax } 111134: c9 leave 111135: c3 ret 111136: 66 90 xchg %ax,%ax { if ( !attr || !attr->is_initialized ) return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 111138: 89 48 08 mov %ecx,0x8(%eax) else attr->stacksize = stacksize; return 0; 11113b: 31 c0 xor %eax,%eax } 11113d: c9 leave 11113e: c3 ret 11113f: 90 nop pthread_attr_t *attr, size_t stacksize ) { if ( !attr || !attr->is_initialized ) return EINVAL; 111140: 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; } 111145: c9 leave 111146: c3 ret =============================================================================== 0010af34 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10af34: 55 push %ebp 10af35: 89 e5 mov %esp,%ebp 10af37: 57 push %edi 10af38: 56 push %esi 10af39: 53 push %ebx 10af3a: 83 ec 2c sub $0x2c,%esp 10af3d: 8b 5d 08 mov 0x8(%ebp),%ebx 10af40: 8b 7d 0c mov 0xc(%ebp),%edi 10af43: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10af46: 85 db test %ebx,%ebx 10af48: 0f 84 82 00 00 00 je 10afd0 return EINVAL; if ( count == 0 ) 10af4e: 85 f6 test %esi,%esi 10af50: 74 7e je 10afd0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10af52: 85 ff test %edi,%edi 10af54: 0f 84 92 00 00 00 je 10afec } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10af5a: 8b 17 mov (%edi),%edx 10af5c: 85 d2 test %edx,%edx 10af5e: 74 70 je 10afd0 return EINVAL; switch ( the_attr->process_shared ) { 10af60: 8b 47 04 mov 0x4(%edi),%eax 10af63: 85 c0 test %eax,%eax 10af65: 75 69 jne 10afd0 <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10af67: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10af6e: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10af71: a1 cc 8e 12 00 mov 0x128ecc,%eax 10af76: 40 inc %eax 10af77: a3 cc 8e 12 00 mov %eax,0x128ecc * 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 ); 10af7c: 83 ec 0c sub $0xc,%esp 10af7f: 68 e0 92 12 00 push $0x1292e0 10af84: e8 0f 1f 00 00 call 10ce98 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10af89: 83 c4 10 add $0x10,%esp 10af8c: 85 c0 test %eax,%eax 10af8e: 74 50 je 10afe0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10af90: 83 ec 08 sub $0x8,%esp 10af93: 8d 55 e0 lea -0x20(%ebp),%edx 10af96: 52 push %edx 10af97: 8d 50 10 lea 0x10(%eax),%edx 10af9a: 52 push %edx 10af9b: 89 45 d4 mov %eax,-0x2c(%ebp) 10af9e: e8 29 16 00 00 call 10c5cc <_CORE_barrier_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10afa3: 8b 45 d4 mov -0x2c(%ebp),%eax 10afa6: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10afa9: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10afac: 8b 0d fc 92 12 00 mov 0x1292fc,%ecx 10afb2: 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; 10afb5: 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; 10afbc: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10afbe: e8 99 2e 00 00 call 10de5c <_Thread_Enable_dispatch> return 0; 10afc3: 83 c4 10 add $0x10,%esp 10afc6: 31 c0 xor %eax,%eax } 10afc8: 8d 65 f4 lea -0xc(%ebp),%esp 10afcb: 5b pop %ebx 10afcc: 5e pop %esi 10afcd: 5f pop %edi 10afce: c9 leave 10afcf: c3 ret switch ( the_attr->process_shared ) { case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 10afd0: 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; } 10afd5: 8d 65 f4 lea -0xc(%ebp),%esp 10afd8: 5b pop %ebx 10afd9: 5e pop %esi 10afda: 5f pop %edi 10afdb: c9 leave 10afdc: c3 ret 10afdd: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 10afe0: e8 77 2e 00 00 call 10de5c <_Thread_Enable_dispatch> return EAGAIN; 10afe5: b8 0b 00 00 00 mov $0xb,%eax 10afea: eb e9 jmp 10afd5 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10afec: 83 ec 0c sub $0xc,%esp 10afef: 8d 7d d8 lea -0x28(%ebp),%edi 10aff2: 57 push %edi 10aff3: e8 7c fe ff ff call 10ae74 10aff8: 83 c4 10 add $0x10,%esp 10affb: e9 5a ff ff ff jmp 10af5a =============================================================================== 0010b000 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10b000: 55 push %ebp 10b001: 89 e5 mov %esp,%ebp 10b003: 83 ec 18 sub $0x18,%esp 10b006: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b009: 85 c0 test %eax,%eax 10b00b: 74 4f je 10b05c RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b00d: 51 push %ecx return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); 10b00e: 8d 55 f4 lea -0xc(%ebp),%edx 10b011: 52 push %edx 10b012: ff 30 pushl (%eax) 10b014: 68 e0 92 12 00 push $0x1292e0 10b019: e8 2e 23 00 00 call 10d34c <_Objects_Get> switch ( location ) { 10b01e: 83 c4 10 add $0x10,%esp 10b021: 8b 55 f4 mov -0xc(%ebp),%edx 10b024: 85 d2 test %edx,%edx 10b026: 75 34 jne 10b05c case OBJECTS_LOCAL: _CORE_barrier_Wait( 10b028: 83 ec 0c sub $0xc,%esp 10b02b: 6a 00 push $0x0 10b02d: 6a 00 push $0x0 10b02f: 6a 01 push $0x1 10b031: ff 70 08 pushl 0x8(%eax) 10b034: 83 c0 10 add $0x10,%eax 10b037: 50 push %eax 10b038: e8 c3 15 00 00 call 10c600 <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10b03d: 83 c4 20 add $0x20,%esp 10b040: e8 17 2e 00 00 call 10de5c <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10b045: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10b048: a1 78 94 12 00 mov 0x129478,%eax true, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 10b04d: ff 70 34 pushl 0x34(%eax) 10b050: e8 cf 5b 00 00 call 110c24 <_POSIX_Barrier_Translate_core_barrier_return_code> 10b055: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b058: c9 leave 10b059: c3 ret 10b05a: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return EINVAL; 10b05c: b8 16 00 00 00 mov $0x16,%eax } 10b061: c9 leave 10b062: c3 ret =============================================================================== 0010ae2c : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10ae2c: 55 push %ebp 10ae2d: 89 e5 mov %esp,%ebp 10ae2f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10ae32: 85 c0 test %eax,%eax 10ae34: 74 12 je 10ae48 10ae36: 8b 10 mov (%eax),%edx 10ae38: 85 d2 test %edx,%edx 10ae3a: 74 0c je 10ae48 return EINVAL; attr->is_initialized = false; 10ae3c: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10ae42: 31 c0 xor %eax,%eax } 10ae44: c9 leave 10ae45: c3 ret 10ae46: 66 90 xchg %ax,%ax int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10ae48: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10ae4d: c9 leave 10ae4e: c3 ret =============================================================================== 0010a6dc : */ int pthread_cancel( pthread_t thread ) { 10a6dc: 55 push %ebp 10a6dd: 89 e5 mov %esp,%ebp 10a6df: 83 ec 18 sub $0x18,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 10a6e2: 8b 0d 14 90 12 00 mov 0x129014,%ecx 10a6e8: 85 c9 test %ecx,%ecx 10a6ea: 74 08 je 10a6f4 return EPROTO; 10a6ec: b8 47 00 00 00 mov $0x47,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a6f1: c9 leave 10a6f2: c3 ret 10a6f3: 90 nop */ if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _Thread_Get( thread, &location ); 10a6f4: 83 ec 08 sub $0x8,%esp 10a6f7: 8d 45 f4 lea -0xc(%ebp),%eax 10a6fa: 50 push %eax 10a6fb: ff 75 08 pushl 0x8(%ebp) 10a6fe: e8 71 2a 00 00 call 10d174 <_Thread_Get> switch ( location ) { 10a703: 83 c4 10 add $0x10,%esp 10a706: 8b 55 f4 mov -0xc(%ebp),%edx 10a709: 85 d2 test %edx,%edx 10a70b: 75 23 jne 10a730 case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 10a70d: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx 10a713: c7 82 e0 00 00 00 01 movl $0x1,0xe0(%edx) 10a71a: 00 00 00 /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 10a71d: 83 ec 0c sub $0xc,%esp 10a720: 50 push %eax 10a721: e8 46 55 00 00 call 10fc6c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> return 0; 10a726: 83 c4 10 add $0x10,%esp 10a729: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a72b: c9 leave 10a72c: c3 ret 10a72d: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return EINVAL; 10a730: b8 16 00 00 00 mov $0x16,%eax } 10a735: c9 leave 10a736: c3 ret =============================================================================== 0010a54c : */ void pthread_cleanup_pop( int execute ) { 10a54c: 55 push %ebp 10a54d: 89 e5 mov %esp,%ebp 10a54f: 57 push %edi 10a550: 56 push %esi 10a551: 53 push %ebx 10a552: 83 ec 0c sub $0xc,%esp 10a555: 8b 75 08 mov 0x8(%ebp),%esi 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 ]; 10a558: a1 38 81 12 00 mov 0x128138,%eax 10a55d: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a563: 8b 15 8c 7b 12 00 mov 0x127b8c,%edx 10a569: 42 inc %edx 10a56a: 89 15 8c 7b 12 00 mov %edx,0x127b8c * 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 ); 10a570: 9c pushf 10a571: fa cli 10a572: 5b pop %ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10a573: 8d 90 e8 00 00 00 lea 0xe8(%eax),%edx if ( _Chain_Is_empty( handler_stack ) ) { 10a579: 39 90 e4 00 00 00 cmp %edx,0xe4(%eax) 10a57f: 74 47 je 10a5c8 _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 10a581: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10a587: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10a589: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10a58c: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10a58f: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10a591: 53 push %ebx 10a592: 9d popf 10a593: 8b 58 08 mov 0x8(%eax),%ebx 10a596: 8b 78 0c mov 0xc(%eax),%edi tmp_handler = *handler; _Workspace_Free( handler ); 10a599: 83 ec 0c sub $0xc,%esp 10a59c: 50 push %eax 10a59d: e8 16 38 00 00 call 10ddb8 <_Workspace_Free> _Thread_Enable_dispatch(); 10a5a2: e8 19 28 00 00 call 10cdc0 <_Thread_Enable_dispatch> if ( execute ) 10a5a7: 83 c4 10 add $0x10,%esp 10a5aa: 85 f6 test %esi,%esi 10a5ac: 75 0a jne 10a5b8 (*tmp_handler.routine)( tmp_handler.arg ); } 10a5ae: 8d 65 f4 lea -0xc(%ebp),%esp 10a5b1: 5b pop %ebx 10a5b2: 5e pop %esi 10a5b3: 5f pop %edi 10a5b4: c9 leave 10a5b5: c3 ret 10a5b6: 66 90 xchg %ax,%ax _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10a5b8: 89 7d 08 mov %edi,0x8(%ebp) 10a5bb: 89 d8 mov %ebx,%eax } 10a5bd: 8d 65 f4 lea -0xc(%ebp),%esp 10a5c0: 5b pop %ebx 10a5c1: 5e pop %esi 10a5c2: 5f pop %edi 10a5c3: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10a5c4: ff e0 jmp *%eax 10a5c6: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10a5c8: e8 f3 27 00 00 call 10cdc0 <_Thread_Enable_dispatch> _ISR_Enable( level ); 10a5cd: 53 push %ebx 10a5ce: 9d popf _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); } 10a5cf: 8d 65 f4 lea -0xc(%ebp),%esp 10a5d2: 5b pop %ebx 10a5d3: 5e pop %esi 10a5d4: 5f pop %edi 10a5d5: c9 leave 10a5d6: c3 ret =============================================================================== 0010a908 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10a908: 55 push %ebp 10a909: 89 e5 mov %esp,%ebp 10a90b: 56 push %esi 10a90c: 53 push %ebx 10a90d: 8b 5d 08 mov 0x8(%ebp),%ebx 10a910: 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 ) 10a913: 85 db test %ebx,%ebx 10a915: 74 4d je 10a964 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a917: a1 0c 92 12 00 mov 0x12920c,%eax 10a91c: 40 inc %eax 10a91d: a3 0c 92 12 00 mov %eax,0x12920c return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10a922: 83 ec 0c sub $0xc,%esp 10a925: 6a 10 push $0x10 10a927: e8 d8 3f 00 00 call 10e904 <_Workspace_Allocate> if ( handler ) { 10a92c: 83 c4 10 add $0x10,%esp 10a92f: 85 c0 test %eax,%eax 10a931: 74 25 je 10a958 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a933: 8b 15 b8 97 12 00 mov 0x1297b8,%edx handler_stack = &thread_support->Cancellation_Handlers; 10a939: 8b 92 ec 00 00 00 mov 0xec(%edx),%edx 10a93f: 81 c2 e4 00 00 00 add $0xe4,%edx handler->routine = routine; 10a945: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10a948: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10a94b: 83 ec 08 sub $0x8,%esp 10a94e: 50 push %eax 10a94f: 52 push %edx 10a950: e8 0b 17 00 00 call 10c060 <_Chain_Append> 10a955: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10a958: 8d 65 f8 lea -0x8(%ebp),%esp 10a95b: 5b pop %ebx 10a95c: 5e pop %esi 10a95d: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10a95e: e9 35 2f 00 00 jmp 10d898 <_Thread_Enable_dispatch> 10a963: 90 nop } 10a964: 8d 65 f8 lea -0x8(%ebp),%esp 10a967: 5b pop %ebx 10a968: 5e pop %esi 10a969: c9 leave 10a96a: c3 ret =============================================================================== 0010b5fc : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10b5fc: 55 push %ebp 10b5fd: 89 e5 mov %esp,%ebp 10b5ff: 53 push %ebx 10b600: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10b603: 8d 45 f4 lea -0xc(%ebp),%eax 10b606: 50 push %eax 10b607: ff 75 08 pushl 0x8(%ebp) 10b60a: e8 65 00 00 00 call 10b674 <_POSIX_Condition_variables_Get> 10b60f: 89 c3 mov %eax,%ebx switch ( location ) { 10b611: 83 c4 10 add $0x10,%esp 10b614: 8b 4d f4 mov -0xc(%ebp),%ecx 10b617: 85 c9 test %ecx,%ecx 10b619: 75 25 jne 10b640 case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10b61b: 83 ec 0c sub $0xc,%esp 10b61e: 8d 40 18 lea 0x18(%eax),%eax 10b621: 50 push %eax 10b622: e8 f1 3b 00 00 call 10f218 <_Thread_queue_First> 10b627: 83 c4 10 add $0x10,%esp 10b62a: 85 c0 test %eax,%eax 10b62c: 74 1e je 10b64c _Thread_Enable_dispatch(); 10b62e: e8 01 35 00 00 call 10eb34 <_Thread_Enable_dispatch> return EBUSY; 10b633: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b638: 8b 5d fc mov -0x4(%ebp),%ebx 10b63b: c9 leave 10b63c: c3 ret 10b63d: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return EINVAL; 10b640: b8 16 00 00 00 mov $0x16,%eax } 10b645: 8b 5d fc mov -0x4(%ebp),%ebx 10b648: c9 leave 10b649: c3 ret 10b64a: 66 90 xchg %ax,%ax if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( 10b64c: 83 ec 08 sub $0x8,%esp 10b64f: 53 push %ebx 10b650: 68 80 a3 12 00 push $0x12a380 10b655: e8 92 25 00 00 call 10dbec <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10b65a: 58 pop %eax 10b65b: 5a pop %edx 10b65c: 53 push %ebx 10b65d: 68 80 a3 12 00 push $0x12a380 10b662: e8 7d 28 00 00 call 10dee4 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10b667: e8 c8 34 00 00 call 10eb34 <_Thread_Enable_dispatch> return 0; 10b66c: 83 c4 10 add $0x10,%esp 10b66f: 31 c0 xor %eax,%eax 10b671: eb d2 jmp 10b645 =============================================================================== 0010b6c8 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10b6c8: 55 push %ebp 10b6c9: 89 e5 mov %esp,%ebp 10b6cb: 53 push %ebx 10b6cc: 83 ec 14 sub $0x14,%esp 10b6cf: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10b6d2: 85 db test %ebx,%ebx 10b6d4: 0f 84 86 00 00 00 je 10b760 else the_attr = &_POSIX_Condition_variables_Default_attributes; /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10b6da: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10b6de: 74 06 je 10b6e6 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10b6e0: 8b 03 mov (%ebx),%eax 10b6e2: 85 c0 test %eax,%eax 10b6e4: 75 0a jne 10b6f0 return EINVAL; 10b6e6: b8 16 00 00 00 mov $0x16,%eax *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 10b6eb: 8b 5d fc mov -0x4(%ebp),%ebx 10b6ee: c9 leave 10b6ef: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b6f0: a1 cc 9e 12 00 mov 0x129ecc,%eax 10b6f5: 40 inc %eax 10b6f6: a3 cc 9e 12 00 mov %eax,0x129ecc RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) _Objects_Allocate( &_POSIX_Condition_variables_Information ); 10b6fb: 83 ec 0c sub $0xc,%esp 10b6fe: 68 80 a3 12 00 push $0x12a380 10b703: e8 68 24 00 00 call 10db70 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10b708: 83 c4 10 add $0x10,%esp 10b70b: 85 c0 test %eax,%eax 10b70d: 74 5d je 10b76c _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 10b70f: 8b 53 04 mov 0x4(%ebx),%edx 10b712: 89 50 10 mov %edx,0x10(%eax) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10b715: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) _Thread_queue_Initialize( 10b71c: 6a 74 push $0x74 10b71e: 68 00 08 00 10 push $0x10000800 10b723: 6a 00 push $0x0 10b725: 8d 50 18 lea 0x18(%eax),%edx 10b728: 52 push %edx 10b729: 89 45 f4 mov %eax,-0xc(%ebp) 10b72c: e8 63 3b 00 00 call 10f294 <_Thread_queue_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b731: 8b 45 f4 mov -0xc(%ebp),%eax 10b734: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b737: 0f b7 da movzwl %dx,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b73a: 8b 0d 9c a3 12 00 mov 0x12a39c,%ecx 10b740: 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; 10b743: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10b74a: 8b 45 08 mov 0x8(%ebp),%eax 10b74d: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10b74f: e8 e0 33 00 00 call 10eb34 <_Thread_Enable_dispatch> return 0; 10b754: 83 c4 10 add $0x10,%esp 10b757: 31 c0 xor %eax,%eax } 10b759: 8b 5d fc mov -0x4(%ebp),%ebx 10b75c: c9 leave 10b75d: c3 ret 10b75e: 66 90 xchg %ax,%ax { 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; 10b760: bb 9c 35 12 00 mov $0x12359c,%ebx 10b765: e9 70 ff ff ff jmp 10b6da 10b76a: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 10b76c: e8 c3 33 00 00 call 10eb34 <_Thread_Enable_dispatch> return ENOMEM; 10b771: b8 0c 00 00 00 mov $0xc,%eax 10b776: e9 70 ff ff ff jmp 10b6eb =============================================================================== 0010b558 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10b558: 55 push %ebp 10b559: 89 e5 mov %esp,%ebp 10b55b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10b55e: 85 c0 test %eax,%eax 10b560: 74 12 je 10b574 10b562: 8b 10 mov (%eax),%edx 10b564: 85 d2 test %edx,%edx 10b566: 74 0c je 10b574 <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 10b568: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10b56e: 31 c0 xor %eax,%eax } 10b570: c9 leave 10b571: c3 ret 10b572: 66 90 xchg %ax,%ax int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10b574: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10b579: c9 leave 10b57a: c3 ret =============================================================================== 0010b57c : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 10b57c: 55 push %ebp 10b57d: 89 e5 mov %esp,%ebp 10b57f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b582: 85 c0 test %eax,%eax 10b584: 74 0e je 10b594 return EINVAL; *pshared = attr->process_shared; 10b586: 8b 50 04 mov 0x4(%eax),%edx 10b589: 8b 45 0c mov 0xc(%ebp),%eax 10b58c: 89 10 mov %edx,(%eax) return 0; 10b58e: 31 c0 xor %eax,%eax } 10b590: c9 leave 10b591: c3 ret 10b592: 66 90 xchg %ax,%ax const pthread_condattr_t *attr, int *pshared ) { if ( !attr ) return EINVAL; 10b594: b8 16 00 00 00 mov $0x16,%eax *pshared = attr->process_shared; return 0; } 10b599: c9 leave 10b59a: c3 ret =============================================================================== 0010b5c4 : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10b5c4: 55 push %ebp 10b5c5: 89 e5 mov %esp,%ebp 10b5c7: 8b 45 08 mov 0x8(%ebp),%eax 10b5ca: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b5cd: 85 c0 test %eax,%eax 10b5cf: 74 05 je 10b5d6 return EINVAL; switch ( pshared ) { 10b5d1: 83 fa 01 cmp $0x1,%edx 10b5d4: 76 0a jbe 10b5e0 case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10b5d6: b8 16 00 00 00 mov $0x16,%eax } } 10b5db: c9 leave 10b5dc: c3 ret 10b5dd: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b5e0: 89 50 04 mov %edx,0x4(%eax) return 0; 10b5e3: 31 c0 xor %eax,%eax default: return EINVAL; } } 10b5e5: c9 leave 10b5e6: c3 ret =============================================================================== 0010ac80 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10ac80: 55 push %ebp 10ac81: 89 e5 mov %esp,%ebp 10ac83: 57 push %edi 10ac84: 56 push %esi 10ac85: 53 push %ebx 10ac86: 83 ec 5c sub $0x5c,%esp 10ac89: 8b 5d 0c mov 0xc(%ebp),%ebx int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10ac8c: 8b 75 10 mov 0x10(%ebp),%esi 10ac8f: 85 f6 test %esi,%esi 10ac91: 0f 84 8d 01 00 00 je 10ae24 <== NEVER TAKEN return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10ac97: 85 db test %ebx,%ebx 10ac99: 74 65 je 10ad00 if ( !the_attr->is_initialized ) 10ac9b: 8b 0b mov (%ebx),%ecx 10ac9d: 85 c9 test %ecx,%ecx 10ac9f: 74 1e je 10acbf * 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) ) 10aca1: 8b 53 04 mov 0x4(%ebx),%edx 10aca4: 85 d2 test %edx,%edx 10aca6: 74 0a je 10acb2 10aca8: a1 d8 47 12 00 mov 0x1247d8,%eax 10acad: 39 43 08 cmp %eax,0x8(%ebx) 10acb0: 72 0d jb 10acbf * 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 ) { 10acb2: 8b 43 10 mov 0x10(%ebx),%eax 10acb5: 83 f8 01 cmp $0x1,%eax 10acb8: 74 4e je 10ad08 10acba: 83 f8 02 cmp $0x2,%eax 10acbd: 74 11 je 10acd0 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; 10acbf: ba 16 00 00 00 mov $0x16,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10acc4: 89 d0 mov %edx,%eax 10acc6: 8d 65 f4 lea -0xc(%ebp),%esp 10acc9: 5b pop %ebx 10acca: 5e pop %esi 10accb: 5f pop %edi 10accc: c9 leave 10accd: c3 ret 10acce: 66 90 xchg %ax,%ax schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10acd0: 8b 4b 14 mov 0x14(%ebx),%ecx 10acd3: 89 4d b0 mov %ecx,-0x50(%ebp) schedparam = the_attr->schedparam; 10acd6: 8d 45 c4 lea -0x3c(%ebp),%eax 10acd9: 89 45 b4 mov %eax,-0x4c(%ebp) 10acdc: 8d 73 18 lea 0x18(%ebx),%esi 10acdf: b9 07 00 00 00 mov $0x7,%ecx 10ace4: 89 c7 mov %eax,%edi 10ace6: 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 ) 10ace8: 8b 43 0c mov 0xc(%ebx),%eax 10aceb: 85 c0 test %eax,%eax 10aced: 74 49 je 10ad38 <== ALWAYS TAKEN return ENOTSUP; 10acef: ba 86 00 00 00 mov $0x86,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10acf4: 89 d0 mov %edx,%eax 10acf6: 8d 65 f4 lea -0xc(%ebp),%esp 10acf9: 5b pop %ebx 10acfa: 5e pop %esi 10acfb: 5f pop %edi 10acfc: c9 leave 10acfd: c3 ret 10acfe: 66 90 xchg %ax,%ax int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10ad00: bb 40 21 12 00 mov $0x122140,%ebx 10ad05: eb 94 jmp 10ac9b 10ad07: 90 nop * 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 ]; 10ad08: a1 f8 8f 12 00 mov 0x128ff8,%eax 10ad0d: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi schedpolicy = api->schedpolicy; 10ad13: 8b 8e 84 00 00 00 mov 0x84(%esi),%ecx 10ad19: 89 4d b0 mov %ecx,-0x50(%ebp) schedparam = api->schedparam; 10ad1c: 8d 45 c4 lea -0x3c(%ebp),%eax 10ad1f: 89 45 b4 mov %eax,-0x4c(%ebp) 10ad22: 81 c6 88 00 00 00 add $0x88,%esi 10ad28: b9 07 00 00 00 mov $0x7,%ecx 10ad2d: 89 c7 mov %eax,%edi 10ad2f: 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 ) 10ad31: 8b 43 0c mov 0xc(%ebx),%eax 10ad34: 85 c0 test %eax,%eax 10ad36: 75 b7 jne 10acef return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10ad38: 83 ec 0c sub $0xc,%esp 10ad3b: ff 75 c4 pushl -0x3c(%ebp) 10ad3e: e8 6d 62 00 00 call 110fb0 <_POSIX_Priority_Is_valid> 10ad43: 83 c4 10 add $0x10,%esp 10ad46: 84 c0 test %al,%al 10ad48: 0f 84 71 ff ff ff je 10acbf <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10ad4e: 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); 10ad51: 0f b6 35 dc 47 12 00 movzbl 0x1247dc,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10ad58: 8d 45 e0 lea -0x20(%ebp),%eax 10ad5b: 50 push %eax 10ad5c: 8d 45 e4 lea -0x1c(%ebp),%eax 10ad5f: 50 push %eax 10ad60: ff 75 b4 pushl -0x4c(%ebp) 10ad63: ff 75 b0 pushl -0x50(%ebp) 10ad66: e8 61 62 00 00 call 110fcc <_POSIX_Thread_Translate_sched_param> 10ad6b: 89 c2 mov %eax,%edx schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10ad6d: 83 c4 10 add $0x10,%esp 10ad70: 85 c0 test %eax,%eax 10ad72: 0f 85 4c ff ff ff jne 10acc4 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10ad78: 83 ec 0c sub $0xc,%esp 10ad7b: ff 35 00 8b 12 00 pushl 0x128b00 10ad81: 89 45 a0 mov %eax,-0x60(%ebp) 10ad84: e8 03 17 00 00 call 10c48c <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10ad89: c7 04 24 e0 8c 12 00 movl $0x128ce0,(%esp) 10ad90: e8 e3 1f 00 00 call 10cd78 <_Objects_Allocate> 10ad95: 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 ) { 10ad98: 83 c4 10 add $0x10,%esp 10ad9b: 85 c0 test %eax,%eax 10ad9d: 8b 55 a0 mov -0x60(%ebp),%edx 10ada0: 0f 84 0f 01 00 00 je 10aeb5 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10ada6: 8b 4d e0 mov -0x20(%ebp),%ecx 10ada9: 8b 45 e4 mov -0x1c(%ebp),%eax 10adac: 89 45 a4 mov %eax,-0x5c(%ebp) 10adaf: 8b 43 08 mov 0x8(%ebx),%eax 10adb2: 89 45 a8 mov %eax,-0x58(%ebp) 10adb5: a1 d8 47 12 00 mov 0x1247d8,%eax 10adba: d1 e0 shl %eax 10adbc: 3b 45 a8 cmp -0x58(%ebp),%eax 10adbf: 73 03 jae 10adc4 10adc1: 8b 45 a8 mov -0x58(%ebp),%eax 10adc4: 83 ec 04 sub $0x4,%esp 10adc7: 6a 00 push $0x0 10adc9: 6a 00 push $0x0 10adcb: 51 push %ecx 10adcc: ff 75 a4 pushl -0x5c(%ebp) 10adcf: 6a 01 push $0x1 10add1: 81 e6 ff 00 00 00 and $0xff,%esi 10add7: 29 fe sub %edi,%esi 10add9: 56 push %esi 10adda: 6a 01 push $0x1 10addc: 50 push %eax 10addd: ff 73 04 pushl 0x4(%ebx) 10ade0: ff 75 ac pushl -0x54(%ebp) 10ade3: 68 e0 8c 12 00 push $0x128ce0 10ade8: 89 55 a0 mov %edx,-0x60(%ebp) 10adeb: e8 e8 2f 00 00 call 10ddd8 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10adf0: 83 c4 30 add $0x30,%esp 10adf3: 84 c0 test %al,%al 10adf5: 8b 55 a0 mov -0x60(%ebp),%edx 10adf8: 75 34 jne 10ae2e RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10adfa: 83 ec 08 sub $0x8,%esp 10adfd: ff 75 ac pushl -0x54(%ebp) 10ae00: 68 e0 8c 12 00 push $0x128ce0 10ae05: e8 e2 22 00 00 call 10d0ec <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10ae0a: 59 pop %ecx 10ae0b: ff 35 00 8b 12 00 pushl 0x128b00 10ae11: e8 be 16 00 00 call 10c4d4 <_API_Mutex_Unlock> return EAGAIN; 10ae16: 83 c4 10 add $0x10,%esp 10ae19: ba 0b 00 00 00 mov $0xb,%edx 10ae1e: e9 a1 fe ff ff jmp 10acc4 10ae23: 90 nop struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) return EFAULT; 10ae24: ba 0e 00 00 00 mov $0xe,%edx 10ae29: e9 96 fe ff ff jmp 10acc4 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10ae2e: 8b 4d ac mov -0x54(%ebp),%ecx 10ae31: 8b 89 ec 00 00 00 mov 0xec(%ecx),%ecx 10ae37: 89 4d a8 mov %ecx,-0x58(%ebp) api->Attributes = *the_attr; 10ae3a: b9 10 00 00 00 mov $0x10,%ecx 10ae3f: 8b 7d a8 mov -0x58(%ebp),%edi 10ae42: 89 de mov %ebx,%esi 10ae44: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10ae46: 8b 43 3c mov 0x3c(%ebx),%eax 10ae49: 8b 4d a8 mov -0x58(%ebp),%ecx 10ae4c: 89 41 40 mov %eax,0x40(%ecx) api->schedpolicy = schedpolicy; 10ae4f: 8b 45 b0 mov -0x50(%ebp),%eax 10ae52: 89 81 84 00 00 00 mov %eax,0x84(%ecx) api->schedparam = schedparam; 10ae58: 89 cf mov %ecx,%edi 10ae5a: 81 c7 88 00 00 00 add $0x88,%edi 10ae60: b9 07 00 00 00 mov $0x7,%ecx 10ae65: 8b 75 b4 mov -0x4c(%ebp),%esi 10ae68: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10ae6a: 83 ec 0c sub $0xc,%esp 10ae6d: 6a 00 push $0x0 10ae6f: ff 75 14 pushl 0x14(%ebp) 10ae72: ff 75 10 pushl 0x10(%ebp) 10ae75: 6a 01 push $0x1 10ae77: ff 75 ac pushl -0x54(%ebp) 10ae7a: 89 55 a0 mov %edx,-0x60(%ebp) 10ae7d: e8 46 38 00 00 call 10e6c8 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10ae82: 83 c4 20 add $0x20,%esp 10ae85: 83 7d b0 04 cmpl $0x4,-0x50(%ebp) 10ae89: 8b 55 a0 mov -0x60(%ebp),%edx 10ae8c: 74 42 je 10aed0 } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10ae8e: 8b 45 ac mov -0x54(%ebp),%eax 10ae91: 8b 48 08 mov 0x8(%eax),%ecx 10ae94: 8b 45 08 mov 0x8(%ebp),%eax 10ae97: 89 08 mov %ecx,(%eax) _RTEMS_Unlock_allocator(); 10ae99: 83 ec 0c sub $0xc,%esp 10ae9c: ff 35 00 8b 12 00 pushl 0x128b00 10aea2: 89 55 a0 mov %edx,-0x60(%ebp) 10aea5: e8 2a 16 00 00 call 10c4d4 <_API_Mutex_Unlock> return 0; 10aeaa: 83 c4 10 add $0x10,%esp 10aead: 8b 55 a0 mov -0x60(%ebp),%edx 10aeb0: e9 0f fe ff ff jmp 10acc4 * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10aeb5: 83 ec 0c sub $0xc,%esp 10aeb8: ff 35 00 8b 12 00 pushl 0x128b00 10aebe: e8 11 16 00 00 call 10c4d4 <_API_Mutex_Unlock> return EAGAIN; 10aec3: 83 c4 10 add $0x10,%esp 10aec6: ba 0b 00 00 00 mov $0xb,%edx 10aecb: e9 f4 fd ff ff jmp 10acc4 return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10aed0: 83 ec 0c sub $0xc,%esp &api->Sporadic_timer, _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ) 10aed3: 8b 45 a8 mov -0x58(%ebp),%eax 10aed6: 05 90 00 00 00 add $0x90,%eax return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10aedb: 50 push %eax 10aedc: e8 77 39 00 00 call 10e858 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10aee1: 8b 4d a8 mov -0x58(%ebp),%ecx 10aee4: 89 81 b4 00 00 00 mov %eax,0xb4(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10aeea: 58 pop %eax 10aeeb: 5a pop %edx 10aeec: 89 c8 mov %ecx,%eax 10aeee: 05 a8 00 00 00 add $0xa8,%eax 10aef3: 50 push %eax 10aef4: 68 20 8b 12 00 push $0x128b20 10aef9: e8 8a 3c 00 00 call 10eb88 <_Watchdog_Insert> 10aefe: 83 c4 10 add $0x10,%esp 10af01: 8b 55 a0 mov -0x60(%ebp),%edx 10af04: eb 88 jmp 10ae8e =============================================================================== 0010ad94 : #include int pthread_detach( pthread_t thread ) { 10ad94: 55 push %ebp 10ad95: 89 e5 mov %esp,%ebp 10ad97: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _Thread_Get( thread, &location ); 10ad9a: 8d 45 f4 lea -0xc(%ebp),%eax 10ad9d: 50 push %eax 10ad9e: ff 75 08 pushl 0x8(%ebp) 10ada1: e8 9e 2c 00 00 call 10da44 <_Thread_Get> switch ( location ) { 10ada6: 83 c4 10 add $0x10,%esp 10ada9: 8b 55 f4 mov -0xc(%ebp),%edx 10adac: 85 d2 test %edx,%edx 10adae: 75 18 jne 10adc8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 10adb0: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax 10adb6: c7 40 40 00 00 00 00 movl $0x0,0x40(%eax) _Thread_Enable_dispatch(); 10adbd: e8 5e 2c 00 00 call 10da20 <_Thread_Enable_dispatch> return 0; 10adc2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10adc4: c9 leave 10adc5: c3 ret 10adc6: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return ESRCH; 10adc8: b8 03 00 00 00 mov $0x3,%eax } 10adcd: c9 leave 10adce: c3 ret =============================================================================== 001128cc : } void pthread_exit( void *value_ptr ) { 1128cc: 55 push %ebp 1128cd: 89 e5 mov %esp,%ebp 1128cf: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 1128d2: ff 75 08 pushl 0x8(%ebp) 1128d5: ff 35 98 7d 12 00 pushl 0x127d98 1128db: e8 88 ff ff ff call 112868 <_POSIX_Thread_Exit> 1128e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1128e3: c9 leave <== NOT EXECUTED 1128e4: c3 ret <== NOT EXECUTED =============================================================================== 0010ce68 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10ce68: 55 push %ebp 10ce69: 89 e5 mov %esp,%ebp 10ce6b: 57 push %edi 10ce6c: 56 push %esi 10ce6d: 53 push %ebx 10ce6e: 83 ec 1c sub $0x1c,%esp 10ce71: 8b 7d 0c mov 0xc(%ebp),%edi 10ce74: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10ce77: 85 ff test %edi,%edi 10ce79: 74 65 je 10cee0 10ce7b: 85 db test %ebx,%ebx 10ce7d: 74 61 je 10cee0 return EINVAL; the_thread = _Thread_Get( thread, &location ); 10ce7f: 83 ec 08 sub $0x8,%esp 10ce82: 8d 45 e4 lea -0x1c(%ebp),%eax 10ce85: 50 push %eax 10ce86: ff 75 08 pushl 0x8(%ebp) 10ce89: e8 46 2d 00 00 call 10fbd4 <_Thread_Get> switch ( location ) { 10ce8e: 83 c4 10 add $0x10,%esp 10ce91: 8b 55 e4 mov -0x1c(%ebp),%edx 10ce94: 85 d2 test %edx,%edx 10ce96: 75 38 jne 10ced0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10ce98: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10ce9e: 8b 96 84 00 00 00 mov 0x84(%esi),%edx 10cea4: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10cea6: 81 c6 88 00 00 00 add $0x88,%esi 10ceac: b9 07 00 00 00 mov $0x7,%ecx 10ceb1: 89 df mov %ebx,%edi 10ceb3: 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); 10ceb5: 0f b6 15 dc 83 12 00 movzbl 0x1283dc,%edx 10cebc: 2b 50 14 sub 0x14(%eax),%edx 10cebf: 89 13 mov %edx,(%ebx) param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10cec1: e8 ea 2c 00 00 call 10fbb0 <_Thread_Enable_dispatch> return 0; 10cec6: 31 c0 xor %eax,%eax break; } return ESRCH; } 10cec8: 8d 65 f4 lea -0xc(%ebp),%esp 10cecb: 5b pop %ebx 10cecc: 5e pop %esi 10cecd: 5f pop %edi 10cece: c9 leave 10cecf: c3 ret #endif case OBJECTS_ERROR: break; } return ESRCH; 10ced0: b8 03 00 00 00 mov $0x3,%eax } 10ced5: 8d 65 f4 lea -0xc(%ebp),%esp 10ced8: 5b pop %ebx 10ced9: 5e pop %esi 10ceda: 5f pop %edi 10cedb: c9 leave 10cedc: c3 ret 10cedd: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) return EINVAL; 10cee0: b8 16 00 00 00 mov $0x16,%eax break; } return ESRCH; } 10cee5: 8d 65 f4 lea -0xc(%ebp),%esp 10cee8: 5b pop %ebx 10cee9: 5e pop %esi 10ceea: 5f pop %edi 10ceeb: c9 leave 10ceec: c3 ret =============================================================================== 0010ac60 : */ void *pthread_getspecific( pthread_key_t key ) { 10ac60: 55 push %ebp 10ac61: 89 e5 mov %esp,%ebp 10ac63: 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 ); 10ac66: 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 ); 10ac69: 50 push %eax 10ac6a: ff 75 08 pushl 0x8(%ebp) 10ac6d: 68 c0 9a 12 00 push $0x129ac0 10ac72: e8 b5 23 00 00 call 10d02c <_Objects_Get> switch ( location ) { 10ac77: 83 c4 10 add $0x10,%esp 10ac7a: 8b 55 f4 mov -0xc(%ebp),%edx 10ac7d: 85 d2 test %edx,%edx 10ac7f: 75 2b jne 10acac case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 10ac81: 8b 15 f8 9b 12 00 mov 0x129bf8,%edx 10ac87: 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); 10ac8a: 89 ca mov %ecx,%edx 10ac8c: c1 ea 18 shr $0x18,%edx 10ac8f: 83 e2 07 and $0x7,%edx index = _Objects_Get_index( _Thread_Executing->Object.id ); 10ac92: 0f b7 c9 movzwl %cx,%ecx key_data = (void *) the_key->Values[ api ][ index ]; 10ac95: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax 10ac99: 8b 04 88 mov (%eax,%ecx,4),%eax _Thread_Enable_dispatch(); 10ac9c: 89 45 e4 mov %eax,-0x1c(%ebp) 10ac9f: e8 98 2e 00 00 call 10db3c <_Thread_Enable_dispatch> return key_data; 10aca4: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return NULL; } 10aca7: c9 leave 10aca8: c3 ret 10aca9: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return NULL; 10acac: 31 c0 xor %eax,%eax } 10acae: c9 leave 10acaf: c3 ret =============================================================================== 001106ac : int pthread_join( pthread_t thread, void **value_ptr ) { 1106ac: 55 push %ebp 1106ad: 89 e5 mov %esp,%ebp 1106af: 53 push %ebx 1106b0: 83 ec 1c sub $0x1c,%esp 1106b3: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _Thread_Get( thread, &location ); 1106b6: 8d 45 f4 lea -0xc(%ebp),%eax 1106b9: 50 push %eax 1106ba: ff 75 08 pushl 0x8(%ebp) 1106bd: e8 52 2d 00 00 call 113414 <_Thread_Get> switch ( location ) { 1106c2: 83 c4 10 add $0x10,%esp 1106c5: 8b 55 f4 mov -0xc(%ebp),%edx 1106c8: 85 d2 test %edx,%edx 1106ca: 74 0c je 1106d8 #endif case OBJECTS_ERROR: break; } return ESRCH; 1106cc: b8 03 00 00 00 mov $0x3,%eax } 1106d1: 8b 5d fc mov -0x4(%ebp),%ebx 1106d4: c9 leave 1106d5: c3 ret 1106d6: 66 90 xchg %ax,%ax the_thread = _Thread_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1106d8: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 1106de: 8b 4a 40 mov 0x40(%edx),%ecx 1106e1: 85 c9 test %ecx,%ecx 1106e3: 74 43 je 110728 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 1106e5: 8b 0d d8 26 13 00 mov 0x1326d8,%ecx _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 1106eb: 39 c8 cmp %ecx,%eax 1106ed: 74 49 je 110738 /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 1106ef: 8d 45 f0 lea -0x10(%ebp),%eax 1106f2: 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; 1106f5: 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 ); 1106fc: 50 push %eax 1106fd: 68 c4 3b 11 00 push $0x113bc4 110702: 6a 00 push $0x0 110704: 83 c2 44 add $0x44,%edx 110707: 52 push %edx 110708: e8 8b 31 00 00 call 113898 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 11070d: e8 de 2c 00 00 call 1133f0 <_Thread_Enable_dispatch> if ( value_ptr ) 110712: 83 c4 10 add $0x10,%esp 110715: 85 db test %ebx,%ebx 110717: 74 2b je 110744 *value_ptr = return_pointer; 110719: 8b 45 f0 mov -0x10(%ebp),%eax 11071c: 89 03 mov %eax,(%ebx) return 0; 11071e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 110720: 8b 5d fc mov -0x4(%ebp),%ebx 110723: c9 leave 110724: c3 ret 110725: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { _Thread_Enable_dispatch(); 110728: e8 c3 2c 00 00 call 1133f0 <_Thread_Enable_dispatch> return EINVAL; 11072d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 110732: 8b 5d fc mov -0x4(%ebp),%ebx 110735: c9 leave 110736: c3 ret 110737: 90 nop _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); 110738: e8 b3 2c 00 00 call 1133f0 <_Thread_Enable_dispatch> return EDEADLK; 11073d: b8 2d 00 00 00 mov $0x2d,%eax 110742: eb 8d jmp 1106d1 _Thread_Enable_dispatch(); if ( value_ptr ) *value_ptr = return_pointer; return 0; 110744: 31 c0 xor %eax,%eax 110746: eb 89 jmp 1106d1 =============================================================================== 0010aaec : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 10aaec: 55 push %ebp 10aaed: 89 e5 mov %esp,%ebp 10aaef: 57 push %edi 10aaf0: 56 push %esi 10aaf1: 53 push %ebx 10aaf2: 83 ec 28 sub $0x28,%esp 10aaf5: a1 4c 96 12 00 mov 0x12964c,%eax 10aafa: 40 inc %eax 10aafb: a3 4c 96 12 00 mov %eax,0x12964c * 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 ); 10ab00: 68 c0 9a 12 00 push $0x129ac0 10ab05: e8 6e 20 00 00 call 10cb78 <_Objects_Allocate> 10ab0a: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 10ab0c: 83 c4 10 add $0x10,%esp 10ab0f: 85 c0 test %eax,%eax 10ab11: 74 79 je 10ab8c _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 10ab13: 8b 45 0c mov 0xc(%ebp),%eax 10ab16: 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++ ) { 10ab19: bb 01 00 00 00 mov $0x1,%ebx the_key->Values[ the_api ] = NULL; 10ab1e: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4) 10ab25: 00 INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); 10ab26: 8b 04 9d 24 96 12 00 mov 0x129624(,%ebx,4),%eax 10ab2d: 8b 40 04 mov 0x4(%eax),%eax 10ab30: 0f b7 40 10 movzwl 0x10(%eax),%eax true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 10ab34: 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 ); 10ab3b: 83 ec 0c sub $0xc,%esp 10ab3e: 51 push %ecx 10ab3f: 89 4d e4 mov %ecx,-0x1c(%ebp) 10ab42: e8 d9 40 00 00 call 10ec20 <_Workspace_Allocate> if ( !table ) { 10ab47: 83 c4 10 add $0x10,%esp 10ab4a: 85 c0 test %eax,%eax 10ab4c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10ab4f: 74 4f je 10aba0 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 10ab51: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4) memset( table, '\0', bytes_to_allocate ); 10ab55: 89 c7 mov %eax,%edi 10ab57: 31 c0 xor %eax,%eax 10ab59: 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++ ) { 10ab5b: 43 inc %ebx 10ab5c: 83 fb 04 cmp $0x4,%ebx 10ab5f: 75 bd jne 10ab1e uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10ab61: 8b 46 08 mov 0x8(%esi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10ab64: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ab67: 8b 15 dc 9a 12 00 mov 0x129adc,%edx 10ab6d: 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; 10ab70: 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; 10ab77: 8b 55 08 mov 0x8(%ebp),%edx 10ab7a: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10ab7c: e8 bb 2f 00 00 call 10db3c <_Thread_Enable_dispatch> return 0; 10ab81: 31 c0 xor %eax,%eax } 10ab83: 8d 65 f4 lea -0xc(%ebp),%esp 10ab86: 5b pop %ebx 10ab87: 5e pop %esi 10ab88: 5f pop %edi 10ab89: c9 leave 10ab8a: c3 ret 10ab8b: 90 nop _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 10ab8c: e8 ab 2f 00 00 call 10db3c <_Thread_Enable_dispatch> return EAGAIN; 10ab91: 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; } 10ab96: 8d 65 f4 lea -0xc(%ebp),%esp 10ab99: 5b pop %ebx 10ab9a: 5e pop %esi 10ab9b: 5f pop %edi 10ab9c: c9 leave 10ab9d: c3 ret 10ab9e: 66 90 xchg %ax,%ax 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 ); 10aba0: 83 ec 0c sub $0xc,%esp 10aba3: 56 push %esi 10aba4: e8 87 00 00 00 call 10ac30 <_POSIX_Keys_Free_memory> */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10aba9: 58 pop %eax 10abaa: 5a pop %edx 10abab: 56 push %esi 10abac: 68 c0 9a 12 00 push $0x129ac0 10abb1: e8 36 23 00 00 call 10ceec <_Objects_Free> _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10abb6: e8 81 2f 00 00 call 10db3c <_Thread_Enable_dispatch> return ENOMEM; 10abbb: 83 c4 10 add $0x10,%esp 10abbe: 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; } 10abc3: 8d 65 f4 lea -0xc(%ebp),%esp 10abc6: 5b pop %ebx 10abc7: 5e pop %esi 10abc8: 5f pop %edi 10abc9: c9 leave 10abca: c3 ret =============================================================================== 0010abcc : * 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */ int pthread_key_delete( pthread_key_t key ) { 10abcc: 55 push %ebp 10abcd: 89 e5 mov %esp,%ebp 10abcf: 53 push %ebx 10abd0: 83 ec 18 sub $0x18,%esp POSIX_Keys_Control *the_key; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); 10abd3: 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 ); 10abd6: 50 push %eax 10abd7: ff 75 08 pushl 0x8(%ebp) 10abda: 68 c0 9a 12 00 push $0x129ac0 10abdf: e8 48 24 00 00 call 10d02c <_Objects_Get> 10abe4: 89 c3 mov %eax,%ebx switch ( location ) { 10abe6: 83 c4 10 add $0x10,%esp 10abe9: 8b 4d f4 mov -0xc(%ebp),%ecx 10abec: 85 c9 test %ecx,%ecx 10abee: 75 34 jne 10ac24 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 10abf0: 83 ec 08 sub $0x8,%esp 10abf3: 50 push %eax 10abf4: 68 c0 9a 12 00 push $0x129ac0 10abf9: e8 f6 1f 00 00 call 10cbf4 <_Objects_Close> _POSIX_Keys_Free_memory( the_key ); 10abfe: 89 1c 24 mov %ebx,(%esp) 10ac01: e8 2a 00 00 00 call 10ac30 <_POSIX_Keys_Free_memory> */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10ac06: 58 pop %eax 10ac07: 5a pop %edx 10ac08: 53 push %ebx 10ac09: 68 c0 9a 12 00 push $0x129ac0 10ac0e: e8 d9 22 00 00 call 10ceec <_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(); 10ac13: e8 24 2f 00 00 call 10db3c <_Thread_Enable_dispatch> return 0; 10ac18: 83 c4 10 add $0x10,%esp 10ac1b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ac1d: 8b 5d fc mov -0x4(%ebp),%ebx 10ac20: c9 leave 10ac21: c3 ret 10ac22: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return EINVAL; 10ac24: b8 16 00 00 00 mov $0x16,%eax } 10ac29: 8b 5d fc mov -0x4(%ebp),%ebx 10ac2c: c9 leave 10ac2d: c3 ret =============================================================================== 001248ec : int pthread_kill( pthread_t thread, int sig ) { 1248ec: 55 push %ebp 1248ed: 89 e5 mov %esp,%ebp 1248ef: 57 push %edi 1248f0: 56 push %esi 1248f1: 53 push %ebx 1248f2: 83 ec 1c sub $0x1c,%esp 1248f5: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 1248f8: 85 db test %ebx,%ebx 1248fa: 0f 84 80 00 00 00 je 124980 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 124900: 8d 7b ff lea -0x1(%ebx),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 124903: 83 ff 1f cmp $0x1f,%edi 124906: 77 78 ja 124980 rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _Thread_Get( thread, &location ); 124908: 83 ec 08 sub $0x8,%esp 12490b: 8d 45 e4 lea -0x1c(%ebp),%eax 12490e: 50 push %eax 12490f: ff 75 08 pushl 0x8(%ebp) 124912: e8 2d d5 fe ff call 111e44 <_Thread_Get> 124917: 89 c6 mov %eax,%esi switch ( location ) { 124919: 83 c4 10 add $0x10,%esp 12491c: 8b 4d e4 mov -0x1c(%ebp),%ecx 12491f: 85 c9 test %ecx,%ecx 124921: 75 71 jne 124994 <== NEVER TAKEN case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 124923: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 124929: 8d 04 5b lea (%ebx,%ebx,2),%eax 12492c: 83 3c 85 a8 dc 12 00 cmpl $0x1,0x12dca8(,%eax,4) 124933: 01 124934: 74 2d je 124963 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 124936: b8 01 00 00 00 mov $0x1,%eax 12493b: 89 f9 mov %edi,%ecx 12493d: d3 e0 shl %cl,%eax return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 12493f: 09 82 d4 00 00 00 or %eax,0xd4(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 124945: 52 push %edx 124946: 6a 00 push $0x0 124948: 53 push %ebx 124949: 56 push %esi 12494a: e8 7d fe ff ff call 1247cc <_POSIX_signals_Unblock_thread> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 12494f: 83 c4 10 add $0x10,%esp 124952: a1 34 dc 12 00 mov 0x12dc34,%eax 124957: 85 c0 test %eax,%eax 124959: 74 08 je 124963 12495b: 3b 35 38 dc 12 00 cmp 0x12dc38,%esi 124961: 74 11 je 124974 _Thread_Dispatch_necessary = true; } _Thread_Enable_dispatch(); 124963: e8 b8 d4 fe ff call 111e20 <_Thread_Enable_dispatch> return 0; 124968: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 12496a: 8d 65 f4 lea -0xc(%ebp),%esp 12496d: 5b pop %ebx 12496e: 5e pop %esi 12496f: 5f pop %edi 124970: c9 leave 124971: c3 ret 124972: 66 90 xchg %ax,%ax 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; 124974: c6 05 44 dc 12 00 01 movb $0x1,0x12dc44 12497b: eb e6 jmp 124963 12497d: 8d 76 00 lea 0x0(%esi),%esi if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 124980: e8 17 36 ff ff call 117f9c <__errno> 124985: c7 00 16 00 00 00 movl $0x16,(%eax) 12498b: b8 ff ff ff ff mov $0xffffffff,%eax 124990: eb d8 jmp 12496a 124992: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 124994: e8 03 36 ff ff call 117f9c <__errno> <== NOT EXECUTED 124999: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED 12499f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1249a4: eb c4 jmp 12496a <== NOT EXECUTED =============================================================================== 0010c734 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 10c734: 55 push %ebp 10c735: 89 e5 mov %esp,%ebp 10c737: 53 push %ebx 10c738: 83 ec 14 sub $0x14,%esp 10c73b: 8b 5d 0c mov 0xc(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 10c73e: 85 db test %ebx,%ebx 10c740: 74 19 je 10c75b return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10c742: 83 ec 08 sub $0x8,%esp 10c745: 8d 45 f4 lea -0xc(%ebp),%eax 10c748: 50 push %eax 10c749: ff 75 08 pushl 0x8(%ebp) 10c74c: e8 3b ff ff ff call 10c68c <_POSIX_Mutex_Get> switch ( location ) { 10c751: 83 c4 10 add $0x10,%esp 10c754: 8b 55 f4 mov -0xc(%ebp),%edx 10c757: 85 d2 test %edx,%edx 10c759: 74 0d je 10c768 #endif case OBJECTS_ERROR: break; } return EINVAL; 10c75b: b8 16 00 00 00 mov $0x16,%eax } 10c760: 8b 5d fc mov -0x4(%ebp),%ebx 10c763: c9 leave 10c764: c3 ret 10c765: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10c768: 0f b6 15 dc 83 12 00 movzbl 0x1283dc,%edx 10c76f: 2b 50 60 sub 0x60(%eax),%edx 10c772: 89 13 mov %edx,(%ebx) case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10c774: e8 37 34 00 00 call 10fbb0 <_Thread_Enable_dispatch> return 0; 10c779: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c77b: 8b 5d fc mov -0x4(%ebp),%ebx 10c77e: c9 leave 10c77f: c3 ret =============================================================================== 0010c780 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10c780: 55 push %ebp 10c781: 89 e5 mov %esp,%ebp 10c783: 57 push %edi 10c784: 56 push %esi 10c785: 53 push %ebx 10c786: 83 ec 1c sub $0x1c,%esp 10c789: 8b 75 08 mov 0x8(%ebp),%esi 10c78c: 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; 10c78f: 85 db test %ebx,%ebx 10c791: 0f 84 09 01 00 00 je 10c8a0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10c797: 85 f6 test %esi,%esi 10c799: 0f 84 e5 00 00 00 je 10c884 } } } #endif if ( !the_attr->is_initialized ) 10c79f: 8b 13 mov (%ebx),%edx 10c7a1: 85 d2 test %edx,%edx 10c7a3: 0f 84 db 00 00 00 je 10c884 return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10c7a9: 8b 43 04 mov 0x4(%ebx),%eax 10c7ac: 83 f8 01 cmp $0x1,%eax 10c7af: 0f 84 f7 00 00 00 je 10c8ac return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 10c7b5: 85 c0 test %eax,%eax 10c7b7: 0f 85 c7 00 00 00 jne 10c884 return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10c7bd: 8b 43 0c mov 0xc(%ebx),%eax 10c7c0: 83 f8 01 cmp $0x1,%eax 10c7c3: 0f 84 eb 00 00 00 je 10c8b4 10c7c9: 83 f8 02 cmp $0x2,%eax 10c7cc: 0f 84 c2 00 00 00 je 10c894 10c7d2: 85 c0 test %eax,%eax 10c7d4: 0f 85 aa 00 00 00 jne 10c884 case PTHREAD_PRIO_NONE: the_discipline = CORE_MUTEX_DISCIPLINES_FIFO; 10c7da: 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 ) ) 10c7e1: 83 ec 0c sub $0xc,%esp 10c7e4: ff 73 08 pushl 0x8(%ebx) 10c7e7: e8 58 03 00 00 call 10cb44 <_POSIX_Priority_Is_valid> 10c7ec: 83 c4 10 add $0x10,%esp 10c7ef: 84 c0 test %al,%al 10c7f1: 0f 84 8d 00 00 00 je 10c884 #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 10c7f7: 83 7b 10 03 cmpl $0x3,0x10(%ebx) 10c7fb: 0f 87 83 00 00 00 ja 10c884 10c801: a1 8c c6 12 00 mov 0x12c68c,%eax 10c806: 40 inc %eax 10c807: a3 8c c6 12 00 mov %eax,0x12c68c * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 10c80c: 83 ec 0c sub $0xc,%esp 10c80f: 68 60 ca 12 00 push $0x12ca60 10c814: e8 d3 23 00 00 call 10ebec <_Objects_Allocate> 10c819: 89 c7 mov %eax,%edi */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10c81b: 83 c4 10 add $0x10,%esp 10c81e: 85 c0 test %eax,%eax 10c820: 0f 84 9a 00 00 00 je 10c8c0 _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 10c826: 8b 43 04 mov 0x4(%ebx),%eax 10c829: 89 47 10 mov %eax,0x10(%edi) the_mutex_attr = &the_mutex->Mutex.Attributes; 10c82c: 8d 57 54 lea 0x54(%edi),%edx if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10c82f: 31 c0 xor %eax,%eax 10c831: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10c835: 0f 94 c0 sete %al 10c838: 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; 10c83b: 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); 10c83f: 0f b6 05 dc 83 12 00 movzbl 0x1283dc,%eax 10c846: 2b 43 08 sub 0x8(%ebx),%eax 10c849: 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; 10c84c: 8b 45 e4 mov -0x1c(%ebp),%eax 10c84f: 89 47 5c mov %eax,0x5c(%edi) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10c852: 50 push %eax 10c853: 6a 01 push $0x1 10c855: 52 push %edx 10c856: 8d 47 14 lea 0x14(%edi),%eax 10c859: 50 push %eax 10c85a: e8 19 1b 00 00 call 10e378 <_CORE_mutex_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c85f: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10c862: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c865: 8b 15 7c ca 12 00 mov 0x12ca7c,%edx 10c86b: 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; 10c86e: 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; 10c875: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c877: e8 34 33 00 00 call 10fbb0 <_Thread_Enable_dispatch> return 0; 10c87c: 83 c4 10 add $0x10,%esp 10c87f: 31 c0 xor %eax,%eax 10c881: eb 06 jmp 10c889 10c883: 90 nop case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: break; default: return EINVAL; 10c884: b8 16 00 00 00 mov $0x16,%eax *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 10c889: 8d 65 f4 lea -0xc(%ebp),%esp 10c88c: 5b pop %ebx 10c88d: 5e pop %esi 10c88e: 5f pop %edi 10c88f: c9 leave 10c890: c3 ret 10c891: 8d 76 00 lea 0x0(%esi),%esi break; case PTHREAD_PRIO_INHERIT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; break; case PTHREAD_PRIO_PROTECT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10c894: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) break; 10c89b: e9 41 ff ff ff jmp 10c7e1 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; 10c8a0: bb e0 ca 12 00 mov $0x12cae0,%ebx 10c8a5: e9 ed fe ff ff jmp 10c797 10c8aa: 66 90 xchg %ax,%ax /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return ENOSYS; 10c8ac: b8 58 00 00 00 mov $0x58,%eax 10c8b1: eb d6 jmp 10c889 10c8b3: 90 nop 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; 10c8b4: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 10c8bb: e9 21 ff ff ff jmp 10c7e1 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 10c8c0: e8 eb 32 00 00 call 10fbb0 <_Thread_Enable_dispatch> return EAGAIN; 10c8c5: b8 0b 00 00 00 mov $0xb,%eax 10c8ca: eb bd jmp 10c889 =============================================================================== 0010c9d8 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10c9d8: 55 push %ebp 10c9d9: 89 e5 mov %esp,%ebp 10c9db: 56 push %esi 10c9dc: 53 push %ebx 10c9dd: 83 ec 18 sub $0x18,%esp 10c9e0: 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 ); 10c9e3: 8d 45 f4 lea -0xc(%ebp),%eax 10c9e6: 50 push %eax 10c9e7: ff 75 0c pushl 0xc(%ebp) 10c9ea: e8 cd 00 00 00 call 10cabc <_POSIX_Absolute_timeout_to_ticks> 10c9ef: 89 c3 mov %eax,%ebx if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10c9f1: 83 c4 10 add $0x10,%esp 10c9f4: 83 f8 03 cmp $0x3,%eax 10c9f7: 74 2f je 10ca28 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10c9f9: 50 push %eax 10c9fa: ff 75 f4 pushl -0xc(%ebp) 10c9fd: 6a 00 push $0x0 10c9ff: 56 push %esi 10ca00: e8 db fe ff ff call 10c8e0 <_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) ) { 10ca05: 83 c4 10 add $0x10,%esp 10ca08: 83 f8 10 cmp $0x10,%eax 10ca0b: 74 07 je 10ca14 <== ALWAYS TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 10ca0d: 8d 65 f8 lea -0x8(%ebp),%esp 10ca10: 5b pop %ebx 10ca11: 5e pop %esi 10ca12: c9 leave 10ca13: 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 ) 10ca14: 85 db test %ebx,%ebx 10ca16: 74 28 je 10ca40 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10ca18: 4b dec %ebx 10ca19: 83 fb 01 cmp $0x1,%ebx 10ca1c: 77 ef ja 10ca0d <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10ca1e: b8 74 00 00 00 mov $0x74,%eax 10ca23: eb e8 jmp 10ca0d 10ca25: 8d 76 00 lea 0x0(%esi),%esi */ 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 ); 10ca28: 52 push %edx 10ca29: ff 75 f4 pushl -0xc(%ebp) 10ca2c: 6a 01 push $0x1 10ca2e: 56 push %esi 10ca2f: e8 ac fe ff ff call 10c8e0 <_POSIX_Mutex_Lock_support> 10ca34: 83 c4 10 add $0x10,%esp status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 10ca37: 8d 65 f8 lea -0x8(%ebp),%esp 10ca3a: 5b pop %ebx 10ca3b: 5e pop %esi 10ca3c: c9 leave 10ca3d: c3 ret 10ca3e: 66 90 xchg %ax,%ax * 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; 10ca40: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED 10ca45: eb c6 jmp 10ca0d <== NOT EXECUTED =============================================================================== 0010c4bc : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10c4bc: 55 push %ebp 10c4bd: 89 e5 mov %esp,%ebp 10c4bf: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10c4c2: 85 c0 test %eax,%eax 10c4c4: 74 12 je 10c4d8 10c4c6: 8b 10 mov (%eax),%edx 10c4c8: 85 d2 test %edx,%edx 10c4ca: 74 0c je 10c4d8 return EINVAL; attr->is_initialized = false; 10c4cc: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10c4d2: 31 c0 xor %eax,%eax } 10c4d4: c9 leave 10c4d5: c3 ret 10c4d6: 66 90 xchg %ax,%ax int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 10c4d8: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10c4dd: c9 leave 10c4de: c3 ret =============================================================================== 0010c584 : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10c584: 55 push %ebp 10c585: 89 e5 mov %esp,%ebp 10c587: 56 push %esi 10c588: 53 push %ebx 10c589: 8b 5d 08 mov 0x8(%ebp),%ebx 10c58c: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized ) 10c58f: 85 db test %ebx,%ebx 10c591: 74 06 je 10c599 10c593: 8b 03 mov (%ebx),%eax 10c595: 85 c0 test %eax,%eax 10c597: 75 0f jne 10c5a8 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; 10c599: b8 16 00 00 00 mov $0x16,%eax attr->prio_ceiling = prioceiling; return 0; } 10c59e: 8d 65 f8 lea -0x8(%ebp),%esp 10c5a1: 5b pop %ebx 10c5a2: 5e pop %esi 10c5a3: c9 leave 10c5a4: c3 ret 10c5a5: 8d 76 00 lea 0x0(%esi),%esi ) { if ( !attr || !attr->is_initialized ) return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10c5a8: 83 ec 0c sub $0xc,%esp 10c5ab: 56 push %esi 10c5ac: e8 93 05 00 00 call 10cb44 <_POSIX_Priority_Is_valid> 10c5b1: 83 c4 10 add $0x10,%esp 10c5b4: 84 c0 test %al,%al 10c5b6: 74 e1 je 10c599 return EINVAL; attr->prio_ceiling = prioceiling; 10c5b8: 89 73 08 mov %esi,0x8(%ebx) return 0; 10c5bb: 31 c0 xor %eax,%eax } 10c5bd: 8d 65 f8 lea -0x8(%ebp),%esp 10c5c0: 5b pop %ebx 10c5c1: 5e pop %esi 10c5c2: c9 leave 10c5c3: c3 ret =============================================================================== 0010c5ec : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10c5ec: 55 push %ebp 10c5ed: 89 e5 mov %esp,%ebp 10c5ef: 8b 45 08 mov 0x8(%ebp),%eax 10c5f2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10c5f5: 85 c0 test %eax,%eax 10c5f7: 74 0b je 10c604 10c5f9: 8b 08 mov (%eax),%ecx 10c5fb: 85 c9 test %ecx,%ecx 10c5fd: 74 05 je 10c604 return EINVAL; switch ( pshared ) { 10c5ff: 83 fa 01 cmp $0x1,%edx 10c602: 76 08 jbe 10c60c <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10c604: b8 16 00 00 00 mov $0x16,%eax } } 10c609: c9 leave 10c60a: c3 ret 10c60b: 90 nop return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10c60c: 89 50 04 mov %edx,0x4(%eax) return 0; 10c60f: 31 c0 xor %eax,%eax default: return EINVAL; } } 10c611: c9 leave 10c612: c3 ret =============================================================================== 0010a7e0 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10a7e0: 55 push %ebp 10a7e1: 89 e5 mov %esp,%ebp 10a7e3: 8b 45 08 mov 0x8(%ebp),%eax 10a7e6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10a7e9: 85 c0 test %eax,%eax 10a7eb: 74 0b je 10a7f8 10a7ed: 8b 08 mov (%eax),%ecx 10a7ef: 85 c9 test %ecx,%ecx 10a7f1: 74 05 je 10a7f8 <== NEVER TAKEN return EINVAL; switch ( type ) { 10a7f3: 83 fa 03 cmp $0x3,%edx 10a7f6: 76 08 jbe 10a800 case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; default: return EINVAL; 10a7f8: b8 16 00 00 00 mov $0x16,%eax } } 10a7fd: c9 leave 10a7fe: c3 ret 10a7ff: 90 nop switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 10a800: 89 50 10 mov %edx,0x10(%eax) return 0; 10a803: 31 c0 xor %eax,%eax default: return EINVAL; } } 10a805: c9 leave 10a806: c3 ret =============================================================================== 0010b344 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10b344: 55 push %ebp 10b345: 89 e5 mov %esp,%ebp 10b347: 57 push %edi 10b348: 56 push %esi 10b349: 53 push %ebx 10b34a: 83 ec 1c sub $0x1c,%esp 10b34d: 8b 5d 08 mov 0x8(%ebp),%ebx 10b350: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10b353: 85 db test %ebx,%ebx 10b355: 74 51 je 10b3a8 10b357: 85 f6 test %esi,%esi 10b359: 74 4d je 10b3a8 return EINVAL; if ( !once_control->init_executed ) { 10b35b: 8b 7b 04 mov 0x4(%ebx),%edi 10b35e: 85 ff test %edi,%edi 10b360: 74 0a je 10b36c once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; 10b362: 31 c0 xor %eax,%eax } 10b364: 8d 65 f4 lea -0xc(%ebp),%esp 10b367: 5b pop %ebx 10b368: 5e pop %esi 10b369: 5f pop %edi 10b36a: c9 leave 10b36b: 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); 10b36c: 51 push %ecx 10b36d: 8d 7d e4 lea -0x1c(%ebp),%edi 10b370: 57 push %edi 10b371: 68 00 01 00 00 push $0x100 10b376: 68 00 01 00 00 push $0x100 10b37b: e8 3c 0b 00 00 call 10bebc if ( !once_control->init_executed ) { 10b380: 83 c4 10 add $0x10,%esp 10b383: 8b 53 04 mov 0x4(%ebx),%edx 10b386: 85 d2 test %edx,%edx 10b388: 74 2e je 10b3b8 <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10b38a: 50 push %eax 10b38b: 57 push %edi 10b38c: 68 00 01 00 00 push $0x100 10b391: ff 75 e4 pushl -0x1c(%ebp) 10b394: e8 23 0b 00 00 call 10bebc 10b399: 83 c4 10 add $0x10,%esp } return 0; 10b39c: 31 c0 xor %eax,%eax } 10b39e: 8d 65 f4 lea -0xc(%ebp),%esp 10b3a1: 5b pop %ebx 10b3a2: 5e pop %esi 10b3a3: 5f pop %edi 10b3a4: c9 leave 10b3a5: c3 ret 10b3a6: 66 90 xchg %ax,%ax pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) return EINVAL; 10b3a8: b8 16 00 00 00 mov $0x16,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10b3ad: 8d 65 f4 lea -0xc(%ebp),%esp 10b3b0: 5b pop %ebx 10b3b1: 5e pop %esi 10b3b2: 5f pop %edi 10b3b3: c9 leave 10b3b4: c3 ret 10b3b5: 8d 76 00 lea 0x0(%esi),%esi 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; 10b3b8: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10b3be: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10b3c5: ff d6 call *%esi 10b3c7: eb c1 jmp 10b38a =============================================================================== 0010ba28 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10ba28: 55 push %ebp 10ba29: 89 e5 mov %esp,%ebp 10ba2b: 53 push %ebx 10ba2c: 83 ec 14 sub $0x14,%esp 10ba2f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10ba32: 85 c0 test %eax,%eax 10ba34: 74 42 je 10ba78 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10ba36: 53 push %ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10ba37: 8d 55 f4 lea -0xc(%ebp),%edx 10ba3a: 52 push %edx 10ba3b: ff 30 pushl (%eax) 10ba3d: 68 40 b3 12 00 push $0x12b340 10ba42: e8 f1 29 00 00 call 10e438 <_Objects_Get> 10ba47: 89 c3 mov %eax,%ebx switch ( location ) { 10ba49: 83 c4 10 add $0x10,%esp 10ba4c: 8b 4d f4 mov -0xc(%ebp),%ecx 10ba4f: 85 c9 test %ecx,%ecx 10ba51: 75 25 jne 10ba78 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 ) { 10ba53: 83 ec 0c sub $0xc,%esp 10ba56: 8d 40 10 lea 0x10(%eax),%eax 10ba59: 50 push %eax 10ba5a: e8 b9 3c 00 00 call 10f718 <_Thread_queue_First> 10ba5f: 83 c4 10 add $0x10,%esp 10ba62: 85 c0 test %eax,%eax 10ba64: 74 1e je 10ba84 _Thread_Enable_dispatch(); 10ba66: e8 dd 34 00 00 call 10ef48 <_Thread_Enable_dispatch> return EBUSY; 10ba6b: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ba70: 8b 5d fc mov -0x4(%ebp),%ebx 10ba73: c9 leave 10ba74: c3 ret 10ba75: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return EINVAL; 10ba78: b8 16 00 00 00 mov $0x16,%eax } 10ba7d: 8b 5d fc mov -0x4(%ebp),%ebx 10ba80: c9 leave 10ba81: c3 ret 10ba82: 66 90 xchg %ax,%ax /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10ba84: 83 ec 08 sub $0x8,%esp 10ba87: 53 push %ebx 10ba88: 68 40 b3 12 00 push $0x12b340 10ba8d: e8 6e 25 00 00 call 10e000 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10ba92: 58 pop %eax 10ba93: 5a pop %edx 10ba94: 53 push %ebx 10ba95: 68 40 b3 12 00 push $0x12b340 10ba9a: e8 59 28 00 00 call 10e2f8 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10ba9f: e8 a4 34 00 00 call 10ef48 <_Thread_Enable_dispatch> return 0; 10baa4: 83 c4 10 add $0x10,%esp 10baa7: 31 c0 xor %eax,%eax 10baa9: eb d2 jmp 10ba7d =============================================================================== 0010baac : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10baac: 55 push %ebp 10baad: 89 e5 mov %esp,%ebp 10baaf: 56 push %esi 10bab0: 53 push %ebx 10bab1: 83 ec 20 sub $0x20,%esp 10bab4: 8b 5d 08 mov 0x8(%ebp),%ebx 10bab7: 8b 75 0c mov 0xc(%ebp),%esi const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10baba: 85 db test %ebx,%ebx 10babc: 74 15 je 10bad3 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10babe: 85 f6 test %esi,%esi 10bac0: 0f 84 8e 00 00 00 je 10bb54 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10bac6: 8b 16 mov (%esi),%edx 10bac8: 85 d2 test %edx,%edx 10baca: 74 07 je 10bad3 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10bacc: 8b 46 04 mov 0x4(%esi),%eax 10bacf: 85 c0 test %eax,%eax 10bad1: 74 0d je 10bae0 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 10bad3: b8 16 00 00 00 mov $0x16,%eax *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 10bad8: 8d 65 f8 lea -0x8(%ebp),%esp 10badb: 5b pop %ebx 10badc: 5e pop %esi 10badd: c9 leave 10bade: c3 ret 10badf: 90 nop */ RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes( CORE_RWLock_Attributes *the_attributes ) { the_attributes->XXX = 0; 10bae0: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bae7: a1 ec b0 12 00 mov 0x12b0ec,%eax 10baec: 40 inc %eax 10baed: a3 ec b0 12 00 mov %eax,0x12b0ec * 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 ); 10baf2: 83 ec 0c sub $0xc,%esp 10baf5: 68 40 b3 12 00 push $0x12b340 10bafa: e8 85 24 00 00 call 10df84 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10baff: 83 c4 10 add $0x10,%esp 10bb02: 85 c0 test %eax,%eax 10bb04: 74 42 je 10bb48 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10bb06: 83 ec 08 sub $0x8,%esp 10bb09: 8d 55 f4 lea -0xc(%ebp),%edx 10bb0c: 52 push %edx 10bb0d: 8d 50 10 lea 0x10(%eax),%edx 10bb10: 52 push %edx 10bb11: 89 45 e4 mov %eax,-0x1c(%ebp) 10bb14: e8 53 1c 00 00 call 10d76c <_CORE_RWLock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10bb19: 8b 45 e4 mov -0x1c(%ebp),%eax 10bb1c: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10bb1f: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bb22: 8b 0d 5c b3 12 00 mov 0x12b35c,%ecx 10bb28: 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; 10bb2b: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10bb32: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10bb34: e8 0f 34 00 00 call 10ef48 <_Thread_Enable_dispatch> return 0; 10bb39: 83 c4 10 add $0x10,%esp 10bb3c: 31 c0 xor %eax,%eax } 10bb3e: 8d 65 f8 lea -0x8(%ebp),%esp 10bb41: 5b pop %ebx 10bb42: 5e pop %esi 10bb43: c9 leave 10bb44: c3 ret 10bb45: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 10bb48: e8 fb 33 00 00 call 10ef48 <_Thread_Enable_dispatch> return EAGAIN; 10bb4d: b8 0b 00 00 00 mov $0xb,%eax 10bb52: eb 84 jmp 10bad8 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10bb54: 83 ec 0c sub $0xc,%esp 10bb57: 8d 75 ec lea -0x14(%ebp),%esi 10bb5a: 56 push %esi 10bb5b: e8 84 09 00 00 call 10c4e4 10bb60: 83 c4 10 add $0x10,%esp 10bb63: e9 5e ff ff ff jmp 10bac6 =============================================================================== 0010bbd0 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10bbd0: 55 push %ebp 10bbd1: 89 e5 mov %esp,%ebp 10bbd3: 56 push %esi 10bbd4: 53 push %ebx 10bbd5: 83 ec 20 sub $0x20,%esp 10bbd8: 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 ) 10bbdb: 85 db test %ebx,%ebx 10bbdd: 74 7d je 10bc5c * * 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 ); 10bbdf: 83 ec 08 sub $0x8,%esp 10bbe2: 8d 45 f0 lea -0x10(%ebp),%eax 10bbe5: 50 push %eax 10bbe6: ff 75 0c pushl 0xc(%ebp) 10bbe9: e8 a6 62 00 00 call 111e94 <_POSIX_Absolute_timeout_to_ticks> 10bbee: 89 c6 mov %eax,%esi 10bbf0: 83 c4 0c add $0xc,%esp if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10bbf3: 8d 45 f4 lea -0xc(%ebp),%eax 10bbf6: 50 push %eax 10bbf7: ff 33 pushl (%ebx) 10bbf9: 68 40 b3 12 00 push $0x12b340 10bbfe: e8 35 28 00 00 call 10e438 <_Objects_Get> switch ( location ) { 10bc03: 83 c4 10 add $0x10,%esp 10bc06: 8b 55 f4 mov -0xc(%ebp),%edx 10bc09: 85 d2 test %edx,%edx 10bc0b: 75 4f jne 10bc5c 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, 10bc0d: 83 fe 03 cmp $0x3,%esi 10bc10: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10bc13: 83 ec 0c sub $0xc,%esp 10bc16: 6a 00 push $0x0 10bc18: ff 75 f0 pushl -0x10(%ebp) 10bc1b: 0f b6 ca movzbl %dl,%ecx 10bc1e: 51 push %ecx 10bc1f: ff 33 pushl (%ebx) 10bc21: 83 c0 10 add $0x10,%eax 10bc24: 50 push %eax 10bc25: 88 55 e4 mov %dl,-0x1c(%ebp) 10bc28: e8 73 1b 00 00 call 10d7a0 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10bc2d: 83 c4 20 add $0x20,%esp 10bc30: e8 13 33 00 00 call 10ef48 <_Thread_Enable_dispatch> if ( !do_wait ) { 10bc35: 8a 55 e4 mov -0x1c(%ebp),%dl 10bc38: 84 d2 test %dl,%dl 10bc3a: 75 40 jne 10bc7c if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10bc3c: a1 98 b6 12 00 mov 0x12b698,%eax 10bc41: 8b 40 34 mov 0x34(%eax),%eax 10bc44: 83 f8 02 cmp $0x2,%eax 10bc47: 74 1f je 10bc68 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10bc49: 83 ec 0c sub $0xc,%esp 10bc4c: 50 push %eax 10bc4d: e8 ee 00 00 00 call 10bd40 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10bc52: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10bc55: 8d 65 f8 lea -0x8(%ebp),%esp 10bc58: 5b pop %ebx 10bc59: 5e pop %esi 10bc5a: c9 leave 10bc5b: 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; 10bc5c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bc61: 8d 65 f8 lea -0x8(%ebp),%esp 10bc64: 5b pop %ebx 10bc65: 5e pop %esi 10bc66: c9 leave 10bc67: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10bc68: 85 f6 test %esi,%esi 10bc6a: 74 f0 je 10bc5c <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10bc6c: 4e dec %esi 10bc6d: 83 fe 01 cmp $0x1,%esi 10bc70: 77 d7 ja 10bc49 <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10bc72: b8 74 00 00 00 mov $0x74,%eax 10bc77: eb e8 jmp 10bc61 10bc79: 8d 76 00 lea 0x0(%esi),%esi ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait ) { 10bc7c: a1 98 b6 12 00 mov 0x12b698,%eax 10bc81: 8b 40 34 mov 0x34(%eax),%eax 10bc84: eb c3 jmp 10bc49 =============================================================================== 0010bc88 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10bc88: 55 push %ebp 10bc89: 89 e5 mov %esp,%ebp 10bc8b: 56 push %esi 10bc8c: 53 push %ebx 10bc8d: 83 ec 20 sub $0x20,%esp 10bc90: 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 ) 10bc93: 85 db test %ebx,%ebx 10bc95: 74 7d je 10bd14 * * 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 ); 10bc97: 83 ec 08 sub $0x8,%esp 10bc9a: 8d 45 f0 lea -0x10(%ebp),%eax 10bc9d: 50 push %eax 10bc9e: ff 75 0c pushl 0xc(%ebp) 10bca1: e8 ee 61 00 00 call 111e94 <_POSIX_Absolute_timeout_to_ticks> 10bca6: 89 c6 mov %eax,%esi 10bca8: 83 c4 0c add $0xc,%esp if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10bcab: 8d 45 f4 lea -0xc(%ebp),%eax 10bcae: 50 push %eax 10bcaf: ff 33 pushl (%ebx) 10bcb1: 68 40 b3 12 00 push $0x12b340 10bcb6: e8 7d 27 00 00 call 10e438 <_Objects_Get> switch ( location ) { 10bcbb: 83 c4 10 add $0x10,%esp 10bcbe: 8b 55 f4 mov -0xc(%ebp),%edx 10bcc1: 85 d2 test %edx,%edx 10bcc3: 75 4f jne 10bd14 (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, 10bcc5: 83 fe 03 cmp $0x3,%esi 10bcc8: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10bccb: 83 ec 0c sub $0xc,%esp 10bcce: 6a 00 push $0x0 10bcd0: ff 75 f0 pushl -0x10(%ebp) 10bcd3: 0f b6 ca movzbl %dl,%ecx 10bcd6: 51 push %ecx 10bcd7: ff 33 pushl (%ebx) 10bcd9: 83 c0 10 add $0x10,%eax 10bcdc: 50 push %eax 10bcdd: 88 55 e4 mov %dl,-0x1c(%ebp) 10bce0: e8 83 1b 00 00 call 10d868 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10bce5: 83 c4 20 add $0x20,%esp 10bce8: e8 5b 32 00 00 call 10ef48 <_Thread_Enable_dispatch> if ( !do_wait && 10bced: 8a 55 e4 mov -0x1c(%ebp),%dl 10bcf0: 84 d2 test %dl,%dl 10bcf2: 75 40 jne 10bd34 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10bcf4: a1 98 b6 12 00 mov 0x12b698,%eax 10bcf9: 8b 40 34 mov 0x34(%eax),%eax ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10bcfc: 83 f8 02 cmp $0x2,%eax 10bcff: 74 1f je 10bd20 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10bd01: 83 ec 0c sub $0xc,%esp 10bd04: 50 push %eax 10bd05: e8 36 00 00 00 call 10bd40 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10bd0a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10bd0d: 8d 65 f8 lea -0x8(%ebp),%esp 10bd10: 5b pop %ebx 10bd11: 5e pop %esi 10bd12: c9 leave 10bd13: c3 ret _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 10bd14: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bd19: 8d 65 f8 lea -0x8(%ebp),%esp 10bd1c: 5b pop %ebx 10bd1d: 5e pop %esi 10bd1e: c9 leave 10bd1f: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10bd20: 85 f6 test %esi,%esi 10bd22: 74 f0 je 10bd14 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10bd24: 4e dec %esi 10bd25: 83 fe 01 cmp $0x1,%esi 10bd28: 77 d7 ja 10bd01 <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10bd2a: b8 74 00 00 00 mov $0x74,%eax 10bd2f: eb e8 jmp 10bd19 10bd31: 8d 76 00 lea 0x0(%esi),%esi ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10bd34: a1 98 b6 12 00 mov 0x12b698,%eax 10bd39: 8b 40 34 mov 0x34(%eax),%eax 10bd3c: eb c3 jmp 10bd01 =============================================================================== 0010c49c : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10c49c: 55 push %ebp 10c49d: 89 e5 mov %esp,%ebp 10c49f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10c4a2: 85 c0 test %eax,%eax 10c4a4: 74 12 je 10c4b8 10c4a6: 8b 10 mov (%eax),%edx 10c4a8: 85 d2 test %edx,%edx 10c4aa: 74 0c je 10c4b8 return EINVAL; attr->is_initialized = false; 10c4ac: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10c4b2: 31 c0 xor %eax,%eax } 10c4b4: c9 leave 10c4b5: c3 ret 10c4b6: 66 90 xchg %ax,%ax int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10c4b8: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10c4bd: c9 leave 10c4be: c3 ret =============================================================================== 0010c508 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10c508: 55 push %ebp 10c509: 89 e5 mov %esp,%ebp 10c50b: 8b 45 08 mov 0x8(%ebp),%eax 10c50e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10c511: 85 c0 test %eax,%eax 10c513: 74 0b je 10c520 return EINVAL; if ( !attr->is_initialized ) 10c515: 8b 08 mov (%eax),%ecx 10c517: 85 c9 test %ecx,%ecx 10c519: 74 05 je 10c520 return EINVAL; switch ( pshared ) { 10c51b: 83 fa 01 cmp $0x1,%edx 10c51e: 76 08 jbe 10c528 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10c520: b8 16 00 00 00 mov $0x16,%eax } } 10c525: c9 leave 10c526: c3 ret 10c527: 90 nop return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10c528: 89 50 04 mov %edx,0x4(%eax) return 0; 10c52b: 31 c0 xor %eax,%eax default: return EINVAL; } } 10c52d: c9 leave 10c52e: c3 ret =============================================================================== 0010a7bc : int pthread_setcancelstate( int state, int *oldstate ) { 10a7bc: 55 push %ebp 10a7bd: 89 e5 mov %esp,%ebp 10a7bf: 53 push %ebx 10a7c0: 83 ec 04 sub $0x4,%esp 10a7c3: 8b 55 08 mov 0x8(%ebp),%edx 10a7c6: 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() ) 10a7c9: 8b 0d 14 90 12 00 mov 0x129014,%ecx 10a7cf: 85 c9 test %ecx,%ecx 10a7d1: 75 15 jne 10a7e8 return EPROTO; if ( !oldstate ) 10a7d3: 85 c0 test %eax,%eax 10a7d5: 74 05 je 10a7dc return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 10a7d7: 83 fa 01 cmp $0x1,%edx 10a7da: 76 18 jbe 10a7f4 return EINVAL; 10a7dc: b8 16 00 00 00 mov $0x16,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10a7e1: 8b 5d fc mov -0x4(%ebp),%ebx 10a7e4: c9 leave 10a7e5: c3 ret 10a7e6: 66 90 xchg %ax,%ax * 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; 10a7e8: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10a7ed: 8b 5d fc mov -0x4(%ebp),%ebx 10a7f0: c9 leave 10a7f1: c3 ret 10a7f2: 66 90 xchg %ax,%ax return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a7f4: 8b 0d 18 90 12 00 mov 0x129018,%ecx 10a7fa: 8b 89 ec 00 00 00 mov 0xec(%ecx),%ecx rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a800: 8b 1d 6c 8a 12 00 mov 0x128a6c,%ebx 10a806: 43 inc %ebx 10a807: 89 1d 6c 8a 12 00 mov %ebx,0x128a6c _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10a80d: 8b 99 d8 00 00 00 mov 0xd8(%ecx),%ebx 10a813: 89 18 mov %ebx,(%eax) thread_support->cancelability_state = state; 10a815: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10a81b: 83 ec 0c sub $0xc,%esp 10a81e: ff 35 18 90 12 00 pushl 0x129018 10a824: e8 43 54 00 00 call 10fc6c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10a829: 83 c4 10 add $0x10,%esp 10a82c: 31 c0 xor %eax,%eax } 10a82e: 8b 5d fc mov -0x4(%ebp),%ebx 10a831: c9 leave 10a832: c3 ret =============================================================================== 0010a834 : int pthread_setcanceltype( int type, int *oldtype ) { 10a834: 55 push %ebp 10a835: 89 e5 mov %esp,%ebp 10a837: 53 push %ebx 10a838: 83 ec 04 sub $0x4,%esp 10a83b: 8b 55 08 mov 0x8(%ebp),%edx 10a83e: 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() ) 10a841: 8b 0d 14 90 12 00 mov 0x129014,%ecx 10a847: 85 c9 test %ecx,%ecx 10a849: 75 15 jne 10a860 return EPROTO; if ( !oldtype ) 10a84b: 85 c0 test %eax,%eax 10a84d: 74 05 je 10a854 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 10a84f: 83 fa 01 cmp $0x1,%edx 10a852: 76 18 jbe 10a86c return EINVAL; 10a854: b8 16 00 00 00 mov $0x16,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10a859: 8b 5d fc mov -0x4(%ebp),%ebx 10a85c: c9 leave 10a85d: c3 ret 10a85e: 66 90 xchg %ax,%ax * 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; 10a860: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10a865: 8b 5d fc mov -0x4(%ebp),%ebx 10a868: c9 leave 10a869: c3 ret 10a86a: 66 90 xchg %ax,%ax return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a86c: 8b 0d 18 90 12 00 mov 0x129018,%ecx 10a872: 8b 89 ec 00 00 00 mov 0xec(%ecx),%ecx 10a878: 8b 1d 6c 8a 12 00 mov 0x128a6c,%ebx 10a87e: 43 inc %ebx 10a87f: 89 1d 6c 8a 12 00 mov %ebx,0x128a6c _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10a885: 8b 99 dc 00 00 00 mov 0xdc(%ecx),%ebx 10a88b: 89 18 mov %ebx,(%eax) thread_support->cancelability_type = type; 10a88d: 89 91 dc 00 00 00 mov %edx,0xdc(%ecx) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10a893: 83 ec 0c sub $0xc,%esp 10a896: ff 35 18 90 12 00 pushl 0x129018 10a89c: e8 cb 53 00 00 call 10fc6c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10a8a1: 83 c4 10 add $0x10,%esp 10a8a4: 31 c0 xor %eax,%eax } 10a8a6: 8b 5d fc mov -0x4(%ebp),%ebx 10a8a9: c9 leave 10a8aa: c3 ret =============================================================================== 0010d2a8 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10d2a8: 55 push %ebp 10d2a9: 89 e5 mov %esp,%ebp 10d2ab: 57 push %edi 10d2ac: 56 push %esi 10d2ad: 53 push %ebx 10d2ae: 83 ec 2c sub $0x2c,%esp 10d2b1: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10d2b4: 85 f6 test %esi,%esi 10d2b6: 0f 84 c8 00 00 00 je 10d384 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10d2bc: 8d 45 e0 lea -0x20(%ebp),%eax 10d2bf: 50 push %eax 10d2c0: 8d 45 e4 lea -0x1c(%ebp),%eax 10d2c3: 50 push %eax 10d2c4: 56 push %esi 10d2c5: ff 75 0c pushl 0xc(%ebp) 10d2c8: e8 d3 5b 00 00 call 112ea0 <_POSIX_Thread_Translate_sched_param> 10d2cd: 89 c3 mov %eax,%ebx policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10d2cf: 83 c4 10 add $0x10,%esp 10d2d2: 85 c0 test %eax,%eax 10d2d4: 74 0a je 10d2e0 case OBJECTS_ERROR: break; } return ESRCH; } 10d2d6: 89 d8 mov %ebx,%eax 10d2d8: 8d 65 f4 lea -0xc(%ebp),%esp 10d2db: 5b pop %ebx 10d2dc: 5e pop %esi 10d2dd: 5f pop %edi 10d2de: c9 leave 10d2df: c3 ret return rc; /* * Actually change the scheduling policy and parameters */ the_thread = _Thread_Get( thread, &location ); 10d2e0: 83 ec 08 sub $0x8,%esp 10d2e3: 8d 45 dc lea -0x24(%ebp),%eax 10d2e6: 50 push %eax 10d2e7: ff 75 08 pushl 0x8(%ebp) 10d2ea: e8 e5 28 00 00 call 10fbd4 <_Thread_Get> 10d2ef: 89 c2 mov %eax,%edx switch ( location ) { 10d2f1: 83 c4 10 add $0x10,%esp 10d2f4: 8b 7d dc mov -0x24(%ebp),%edi 10d2f7: 85 ff test %edi,%edi 10d2f9: 0f 85 95 00 00 00 jne 10d394 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10d2ff: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax 10d305: 89 45 d4 mov %eax,-0x2c(%ebp) if ( api->schedpolicy == SCHED_SPORADIC ) 10d308: 83 b8 84 00 00 00 04 cmpl $0x4,0x84(%eax) 10d30f: 0f 84 cb 00 00 00 je 10d3e0 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 10d315: 8b 45 0c mov 0xc(%ebp),%eax 10d318: 8b 4d d4 mov -0x2c(%ebp),%ecx 10d31b: 89 81 84 00 00 00 mov %eax,0x84(%ecx) api->schedparam = *param; 10d321: 89 cf mov %ecx,%edi 10d323: 81 c7 88 00 00 00 add $0x88,%edi 10d329: b9 07 00 00 00 mov $0x7,%ecx 10d32e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10d330: 8b 45 e4 mov -0x1c(%ebp),%eax 10d333: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10d336: 8b 45 e0 mov -0x20(%ebp),%eax 10d339: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10d33f: 8b 75 0c mov 0xc(%ebp),%esi 10d342: 85 f6 test %esi,%esi 10d344: 78 2e js 10d374 <== NEVER TAKEN 10d346: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10d34a: 7f 58 jg 10d3a4 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d34c: a1 60 c6 12 00 mov 0x12c660,%eax 10d351: 89 42 78 mov %eax,0x78(%edx) 10d354: 0f b6 05 dc 83 12 00 movzbl 0x1283dc,%eax 10d35b: 8b 4d d4 mov -0x2c(%ebp),%ecx 10d35e: 2b 81 88 00 00 00 sub 0x88(%ecx),%eax the_thread->real_priority = 10d364: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10d367: 51 push %ecx 10d368: 6a 01 push $0x1 10d36a: 50 push %eax 10d36b: 52 push %edx 10d36c: e8 07 24 00 00 call 10f778 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 10d371: 83 c4 10 add $0x10,%esp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 10d374: e8 37 28 00 00 call 10fbb0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10d379: 89 d8 mov %ebx,%eax 10d37b: 8d 65 f4 lea -0xc(%ebp),%esp 10d37e: 5b pop %ebx 10d37f: 5e pop %esi 10d380: 5f pop %edi 10d381: c9 leave 10d382: c3 ret 10d383: 90 nop /* * Check all the parameters */ if ( !param ) return EINVAL; 10d384: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return ESRCH; } 10d389: 89 d8 mov %ebx,%eax 10d38b: 8d 65 f4 lea -0xc(%ebp),%esp 10d38e: 5b pop %ebx 10d38f: 5e pop %esi 10d390: 5f pop %edi 10d391: c9 leave 10d392: c3 ret 10d393: 90 nop #endif case OBJECTS_ERROR: break; } return ESRCH; 10d394: bb 03 00 00 00 mov $0x3,%ebx } 10d399: 89 d8 mov %ebx,%eax 10d39b: 8d 65 f4 lea -0xc(%ebp),%esp 10d39e: 5b pop %ebx 10d39f: 5e pop %esi 10d3a0: 5f pop %edi 10d3a1: c9 leave 10d3a2: c3 ret 10d3a3: 90 nop api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 10d3a4: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10d3a8: 75 ca jne 10d374 <== NEVER TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10d3aa: 8b 4d d4 mov -0x2c(%ebp),%ecx 10d3ad: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 10d3b3: 89 81 a4 00 00 00 mov %eax,0xa4(%ecx) _Watchdog_Remove( &api->Sporadic_timer ); 10d3b9: 83 ec 0c sub $0xc,%esp 10d3bc: 89 c8 mov %ecx,%eax 10d3be: 05 a8 00 00 00 add $0xa8,%eax 10d3c3: 50 push %eax 10d3c4: 89 55 d0 mov %edx,-0x30(%ebp) 10d3c7: e8 ec 37 00 00 call 110bb8 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10d3cc: 58 pop %eax 10d3cd: 5a pop %edx 10d3ce: 8b 55 d0 mov -0x30(%ebp),%edx 10d3d1: 52 push %edx 10d3d2: 6a 00 push $0x0 10d3d4: e8 b3 fd ff ff call 10d18c <_POSIX_Threads_Sporadic_budget_TSR> break; 10d3d9: 83 c4 10 add $0x10,%esp 10d3dc: eb 96 jmp 10d374 10d3de: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 10d3e0: 83 ec 0c sub $0xc,%esp 10d3e3: 05 a8 00 00 00 add $0xa8,%eax 10d3e8: 50 push %eax 10d3e9: 89 55 d0 mov %edx,-0x30(%ebp) 10d3ec: e8 c7 37 00 00 call 110bb8 <_Watchdog_Remove> 10d3f1: 83 c4 10 add $0x10,%esp 10d3f4: 8b 55 d0 mov -0x30(%ebp),%edx 10d3f7: e9 19 ff ff ff jmp 10d315 =============================================================================== 00111284 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 111284: 55 push %ebp 111285: 89 e5 mov %esp,%ebp 111287: 56 push %esi 111288: 53 push %ebx 111289: 8b 4d 08 mov 0x8(%ebp),%ecx 11128c: 8b 55 0c mov 0xc(%ebp),%edx 11128f: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 111292: 85 d2 test %edx,%edx 111294: 0f 84 8a 00 00 00 je 111324 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 11129a: a1 f8 9c 12 00 mov 0x129cf8,%eax 11129f: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax if ( oset ) 1112a5: 85 db test %ebx,%ebx 1112a7: 74 0c je 1112b5 *oset = api->signals_blocked; 1112a9: 8b b0 d0 00 00 00 mov 0xd0(%eax),%esi 1112af: 89 33 mov %esi,(%ebx) if ( !set ) 1112b1: 85 d2 test %edx,%edx 1112b3: 74 3b je 1112f0 return 0; switch ( how ) { 1112b5: 83 f9 01 cmp $0x1,%ecx 1112b8: 74 5e je 111318 1112ba: 83 f9 02 cmp $0x2,%ecx 1112bd: 74 39 je 1112f8 1112bf: 85 c9 test %ecx,%ecx 1112c1: 75 41 jne 111304 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 1112c3: 8b 12 mov (%edx),%edx 1112c5: 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) ) { 1112cb: 8b 15 68 9f 12 00 mov 0x129f68,%edx 1112d1: 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 & 1112d7: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 1112dd: f7 d0 not %eax 1112df: 85 c2 test %eax,%edx 1112e1: 74 0d je 1112f0 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); 1112e3: e8 94 c7 ff ff call 10da7c <_Thread_Dispatch> } return 0; 1112e8: 31 c0 xor %eax,%eax } 1112ea: 5b pop %ebx 1112eb: 5e pop %esi 1112ec: c9 leave 1112ed: c3 ret 1112ee: 66 90 xchg %ax,%ax if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; 1112f0: 31 c0 xor %eax,%eax } 1112f2: 5b pop %ebx 1112f3: 5e pop %esi 1112f4: c9 leave 1112f5: c3 ret 1112f6: 66 90 xchg %ax,%ax switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 1112f8: 8b 12 mov (%edx),%edx 1112fa: f7 d2 not %edx 1112fc: 21 90 d0 00 00 00 and %edx,0xd0(%eax) break; 111302: eb c7 jmp 1112cb case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 111304: e8 d7 2a 00 00 call 113de0 <__errno> 111309: c7 00 16 00 00 00 movl $0x16,(%eax) 11130f: b8 ff ff ff ff mov $0xffffffff,%eax (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } 111314: 5b pop %ebx 111315: 5e pop %esi 111316: c9 leave 111317: c3 ret if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 111318: 8b 12 mov (%edx),%edx 11131a: 09 90 d0 00 00 00 or %edx,0xd0(%eax) break; 111320: eb a9 jmp 1112cb 111322: 66 90 xchg %ax,%ax sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 111324: 85 db test %ebx,%ebx 111326: 74 dc je 111304 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111328: a1 f8 9c 12 00 mov 0x129cf8,%eax 11132d: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax 111333: e9 71 ff ff ff jmp 1112a9 =============================================================================== 0010b128 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10b128: 55 push %ebp 10b129: 89 e5 mov %esp,%ebp 10b12b: 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() ) 10b12e: 8b 0d b4 97 12 00 mov 0x1297b4,%ecx 10b134: 85 c9 test %ecx,%ecx 10b136: 75 44 jne 10b17c <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b138: a1 b8 97 12 00 mov 0x1297b8,%eax 10b13d: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax 10b143: 8b 15 0c 92 12 00 mov 0x12920c,%edx 10b149: 42 inc %edx 10b14a: 89 15 0c 92 12 00 mov %edx,0x12920c _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10b150: 8b 90 d8 00 00 00 mov 0xd8(%eax),%edx 10b156: 85 d2 test %edx,%edx 10b158: 75 26 jne 10b180 <== NEVER TAKEN 10b15a: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax 10b160: 85 c0 test %eax,%eax 10b162: 74 1c je 10b180 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10b164: e8 2f 27 00 00 call 10d898 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10b169: 83 ec 08 sub $0x8,%esp 10b16c: 6a ff push $0xffffffff 10b16e: ff 35 b8 97 12 00 pushl 0x1297b8 10b174: e8 3f 5b 00 00 call 110cb8 <_POSIX_Thread_Exit> 10b179: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10b17c: c9 leave <== NOT EXECUTED 10b17d: c3 ret <== NOT EXECUTED 10b17e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b180: c9 leave _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10b181: e9 12 27 00 00 jmp 10d898 <_Thread_Enable_dispatch> =============================================================================== 0011edfc : ssize_t read( int fd, void *buffer, size_t count ) { 11edfc: 55 push %ebp 11edfd: 89 e5 mov %esp,%ebp 11edff: 53 push %ebx 11ee00: 83 ec 04 sub $0x4,%esp 11ee03: 8b 4d 08 mov 0x8(%ebp),%ecx 11ee06: 8b 45 0c mov 0xc(%ebp),%eax 11ee09: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11ee0c: 3b 0d 4c 34 12 00 cmp 0x12344c,%ecx 11ee12: 73 50 jae 11ee64 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11ee14: c1 e1 03 shl $0x3,%ecx 11ee17: 8d 1c cd 00 00 00 00 lea 0x0(,%ecx,8),%ebx 11ee1e: 29 cb sub %ecx,%ebx 11ee20: 03 1d 80 76 12 00 add 0x127680,%ebx rtems_libio_check_is_open( iop ); 11ee26: 8b 4b 14 mov 0x14(%ebx),%ecx 11ee29: f6 c5 01 test $0x1,%ch 11ee2c: 74 36 je 11ee64 rtems_libio_check_buffer( buffer ); 11ee2e: 85 c0 test %eax,%eax 11ee30: 74 46 je 11ee78 <== NEVER TAKEN rtems_libio_check_count( count ); 11ee32: 85 d2 test %edx,%edx 11ee34: 74 26 je 11ee5c rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11ee36: 83 e1 02 and $0x2,%ecx 11ee39: 74 3d je 11ee78 /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 11ee3b: 51 push %ecx 11ee3c: 8b 4b 20 mov 0x20(%ebx),%ecx 11ee3f: 52 push %edx 11ee40: 50 push %eax 11ee41: 53 push %ebx 11ee42: ff 51 08 call *0x8(%ecx) if ( rc > 0 ) 11ee45: 83 c4 10 add $0x10,%esp 11ee48: 85 c0 test %eax,%eax 11ee4a: 7e 0b jle 11ee57 iop->offset += rc; 11ee4c: 89 c1 mov %eax,%ecx 11ee4e: c1 f9 1f sar $0x1f,%ecx 11ee51: 01 43 0c add %eax,0xc(%ebx) 11ee54: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11ee57: 8b 5d fc mov -0x4(%ebp),%ebx 11ee5a: c9 leave 11ee5b: 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 ); 11ee5c: 31 c0 xor %eax,%eax if ( rc > 0 ) iop->offset += rc; return rc; } 11ee5e: 8b 5d fc mov -0x4(%ebp),%ebx 11ee61: c9 leave 11ee62: c3 ret 11ee63: 90 nop ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 11ee64: e8 eb 3f ff ff call 112e54 <__errno> 11ee69: c7 00 09 00 00 00 movl $0x9,(%eax) 11ee6f: b8 ff ff ff ff mov $0xffffffff,%eax 11ee74: eb e1 jmp 11ee57 11ee76: 66 90 xchg %ax,%ax rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11ee78: e8 d7 3f ff ff call 112e54 <__errno> 11ee7d: c7 00 16 00 00 00 movl $0x16,(%eax) 11ee83: b8 ff ff ff ff mov $0xffffffff,%eax 11ee88: eb cd jmp 11ee57 =============================================================================== 0010a600 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 10a600: 55 push %ebp 10a601: 89 e5 mov %esp,%ebp 10a603: 57 push %edi 10a604: 56 push %esi 10a605: 53 push %ebx 10a606: 83 ec 3c sub $0x3c,%esp 10a609: 8b 55 08 mov 0x8(%ebp),%edx 10a60c: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 10a60f: 85 db test %ebx,%ebx 10a611: 74 6d je 10a680 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 10a613: 31 c0 xor %eax,%eax 10a615: b9 ff ff ff ff mov $0xffffffff,%ecx 10a61a: 89 d7 mov %edx,%edi 10a61c: f2 ae repnz scas %es:(%edi),%al 10a61e: f7 d1 not %ecx 10a620: 49 dec %ecx 10a621: 83 ec 0c sub $0xc,%esp 10a624: 6a 00 push $0x0 10a626: 8d 75 d4 lea -0x2c(%ebp),%esi 10a629: 56 push %esi 10a62a: 6a 00 push $0x0 10a62c: 51 push %ecx 10a62d: 52 push %edx 10a62e: e8 51 ee ff ff call 109484 0, &loc, false ); if ( result != 0 ) 10a633: 83 c4 20 add $0x20,%esp 10a636: 85 c0 test %eax,%eax 10a638: 74 0e je 10a648 <== ALWAYS TAKEN return -1; 10a63a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10a63f: 8d 65 f4 lea -0xc(%ebp),%esp 10a642: 5b pop %ebx 10a643: 5e pop %esi 10a644: 5f pop %edi 10a645: c9 leave 10a646: c3 ret 10a647: 90 nop 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 ){ 10a648: 83 ec 0c sub $0xc,%esp 10a64b: 56 push %esi 10a64c: 8b 45 e0 mov -0x20(%ebp),%eax 10a64f: ff 50 10 call *0x10(%eax) 10a652: 83 c4 10 add $0x10,%esp 10a655: 83 f8 04 cmp $0x4,%eax 10a658: 75 3e jne 10a698 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 10a65a: 50 push %eax 10a65b: ff 75 10 pushl 0x10(%ebp) 10a65e: 53 push %ebx 10a65f: 56 push %esi 10a660: 8b 45 e0 mov -0x20(%ebp),%eax 10a663: ff 50 3c call *0x3c(%eax) rtems_filesystem_freenode( &loc ); 10a666: 89 34 24 mov %esi,(%esp) 10a669: 89 45 c4 mov %eax,-0x3c(%ebp) 10a66c: e8 eb ee ff ff call 10955c return result; 10a671: 83 c4 10 add $0x10,%esp 10a674: 8b 45 c4 mov -0x3c(%ebp),%eax } 10a677: 8d 65 f4 lea -0xc(%ebp),%esp 10a67a: 5b pop %ebx 10a67b: 5e pop %esi 10a67c: 5f pop %edi 10a67d: c9 leave 10a67e: c3 ret 10a67f: 90 nop { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 10a680: e8 6b b2 00 00 call 1158f0 <__errno> 10a685: c7 00 0e 00 00 00 movl $0xe,(%eax) 10a68b: b8 ff ff ff ff mov $0xffffffff,%eax result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10a690: 8d 65 f4 lea -0xc(%ebp),%esp 10a693: 5b pop %ebx 10a694: 5e pop %esi 10a695: 5f pop %edi 10a696: c9 leave 10a697: 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 ); 10a698: 83 ec 0c sub $0xc,%esp 10a69b: 56 push %esi 10a69c: e8 bb ee ff ff call 10955c rtems_set_errno_and_return_minus_one( EINVAL ); 10a6a1: e8 4a b2 00 00 call 1158f0 <__errno> 10a6a6: c7 00 16 00 00 00 movl $0x16,(%eax) 10a6ac: 83 c4 10 add $0x10,%esp 10a6af: b8 ff ff ff ff mov $0xffffffff,%eax 10a6b4: eb 89 jmp 10a63f =============================================================================== 001092c4 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 1092c4: 55 push %ebp 1092c5: 89 e5 mov %esp,%ebp 1092c7: 57 push %edi 1092c8: 56 push %esi 1092c9: 53 push %ebx 1092ca: 83 ec 1c sub $0x1c,%esp 1092cd: 8b 45 08 mov 0x8(%ebp),%eax 1092d0: 8b 5d 0c mov 0xc(%ebp),%ebx int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 1092d3: 3b 05 ac 49 12 00 cmp 0x1249ac,%eax 1092d9: 0f 83 ef 00 00 00 jae 1093ce iop = rtems_libio_iop( fd ); 1092df: c1 e0 03 shl $0x3,%eax 1092e2: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi 1092e9: 29 c6 sub %eax,%esi 1092eb: 03 35 e0 8b 12 00 add 0x128be0,%esi rtems_libio_check_is_open( iop ); 1092f1: 8b 46 14 mov 0x14(%esi),%eax 1092f4: f6 c4 01 test $0x1,%ah 1092f7: 0f 84 d1 00 00 00 je 1093ce rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 1092fd: a8 02 test $0x2,%al 1092ff: 0f 84 97 00 00 00 je 10939c <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 109305: 85 db test %ebx,%ebx 109307: 0f 84 8f 00 00 00 je 10939c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 10930d: 8b 7d 10 mov 0x10(%ebp),%edi 109310: 85 ff test %edi,%edi 109312: 0f 8e 84 00 00 00 jle 10939c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 109318: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 10931f: 7f 7b jg 10939c <== NEVER TAKEN 109321: c6 45 e4 01 movb $0x1,-0x1c(%ebp) 109325: 31 c0 xor %eax,%eax 109327: 31 d2 xor %edx,%edx 109329: eb 03 jmp 10932e 10932b: 90 nop if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 10932c: 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 ) 10932e: 8b 0c c3 mov (%ebx,%eax,8),%ecx 109331: 85 c9 test %ecx,%ecx 109333: 74 67 je 10939c rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109335: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx 109339: 8d 3c 0a lea (%edx,%ecx,1),%edi if ( total < old ) 10933c: 39 fa cmp %edi,%edx 10933e: 7f 5c jg 10939c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 109340: 85 c9 test %ecx,%ecx 109342: 74 04 je 109348 all_zeros = false; 109344: 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++ ) { 109348: 40 inc %eax 109349: 39 45 10 cmp %eax,0x10(%ebp) 10934c: 7f de jg 10932c /* * 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 ) { 10934e: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp) 109352: 75 68 jne 1093bc 109354: 31 ff xor %edi,%edi 109356: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10935d: eb 1d jmp 10937c 10935f: 90 nop ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 109360: 74 0e je 109370 <== NEVER TAKEN iop->offset += bytes; 109362: 89 c1 mov %eax,%ecx 109364: c1 f9 1f sar $0x1f,%ecx 109367: 01 46 0c add %eax,0xc(%esi) 10936a: 11 4e 10 adc %ecx,0x10(%esi) total += bytes; 10936d: 01 45 e4 add %eax,-0x1c(%ebp) } if (bytes != iov[ v ].iov_len) 109370: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax 109374: 75 38 jne 1093ae <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109376: 47 inc %edi 109377: 39 7d 10 cmp %edi,0x10(%ebp) 10937a: 7e 32 jle 1093ae bytes = (*iop->pathinfo.handlers->read_h)( 10937c: 50 push %eax 10937d: 8b 46 20 mov 0x20(%esi),%eax 109380: ff 74 fb 04 pushl 0x4(%ebx,%edi,8) 109384: ff 34 fb pushl (%ebx,%edi,8) 109387: 56 push %esi 109388: ff 50 08 call *0x8(%eax) iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 10938b: 83 c4 10 add $0x10,%esp 10938e: 83 f8 00 cmp $0x0,%eax 109391: 7d cd jge 109360 <== ALWAYS TAKEN return -1; 109393: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 10939a: eb 12 jmp 1093ae <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 10939c: e8 6f a7 00 00 call 113b10 <__errno> 1093a1: c7 00 16 00 00 00 movl $0x16,(%eax) 1093a7: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 1093ae: 8b 45 e4 mov -0x1c(%ebp),%eax 1093b1: 8d 65 f4 lea -0xc(%ebp),%esp 1093b4: 5b pop %ebx 1093b5: 5e pop %esi 1093b6: 5f pop %edi 1093b7: c9 leave 1093b8: c3 ret 1093b9: 8d 76 00 lea 0x0(%esi),%esi * 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; 1093bc: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 1093c3: 8b 45 e4 mov -0x1c(%ebp),%eax 1093c6: 8d 65 f4 lea -0xc(%ebp),%esp 1093c9: 5b pop %ebx 1093ca: 5e pop %esi 1093cb: 5f pop %edi 1093cc: c9 leave 1093cd: 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 ); 1093ce: e8 3d a7 00 00 call 113b10 <__errno> 1093d3: c7 00 09 00 00 00 movl $0x9,(%eax) 1093d9: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) 1093e0: eb cc jmp 1093ae =============================================================================== 0011ef18 : void *realloc( void *ptr, size_t size ) { 11ef18: 55 push %ebp 11ef19: 89 e5 mov %esp,%ebp 11ef1b: 57 push %edi 11ef1c: 56 push %esi 11ef1d: 53 push %ebx 11ef1e: 83 ec 2c sub $0x2c,%esp 11ef21: 8b 5d 08 mov 0x8(%ebp),%ebx 11ef24: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 11ef27: ff 05 b0 76 12 00 incl 0x1276b0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11ef2d: 83 3d 80 79 12 00 03 cmpl $0x3,0x127980 11ef34: 74 72 je 11efa8 <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11ef36: 85 db test %ebx,%ebx 11ef38: 74 5e je 11ef98 return malloc( size ); if ( !size ) { 11ef3a: 85 f6 test %esi,%esi 11ef3c: 74 3a je 11ef78 <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11ef3e: 52 push %edx 11ef3f: 8d 45 e4 lea -0x1c(%ebp),%eax 11ef42: 50 push %eax 11ef43: 53 push %ebx 11ef44: ff 35 90 34 12 00 pushl 0x123490 11ef4a: e8 49 01 00 00 call 11f098 <_Protected_heap_Get_block_size> 11ef4f: 83 c4 10 add $0x10,%esp 11ef52: 84 c0 test %al,%al 11ef54: 74 32 je 11ef88 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 11ef56: 50 push %eax 11ef57: 56 push %esi 11ef58: 53 push %ebx 11ef59: ff 35 90 34 12 00 pushl 0x123490 11ef5f: e8 6c 01 00 00 call 11f0d0 <_Protected_heap_Resize_block> 11ef64: 83 c4 10 add $0x10,%esp 11ef67: 84 c0 test %al,%al 11ef69: 74 5d je 11efc8 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 11ef6b: 89 d8 mov %ebx,%eax 11ef6d: 8d 65 f4 lea -0xc(%ebp),%esp 11ef70: 5b pop %ebx 11ef71: 5e pop %esi 11ef72: 5f pop %edi 11ef73: c9 leave 11ef74: c3 ret 11ef75: 8d 76 00 lea 0x0(%esi),%esi */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 11ef78: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11ef7b: 53 push %ebx <== NOT EXECUTED 11ef7c: e8 b3 86 fe ff call 107634 <== NOT EXECUTED return (void *) 0; 11ef81: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11ef84: 31 db xor %ebx,%ebx <== NOT EXECUTED 11ef86: eb e3 jmp 11ef6b <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 11ef88: e8 c7 3e ff ff call 112e54 <__errno> 11ef8d: c7 00 16 00 00 00 movl $0x16,(%eax) return (void *) 0; 11ef93: 31 db xor %ebx,%ebx 11ef95: eb d4 jmp 11ef6b 11ef97: 90 nop /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 11ef98: 83 ec 0c sub $0xc,%esp 11ef9b: 56 push %esi 11ef9c: e8 67 89 fe ff call 107908 11efa1: 89 c3 mov %eax,%ebx 11efa3: 83 c4 10 add $0x10,%esp 11efa6: eb c3 jmp 11ef6b /* * 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) 11efa8: a1 ec 77 12 00 mov 0x1277ec,%eax 11efad: 85 c0 test %eax,%eax 11efaf: 74 04 je 11efb5 <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 11efb1: 31 db xor %ebx,%ebx 11efb3: eb b6 jmp 11ef6b if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 11efb5: 8b 0d 94 7d 12 00 mov 0x127d94,%ecx 11efbb: 85 c9 test %ecx,%ecx 11efbd: 0f 84 73 ff ff ff je 11ef36 <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 11efc3: 31 db xor %ebx,%ebx 11efc5: eb a4 jmp 11ef6b <== NOT EXECUTED 11efc7: 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 ); 11efc8: 83 ec 0c sub $0xc,%esp 11efcb: 56 push %esi 11efcc: e8 37 89 fe ff call 107908 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11efd1: ff 0d a4 76 12 00 decl 0x1276a4 if ( !new_area ) { 11efd7: 83 c4 10 add $0x10,%esp 11efda: 85 c0 test %eax,%eax 11efdc: 74 d3 je 11efb1 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11efde: 8b 55 e4 mov -0x1c(%ebp),%edx 11efe1: 89 f1 mov %esi,%ecx 11efe3: 39 d6 cmp %edx,%esi 11efe5: 76 02 jbe 11efe9 <== NEVER TAKEN 11efe7: 89 d1 mov %edx,%ecx 11efe9: 89 c7 mov %eax,%edi 11efeb: 89 de mov %ebx,%esi 11efed: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11efef: 83 ec 0c sub $0xc,%esp 11eff2: 53 push %ebx 11eff3: 89 45 d4 mov %eax,-0x2c(%ebp) 11eff6: e8 39 86 fe ff call 107634 return new_area; 11effb: 83 c4 10 add $0x10,%esp 11effe: 8b 45 d4 mov -0x2c(%ebp),%eax 11f001: 89 c3 mov %eax,%ebx 11f003: e9 63 ff ff ff jmp 11ef6b =============================================================================== 001088a8 : #include int rmdir( const char *pathname ) { 1088a8: 55 push %ebp 1088a9: 89 e5 mov %esp,%ebp 1088ab: 57 push %edi 1088ac: 56 push %esi 1088ad: 53 push %ebx 1088ae: 83 ec 58 sub $0x58,%esp 1088b1: 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 ); 1088b4: 53 push %ebx 1088b5: e8 1e f1 ff ff call 1079d8 if ( parentpathlen == 0 ) 1088ba: 83 c4 10 add $0x10,%esp 1088bd: 85 c0 test %eax,%eax 1088bf: 0f 85 0f 01 00 00 jne 1089d4 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 1088c5: 50 push %eax 1088c6: 8d 45 d0 lea -0x30(%ebp),%eax 1088c9: 89 45 b4 mov %eax,-0x4c(%ebp) 1088cc: 50 push %eax 1088cd: 8d 45 e4 lea -0x1c(%ebp),%eax 1088d0: 50 push %eax 1088d1: 53 push %ebx 1088d2: e8 45 01 00 00 call 108a1c 1088d7: 83 c4 10 add $0x10,%esp 1088da: 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; 1088dc: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 1088e0: 8d 7d bc lea -0x44(%ebp),%edi 1088e3: b9 05 00 00 00 mov $0x5,%ecx 1088e8: 8b 75 b4 mov -0x4c(%ebp),%esi 1088eb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 1088ed: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 1088ef: be ff ff ff ff mov $0xffffffff,%esi 1088f4: 89 f1 mov %esi,%ecx 1088f6: 89 df mov %ebx,%edi 1088f8: 31 c0 xor %eax,%eax 1088fa: f2 ae repnz scas %es:(%edi),%al 1088fc: f7 d1 not %ecx 1088fe: 49 dec %ecx 1088ff: 83 ec 08 sub $0x8,%esp 108902: 51 push %ecx 108903: 53 push %ebx 108904: e8 13 f1 ff ff call 107a1c 108909: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10890b: 89 f1 mov %esi,%ecx 10890d: 89 df mov %ebx,%edi 10890f: 31 c0 xor %eax,%eax 108911: f2 ae repnz scas %es:(%edi),%al 108913: f7 d1 not %ecx 108915: 49 dec %ecx 108916: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10891d: 8d 75 bc lea -0x44(%ebp),%esi 108920: 56 push %esi 108921: 6a 00 push $0x0 108923: 51 push %ecx 108924: 53 push %ebx 108925: e8 02 f0 ff ff call 10792c 0, &loc, false ); if ( result != 0 ) { 10892a: 83 c4 20 add $0x20,%esp 10892d: 85 c0 test %eax,%eax 10892f: 75 5b jne 10898c } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 108931: 83 ec 0c sub $0xc,%esp 108934: 56 push %esi 108935: 8b 45 c8 mov -0x38(%ebp),%eax 108938: ff 50 10 call *0x10(%eax) 10893b: 83 c4 10 add $0x10,%esp 10893e: 48 dec %eax 10893f: 75 5f jne 1089a0 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 108941: 83 ec 08 sub $0x8,%esp 108944: 56 push %esi 108945: ff 75 b4 pushl -0x4c(%ebp) 108948: 8b 45 c4 mov -0x3c(%ebp),%eax 10894b: ff 50 34 call *0x34(%eax) rtems_filesystem_freenode( &loc ); 10894e: 89 34 24 mov %esi,(%esp) 108951: 89 45 ac mov %eax,-0x54(%ebp) 108954: e8 13 f1 ff ff call 107a6c if ( free_parentloc ) 108959: 83 c4 10 add $0x10,%esp 10895c: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 108960: 8b 45 ac mov -0x54(%ebp),%eax 108963: 75 0b jne 108970 rtems_filesystem_freenode( &parentloc ); return result; } 108965: 8d 65 f4 lea -0xc(%ebp),%esp 108968: 5b pop %ebx 108969: 5e pop %esi 10896a: 5f pop %edi 10896b: c9 leave 10896c: c3 ret 10896d: 8d 76 00 lea 0x0(%esi),%esi result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 108970: 83 ec 0c sub $0xc,%esp 108973: ff 75 b4 pushl -0x4c(%ebp) 108976: e8 f1 f0 ff ff call 107a6c 10897b: 83 c4 10 add $0x10,%esp 10897e: 8b 45 ac mov -0x54(%ebp),%eax return result; } 108981: 8d 65 f4 lea -0xc(%ebp),%esp 108984: 5b pop %ebx 108985: 5e pop %esi 108986: 5f pop %edi 108987: c9 leave 108988: c3 ret 108989: 8d 76 00 lea 0x0(%esi),%esi 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 ) 10898c: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 108990: 75 6f jne 108a01 rtems_filesystem_freenode( &parentloc ); return -1; 108992: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 108997: 8d 65 f4 lea -0xc(%ebp),%esp 10899a: 5b pop %ebx 10899b: 5e pop %esi 10899c: 5f pop %edi 10899d: c9 leave 10899e: c3 ret 10899f: 90 nop /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 1089a0: 83 ec 0c sub $0xc,%esp 1089a3: 56 push %esi 1089a4: e8 c3 f0 ff ff call 107a6c if ( free_parentloc ) 1089a9: 83 c4 10 add $0x10,%esp 1089ac: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 1089b0: 74 0e je 1089c0 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 1089b2: 83 ec 0c sub $0xc,%esp 1089b5: ff 75 b4 pushl -0x4c(%ebp) 1089b8: e8 af f0 ff ff call 107a6c 1089bd: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 1089c0: e8 b7 ac 00 00 call 11367c <__errno> 1089c5: c7 00 14 00 00 00 movl $0x14,(%eax) 1089cb: b8 ff ff ff ff mov $0xffffffff,%eax 1089d0: eb 93 jmp 108965 1089d2: 66 90 xchg %ax,%ax parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 1089d4: 89 c2 mov %eax,%edx 1089d6: 83 ec 0c sub $0xc,%esp 1089d9: 6a 00 push $0x0 1089db: 8d 45 d0 lea -0x30(%ebp),%eax 1089de: 89 45 b4 mov %eax,-0x4c(%ebp) 1089e1: 50 push %eax 1089e2: 6a 02 push $0x2 1089e4: 52 push %edx 1089e5: 53 push %ebx 1089e6: 89 55 ac mov %edx,-0x54(%ebp) 1089e9: e8 a6 ef ff ff call 107994 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 1089ee: 83 c4 20 add $0x20,%esp 1089f1: 85 c0 test %eax,%eax 1089f3: 8b 55 ac mov -0x54(%ebp),%edx 1089f6: 75 9a jne 108992 <== NEVER TAKEN return -1; free_parentloc = true; 1089f8: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 1089fc: e9 df fe ff ff jmp 1088e0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 108a01: 83 ec 0c sub $0xc,%esp 108a04: ff 75 b4 pushl -0x4c(%ebp) 108a07: e8 60 f0 ff ff call 107a6c 108a0c: 83 c4 10 add $0x10,%esp return -1; 108a0f: b8 ff ff ff ff mov $0xffffffff,%eax 108a14: e9 4c ff ff ff jmp 108965 =============================================================================== 0010baf8 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 10baf8: 55 push %ebp 10baf9: 89 e5 mov %esp,%ebp 10bafb: 57 push %edi 10bafc: 56 push %esi 10bafd: 53 push %ebx 10bafe: 83 ec 58 sub $0x58,%esp 10bb01: 8b 5d 08 mov 0x8(%ebp),%ebx struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); 10bb04: 68 a0 94 12 00 push $0x1294a0 10bb09: e8 86 09 00 00 call 10c494 10bb0e: 89 c6 mov %eax,%esi if (result != 0) { 10bb10: 83 c4 10 add $0x10,%esp 10bb13: 85 c0 test %eax,%eax 10bb15: 0f 85 c1 00 00 00 jne 10bbdc <== NEVER TAKEN return result; } /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); 10bb1b: e8 20 12 00 00 call 10cd40 10bb20: 51 push %ecx 10bb21: 8d 55 c4 lea -0x3c(%ebp),%edx 10bb24: 52 push %edx 10bb25: 8d 55 e0 lea -0x20(%ebp),%edx 10bb28: 52 push %edx 10bb29: 50 push %eax 10bb2a: e8 e1 0d 00 00 call 10c910 req->caller_thread = pthread_self (); 10bb2f: e8 0c 12 00 00 call 10cd40 10bb34: 89 43 10 mov %eax,0x10(%ebx) req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 10bb37: 8b 43 14 mov 0x14(%ebx),%eax 10bb3a: 8b 55 c4 mov -0x3c(%ebp),%edx 10bb3d: 2b 50 14 sub 0x14(%eax),%edx 10bb40: 89 53 0c mov %edx,0xc(%ebx) req->policy = policy; 10bb43: 8b 55 e0 mov -0x20(%ebp),%edx 10bb46: 89 53 08 mov %edx,0x8(%ebx) req->aiocbp->error_code = EINPROGRESS; 10bb49: c7 40 30 77 00 00 00 movl $0x77,0x30(%eax) req->aiocbp->return_value = 0; 10bb50: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) if ((aio_request_queue.idle_threads == 0) && 10bb57: 83 c4 10 add $0x10,%esp 10bb5a: 8b 15 08 95 12 00 mov 0x129508,%edx 10bb60: 85 d2 test %edx,%edx 10bb62: 75 0d jne 10bb71 <== NEVER TAKEN 10bb64: 83 3d 04 95 12 00 04 cmpl $0x4,0x129504 10bb6b: 0f 8e 83 00 00 00 jle 10bbf4 else { /* the maximum number of threads has been already created even though some of them might be idle. The request belongs to one of the active fd chain */ r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 10bb71: 51 push %ecx 10bb72: 6a 00 push $0x0 10bb74: ff 30 pushl (%eax) 10bb76: 68 e8 94 12 00 push $0x1294e8 10bb7b: e8 28 fb ff ff call 10b6a8 10bb80: 89 c7 mov %eax,%edi req->aiocbp->aio_fildes, 0); if (r_chain != NULL) 10bb82: 83 c4 10 add $0x10,%esp 10bb85: 85 c0 test %eax,%eax 10bb87: 0f 84 df 00 00 00 je 10bc6c { pthread_mutex_lock (&r_chain->mutex); 10bb8d: 8d 57 1c lea 0x1c(%edi),%edx 10bb90: 83 ec 0c sub $0xc,%esp 10bb93: 52 push %edx 10bb94: 89 55 b4 mov %edx,-0x4c(%ebp) 10bb97: e8 f8 08 00 00 call 10c494 rtems_aio_insert_prio (&r_chain->perfd, req); 10bb9c: 58 pop %eax 10bb9d: 5a pop %edx 10bb9e: 53 push %ebx 10bb9f: 8d 47 08 lea 0x8(%edi),%eax 10bba2: 50 push %eax 10bba3: e8 48 fe ff ff call 10b9f0 pthread_cond_signal (&r_chain->cond); 10bba8: 83 c7 20 add $0x20,%edi 10bbab: 89 3c 24 mov %edi,(%esp) 10bbae: e8 b1 04 00 00 call 10c064 pthread_mutex_unlock (&r_chain->mutex); 10bbb3: 8b 55 b4 mov -0x4c(%ebp),%edx 10bbb6: 89 14 24 mov %edx,(%esp) 10bbb9: e8 5e 09 00 00 call 10c51c 10bbbe: 83 c4 10 add $0x10,%esp if (aio_request_queue.idle_threads > 0) pthread_cond_signal (&aio_request_queue.new_req); } } pthread_mutex_unlock (&aio_request_queue.mutex); 10bbc1: 83 ec 0c sub $0xc,%esp 10bbc4: 68 a0 94 12 00 push $0x1294a0 10bbc9: e8 4e 09 00 00 call 10c51c return 0; 10bbce: 83 c4 10 add $0x10,%esp } 10bbd1: 89 f0 mov %esi,%eax 10bbd3: 8d 65 f4 lea -0xc(%ebp),%esp 10bbd6: 5b pop %ebx 10bbd7: 5e pop %esi 10bbd8: 5f pop %edi 10bbd9: c9 leave 10bbda: c3 ret 10bbdb: 90 nop /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); if (result != 0) { free (req); 10bbdc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bbdf: 53 push %ebx <== NOT EXECUTED 10bbe0: e8 cf c4 ff ff call 1080b4 <== NOT EXECUTED return result; 10bbe5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } pthread_mutex_unlock (&aio_request_queue.mutex); return 0; } 10bbe8: 89 f0 mov %esi,%eax <== NOT EXECUTED 10bbea: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10bbed: 5b pop %ebx <== NOT EXECUTED 10bbee: 5e pop %esi <== NOT EXECUTED 10bbef: 5f pop %edi <== NOT EXECUTED 10bbf0: c9 leave <== NOT EXECUTED 10bbf1: c3 ret <== NOT EXECUTED 10bbf2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 10bbf4: 57 push %edi 10bbf5: 6a 01 push $0x1 10bbf7: ff 30 pushl (%eax) 10bbf9: 68 e8 94 12 00 push $0x1294e8 10bbfe: e8 a5 fa ff ff call 10b6a8 10bc03: 89 c7 mov %eax,%edi if (r_chain->new_fd == 1) { 10bc05: 83 c4 10 add $0x10,%esp 10bc08: 83 78 18 01 cmpl $0x1,0x18(%eax) 10bc0c: 0f 85 7b ff ff ff jne 10bb8d RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); 10bc12: 83 ec 08 sub $0x8,%esp 10bc15: 53 push %ebx 10bc16: 8d 40 08 lea 0x8(%eax),%eax 10bc19: 50 push %eax 10bc1a: e8 c9 21 00 00 call 10dde8 <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; 10bc1f: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) pthread_mutex_init (&r_chain->mutex, NULL); 10bc26: 5a pop %edx 10bc27: 59 pop %ecx 10bc28: 6a 00 push $0x0 10bc2a: 8d 47 1c lea 0x1c(%edi),%eax 10bc2d: 50 push %eax 10bc2e: e8 15 07 00 00 call 10c348 pthread_cond_init (&r_chain->cond, NULL); 10bc33: 5b pop %ebx 10bc34: 58 pop %eax 10bc35: 6a 00 push $0x0 10bc37: 8d 47 20 lea 0x20(%edi),%eax 10bc3a: 50 push %eax 10bc3b: e8 70 03 00 00 call 10bfb0 AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, 10bc40: 57 push %edi 10bc41: 68 a4 b7 10 00 push $0x10b7a4 10bc46: 68 a8 94 12 00 push $0x1294a8 10bc4b: 8d 45 e4 lea -0x1c(%ebp),%eax 10bc4e: 50 push %eax 10bc4f: e8 34 0a 00 00 call 10c688 10bc54: 89 c3 mov %eax,%ebx rtems_aio_handle, (void *) r_chain); if (result != 0) { 10bc56: 83 c4 20 add $0x20,%esp 10bc59: 85 c0 test %eax,%eax 10bc5b: 0f 85 8e 00 00 00 jne 10bcef <== NEVER TAKEN pthread_mutex_unlock (&aio_request_queue.mutex); return result; } ++aio_request_queue.active_threads; 10bc61: ff 05 04 95 12 00 incl 0x129504 10bc67: e9 55 ff ff ff jmp 10bbc1 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 10bc6c: 57 push %edi 10bc6d: 6a 01 push $0x1 10bc6f: 8b 43 14 mov 0x14(%ebx),%eax 10bc72: ff 30 pushl (%eax) 10bc74: 68 f4 94 12 00 push $0x1294f4 10bc79: e8 2a fa ff ff call 10b6a8 10bc7e: 89 c7 mov %eax,%edi if (r_chain->new_fd == 1) { 10bc80: 83 c4 10 add $0x10,%esp 10bc83: 83 78 18 01 cmpl $0x1,0x18(%eax) 10bc87: 74 33 je 10bcbc r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); pthread_cond_init (&r_chain->cond, NULL); } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); 10bc89: 83 ec 08 sub $0x8,%esp 10bc8c: 53 push %ebx 10bc8d: 83 c7 08 add $0x8,%edi 10bc90: 57 push %edi 10bc91: e8 5a fd ff ff call 10b9f0 10bc96: 83 c4 10 add $0x10,%esp if (aio_request_queue.idle_threads > 0) 10bc99: 8b 0d 08 95 12 00 mov 0x129508,%ecx 10bc9f: 85 c9 test %ecx,%ecx 10bca1: 0f 8e 1a ff ff ff jle 10bbc1 <== ALWAYS TAKEN pthread_cond_signal (&aio_request_queue.new_req); 10bca7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bcaa: 68 a4 94 12 00 push $0x1294a4 <== NOT EXECUTED 10bcaf: e8 b0 03 00 00 call 10c064 <== NOT EXECUTED 10bcb4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bcb7: e9 05 ff ff ff jmp 10bbc1 <== NOT EXECUTED 10bcbc: 83 ec 08 sub $0x8,%esp 10bcbf: 53 push %ebx 10bcc0: 8d 40 08 lea 0x8(%eax),%eax 10bcc3: 50 push %eax 10bcc4: e8 1f 21 00 00 call 10dde8 <_Chain_Insert> if (r_chain->new_fd == 1) { /* If this is a new fd chain we signal the idle threads that might be waiting for requests */ AIO_printf (" New chain on waiting queue \n "); rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; 10bcc9: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) pthread_mutex_init (&r_chain->mutex, NULL); 10bcd0: 5a pop %edx 10bcd1: 59 pop %ecx 10bcd2: 6a 00 push $0x0 10bcd4: 8d 47 1c lea 0x1c(%edi),%eax 10bcd7: 50 push %eax 10bcd8: e8 6b 06 00 00 call 10c348 pthread_cond_init (&r_chain->cond, NULL); 10bcdd: 5b pop %ebx 10bcde: 58 pop %eax 10bcdf: 6a 00 push $0x0 10bce1: 83 c7 20 add $0x20,%edi 10bce4: 57 push %edi 10bce5: e8 c6 02 00 00 call 10bfb0 10bcea: 83 c4 10 add $0x10,%esp 10bced: eb aa jmp 10bc99 AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, rtems_aio_handle, (void *) r_chain); if (result != 0) { pthread_mutex_unlock (&aio_request_queue.mutex); 10bcef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bcf2: 68 a0 94 12 00 push $0x1294a0 <== NOT EXECUTED 10bcf7: e8 20 08 00 00 call 10c51c <== NOT EXECUTED return result; 10bcfc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bcff: 89 de mov %ebx,%esi <== NOT EXECUTED 10bd01: e9 cb fe ff ff jmp 10bbd1 <== NOT EXECUTED =============================================================================== 0010b7a4 : * NULL - if error */ static void * rtems_aio_handle (void *arg) { 10b7a4: 55 push %ebp 10b7a5: 89 e5 mov %esp,%ebp 10b7a7: 57 push %edi 10b7a8: 56 push %esi 10b7a9: 53 push %ebx 10b7aa: 83 ec 4c sub $0x4c,%esp rtems_aio_request_chain *r_chain = arg; 10b7ad: 8b 7d 08 mov 0x8(%ebp),%edi 10b7b0: 8d 47 1c lea 0x1c(%edi),%eax 10b7b3: 89 45 b4 mov %eax,-0x4c(%ebp) 10b7b6: 66 90 xchg %ax,%ax /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); 10b7b8: 83 ec 0c sub $0xc,%esp 10b7bb: ff 75 b4 pushl -0x4c(%ebp) 10b7be: e8 d1 0c 00 00 call 10c494 if (result != 0) 10b7c3: 83 c4 10 add $0x10,%esp 10b7c6: 85 c0 test %eax,%eax 10b7c8: 0f 85 2a 01 00 00 jne 10b8f8 <== NEVER TAKEN } } AIO_printf ("Thread finished\n"); return NULL; } 10b7ce: 8b 5f 08 mov 0x8(%edi),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10b7d1: 8d 47 0c lea 0xc(%edi),%eax /* If the locked chain is not empty, take the first request extract it, unlock the chain and process the request, in this way the user can supply more requests to this fd chain */ if (!rtems_chain_is_empty (chain)) { 10b7d4: 39 c3 cmp %eax,%ebx 10b7d6: 0f 84 d0 00 00 00 je 10b8ac node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); 10b7dc: e8 5f 15 00 00 call 10cd40 10b7e1: 52 push %edx 10b7e2: 8d 55 c0 lea -0x40(%ebp),%edx 10b7e5: 52 push %edx 10b7e6: 8d 55 e4 lea -0x1c(%ebp),%edx 10b7e9: 52 push %edx 10b7ea: 50 push %eax 10b7eb: e8 20 11 00 00 call 10c910 param.sched_priority = req->priority; 10b7f0: 8b 43 0c mov 0xc(%ebx),%eax 10b7f3: 89 45 c0 mov %eax,-0x40(%ebp) pthread_setschedparam (pthread_self(), req->policy, ¶m); 10b7f6: 8b 73 08 mov 0x8(%ebx),%esi 10b7f9: e8 42 15 00 00 call 10cd40 10b7fe: 83 c4 0c add $0xc,%esp 10b801: 8d 55 c0 lea -0x40(%ebp),%edx 10b804: 52 push %edx 10b805: 56 push %esi 10b806: 50 push %eax 10b807: e8 44 15 00 00 call 10cd50 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10b80c: 89 1c 24 mov %ebx,(%esp) 10b80f: e8 98 25 00 00 call 10ddac <_Chain_Extract> rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); 10b814: 5e pop %esi 10b815: ff 75 b4 pushl -0x4c(%ebp) 10b818: e8 ff 0c 00 00 call 10c51c switch (req->aiocbp->aio_lio_opcode) { 10b81d: 8b 73 14 mov 0x14(%ebx),%esi 10b820: 83 c4 10 add $0x10,%esp 10b823: 8b 46 2c mov 0x2c(%esi),%eax 10b826: 83 f8 02 cmp $0x2,%eax 10b829: 74 21 je 10b84c 10b82b: 83 f8 03 cmp $0x3,%eax 10b82e: 74 6c je 10b89c <== NEVER TAKEN 10b830: 48 dec %eax 10b831: 74 4d je 10b880 <== ALWAYS TAKEN default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; 10b833: c7 46 34 ff ff ff ff movl $0xffffffff,0x34(%esi) <== NOT EXECUTED req->aiocbp->error_code = errno; 10b83a: e8 bd 9e 00 00 call 1156fc <__errno> <== NOT EXECUTED 10b83f: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10b841: 89 46 30 mov %eax,0x30(%esi) <== NOT EXECUTED 10b844: e9 6f ff ff ff jmp 10b7b8 <== NOT EXECUTED 10b849: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_WRITE: AIO_printf ("write\n"); result = pwrite (req->aiocbp->aio_fildes, 10b84c: 83 ec 0c sub $0xc,%esp 10b84f: ff 76 08 pushl 0x8(%esi) 10b852: ff 76 04 pushl 0x4(%esi) 10b855: ff 76 10 pushl 0x10(%esi) 10b858: ff 76 0c pushl 0xc(%esi) 10b85b: ff 36 pushl (%esi) 10b85d: e8 32 a9 00 00 call 116194 (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 10b862: 83 c4 20 add $0x20,%esp break; default: result = -1; } if (result == -1) { 10b865: 83 f8 ff cmp $0xffffffff,%eax 10b868: 0f 84 78 01 00 00 je 10b9e6 <== NEVER TAKEN req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; 10b86e: 8b 53 14 mov 0x14(%ebx),%edx 10b871: 89 42 34 mov %eax,0x34(%edx) req->aiocbp->error_code = 0; 10b874: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 10b87b: e9 38 ff ff ff jmp 10b7b8 pthread_mutex_unlock (&r_chain->mutex); switch (req->aiocbp->aio_lio_opcode) { case LIO_READ: AIO_printf ("read\n"); result = pread (req->aiocbp->aio_fildes, 10b880: 83 ec 0c sub $0xc,%esp 10b883: ff 76 08 pushl 0x8(%esi) 10b886: ff 76 04 pushl 0x4(%esi) 10b889: ff 76 10 pushl 0x10(%esi) 10b88c: ff 76 0c pushl 0xc(%esi) 10b88f: ff 36 pushl (%esi) 10b891: e8 4a a8 00 00 call 1160e0 (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 10b896: 83 c4 20 add $0x20,%esp 10b899: eb ca jmp 10b865 10b89b: 90 nop req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_SYNC: AIO_printf ("sync\n"); result = fsync (req->aiocbp->aio_fildes); 10b89c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b89f: ff 36 pushl (%esi) <== NOT EXECUTED 10b8a1: e8 7a 66 00 00 call 111f20 <== NOT EXECUTED break; 10b8a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b8a9: eb ba jmp 10b865 <== NOT EXECUTED 10b8ab: 90 nop <== NOT EXECUTED struct timespec timeout; AIO_printf ("Chain is empty [WQ], wait for work\n"); pthread_mutex_unlock (&r_chain->mutex); 10b8ac: 83 ec 0c sub $0xc,%esp 10b8af: ff 75 b4 pushl -0x4c(%ebp) 10b8b2: e8 65 0c 00 00 call 10c51c pthread_mutex_lock (&aio_request_queue.mutex); 10b8b7: c7 04 24 a0 94 12 00 movl $0x1294a0,(%esp) 10b8be: e8 d1 0b 00 00 call 10c494 if (rtems_chain_is_empty (chain)) 10b8c3: 83 c4 10 add $0x10,%esp 10b8c6: 3b 5f 08 cmp 0x8(%edi),%ebx 10b8c9: 74 39 je 10b904 <== ALWAYS TAKEN } } /* If there was a request added in the initial fd chain then release the mutex and process it */ pthread_mutex_unlock (&aio_request_queue.mutex); 10b8cb: 83 ec 0c sub $0xc,%esp 10b8ce: 68 a0 94 12 00 push $0x1294a0 10b8d3: e8 44 0c 00 00 call 10c51c 10b8d8: 83 c4 10 add $0x10,%esp 10b8db: e9 d8 fe ff ff jmp 10b7b8 /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { AIO_printf ("Etimeout\n"); --aio_request_queue.idle_threads; 10b8e0: ff 0d 08 95 12 00 decl 0x129508 pthread_mutex_unlock (&aio_request_queue.mutex); 10b8e6: 83 ec 0c sub $0xc,%esp 10b8e9: 68 a0 94 12 00 push $0x1294a0 10b8ee: e8 29 0c 00 00 call 10c51c return NULL; 10b8f3: 83 c4 10 add $0x10,%esp 10b8f6: 66 90 xchg %ax,%ax } } AIO_printf ("Thread finished\n"); return NULL; } 10b8f8: 31 c0 xor %eax,%eax 10b8fa: 8d 65 f4 lea -0xc(%ebp),%esp 10b8fd: 5b pop %ebx 10b8fe: 5e pop %esi 10b8ff: 5f pop %edi 10b900: c9 leave 10b901: c3 ret 10b902: 66 90 xchg %ax,%ax pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); 10b904: 83 ec 08 sub $0x8,%esp 10b907: 8d 45 dc lea -0x24(%ebp),%eax 10b90a: 50 push %eax 10b90b: 6a 01 push $0x1 10b90d: e8 66 05 00 00 call 10be78 timeout.tv_sec += 3; 10b912: 83 45 dc 03 addl $0x3,-0x24(%ebp) timeout.tv_nsec = 0; 10b916: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) result = pthread_cond_timedwait (&r_chain->cond, 10b91d: 8d 5f 20 lea 0x20(%edi),%ebx 10b920: 83 c4 0c add $0xc,%esp 10b923: 8d 55 dc lea -0x24(%ebp),%edx 10b926: 52 push %edx 10b927: 68 a0 94 12 00 push $0x1294a0 10b92c: 53 push %ebx 10b92d: e8 b6 07 00 00 call 10c0e8 &aio_request_queue.mutex, &timeout); /* If no requests were added to the chain we delete the fd chain from the queue and start working with idle fd chains */ if (result == ETIMEDOUT) { 10b932: 83 c4 10 add $0x10,%esp 10b935: 83 f8 74 cmp $0x74,%eax 10b938: 75 91 jne 10b8cb <== NEVER TAKEN 10b93a: 83 ec 0c sub $0xc,%esp 10b93d: 57 push %edi 10b93e: e8 69 24 00 00 call 10ddac <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); 10b943: 59 pop %ecx 10b944: ff 75 b4 pushl -0x4c(%ebp) 10b947: e8 dc 08 00 00 call 10c228 pthread_cond_destroy (&r_chain->cond); 10b94c: 89 1c 24 mov %ebx,(%esp) 10b94f: e8 90 05 00 00 call 10bee4 free (r_chain); 10b954: 89 3c 24 mov %edi,(%esp) 10b957: e8 58 c7 ff ff call 1080b4 } } AIO_printf ("Thread finished\n"); return NULL; } 10b95c: 8b 3d f4 94 12 00 mov 0x1294f4,%edi pthread_cond_destroy (&r_chain->cond); free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { 10b962: 83 c4 10 add $0x10,%esp 10b965: 81 ff f8 94 12 00 cmp $0x1294f8,%edi 10b96b: 74 2b je 10b998 } } /* Otherwise move this chain to the working chain and start the loop all over again */ AIO_printf ("Work on idle\n"); --aio_request_queue.idle_threads; 10b96d: ff 0d 08 95 12 00 decl 0x129508 ++aio_request_queue.active_threads; 10b973: ff 05 04 95 12 00 incl 0x129504 10b979: 83 ec 0c sub $0xc,%esp 10b97c: 57 push %edi 10b97d: e8 2a 24 00 00 call 10ddac <_Chain_Extract> node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = (rtems_aio_request_chain *) node; rtems_aio_move_to_work (r_chain); 10b982: 89 3c 24 mov %edi,(%esp) 10b985: e8 de fd ff ff call 10b768 10b98a: 83 c4 10 add $0x10,%esp 10b98d: 8d 47 1c lea 0x1c(%edi),%eax 10b990: 89 45 b4 mov %eax,-0x4c(%ebp) 10b993: e9 33 ff ff ff jmp 10b8cb /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { AIO_printf ("Chain is empty [IQ], wait for work\n"); ++aio_request_queue.idle_threads; 10b998: ff 05 08 95 12 00 incl 0x129508 --aio_request_queue.active_threads; 10b99e: ff 0d 04 95 12 00 decl 0x129504 clock_gettime (CLOCK_REALTIME, &timeout); 10b9a4: 52 push %edx 10b9a5: 52 push %edx 10b9a6: 8d 45 dc lea -0x24(%ebp),%eax 10b9a9: 50 push %eax 10b9aa: 6a 01 push $0x1 10b9ac: e8 c7 04 00 00 call 10be78 timeout.tv_sec += 3; 10b9b1: 83 45 dc 03 addl $0x3,-0x24(%ebp) timeout.tv_nsec = 0; 10b9b5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) result = pthread_cond_timedwait (&aio_request_queue.new_req, 10b9bc: 83 c4 0c add $0xc,%esp 10b9bf: 8d 55 dc lea -0x24(%ebp),%edx 10b9c2: 52 push %edx 10b9c3: 68 a0 94 12 00 push $0x1294a0 10b9c8: 68 a4 94 12 00 push $0x1294a4 10b9cd: e8 16 07 00 00 call 10c0e8 &aio_request_queue.mutex, &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { 10b9d2: 83 c4 10 add $0x10,%esp 10b9d5: 83 f8 74 cmp $0x74,%eax 10b9d8: 0f 84 02 ff ff ff je 10b8e0 <== ALWAYS TAKEN 10b9de: 8b 3d f4 94 12 00 mov 0x1294f4,%edi <== NOT EXECUTED 10b9e4: eb 87 jmp 10b96d <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 10b9e6: 8b 73 14 mov 0x14(%ebx),%esi <== NOT EXECUTED 10b9e9: e9 45 fe ff ff jmp 10b833 <== NOT EXECUTED =============================================================================== 0010b580 : * 0 - if initialization succeeded */ int rtems_aio_init (void) { 10b580: 55 push %ebp 10b581: 89 e5 mov %esp,%ebp 10b583: 53 push %ebx 10b584: 83 ec 10 sub $0x10,%esp int result = 0; result = pthread_attr_init (&aio_request_queue.attr); 10b587: 68 a8 94 12 00 push $0x1294a8 10b58c: e8 a3 10 00 00 call 10c634 10b591: 89 c3 mov %eax,%ebx if (result != 0) 10b593: 83 c4 10 add $0x10,%esp 10b596: 85 c0 test %eax,%eax 10b598: 74 0a je 10b5a4 <== ALWAYS TAKEN aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; return result; } 10b59a: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b59c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10b59f: c9 leave <== NOT EXECUTED 10b5a0: c3 ret <== NOT EXECUTED 10b5a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED result = pthread_attr_init (&aio_request_queue.attr); if (result != 0) return result; result = 10b5a4: 83 ec 08 sub $0x8,%esp 10b5a7: 6a 00 push $0x0 10b5a9: 68 a8 94 12 00 push $0x1294a8 10b5ae: e8 ad 10 00 00 call 10c660 pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) 10b5b3: 83 c4 10 add $0x10,%esp 10b5b6: 85 c0 test %eax,%eax 10b5b8: 0f 85 96 00 00 00 jne 10b654 <== NEVER TAKEN pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 10b5be: 83 ec 08 sub $0x8,%esp 10b5c1: 6a 00 push $0x0 10b5c3: 68 a0 94 12 00 push $0x1294a0 10b5c8: e8 7b 0d 00 00 call 10c348 if (result != 0) 10b5cd: 83 c4 10 add $0x10,%esp 10b5d0: 85 c0 test %eax,%eax 10b5d2: 0f 85 b8 00 00 00 jne 10b690 <== NEVER TAKEN pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); 10b5d8: 83 ec 08 sub $0x8,%esp 10b5db: 6a 00 push $0x0 10b5dd: 68 a4 94 12 00 push $0x1294a4 10b5e2: e8 c9 09 00 00 call 10bfb0 10b5e7: 89 c3 mov %eax,%ebx if (result != 0) { 10b5e9: 83 c4 10 add $0x10,%esp 10b5ec: 85 c0 test %eax,%eax 10b5ee: 75 7c jne 10b66c <== NEVER TAKEN ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10b5f0: c7 05 e8 94 12 00 ec movl $0x1294ec,0x1294e8 10b5f7: 94 12 00 head->previous = NULL; 10b5fa: c7 05 ec 94 12 00 00 movl $0x0,0x1294ec 10b601: 00 00 00 tail->previous = head; 10b604: c7 05 f0 94 12 00 e8 movl $0x1294e8,0x1294f0 10b60b: 94 12 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10b60e: c7 05 f4 94 12 00 f8 movl $0x1294f8,0x1294f4 10b615: 94 12 00 head->previous = NULL; 10b618: c7 05 f8 94 12 00 00 movl $0x0,0x1294f8 10b61f: 00 00 00 tail->previous = head; 10b622: c7 05 fc 94 12 00 f4 movl $0x1294f4,0x1294fc 10b629: 94 12 00 } rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; 10b62c: c7 05 04 95 12 00 00 movl $0x0,0x129504 10b633: 00 00 00 aio_request_queue.idle_threads = 0; 10b636: c7 05 08 95 12 00 00 movl $0x0,0x129508 10b63d: 00 00 00 aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 10b640: c7 05 00 95 12 00 0b movl $0xb00b,0x129500 10b647: b0 00 00 return result; } 10b64a: 89 d8 mov %ebx,%eax 10b64c: 8b 5d fc mov -0x4(%ebp),%ebx 10b64f: c9 leave 10b650: c3 ret 10b651: 8d 76 00 lea 0x0(%esi),%esi result = pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); 10b654: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b657: 68 a8 94 12 00 push $0x1294a8 <== NOT EXECUTED 10b65c: e8 af 0f 00 00 call 10c610 <== NOT EXECUTED 10b661: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b664: e9 55 ff ff ff jmp 10b5be <== NOT EXECUTED 10b669: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); if (result != 0) { pthread_mutex_destroy (&aio_request_queue.mutex); 10b66c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b66f: 68 a0 94 12 00 push $0x1294a0 <== NOT EXECUTED 10b674: e8 af 0b 00 00 call 10c228 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 10b679: c7 04 24 a8 94 12 00 movl $0x1294a8,(%esp) <== NOT EXECUTED 10b680: e8 8b 0f 00 00 call 10c610 <== NOT EXECUTED 10b685: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b688: e9 63 ff ff ff jmp 10b5f0 <== NOT EXECUTED 10b68d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); 10b690: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b693: 68 a8 94 12 00 push $0x1294a8 <== NOT EXECUTED 10b698: e8 73 0f 00 00 call 10c610 <== NOT EXECUTED 10b69d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b6a0: e9 33 ff ff ff jmp 10b5d8 <== NOT EXECUTED =============================================================================== 0010b9f0 : * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { 10b9f0: 55 push %ebp 10b9f1: 89 e5 mov %esp,%ebp 10b9f3: 56 push %esi 10b9f4: 53 push %ebx 10b9f5: 8b 55 08 mov 0x8(%ebp),%edx 10b9f8: 8b 75 0c mov 0xc(%ebp),%esi } } AIO_printf ("Thread finished\n"); return NULL; } 10b9fb: 8b 02 mov (%edx),%eax 10b9fd: 8d 4a 04 lea 0x4(%edx),%ecx rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 10ba00: 39 c8 cmp %ecx,%eax 10ba02: 74 27 je 10ba2b <== NEVER TAKEN rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && 10ba04: 8b 56 14 mov 0x14(%esi),%edx 10ba07: 8b 5a 14 mov 0x14(%edx),%ebx if (rtems_chain_is_empty (chain)) { AIO_printf ("First in chain \n"); rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; 10ba0a: 8b 50 14 mov 0x14(%eax),%edx while (req->aiocbp->aio_reqprio > prio && 10ba0d: 39 5a 14 cmp %ebx,0x14(%edx) 10ba10: 7c 06 jl 10ba18 <== NEVER TAKEN 10ba12: eb 0e jmp 10ba22 10ba14: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 10ba16: 74 1c je 10ba34 <== NOT EXECUTED } } AIO_printf ("Thread finished\n"); return NULL; } 10ba18: 8b 00 mov (%eax),%eax <== NOT EXECUTED int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && !rtems_chain_is_tail (chain, node)) { node = rtems_chain_next (node); prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; 10ba1a: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && 10ba1d: 39 5a 14 cmp %ebx,0x14(%edx) <== NOT EXECUTED 10ba20: 7c f2 jl 10ba14 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *the_node ) { _Chain_Insert( after_node, the_node ); 10ba22: 89 75 0c mov %esi,0xc(%ebp) 10ba25: 8b 40 04 mov 0x4(%eax),%eax 10ba28: 89 45 08 mov %eax,0x8(%ebp) } rtems_chain_insert (node->previous, &req->next_prio); } } 10ba2b: 5b pop %ebx 10ba2c: 5e pop %esi 10ba2d: c9 leave 10ba2e: e9 b5 23 00 00 jmp 10dde8 <_Chain_Insert> 10ba33: 90 nop } } AIO_printf ("Thread finished\n"); return NULL; } 10ba34: 89 c8 mov %ecx,%eax <== NOT EXECUTED 10ba36: eb ea jmp 10ba22 <== NOT EXECUTED =============================================================================== 0010b768 : * NONE */ void rtems_aio_move_to_work (rtems_aio_request_chain *r_chain) { 10b768: 55 push %ebp 10b769: 89 e5 mov %esp,%ebp 10b76b: 83 ec 08 sub $0x8,%esp 10b76e: 8b 4d 08 mov 0x8(%ebp),%ecx } } AIO_printf ("Thread finished\n"); return NULL; } 10b771: a1 e8 94 12 00 mov 0x1294e8,%eax rtems_chain_node *node; node = rtems_chain_first (&aio_request_queue.work_req); temp = (rtems_aio_request_chain *) node; while (temp->fildes < r_chain->fildes && 10b776: 8b 51 14 mov 0x14(%ecx),%edx 10b779: 39 50 14 cmp %edx,0x14(%eax) 10b77c: 7c 09 jl 10b787 <== ALWAYS TAKEN 10b77e: eb 13 jmp 10b793 <== NOT EXECUTED } } AIO_printf ("Thread finished\n"); return NULL; } 10b780: 8b 00 mov (%eax),%eax rtems_chain_node *node; node = rtems_chain_first (&aio_request_queue.work_req); temp = (rtems_aio_request_chain *) node; while (temp->fildes < r_chain->fildes && 10b782: 39 50 14 cmp %edx,0x14(%eax) 10b785: 7d 0c jge 10b793 10b787: 3d ec 94 12 00 cmp $0x1294ec,%eax 10b78c: 75 f2 jne 10b780 <== ALWAYS TAKEN 10b78e: b8 ec 94 12 00 mov $0x1294ec,%eax <== NOT EXECUTED 10b793: 83 ec 08 sub $0x8,%esp 10b796: 51 push %ecx 10b797: ff 70 04 pushl 0x4(%eax) 10b79a: e8 49 26 00 00 call 10dde8 <_Chain_Insert> 10b79f: 83 c4 10 add $0x10,%esp node = rtems_chain_next (node); temp = (rtems_aio_request_chain *) node; } rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd); } 10b7a2: c9 leave 10b7a3: c3 ret =============================================================================== 0010ba38 : * Output parameters: * NONE */ void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) { 10ba38: 55 push %ebp 10ba39: 89 e5 mov %esp,%ebp 10ba3b: 57 push %edi 10ba3c: 56 push %esi 10ba3d: 53 push %ebx 10ba3e: 83 ec 0c sub $0xc,%esp 10ba41: 8b 7d 08 mov 0x8(%ebp),%edi } } AIO_printf ("Thread finished\n"); return NULL; } 10ba44: 8b 5f 08 mov 0x8(%edi),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 10ba47: 83 c7 0c add $0xc,%edi rtems_chain_control *chain; rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 10ba4a: 39 fb cmp %edi,%ebx 10ba4c: 75 04 jne 10ba52 <== ALWAYS TAKEN 10ba4e: eb 2d jmp 10ba7d <== NOT EXECUTED { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; node = rtems_chain_next (node); 10ba50: 89 f3 mov %esi,%ebx */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10ba52: 83 ec 0c sub $0xc,%esp 10ba55: 53 push %ebx 10ba56: e8 51 23 00 00 call 10ddac <_Chain_Extract> } } AIO_printf ("Thread finished\n"); return NULL; } 10ba5b: 8b 33 mov (%ebx),%esi while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; node = rtems_chain_next (node); req->aiocbp->error_code = ECANCELED; 10ba5d: 8b 43 14 mov 0x14(%ebx),%eax 10ba60: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax) req->aiocbp->return_value = -1; 10ba67: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax) free (req); 10ba6e: 89 1c 24 mov %ebx,(%esp) 10ba71: e8 3e c6 ff ff call 1080b4 rtems_chain_control *chain; rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 10ba76: 83 c4 10 add $0x10,%esp 10ba79: 39 fe cmp %edi,%esi 10ba7b: 75 d3 jne 10ba50 node = rtems_chain_next (node); req->aiocbp->error_code = ECANCELED; req->aiocbp->return_value = -1; free (req); } } 10ba7d: 8d 65 f4 lea -0xc(%ebp),%esp 10ba80: 5b pop %ebx 10ba81: 5e pop %esi 10ba82: 5f pop %edi 10ba83: c9 leave 10ba84: c3 ret =============================================================================== 0010ba88 : * AIO_NOTCANCELED - if request was not canceled * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { 10ba88: 55 push %ebp 10ba89: 89 e5 mov %esp,%ebp 10ba8b: 53 push %ebx 10ba8c: 83 ec 04 sub $0x4,%esp 10ba8f: 8b 55 08 mov 0x8(%ebp),%edx 10ba92: 8b 4d 0c mov 0xc(%ebp),%ecx } } AIO_printf ("Thread finished\n"); return NULL; } 10ba95: 8b 02 mov (%edx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10ba97: 83 c2 04 add $0x4,%edx * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { if (rtems_chain_is_empty (chain)) 10ba9a: 39 d0 cmp %edx,%eax 10ba9c: 74 4e je 10baec return AIO_ALLDONE; rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; 10ba9e: 89 c3 mov %eax,%ebx while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 10baa0: 39 48 14 cmp %ecx,0x14(%eax) 10baa3: 75 0a jne 10baaf <== NEVER TAKEN 10baa5: eb 19 jmp 10bac0 10baa7: 90 nop node = rtems_chain_next (node); current = (rtems_aio_request *) node; 10baa8: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 10baaa: 39 48 14 cmp %ecx,0x14(%eax) <== NOT EXECUTED 10baad: 74 11 je 10bac0 <== NOT EXECUTED } } AIO_printf ("Thread finished\n"); return NULL; } 10baaf: 8b 00 mov (%eax),%eax <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 10bab1: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10bab3: 75 f3 jne 10baa8 <== NOT EXECUTED node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; 10bab5: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 10baba: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10babd: c9 leave <== NOT EXECUTED 10babe: c3 ret <== NOT EXECUTED 10babf: 90 nop <== NOT EXECUTED 10bac0: 83 ec 0c sub $0xc,%esp 10bac3: 50 push %eax 10bac4: e8 e3 22 00 00 call 10ddac <_Chain_Extract> if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; 10bac9: 8b 43 14 mov 0x14(%ebx),%eax 10bacc: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax) current->aiocbp->return_value = -1; 10bad3: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax) free (current); 10bada: 89 1c 24 mov %ebx,(%esp) 10badd: e8 d2 c5 ff ff call 1080b4 } return AIO_CANCELED; 10bae2: 83 c4 10 add $0x10,%esp 10bae5: 31 c0 xor %eax,%eax } 10bae7: 8b 5d fc mov -0x4(%ebp),%ebx 10baea: c9 leave 10baeb: c3 ret */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { if (rtems_chain_is_empty (chain)) return AIO_ALLDONE; 10baec: b8 02 00 00 00 mov $0x2,%eax current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 10baf1: 8b 5d fc mov -0x4(%ebp),%ebx 10baf4: c9 leave 10baf5: c3 ret =============================================================================== 0010b6a8 : * */ rtems_aio_request_chain * rtems_aio_search_fd (rtems_chain_control *chain, int fildes, int create) { 10b6a8: 55 push %ebp 10b6a9: 89 e5 mov %esp,%ebp 10b6ab: 57 push %edi 10b6ac: 56 push %esi 10b6ad: 53 push %ebx 10b6ae: 83 ec 1c sub $0x1c,%esp 10b6b1: 8b 75 08 mov 0x8(%ebp),%esi 10b6b4: 8b 5d 0c mov 0xc(%ebp),%ebx } } AIO_printf ("Thread finished\n"); return NULL; } 10b6b7: 8b 06 mov (%esi),%eax rtems_chain_node *node; node = rtems_chain_first (chain); r_chain = (rtems_aio_request_chain *) node; while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) { 10b6b9: 8b 50 14 mov 0x14(%eax),%edx 10b6bc: 39 d3 cmp %edx,%ebx 10b6be: 7e 28 jle 10b6e8 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 10b6c0: 8d 4e 04 lea 0x4(%esi),%ecx 10b6c3: eb 0c jmp 10b6d1 10b6c5: 8d 76 00 lea 0x0(%esi),%esi } } AIO_printf ("Thread finished\n"); return NULL; } 10b6c8: 8b 00 mov (%eax),%eax rtems_chain_node *node; node = rtems_chain_first (chain); r_chain = (rtems_aio_request_chain *) node; while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) { 10b6ca: 8b 50 14 mov 0x14(%eax),%edx 10b6cd: 39 da cmp %ebx,%edx 10b6cf: 7d 17 jge 10b6e8 10b6d1: 39 c8 cmp %ecx,%eax 10b6d3: 75 f3 jne 10b6c8 10b6d5: 89 c7 mov %eax,%edi } if (r_chain->fildes == fildes) r_chain->new_fd = 0; else { if (create == 0) 10b6d7: 8b 45 10 mov 0x10(%ebp),%eax 10b6da: 85 c0 test %eax,%eax 10b6dc: 75 1f jne 10b6fd r_chain = NULL; 10b6de: 31 c0 xor %eax,%eax r_chain->new_fd = 1; r_chain->fildes = fildes; } } return r_chain; } 10b6e0: 8d 65 f4 lea -0xc(%ebp),%esp 10b6e3: 5b pop %ebx 10b6e4: 5e pop %esi 10b6e5: 5f pop %edi 10b6e6: c9 leave 10b6e7: c3 ret } } AIO_printf ("Thread finished\n"); return NULL; } 10b6e8: 89 c7 mov %eax,%edi while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) { node = rtems_chain_next (node); r_chain = (rtems_aio_request_chain *) node; } if (r_chain->fildes == fildes) 10b6ea: 39 d3 cmp %edx,%ebx 10b6ec: 75 e9 jne 10b6d7 r_chain->new_fd = 0; 10b6ee: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) r_chain->new_fd = 1; r_chain->fildes = fildes; } } return r_chain; } 10b6f5: 8d 65 f4 lea -0xc(%ebp),%esp 10b6f8: 5b pop %ebx 10b6f9: 5e pop %esi 10b6fa: 5f pop %edi 10b6fb: c9 leave 10b6fc: c3 ret r_chain->new_fd = 0; else { if (create == 0) r_chain = NULL; else { r_chain = malloc (sizeof (rtems_aio_request_chain)); 10b6fd: 83 ec 0c sub $0xc,%esp 10b700: 6a 24 push $0x24 10b702: e8 c1 ce ff ff call 1085c8 10b707: 89 c2 mov %eax,%edx RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10b709: 8d 4a 0c lea 0xc(%edx),%ecx 10b70c: 89 4a 08 mov %ecx,0x8(%edx) head->next = tail; head->previous = NULL; 10b70f: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 10b716: 8d 4a 08 lea 0x8(%edx),%ecx 10b719: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10b71c: 8d 4e 04 lea 0x4(%esi),%ecx rtems_chain_initialize_empty (&r_chain->perfd); if (rtems_chain_is_empty (chain)) 10b71f: 83 c4 10 add $0x10,%esp 10b722: 39 0e cmp %ecx,(%esi) 10b724: 74 27 je 10b74d RTEMS_INLINE_ROUTINE void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *the_node ) { _Chain_Insert( after_node, the_node ); 10b726: 83 ec 08 sub $0x8,%esp 10b729: 52 push %edx 10b72a: ff 77 04 pushl 0x4(%edi) 10b72d: 89 45 e4 mov %eax,-0x1c(%ebp) 10b730: 89 55 e0 mov %edx,-0x20(%ebp) 10b733: e8 b0 26 00 00 call 10dde8 <_Chain_Insert> 10b738: 83 c4 10 add $0x10,%esp 10b73b: 8b 55 e0 mov -0x20(%ebp),%edx 10b73e: 8b 45 e4 mov -0x1c(%ebp),%eax rtems_chain_prepend (chain, &r_chain->next_fd); else rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd); r_chain->new_fd = 1; 10b741: c7 42 18 01 00 00 00 movl $0x1,0x18(%edx) r_chain->fildes = fildes; 10b748: 89 5a 14 mov %ebx,0x14(%edx) 10b74b: eb a8 jmp 10b6f5 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); 10b74d: 83 ec 08 sub $0x8,%esp 10b750: 52 push %edx 10b751: 56 push %esi 10b752: 89 45 e4 mov %eax,-0x1c(%ebp) 10b755: 89 55 e0 mov %edx,-0x20(%ebp) 10b758: e8 8b 26 00 00 call 10dde8 <_Chain_Insert> 10b75d: 83 c4 10 add $0x10,%esp 10b760: 8b 45 e4 mov -0x1c(%ebp),%eax 10b763: 8b 55 e0 mov -0x20(%ebp),%edx 10b766: eb d9 jmp 10b741 =============================================================================== 00107d6c : uint32_t rtems_assoc_local_by_name( const rtems_assoc_t *ap, const char *name ) { 107d6c: 55 push %ebp 107d6d: 89 e5 mov %esp,%ebp 107d6f: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_name(ap, name); 107d72: ff 75 0c pushl 0xc(%ebp) 107d75: ff 75 08 pushl 0x8(%ebp) 107d78: e8 13 02 00 00 call 107f90 if (nap) 107d7d: 83 c4 10 add $0x10,%esp 107d80: 85 c0 test %eax,%eax 107d82: 74 08 je 107d8c return nap->local_value; 107d84: 8b 40 04 mov 0x4(%eax),%eax return 0; } 107d87: c9 leave 107d88: c3 ret 107d89: 8d 76 00 lea 0x0(%esi),%esi nap = rtems_assoc_ptr_by_name(ap, name); if (nap) return nap->local_value; return 0; 107d8c: 31 c0 xor %eax,%eax } 107d8e: c9 leave 107d8f: c3 ret =============================================================================== 0010f14c : uint32_t rtems_assoc_local_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 10f14c: 55 push %ebp 10f14d: 89 e5 mov %esp,%ebp 10f14f: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 10f152: ff 75 0c pushl 0xc(%ebp) 10f155: ff 75 08 pushl 0x8(%ebp) 10f158: e8 13 00 00 00 call 10f170 if (nap) 10f15d: 83 c4 10 add $0x10,%esp 10f160: 85 c0 test %eax,%eax 10f162: 74 08 je 10f16c return nap->local_value; 10f164: 8b 40 04 mov 0x4(%eax),%eax return 0; } 10f167: c9 leave 10f168: c3 ret 10f169: 8d 76 00 lea 0x0(%esi),%esi nap = rtems_assoc_ptr_by_remote(ap, remote_value); if (nap) return nap->local_value; return 0; 10f16c: 31 c0 xor %eax,%eax } 10f16e: c9 leave 10f16f: c3 ret =============================================================================== 00112554 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 112554: 55 push %ebp 112555: 89 e5 mov %esp,%ebp 112557: 57 push %edi 112558: 56 push %esi 112559: 53 push %ebx 11255a: 83 ec 1c sub $0x1c,%esp 11255d: 8b 7d 0c mov 0xc(%ebp),%edi 112560: be 20 00 00 00 mov $0x20,%esi uint32_t b; uint32_t local_value = 0; 112565: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) for (b = 1; b; b <<= 1) { 11256c: bb 01 00 00 00 mov $0x1,%ebx 112571: eb 06 jmp 112579 112573: 90 nop 112574: d1 e3 shl %ebx 112576: 4e dec %esi 112577: 74 1b je 112594 if (b & remote_value) 112579: 85 fb test %edi,%ebx 11257b: 74 f7 je 112574 local_value |= rtems_assoc_local_by_remote(ap, b); 11257d: 83 ec 08 sub $0x8,%esp 112580: 53 push %ebx 112581: ff 75 08 pushl 0x8(%ebp) 112584: e8 c3 cb ff ff call 10f14c 112589: 09 45 e4 or %eax,-0x1c(%ebp) 11258c: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 11258f: d1 e3 shl %ebx 112591: 4e dec %esi 112592: 75 e5 jne 112579 <== ALWAYS TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 112594: 8b 45 e4 mov -0x1c(%ebp),%eax 112597: 8d 65 f4 lea -0xc(%ebp),%esp 11259a: 5b pop %ebx 11259b: 5e pop %esi 11259c: 5f pop %edi 11259d: c9 leave 11259e: c3 ret =============================================================================== 00114210 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 114210: 55 push %ebp 114211: 89 e5 mov %esp,%ebp 114213: 53 push %ebx 114214: 83 ec 0c sub $0xc,%esp 114217: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 11421a: 53 push %ebx 11421b: ff 75 08 pushl 0x8(%ebp) 11421e: e8 1d 00 00 00 call 114240 if (nap) 114223: 83 c4 10 add $0x10,%esp 114226: 85 c0 test %eax,%eax 114228: 74 0a je 114234 return nap->name; 11422a: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 11422c: 8b 5d fc mov -0x4(%ebp),%ebx 11422f: c9 leave 114230: c3 ret 114231: 8d 76 00 lea 0x0(%esi),%esi nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 114234: 89 5d 08 mov %ebx,0x8(%ebp) } 114237: 8b 5d fc mov -0x4(%ebp),%ebx 11423a: c9 leave nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 11423b: e9 e4 35 00 00 jmp 117824 =============================================================================== 00107f08 : const char *rtems_assoc_name_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 107f08: 55 push %ebp 107f09: 89 e5 mov %esp,%ebp 107f0b: 53 push %ebx 107f0c: 83 ec 0c sub $0xc,%esp 107f0f: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 107f12: 53 push %ebx 107f13: ff 75 08 pushl 0x8(%ebp) 107f16: e8 ed 00 00 00 call 108008 if (nap) 107f1b: 83 c4 10 add $0x10,%esp 107f1e: 85 c0 test %eax,%eax 107f20: 74 0a je 107f2c return nap->name; 107f22: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(remote_value); } 107f24: 8b 5d fc mov -0x4(%ebp),%ebx 107f27: c9 leave 107f28: c3 ret 107f29: 8d 76 00 lea 0x0(%esi),%esi nap = rtems_assoc_ptr_by_remote(ap, remote_value); if (nap) return nap->name; return rtems_assoc_name_bad(remote_value); 107f2c: 89 5d 08 mov %ebx,0x8(%ebp) } 107f2f: 8b 5d fc mov -0x4(%ebp),%ebx 107f32: c9 leave nap = rtems_assoc_ptr_by_remote(ap, remote_value); if (nap) return nap->name; return rtems_assoc_name_bad(remote_value); 107f33: e9 94 7e 00 00 jmp 10fdcc =============================================================================== 00114240 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 114240: 55 push %ebp 114241: 89 e5 mov %esp,%ebp 114243: 57 push %edi 114244: 56 push %esi 114245: 53 push %ebx 114246: 8b 45 08 mov 0x8(%ebp),%eax 114249: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 11424c: 8b 30 mov (%eax),%esi 11424e: 85 f6 test %esi,%esi 114250: 74 3e je 114290 114252: bf f8 76 12 00 mov $0x1276f8,%edi 114257: b9 0a 00 00 00 mov $0xa,%ecx 11425c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 11425e: 74 18 je 114278 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; 114260: 31 c9 xor %ecx,%ecx 114262: eb 09 jmp 11426d if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 114264: 83 c0 0c add $0xc,%eax 114267: 8b 18 mov (%eax),%ebx 114269: 85 db test %ebx,%ebx 11426b: 74 1b je 114288 if (ap->local_value == local_value) 11426d: 39 50 04 cmp %edx,0x4(%eax) 114270: 75 f2 jne 114264 return ap; return default_ap; } 114272: 5b pop %ebx 114273: 5e pop %esi 114274: 5f pop %edi 114275: c9 leave 114276: c3 ret 114277: 90 nop ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 114278: 8d 58 0c lea 0xc(%eax),%ebx for ( ; ap->name; ap++) 11427b: 8b 70 0c mov 0xc(%eax),%esi 11427e: 85 f6 test %esi,%esi 114280: 74 f0 je 114272 <== NEVER TAKEN 114282: 89 c1 mov %eax,%ecx 114284: 89 d8 mov %ebx,%eax 114286: eb e5 jmp 11426d 114288: 89 c8 mov %ecx,%eax if (ap->local_value == local_value) return ap; return default_ap; } 11428a: 5b pop %ebx 11428b: 5e pop %esi 11428c: 5f pop %edi 11428d: c9 leave 11428e: c3 ret 11428f: 90 nop 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; 114290: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 114292: 5b pop %ebx 114293: 5e pop %esi 114294: 5f pop %edi 114295: c9 leave 114296: c3 ret =============================================================================== 00107f90 : const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { 107f90: 55 push %ebp 107f91: 89 e5 mov %esp,%ebp 107f93: 57 push %edi 107f94: 56 push %esi 107f95: 53 push %ebx 107f96: 83 ec 0c sub $0xc,%esp 107f99: 8b 5d 08 mov 0x8(%ebp),%ebx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 107f9c: 8b 03 mov (%ebx),%eax 107f9e: 85 c0 test %eax,%eax 107fa0: 74 5a je 107ffc 107fa2: bf fd 06 12 00 mov $0x1206fd,%edi 107fa7: b9 0a 00 00 00 mov $0xa,%ecx 107fac: 89 c6 mov %eax,%esi 107fae: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107fb0: 74 2e je 107fe0 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; 107fb2: 31 f6 xor %esi,%esi 107fb4: eb 0b jmp 107fc1 107fb6: 66 90 xchg %ax,%ax if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 107fb8: 83 c3 0c add $0xc,%ebx 107fbb: 8b 03 mov (%ebx),%eax 107fbd: 85 c0 test %eax,%eax 107fbf: 74 2f je 107ff0 if (strcmp(ap->name, name) == 0) 107fc1: 83 ec 08 sub $0x8,%esp 107fc4: ff 75 0c pushl 0xc(%ebp) 107fc7: 50 push %eax 107fc8: e8 7f c6 00 00 call 11464c 107fcd: 83 c4 10 add $0x10,%esp 107fd0: 85 c0 test %eax,%eax 107fd2: 75 e4 jne 107fb8 return ap; return default_ap; } 107fd4: 89 d8 mov %ebx,%eax 107fd6: 8d 65 f4 lea -0xc(%ebp),%esp 107fd9: 5b pop %ebx 107fda: 5e pop %esi 107fdb: 5f pop %edi 107fdc: c9 leave 107fdd: c3 ret 107fde: 66 90 xchg %ax,%ax ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 107fe0: 8d 53 0c lea 0xc(%ebx),%edx for ( ; ap->name; ap++) 107fe3: 8b 43 0c mov 0xc(%ebx),%eax 107fe6: 85 c0 test %eax,%eax 107fe8: 74 ea je 107fd4 <== NEVER TAKEN 107fea: 89 de mov %ebx,%esi 107fec: 89 d3 mov %edx,%ebx 107fee: eb d1 jmp 107fc1 107ff0: 89 f3 mov %esi,%ebx if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 107ff2: 89 d8 mov %ebx,%eax 107ff4: 8d 65 f4 lea -0xc(%ebp),%esp 107ff7: 5b pop %ebx 107ff8: 5e pop %esi 107ff9: 5f pop %edi 107ffa: c9 leave 107ffb: 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; 107ffc: 31 db xor %ebx,%ebx for ( ; ap->name; ap++) if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 107ffe: 89 d8 mov %ebx,%eax 108000: 8d 65 f4 lea -0xc(%ebp),%esp 108003: 5b pop %ebx 108004: 5e pop %esi 108005: 5f pop %edi 108006: c9 leave 108007: c3 ret =============================================================================== 0010f170 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 10f170: 55 push %ebp 10f171: 89 e5 mov %esp,%ebp 10f173: 57 push %edi 10f174: 56 push %esi 10f175: 53 push %ebx 10f176: 8b 45 08 mov 0x8(%ebp),%eax 10f179: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 10f17c: 8b 30 mov (%eax),%esi 10f17e: 85 f6 test %esi,%esi 10f180: 74 3e je 10f1c0 10f182: bf f8 13 12 00 mov $0x1213f8,%edi 10f187: b9 0a 00 00 00 mov $0xa,%ecx 10f18c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f18e: 74 18 je 10f1a8 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; 10f190: 31 c9 xor %ecx,%ecx 10f192: eb 09 jmp 10f19d if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 10f194: 83 c0 0c add $0xc,%eax 10f197: 8b 18 mov (%eax),%ebx 10f199: 85 db test %ebx,%ebx 10f19b: 74 1b je 10f1b8 if (ap->remote_value == remote_value) 10f19d: 39 50 08 cmp %edx,0x8(%eax) 10f1a0: 75 f2 jne 10f194 return ap; return default_ap; } 10f1a2: 5b pop %ebx 10f1a3: 5e pop %esi 10f1a4: 5f pop %edi 10f1a5: c9 leave 10f1a6: c3 ret 10f1a7: 90 nop ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 10f1a8: 8d 58 0c lea 0xc(%eax),%ebx for ( ; ap->name; ap++) 10f1ab: 8b 70 0c mov 0xc(%eax),%esi 10f1ae: 85 f6 test %esi,%esi 10f1b0: 74 f0 je 10f1a2 <== NEVER TAKEN 10f1b2: 89 c1 mov %eax,%ecx 10f1b4: 89 d8 mov %ebx,%eax 10f1b6: eb e5 jmp 10f19d 10f1b8: 89 c8 mov %ecx,%eax if (ap->remote_value == remote_value) return ap; return default_ap; } 10f1ba: 5b pop %ebx 10f1bb: 5e pop %esi 10f1bc: 5f pop %edi 10f1bd: c9 leave 10f1be: c3 ret 10f1bf: 90 nop 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; 10f1c0: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 10f1c2: 5b pop %ebx 10f1c3: 5e pop %esi 10f1c4: 5f pop %edi 10f1c5: c9 leave 10f1c6: c3 ret =============================================================================== 001080ac : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 1080ac: 55 push %ebp 1080ad: 89 e5 mov %esp,%ebp 1080af: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 1080b2: ff 75 0c pushl 0xc(%ebp) 1080b5: ff 75 08 pushl 0x8(%ebp) 1080b8: e8 7b fe ff ff call 107f38 if (nap) 1080bd: 83 c4 10 add $0x10,%esp 1080c0: 85 c0 test %eax,%eax 1080c2: 74 08 je 1080cc return nap->remote_value; 1080c4: 8b 40 08 mov 0x8(%eax),%eax return 0; } 1080c7: c9 leave 1080c8: c3 ret 1080c9: 8d 76 00 lea 0x0(%esi),%esi nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->remote_value; return 0; 1080cc: 31 c0 xor %eax,%eax } 1080ce: c9 leave 1080cf: c3 ret =============================================================================== 00108060 : uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { 108060: 55 push %ebp 108061: 89 e5 mov %esp,%ebp 108063: 57 push %edi 108064: 56 push %esi 108065: 53 push %ebx 108066: 83 ec 1c sub $0x1c,%esp 108069: 8b 7d 0c mov 0xc(%ebp),%edi 10806c: be 20 00 00 00 mov $0x20,%esi uint32_t b; uint32_t remote_value = 0; 108071: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) for (b = 1; b; b <<= 1) 108078: bb 01 00 00 00 mov $0x1,%ebx 10807d: eb 06 jmp 108085 10807f: 90 nop 108080: d1 e3 shl %ebx 108082: 4e dec %esi 108083: 74 1b je 1080a0 if (b & local_value) 108085: 85 fb test %edi,%ebx 108087: 74 f7 je 108080 remote_value |= rtems_assoc_remote_by_local(ap, b); 108089: 83 ec 08 sub $0x8,%esp 10808c: 53 push %ebx 10808d: ff 75 08 pushl 0x8(%ebp) 108090: e8 17 00 00 00 call 1080ac 108095: 09 45 e4 or %eax,-0x1c(%ebp) 108098: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) 10809b: d1 e3 shl %ebx 10809d: 4e dec %esi 10809e: 75 e5 jne 108085 <== ALWAYS TAKEN if (b & local_value) remote_value |= rtems_assoc_remote_by_local(ap, b); return remote_value; } 1080a0: 8b 45 e4 mov -0x1c(%ebp),%eax 1080a3: 8d 65 f4 lea -0xc(%ebp),%esp 1080a6: 5b pop %ebx 1080a7: 5e pop %esi 1080a8: 5f pop %edi 1080a9: c9 leave 1080aa: c3 ret =============================================================================== 001080d0 : uint32_t rtems_assoc_remote_by_name( const rtems_assoc_t *ap, const char *name ) { 1080d0: 55 push %ebp 1080d1: 89 e5 mov %esp,%ebp 1080d3: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_name(ap, name); 1080d6: ff 75 0c pushl 0xc(%ebp) 1080d9: ff 75 08 pushl 0x8(%ebp) 1080dc: e8 af fe ff ff call 107f90 if (nap) 1080e1: 83 c4 10 add $0x10,%esp 1080e4: 85 c0 test %eax,%eax 1080e6: 74 08 je 1080f0 return nap->remote_value; 1080e8: 8b 40 08 mov 0x8(%eax),%eax return 0; } 1080eb: c9 leave 1080ec: c3 ret 1080ed: 8d 76 00 lea 0x0(%esi),%esi nap = rtems_assoc_ptr_by_name(ap, name); if (nap) return nap->remote_value; return 0; 1080f0: 31 c0 xor %eax,%eax } 1080f2: c9 leave 1080f3: c3 ret =============================================================================== 00112c04 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 112c04: 55 push %ebp 112c05: 89 e5 mov %esp,%ebp 112c07: 57 push %edi 112c08: 56 push %esi 112c09: 53 push %ebx 112c0a: 83 ec 2c sub $0x2c,%esp 112c0d: 8b 5d 08 mov 0x8(%ebp),%ebx 112c10: 8b 7d 0c mov 0xc(%ebp),%edi 112c13: 8b 45 10 mov 0x10(%ebp),%eax 112c16: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 112c19: 85 db test %ebx,%ebx 112c1b: 0f 84 87 00 00 00 je 112ca8 return RTEMS_INVALID_NAME; if ( !id ) 112c21: 85 f6 test %esi,%esi 112c23: 0f 84 bf 00 00 00 je 112ce8 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 112c29: f7 c7 10 00 00 00 test $0x10,%edi 112c2f: 0f 84 83 00 00 00 je 112cb8 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 112c35: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 112c3c: 85 c0 test %eax,%eax 112c3e: 0f 84 80 00 00 00 je 112cc4 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 112c44: 89 45 e4 mov %eax,-0x1c(%ebp) 112c47: a1 4c a1 12 00 mov 0x12a14c,%eax 112c4c: 40 inc %eax 112c4d: a3 4c a1 12 00 mov %eax,0x12a14c * 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 ); 112c52: 83 ec 0c sub $0xc,%esp 112c55: 68 40 ab 12 00 push $0x12ab40 112c5a: e8 b1 ae ff ff call 10db10 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 112c5f: 83 c4 10 add $0x10,%esp 112c62: 85 c0 test %eax,%eax 112c64: 74 6e je 112cd4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 112c66: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 112c69: 83 ec 08 sub $0x8,%esp 112c6c: 8d 55 e0 lea -0x20(%ebp),%edx 112c6f: 52 push %edx 112c70: 8d 50 14 lea 0x14(%eax),%edx 112c73: 52 push %edx 112c74: 89 45 d4 mov %eax,-0x2c(%ebp) 112c77: e8 44 0a 00 00 call 1136c0 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 112c7c: 8b 45 d4 mov -0x2c(%ebp),%eax 112c7f: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 112c82: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 112c85: 8b 0d 5c ab 12 00 mov 0x12ab5c,%ecx 112c8b: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 112c8e: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 112c91: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 112c93: e8 6c be ff ff call 10eb04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 112c98: 83 c4 10 add $0x10,%esp 112c9b: 31 c0 xor %eax,%eax } 112c9d: 8d 65 f4 lea -0xc(%ebp),%esp 112ca0: 5b pop %ebx 112ca1: 5e pop %esi 112ca2: 5f pop %edi 112ca3: c9 leave 112ca4: c3 ret 112ca5: 8d 76 00 lea 0x0(%esi),%esi { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 112ca8: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112cad: 8d 65 f4 lea -0xc(%ebp),%esp 112cb0: 5b pop %ebx 112cb1: 5e pop %esi 112cb2: 5f pop %edi 112cb3: c9 leave 112cb4: c3 ret 112cb5: 8d 76 00 lea 0x0(%esi),%esi 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; 112cb8: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 112cbf: eb 83 jmp 112c44 112cc1: 8d 76 00 lea 0x0(%esi),%esi /* 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; 112cc4: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112cc9: 8d 65 f4 lea -0xc(%ebp),%esp 112ccc: 5b pop %ebx 112ccd: 5e pop %esi 112cce: 5f pop %edi 112ccf: c9 leave 112cd0: c3 ret 112cd1: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 112cd4: e8 2b be ff ff call 10eb04 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 112cd9: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112cde: 8d 65 f4 lea -0xc(%ebp),%esp 112ce1: 5b pop %ebx 112ce2: 5e pop %esi 112ce3: 5f pop %edi 112ce4: c9 leave 112ce5: c3 ret 112ce6: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 112ce8: b8 09 00 00 00 mov $0x9,%eax 112ced: eb ae jmp 112c9d =============================================================================== 001072cc : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 1072cc: 55 push %ebp 1072cd: 89 e5 mov %esp,%ebp 1072cf: 57 push %edi 1072d0: 56 push %esi 1072d1: 53 push %ebx 1072d2: 83 ec 1c sub $0x1c,%esp 1072d5: 8b 45 08 mov 0x8(%ebp),%eax 1072d8: 8b 5d 0c mov 0xc(%ebp),%ebx 1072db: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 1072de: 85 c0 test %eax,%eax 1072e0: 75 0a jne 1072ec value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p ) return NULL; 1072e2: 31 c0 xor %eax,%eax copy_string( p, value, length ); return value; } 1072e4: 8d 65 f4 lea -0xc(%ebp),%esp 1072e7: 5b pop %ebx 1072e8: 5e pop %esi 1072e9: 5f pop %edi 1072ea: c9 leave 1072eb: c3 ret const char *p; if ( !name ) return NULL; if ( !value ) 1072ec: 85 db test %ebx,%ebx 1072ee: 74 f2 je 1072e2 return NULL; if ( !length ) 1072f0: 85 f6 test %esi,%esi 1072f2: 74 ee je 1072e2 return NULL; value[0] = '\0'; 1072f4: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 1072f7: 83 ec 0c sub $0xc,%esp 1072fa: 50 push %eax 1072fb: e8 4c 00 00 00 call 10734c if ( !p ) 107300: 83 c4 10 add $0x10,%esp 107303: 85 c0 test %eax,%eax 107305: 74 db je 1072e2 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN 10730d: 4e dec %esi 10730e: 89 75 e4 mov %esi,-0x1c(%ebp) 107311: 74 34 je 107347 <== NEVER TAKEN 107313: 31 f6 xor %esi,%esi 107315: 31 d2 xor %edx,%edx 107317: 31 ff xor %edi,%edi 107319: eb 24 jmp 10733f 10731b: 90 nop if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 10731c: f7 c7 01 00 00 00 test $0x1,%edi 107322: 75 05 jne 107329 107324: 80 f9 20 cmp $0x20,%cl 107327: 74 1e je 107347 break; value[i++] = *p++; 107329: 88 0c 33 mov %cl,(%ebx,%esi,1) 10732c: 42 inc %edx value[i] = '\0'; 10732d: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 107338: 3b 55 e4 cmp -0x1c(%ebp),%edx 10733b: 73 0a jae 107347 10733d: 89 d6 mov %edx,%esi if ( *p == '\"' ) { 10733f: 80 f9 22 cmp $0x22,%cl 107342: 75 d8 jne 10731c quotes++; 107344: 47 inc %edi 107345: eb e2 jmp 107329 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i =============================================================================== 0010734c : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 10734c: 55 push %ebp 10734d: 89 e5 mov %esp,%ebp 10734f: 83 ec 08 sub $0x8,%esp 107352: 8b 45 08 mov 0x8(%ebp),%eax const char *p; if ( !name ) 107355: 85 c0 test %eax,%eax 107357: 75 07 jne 107360 return NULL; if ( !bsp_boot_cmdline ) return NULL; 107359: 31 c0 xor %eax,%eax p = strstr(bsp_boot_cmdline, name); /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 10735b: c9 leave 10735c: c3 ret 10735d: 8d 76 00 lea 0x0(%esi),%esi const char *p; if ( !name ) return NULL; if ( !bsp_boot_cmdline ) 107360: 8b 15 18 7f 12 00 mov 0x127f18,%edx 107366: 85 d2 test %edx,%edx 107368: 74 ef je 107359 return NULL; p = strstr(bsp_boot_cmdline, name); 10736a: 83 ec 08 sub $0x8,%esp 10736d: 50 push %eax 10736e: 52 push %edx 10736f: e8 98 d3 00 00 call 11470c 107374: 83 c4 10 add $0x10,%esp /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 107377: c9 leave 107378: c3 ret =============================================================================== 0010b708 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10b708: 55 push %ebp 10b709: 89 e5 mov %esp,%ebp 10b70b: 56 push %esi 10b70c: 53 push %ebx 10b70d: 8b 5d 10 mov 0x10(%ebp),%ebx 10b710: 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 ); 10b713: 83 ec 08 sub $0x8,%esp 10b716: ff 75 0c pushl 0xc(%ebp) 10b719: ff 75 08 pushl 0x8(%ebp) 10b71c: e8 eb 04 00 00 call 10bc0c <_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 ) { 10b721: 83 c4 10 add $0x10,%esp 10b724: 84 c0 test %al,%al 10b726: 75 0c jne 10b734 sc = rtems_event_send( task, events ); } return sc; } 10b728: 31 c0 xor %eax,%eax 10b72a: 8d 65 f8 lea -0x8(%ebp),%esp 10b72d: 5b pop %ebx 10b72e: 5e pop %esi 10b72f: c9 leave 10b730: c3 ret 10b731: 8d 76 00 lea 0x0(%esi),%esi { 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 ); 10b734: 89 75 0c mov %esi,0xc(%ebp) 10b737: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10b73a: 8d 65 f8 lea -0x8(%ebp),%esp 10b73d: 5b pop %ebx 10b73e: 5e pop %esi 10b73f: 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 ); 10b740: e9 5f f6 ff ff jmp 10ada4 =============================================================================== 0010b748 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { 10b748: 55 push %ebp 10b749: 89 e5 mov %esp,%ebp 10b74b: 56 push %esi 10b74c: 53 push %ebx 10b74d: 8b 5d 0c mov 0xc(%ebp),%ebx 10b750: 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 ); 10b753: 83 ec 08 sub $0x8,%esp 10b756: ff 75 14 pushl 0x14(%ebp) 10b759: ff 75 08 pushl 0x8(%ebp) 10b75c: e8 13 05 00 00 call 10bc74 <_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 ) { 10b761: 83 c4 10 add $0x10,%esp 10b764: 84 c0 test %al,%al 10b766: 75 0c jne 10b774 sc = rtems_event_send( task, events ); } return sc; } 10b768: 31 c0 xor %eax,%eax 10b76a: 8d 65 f8 lea -0x8(%ebp),%esp 10b76d: 5b pop %ebx 10b76e: 5e pop %esi 10b76f: c9 leave 10b770: c3 ret 10b771: 8d 76 00 lea 0x0(%esi),%esi { 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 ); 10b774: 89 75 0c mov %esi,0xc(%ebp) 10b777: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10b77a: 8d 65 f8 lea -0x8(%ebp),%esp 10b77d: 5b pop %ebx 10b77e: 5e pop %esi 10b77f: 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 ); 10b780: e9 1f f6 ff ff jmp 10ada4 =============================================================================== 0010b788 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10b788: 55 push %ebp 10b789: 89 e5 mov %esp,%ebp 10b78b: 57 push %edi 10b78c: 56 push %esi 10b78d: 53 push %ebx 10b78e: 83 ec 1c sub $0x1c,%esp 10b791: 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( 10b794: 8d 7d e4 lea -0x1c(%ebp),%edi 10b797: 90 nop */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10b798: 83 ec 0c sub $0xc,%esp 10b79b: 56 push %esi 10b79c: e8 0f 05 00 00 call 10bcb0 <_Chain_Get> 10b7a1: 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 10b7a3: 83 c4 10 add $0x10,%esp 10b7a6: 85 c0 test %eax,%eax 10b7a8: 75 22 jne 10b7cc ) { rtems_event_set out; sc = rtems_event_receive( 10b7aa: 57 push %edi 10b7ab: ff 75 10 pushl 0x10(%ebp) 10b7ae: 6a 00 push $0x0 10b7b0: ff 75 0c pushl 0xc(%ebp) 10b7b3: e8 64 f4 ff ff call 10ac1c ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10b7b8: 83 c4 10 add $0x10,%esp 10b7bb: 85 c0 test %eax,%eax 10b7bd: 74 d9 je 10b798 <== NEVER TAKEN timeout, &out ); } *node_ptr = node; 10b7bf: 8b 55 14 mov 0x14(%ebp),%edx 10b7c2: 89 1a mov %ebx,(%edx) return sc; } 10b7c4: 8d 65 f4 lea -0xc(%ebp),%esp 10b7c7: 5b pop %ebx 10b7c8: 5e pop %esi 10b7c9: 5f pop %edi 10b7ca: c9 leave 10b7cb: c3 ret rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10b7cc: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10b7ce: 8b 55 14 mov 0x14(%ebp),%edx 10b7d1: 89 1a mov %ebx,(%edx) return sc; } 10b7d3: 8d 65 f4 lea -0xc(%ebp),%esp 10b7d6: 5b pop %ebx 10b7d7: 5e pop %esi 10b7d8: 5f pop %edi 10b7d9: c9 leave 10b7da: c3 ret =============================================================================== 0010b7dc : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10b7dc: 55 push %ebp 10b7dd: 89 e5 mov %esp,%ebp 10b7df: 56 push %esi 10b7e0: 53 push %ebx 10b7e1: 8b 5d 10 mov 0x10(%ebp),%ebx 10b7e4: 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 ); 10b7e7: 83 ec 08 sub $0x8,%esp 10b7ea: ff 75 0c pushl 0xc(%ebp) 10b7ed: ff 75 08 pushl 0x8(%ebp) 10b7f0: e8 ff 04 00 00 call 10bcf4 <_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) { 10b7f5: 83 c4 10 add $0x10,%esp 10b7f8: 84 c0 test %al,%al 10b7fa: 75 0c jne 10b808 sc = rtems_event_send( task, events ); } return sc; } 10b7fc: 31 c0 xor %eax,%eax 10b7fe: 8d 65 f8 lea -0x8(%ebp),%esp 10b801: 5b pop %ebx 10b802: 5e pop %esi 10b803: c9 leave 10b804: c3 ret 10b805: 8d 76 00 lea 0x0(%esi),%esi { 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 ); 10b808: 89 75 0c mov %esi,0xc(%ebp) 10b80b: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10b80e: 8d 65 f8 lea -0x8(%ebp),%esp 10b811: 5b pop %ebx 10b812: 5e pop %esi 10b813: 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 ); 10b814: e9 8b f5 ff ff jmp 10ada4 =============================================================================== 00115088 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115088: 55 push %ebp 115089: 89 e5 mov %esp,%ebp 11508b: 53 push %ebx 11508c: 83 ec 04 sub $0x4,%esp 11508f: 8b 45 08 mov 0x8(%ebp),%eax 115092: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115095: 85 db test %ebx,%ebx 115097: 74 3b je 1150d4 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115099: 85 c0 test %eax,%eax 11509b: 74 2b je 1150c8 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 11509d: 83 f8 01 cmp $0x1,%eax 1150a0: 74 3e je 1150e0 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 1150a2: 83 f8 02 cmp $0x2,%eax 1150a5: 74 45 je 1150ec *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 1150a7: 83 f8 03 cmp $0x3,%eax 1150aa: 74 4c je 1150f8 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 1150ac: 83 f8 04 cmp $0x4,%eax 1150af: 74 0b je 1150bc return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 1150b1: b8 0a 00 00 00 mov $0xa,%eax } 1150b6: 5a pop %edx 1150b7: 5b pop %ebx 1150b8: c9 leave 1150b9: c3 ret 1150ba: 66 90 xchg %ax,%ax *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 ); 1150bc: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 1150bf: 59 pop %ecx 1150c0: 5b pop %ebx 1150c1: 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 ); 1150c2: e9 41 01 00 00 jmp 115208 1150c7: 90 nop { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 1150c8: 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; } 1150cb: 58 pop %eax 1150cc: 5b pop %ebx 1150cd: 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 ); 1150ce: e9 81 00 00 00 jmp 115154 1150d3: 90 nop rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 1150d4: 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; } 1150d9: 5a pop %edx 1150da: 5b pop %ebx 1150db: c9 leave 1150dc: c3 ret 1150dd: 8d 76 00 lea 0x0(%esi),%esi 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); 1150e0: 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; } 1150e3: 5b pop %ebx 1150e4: 5b pop %ebx 1150e5: 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); 1150e6: e9 19 00 00 00 jmp 115104 1150eb: 90 nop if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 1150ec: e8 57 00 00 00 call 115148 1150f1: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 1150f3: 31 c0 xor %eax,%eax 1150f5: eb bf jmp 1150b6 1150f7: 90 nop } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 1150f8: e8 37 00 00 00 call 115134 1150fd: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 1150ff: 31 c0 xor %eax,%eax 115101: eb b3 jmp 1150b6 =============================================================================== 00115208 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115208: 55 push %ebp 115209: 89 e5 mov %esp,%ebp 11520b: 56 push %esi 11520c: 53 push %ebx 11520d: 83 ec 10 sub $0x10,%esp 115210: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115213: 85 db test %ebx,%ebx 115215: 74 51 je 115268 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115217: 80 3d bc 20 14 00 00 cmpb $0x0,0x1420bc 11521e: 75 0c jne 11522c return RTEMS_NOT_DEFINED; 115220: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115225: 8d 65 f8 lea -0x8(%ebp),%esp 115228: 5b pop %ebx 115229: 5e pop %esi 11522a: c9 leave 11522b: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 11522c: 9c pushf 11522d: fa cli 11522e: 5e pop %esi _TOD_Get( &now ); 11522f: 83 ec 0c sub $0xc,%esp 115232: 8d 45 f0 lea -0x10(%ebp),%eax 115235: 50 push %eax 115236: e8 01 44 00 00 call 11963c <_TOD_Get> _ISR_Enable(level); 11523b: 56 push %esi 11523c: 9d popf useconds = (suseconds_t)now.tv_nsec; 11523d: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115240: 8b 45 f0 mov -0x10(%ebp),%eax 115243: 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; 115245: b8 d3 4d 62 10 mov $0x10624dd3,%eax 11524a: f7 e9 imul %ecx 11524c: 89 d0 mov %edx,%eax 11524e: c1 f8 06 sar $0x6,%eax 115251: c1 f9 1f sar $0x1f,%ecx 115254: 29 c8 sub %ecx,%eax 115256: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115259: 83 c4 10 add $0x10,%esp 11525c: 31 c0 xor %eax,%eax } 11525e: 8d 65 f8 lea -0x8(%ebp),%esp 115261: 5b pop %ebx 115262: 5e pop %esi 115263: c9 leave 115264: c3 ret 115265: 8d 76 00 lea 0x0(%esi),%esi rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) return RTEMS_INVALID_ADDRESS; 115268: b8 09 00 00 00 mov $0x9,%eax 11526d: eb b6 jmp 115225 =============================================================================== 0010a77c : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10a77c: 55 push %ebp 10a77d: 89 e5 mov %esp,%ebp 10a77f: 83 ec 08 sub $0x8,%esp 10a782: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10a785: 85 c0 test %eax,%eax 10a787: 74 13 je 10a79c return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10a789: 83 ec 0c sub $0xc,%esp 10a78c: 50 push %eax 10a78d: e8 8e 14 00 00 call 10bc20 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10a792: 83 c4 10 add $0x10,%esp 10a795: 31 c0 xor %eax,%eax } 10a797: c9 leave 10a798: c3 ret 10a799: 8d 76 00 lea 0x0(%esi),%esi rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; 10a79c: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10a7a1: c9 leave 10a7a2: c3 ret =============================================================================== 0010b6f0 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10b6f0: 55 push %ebp 10b6f1: 89 e5 mov %esp,%ebp 10b6f3: 53 push %ebx 10b6f4: 83 ec 14 sub $0x14,%esp 10b6f7: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10b6fa: 85 db test %ebx,%ebx 10b6fc: 74 66 je 10b764 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10b6fe: 83 ec 0c sub $0xc,%esp 10b701: 53 push %ebx 10b702: e8 39 01 00 00 call 10b840 <_TOD_Validate> 10b707: 83 c4 10 add $0x10,%esp 10b70a: 84 c0 test %al,%al 10b70c: 75 0a jne 10b718 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10b70e: b8 14 00 00 00 mov $0x14,%eax } 10b713: 8b 5d fc mov -0x4(%ebp),%ebx 10b716: c9 leave 10b717: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10b718: 83 ec 0c sub $0xc,%esp 10b71b: 53 push %ebx 10b71c: e8 93 00 00 00 call 10b7b4 <_TOD_To_seconds> 10b721: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10b724: 8b 43 18 mov 0x18(%ebx),%eax 10b727: 0f af 05 6c 6c 12 00 imul 0x126c6c,%eax 10b72e: 8d 04 80 lea (%eax,%eax,4),%eax 10b731: 8d 04 80 lea (%eax,%eax,4),%eax 10b734: 8d 04 80 lea (%eax,%eax,4),%eax 10b737: c1 e0 03 shl $0x3,%eax 10b73a: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b73d: a1 6c b3 12 00 mov 0x12b36c,%eax 10b742: 40 inc %eax 10b743: a3 6c b3 12 00 mov %eax,0x12b36c rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10b748: 8d 45 f0 lea -0x10(%ebp),%eax 10b74b: 89 04 24 mov %eax,(%esp) 10b74e: e8 6d 17 00 00 call 10cec0 <_TOD_Set> _Thread_Enable_dispatch(); 10b753: e8 54 2d 00 00 call 10e4ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b758: 83 c4 10 add $0x10,%esp 10b75b: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10b75d: 8b 5d fc mov -0x4(%ebp),%ebx 10b760: c9 leave 10b761: c3 ret 10b762: 66 90 xchg %ax,%ax ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10b764: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10b769: 8b 5d fc mov -0x4(%ebp),%ebx 10b76c: c9 leave 10b76d: c3 ret =============================================================================== 0010a578 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10a578: 55 push %ebp 10a579: 89 e5 mov %esp,%ebp 10a57b: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10a57e: e8 51 13 00 00 call 10b8d4 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10a583: 83 ec 0c sub $0xc,%esp 10a586: 68 c0 78 12 00 push $0x1278c0 10a58b: e8 10 37 00 00 call 10dca0 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10a590: e8 d7 31 00 00 call 10d76c <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Thread_Dispatch_necessary ); 10a595: a0 a4 7d 12 00 mov 0x127da4,%al if ( _Thread_Is_context_switch_necessary() && 10a59a: 83 c4 10 add $0x10,%esp 10a59d: 84 c0 test %al,%al 10a59f: 74 09 je 10a5aa * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10a5a1: a1 ec 77 12 00 mov 0x1277ec,%eax 10a5a6: 85 c0 test %eax,%eax 10a5a8: 74 06 je 10a5b0 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10a5aa: 31 c0 xor %eax,%eax 10a5ac: c9 leave 10a5ad: c3 ret 10a5ae: 66 90 xchg %ax,%ax _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10a5b0: e8 53 26 00 00 call 10cc08 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10a5b5: 31 c0 xor %eax,%eax 10a5b7: c9 leave 10a5b8: c3 ret =============================================================================== 00107980 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 107980: 55 push %ebp 107981: 89 e5 mov %esp,%ebp 107983: 57 push %edi 107984: 56 push %esi 107985: 53 push %ebx 107986: 83 ec 6c sub $0x6c,%esp Timestamp_Control uptime, total, ran, uptime_at_last_reset; #else uint32_t total_units = 0; #endif if ( !print ) 107989: 8b 55 0c mov 0xc(%ebp),%edx 10798c: 85 d2 test %edx,%edx 10798e: 0f 84 98 01 00 00 je 107b2c <== 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__ _Timestamp_Set_to_zero( &total ); 107994: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) 10799b: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) uptime_at_last_reset = CPU_usage_Uptime_at_last_reset; 1079a2: a1 c0 b9 12 00 mov 0x12b9c0,%eax 1079a7: 8b 15 c4 b9 12 00 mov 0x12b9c4,%edx 1079ad: 89 45 c0 mov %eax,-0x40(%ebp) 1079b0: 89 55 c4 mov %edx,-0x3c(%ebp) } } } #endif (*print)( 1079b3: 83 ec 08 sub $0x8,%esp 1079b6: 68 70 34 12 00 push $0x123470 1079bb: ff 75 08 pushl 0x8(%ebp) 1079be: ff 55 0c call *0xc(%ebp) 1079c1: 83 c4 10 add $0x10,%esp " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 1079c4: c7 45 90 01 00 00 00 movl $0x1,-0x70(%ebp) #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 1079cb: 8b 55 90 mov -0x70(%ebp),%edx 1079ce: 8b 04 95 44 b3 12 00 mov 0x12b344(,%edx,4),%eax 1079d5: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 1079d8: 85 f6 test %esi,%esi 1079da: 0f 84 20 01 00 00 je 107b00 <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 1079e0: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 1079e5: 0f 84 15 01 00 00 je 107b00 1079eb: bb 01 00 00 00 mov $0x1,%ebx 1079f0: eb 6f jmp 107a61 1079f2: 66 90 xchg %ax,%ax Timestamp_Control last = _Thread_Time_of_last_context_switch; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( &last, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); } else { _TOD_Get_uptime( &uptime ); 1079f4: 83 ec 0c sub $0xc,%esp 1079f7: 8d 7d d8 lea -0x28(%ebp),%edi 1079fa: 57 push %edi 1079fb: e8 38 54 00 00 call 10ce38 <_TOD_Get_uptime> 107a00: 83 c4 10 add $0x10,%esp 107a03: 8d 55 c8 lea -0x38(%ebp),%edx 107a06: 89 55 94 mov %edx,-0x6c(%ebp) } _Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total ); 107a09: 50 push %eax 107a0a: 8d 45 d0 lea -0x30(%ebp),%eax 107a0d: 50 push %eax 107a0e: 57 push %edi 107a0f: 8d 55 c0 lea -0x40(%ebp),%edx 107a12: 52 push %edx 107a13: e8 ec 75 00 00 call 10f004 <_Timespec_Subtract> _Timestamp_Divide( &ran, &total, &ival, &fval ); 107a18: 8d 45 e0 lea -0x20(%ebp),%eax 107a1b: 50 push %eax 107a1c: 8d 55 e4 lea -0x1c(%ebp),%edx 107a1f: 52 push %edx 107a20: 8d 45 d0 lea -0x30(%ebp),%eax 107a23: 50 push %eax 107a24: ff 75 94 pushl -0x6c(%ebp) 107a27: e8 14 75 00 00 call 10ef40 <_Timespec_Divide> /* * Print the information */ (*print)( context, 107a2c: 83 c4 18 add $0x18,%esp 107a2f: ff 75 e0 pushl -0x20(%ebp) 107a32: ff 75 e4 pushl -0x1c(%ebp) 107a35: ba d3 4d 62 10 mov $0x10624dd3,%edx 107a3a: 8b 45 cc mov -0x34(%ebp),%eax 107a3d: f7 e2 mul %edx 107a3f: c1 ea 06 shr $0x6,%edx 107a42: 52 push %edx 107a43: ff 75 c8 pushl -0x38(%ebp) 107a46: 68 e3 36 12 00 push $0x1236e3 107a4b: ff 75 08 pushl 0x8(%ebp) 107a4e: ff 55 0c call *0xc(%ebp) 107a51: 83 c4 20 add $0x20,%esp continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 107a54: 43 inc %ebx 107a55: 0f b7 46 10 movzwl 0x10(%esi),%eax 107a59: 39 d8 cmp %ebx,%eax 107a5b: 0f 82 9f 00 00 00 jb 107b00 the_thread = (Thread_Control *)information->local_table[ i ]; 107a61: 8b 46 1c mov 0x1c(%esi),%eax 107a64: 8b 3c 98 mov (%eax,%ebx,4),%edi if ( !the_thread ) 107a67: 85 ff test %edi,%edi 107a69: 74 e9 je 107a54 <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 107a6b: 50 push %eax 107a6c: 8d 45 a3 lea -0x5d(%ebp),%eax 107a6f: 50 push %eax 107a70: 6a 0d push $0xd 107a72: ff 77 08 pushl 0x8(%edi) 107a75: e8 aa 41 00 00 call 10bc24 (*print)( 107a7a: 8d 55 a3 lea -0x5d(%ebp),%edx 107a7d: 52 push %edx 107a7e: ff 77 08 pushl 0x8(%edi) 107a81: 68 d0 36 12 00 push $0x1236d0 107a86: ff 75 08 pushl 0x8(%ebp) 107a89: 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; 107a8c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 107a92: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 107a98: 89 45 c8 mov %eax,-0x38(%ebp) 107a9b: 89 55 cc mov %edx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 107a9e: 83 c4 20 add $0x20,%esp 107aa1: a1 58 b9 12 00 mov 0x12b958,%eax 107aa6: 8b 57 08 mov 0x8(%edi),%edx 107aa9: 39 50 08 cmp %edx,0x8(%eax) 107aac: 0f 85 42 ff ff ff jne 1079f4 Timestamp_Control used; Timestamp_Control last = _Thread_Time_of_last_context_switch; 107ab2: a1 2c b4 12 00 mov 0x12b42c,%eax 107ab7: 8b 15 30 b4 12 00 mov 0x12b430,%edx 107abd: 89 45 b0 mov %eax,-0x50(%ebp) 107ac0: 89 55 b4 mov %edx,-0x4c(%ebp) _TOD_Get_uptime( &uptime ); 107ac3: 83 ec 0c sub $0xc,%esp 107ac6: 8d 7d d8 lea -0x28(%ebp),%edi 107ac9: 57 push %edi 107aca: e8 69 53 00 00 call 10ce38 <_TOD_Get_uptime> _Timestamp_Subtract( &last, &uptime, &used ); 107acf: 83 c4 0c add $0xc,%esp 107ad2: 8d 45 b8 lea -0x48(%ebp),%eax 107ad5: 50 push %eax 107ad6: 57 push %edi 107ad7: 8d 55 b0 lea -0x50(%ebp),%edx 107ada: 52 push %edx 107adb: 89 45 8c mov %eax,-0x74(%ebp) 107ade: e8 21 75 00 00 call 10f004 <_Timespec_Subtract> _Timestamp_Add_to( &ran, &used ); 107ae3: 5a pop %edx 107ae4: 59 pop %ecx 107ae5: 8b 45 8c mov -0x74(%ebp),%eax 107ae8: 50 push %eax 107ae9: 8d 45 c8 lea -0x38(%ebp),%eax 107aec: 89 45 94 mov %eax,-0x6c(%ebp) 107aef: 50 push %eax 107af0: e8 0f 74 00 00 call 10ef04 <_Timespec_Add_to> 107af5: 83 c4 10 add $0x10,%esp 107af8: e9 0c ff ff ff jmp 107a09 107afd: 8d 76 00 lea 0x0(%esi),%esi " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 107b00: ff 45 90 incl -0x70(%ebp) 107b03: 83 7d 90 04 cmpl $0x4,-0x70(%ebp) 107b07: 0f 85 be fe ff ff jne 1079cb } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 107b0d: ba d3 4d 62 10 mov $0x10624dd3,%edx 107b12: 8b 45 d4 mov -0x2c(%ebp),%eax 107b15: f7 e2 mul %edx 107b17: c1 ea 06 shr $0x6,%edx 107b1a: 52 push %edx 107b1b: ff 75 d0 pushl -0x30(%ebp) 107b1e: 68 e4 35 12 00 push $0x1235e4 107b23: ff 75 08 pushl 0x8(%ebp) 107b26: ff 55 0c call *0xc(%ebp) 107b29: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 107b2c: 8d 65 f4 lea -0xc(%ebp),%esp 107b2f: 5b pop %ebx 107b30: 5e pop %esi 107b31: 5f pop %edi 107b32: c9 leave 107b33: c3 ret =============================================================================== 00112dc8 : [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { 112dc8: 55 push %ebp 112dc9: 89 e5 mov %esp,%ebp 112dcb: 53 push %ebx 112dcc: 83 ec 04 sub $0x4,%esp 112dcf: 8b 45 08 mov 0x8(%ebp),%eax if (sc == RTEMS_SUCCESSFUL) { 112dd2: 85 c0 test %eax,%eax 112dd4: 75 06 jne 112ddc return 0; 112dd6: 31 c0 xor %eax,%eax errno = eno; return -1; } } 112dd8: 5a pop %edx 112dd9: 5b pop %ebx 112dda: c9 leave 112ddb: c3 ret if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { 112ddc: 83 f8 1c cmp $0x1c,%eax 112ddf: 77 17 ja 112df8 <== NEVER TAKEN eno = status_code_to_errno [sc]; 112de1: 8b 1c 85 a0 16 12 00 mov 0x1216a0(,%eax,4),%ebx } errno = eno; 112de8: e8 67 00 00 00 call 112e54 <__errno> 112ded: 89 18 mov %ebx,(%eax) return -1; 112def: b8 ff ff ff ff mov $0xffffffff,%eax 112df4: eb e2 jmp 112dd8 112df6: 66 90 xchg %ax,%ax int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; 112df8: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED 112dfd: eb e9 jmp 112de8 <== NOT EXECUTED =============================================================================== 0010a744 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10a744: 55 push %ebp 10a745: 89 e5 mov %esp,%ebp 10a747: 53 push %ebx 10a748: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10a74b: 8d 45 f4 lea -0xc(%ebp),%eax 10a74e: 50 push %eax 10a74f: ff 75 08 pushl 0x8(%ebp) 10a752: e8 4d 26 00 00 call 10cda4 <_Thread_Get> switch ( location ) { 10a757: 83 c4 10 add $0x10,%esp 10a75a: 8b 55 f4 mov -0xc(%ebp),%edx 10a75d: 85 d2 test %edx,%edx 10a75f: 75 2b jne 10a78c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10a761: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10a767: 9c pushf 10a768: fa cli 10a769: 59 pop %ecx *the_event_set |= the_new_events; 10a76a: 8b 5d 0c mov 0xc(%ebp),%ebx 10a76d: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10a76f: 51 push %ecx 10a770: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10a771: 83 ec 0c sub $0xc,%esp 10a774: 50 push %eax 10a775: e8 1e 00 00 00 call 10a798 <_Event_Surrender> _Thread_Enable_dispatch(); 10a77a: e8 01 26 00 00 call 10cd80 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10a77f: 83 c4 10 add $0x10,%esp 10a782: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a784: 8b 5d fc mov -0x4(%ebp),%ebx 10a787: c9 leave 10a788: c3 ret 10a789: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10a78c: b8 04 00 00 00 mov $0x4,%eax } 10a791: 8b 5d fc mov -0x4(%ebp),%ebx 10a794: c9 leave 10a795: c3 ret =============================================================================== 0010c6b8 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10c6b8: 55 push %ebp 10c6b9: 89 e5 mov %esp,%ebp 10c6bb: 57 push %edi 10c6bc: 56 push %esi 10c6bd: 53 push %ebx 10c6be: 83 ec 1c sub $0x1c,%esp 10c6c1: 8b 75 0c mov 0xc(%ebp),%esi 10c6c4: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10c6c7: 85 db test %ebx,%ebx 10c6c9: 0f 84 85 00 00 00 je 10c754 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10c6cf: 8b 45 08 mov 0x8(%ebp),%eax 10c6d2: 85 c0 test %eax,%eax 10c6d4: 75 0e jne 10c6e4 return RTEMS_INVALID_NAME; 10c6d6: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c6db: 8d 65 f4 lea -0xc(%ebp),%esp 10c6de: 5b pop %ebx 10c6df: 5e pop %esi 10c6e0: 5f pop %edi 10c6e1: c9 leave 10c6e2: c3 ret 10c6e3: 90 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c6e4: a1 6c b3 12 00 mov 0x12b36c,%eax 10c6e9: 40 inc %eax 10c6ea: a3 6c b3 12 00 mov %eax,0x12b36c #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10c6ef: 83 ec 0c sub $0xc,%esp 10c6f2: 68 c0 b5 12 00 push $0x12b5c0 10c6f7: e8 04 0d 00 00 call 10d400 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10c6fc: 83 c4 10 add $0x10,%esp 10c6ff: 85 c0 test %eax,%eax 10c701: 74 45 je 10c748 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10c703: 8d 78 24 lea 0x24(%eax),%edi 10c706: b9 08 00 00 00 mov $0x8,%ecx 10c70b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10c70d: 83 ec 0c sub $0xc,%esp _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set_with_table( &the_extension->Extension, extension_table ); 10c710: 8d 50 10 lea 0x10(%eax),%edx 10c713: 52 push %edx 10c714: 89 45 e4 mov %eax,-0x1c(%ebp) 10c717: e8 28 29 00 00 call 10f044 <_User_extensions_Add_set> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c71c: 8b 45 e4 mov -0x1c(%ebp),%eax 10c71f: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c722: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c725: 8b 0d dc b5 12 00 mov 0x12b5dc,%ecx 10c72b: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c72e: 8b 4d 08 mov 0x8(%ebp),%ecx 10c731: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10c734: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10c736: e8 71 1d 00 00 call 10e4ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c73b: 83 c4 10 add $0x10,%esp 10c73e: 31 c0 xor %eax,%eax } 10c740: 8d 65 f4 lea -0xc(%ebp),%esp 10c743: 5b pop %ebx 10c744: 5e pop %esi 10c745: 5f pop %edi 10c746: c9 leave 10c747: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10c748: e8 5f 1d 00 00 call 10e4ac <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c74d: b8 05 00 00 00 mov $0x5,%eax 10c752: eb 87 jmp 10c6db ) { Extension_Control *the_extension; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c754: b8 09 00 00 00 mov $0x9,%eax 10c759: eb 80 jmp 10c6db =============================================================================== 0010c4f8 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10c4f8: 55 push %ebp 10c4f9: 89 e5 mov %esp,%ebp 10c4fb: 53 push %ebx 10c4fc: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10c4ff: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10c502: 50 push %eax 10c503: ff 75 08 pushl 0x8(%ebp) 10c506: 68 a0 af 12 00 push $0x12afa0 10c50b: e8 f0 10 00 00 call 10d600 <_Objects_Get> 10c510: 89 c3 mov %eax,%ebx switch ( location ) { 10c512: 83 c4 10 add $0x10,%esp 10c515: 8b 55 f4 mov -0xc(%ebp),%edx 10c518: 85 d2 test %edx,%edx 10c51a: 75 38 jne 10c554 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10c51c: 83 ec 0c sub $0xc,%esp 10c51f: 8d 40 10 lea 0x10(%eax),%eax 10c522: 50 push %eax 10c523: e8 bc 27 00 00 call 10ece4 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10c528: 59 pop %ecx 10c529: 58 pop %eax 10c52a: 53 push %ebx 10c52b: 68 a0 af 12 00 push $0x12afa0 10c530: e8 93 0c 00 00 call 10d1c8 <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10c535: 58 pop %eax 10c536: 5a pop %edx 10c537: 53 push %ebx 10c538: 68 a0 af 12 00 push $0x12afa0 10c53d: e8 7e 0f 00 00 call 10d4c0 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10c542: e8 c9 1b 00 00 call 10e110 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c547: 83 c4 10 add $0x10,%esp 10c54a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c54c: 8b 5d fc mov -0x4(%ebp),%ebx 10c54f: c9 leave 10c550: c3 ret 10c551: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c554: b8 04 00 00 00 mov $0x4,%eax } 10c559: 8b 5d fc mov -0x4(%ebp),%ebx 10c55c: c9 leave 10c55d: c3 ret =============================================================================== 0010758c : int rtems_filesystem_dirname( const char *pathname ) { 10758c: 55 push %ebp 10758d: 89 e5 mov %esp,%ebp 10758f: 57 push %edi 107590: 56 push %esi 107591: 53 push %ebx 107592: 83 ec 0c sub $0xc,%esp 107595: 8b 5d 08 mov 0x8(%ebp),%ebx int len = strlen( pathname ); 107598: 31 c0 xor %eax,%eax 10759a: b9 ff ff ff ff mov $0xffffffff,%ecx 10759f: 89 df mov %ebx,%edi 1075a1: f2 ae repnz scas %es:(%edi),%al 1075a3: f7 d1 not %ecx while ( len ) { 1075a5: 89 ce mov %ecx,%esi 1075a7: 4e dec %esi 1075a8: 75 06 jne 1075b0 <== ALWAYS TAKEN 1075aa: eb 19 jmp 1075c5 <== NOT EXECUTED 1075ac: 85 f6 test %esi,%esi 1075ae: 74 15 je 1075c5 len--; 1075b0: 4e dec %esi if ( rtems_filesystem_is_separator( pathname[len] ) ) 1075b1: 83 ec 0c sub $0xc,%esp 1075b4: 0f be 04 33 movsbl (%ebx,%esi,1),%eax 1075b8: 50 push %eax 1075b9: e8 02 0f 00 00 call 1084c0 1075be: 83 c4 10 add $0x10,%esp 1075c1: 85 c0 test %eax,%eax 1075c3: 74 e7 je 1075ac break; } return len; } 1075c5: 89 f0 mov %esi,%eax 1075c7: 8d 65 f4 lea -0xc(%ebp),%esp 1075ca: 5b pop %ebx 1075cb: 5e pop %esi 1075cc: 5f pop %edi 1075cd: c9 leave 1075ce: c3 ret =============================================================================== 0010f68c : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 10f68c: 55 push %ebp 10f68d: 89 e5 mov %esp,%ebp 10f68f: 83 ec 18 sub $0x18,%esp 10f692: 8b 45 08 mov 0x8(%ebp),%eax find_arg fa = { 10f695: 89 45 f0 mov %eax,-0x10(%ebp) 10f698: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) .type = type, .mount_h = NULL }; if ( type != NULL ) { 10f69f: 85 c0 test %eax,%eax 10f6a1: 74 19 je 10f6bc <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 10f6a3: 83 ec 08 sub $0x8,%esp 10f6a6: 8d 45 f0 lea -0x10(%ebp),%eax 10f6a9: 50 push %eax 10f6aa: 68 ac f5 10 00 push $0x10f5ac 10f6af: e8 34 ff ff ff call 10f5e8 10f6b4: 8b 45 f4 mov -0xc(%ebp),%eax 10f6b7: 83 c4 10 add $0x10,%esp } return fa.mount_h; } 10f6ba: c9 leave 10f6bb: c3 ret find_arg fa = { .type = type, .mount_h = NULL }; if ( type != NULL ) { 10f6bc: 31 c0 xor %eax,%eax rtems_filesystem_iterate( find_handler, &fa ); } return fa.mount_h; } 10f6be: c9 leave <== NOT EXECUTED 10f6bf: c3 ret <== NOT EXECUTED =============================================================================== 0010f848 : #include "rtems/libio_.h" void rtems_filesystem_get_sym_start_loc(const char *path, int *index, rtems_filesystem_location_info_t *loc) { 10f848: 55 push %ebp 10f849: 89 e5 mov %esp,%ebp 10f84b: 57 push %edi 10f84c: 56 push %esi 10f84d: 53 push %ebx 10f84e: 83 ec 18 sub $0x18,%esp 10f851: 8b 5d 0c mov 0xc(%ebp),%ebx if (rtems_filesystem_is_separator(path[0])) { 10f854: 8b 45 08 mov 0x8(%ebp),%eax 10f857: 0f be 00 movsbl (%eax),%eax 10f85a: 50 push %eax 10f85b: e8 60 8c ff ff call 1084c0 10f860: 83 c4 10 add $0x10,%esp 10f863: 85 c0 test %eax,%eax 10f865: 75 11 jne 10f878 *loc = rtems_filesystem_root; *index = 1; } else { *index = 0; 10f867: c7 03 00 00 00 00 movl $0x0,(%ebx) } } 10f86d: 8d 65 f4 lea -0xc(%ebp),%esp 10f870: 5b pop %ebx 10f871: 5e pop %esi 10f872: 5f pop %edi 10f873: c9 leave 10f874: c3 ret 10f875: 8d 76 00 lea 0x0(%esi),%esi 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; 10f878: 8b 35 10 54 12 00 mov 0x125410,%esi 10f87e: 83 c6 18 add $0x18,%esi 10f881: b9 05 00 00 00 mov $0x5,%ecx 10f886: 8b 7d 10 mov 0x10(%ebp),%edi 10f889: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *index = 1; 10f88b: c7 03 01 00 00 00 movl $0x1,(%ebx) } else { *index = 0; } } 10f891: 8d 65 f4 lea -0xc(%ebp),%esp 10f894: 5b pop %ebx 10f895: 5e pop %esi 10f896: 5f pop %edi 10f897: c9 leave 10f898: c3 ret =============================================================================== 001073bc : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1073bc: 55 push %ebp 1073bd: 89 e5 mov %esp,%ebp 1073bf: 57 push %edi 1073c0: 56 push %esi 1073c1: 53 push %ebx 1073c2: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1073c5: a1 10 54 12 00 mov 0x125410,%eax 1073ca: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1073d1: a1 20 f5 11 00 mov 0x11f520,%eax 1073d6: 85 c0 test %eax,%eax 1073d8: 0f 84 9f 00 00 00 je 10747d <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1073de: a1 54 34 12 00 mov 0x123454,%eax status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 1073e3: 83 ec 0c sub $0xc,%esp 1073e6: 6a 00 push $0x0 1073e8: ff 70 04 pushl 0x4(%eax) 1073eb: ff 30 pushl (%eax) 1073ed: ff 70 0c pushl 0xc(%eax) 1073f0: ff 70 08 pushl 0x8(%eax) 1073f3: e8 24 07 00 00 call 107b1c if ( status == -1 ) 1073f8: 83 c4 20 add $0x20,%esp 1073fb: 40 inc %eax 1073fc: 0f 84 95 00 00 00 je 107497 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 107402: a1 10 54 12 00 mov 0x125410,%eax 107407: 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); 10740d: 83 ec 0c sub $0xc,%esp 107410: 6a 00 push $0x0 107412: 8d 5d d4 lea -0x2c(%ebp),%ebx 107415: 53 push %ebx 107416: 6a 00 push $0x0 107418: 6a 01 push $0x1 10741a: 68 e7 0d 12 00 push $0x120de7 10741f: e8 24 01 00 00 call 107548 rtems_filesystem_root = loc; 107424: 8b 3d 10 54 12 00 mov 0x125410,%edi 10742a: 83 c7 18 add $0x18,%edi 10742d: b9 05 00 00 00 mov $0x5,%ecx 107432: 89 de mov %ebx,%esi 107434: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107436: 83 c4 14 add $0x14,%esp 107439: 6a 00 push $0x0 10743b: 53 push %ebx 10743c: 6a 00 push $0x0 10743e: 6a 01 push $0x1 107440: 68 e7 0d 12 00 push $0x120de7 107445: e8 fe 00 00 00 call 107548 rtems_filesystem_current = loc; 10744a: 8b 3d 10 54 12 00 mov 0x125410,%edi 107450: 83 c7 04 add $0x4,%edi 107453: b9 05 00 00 00 mov $0x5,%ecx 107458: 89 de mov %ebx,%esi 10745a: 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); 10745c: 83 c4 18 add $0x18,%esp 10745f: 68 ff 01 00 00 push $0x1ff 107464: 68 e9 0d 12 00 push $0x120de9 107469: e8 42 05 00 00 call 1079b0 if ( status != 0 ) 10746e: 83 c4 10 add $0x10,%esp 107471: 85 c0 test %eax,%eax 107473: 75 15 jne 10748a <== 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. */ } 107475: 8d 65 f4 lea -0xc(%ebp),%esp 107478: 5b pop %ebx 107479: 5e pop %esi 10747a: 5f pop %edi 10747b: c9 leave 10747c: c3 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 10747d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107480: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 107485: e8 62 3d 00 00 call 10b1ec <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 10748a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10748d: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 107492: e8 55 3d 00 00 call 10b1ec <== 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 ); 107497: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10749a: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 10749f: e8 48 3d 00 00 call 10b1ec <== NOT EXECUTED =============================================================================== 0010f5e8 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 10f5e8: 55 push %ebp 10f5e9: 89 e5 mov %esp,%ebp 10f5eb: 57 push %edi 10f5ec: 56 push %esi 10f5ed: 53 push %ebx 10f5ee: 83 ec 1c sub $0x1c,%esp 10f5f1: 8b 75 08 mov 0x8(%ebp),%esi 10f5f4: 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 ) { 10f5f7: 8b 1d 00 f5 11 00 mov 0x11f500,%ebx 10f5fd: 85 db test %ebx,%ebx 10f5ff: 74 24 je 10f625 <== NEVER TAKEN 10f601: bb 00 f5 11 00 mov $0x11f500,%ebx 10f606: eb 04 jmp 10f60c 10f608: 84 c0 test %al,%al 10f60a: 75 70 jne 10f67c stop = (*routine)( table_entry, routine_arg ); 10f60c: 83 ec 08 sub $0x8,%esp 10f60f: 57 push %edi 10f610: 53 push %ebx 10f611: ff d6 call *%esi 10f613: 88 c2 mov %al,%dl ++table_entry; 10f615: 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 ) { 10f618: 83 c4 10 add $0x10,%esp 10f61b: 8b 0b mov (%ebx),%ecx 10f61d: 85 c9 test %ecx,%ecx 10f61f: 75 e7 jne 10f608 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 10f621: 84 c0 test %al,%al 10f623: 75 57 jne 10f67c 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 ); 10f625: 50 push %eax 10f626: 6a 00 push $0x0 10f628: 6a 00 push $0x0 10f62a: ff 35 88 76 12 00 pushl 0x127688 10f630: e8 73 b5 ff ff call 10aba8 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10f635: 8b 1d 1c 54 12 00 mov 0x12541c,%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10f63b: 83 c4 10 add $0x10,%esp 10f63e: 81 fb 20 54 12 00 cmp $0x125420,%ebx 10f644: 75 06 jne 10f64c 10f646: eb 3e jmp 10f686 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; 10f648: 84 c0 test %al,%al 10f64a: 75 19 jne 10f665 <== NEVER TAKEN node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 10f64c: 83 ec 08 sub $0x8,%esp 10f64f: 57 push %edi 10f650: 8d 43 08 lea 0x8(%ebx),%eax 10f653: 50 push %eax 10f654: ff d6 call *%esi 10f656: 88 c2 mov %al,%dl } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10f658: 8b 1b mov (%ebx),%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10f65a: 83 c4 10 add $0x10,%esp 10f65d: 81 fb 20 54 12 00 cmp $0x125420,%ebx 10f663: 75 e3 jne 10f648 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f665: 83 ec 0c sub $0xc,%esp 10f668: ff 35 88 76 12 00 pushl 0x127688 10f66e: 88 55 e4 mov %dl,-0x1c(%ebp) 10f671: e8 2e b6 ff ff call 10aca4 10f676: 83 c4 10 add $0x10,%esp 10f679: 8a 55 e4 mov -0x1c(%ebp),%dl } rtems_libio_unlock(); } return stop; } 10f67c: 88 d0 mov %dl,%al 10f67e: 8d 65 f4 lea -0xc(%ebp),%esp 10f681: 5b pop %ebx 10f682: 5e pop %esi 10f683: 5f pop %edi 10f684: c9 leave 10f685: c3 ret ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10f686: 31 d2 xor %edx,%edx 10f688: eb db jmp 10f665 =============================================================================== 00107aac : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 107aac: 55 push %ebp 107aad: 89 e5 mov %esp,%ebp 107aaf: 57 push %edi 107ab0: 56 push %esi 107ab1: 53 push %ebx 107ab2: 83 ec 20 sub $0x20,%esp 107ab5: 8b 75 08 mov 0x8(%ebp),%esi 107ab8: 8b 7d 0c mov 0xc(%ebp),%edi 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 ); 107abb: 6a 00 push $0x0 107abd: 6a 00 push $0x0 107abf: ff 35 88 76 12 00 pushl 0x127688 107ac5: e8 de 30 00 00 call 10aba8 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 107aca: 8b 1d e4 52 12 00 mov 0x1252e4,%ebx { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 107ad0: 83 c4 10 add $0x10,%esp 107ad3: 81 fb e8 52 12 00 cmp $0x1252e8,%ebx 107ad9: 75 09 jne 107ae4 <== ALWAYS TAKEN 107adb: eb 3b jmp 107b18 <== NOT EXECUTED 107add: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; 107ae0: 84 c0 test %al,%al 107ae2: 75 16 jne 107afa <== 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 ); 107ae4: 83 ec 08 sub $0x8,%esp 107ae7: 57 push %edi 107ae8: 53 push %ebx 107ae9: ff d6 call *%esi 107aeb: 88 c2 mov %al,%dl } rtems_libio_unlock(); return stop; } 107aed: 8b 1b mov (%ebx),%ebx { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 107aef: 83 c4 10 add $0x10,%esp 107af2: 81 fb e8 52 12 00 cmp $0x1252e8,%ebx 107af8: 75 e6 jne 107ae0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 107afa: 83 ec 0c sub $0xc,%esp 107afd: ff 35 88 76 12 00 pushl 0x127688 107b03: 88 55 e4 mov %dl,-0x1c(%ebp) 107b06: e8 99 31 00 00 call 10aca4 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 107b0b: 8a 55 e4 mov -0x1c(%ebp),%dl 107b0e: 88 d0 mov %dl,%al 107b10: 8d 65 f4 lea -0xc(%ebp),%esp 107b13: 5b pop %ebx 107b14: 5e pop %esi 107b15: 5f pop %edi 107b16: c9 leave 107b17: c3 ret rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; 107b18: 31 d2 xor %edx,%edx <== NOT EXECUTED 107b1a: eb de jmp 107afa <== NOT EXECUTED =============================================================================== 001075d0 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 1075d0: 55 push %ebp 1075d1: 89 e5 mov %esp,%ebp 1075d3: 57 push %edi 1075d4: 56 push %esi 1075d5: 53 push %ebx 1075d6: 83 ec 0c sub $0xc,%esp 1075d9: 8b 75 08 mov 0x8(%ebp),%esi 1075dc: 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 ) ) 1075df: 8a 06 mov (%esi),%al 1075e1: 84 c0 test %al,%al 1075e3: 74 34 je 107619 <== NEVER TAKEN 1075e5: 85 ff test %edi,%edi 1075e7: 74 30 je 107619 <== NEVER TAKEN 1075e9: 31 db xor %ebx,%ebx 1075eb: eb 0f jmp 1075fc 1075ed: 8d 76 00 lea 0x0(%esi),%esi { pathname++; pathnamelen--; stripped++; 1075f0: 43 inc %ebx { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 1075f1: 8a 04 1e mov (%esi,%ebx,1),%al 1075f4: 84 c0 test %al,%al 1075f6: 74 17 je 10760f <== NEVER TAKEN 1075f8: 39 df cmp %ebx,%edi 1075fa: 74 13 je 10760f <== NEVER TAKEN 1075fc: 83 ec 0c sub $0xc,%esp 1075ff: 0f be c0 movsbl %al,%eax 107602: 50 push %eax 107603: e8 b8 0e 00 00 call 1084c0 107608: 83 c4 10 add $0x10,%esp 10760b: 85 c0 test %eax,%eax 10760d: 75 e1 jne 1075f0 pathname++; pathnamelen--; stripped++; } return stripped; } 10760f: 89 d8 mov %ebx,%eax 107611: 8d 65 f4 lea -0xc(%ebp),%esp 107614: 5b pop %ebx 107615: 5e pop %esi 107616: 5f pop %edi 107617: c9 leave 107618: c3 ret ) { /* * Eat any separators at start of the path. */ int stripped = 0; 107619: 31 db xor %ebx,%ebx 10761b: eb f2 jmp 10760f <== NOT EXECUTED =============================================================================== 0010f6c0 : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 10f6c0: 55 push %ebp 10f6c1: 89 e5 mov %esp,%ebp 10f6c3: 57 push %edi 10f6c4: 56 push %esi 10f6c5: 53 push %ebx 10f6c6: 83 ec 28 sub $0x28,%esp size_t type_size = strlen(type) + 1; 10f6c9: 31 c0 xor %eax,%eax 10f6cb: b9 ff ff ff ff mov $0xffffffff,%ecx 10f6d0: 8b 7d 08 mov 0x8(%ebp),%edi 10f6d3: f2 ae repnz scas %es:(%edi),%al 10f6d5: f7 d1 not %ecx size_t fsn_size = sizeof( filesystem_node ) + type_size; 10f6d7: 8d 41 10 lea 0x10(%ecx),%eax filesystem_node *fsn = malloc( fsn_size ); 10f6da: 50 push %eax 10f6db: 89 4d e4 mov %ecx,-0x1c(%ebp) 10f6de: e8 25 82 ff ff call 107908 10f6e3: 89 c3 mov %eax,%ebx char *type_storage = (char *) fsn + sizeof( *fsn ); if ( fsn == NULL ) 10f6e5: 83 c4 10 add $0x10,%esp 10f6e8: 85 c0 test %eax,%eax 10f6ea: 8b 4d e4 mov -0x1c(%ebp),%ecx 10f6ed: 0f 84 8e 00 00 00 je 10f781 <== NEVER TAKEN ) { 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 ); 10f6f3: 8d 40 10 lea 0x10(%eax),%eax if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memcpy(type_storage, type, type_size); 10f6f6: 89 c7 mov %eax,%edi 10f6f8: 8b 75 08 mov 0x8(%ebp),%esi 10f6fb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) fsn->entry.type = type_storage; 10f6fd: 89 43 08 mov %eax,0x8(%ebx) fsn->entry.mount_h = mount_h; 10f700: 8b 45 0c mov 0xc(%ebp),%eax 10f703: 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 ); 10f706: 50 push %eax 10f707: 6a 00 push $0x0 10f709: 6a 00 push $0x0 10f70b: ff 35 88 76 12 00 pushl 0x127688 10f711: e8 92 b4 ff ff call 10aba8 rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 10f716: 5f pop %edi 10f717: ff 75 08 pushl 0x8(%ebp) 10f71a: e8 6d ff ff ff call 10f68c 10f71f: 83 c4 10 add $0x10,%esp 10f722: 85 c0 test %eax,%eax 10f724: 75 2a jne 10f750 <== NEVER TAKEN 10f726: 83 ec 08 sub $0x8,%esp 10f729: 53 push %ebx 10f72a: 68 1c 54 12 00 push $0x12541c 10f72f: e8 9c bd ff ff call 10b4d0 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f734: 5e pop %esi 10f735: ff 35 88 76 12 00 pushl 0x127688 10f73b: e8 64 b5 ff ff call 10aca4 10f740: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; 10f743: 31 c0 xor %eax,%eax } 10f745: 8d 65 f4 lea -0xc(%ebp),%esp 10f748: 5b pop %ebx 10f749: 5e pop %esi 10f74a: 5f pop %edi 10f74b: c9 leave 10f74c: c3 ret 10f74d: 8d 76 00 lea 0x0(%esi),%esi 10f750: 83 ec 0c sub $0xc,%esp 10f753: ff 35 88 76 12 00 pushl 0x127688 10f759: e8 46 b5 ff ff call 10aca4 rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); 10f75e: 89 1c 24 mov %ebx,(%esp) 10f761: e8 ce 7e ff ff call 107634 rtems_set_errno_and_return_minus_one( EINVAL ); 10f766: e8 e9 36 00 00 call 112e54 <__errno> 10f76b: c7 00 16 00 00 00 movl $0x16,(%eax) 10f771: 83 c4 10 add $0x10,%esp 10f774: b8 ff ff ff ff mov $0xffffffff,%eax } rtems_libio_unlock(); return 0; } 10f779: 8d 65 f4 lea -0xc(%ebp),%esp 10f77c: 5b pop %ebx 10f77d: 5e pop %esi 10f77e: 5f pop %edi 10f77f: c9 leave 10f780: 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 ); 10f781: e8 ce 36 00 00 call 112e54 <__errno> 10f786: c7 00 0c 00 00 00 movl $0xc,(%eax) 10f78c: b8 ff ff ff ff mov $0xffffffff,%eax 10f791: eb b2 jmp 10f745 =============================================================================== 0010f794 : int rtems_filesystem_unregister( const char *type ) { 10f794: 55 push %ebp 10f795: 89 e5 mov %esp,%ebp 10f797: 56 push %esi 10f798: 53 push %ebx 10f799: 8b 75 08 mov 0x8(%ebp),%esi rtems_chain_node *node = NULL; if ( type == NULL ) { 10f79c: 85 f6 test %esi,%esi 10f79e: 0f 84 94 00 00 00 je 10f838 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 ); 10f7a4: 51 push %ecx 10f7a5: 6a 00 push $0x0 10f7a7: 6a 00 push $0x0 10f7a9: ff 35 88 76 12 00 pushl 0x127688 10f7af: e8 f4 b3 ff ff call 10aba8 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10f7b4: 8b 1d 1c 54 12 00 mov 0x12541c,%ebx if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 10f7ba: 83 c4 10 add $0x10,%esp 10f7bd: 81 fb 20 54 12 00 cmp $0x125420,%ebx 10f7c3: 75 0d jne 10f7d2 10f7c5: eb 49 jmp 10f810 10f7c7: 90 nop } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10f7c8: 8b 1b mov (%ebx),%ebx if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 10f7ca: 81 fb 20 54 12 00 cmp $0x125420,%ebx 10f7d0: 74 3e je 10f810 <== 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 ) { 10f7d2: 83 ec 08 sub $0x8,%esp 10f7d5: 56 push %esi 10f7d6: ff 73 08 pushl 0x8(%ebx) 10f7d9: e8 ee 42 00 00 call 113acc 10f7de: 83 c4 10 add $0x10,%esp 10f7e1: 85 c0 test %eax,%eax 10f7e3: 75 e3 jne 10f7c8 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10f7e5: 83 ec 0c sub $0xc,%esp 10f7e8: 53 push %ebx 10f7e9: e8 06 bd ff ff call 10b4f4 <_Chain_Extract> rtems_chain_extract( node ); free( fsn ); 10f7ee: 89 1c 24 mov %ebx,(%esp) 10f7f1: e8 3e 7e ff ff call 107634 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f7f6: 5a pop %edx 10f7f7: ff 35 88 76 12 00 pushl 0x127688 10f7fd: e8 a2 b4 ff ff call 10aca4 10f802: 83 c4 10 add $0x10,%esp rtems_libio_unlock(); return 0; 10f805: 31 c0 xor %eax,%eax } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10f807: 8d 65 f8 lea -0x8(%ebp),%esp 10f80a: 5b pop %ebx 10f80b: 5e pop %esi 10f80c: c9 leave 10f80d: c3 ret 10f80e: 66 90 xchg %ax,%ax 10f810: 83 ec 0c sub $0xc,%esp 10f813: ff 35 88 76 12 00 pushl 0x127688 10f819: e8 86 b4 ff ff call 10aca4 return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 10f81e: e8 31 36 00 00 call 112e54 <__errno> 10f823: c7 00 02 00 00 00 movl $0x2,(%eax) 10f829: 83 c4 10 add $0x10,%esp 10f82c: b8 ff ff ff ff mov $0xffffffff,%eax } 10f831: 8d 65 f8 lea -0x8(%ebp),%esp 10f834: 5b pop %ebx 10f835: 5e pop %esi 10f836: c9 leave 10f837: c3 ret ) { rtems_chain_node *node = NULL; if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); 10f838: e8 17 36 00 00 call 112e54 <__errno> 10f83d: c7 00 16 00 00 00 movl $0x16,(%eax) 10f843: 83 c8 ff or $0xffffffff,%eax 10f846: eb e9 jmp 10f831 =============================================================================== 00107efc : int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { 107efc: 55 push %ebp 107efd: 89 e5 mov %esp,%ebp 107eff: 56 push %esi 107f00: 53 push %ebx 107f01: 8b 75 0c mov 0xc(%ebp),%esi * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); 107f04: 83 ec 0c sub $0xc,%esp 107f07: 6a 08 push $0x8 107f09: e8 c6 03 00 00 call 1082d4 107f0e: 89 c3 mov %eax,%ebx *key = new_key; 107f10: 8b 45 08 mov 0x8(%ebp),%eax 107f13: 89 18 mov %ebx,(%eax) new_key->val = NULL; 107f15: c7 03 00 00 00 00 movl $0x0,(%ebx) new_key->dtor = dtor; 107f1b: 89 73 04 mov %esi,0x4(%ebx) "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); 107f1e: 83 c4 0c add $0xc,%esp 107f21: 56 push %esi 107f22: 53 push %ebx 107f23: 6a 00 push $0x0 107f25: e8 1e 3c 00 00 call 10bb48 if ( status == RTEMS_SUCCESSFUL ) 107f2a: 83 c4 10 add $0x10,%esp 107f2d: 85 c0 test %eax,%eax 107f2f: 75 0b jne 107f3c <== NEVER TAKEN return 0; 107f31: 31 c0 xor %eax,%eax free( new_key ); return -1; } 107f33: 8d 65 f8 lea -0x8(%ebp),%esp 107f36: 5b pop %ebx 107f37: 5e pop %esi 107f38: c9 leave 107f39: c3 ret 107f3a: 66 90 xchg %ax,%ax /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); if ( status == RTEMS_SUCCESSFUL ) return 0; free( new_key ); 107f3c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107f3f: 53 push %ebx <== NOT EXECUTED 107f40: e8 3f fe ff ff call 107d84 <== NOT EXECUTED return -1; 107f45: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107f48: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107f4d: eb e4 jmp 107f33 <== NOT EXECUTED =============================================================================== 00107f60 : int rtems_gxx_key_delete (__gthread_key_t key) { 107f60: 55 push %ebp 107f61: 89 e5 mov %esp,%ebp 107f63: 53 push %ebx 107f64: 83 ec 0c sub $0xc,%esp 107f67: 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 ); 107f6a: 53 push %ebx 107f6b: 6a 00 push $0x0 107f6d: e8 9a 3c 00 00 call 10bc0c if ( status == RTEMS_SUCCESSFUL ) { 107f72: 83 c4 10 add $0x10,%esp 107f75: 85 c0 test %eax,%eax 107f77: 75 11 jne 107f8a <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( *(void **)key ); 107f79: 85 db test %ebx,%ebx 107f7b: 74 0d je 107f8a <== NEVER TAKEN 107f7d: 83 ec 0c sub $0xc,%esp 107f80: ff 33 pushl (%ebx) 107f82: e8 fd fd ff ff call 107d84 107f87: 83 c4 10 add $0x10,%esp return 0; } key = NULL; return 0; } 107f8a: 31 c0 xor %eax,%eax 107f8c: 8b 5d fc mov -0x4(%ebp),%ebx 107f8f: c9 leave 107f90: c3 ret =============================================================================== 00107e80 : /* 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)) { 107e80: 55 push %ebp 107e81: 89 e5 mov %esp,%ebp 107e83: 56 push %esi 107e84: 53 push %ebx 107e85: 83 ec 10 sub $0x10,%esp 107e88: 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 ) { 107e8b: 8b 03 mov (%ebx),%eax 107e8d: 85 c0 test %eax,%eax 107e8f: 74 0b je 107e9c rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); if ( o == 0 ) (*func)(); } return 0; } 107e91: 31 c0 xor %eax,%eax 107e93: 8d 65 f8 lea -0x8(%ebp),%esp 107e96: 5b pop %ebx 107e97: 5e pop %esi 107e98: c9 leave 107e99: c3 ret 107e9a: 66 90 xchg %ax,%ax if ( *(volatile __gthread_once_t *)once == 0 ) { rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 107e9c: 51 push %ecx 107e9d: 8d 75 f4 lea -0xc(%ebp),%esi 107ea0: 56 push %esi 107ea1: 68 00 01 00 00 push $0x100 107ea6: 68 00 01 00 00 push $0x100 107eab: e8 c0 3a 00 00 call 10b970 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { 107eb0: 8b 03 mov (%ebx),%eax 107eb2: 83 c4 10 add $0x10,%esp 107eb5: 85 c0 test %eax,%eax 107eb7: 75 27 jne 107ee0 <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; 107eb9: c7 03 01 00 00 00 movl $0x1,(%ebx) } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 107ebf: 52 push %edx 107ec0: 56 push %esi 107ec1: 68 00 01 00 00 push $0x100 107ec6: ff 75 f4 pushl -0xc(%ebp) 107ec9: e8 a2 3a 00 00 call 10b970 if ( o == 0 ) (*func)(); 107ece: ff 55 0c call *0xc(%ebp) 107ed1: 83 c4 10 add $0x10,%esp } return 0; } 107ed4: 31 c0 xor %eax,%eax 107ed6: 8d 65 f8 lea -0x8(%ebp),%esp 107ed9: 5b pop %ebx 107eda: 5e pop %esi 107edb: c9 leave 107edc: c3 ret 107edd: 8d 76 00 lea 0x0(%esi),%esi 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); 107ee0: 50 push %eax <== NOT EXECUTED 107ee1: 56 push %esi <== NOT EXECUTED 107ee2: 68 00 01 00 00 push $0x100 <== NOT EXECUTED 107ee7: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 107eea: e8 81 3a 00 00 call 10b970 <== NOT EXECUTED 107eef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( o == 0 ) (*func)(); } return 0; } 107ef2: 31 c0 xor %eax,%eax <== NOT EXECUTED 107ef4: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 107ef7: 5b pop %ebx <== NOT EXECUTED 107ef8: 5e pop %esi <== NOT EXECUTED 107ef9: c9 leave <== NOT EXECUTED 107efa: c3 ret <== NOT EXECUTED =============================================================================== 00107ff0 : #endif return p; } int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { 107ff0: 55 push %ebp 107ff1: 89 e5 mov %esp,%ebp 107ff3: 53 push %ebx 107ff4: 83 ec 08 sub $0x8,%esp 107ff7: 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 ); 107ffa: ff 73 04 pushl 0x4(%ebx) 107ffd: 53 push %ebx 107ffe: 6a 00 push $0x0 108000: e8 43 3b 00 00 call 10bb48 if ( status == RTEMS_SUCCESSFUL ) { 108005: 83 c4 10 add $0x10,%esp 108008: 85 c0 test %eax,%eax 10800a: 75 0c jne 108018 <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; 10800c: 8b 45 0c mov 0xc(%ebp),%eax 10800f: 89 03 mov %eax,(%ebx) return 0; 108011: 31 c0 xor %eax,%eax } return -1; } 108013: 8b 5d fc mov -0x4(%ebp),%ebx 108016: c9 leave 108017: c3 ret if ( status == RTEMS_SUCCESSFUL ) { /* now let's set the proper value */ key->val = (void *)ptr; return 0; } return -1; 108018: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED } 10801d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108020: c9 leave <== NOT EXECUTED 108021: c3 ret <== NOT EXECUTED =============================================================================== 0010b240 : void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { 10b240: 55 push %ebp 10b241: 89 e5 mov %esp,%ebp 10b243: 83 ec 08 sub $0x8,%esp if ( 10b246: 83 3d a0 df 12 00 03 cmpl $0x3,0x12dfa0 10b24d: 74 21 je 10b270 <== ALWAYS TAKEN && !malloc_is_system_state_OK() ) { return NULL; } malloc_deferred_frees_process(); 10b24f: e8 b8 ef ff ff call 10a20c /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( 10b254: ff 75 10 pushl 0x10(%ebp) 10b257: ff 75 0c pushl 0xc(%ebp) 10b25a: ff 75 08 pushl 0x8(%ebp) 10b25d: ff 35 90 91 12 00 pushl 0x129190 10b263: e8 2c 4c 00 00 call 10fe94 <_Protected_heap_Allocate_aligned_with_boundary> 10b268: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap, size, alignment, boundary ); } 10b26b: c9 leave 10b26c: c3 ret 10b26d: 8d 76 00 lea 0x0(%esi),%esi uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() 10b270: e8 57 ef ff ff call 10a1cc 10b275: 84 c0 test %al,%al 10b277: 75 d6 jne 10b24f ) { return NULL; 10b279: 31 c0 xor %eax,%eax RTEMS_Malloc_Heap, size, alignment, boundary ); } 10b27b: c9 leave 10b27c: c3 ret =============================================================================== 00112a60 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112a60: 55 push %ebp 112a61: 89 e5 mov %esp,%ebp 112a63: 53 push %ebx 112a64: 83 ec 04 sub $0x4,%esp 112a67: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112a6a: 39 05 20 82 12 00 cmp %eax,0x128220 112a70: 76 1a jbe 112a8c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 112a72: 8d 14 40 lea (%eax,%eax,2),%edx 112a75: c1 e2 03 shl $0x3,%edx 112a78: 03 15 24 82 12 00 add 0x128224,%edx 112a7e: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112a81: 85 d2 test %edx,%edx 112a83: 74 13 je 112a98 } 112a85: 59 pop %ecx 112a86: 5b pop %ebx 112a87: 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; 112a88: ff e2 jmp *%edx 112a8a: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112a8c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112a91: 5a pop %edx 112a92: 5b pop %ebx 112a93: c9 leave 112a94: c3 ret 112a95: 8d 76 00 lea 0x0(%esi),%esi 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; 112a98: 31 c0 xor %eax,%eax } 112a9a: 5a pop %edx 112a9b: 5b pop %ebx 112a9c: c9 leave 112a9d: c3 ret =============================================================================== 00112aa0 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112aa0: 55 push %ebp 112aa1: 89 e5 mov %esp,%ebp 112aa3: 53 push %ebx 112aa4: 83 ec 04 sub $0x4,%esp 112aa7: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112aaa: 39 05 20 82 12 00 cmp %eax,0x128220 112ab0: 76 1a jbe 112acc return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 112ab2: 8d 14 40 lea (%eax,%eax,2),%edx 112ab5: c1 e2 03 shl $0x3,%edx 112ab8: 03 15 24 82 12 00 add 0x128224,%edx 112abe: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112ac1: 85 d2 test %edx,%edx 112ac3: 74 13 je 112ad8 } 112ac5: 59 pop %ecx 112ac6: 5b pop %ebx 112ac7: 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; 112ac8: ff e2 jmp *%edx 112aca: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112acc: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112ad1: 5a pop %edx 112ad2: 5b pop %ebx 112ad3: c9 leave 112ad4: c3 ret 112ad5: 8d 76 00 lea 0x0(%esi),%esi 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; 112ad8: 31 c0 xor %eax,%eax } 112ada: 5a pop %edx 112adb: 5b pop %ebx 112adc: c9 leave 112add: c3 ret =============================================================================== 001108a8 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1108a8: 55 push %ebp 1108a9: 89 e5 mov %esp,%ebp 1108ab: 53 push %ebx 1108ac: 83 ec 04 sub $0x4,%esp 1108af: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1108b2: 39 05 20 82 12 00 cmp %eax,0x128220 1108b8: 76 1a jbe 1108d4 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 1108ba: 8d 14 40 lea (%eax,%eax,2),%edx 1108bd: c1 e2 03 shl $0x3,%edx 1108c0: 03 15 24 82 12 00 add 0x128224,%edx 1108c6: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1108c8: 85 d2 test %edx,%edx 1108ca: 74 14 je 1108e0 } 1108cc: 59 pop %ecx 1108cd: 5b pop %ebx 1108ce: 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; 1108cf: ff e2 jmp *%edx 1108d1: 8d 76 00 lea 0x0(%esi),%esi ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1108d4: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1108d9: 5a pop %edx 1108da: 5b pop %ebx 1108db: c9 leave 1108dc: c3 ret 1108dd: 8d 76 00 lea 0x0(%esi),%esi 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; 1108e0: 31 c0 xor %eax,%eax } 1108e2: 5a pop %edx 1108e3: 5b pop %ebx 1108e4: c9 leave 1108e5: c3 ret =============================================================================== 001072e0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 1072e0: 55 push %ebp 1072e1: 89 e5 mov %esp,%ebp 1072e3: 57 push %edi 1072e4: 56 push %esi 1072e5: 53 push %ebx 1072e6: 83 ec 48 sub $0x48,%esp 1072e9: 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( 1072ec: b9 ff ff ff ff mov $0xffffffff,%ecx 1072f1: 89 f7 mov %esi,%edi 1072f3: 31 c0 xor %eax,%eax 1072f5: f2 ae repnz scas %es:(%edi),%al 1072f7: f7 d1 not %ecx 1072f9: 49 dec %ecx 1072fa: 6a 01 push $0x1 1072fc: 8d 5d d4 lea -0x2c(%ebp),%ebx 1072ff: 53 push %ebx 107300: 6a 00 push $0x0 107302: 51 push %ecx 107303: 56 push %esi 107304: e8 3f 02 00 00 call 107548 107309: 89 c7 mov %eax,%edi name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; 10730b: 8b 55 d4 mov -0x2c(%ebp),%edx 10730e: 89 55 c4 mov %edx,-0x3c(%ebp) node_type = (*loc.ops->node_type_h)( &loc ); 107311: 83 c4 14 add $0x14,%esp 107314: 53 push %ebx 107315: 8b 45 e0 mov -0x20(%ebp),%eax 107318: ff 50 10 call *0x10(%eax) if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 10731b: 83 c4 10 add $0x10,%esp 10731e: 85 ff test %edi,%edi 107320: 75 05 jne 107327 <== NEVER TAKEN 107322: 83 f8 02 cmp $0x2,%eax 107325: 74 19 je 107340 rtems_filesystem_freenode( &loc ); 107327: 83 ec 0c sub $0xc,%esp 10732a: 53 push %ebx 10732b: e8 f0 02 00 00 call 107620 return RTEMS_UNSATISFIED; 107330: 83 c4 10 add $0x10,%esp 107333: b8 0d 00 00 00 mov $0xd,%eax device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 107338: 8d 65 f4 lea -0xc(%ebp),%esp 10733b: 5b pop %ebx 10733c: 5e pop %esi 10733d: 5f pop %edi 10733e: c9 leave 10733f: c3 ret if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 107340: 8b 7d 0c mov 0xc(%ebp),%edi 107343: 89 37 mov %esi,(%edi) device_info->device_name_length = strlen( name ); 107345: b9 ff ff ff ff mov $0xffffffff,%ecx 10734a: 89 f7 mov %esi,%edi 10734c: 31 c0 xor %eax,%eax 10734e: f2 ae repnz scas %es:(%edi),%al 107350: f7 d1 not %ecx 107352: 49 dec %ecx 107353: 8b 45 0c mov 0xc(%ebp),%eax 107356: 89 48 04 mov %ecx,0x4(%eax) device_info->major = the_jnode->info.device.major; 107359: 8b 55 c4 mov -0x3c(%ebp),%edx 10735c: 8b 42 50 mov 0x50(%edx),%eax 10735f: 8b 7d 0c mov 0xc(%ebp),%edi 107362: 89 47 08 mov %eax,0x8(%edi) device_info->minor = the_jnode->info.device.minor; 107365: 8b 42 54 mov 0x54(%edx),%eax 107368: 89 47 0c mov %eax,0xc(%edi) rtems_filesystem_freenode( &loc ); 10736b: 83 ec 0c sub $0xc,%esp 10736e: 53 push %ebx 10736f: e8 ac 02 00 00 call 107620 return RTEMS_SUCCESSFUL; 107374: 83 c4 10 add $0x10,%esp 107377: 31 c0 xor %eax,%eax 107379: eb bd jmp 107338 =============================================================================== 00112ae0 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112ae0: 55 push %ebp 112ae1: 89 e5 mov %esp,%ebp 112ae3: 53 push %ebx 112ae4: 83 ec 04 sub $0x4,%esp 112ae7: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112aea: 39 05 20 82 12 00 cmp %eax,0x128220 112af0: 76 1a jbe 112b0c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 112af2: 8d 14 40 lea (%eax,%eax,2),%edx 112af5: c1 e2 03 shl $0x3,%edx 112af8: 03 15 24 82 12 00 add 0x128224,%edx 112afe: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b01: 85 d2 test %edx,%edx 112b03: 74 13 je 112b18 } 112b05: 59 pop %ecx 112b06: 5b pop %ebx 112b07: 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; 112b08: ff e2 jmp *%edx 112b0a: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112b0c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112b11: 5a pop %edx 112b12: 5b pop %ebx 112b13: c9 leave 112b14: c3 ret 112b15: 8d 76 00 lea 0x0(%esi),%esi 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; 112b18: 31 c0 xor %eax,%eax } 112b1a: 5a pop %edx 112b1b: 5b pop %ebx 112b1c: c9 leave 112b1d: c3 ret =============================================================================== 00112b20 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112b20: 55 push %ebp 112b21: 89 e5 mov %esp,%ebp 112b23: 53 push %ebx 112b24: 83 ec 04 sub $0x4,%esp 112b27: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b2a: 39 05 20 82 12 00 cmp %eax,0x128220 112b30: 76 1a jbe 112b4c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 112b32: 8d 14 40 lea (%eax,%eax,2),%edx 112b35: c1 e2 03 shl $0x3,%edx 112b38: 03 15 24 82 12 00 add 0x128224,%edx 112b3e: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b41: 85 d2 test %edx,%edx 112b43: 74 13 je 112b58 } 112b45: 59 pop %ecx 112b46: 5b pop %ebx 112b47: 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; 112b48: ff e2 jmp *%edx 112b4a: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112b4c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112b51: 5a pop %edx 112b52: 5b pop %ebx 112b53: c9 leave 112b54: c3 ret 112b55: 8d 76 00 lea 0x0(%esi),%esi 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; 112b58: 31 c0 xor %eax,%eax } 112b5a: 5a pop %edx 112b5b: 5b pop %ebx 112b5c: c9 leave 112b5d: c3 ret =============================================================================== 0010c3b8 : 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 ) { 10c3b8: 55 push %ebp 10c3b9: 89 e5 mov %esp,%ebp 10c3bb: 57 push %edi 10c3bc: 56 push %esi 10c3bd: 53 push %ebx 10c3be: 83 ec 0c sub $0xc,%esp 10c3c1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c3c4: 8b 75 0c mov 0xc(%ebp),%esi 10c3c7: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10c3ca: a1 c0 af 12 00 mov 0x12afc0,%eax if ( rtems_interrupt_is_in_progress() ) 10c3cf: 8b 0d 34 ab 12 00 mov 0x12ab34,%ecx 10c3d5: 85 c9 test %ecx,%ecx 10c3d7: 0f 85 ab 00 00 00 jne 10c488 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10c3dd: 85 d2 test %edx,%edx 10c3df: 0f 84 e7 00 00 00 je 10c4cc return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10c3e5: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10c3e7: 85 f6 test %esi,%esi 10c3e9: 0f 84 dd 00 00 00 je 10c4cc static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10c3ef: 8b 3e mov (%esi),%edi 10c3f1: 85 ff test %edi,%edi 10c3f3: 0f 84 c7 00 00 00 je 10c4c0 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10c3f9: 39 d8 cmp %ebx,%eax 10c3fb: 76 7b jbe 10c478 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c3fd: a1 8c a5 12 00 mov 0x12a58c,%eax 10c402: 40 inc %eax 10c403: a3 8c a5 12 00 mov %eax,0x12a58c return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10c408: 85 db test %ebx,%ebx 10c40a: 0f 85 88 00 00 00 jne 10c498 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10c410: 8b 0d c0 af 12 00 mov 0x12afc0,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10c416: 85 c9 test %ecx,%ecx 10c418: 0f 84 bb 00 00 00 je 10c4d9 <== NEVER TAKEN 10c41e: 8b 3d c4 af 12 00 mov 0x12afc4,%edi 10c424: 89 f8 mov %edi,%eax 10c426: eb 08 jmp 10c430 10c428: 43 inc %ebx 10c429: 83 c0 18 add $0x18,%eax 10c42c: 39 d9 cmp %ebx,%ecx 10c42e: 76 0b jbe 10c43b static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10c430: 83 38 00 cmpl $0x0,(%eax) 10c433: 75 f3 jne 10c428 10c435: 83 78 04 00 cmpl $0x0,0x4(%eax) 10c439: 75 ed jne 10c428 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10c43b: 89 1a mov %ebx,(%edx) if ( m != n ) 10c43d: 39 d9 cmp %ebx,%ecx 10c43f: 0f 84 9b 00 00 00 je 10c4e0 10c445: 8d 04 5b lea (%ebx,%ebx,2),%eax 10c448: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10c44b: 01 c7 add %eax,%edi 10c44d: b9 06 00 00 00 mov $0x6,%ecx 10c452: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10c454: e8 cb 1b 00 00 call 10e024 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10c459: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10c460: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10c467: 89 5d 08 mov %ebx,0x8(%ebp) } 10c46a: 83 c4 0c add $0xc,%esp 10c46d: 5b pop %ebx 10c46e: 5e pop %esi 10c46f: 5f pop %edi 10c470: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10c471: e9 5e 81 00 00 jmp 1145d4 10c476: 66 90 xchg %ax,%ax if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 10c478: 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 ); } 10c47d: 83 c4 0c add $0xc,%esp 10c480: 5b pop %ebx 10c481: 5e pop %esi 10c482: 5f pop %edi 10c483: c9 leave 10c484: c3 ret 10c485: 8d 76 00 lea 0x0(%esi),%esi ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10c488: 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 ); } 10c48d: 83 c4 0c add $0xc,%esp 10c490: 5b pop %ebx 10c491: 5e pop %esi 10c492: 5f pop %edi 10c493: c9 leave 10c494: c3 ret 10c495: 8d 76 00 lea 0x0(%esi),%esi _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10c498: 8d 04 5b lea (%ebx,%ebx,2),%eax 10c49b: c1 e0 03 shl $0x3,%eax 10c49e: 8b 0d c4 af 12 00 mov 0x12afc4,%ecx 10c4a4: 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; 10c4a6: 8b 39 mov (%ecx),%edi 10c4a8: 85 ff test %edi,%edi 10c4aa: 74 40 je 10c4ec 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(); 10c4ac: e8 73 1b 00 00 call 10e024 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10c4b1: 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 ); } 10c4b6: 83 c4 0c add $0xc,%esp 10c4b9: 5b pop %ebx 10c4ba: 5e pop %esi 10c4bb: 5f pop %edi 10c4bc: c9 leave 10c4bd: c3 ret 10c4be: 66 90 xchg %ax,%ax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10c4c0: 8b 4e 04 mov 0x4(%esi),%ecx 10c4c3: 85 c9 test %ecx,%ecx 10c4c5: 0f 85 2e ff ff ff jne 10c3f9 10c4cb: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10c4cc: 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 ); } 10c4d1: 83 c4 0c add $0xc,%esp 10c4d4: 5b pop %ebx 10c4d5: 5e pop %esi 10c4d6: 5f pop %edi 10c4d7: c9 leave 10c4d8: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10c4d9: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10c4df: 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(); 10c4e0: e8 3f 1b 00 00 call 10e024 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10c4e5: 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; 10c4ea: eb 91 jmp 10c47d static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10c4ec: 8b 49 04 mov 0x4(%ecx),%ecx 10c4ef: 85 c9 test %ecx,%ecx 10c4f1: 75 b9 jne 10c4ac if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10c4f3: 89 1a mov %ebx,(%edx) 10c4f5: 8b 3d c4 af 12 00 mov 0x12afc4,%edi 10c4fb: e9 4b ff ff ff jmp 10c44b =============================================================================== 0010c500 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10c500: 55 push %ebp 10c501: 89 e5 mov %esp,%ebp 10c503: 57 push %edi 10c504: 83 ec 04 sub $0x4,%esp 10c507: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10c50a: 8b 0d 34 ab 12 00 mov 0x12ab34,%ecx 10c510: 85 c9 test %ecx,%ecx 10c512: 75 44 jne 10c558 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10c514: 39 05 c0 af 12 00 cmp %eax,0x12afc0 10c51a: 77 0c ja 10c528 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10c51c: b8 0d 00 00 00 mov $0xd,%eax } 10c521: 5a pop %edx 10c522: 5f pop %edi 10c523: c9 leave 10c524: c3 ret 10c525: 8d 76 00 lea 0x0(%esi),%esi 10c528: 8b 15 8c a5 12 00 mov 0x12a58c,%edx 10c52e: 42 inc %edx 10c52f: 89 15 8c a5 12 00 mov %edx,0x12a58c return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10c535: 8d 14 40 lea (%eax,%eax,2),%edx 10c538: 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( 10c53b: 03 15 c4 af 12 00 add 0x12afc4,%edx 10c541: b9 18 00 00 00 mov $0x18,%ecx 10c546: 31 c0 xor %eax,%eax 10c548: 89 d7 mov %edx,%edi 10c54a: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10c54c: e8 d3 1a 00 00 call 10e024 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c551: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10c553: 5a pop %edx 10c554: 5f pop %edi 10c555: c9 leave 10c556: c3 ret 10c557: 90 nop rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10c558: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10c55d: 5a pop %edx 10c55e: 5f pop %edi 10c55f: c9 leave 10c560: c3 ret =============================================================================== 00112b60 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112b60: 55 push %ebp 112b61: 89 e5 mov %esp,%ebp 112b63: 53 push %ebx 112b64: 83 ec 04 sub $0x4,%esp 112b67: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b6a: 39 05 20 82 12 00 cmp %eax,0x128220 112b70: 76 1a jbe 112b8c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 112b72: 8d 14 40 lea (%eax,%eax,2),%edx 112b75: c1 e2 03 shl $0x3,%edx 112b78: 03 15 24 82 12 00 add 0x128224,%edx 112b7e: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b81: 85 d2 test %edx,%edx 112b83: 74 13 je 112b98 } 112b85: 59 pop %ecx 112b86: 5b pop %ebx 112b87: 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; 112b88: ff e2 jmp *%edx 112b8a: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112b8c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112b91: 5a pop %edx 112b92: 5b pop %ebx 112b93: c9 leave 112b94: c3 ret 112b95: 8d 76 00 lea 0x0(%esi),%esi 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; 112b98: 31 c0 xor %eax,%eax } 112b9a: 5a pop %edx 112b9b: 5b pop %ebx 112b9c: c9 leave 112b9d: c3 ret =============================================================================== 0010d39c : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10d39c: 55 push %ebp 10d39d: 89 e5 mov %esp,%ebp 10d39f: 57 push %edi 10d3a0: 56 push %esi 10d3a1: 53 push %ebx 10d3a2: 83 ec 1c sub $0x1c,%esp 10d3a5: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10d3a8: 85 ff test %edi,%edi 10d3aa: 74 49 je 10d3f5 <== NEVER TAKEN 10d3ac: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10d3b3: 8b 55 e4 mov -0x1c(%ebp),%edx 10d3b6: 8b 04 95 44 b3 12 00 mov 0x12b344(,%edx,4),%eax 10d3bd: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10d3c0: 85 f6 test %esi,%esi 10d3c2: 74 28 je 10d3ec continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10d3c4: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10d3c9: 74 21 je 10d3ec 10d3cb: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10d3d0: 8b 46 1c mov 0x1c(%esi),%eax 10d3d3: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10d3d6: 85 c0 test %eax,%eax 10d3d8: 74 09 je 10d3e3 <== NEVER TAKEN continue; (*routine)(the_thread); 10d3da: 83 ec 0c sub $0xc,%esp 10d3dd: 50 push %eax 10d3de: ff d7 call *%edi 10d3e0: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10d3e3: 43 inc %ebx 10d3e4: 0f b7 46 10 movzwl 0x10(%esi),%eax 10d3e8: 39 d8 cmp %ebx,%eax 10d3ea: 73 e4 jae 10d3d0 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10d3ec: ff 45 e4 incl -0x1c(%ebp) 10d3ef: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10d3f3: 75 be jne 10d3b3 (*routine)(the_thread); } } } 10d3f5: 8d 65 f4 lea -0xc(%ebp),%esp 10d3f8: 5b pop %ebx 10d3f9: 5e pop %esi 10d3fa: 5f pop %edi 10d3fb: c9 leave 10d3fc: c3 ret =============================================================================== 0010f48c : */ void rtems_libio_free( rtems_libio_t *iop ) { 10f48c: 55 push %ebp 10f48d: 89 e5 mov %esp,%ebp 10f48f: 53 push %ebx 10f490: 83 ec 08 sub $0x8,%esp 10f493: 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 ); 10f496: 6a 00 push $0x0 10f498: 6a 00 push $0x0 10f49a: ff 35 88 76 12 00 pushl 0x127688 10f4a0: e8 03 b7 ff ff call 10aba8 rtems_libio_lock(); if (iop->sem) 10f4a5: 8b 43 2c mov 0x2c(%ebx),%eax 10f4a8: 83 c4 10 add $0x10,%esp 10f4ab: 85 c0 test %eax,%eax 10f4ad: 74 0c je 10f4bb <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 10f4af: 83 ec 0c sub $0xc,%esp 10f4b2: 50 push %eax 10f4b3: e8 4c b6 ff ff call 10ab04 10f4b8: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10f4bb: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10f4c2: a1 84 76 12 00 mov 0x127684,%eax 10f4c7: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10f4ca: 89 1d 84 76 12 00 mov %ebx,0x127684 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f4d0: a1 88 76 12 00 mov 0x127688,%eax 10f4d5: 89 45 08 mov %eax,0x8(%ebp) rtems_libio_unlock(); } 10f4d8: 8b 5d fc mov -0x4(%ebp),%ebx 10f4db: c9 leave 10f4dc: e9 c3 b7 ff ff jmp 10aca4 =============================================================================== 00107730 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 107730: 55 push %ebp 107731: 89 e5 mov %esp,%ebp 107733: 53 push %ebx 107734: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 107737: 8b 1d 4c 34 12 00 mov 0x12344c,%ebx 10773d: 85 db test %ebx,%ebx 10773f: 74 50 je 107791 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 107741: 83 ec 08 sub $0x8,%esp 107744: 6a 38 push $0x38 107746: 53 push %ebx 107747: e8 58 fd ff ff call 1074a4 10774c: 89 c2 mov %eax,%edx 10774e: a3 80 76 12 00 mov %eax,0x127680 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 107753: 83 c4 10 add $0x10,%esp 107756: 85 c0 test %eax,%eax 107758: 74 74 je 1077ce rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 10775a: a3 84 76 12 00 mov %eax,0x127684 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 10775f: 83 fb 01 cmp $0x1,%ebx 107762: 76 26 jbe 10778a <== NEVER TAKEN * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 107764: 8d 50 38 lea 0x38(%eax),%edx 107767: 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; 10776c: 89 52 fc mov %edx,-0x4(%edx) 10776f: 41 inc %ecx 107770: 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++) 107773: 39 d9 cmp %ebx,%ecx 107775: 75 f5 jne 10776c * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 107777: 8d 0c cd f8 ff ff ff lea -0x8(,%ecx,8),%ecx 10777e: 8d 14 cd 00 00 00 00 lea 0x0(,%ecx,8),%edx 107785: 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++) 107787: 8d 14 10 lea (%eax,%edx,1),%edx iop->data1 = iop + 1; iop->data1 = NULL; 10778a: 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( 107791: 83 ec 0c sub $0xc,%esp 107794: 68 88 76 12 00 push $0x127688 107799: 6a 00 push $0x0 10779b: 6a 54 push $0x54 10779d: 6a 01 push $0x1 10779f: 68 4f 49 42 4c push $0x4c42494f 1077a4: e8 83 31 00 00 call 10a92c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1077a9: 83 c4 20 add $0x20,%esp 1077ac: 85 c0 test %eax,%eax 1077ae: 75 15 jne 1077c5 <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 1077b0: a1 48 34 12 00 mov 0x123448,%eax 1077b5: 85 c0 test %eax,%eax 1077b7: 74 07 je 1077c0 <== NEVER TAKEN (* rtems_fs_init_helper)(); } 1077b9: 8b 5d fc mov -0x4(%ebp),%ebx 1077bc: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 1077bd: ff e0 jmp *%eax 1077bf: 90 nop } 1077c0: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1077c3: c9 leave <== NOT EXECUTED 1077c4: 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 ); 1077c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1077c8: 50 push %eax <== NOT EXECUTED 1077c9: e8 1e 3a 00 00 call 10b1ec <== 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); 1077ce: 83 ec 0c sub $0xc,%esp 1077d1: 6a 1a push $0x1a 1077d3: e8 14 3a 00 00 call 10b1ec =============================================================================== 0010f548 : */ int rtems_libio_is_file_open( void *node_access ) { 10f548: 55 push %ebp 10f549: 89 e5 mov %esp,%ebp 10f54b: 53 push %ebx 10f54c: 83 ec 08 sub $0x8,%esp 10f54f: 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 ); 10f552: 6a 00 push $0x0 10f554: 6a 00 push $0x0 10f556: ff 35 88 76 12 00 pushl 0x127688 10f55c: e8 47 b6 ff ff call 10aba8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10f561: a1 80 76 12 00 mov 0x127680,%eax 10f566: 8b 0d 4c 34 12 00 mov 0x12344c,%ecx 10f56c: 83 c4 10 add $0x10,%esp 10f56f: 85 c9 test %ecx,%ecx 10f571: 74 18 je 10f58b <== NEVER TAKEN 10f573: 31 d2 xor %edx,%edx 10f575: eb 04 jmp 10f57b 10f577: 90 nop 10f578: 83 c0 38 add $0x38,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10f57b: f6 40 15 01 testb $0x1,0x15(%eax) 10f57f: 74 05 je 10f586 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 10f581: 39 58 18 cmp %ebx,0x18(%eax) 10f584: 74 1e je 10f5a4 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10f586: 42 inc %edx 10f587: 39 ca cmp %ecx,%edx 10f589: 72 ed jb 10f578 int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; 10f58b: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f58d: 83 ec 0c sub $0xc,%esp 10f590: ff 35 88 76 12 00 pushl 0x127688 10f596: e8 09 b7 ff ff call 10aca4 } rtems_libio_unlock(); return result; } 10f59b: 89 d8 mov %ebx,%eax 10f59d: 8b 5d fc mov -0x4(%ebp),%ebx 10f5a0: c9 leave 10f5a1: c3 ret 10f5a2: 66 90 xchg %ax,%ax * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { result = 1; 10f5a4: bb 01 00 00 00 mov $0x1,%ebx 10f5a9: eb e2 jmp 10f58d =============================================================================== 0010f4e4 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 10f4e4: 55 push %ebp 10f4e5: 89 e5 mov %esp,%ebp 10f4e7: 53 push %ebx 10f4e8: 83 ec 08 sub $0x8,%esp 10f4eb: 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 ); 10f4ee: 6a 00 push $0x0 10f4f0: 6a 00 push $0x0 10f4f2: ff 35 88 76 12 00 pushl 0x127688 10f4f8: e8 ab b6 ff ff call 10aba8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10f4fd: a1 80 76 12 00 mov 0x127680,%eax 10f502: 8b 0d 4c 34 12 00 mov 0x12344c,%ecx 10f508: 83 c4 10 add $0x10,%esp 10f50b: 85 c9 test %ecx,%ecx 10f50d: 74 18 je 10f527 <== NEVER TAKEN 10f50f: 31 d2 xor %edx,%edx 10f511: eb 04 jmp 10f517 10f513: 90 nop 10f514: 83 c0 38 add $0x38,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10f517: f6 40 15 01 testb $0x1,0x15(%eax) 10f51b: 74 05 je 10f522 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 10f51d: 39 58 28 cmp %ebx,0x28(%eax) 10f520: 74 1e je 10f540 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10f522: 42 inc %edx 10f523: 39 ca cmp %ecx,%edx 10f525: 72 ed jb 10f514 int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { rtems_libio_t *iop; int result = 0; 10f527: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f529: 83 ec 0c sub $0xc,%esp 10f52c: ff 35 88 76 12 00 pushl 0x127688 10f532: e8 6d b7 ff ff call 10aca4 } rtems_libio_unlock(); return result; } 10f537: 89 d8 mov %ebx,%eax 10f539: 8b 5d fc mov -0x4(%ebp),%ebx 10f53c: c9 leave 10f53d: c3 ret 10f53e: 66 90 xchg %ax,%ax * 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; 10f540: bb 01 00 00 00 mov $0x1,%ebx 10f545: eb e2 jmp 10f529 =============================================================================== 00108b38 : rtems_status_code rtems_libio_set_private_env(void) { 108b38: 55 push %ebp 108b39: 89 e5 mov %esp,%ebp 108b3b: 57 push %edi 108b3c: 56 push %esi 108b3d: 53 push %ebx 108b3e: 83 ec 5c sub $0x5c,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_id task_id = rtems_task_self(); 108b41: e8 5e 2d 00 00 call 10b8a4 108b46: 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); 108b49: 83 ec 0c sub $0xc,%esp 108b4c: 6a 00 push $0x0 108b4e: 8d 5d d4 lea -0x2c(%ebp),%ebx 108b51: 53 push %ebx 108b52: 6a 00 push $0x0 108b54: 6a 01 push $0x1 108b56: 68 87 16 12 00 push $0x121687 108b5b: e8 28 ee ff ff call 107988 if (rv != 0) 108b60: 83 c4 20 add $0x20,%esp 108b63: 85 c0 test %eax,%eax 108b65: 74 0d je 108b74 <== ALWAYS TAKEN error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; 108b67: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED } 108b6c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108b6f: 5b pop %ebx <== NOT EXECUTED 108b70: 5e pop %esi <== NOT EXECUTED 108b71: 5f pop %edi <== NOT EXECUTED 108b72: c9 leave <== NOT EXECUTED 108b73: 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); 108b74: 83 ec 0c sub $0xc,%esp 108b77: 6a 00 push $0x0 108b79: 8d 45 c0 lea -0x40(%ebp),%eax 108b7c: 89 45 a4 mov %eax,-0x5c(%ebp) 108b7f: 50 push %eax 108b80: 6a 00 push $0x0 108b82: 6a 01 push $0x1 108b84: 68 87 16 12 00 push $0x121687 108b89: e8 fa ed ff ff call 107988 if (rv != 0) 108b8e: 83 c4 20 add $0x20,%esp 108b91: 85 c0 test %eax,%eax 108b93: 0f 85 9a 00 00 00 jne 108c33 <== 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 108b99: 8b 15 b0 5c 12 00 mov 0x125cb0,%edx /* * Bharath: I'm not sure if the check can be reduced to * if( rtems_current_user_env->task_id != task_id ) { */ if ( 108b9f: 81 fa 80 7f 12 00 cmp $0x127f80,%edx 108ba5: 74 07 je 108bae rtems_current_user_env == &rtems_global_user_env || rtems_current_user_env->task_id != task_id 108ba7: 8b 45 b4 mov -0x4c(%ebp),%eax 108baa: 39 02 cmp %eax,(%edx) 108bac: 74 3a je 108be8 ) { new_env = malloc(sizeof(rtems_user_env_t)); 108bae: 83 ec 0c sub $0xc,%esp 108bb1: 6a 48 push $0x48 108bb3: e8 ec f3 ff ff call 107fa4 108bb8: 89 c2 mov %eax,%edx 108bba: 89 c6 mov %eax,%esi if (new_env == NULL) 108bbc: 83 c4 10 add $0x10,%esp 108bbf: 85 c0 test %eax,%eax 108bc1: 74 61 je 108c24 #ifdef HAVE_USERENV_REFCNT new_env->refcnt = 1; #endif sc = rtems_task_variable_add( 108bc3: 50 push %eax 108bc4: 68 f8 8a 10 00 push $0x108af8 108bc9: 68 b0 5c 12 00 push $0x125cb0 108bce: 6a 00 push $0x0 108bd0: 89 55 b0 mov %edx,-0x50(%ebp) 108bd3: e8 50 2d 00 00 call 10b928 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) 108bd8: 83 c4 10 add $0x10,%esp 108bdb: 85 c0 test %eax,%eax 108bdd: 8b 55 b0 mov -0x50(%ebp),%edx 108be0: 75 36 jne 108c18 goto error_3; rtems_current_user_env = new_env; 108be2: 89 15 b0 5c 12 00 mov %edx,0x125cb0 } /* Inherit the global values */ *rtems_current_user_env = rtems_global_user_env; 108be8: be 80 7f 12 00 mov $0x127f80,%esi 108bed: b9 12 00 00 00 mov $0x12,%ecx 108bf2: 89 d7 mov %edx,%edi 108bf4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id = task_id; 108bf6: 8b 75 b4 mov -0x4c(%ebp),%esi 108bf9: 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; 108bfb: 8d 7a 18 lea 0x18(%edx),%edi 108bfe: b1 05 mov $0x5,%cl 108c00: 89 de mov %ebx,%esi 108c02: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_current = current_loc; 108c04: 8d 7a 04 lea 0x4(%edx),%edi 108c07: b1 05 mov $0x5,%cl 108c09: 8b 75 a4 mov -0x5c(%ebp),%esi 108c0c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return RTEMS_SUCCESSFUL; 108c0e: 31 c0 xor %eax,%eax error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } 108c10: 8d 65 f4 lea -0xc(%ebp),%esp 108c13: 5b pop %ebx 108c14: 5e pop %esi 108c15: 5f pop %edi 108c16: c9 leave 108c17: c3 ret rtems_filesystem_current = current_loc; return RTEMS_SUCCESSFUL; error_3: free(new_env); 108c18: 83 ec 0c sub $0xc,%esp 108c1b: 56 push %esi 108c1c: e8 53 ee ff ff call 107a74 108c21: 83 c4 10 add $0x10,%esp error_2: rtems_filesystem_freenode(¤t_loc); 108c24: 83 ec 0c sub $0xc,%esp 108c27: 8d 45 c0 lea -0x40(%ebp),%eax 108c2a: 50 push %eax 108c2b: e8 30 ee ff ff call 107a60 108c30: 83 c4 10 add $0x10,%esp error_1: rtems_filesystem_freenode(&root_loc); 108c33: 83 ec 0c sub $0xc,%esp 108c36: 53 push %ebx 108c37: e8 24 ee ff ff call 107a60 108c3c: 83 c4 10 add $0x10,%esp error_0: return RTEMS_NO_MEMORY; 108c3f: b8 1a 00 00 00 mov $0x1a,%eax } 108c44: 8d 65 f4 lea -0xc(%ebp),%esp 108c47: 5b pop %ebx 108c48: 5e pop %esi 108c49: 5f pop %edi 108c4a: c9 leave 108c4b: c3 ret =============================================================================== 00108c4c : * 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) { 108c4c: 55 push %ebp 108c4d: 89 e5 mov %esp,%ebp 108c4f: 56 push %esi 108c50: 53 push %ebx 108c51: 83 ec 20 sub $0x20,%esp 108c54: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_id current_task_id; /* * get current task id */ current_task_id = rtems_task_self(); 108c57: e8 48 2c 00 00 call 10b8a4 108c5c: 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 ) 108c5e: 39 c3 cmp %eax,%ebx 108c60: 74 32 je 108c94 <== NEVER TAKEN return RTEMS_SUCCESSFUL; /* * Try to get the requested user environment */ sc = rtems_task_variable_get( 108c62: 52 push %edx task_id, (void*)&rtems_current_user_env, (void*)&shared_user_env ); 108c63: 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( 108c66: 50 push %eax 108c67: 68 b0 5c 12 00 push $0x125cb0 108c6c: 53 push %ebx 108c6d: e8 7a 2d 00 00 call 10b9ec (void*)&shared_user_env ); /* * If it was not successful, return the error code */ if (sc != RTEMS_SUCCESSFUL) 108c72: 83 c4 10 add $0x10,%esp 108c75: 85 c0 test %eax,%eax 108c77: 75 13 jne 108c8c * 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) { 108c79: 8b 15 b0 5c 12 00 mov 0x125cb0,%edx 108c7f: 39 32 cmp %esi,(%edx) 108c81: 74 1d je 108ca0 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; 108c83: 8b 55 f4 mov -0xc(%ebp),%edx 108c86: 89 15 b0 5c 12 00 mov %edx,0x125cb0 #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; } 108c8c: 8d 65 f8 lea -0x8(%ebp),%esp 108c8f: 5b pop %ebx 108c90: 5e pop %esi 108c91: c9 leave 108c92: c3 ret 108c93: 90 nop * 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; 108c94: 31 c0 xor %eax,%eax #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; } 108c96: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108c99: 5b pop %ebx <== NOT EXECUTED 108c9a: 5e pop %esi <== NOT EXECUTED 108c9b: c9 leave <== NOT EXECUTED 108c9c: c3 ret <== NOT EXECUTED 108c9d: 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 ); 108ca0: 83 ec 0c sub $0xc,%esp 108ca3: 52 push %edx 108ca4: 89 45 e4 mov %eax,-0x1c(%ebp) 108ca7: e8 4c fe ff ff call 108af8 108cac: 83 c4 10 add $0x10,%esp 108caf: 8b 45 e4 mov -0x1c(%ebp),%eax 108cb2: eb cf jmp 108c83 =============================================================================== 0010f3a4 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10f3a4: 55 push %ebp 10f3a5: 89 e5 mov %esp,%ebp 10f3a7: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10f3aa: 89 d0 mov %edx,%eax 10f3ac: 83 e0 06 and $0x6,%eax 10f3af: 83 f8 06 cmp $0x6,%eax 10f3b2: 74 2c je 10f3e0 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10f3b4: f6 c2 02 test $0x2,%dl 10f3b7: 75 23 jne 10f3dc <== ALWAYS TAKEN ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 10f3b9: 31 c0 xor %eax,%eax 10f3bb: f6 c2 04 test $0x4,%dl <== NOT EXECUTED 10f3be: 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 ) { 10f3c1: f6 c2 01 test $0x1,%dl 10f3c4: 74 03 je 10f3c9 fcntl_flags |= O_NONBLOCK; 10f3c6: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10f3c9: f6 c6 02 test $0x2,%dh 10f3cc: 74 03 je 10f3d1 fcntl_flags |= O_APPEND; 10f3ce: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10f3d1: 80 e6 04 and $0x4,%dh 10f3d4: 74 03 je 10f3d9 fcntl_flags |= O_CREAT; 10f3d6: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10f3d9: c9 leave 10f3da: c3 ret 10f3db: 90 nop 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; 10f3dc: 31 c0 xor %eax,%eax 10f3de: eb e1 jmp 10f3c1 ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 10f3e0: b8 02 00 00 00 mov $0x2,%eax 10f3e5: eb da jmp 10f3c1 =============================================================================== 0010a4f0 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 10a4f0: 55 push %ebp 10a4f1: 89 e5 mov %esp,%ebp 10a4f3: 83 ec 1c sub $0x1c,%esp uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 10a4f6: 8d 45 f4 lea -0xc(%ebp),%eax 10a4f9: 50 push %eax 10a4fa: ff 75 08 pushl 0x8(%ebp) 10a4fd: ff 35 90 91 12 00 pushl 0x129190 10a503: e8 34 5a 00 00 call 10ff3c <_Protected_heap_Get_block_size> 10a508: 83 c4 10 add $0x10,%esp 10a50b: 84 c0 test %al,%al 10a50d: 74 11 je 10a520 <== NEVER TAKEN MSBUMP(lifetime_freed, size); 10a50f: 8b 45 f4 mov -0xc(%ebp),%eax 10a512: 31 d2 xor %edx,%edx 10a514: 01 05 e4 dc 12 00 add %eax,0x12dce4 10a51a: 11 15 e8 dc 12 00 adc %edx,0x12dce8 } } 10a520: c9 leave 10a521: c3 ret =============================================================================== 0010a524 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 10a524: 55 push %ebp 10a525: 89 e5 mov %esp,%ebp 10a527: 83 ec 18 sub $0x18,%esp 10a52a: 8b 45 08 mov 0x8(%ebp),%eax uintptr_t actual_size = 0; 10a52d: 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 ) 10a534: 85 c0 test %eax,%eax 10a536: 74 43 je 10a57b <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 10a538: 52 push %edx 10a539: 8d 55 f4 lea -0xc(%ebp),%edx 10a53c: 52 push %edx 10a53d: 50 push %eax 10a53e: ff 35 90 91 12 00 pushl 0x129190 10a544: e8 f3 59 00 00 call 10ff3c <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); 10a549: 8b 45 f4 mov -0xc(%ebp),%eax 10a54c: 31 d2 xor %edx,%edx 10a54e: 03 05 dc dc 12 00 add 0x12dcdc,%eax 10a554: 13 15 e0 dc 12 00 adc 0x12dce0,%edx 10a55a: a3 dc dc 12 00 mov %eax,0x12dcdc 10a55f: 89 15 e0 dc 12 00 mov %edx,0x12dce0 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 10a565: 2b 05 e4 dc 12 00 sub 0x12dce4,%eax if (current_depth > s->max_depth) 10a56b: 83 c4 10 add $0x10,%esp 10a56e: 3b 05 d8 dc 12 00 cmp 0x12dcd8,%eax 10a574: 76 05 jbe 10a57b s->max_depth = current_depth; 10a576: a3 d8 dc 12 00 mov %eax,0x12dcd8 } 10a57b: c9 leave 10a57c: c3 ret =============================================================================== 00113328 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 113328: 55 push %ebp 113329: 89 e5 mov %esp,%ebp 11332b: 53 push %ebx 11332c: 83 ec 14 sub $0x14,%esp 11332f: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 113332: 85 db test %ebx,%ebx 113334: 74 5b je 113391 return EINVAL; *pointer = NULL; 113336: 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()) && 11333c: 83 3d 20 a7 12 00 03 cmpl $0x3,0x12a720 113343: 74 43 je 113388 <== ALWAYS TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 113345: e8 96 53 ff ff call 1086e0 Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return 11334a: 6a 00 push $0x0 11334c: ff 75 0c pushl 0xc(%ebp) 11334f: ff 75 10 pushl 0x10(%ebp) 113352: ff 35 90 61 12 00 pushl 0x126190 113358: e8 83 a3 ff ff call 10d6e0 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 11335d: 83 c4 10 add $0x10,%esp 113360: 85 c0 test %eax,%eax 113362: 74 38 je 11339c return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 113364: 8b 15 88 87 12 00 mov 0x128788,%edx 11336a: 85 d2 test %edx,%edx 11336c: 74 10 je 11337e (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 11336e: 83 ec 0c sub $0xc,%esp 113371: 53 push %ebx 113372: 89 45 f4 mov %eax,-0xc(%ebp) 113375: ff 52 04 call *0x4(%edx) 113378: 83 c4 10 add $0x10,%esp 11337b: 8b 45 f4 mov -0xc(%ebp),%eax *pointer = return_this; 11337e: 89 03 mov %eax,(%ebx) return 0; 113380: 31 c0 xor %eax,%eax } 113382: 8b 5d fc mov -0x4(%ebp),%ebx 113385: c9 leave 113386: c3 ret 113387: 90 nop /* * 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() ) 113388: e8 13 53 ff ff call 1086a0 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 11338d: 84 c0 test %al,%al 11338f: 75 b4 jne 113345 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) return EINVAL; 113391: 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; } 113396: 8b 5d fc mov -0x4(%ebp),%ebx 113399: c9 leave 11339a: c3 ret 11339b: 90 nop RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) return ENOMEM; 11339c: b8 0c 00 00 00 mov $0xc,%eax 1133a1: eb df jmp 113382 =============================================================================== 001159e4 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 1159e4: 55 push %ebp 1159e5: 89 e5 mov %esp,%ebp 1159e7: 57 push %edi 1159e8: 56 push %esi 1159e9: 53 push %ebx 1159ea: 83 ec 1c sub $0x1c,%esp 1159ed: 8b 7d 08 mov 0x8(%ebp),%edi 1159f0: 8b 5d 0c mov 0xc(%ebp),%ebx 1159f3: 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 ) 1159f6: 85 db test %ebx,%ebx 1159f8: 74 62 je 115a5c return RTEMS_INVALID_ADDRESS; if ( !count ) 1159fa: 85 f6 test %esi,%esi 1159fc: 74 5e je 115a5c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1159fe: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1159ff: 8d 45 e4 lea -0x1c(%ebp),%eax 115a02: 50 push %eax 115a03: 57 push %edi 115a04: 68 a0 2a 14 00 push $0x142aa0 115a09: e8 ee 4e 00 00 call 11a8fc <_Objects_Get> switch ( location ) { 115a0e: 83 c4 10 add $0x10,%esp 115a11: 8b 55 e4 mov -0x1c(%ebp),%edx 115a14: 85 d2 test %edx,%edx 115a16: 74 10 je 115a28 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115a18: b8 04 00 00 00 mov $0x4,%eax } 115a1d: 8d 65 f4 lea -0xc(%ebp),%esp 115a20: 5b pop %ebx 115a21: 5e pop %esi 115a22: 5f pop %edi 115a23: c9 leave 115a24: c3 ret 115a25: 8d 76 00 lea 0x0(%esi),%esi the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 115a28: 83 ec 08 sub $0x8,%esp 115a2b: 56 push %esi 115a2c: 6a 00 push $0x0 115a2e: 57 push %edi 115a2f: ff 75 10 pushl 0x10(%ebp) 115a32: 53 push %ebx 115a33: 83 c0 14 add $0x14,%eax 115a36: 50 push %eax 115a37: e8 ac 34 00 00 call 118ee8 <_CORE_message_queue_Broadcast> 115a3c: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 115a3e: 83 c4 20 add $0x20,%esp 115a41: e8 3e 5a 00 00 call 11b484 <_Thread_Enable_dispatch> return 115a46: 83 ec 0c sub $0xc,%esp 115a49: 53 push %ebx 115a4a: e8 69 03 00 00 call 115db8 <_Message_queue_Translate_core_message_queue_return_code> 115a4f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115a52: 8d 65 f4 lea -0xc(%ebp),%esp 115a55: 5b pop %ebx 115a56: 5e pop %esi 115a57: 5f pop %edi 115a58: c9 leave 115a59: c3 ret 115a5a: 66 90 xchg %ax,%ax if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 115a5c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115a61: 8d 65 f4 lea -0xc(%ebp),%esp 115a64: 5b pop %ebx 115a65: 5e pop %esi 115a66: 5f pop %edi 115a67: c9 leave 115a68: c3 ret =============================================================================== 0011026c : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 11026c: 55 push %ebp 11026d: 89 e5 mov %esp,%ebp 11026f: 57 push %edi 110270: 56 push %esi 110271: 53 push %ebx 110272: 83 ec 2c sub $0x2c,%esp 110275: 8b 5d 08 mov 0x8(%ebp),%ebx 110278: 8b 75 0c mov 0xc(%ebp),%esi 11027b: 8b 4d 10 mov 0x10(%ebp),%ecx 11027e: 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 ) ) 110281: 85 db test %ebx,%ebx 110283: 74 2f je 1102b4 return RTEMS_INVALID_NAME; if ( !id ) 110285: 85 ff test %edi,%edi 110287: 0f 84 a3 00 00 00 je 110330 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 11028d: 85 f6 test %esi,%esi 11028f: 74 13 je 1102a4 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 110291: 85 c9 test %ecx,%ecx 110293: 75 2f jne 1102c4 return RTEMS_INVALID_SIZE; 110295: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11029a: 8d 65 f4 lea -0xc(%ebp),%esp 11029d: 5b pop %ebx 11029e: 5e pop %esi 11029f: 5f pop %edi 1102a0: c9 leave 1102a1: c3 ret 1102a2: 66 90 xchg %ax,%ax !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 1102a4: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1102a9: 8d 65 f4 lea -0xc(%ebp),%esp 1102ac: 5b pop %ebx 1102ad: 5e pop %esi 1102ae: 5f pop %edi 1102af: c9 leave 1102b0: c3 ret 1102b1: 8d 76 00 lea 0x0(%esi),%esi #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 1102b4: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1102b9: 8d 65 f4 lea -0xc(%ebp),%esp 1102bc: 5b pop %ebx 1102bd: 5e pop %esi 1102be: 5f pop %edi 1102bf: c9 leave 1102c0: c3 ret 1102c1: 8d 76 00 lea 0x0(%esi),%esi 1102c4: a1 ec 77 12 00 mov 0x1277ec,%eax 1102c9: 40 inc %eax 1102ca: a3 ec 77 12 00 mov %eax,0x1277ec #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 1102cf: 89 4d d4 mov %ecx,-0x2c(%ebp) 1102d2: e8 11 26 00 00 call 1128e8 <_Message_queue_Allocate> 1102d7: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 1102d9: 85 c0 test %eax,%eax 1102db: 8b 4d d4 mov -0x2c(%ebp),%ecx 1102de: 74 7c je 11035c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 1102e0: 8b 45 14 mov 0x14(%ebp),%eax 1102e3: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 1102e6: a8 04 test $0x4,%al 1102e8: 0f 95 c0 setne %al 1102eb: 0f b6 c0 movzbl %al,%eax 1102ee: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 1102f1: 51 push %ecx 1102f2: 56 push %esi 1102f3: 8d 45 e4 lea -0x1c(%ebp),%eax 1102f6: 50 push %eax 1102f7: 8d 42 14 lea 0x14(%edx),%eax 1102fa: 50 push %eax 1102fb: 89 55 d4 mov %edx,-0x2c(%ebp) 1102fe: e8 c5 06 00 00 call 1109c8 <_CORE_message_queue_Initialize> 110303: 83 c4 10 add $0x10,%esp 110306: 84 c0 test %al,%al 110308: 8b 55 d4 mov -0x2c(%ebp),%edx 11030b: 75 2f jne 11033c */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 11030d: 83 ec 08 sub $0x8,%esp 110310: 52 push %edx 110311: 68 c0 82 12 00 push $0x1282c0 110316: e8 9d bd ff ff call 10c0b8 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 11031b: e8 60 ca ff ff call 10cd80 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 110320: 83 c4 10 add $0x10,%esp 110323: b8 0d 00 00 00 mov $0xd,%eax 110328: e9 6d ff ff ff jmp 11029a 11032d: 8d 76 00 lea 0x0(%esi),%esi if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 110330: b8 09 00 00 00 mov $0x9,%eax 110335: e9 60 ff ff ff jmp 11029a 11033a: 66 90 xchg %ax,%ax Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 11033c: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 11033f: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 110342: 8b 0d dc 82 12 00 mov 0x1282dc,%ecx 110348: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11034b: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 11034e: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 110350: e8 2b ca ff ff call 10cd80 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 110355: 31 c0 xor %eax,%eax 110357: e9 3e ff ff ff jmp 11029a _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 11035c: e8 1f ca ff ff call 10cd80 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 110361: b8 05 00 00 00 mov $0x5,%eax 110366: e9 2f ff ff ff jmp 11029a =============================================================================== 0011036c : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 11036c: 55 push %ebp 11036d: 89 e5 mov %esp,%ebp 11036f: 53 push %ebx 110370: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 110373: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 110376: 50 push %eax 110377: ff 75 08 pushl 0x8(%ebp) 11037a: 68 c0 82 12 00 push $0x1282c0 11037f: e8 74 be ff ff call 10c1f8 <_Objects_Get> 110384: 89 c3 mov %eax,%ebx switch ( location ) { 110386: 83 c4 10 add $0x10,%esp 110389: 8b 4d f4 mov -0xc(%ebp),%ecx 11038c: 85 c9 test %ecx,%ecx 11038e: 75 3c jne 1103cc case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 110390: 83 ec 08 sub $0x8,%esp 110393: 50 push %eax 110394: 68 c0 82 12 00 push $0x1282c0 110399: e8 22 ba ff ff call 10bdc0 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 11039e: 83 c4 0c add $0xc,%esp 1103a1: 6a 05 push $0x5 1103a3: 6a 00 push $0x0 1103a5: 8d 43 14 lea 0x14(%ebx),%eax 1103a8: 50 push %eax 1103a9: e8 96 05 00 00 call 110944 <_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 ); 1103ae: 58 pop %eax 1103af: 5a pop %edx 1103b0: 53 push %ebx 1103b1: 68 c0 82 12 00 push $0x1282c0 1103b6: e8 fd bc ff ff call 10c0b8 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 1103bb: e8 c0 c9 ff ff call 10cd80 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1103c0: 83 c4 10 add $0x10,%esp 1103c3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1103c5: 8b 5d fc mov -0x4(%ebp),%ebx 1103c8: c9 leave 1103c9: c3 ret 1103ca: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1103cc: b8 04 00 00 00 mov $0x4,%eax } 1103d1: 8b 5d fc mov -0x4(%ebp),%ebx 1103d4: c9 leave 1103d5: c3 ret =============================================================================== 00115bd8 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 115bd8: 55 push %ebp 115bd9: 89 e5 mov %esp,%ebp 115bdb: 53 push %ebx 115bdc: 83 ec 14 sub $0x14,%esp 115bdf: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 115be2: 85 db test %ebx,%ebx 115be4: 74 46 je 115c2c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 115be6: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 115be7: 8d 45 f4 lea -0xc(%ebp),%eax 115bea: 50 push %eax 115beb: ff 75 08 pushl 0x8(%ebp) 115bee: 68 a0 2a 14 00 push $0x142aa0 115bf3: e8 04 4d 00 00 call 11a8fc <_Objects_Get> switch ( location ) { 115bf8: 83 c4 10 add $0x10,%esp 115bfb: 8b 55 f4 mov -0xc(%ebp),%edx 115bfe: 85 d2 test %edx,%edx 115c00: 74 0a je 115c0c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115c02: b8 04 00 00 00 mov $0x4,%eax } 115c07: 8b 5d fc mov -0x4(%ebp),%ebx 115c0a: c9 leave 115c0b: 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 ); 115c0c: 83 ec 0c sub $0xc,%esp 115c0f: 83 c0 14 add $0x14,%eax 115c12: 50 push %eax 115c13: e8 90 33 00 00 call 118fa8 <_CORE_message_queue_Flush> 115c18: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 115c1a: e8 65 58 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115c1f: 83 c4 10 add $0x10,%esp 115c22: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115c24: 8b 5d fc mov -0x4(%ebp),%ebx 115c27: c9 leave 115c28: c3 ret 115c29: 8d 76 00 lea 0x0(%esi),%esi { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 115c2c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115c31: 8b 5d fc mov -0x4(%ebp),%ebx 115c34: c9 leave 115c35: c3 ret =============================================================================== 00115c38 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 115c38: 55 push %ebp 115c39: 89 e5 mov %esp,%ebp 115c3b: 53 push %ebx 115c3c: 83 ec 14 sub $0x14,%esp 115c3f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 115c42: 85 db test %ebx,%ebx 115c44: 74 3a je 115c80 115c46: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 115c47: 8d 45 f4 lea -0xc(%ebp),%eax 115c4a: 50 push %eax 115c4b: ff 75 08 pushl 0x8(%ebp) 115c4e: 68 a0 2a 14 00 push $0x142aa0 115c53: e8 a4 4c 00 00 call 11a8fc <_Objects_Get> switch ( location ) { 115c58: 83 c4 10 add $0x10,%esp 115c5b: 8b 55 f4 mov -0xc(%ebp),%edx 115c5e: 85 d2 test %edx,%edx 115c60: 74 0a je 115c6c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115c62: b8 04 00 00 00 mov $0x4,%eax } 115c67: 8b 5d fc mov -0x4(%ebp),%ebx 115c6a: c9 leave 115c6b: 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; 115c6c: 8b 40 5c mov 0x5c(%eax),%eax 115c6f: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 115c71: e8 0e 58 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115c76: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115c78: 8b 5d fc mov -0x4(%ebp),%ebx 115c7b: c9 leave 115c7c: c3 ret 115c7d: 8d 76 00 lea 0x0(%esi),%esi { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 115c80: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115c85: 8b 5d fc mov -0x4(%ebp),%ebx 115c88: c9 leave 115c89: c3 ret =============================================================================== 001103d8 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 1103d8: 55 push %ebp 1103d9: 89 e5 mov %esp,%ebp 1103db: 56 push %esi 1103dc: 53 push %ebx 1103dd: 83 ec 10 sub $0x10,%esp 1103e0: 8b 5d 0c mov 0xc(%ebp),%ebx 1103e3: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 1103e6: 85 db test %ebx,%ebx 1103e8: 74 6e je 110458 return RTEMS_INVALID_ADDRESS; if ( !size ) 1103ea: 85 f6 test %esi,%esi 1103ec: 74 6a je 110458 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1103ee: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1103ef: 8d 45 f4 lea -0xc(%ebp),%eax 1103f2: 50 push %eax 1103f3: ff 75 08 pushl 0x8(%ebp) 1103f6: 68 c0 82 12 00 push $0x1282c0 1103fb: e8 f8 bd ff ff call 10c1f8 <_Objects_Get> switch ( location ) { 110400: 83 c4 10 add $0x10,%esp 110403: 8b 55 f4 mov -0xc(%ebp),%edx 110406: 85 d2 test %edx,%edx 110408: 75 42 jne 11044c if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 11040a: 83 ec 08 sub $0x8,%esp 11040d: ff 75 18 pushl 0x18(%ebp) 110410: 8b 55 14 mov 0x14(%ebp),%edx 110413: 83 e2 01 and $0x1,%edx 110416: 83 f2 01 xor $0x1,%edx 110419: 52 push %edx 11041a: 56 push %esi 11041b: 53 push %ebx 11041c: ff 70 08 pushl 0x8(%eax) 11041f: 83 c0 14 add $0x14,%eax 110422: 50 push %eax 110423: e8 50 06 00 00 call 110a78 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 110428: 83 c4 20 add $0x20,%esp 11042b: e8 50 c9 ff ff call 10cd80 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 110430: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 110433: a1 98 7d 12 00 mov 0x127d98,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 110438: ff 70 34 pushl 0x34(%eax) 11043b: e8 a0 00 00 00 call 1104e0 <_Message_queue_Translate_core_message_queue_return_code> 110440: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110443: 8d 65 f8 lea -0x8(%ebp),%esp 110446: 5b pop %ebx 110447: 5e pop %esi 110448: c9 leave 110449: c3 ret 11044a: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11044c: b8 04 00 00 00 mov $0x4,%eax } 110451: 8d 65 f8 lea -0x8(%ebp),%esp 110454: 5b pop %ebx 110455: 5e pop %esi 110456: c9 leave 110457: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 110458: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11045d: 8d 65 f8 lea -0x8(%ebp),%esp 110460: 5b pop %ebx 110461: 5e pop %esi 110462: c9 leave 110463: c3 ret =============================================================================== 00110464 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 110464: 55 push %ebp 110465: 89 e5 mov %esp,%ebp 110467: 56 push %esi 110468: 53 push %ebx 110469: 83 ec 10 sub $0x10,%esp 11046c: 8b 75 08 mov 0x8(%ebp),%esi 11046f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 110472: 85 db test %ebx,%ebx 110474: 74 5e je 1104d4 110476: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 110477: 8d 45 f4 lea -0xc(%ebp),%eax 11047a: 50 push %eax 11047b: 56 push %esi 11047c: 68 c0 82 12 00 push $0x1282c0 110481: e8 72 bd ff ff call 10c1f8 <_Objects_Get> switch ( location ) { 110486: 83 c4 10 add $0x10,%esp 110489: 8b 55 f4 mov -0xc(%ebp),%edx 11048c: 85 d2 test %edx,%edx 11048e: 74 0c je 11049c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 110490: b8 04 00 00 00 mov $0x4,%eax } 110495: 8d 65 f8 lea -0x8(%ebp),%esp 110498: 5b pop %ebx 110499: 5e pop %esi 11049a: c9 leave 11049b: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 11049c: 6a 00 push $0x0 11049e: 6a 00 push $0x0 1104a0: 68 ff ff ff 7f push $0x7fffffff 1104a5: 6a 00 push $0x0 1104a7: 56 push %esi 1104a8: ff 75 10 pushl 0x10(%ebp) 1104ab: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 1104ac: 83 c0 14 add $0x14,%eax 1104af: 50 push %eax 1104b0: e8 ef 06 00 00 call 110ba4 <_CORE_message_queue_Submit> 1104b5: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1104b7: 83 c4 20 add $0x20,%esp 1104ba: e8 c1 c8 ff ff call 10cd80 <_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); 1104bf: 83 ec 0c sub $0xc,%esp 1104c2: 53 push %ebx 1104c3: e8 18 00 00 00 call 1104e0 <_Message_queue_Translate_core_message_queue_return_code> 1104c8: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1104cb: 8d 65 f8 lea -0x8(%ebp),%esp 1104ce: 5b pop %ebx 1104cf: 5e pop %esi 1104d0: c9 leave 1104d1: c3 ret 1104d2: 66 90 xchg %ax,%ax register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 1104d4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1104d9: 8d 65 f8 lea -0x8(%ebp),%esp 1104dc: 5b pop %ebx 1104dd: 5e pop %esi 1104de: c9 leave 1104df: c3 ret =============================================================================== 00115dc8 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 115dc8: 55 push %ebp 115dc9: 89 e5 mov %esp,%ebp 115dcb: 56 push %esi 115dcc: 53 push %ebx 115dcd: 83 ec 10 sub $0x10,%esp 115dd0: 8b 75 08 mov 0x8(%ebp),%esi 115dd3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 115dd6: 85 db test %ebx,%ebx 115dd8: 74 5e je 115e38 115dda: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 115ddb: 8d 45 f4 lea -0xc(%ebp),%eax 115dde: 50 push %eax 115ddf: 56 push %esi 115de0: 68 a0 2a 14 00 push $0x142aa0 115de5: e8 12 4b 00 00 call 11a8fc <_Objects_Get> switch ( location ) { 115dea: 83 c4 10 add $0x10,%esp 115ded: 8b 55 f4 mov -0xc(%ebp),%edx 115df0: 85 d2 test %edx,%edx 115df2: 74 0c je 115e00 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115df4: b8 04 00 00 00 mov $0x4,%eax } 115df9: 8d 65 f8 lea -0x8(%ebp),%esp 115dfc: 5b pop %ebx 115dfd: 5e pop %esi 115dfe: c9 leave 115dff: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 115e00: 6a 00 push $0x0 115e02: 6a 00 push $0x0 115e04: 68 00 00 00 80 push $0x80000000 115e09: 6a 00 push $0x0 115e0b: 56 push %esi 115e0c: ff 75 10 pushl 0x10(%ebp) 115e0f: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 115e10: 83 c0 14 add $0x14,%eax 115e13: 50 push %eax 115e14: e8 cf 33 00 00 call 1191e8 <_CORE_message_queue_Submit> 115e19: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 115e1b: 83 c4 20 add $0x20,%esp 115e1e: e8 61 56 00 00 call 11b484 <_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); 115e23: 83 ec 0c sub $0xc,%esp 115e26: 53 push %ebx 115e27: e8 8c ff ff ff call 115db8 <_Message_queue_Translate_core_message_queue_return_code> 115e2c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115e2f: 8d 65 f8 lea -0x8(%ebp),%esp 115e32: 5b pop %ebx 115e33: 5e pop %esi 115e34: c9 leave 115e35: c3 ret 115e36: 66 90 xchg %ax,%ax register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 115e38: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115e3d: 8d 65 f8 lea -0x8(%ebp),%esp 115e40: 5b pop %ebx 115e41: 5e pop %esi 115e42: c9 leave 115e43: c3 ret =============================================================================== 00111a2c : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { 111a2c: 55 push %ebp 111a2d: 89 e5 mov %esp,%ebp 111a2f: 57 push %edi 111a30: 56 push %esi 111a31: 53 push %ebx 111a32: 83 ec 78 sub $0x78,%esp int success = 0; char *dup_path = strdup(path); 111a35: ff 75 08 pushl 0x8(%ebp) 111a38: e8 c7 3b 00 00 call 115604 111a3d: 89 c7 mov %eax,%edi if (dup_path != NULL) { 111a3f: 83 c4 10 add $0x10,%esp 111a42: 85 c0 test %eax,%eax 111a44: 0f 84 0a 01 00 00 je 111b54 <== NEVER TAKEN char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 111a4a: 8a 10 mov (%eax),%dl 111a4c: 80 fa 2f cmp $0x2f,%dl 111a4f: 0f 84 0f 01 00 00 je 111b64 111a55: 89 c3 mov %eax,%ebx 111a57: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp) 111a5e: b8 01 00 00 00 mov $0x1,%eax ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 111a63: 84 d2 test %dl,%dl 111a65: 74 11 je 111a78 <== NEVER TAKEN 111a67: 90 nop last = 1; else if (p[0] != '/') 111a68: 80 fa 2f cmp $0x2f,%dl 111a6b: 0f 84 83 00 00 00 je 111af4 p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { 111a71: 43 inc %ebx 111a72: 8a 13 mov (%ebx),%dl if (p[0] == '\0') 111a74: 84 d2 test %dl,%dl 111a76: 75 f0 jne 111a68 last = 1; else if (p[0] != '/') continue; *p = '\0'; 111a78: c6 03 00 movb $0x0,(%ebx) 111a7b: be 01 00 00 00 mov $0x1,%esi if (!last && p[1] == '\0') last = 1; if (first) { 111a80: 85 c0 test %eax,%eax 111a82: 75 54 jne 111ad8 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) 111a84: 85 f6 test %esi,%esi 111a86: 75 3c jne 111ac4 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 111a88: b8 ff 01 00 00 mov $0x1ff,%eax 111a8d: 83 ec 08 sub $0x8,%esp 111a90: 50 push %eax 111a91: 57 push %edi 111a92: e8 dd 71 ff ff call 108c74 111a97: 83 c4 10 add $0x10,%esp 111a9a: 85 c0 test %eax,%eax 111a9c: 78 6a js 111b08 } else { retval = 0; break; } } if (!last) 111a9e: 85 f6 test %esi,%esi 111aa0: 75 0a jne 111aac *p = '/'; 111aa2: c6 03 2f movb $0x2f,(%ebx) 111aa5: 31 c0 xor %eax,%eax 111aa7: eb c8 jmp 111a71 111aa9: 8d 76 00 lea 0x0(%esi),%esi int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 111aac: 83 ec 0c sub $0xc,%esp 111aaf: 57 push %edi 111ab0: e8 c7 6b ff ff call 10867c 111ab5: 83 c4 10 add $0x10,%esp } return success != 0 ? 0 : -1; 111ab8: 31 c0 xor %eax,%eax } 111aba: 8d 65 f4 lea -0xc(%ebp),%esp 111abd: 5b pop %ebx 111abe: 5e pop %esi 111abf: 5f pop %edi 111ac0: c9 leave 111ac1: c3 ret 111ac2: 66 90 xchg %ax,%ax numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask); 111ac4: 83 ec 0c sub $0xc,%esp 111ac7: ff 75 94 pushl -0x6c(%ebp) 111aca: e8 81 01 00 00 call 111c50 111acf: 83 c4 10 add $0x10,%esp if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 111ad2: 8b 45 0c mov 0xc(%ebp),%eax 111ad5: eb b6 jmp 111a8d 111ad7: 90 nop * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); 111ad8: 83 ec 0c sub $0xc,%esp 111adb: 6a 00 push $0x0 111add: e8 6e 01 00 00 call 111c50 111ae2: 89 45 94 mov %eax,-0x6c(%ebp) numask = oumask & ~(S_IWUSR | S_IXUSR); 111ae5: 24 3f and $0x3f,%al (void)umask(numask); 111ae7: 89 04 24 mov %eax,(%esp) 111aea: e8 61 01 00 00 call 111c50 111aef: 83 c4 10 add $0x10,%esp 111af2: eb 90 jmp 111a84 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; 111af4: c6 03 00 movb $0x0,(%ebx) if (!last && p[1] == '\0') 111af7: 31 d2 xor %edx,%edx 111af9: 80 7b 01 00 cmpb $0x0,0x1(%ebx) 111afd: 0f 94 c2 sete %dl 111b00: 89 d6 mov %edx,%esi 111b02: e9 79 ff ff ff jmp 111a80 111b07: 90 nop first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { 111b08: e8 6b 2e 00 00 call 114978 <__errno> 111b0d: 83 38 11 cmpl $0x11,(%eax) 111b10: 74 0a je 111b1c 111b12: e8 61 2e 00 00 call 114978 <__errno> 111b17: 83 38 15 cmpl $0x15,(%eax) 111b1a: 75 53 jne 111b6f <== ALWAYS TAKEN if (stat(path, &sb) < 0) { 111b1c: 83 ec 08 sub $0x8,%esp 111b1f: 8d 45 a0 lea -0x60(%ebp),%eax 111b22: 50 push %eax 111b23: 57 push %edi 111b24: e8 7f 00 00 00 call 111ba8 111b29: 83 c4 10 add $0x10,%esp 111b2c: 85 c0 test %eax,%eax 111b2e: 78 3f js 111b6f <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { 111b30: 8b 45 ac mov -0x54(%ebp),%eax 111b33: 25 00 f0 00 00 and $0xf000,%eax 111b38: 3d 00 40 00 00 cmp $0x4000,%eax 111b3d: 0f 84 5b ff ff ff je 111a9e if (last) 111b43: 85 f6 test %esi,%esi 111b45: 74 53 je 111b9a errno = EEXIST; 111b47: e8 2c 2e 00 00 call 114978 <__errno> 111b4c: c7 00 11 00 00 00 movl $0x11,(%eax) 111b52: eb 2d jmp 111b81 if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; 111b54: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED } 111b59: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111b5c: 5b pop %ebx <== NOT EXECUTED 111b5d: 5e pop %esi <== NOT EXECUTED 111b5e: 5f pop %edi <== NOT EXECUTED 111b5f: c9 leave <== NOT EXECUTED 111b60: c3 ret <== NOT EXECUTED 111b61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; 111b64: 8d 58 01 lea 0x1(%eax),%ebx 111b67: 8a 50 01 mov 0x1(%eax),%dl 111b6a: e9 e8 fe ff ff jmp 111a57 } } if (!last) *p = '/'; } if (!first && !last) 111b6f: 85 f6 test %esi,%esi 111b71: 75 0e jne 111b81 <== ALWAYS TAKEN (void)umask(oumask); 111b73: 83 ec 0c sub $0xc,%esp 111b76: ff 75 94 pushl -0x6c(%ebp) 111b79: e8 d2 00 00 00 call 111c50 111b7e: 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); 111b81: 83 ec 0c sub $0xc,%esp 111b84: 57 push %edi 111b85: e8 f2 6a ff ff call 10867c 111b8a: 83 c4 10 add $0x10,%esp } return success != 0 ? 0 : -1; 111b8d: b8 ff ff ff ff mov $0xffffffff,%eax } 111b92: 8d 65 f4 lea -0xc(%ebp),%esp 111b95: 5b pop %ebx 111b96: 5e pop %esi 111b97: 5f pop %edi 111b98: c9 leave 111b99: c3 ret break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; 111b9a: e8 d9 2d 00 00 call 114978 <__errno> 111b9f: c7 00 14 00 00 00 movl $0x14,(%eax) 111ba5: eb cc jmp 111b73 =============================================================================== 0010ae70 : }; const char *rtems_object_get_api_name( int api ) { 10ae70: 55 push %ebp 10ae71: 89 e5 mov %esp,%ebp 10ae73: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10ae76: ff 75 08 pushl 0x8(%ebp) 10ae79: 68 00 76 12 00 push $0x127600 10ae7e: e8 ed 49 00 00 call 10f870 if ( api_assoc ) 10ae83: 83 c4 10 add $0x10,%esp 10ae86: 85 c0 test %eax,%eax 10ae88: 74 06 je 10ae90 return api_assoc->name; 10ae8a: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10ae8c: c9 leave 10ae8d: c3 ret 10ae8e: 66 90 xchg %ax,%ax 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"; 10ae90: b8 a3 26 12 00 mov $0x1226a3,%eax } 10ae95: c9 leave 10ae96: c3 ret =============================================================================== 0010c588 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10c588: 55 push %ebp 10c589: 89 e5 mov %esp,%ebp 10c58b: 57 push %edi 10c58c: 56 push %esi 10c58d: 53 push %ebx 10c58e: 83 ec 0c sub $0xc,%esp 10c591: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10c594: 85 db test %ebx,%ebx 10c596: 74 60 je 10c5f8 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10c598: 83 ec 08 sub $0x8,%esp 10c59b: 0f b7 45 0c movzwl 0xc(%ebp),%eax 10c59f: 50 push %eax 10c5a0: ff 75 08 pushl 0x8(%ebp) 10c5a3: e8 14 1a 00 00 call 10dfbc <_Objects_Get_information> if ( !obj_info ) 10c5a8: 83 c4 10 add $0x10,%esp 10c5ab: 85 c0 test %eax,%eax 10c5ad: 74 59 je 10c608 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10c5af: 8b 50 08 mov 0x8(%eax),%edx 10c5b2: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10c5b4: 8b 50 0c mov 0xc(%eax),%edx 10c5b7: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10c5ba: 8a 50 12 mov 0x12(%eax),%dl 10c5bd: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10c5c0: 0f b7 70 10 movzwl 0x10(%eax),%esi 10c5c4: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10c5c7: 85 f6 test %esi,%esi 10c5c9: 74 44 je 10c60f <== NEVER TAKEN 10c5cb: 8b 78 1c mov 0x1c(%eax),%edi 10c5ce: b9 01 00 00 00 mov $0x1,%ecx 10c5d3: b8 01 00 00 00 mov $0x1,%eax 10c5d8: 31 d2 xor %edx,%edx 10c5da: 66 90 xchg %ax,%ax if ( !obj_info->local_table[i] ) unallocated++; 10c5dc: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10c5e0: 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++ ) 10c5e3: 40 inc %eax 10c5e4: 89 c1 mov %eax,%ecx 10c5e6: 39 c6 cmp %eax,%esi 10c5e8: 73 f2 jae 10c5dc if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10c5ea: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10c5ed: 31 c0 xor %eax,%eax } 10c5ef: 8d 65 f4 lea -0xc(%ebp),%esp 10c5f2: 5b pop %ebx 10c5f3: 5e pop %esi 10c5f4: 5f pop %edi 10c5f5: c9 leave 10c5f6: c3 ret 10c5f7: 90 nop /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10c5f8: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10c5fd: 8d 65 f4 lea -0xc(%ebp),%esp 10c600: 5b pop %ebx 10c601: 5e pop %esi 10c602: 5f pop %edi 10c603: c9 leave 10c604: c3 ret 10c605: 8d 76 00 lea 0x0(%esi),%esi if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) return RTEMS_INVALID_NUMBER; 10c608: b8 0a 00 00 00 mov $0xa,%eax 10c60d: eb e0 jmp 10c5ef 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++ ) 10c60f: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c611: eb d7 jmp 10c5ea <== NOT EXECUTED =============================================================================== 0010ba18 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10ba18: 55 push %ebp 10ba19: 89 e5 mov %esp,%ebp 10ba1b: 53 push %ebx 10ba1c: 83 ec 14 sub $0x14,%esp 10ba1f: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10ba22: 85 db test %ebx,%ebx 10ba24: 74 26 je 10ba4c return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10ba26: 83 ec 08 sub $0x8,%esp 10ba29: 8d 45 f4 lea -0xc(%ebp),%eax 10ba2c: 50 push %eax 10ba2d: ff 75 08 pushl 0x8(%ebp) 10ba30: e8 6f 1a 00 00 call 10d4a4 <_Objects_Id_to_name> *name = name_u.name_u32; 10ba35: 8b 55 f4 mov -0xc(%ebp),%edx 10ba38: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10ba3a: 8b 04 85 0c 33 12 00 mov 0x12330c(,%eax,4),%eax 10ba41: 83 c4 10 add $0x10,%esp } 10ba44: 8b 5d fc mov -0x4(%ebp),%ebx 10ba47: c9 leave 10ba48: c3 ret 10ba49: 8d 76 00 lea 0x0(%esi),%esi { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) return RTEMS_INVALID_ADDRESS; 10ba4c: 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 ]; } 10ba51: 8b 5d fc mov -0x4(%ebp),%ebx 10ba54: c9 leave 10ba55: c3 ret =============================================================================== 0010aea4 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10aea4: 55 push %ebp 10aea5: 89 e5 mov %esp,%ebp 10aea7: 57 push %edi 10aea8: 56 push %esi 10aea9: 53 push %ebx 10aeaa: 83 ec 1c sub $0x1c,%esp 10aead: 8b 75 08 mov 0x8(%ebp),%esi 10aeb0: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10aeb3: 85 ff test %edi,%edi 10aeb5: 74 61 je 10af18 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10aeb7: 85 f6 test %esi,%esi 10aeb9: 74 35 je 10aef0 information = _Objects_Get_information_id( tmpId ); 10aebb: 83 ec 0c sub $0xc,%esp 10aebe: 56 push %esi 10aebf: e8 ec 17 00 00 call 10c6b0 <_Objects_Get_information_id> 10aec4: 89 c3 mov %eax,%ebx if ( !information ) 10aec6: 83 c4 10 add $0x10,%esp 10aec9: 85 c0 test %eax,%eax 10aecb: 74 16 je 10aee3 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10aecd: 50 push %eax 10aece: 8d 45 e4 lea -0x1c(%ebp),%eax 10aed1: 50 push %eax 10aed2: 56 push %esi 10aed3: 53 push %ebx 10aed4: e8 8f 19 00 00 call 10c868 <_Objects_Get> switch ( location ) { 10aed9: 83 c4 10 add $0x10,%esp 10aedc: 8b 4d e4 mov -0x1c(%ebp),%ecx 10aedf: 85 c9 test %ecx,%ecx 10aee1: 74 19 je 10aefc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10aee3: b8 04 00 00 00 mov $0x4,%eax } 10aee8: 8d 65 f4 lea -0xc(%ebp),%esp 10aeeb: 5b pop %ebx 10aeec: 5e pop %esi 10aeed: 5f pop %edi 10aeee: c9 leave 10aeef: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10aef0: a1 b8 9f 12 00 mov 0x129fb8,%eax 10aef5: 8b 70 08 mov 0x8(%eax),%esi 10aef8: eb c1 jmp 10aebb 10aefa: 66 90 xchg %ax,%ax the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10aefc: 52 push %edx 10aefd: 57 push %edi 10aefe: 50 push %eax 10aeff: 53 push %ebx 10af00: e8 e3 1a 00 00 call 10c9e8 <_Objects_Set_name> _Thread_Enable_dispatch(); 10af05: e8 4a 25 00 00 call 10d454 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10af0a: 83 c4 10 add $0x10,%esp 10af0d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10af0f: 8d 65 f4 lea -0xc(%ebp),%esp 10af12: 5b pop %ebx 10af13: 5e pop %esi 10af14: 5f pop %edi 10af15: c9 leave 10af16: c3 ret 10af17: 90 nop Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10af18: b8 09 00 00 00 mov $0x9,%eax 10af1d: eb c9 jmp 10aee8 =============================================================================== 00115e44 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 115e44: 55 push %ebp 115e45: 89 e5 mov %esp,%ebp 115e47: 57 push %edi 115e48: 56 push %esi 115e49: 53 push %ebx 115e4a: 83 ec 1c sub $0x1c,%esp 115e4d: 8b 5d 08 mov 0x8(%ebp),%ebx 115e50: 8b 75 0c mov 0xc(%ebp),%esi 115e53: 8b 55 10 mov 0x10(%ebp),%edx 115e56: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 115e59: 85 db test %ebx,%ebx 115e5b: 74 47 je 115ea4 return RTEMS_INVALID_NAME; if ( !starting_address ) 115e5d: 85 f6 test %esi,%esi 115e5f: 74 23 je 115e84 return RTEMS_INVALID_ADDRESS; if ( !id ) 115e61: 8b 45 1c mov 0x1c(%ebp),%eax 115e64: 85 c0 test %eax,%eax 115e66: 74 1c je 115e84 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 115e68: 85 d2 test %edx,%edx 115e6a: 74 28 je 115e94 115e6c: 85 ff test %edi,%edi 115e6e: 74 24 je 115e94 115e70: 39 fa cmp %edi,%edx 115e72: 72 20 jb 115e94 115e74: f7 c7 03 00 00 00 test $0x3,%edi 115e7a: 75 18 jne 115e94 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 115e7c: f7 c6 03 00 00 00 test $0x3,%esi 115e82: 74 30 je 115eb4 return RTEMS_INVALID_ADDRESS; 115e84: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e89: 8d 65 f4 lea -0xc(%ebp),%esp 115e8c: 5b pop %ebx 115e8d: 5e pop %esi 115e8e: 5f pop %edi 115e8f: c9 leave 115e90: c3 ret 115e91: 8d 76 00 lea 0x0(%esi),%esi 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; 115e94: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e99: 8d 65 f4 lea -0xc(%ebp),%esp 115e9c: 5b pop %ebx 115e9d: 5e pop %esi 115e9e: 5f pop %edi 115e9f: c9 leave 115ea0: c3 ret 115ea1: 8d 76 00 lea 0x0(%esi),%esi ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115ea4: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115ea9: 8d 65 f4 lea -0xc(%ebp),%esp 115eac: 5b pop %ebx 115ead: 5e pop %esi 115eae: 5f pop %edi 115eaf: c9 leave 115eb0: c3 ret 115eb1: 8d 76 00 lea 0x0(%esi),%esi 115eb4: a1 ac 20 14 00 mov 0x1420ac,%eax 115eb9: 40 inc %eax 115eba: a3 ac 20 14 00 mov %eax,0x1420ac * 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 ); 115ebf: 83 ec 0c sub $0xc,%esp 115ec2: 68 40 1f 14 00 push $0x141f40 115ec7: 89 55 e0 mov %edx,-0x20(%ebp) 115eca: e8 3d 45 00 00 call 11a40c <_Objects_Allocate> 115ecf: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 115ed2: 83 c4 10 add $0x10,%esp 115ed5: 85 c0 test %eax,%eax 115ed7: 8b 55 e0 mov -0x20(%ebp),%edx 115eda: 74 58 je 115f34 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 115edc: 8b 45 e4 mov -0x1c(%ebp),%eax 115edf: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 115ee2: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 115ee5: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 115ee8: 8b 4d 18 mov 0x18(%ebp),%ecx 115eeb: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 115eee: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 115ef5: 57 push %edi 115ef6: 89 d0 mov %edx,%eax 115ef8: 31 d2 xor %edx,%edx 115efa: f7 f7 div %edi 115efc: 50 push %eax 115efd: 56 push %esi 115efe: 8b 45 e4 mov -0x1c(%ebp),%eax 115f01: 83 c0 24 add $0x24,%eax 115f04: 50 push %eax 115f05: e8 82 2f 00 00 call 118e8c <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115f0a: 8b 7d e4 mov -0x1c(%ebp),%edi 115f0d: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115f10: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115f13: 8b 15 5c 1f 14 00 mov 0x141f5c,%edx 115f19: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115f1c: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 115f1f: 8b 55 1c mov 0x1c(%ebp),%edx 115f22: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 115f24: e8 5b 55 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f29: 83 c4 10 add $0x10,%esp 115f2c: 31 c0 xor %eax,%eax 115f2e: e9 66 ff ff ff jmp 115e99 115f33: 90 nop _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 115f34: e8 4b 55 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115f39: b8 05 00 00 00 mov $0x5,%eax 115f3e: e9 56 ff ff ff jmp 115e99 =============================================================================== 00115fb0 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 115fb0: 55 push %ebp 115fb1: 89 e5 mov %esp,%ebp 115fb3: 56 push %esi 115fb4: 53 push %ebx 115fb5: 83 ec 20 sub $0x20,%esp 115fb8: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 115fbb: 85 db test %ebx,%ebx 115fbd: 74 59 je 116018 <== NEVER TAKEN Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 115fbf: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 115fc0: 8d 45 f4 lea -0xc(%ebp),%eax 115fc3: 50 push %eax 115fc4: ff 75 08 pushl 0x8(%ebp) 115fc7: 68 40 1f 14 00 push $0x141f40 115fcc: e8 2b 49 00 00 call 11a8fc <_Objects_Get> 115fd1: 89 c6 mov %eax,%esi switch ( location ) { 115fd3: 83 c4 10 add $0x10,%esp 115fd6: 8b 45 f4 mov -0xc(%ebp),%eax 115fd9: 85 c0 test %eax,%eax 115fdb: 75 2f jne 11600c <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 115fdd: 83 ec 0c sub $0xc,%esp 115fe0: 8d 46 24 lea 0x24(%esi),%eax 115fe3: 50 push %eax 115fe4: e8 7f 2e 00 00 call 118e68 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 115fe9: 83 c4 10 add $0x10,%esp 115fec: 85 c0 test %eax,%eax 115fee: 74 34 je 116024 the_partition->number_of_used_blocks += 1; 115ff0: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 115ff3: 89 45 e4 mov %eax,-0x1c(%ebp) 115ff6: e8 89 54 00 00 call 11b484 <_Thread_Enable_dispatch> *buffer = the_buffer; 115ffb: 8b 45 e4 mov -0x1c(%ebp),%eax 115ffe: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 116000: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116002: 8d 65 f8 lea -0x8(%ebp),%esp 116005: 5b pop %ebx 116006: 5e pop %esi 116007: c9 leave 116008: c3 ret 116009: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11600c: b8 04 00 00 00 mov $0x4,%eax } 116011: 8d 65 f8 lea -0x8(%ebp),%esp 116014: 5b pop %ebx 116015: 5e pop %esi 116016: c9 leave 116017: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 116018: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11601d: 8d 65 f8 lea -0x8(%ebp),%esp 116020: 5b pop %ebx 116021: 5e pop %esi 116022: c9 leave 116023: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116024: e8 5b 54 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 116029: b8 0d 00 00 00 mov $0xd,%eax 11602e: eb e1 jmp 116011 =============================================================================== 00116054 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116054: 55 push %ebp 116055: 89 e5 mov %esp,%ebp 116057: 56 push %esi 116058: 53 push %ebx 116059: 83 ec 14 sub $0x14,%esp 11605c: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 11605f: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116062: 50 push %eax 116063: ff 75 08 pushl 0x8(%ebp) 116066: 68 40 1f 14 00 push $0x141f40 11606b: e8 8c 48 00 00 call 11a8fc <_Objects_Get> 116070: 89 c3 mov %eax,%ebx switch ( location ) { 116072: 83 c4 10 add $0x10,%esp 116075: 8b 45 f4 mov -0xc(%ebp),%eax 116078: 85 c0 test %eax,%eax 11607a: 74 0c je 116088 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11607c: b8 04 00 00 00 mov $0x4,%eax } 116081: 8d 65 f8 lea -0x8(%ebp),%esp 116084: 5b pop %ebx 116085: 5e pop %esi 116086: c9 leave 116087: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116088: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 11608b: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 11608e: 39 c6 cmp %eax,%esi 116090: 72 3a jb 1160cc RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116092: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116095: 39 d6 cmp %edx,%esi 116097: 77 33 ja 1160cc <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116099: 89 f2 mov %esi,%edx 11609b: 29 c2 sub %eax,%edx 11609d: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 11609f: 31 d2 xor %edx,%edx 1160a1: 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 ) && 1160a4: 85 d2 test %edx,%edx 1160a6: 75 24 jne 1160cc RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 1160a8: 83 ec 08 sub $0x8,%esp 1160ab: 56 push %esi 1160ac: 8d 43 24 lea 0x24(%ebx),%eax 1160af: 50 push %eax 1160b0: e8 77 2d 00 00 call 118e2c <_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; 1160b5: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 1160b8: e8 c7 53 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1160bd: 83 c4 10 add $0x10,%esp 1160c0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160c2: 8d 65 f8 lea -0x8(%ebp),%esp 1160c5: 5b pop %ebx 1160c6: 5e pop %esi 1160c7: c9 leave 1160c8: c3 ret 1160c9: 8d 76 00 lea 0x0(%esi),%esi _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1160cc: e8 b3 53 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 1160d1: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160d6: 8d 65 f8 lea -0x8(%ebp),%esp 1160d9: 5b pop %ebx 1160da: 5e pop %esi 1160db: c9 leave 1160dc: c3 ret =============================================================================== 00115478 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115478: 55 push %ebp 115479: 89 e5 mov %esp,%ebp 11547b: 57 push %edi 11547c: 56 push %esi 11547d: 53 push %ebx 11547e: 83 ec 1c sub $0x1c,%esp 115481: 8b 5d 08 mov 0x8(%ebp),%ebx 115484: 8b 55 0c mov 0xc(%ebp),%edx 115487: 8b 7d 10 mov 0x10(%ebp),%edi 11548a: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 11548d: 85 db test %ebx,%ebx 11548f: 74 1b je 1154ac return RTEMS_INVALID_NAME; if ( !id ) 115491: 85 f6 test %esi,%esi 115493: 74 08 je 11549d * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115495: 89 f8 mov %edi,%eax 115497: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115499: a8 03 test $0x3,%al 11549b: 74 1f je 1154bc !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 11549d: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1154a2: 8d 65 f4 lea -0xc(%ebp),%esp 1154a5: 5b pop %ebx 1154a6: 5e pop %esi 1154a7: 5f pop %edi 1154a8: c9 leave 1154a9: c3 ret 1154aa: 66 90 xchg %ax,%ax ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 1154ac: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1154b1: 8d 65 f4 lea -0xc(%ebp),%esp 1154b4: 5b pop %ebx 1154b5: 5e pop %esi 1154b6: 5f pop %edi 1154b7: c9 leave 1154b8: c3 ret 1154b9: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1154bc: a1 ac 20 14 00 mov 0x1420ac,%eax 1154c1: 40 inc %eax 1154c2: a3 ac 20 14 00 mov %eax,0x1420ac */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 1154c7: 83 ec 0c sub $0xc,%esp 1154ca: 68 00 1f 14 00 push $0x141f00 1154cf: 89 55 e4 mov %edx,-0x1c(%ebp) 1154d2: e8 35 4f 00 00 call 11a40c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 1154d7: 83 c4 10 add $0x10,%esp 1154da: 85 c0 test %eax,%eax 1154dc: 8b 55 e4 mov -0x1c(%ebp),%edx 1154df: 74 33 je 115514 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 1154e1: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 1154e4: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 1154e7: 8b 55 14 mov 0x14(%ebp),%edx 1154ea: 4a dec %edx 1154eb: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1154ee: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1154f1: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1154f4: 8b 0d 1c 1f 14 00 mov 0x141f1c,%ecx 1154fa: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1154fd: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115500: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115502: e8 7d 5f 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115507: 31 c0 xor %eax,%eax } 115509: 8d 65 f4 lea -0xc(%ebp),%esp 11550c: 5b pop %ebx 11550d: 5e pop %esi 11550e: 5f pop %edi 11550f: c9 leave 115510: c3 ret 115511: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 115514: e8 6b 5f 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115519: b8 05 00 00 00 mov $0x5,%eax 11551e: eb 82 jmp 1154a2 =============================================================================== 00115520 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115520: 55 push %ebp 115521: 89 e5 mov %esp,%ebp 115523: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 115526: 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 ); 115529: 50 push %eax 11552a: ff 75 08 pushl 0x8(%ebp) 11552d: 68 00 1f 14 00 push $0x141f00 115532: e8 c5 53 00 00 call 11a8fc <_Objects_Get> switch ( location ) { 115537: 83 c4 10 add $0x10,%esp 11553a: 8b 4d f4 mov -0xc(%ebp),%ecx 11553d: 85 c9 test %ecx,%ecx 11553f: 75 2f jne 115570 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115541: 83 ec 08 sub $0x8,%esp 115544: 50 push %eax 115545: 68 00 1f 14 00 push $0x141f00 11554a: 89 45 e4 mov %eax,-0x1c(%ebp) 11554d: e8 36 4f 00 00 call 11a488 <_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 ); 115552: 58 pop %eax 115553: 5a pop %edx 115554: 8b 45 e4 mov -0x1c(%ebp),%eax 115557: 50 push %eax 115558: 68 00 1f 14 00 push $0x141f00 11555d: e8 1e 52 00 00 call 11a780 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115562: e8 1d 5f 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115567: 83 c4 10 add $0x10,%esp 11556a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11556c: c9 leave 11556d: c3 ret 11556e: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115570: b8 04 00 00 00 mov $0x4,%eax } 115575: c9 leave 115576: c3 ret =============================================================================== 00115578 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115578: 55 push %ebp 115579: 89 e5 mov %esp,%ebp 11557b: 56 push %esi 11557c: 53 push %ebx 11557d: 83 ec 10 sub $0x10,%esp 115580: 8b 75 0c mov 0xc(%ebp),%esi 115583: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115586: 85 db test %ebx,%ebx 115588: 74 4e je 1155d8 Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 11558a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 11558b: 8d 45 f4 lea -0xc(%ebp),%eax 11558e: 50 push %eax 11558f: ff 75 08 pushl 0x8(%ebp) 115592: 68 00 1f 14 00 push $0x141f00 115597: e8 60 53 00 00 call 11a8fc <_Objects_Get> switch ( location ) { 11559c: 83 c4 10 add $0x10,%esp 11559f: 8b 55 f4 mov -0xc(%ebp),%edx 1155a2: 85 d2 test %edx,%edx 1155a4: 74 0e je 1155b4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1155a6: b8 04 00 00 00 mov $0x4,%eax } 1155ab: 8d 65 f8 lea -0x8(%ebp),%esp 1155ae: 5b pop %ebx 1155af: 5e pop %esi 1155b0: c9 leave 1155b1: c3 ret 1155b2: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 1155b4: 89 f2 mov %esi,%edx 1155b6: 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 ) 1155b9: 3b 50 18 cmp 0x18(%eax),%edx 1155bc: 77 16 ja 1155d4 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 1155be: 03 50 10 add 0x10(%eax),%edx 1155c1: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 1155c3: e8 bc 5e 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1155c8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1155ca: 8d 65 f8 lea -0x8(%ebp),%esp 1155cd: 5b pop %ebx 1155ce: 5e pop %esi 1155cf: c9 leave 1155d0: c3 ret 1155d1: 8d 76 00 lea 0x0(%esi),%esi 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; 1155d4: 89 33 mov %esi,(%ebx) 1155d6: eb eb jmp 1155c3 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 1155d8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1155dd: 8d 65 f8 lea -0x8(%ebp),%esp 1155e0: 5b pop %ebx 1155e1: 5e pop %esi 1155e2: c9 leave 1155e3: c3 ret =============================================================================== 00115608 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115608: 55 push %ebp 115609: 89 e5 mov %esp,%ebp 11560b: 56 push %esi 11560c: 53 push %ebx 11560d: 83 ec 10 sub $0x10,%esp 115610: 8b 75 0c mov 0xc(%ebp),%esi 115613: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115616: 85 db test %ebx,%ebx 115618: 74 4e je 115668 11561a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 11561b: 8d 45 f4 lea -0xc(%ebp),%eax 11561e: 50 push %eax 11561f: ff 75 08 pushl 0x8(%ebp) 115622: 68 00 1f 14 00 push $0x141f00 115627: e8 d0 52 00 00 call 11a8fc <_Objects_Get> switch ( location ) { 11562c: 83 c4 10 add $0x10,%esp 11562f: 8b 55 f4 mov -0xc(%ebp),%edx 115632: 85 d2 test %edx,%edx 115634: 74 0e je 115644 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115636: b8 04 00 00 00 mov $0x4,%eax } 11563b: 8d 65 f8 lea -0x8(%ebp),%esp 11563e: 5b pop %ebx 11563f: 5e pop %esi 115640: c9 leave 115641: c3 ret 115642: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 115644: 89 f2 mov %esi,%edx 115646: 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 ) 115649: 3b 50 18 cmp 0x18(%eax),%edx 11564c: 77 16 ja 115664 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 11564e: 03 50 14 add 0x14(%eax),%edx 115651: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 115653: e8 2c 5e 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115658: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11565a: 8d 65 f8 lea -0x8(%ebp),%esp 11565d: 5b pop %ebx 11565e: 5e pop %esi 11565f: c9 leave 115660: c3 ret 115661: 8d 76 00 lea 0x0(%esi),%esi switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; 115664: 89 33 mov %esi,(%ebx) 115666: eb eb jmp 115653 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 115668: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11566d: 8d 65 f8 lea -0x8(%ebp),%esp 115670: 5b pop %ebx 115671: 5e pop %esi 115672: c9 leave 115673: c3 ret =============================================================================== 00106da0 : void rtems_print_buffer( const unsigned char *buffer, int length ) { 106da0: 55 push %ebp 106da1: 89 e5 mov %esp,%ebp 106da3: 57 push %edi 106da4: 56 push %esi 106da5: 53 push %ebx 106da6: 81 ec 9c 00 00 00 sub $0x9c,%esp 106dac: 8b 75 0c mov 0xc(%ebp),%esi int i, mod, max; if ( !length ) return; 106daf: 85 f6 test %esi,%esi 106db1: 0f 84 00 01 00 00 je 106eb7 mod = length % 16; 106db7: 89 f0 mov %esi,%eax 106db9: 25 0f 00 00 80 and $0x8000000f,%eax 106dbe: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp) 106dc4: 0f 88 21 02 00 00 js 106feb 106dca: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax 106dd0: 89 85 58 ff ff ff mov %eax,-0xa8(%ebp) max = length - mod; 106dd6: 29 c6 sub %eax,%esi 106dd8: 89 b5 5c ff ff ff mov %esi,-0xa4(%ebp) for ( i=0 ; i 106de6: c7 85 64 ff ff ff 00 movl $0x0,-0x9c(%ebp) 106ded: 00 00 00 106df0: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx 106df6: 66 90 xchg %ax,%ax static inline void Dump_Line( const unsigned char *buffer, int length ); void rtems_print_buffer( 106df8: 8b 75 08 mov 0x8(%ebp),%esi 106dfb: 03 b5 64 ff ff ff add -0x9c(%ebp),%esi { int i; char line_buffer[120]; line_buffer[0] = '\0'; 106e01: 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, "|" ); 106e26: 31 c0 xor %eax,%eax 106e28: b9 ff ff ff ff mov $0xffffffff,%ecx 106e2d: 89 df mov %ebx,%edi 106e2f: f2 ae repnz scas %es:(%edi),%al 106e31: f7 d1 not %ecx 106e33: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) for( i=0 ; i 106e53: b8 2e 00 00 00 mov $0x2e,%eax 106e58: 50 push %eax 106e59: 53 push %ebx 106e5a: 68 1b 0e 12 00 push $0x120e1b 106e5f: 53 push %ebx 106e60: e8 57 cb 00 00 call 1139bc 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" ); 106e6e: 31 c0 xor %eax,%eax 106e70: b9 ff ff ff ff mov $0xffffffff,%ecx 106e75: 89 df mov %ebx,%edi 106e77: f2 ae repnz scas %es:(%edi),%al 106e79: f7 d1 not %ecx 106e7b: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax 106e7f: 66 c7 00 7c 0a movw $0xa7c,(%eax) 106e84: c6 40 02 00 movb $0x0,0x2(%eax) printk( line_buffer ); 106e88: 83 ec 0c sub $0xc,%esp 106e8b: 53 push %ebx 106e8c: e8 3f 18 00 00 call 1086d0 mod = length % 16; max = length - mod; for ( i=0 ; i Dump_Line( &buffer[ i ], 16 ); if ( mod ) 106ead: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx 106eb3: 85 c9 test %ecx,%ecx 106eb5: 75 08 jne 106ebf Dump_Line( &buffer[ max ], mod ); } 106eb7: 8d 65 f4 lea -0xc(%ebp),%esp 106eba: 5b pop %ebx 106ebb: 5e pop %esi 106ebc: 5f pop %edi 106ebd: c9 leave 106ebe: c3 ret for ( i=0 ; i<== NEVER TAKEN 106edd: 31 ff xor %edi,%edi 106edf: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx 106ee5: 8d 76 00 lea 0x0(%esi),%esi sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); 106ee8: 0f b6 04 3e movzbl (%esi,%edi,1),%eax 106eec: 50 push %eax 106eed: 53 push %ebx 106eee: 68 13 0e 12 00 push $0x120e13 106ef3: 53 push %ebx 106ef4: e8 c3 ca 00 00 call 1139bc 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++ ) 106f05: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp) 106f0c: 0f 8f 02 01 00 00 jg 107014 <== NEVER TAKEN 106f12: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx strcat( line_buffer, " " ); 106f18: 31 c0 xor %eax,%eax 106f1a: 66 90 xchg %ax,%ax 106f1c: b9 ff ff ff ff mov $0xffffffff,%ecx 106f21: 89 df mov %ebx,%edi 106f23: f2 ae repnz scas %es:(%edi),%al 106f25: f7 d1 not %ecx 106f27: c7 44 0b ff 20 20 20 movl $0x202020,-0x1(%ebx,%ecx,1) 106f2e: 00 line_buffer[0] = '\0'; for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 106f35: 31 c0 xor %eax,%eax 106f37: b9 ff ff ff ff mov $0xffffffff,%ecx 106f3c: 89 df mov %ebx,%edi 106f3e: f2 ae repnz scas %es:(%edi),%al 106f40: f7 d1 not %ecx 106f42: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) for( i=0 ; i 106f57: 31 ff xor %edi,%edi 106f59: 8d 76 00 lea 0x0(%esi),%esi sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); 106f5c: 0f b6 04 3e movzbl (%esi,%edi,1),%eax 106f60: 8b 15 f4 55 12 00 mov 0x1255f4,%edx 106f66: 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 106f73: b8 2e 00 00 00 mov $0x2e,%eax 106f78: 50 push %eax 106f79: 53 push %ebx 106f7a: 68 1b 0e 12 00 push $0x120e1b 106f7f: 53 push %ebx 106f80: e8 37 ca 00 00 call 1139bc 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++ ) 106f91: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp) 106f98: 7f 23 jg 106fbd <== NEVER TAKEN strcat( line_buffer, " " ); 106f9a: ba ff ff ff ff mov $0xffffffff,%edx 106f9f: 31 c0 xor %eax,%eax 106fa1: 8b b5 58 ff ff ff mov -0xa8(%ebp),%esi 106fa7: 90 nop 106fa8: 89 d1 mov %edx,%ecx 106faa: 89 df mov %ebx,%edi 106fac: f2 ae repnz scas %es:(%edi),%al 106fae: f7 d1 not %ecx 106fb0: 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" ); 106fbd: 31 c0 xor %eax,%eax 106fbf: b9 ff ff ff ff mov $0xffffffff,%ecx 106fc4: 89 df mov %ebx,%edi 106fc6: f2 ae repnz scas %es:(%edi),%al 106fc8: f7 d1 not %ecx 106fca: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax 106fce: 66 c7 00 7c 0a movw $0xa7c,(%eax) 106fd3: c6 40 02 00 movb $0x0,0x2(%eax) printk( line_buffer ); 106fd7: 83 ec 0c sub $0xc,%esp 106fda: 53 push %ebx 106fdb: e8 f0 16 00 00 call 1086d0 106fe0: 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, "|" ); 107014: 31 c0 xor %eax,%eax 107016: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 107019: 89 df mov %ebx,%edi <== NOT EXECUTED 10701b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 10701d: f7 d1 not %ecx <== NOT EXECUTED 10701f: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) <== NOT EXECUTED 107026: e9 2c ff ff ff jmp 106f57 <== NOT EXECUTED =============================================================================== 001160e0 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 1160e0: 55 push %ebp 1160e1: 89 e5 mov %esp,%ebp 1160e3: 53 push %ebx 1160e4: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 1160e7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 1160ea: 50 push %eax 1160eb: ff 75 08 pushl 0x8(%ebp) 1160ee: 68 80 1f 14 00 push $0x141f80 1160f3: e8 04 48 00 00 call 11a8fc <_Objects_Get> 1160f8: 89 c3 mov %eax,%ebx switch ( location ) { 1160fa: 83 c4 10 add $0x10,%esp 1160fd: 8b 45 f4 mov -0xc(%ebp),%eax 116100: 85 c0 test %eax,%eax 116102: 74 0c je 116110 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116104: b8 04 00 00 00 mov $0x4,%eax } 116109: 8b 5d fc mov -0x4(%ebp),%ebx 11610c: c9 leave 11610d: c3 ret 11610e: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 116110: a1 58 26 14 00 mov 0x142658,%eax 116115: 39 43 40 cmp %eax,0x40(%ebx) 116118: 74 12 je 11612c _Thread_Enable_dispatch(); 11611a: e8 65 53 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 11611f: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116124: 8b 5d fc mov -0x4(%ebp),%ebx 116127: c9 leave 116128: c3 ret 116129: 8d 76 00 lea 0x0(%esi),%esi 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 ); 11612c: 83 ec 0c sub $0xc,%esp 11612f: 8d 43 10 lea 0x10(%ebx),%eax 116132: 50 push %eax 116133: e8 14 64 00 00 call 11c54c <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116138: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 11613f: e8 40 53 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116144: 83 c4 10 add $0x10,%esp 116147: 31 c0 xor %eax,%eax 116149: eb be jmp 116109 =============================================================================== 0010b828 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10b828: 55 push %ebp 10b829: 89 e5 mov %esp,%ebp 10b82b: 57 push %edi 10b82c: 56 push %esi 10b82d: 53 push %ebx 10b82e: 83 ec 1c sub $0x1c,%esp 10b831: 8b 5d 08 mov 0x8(%ebp),%ebx 10b834: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10b837: 85 db test %ebx,%ebx 10b839: 0f 84 a9 00 00 00 je 10b8e8 return RTEMS_INVALID_NAME; if ( !id ) 10b83f: 85 f6 test %esi,%esi 10b841: 0f 84 c5 00 00 00 je 10b90c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b847: a1 6c ab 12 00 mov 0x12ab6c,%eax 10b84c: 40 inc %eax 10b84d: a3 6c ab 12 00 mov %eax,0x12ab6c * 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 ); 10b852: 83 ec 0c sub $0xc,%esp 10b855: 68 80 aa 12 00 push $0x12aa80 10b85a: e8 e9 1d 00 00 call 10d648 <_Objects_Allocate> 10b85f: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10b861: 83 c4 10 add $0x10,%esp 10b864: 85 c0 test %eax,%eax 10b866: 0f 84 8c 00 00 00 je 10b8f8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10b86c: a1 18 b1 12 00 mov 0x12b118,%eax 10b871: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10b874: 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; 10b87b: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10b882: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10b889: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10b890: 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 ); 10b897: 8d 42 54 lea 0x54(%edx),%eax 10b89a: 89 45 e4 mov %eax,-0x1c(%ebp) 10b89d: b9 38 00 00 00 mov $0x38,%ecx 10b8a2: 31 c0 xor %eax,%eax 10b8a4: 8b 7d e4 mov -0x1c(%ebp),%edi 10b8a7: f3 aa rep stos %al,%es:(%edi) 10b8a9: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10b8b0: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10b8b7: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10b8be: 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 ), 10b8c5: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b8c8: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b8cb: 8b 0d 9c aa 12 00 mov 0x12aa9c,%ecx 10b8d1: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b8d4: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10b8d7: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10b8d9: e8 8e 2e 00 00 call 10e76c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b8de: 31 c0 xor %eax,%eax } 10b8e0: 8d 65 f4 lea -0xc(%ebp),%esp 10b8e3: 5b pop %ebx 10b8e4: 5e pop %esi 10b8e5: 5f pop %edi 10b8e6: c9 leave 10b8e7: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b8e8: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b8ed: 8d 65 f4 lea -0xc(%ebp),%esp 10b8f0: 5b pop %ebx 10b8f1: 5e pop %esi 10b8f2: 5f pop %edi 10b8f3: c9 leave 10b8f4: c3 ret 10b8f5: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10b8f8: e8 6f 2e 00 00 call 10e76c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b8fd: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b902: 8d 65 f4 lea -0xc(%ebp),%esp 10b905: 5b pop %ebx 10b906: 5e pop %esi 10b907: 5f pop %edi 10b908: c9 leave 10b909: c3 ret 10b90a: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b90c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b911: 8d 65 f4 lea -0xc(%ebp),%esp 10b914: 5b pop %ebx 10b915: 5e pop %esi 10b916: 5f pop %edi 10b917: c9 leave 10b918: c3 ret =============================================================================== 00112114 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 112114: 55 push %ebp 112115: 89 e5 mov %esp,%ebp 112117: 53 push %ebx 112118: 83 ec 24 sub $0x24,%esp 11211b: 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 ) 11211e: 85 db test %ebx,%ebx 112120: 0f 84 92 00 00 00 je 1121b8 112126: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 112127: 8d 45 f4 lea -0xc(%ebp),%eax 11212a: 50 push %eax 11212b: ff 75 08 pushl 0x8(%ebp) 11212e: 68 80 aa 12 00 push $0x12aa80 112133: e8 ac ba ff ff call 10dbe4 <_Objects_Get> switch ( location ) { 112138: 83 c4 10 add $0x10,%esp 11213b: 8b 4d f4 mov -0xc(%ebp),%ecx 11213e: 85 c9 test %ecx,%ecx 112140: 74 0a je 11214c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 112142: b8 04 00 00 00 mov $0x4,%eax } 112147: 8b 5d fc mov -0x4(%ebp),%ebx 11214a: c9 leave 11214b: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 11214c: 8b 50 40 mov 0x40(%eax),%edx 11214f: 8b 52 08 mov 0x8(%edx),%edx 112152: 89 13 mov %edx,(%ebx) status->state = the_period->state; 112154: 8b 50 38 mov 0x38(%eax),%edx 112157: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 11215a: 85 d2 test %edx,%edx 11215c: 75 2a jne 112188 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 11215e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 112165: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 11216c: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 112173: 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(); 11217a: e8 ed c5 ff ff call 10e76c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11217f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112181: 8b 5d fc mov -0x4(%ebp),%ebx 112184: c9 leave 112185: c3 ret 112186: 66 90 xchg %ax,%ax } else { /* * Grab the current status. */ valid_status = 112188: 52 push %edx _Rate_monotonic_Get_status( 112189: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 11218c: 52 push %edx _Rate_monotonic_Get_status( 11218d: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 112190: 52 push %edx 112191: 50 push %eax 112192: e8 a9 97 ff ff call 10b940 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 112197: 83 c4 10 add $0x10,%esp 11219a: 84 c0 test %al,%al 11219c: 74 26 je 1121c4 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 11219e: 8b 45 e4 mov -0x1c(%ebp),%eax 1121a1: 8b 55 e8 mov -0x18(%ebp),%edx 1121a4: 89 43 08 mov %eax,0x8(%ebx) 1121a7: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 1121aa: 8b 45 ec mov -0x14(%ebp),%eax 1121ad: 8b 55 f0 mov -0x10(%ebp),%edx 1121b0: 89 43 10 mov %eax,0x10(%ebx) 1121b3: 89 53 14 mov %edx,0x14(%ebx) 1121b6: eb c2 jmp 11217a Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 1121b8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1121bd: 8b 5d fc mov -0x4(%ebp),%ebx 1121c0: c9 leave 1121c1: c3 ret 1121c2: 66 90 xchg %ax,%ax valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 1121c4: e8 a3 c5 ff ff call 10e76c <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 1121c9: b8 0b 00 00 00 mov $0xb,%eax 1121ce: e9 74 ff ff ff jmp 112147 =============================================================================== 0010bb3c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10bb3c: 55 push %ebp 10bb3d: 89 e5 mov %esp,%ebp 10bb3f: 57 push %edi 10bb40: 56 push %esi 10bb41: 53 push %ebx 10bb42: 83 ec 30 sub $0x30,%esp 10bb45: 8b 5d 08 mov 0x8(%ebp),%ebx 10bb48: 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 ); 10bb4b: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10bb4e: 50 push %eax 10bb4f: 53 push %ebx 10bb50: 68 80 aa 12 00 push $0x12aa80 10bb55: e8 8a 20 00 00 call 10dbe4 <_Objects_Get> switch ( location ) { 10bb5a: 83 c4 10 add $0x10,%esp 10bb5d: 8b 55 e4 mov -0x1c(%ebp),%edx 10bb60: 85 d2 test %edx,%edx 10bb62: 74 10 je 10bb74 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bb64: b8 04 00 00 00 mov $0x4,%eax } 10bb69: 8d 65 f4 lea -0xc(%ebp),%esp 10bb6c: 5b pop %ebx 10bb6d: 5e pop %esi 10bb6e: 5f pop %edi 10bb6f: c9 leave 10bb70: c3 ret 10bb71: 8d 76 00 lea 0x0(%esi),%esi the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10bb74: 8b 15 18 b1 12 00 mov 0x12b118,%edx 10bb7a: 39 50 40 cmp %edx,0x40(%eax) 10bb7d: 74 15 je 10bb94 _Thread_Enable_dispatch(); 10bb7f: e8 e8 2b 00 00 call 10e76c <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10bb84: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb89: 8d 65 f4 lea -0xc(%ebp),%esp 10bb8c: 5b pop %ebx 10bb8d: 5e pop %esi 10bb8e: 5f pop %edi 10bb8f: c9 leave 10bb90: c3 ret 10bb91: 8d 76 00 lea 0x0(%esi),%esi if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 10bb94: 85 f6 test %esi,%esi 10bb96: 75 1c jne 10bbb4 switch ( the_period->state ) { 10bb98: 8b 40 38 mov 0x38(%eax),%eax 10bb9b: 83 f8 04 cmp $0x4,%eax 10bb9e: 77 6c ja 10bc0c <== NEVER TAKEN 10bba0: 8b 04 85 bc 37 12 00 mov 0x1237bc(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10bba7: 89 45 d4 mov %eax,-0x2c(%ebp) 10bbaa: e8 bd 2b 00 00 call 10e76c <_Thread_Enable_dispatch> return( return_value ); 10bbaf: 8b 45 d4 mov -0x2c(%ebp),%eax 10bbb2: eb b5 jmp 10bb69 } _ISR_Disable( level ); 10bbb4: 9c pushf 10bbb5: fa cli 10bbb6: 5f pop %edi if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 10bbb7: 8b 50 38 mov 0x38(%eax),%edx 10bbba: 85 d2 test %edx,%edx 10bbbc: 74 52 je 10bc10 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 10bbbe: 83 fa 02 cmp $0x2,%edx 10bbc1: 0f 84 9e 00 00 00 je 10bc65 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 10bbc7: 83 fa 04 cmp $0x4,%edx 10bbca: 75 98 jne 10bb64 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10bbcc: 83 ec 0c sub $0xc,%esp 10bbcf: 50 push %eax 10bbd0: 89 45 d4 mov %eax,-0x2c(%ebp) 10bbd3: e8 74 fe ff ff call 10ba4c <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10bbd8: 57 push %edi 10bbd9: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10bbda: 8b 45 d4 mov -0x2c(%ebp),%eax 10bbdd: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10bbe4: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bbe7: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bbea: 5b pop %ebx 10bbeb: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10bbec: 83 c0 10 add $0x10,%eax 10bbef: 50 push %eax 10bbf0: 68 40 ac 12 00 push $0x12ac40 10bbf5: e8 a6 39 00 00 call 10f5a0 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10bbfa: e8 6d 2b 00 00 call 10e76c <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10bbff: 83 c4 10 add $0x10,%esp 10bc02: b8 06 00 00 00 mov $0x6,%eax 10bc07: e9 5d ff ff ff jmp 10bb69 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10bc0c: 31 c0 xor %eax,%eax 10bc0e: eb 97 jmp 10bba7 <== NOT EXECUTED return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); 10bc10: 57 push %edi 10bc11: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10bc12: 83 ec 0c sub $0xc,%esp 10bc15: 50 push %eax 10bc16: 89 45 d4 mov %eax,-0x2c(%ebp) 10bc19: e8 ba fd ff ff call 10b9d8 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10bc1e: 8b 45 d4 mov -0x2c(%ebp),%eax 10bc21: 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; 10bc28: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10bc2f: c7 40 2c 94 bf 10 00 movl $0x10bf94,0x2c(%eax) the_watchdog->id = id; 10bc36: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10bc39: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10bc40: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bc43: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bc46: 5e pop %esi 10bc47: 5f pop %edi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10bc48: 83 c0 10 add $0x10,%eax 10bc4b: 50 push %eax 10bc4c: 68 40 ac 12 00 push $0x12ac40 10bc51: e8 4a 39 00 00 call 10f5a0 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10bc56: e8 11 2b 00 00 call 10e76c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bc5b: 83 c4 10 add $0x10,%esp 10bc5e: 31 c0 xor %eax,%eax 10bc60: e9 04 ff ff ff jmp 10bb69 if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10bc65: 83 ec 0c sub $0xc,%esp 10bc68: 50 push %eax 10bc69: 89 45 d4 mov %eax,-0x2c(%ebp) 10bc6c: e8 db fd ff ff call 10ba4c <_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; 10bc71: 8b 45 d4 mov -0x2c(%ebp),%eax 10bc74: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10bc7b: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10bc7e: 57 push %edi 10bc7f: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10bc80: 8b 15 18 b1 12 00 mov 0x12b118,%edx 10bc86: 8b 48 08 mov 0x8(%eax),%ecx 10bc89: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10bc8c: 59 pop %ecx 10bc8d: 5b pop %ebx 10bc8e: 68 00 40 00 00 push $0x4000 10bc93: 52 push %edx 10bc94: 89 45 d4 mov %eax,-0x2c(%ebp) 10bc97: e8 f4 32 00 00 call 10ef90 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10bc9c: 9c pushf 10bc9d: fa cli 10bc9e: 59 pop %ecx local_state = the_period->state; 10bc9f: 8b 45 d4 mov -0x2c(%ebp),%eax 10bca2: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10bca5: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10bcac: 51 push %ecx 10bcad: 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 ) 10bcae: 83 c4 10 add $0x10,%esp 10bcb1: 83 fa 03 cmp $0x3,%edx 10bcb4: 74 0c je 10bcc2 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10bcb6: e8 b1 2a 00 00 call 10e76c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bcbb: 31 c0 xor %eax,%eax 10bcbd: e9 a7 fe ff ff jmp 10bb69 /* * 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 ); 10bcc2: 57 push %edi 10bcc3: 57 push %edi 10bcc4: 68 00 40 00 00 push $0x4000 10bcc9: ff 35 18 b1 12 00 pushl 0x12b118 10bccf: e8 34 27 00 00 call 10e408 <_Thread_Clear_state> 10bcd4: 83 c4 10 add $0x10,%esp 10bcd7: eb dd jmp 10bcb6 =============================================================================== 0010bcdc : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10bcdc: 55 push %ebp 10bcdd: 89 e5 mov %esp,%ebp 10bcdf: 57 push %edi 10bce0: 56 push %esi 10bce1: 53 push %ebx 10bce2: 81 ec 8c 00 00 00 sub $0x8c,%esp 10bce8: 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 ) 10bceb: 8b 7d 0c mov 0xc(%ebp),%edi 10bcee: 85 ff test %edi,%edi 10bcf0: 0f 84 be 00 00 00 je 10bdb4 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10bcf6: 83 ec 08 sub $0x8,%esp 10bcf9: 68 d0 37 12 00 push $0x1237d0 10bcfe: 56 push %esi 10bcff: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10bd02: 59 pop %ecx 10bd03: 5b pop %ebx 10bd04: 68 08 38 12 00 push $0x123808 10bd09: 56 push %esi 10bd0a: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10bd0d: 58 pop %eax 10bd0e: 5a pop %edx 10bd0f: 68 2c 38 12 00 push $0x12382c 10bd14: 56 push %esi 10bd15: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10bd18: 5b pop %ebx 10bd19: 5f pop %edi 10bd1a: 68 50 38 12 00 push $0x123850 10bd1f: 56 push %esi 10bd20: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10bd23: 5a pop %edx 10bd24: 59 pop %ecx 10bd25: 68 9c 38 12 00 push $0x12389c 10bd2a: 56 push %esi 10bd2b: 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 ; 10bd2e: 8b 1d 88 aa 12 00 mov 0x12aa88,%ebx 10bd34: 83 c4 10 add $0x10,%esp 10bd37: 3b 1d 8c aa 12 00 cmp 0x12aa8c,%ebx 10bd3d: 77 75 ja 10bdb4 <== NEVER TAKEN 10bd3f: 8d 7d 88 lea -0x78(%ebp),%edi 10bd42: eb 09 jmp 10bd4d id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10bd44: 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 ; 10bd45: 39 1d 8c aa 12 00 cmp %ebx,0x12aa8c 10bd4b: 72 67 jb 10bdb4 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10bd4d: 83 ec 08 sub $0x8,%esp 10bd50: 57 push %edi 10bd51: 53 push %ebx 10bd52: e8 11 63 00 00 call 112068 if ( status != RTEMS_SUCCESSFUL ) 10bd57: 83 c4 10 add $0x10,%esp 10bd5a: 85 c0 test %eax,%eax 10bd5c: 75 e6 jne 10bd44 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); 10bd5e: 83 ec 08 sub $0x8,%esp 10bd61: 8d 45 c0 lea -0x40(%ebp),%eax 10bd64: 50 push %eax 10bd65: 53 push %ebx 10bd66: e8 a9 63 00 00 call 112114 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10bd6b: 83 c4 0c add $0xc,%esp 10bd6e: 8d 55 e3 lea -0x1d(%ebp),%edx 10bd71: 52 push %edx 10bd72: 6a 05 push $0x5 10bd74: ff 75 c0 pushl -0x40(%ebp) 10bd77: e8 b4 02 00 00 call 10c030 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10bd7c: 59 pop %ecx 10bd7d: 58 pop %eax 10bd7e: ff 75 8c pushl -0x74(%ebp) 10bd81: ff 75 88 pushl -0x78(%ebp) 10bd84: 8d 45 e3 lea -0x1d(%ebp),%eax 10bd87: 50 push %eax 10bd88: 53 push %ebx 10bd89: 68 ee 37 12 00 push $0x1237ee 10bd8e: 56 push %esi 10bd8f: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10bd92: 8b 45 88 mov -0x78(%ebp),%eax 10bd95: 83 c4 20 add $0x20,%esp 10bd98: 85 c0 test %eax,%eax 10bd9a: 75 20 jne 10bdbc (*print)( context, "\n" ); 10bd9c: 83 ec 08 sub $0x8,%esp 10bd9f: 68 f1 19 12 00 push $0x1219f1 10bda4: 56 push %esi 10bda5: ff 55 0c call *0xc(%ebp) continue; 10bda8: 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++ ) { 10bdab: 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 ; 10bdac: 39 1d 8c aa 12 00 cmp %ebx,0x12aa8c 10bdb2: 73 99 jae 10bd4d <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10bdb4: 8d 65 f4 lea -0xc(%ebp),%esp 10bdb7: 5b pop %ebx 10bdb8: 5e pop %esi 10bdb9: 5f pop %edi 10bdba: c9 leave 10bdbb: 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 ); 10bdbc: 52 push %edx 10bdbd: 8d 55 d8 lea -0x28(%ebp),%edx 10bdc0: 52 push %edx 10bdc1: 50 push %eax 10bdc2: 8d 45 a0 lea -0x60(%ebp),%eax 10bdc5: 50 push %eax 10bdc6: e8 35 34 00 00 call 10f200 <_Timespec_Divide_by_integer> (*print)( context, 10bdcb: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10bdd0: 8b 45 dc mov -0x24(%ebp),%eax 10bdd3: f7 e9 imul %ecx 10bdd5: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10bddb: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10bde1: c1 f8 06 sar $0x6,%eax 10bde4: 8b 55 dc mov -0x24(%ebp),%edx 10bde7: c1 fa 1f sar $0x1f,%edx 10bdea: 29 d0 sub %edx,%eax 10bdec: 50 push %eax 10bded: ff 75 d8 pushl -0x28(%ebp) 10bdf0: 8b 45 9c mov -0x64(%ebp),%eax 10bdf3: f7 e9 imul %ecx 10bdf5: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10bdfb: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10be01: c1 f8 06 sar $0x6,%eax 10be04: 8b 55 9c mov -0x64(%ebp),%edx 10be07: c1 fa 1f sar $0x1f,%edx 10be0a: 29 d0 sub %edx,%eax 10be0c: 50 push %eax 10be0d: ff 75 98 pushl -0x68(%ebp) 10be10: 8b 45 94 mov -0x6c(%ebp),%eax 10be13: f7 e9 imul %ecx 10be15: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10be1b: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10be21: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10be27: c1 f8 06 sar $0x6,%eax 10be2a: 8b 55 94 mov -0x6c(%ebp),%edx 10be2d: c1 fa 1f sar $0x1f,%edx 10be30: 29 d0 sub %edx,%eax 10be32: 50 push %eax 10be33: ff 75 90 pushl -0x70(%ebp) 10be36: 68 e8 38 12 00 push $0x1238e8 10be3b: 56 push %esi 10be3c: 89 4d 84 mov %ecx,-0x7c(%ebp) 10be3f: 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); 10be42: 83 c4 2c add $0x2c,%esp 10be45: 8d 55 d8 lea -0x28(%ebp),%edx 10be48: 52 push %edx 10be49: ff 75 88 pushl -0x78(%ebp) 10be4c: 8d 45 b8 lea -0x48(%ebp),%eax 10be4f: 50 push %eax 10be50: e8 ab 33 00 00 call 10f200 <_Timespec_Divide_by_integer> (*print)( context, 10be55: 8b 4d 84 mov -0x7c(%ebp),%ecx 10be58: 8b 45 dc mov -0x24(%ebp),%eax 10be5b: f7 e9 imul %ecx 10be5d: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10be63: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10be69: c1 f8 06 sar $0x6,%eax 10be6c: 8b 55 dc mov -0x24(%ebp),%edx 10be6f: c1 fa 1f sar $0x1f,%edx 10be72: 29 d0 sub %edx,%eax 10be74: 50 push %eax 10be75: ff 75 d8 pushl -0x28(%ebp) 10be78: 8b 45 b4 mov -0x4c(%ebp),%eax 10be7b: f7 e9 imul %ecx 10be7d: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10be83: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10be89: c1 f8 06 sar $0x6,%eax 10be8c: 8b 55 b4 mov -0x4c(%ebp),%edx 10be8f: c1 fa 1f sar $0x1f,%edx 10be92: 29 d0 sub %edx,%eax 10be94: 50 push %eax 10be95: ff 75 b0 pushl -0x50(%ebp) 10be98: 8b 45 ac mov -0x54(%ebp),%eax 10be9b: f7 e9 imul %ecx 10be9d: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10bea3: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10bea9: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10beaf: c1 f8 06 sar $0x6,%eax 10beb2: 8b 55 ac mov -0x54(%ebp),%edx 10beb5: c1 fa 1f sar $0x1f,%edx 10beb8: 29 d0 sub %edx,%eax 10beba: 50 push %eax 10bebb: ff 75 a8 pushl -0x58(%ebp) 10bebe: 68 08 39 12 00 push $0x123908 10bec3: 56 push %esi 10bec4: ff 55 0c call *0xc(%ebp) 10bec7: 83 c4 30 add $0x30,%esp 10beca: e9 75 fe ff ff jmp 10bd44 =============================================================================== 0010bee8 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10bee8: 55 push %ebp 10bee9: 89 e5 mov %esp,%ebp 10beeb: 53 push %ebx 10beec: 83 ec 04 sub $0x4,%esp 10beef: a1 6c ab 12 00 mov 0x12ab6c,%eax 10bef4: 40 inc %eax 10bef5: a3 6c ab 12 00 mov %eax,0x12ab6c /* * 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 ; 10befa: 8b 1d 88 aa 12 00 mov 0x12aa88,%ebx 10bf00: 3b 1d 8c aa 12 00 cmp 0x12aa8c,%ebx 10bf06: 77 15 ja 10bf1d <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); 10bf08: 83 ec 0c sub $0xc,%esp 10bf0b: 53 push %ebx 10bf0c: e8 17 00 00 00 call 10bf28 * 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++ ) { 10bf11: 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 ; 10bf12: 83 c4 10 add $0x10,%esp 10bf15: 39 1d 8c aa 12 00 cmp %ebx,0x12aa8c 10bf1b: 73 eb jae 10bf08 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10bf1d: 8b 5d fc mov -0x4(%ebp),%ebx 10bf20: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10bf21: e9 46 28 00 00 jmp 10e76c <_Thread_Enable_dispatch> =============================================================================== 0010bf28 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10bf28: 55 push %ebp 10bf29: 89 e5 mov %esp,%ebp 10bf2b: 57 push %edi 10bf2c: 53 push %ebx 10bf2d: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10bf30: 8d 45 f4 lea -0xc(%ebp),%eax 10bf33: 50 push %eax 10bf34: ff 75 08 pushl 0x8(%ebp) 10bf37: 68 80 aa 12 00 push $0x12aa80 10bf3c: e8 a3 1c 00 00 call 10dbe4 <_Objects_Get> 10bf41: 89 c2 mov %eax,%edx switch ( location ) { 10bf43: 83 c4 10 add $0x10,%esp 10bf46: 8b 45 f4 mov -0xc(%ebp),%eax 10bf49: 85 c0 test %eax,%eax 10bf4b: 75 3b jne 10bf88 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10bf4d: 8d 5a 54 lea 0x54(%edx),%ebx 10bf50: b9 38 00 00 00 mov $0x38,%ecx 10bf55: 31 c0 xor %eax,%eax 10bf57: 89 df mov %ebx,%edi 10bf59: f3 aa rep stos %al,%es:(%edi) 10bf5b: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10bf62: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10bf69: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10bf70: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10bf77: e8 f0 27 00 00 call 10e76c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bf7c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bf7e: 8d 65 f8 lea -0x8(%ebp),%esp 10bf81: 5b pop %ebx 10bf82: 5f pop %edi 10bf83: c9 leave 10bf84: c3 ret 10bf85: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bf88: b8 04 00 00 00 mov $0x4,%eax } 10bf8d: 8d 65 f8 lea -0x8(%ebp),%esp 10bf90: 5b pop %ebx 10bf91: 5f pop %edi 10bf92: c9 leave 10bf93: c3 ret =============================================================================== 00116874 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 116874: 55 push %ebp 116875: 89 e5 mov %esp,%ebp 116877: 57 push %edi 116878: 56 push %esi 116879: 53 push %ebx 11687a: 83 ec 1c sub $0x1c,%esp 11687d: 8b 7d 08 mov 0x8(%ebp),%edi 116880: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 116883: 85 ff test %edi,%edi 116885: 0f 84 c1 00 00 00 je 11694c return RTEMS_INVALID_NAME; if ( !starting_address ) 11688b: 85 f6 test %esi,%esi 11688d: 0f 84 e1 00 00 00 je 116974 return RTEMS_INVALID_ADDRESS; if ( !id ) 116893: 8b 45 1c mov 0x1c(%ebp),%eax 116896: 85 c0 test %eax,%eax 116898: 0f 84 d6 00 00 00 je 116974 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 11689e: 83 ec 0c sub $0xc,%esp 1168a1: ff 35 60 21 14 00 pushl 0x142160 1168a7: e8 08 25 00 00 call 118db4 <_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 ); 1168ac: c7 04 24 c0 1f 14 00 movl $0x141fc0,(%esp) 1168b3: e8 54 3b 00 00 call 11a40c <_Objects_Allocate> 1168b8: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 1168ba: 83 c4 10 add $0x10,%esp 1168bd: 85 c0 test %eax,%eax 1168bf: 0f 84 bf 00 00 00 je 116984 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 1168c5: ff 75 14 pushl 0x14(%ebp) 1168c8: ff 75 10 pushl 0x10(%ebp) 1168cb: 56 push %esi 1168cc: 8d 40 68 lea 0x68(%eax),%eax 1168cf: 50 push %eax 1168d0: e8 43 37 00 00 call 11a018 <_Heap_Initialize> 1168d5: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 1168d8: 83 c4 10 add $0x10,%esp 1168db: 85 c0 test %eax,%eax 1168dd: 74 7d je 11695c return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 1168df: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 1168e2: 8b 45 10 mov 0x10(%ebp),%eax 1168e5: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 1168e8: 8b 55 14 mov 0x14(%ebp),%edx 1168eb: 89 53 58 mov %edx,0x58(%ebx) the_region->attribute_set = attribute_set; 1168ee: 8b 45 18 mov 0x18(%ebp),%eax 1168f1: 89 43 60 mov %eax,0x60(%ebx) the_region->number_of_used_blocks = 0; 1168f4: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 1168fb: 6a 06 push $0x6 1168fd: 6a 40 push $0x40 1168ff: a8 04 test $0x4,%al 116901: 0f 95 c0 setne %al 116904: 0f b6 c0 movzbl %al,%eax 116907: 50 push %eax 116908: 8d 43 10 lea 0x10(%ebx),%eax 11690b: 50 push %eax 11690c: e8 83 52 00 00 call 11bb94 <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 116911: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 116914: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116917: 8b 15 dc 1f 14 00 mov 0x141fdc,%edx 11691d: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116920: 89 7b 0c mov %edi,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 116923: 8b 55 1c mov 0x1c(%ebp),%edx 116926: 89 02 mov %eax,(%edx) 116928: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 11692b: 31 c0 xor %eax,%eax } } _RTEMS_Unlock_allocator(); 11692d: 83 ec 0c sub $0xc,%esp 116930: ff 35 60 21 14 00 pushl 0x142160 116936: 89 45 e4 mov %eax,-0x1c(%ebp) 116939: e8 be 24 00 00 call 118dfc <_API_Mutex_Unlock> return return_status; 11693e: 83 c4 10 add $0x10,%esp 116941: 8b 45 e4 mov -0x1c(%ebp),%eax } 116944: 8d 65 f4 lea -0xc(%ebp),%esp 116947: 5b pop %ebx 116948: 5e pop %esi 116949: 5f pop %edi 11694a: c9 leave 11694b: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11694c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 116951: 8d 65 f4 lea -0xc(%ebp),%esp 116954: 5b pop %ebx 116955: 5e pop %esi 116956: 5f pop %edi 116957: c9 leave 116958: c3 ret 116959: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 11695c: 83 ec 08 sub $0x8,%esp 11695f: 53 push %ebx 116960: 68 c0 1f 14 00 push $0x141fc0 116965: e8 16 3e 00 00 call 11a780 <_Objects_Free> 11696a: 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; 11696d: b8 08 00 00 00 mov $0x8,%eax 116972: eb b9 jmp 11692d if ( !starting_address ) return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; 116974: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 116979: 8d 65 f4 lea -0xc(%ebp),%esp 11697c: 5b pop %ebx 11697d: 5e pop %esi 11697e: 5f pop %edi 11697f: c9 leave 116980: c3 ret 116981: 8d 76 00 lea 0x0(%esi),%esi _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) return_status = RTEMS_TOO_MANY; 116984: b8 05 00 00 00 mov $0x5,%eax 116989: eb a2 jmp 11692d =============================================================================== 0011698c : */ rtems_status_code rtems_region_delete( rtems_id id ) { 11698c: 55 push %ebp 11698d: 89 e5 mov %esp,%ebp 11698f: 53 push %ebx 116990: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 116993: ff 35 60 21 14 00 pushl 0x142160 116999: e8 16 24 00 00 call 118db4 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 11699e: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1169a1: 8d 45 f4 lea -0xc(%ebp),%eax 1169a4: 50 push %eax 1169a5: ff 75 08 pushl 0x8(%ebp) 1169a8: 68 c0 1f 14 00 push $0x141fc0 1169ad: e8 0e 3f 00 00 call 11a8c0 <_Objects_Get_no_protection> switch ( location ) { 1169b2: 83 c4 10 add $0x10,%esp 1169b5: 8b 5d f4 mov -0xc(%ebp),%ebx 1169b8: 85 db test %ebx,%ebx 1169ba: 74 1c je 1169d8 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1169bc: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1169c1: 83 ec 0c sub $0xc,%esp 1169c4: ff 35 60 21 14 00 pushl 0x142160 1169ca: e8 2d 24 00 00 call 118dfc <_API_Mutex_Unlock> return return_status; } 1169cf: 89 d8 mov %ebx,%eax 1169d1: 8b 5d fc mov -0x4(%ebp),%ebx 1169d4: c9 leave 1169d5: c3 ret 1169d6: 66 90 xchg %ax,%ax 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 ) 1169d8: 8b 48 64 mov 0x64(%eax),%ecx 1169db: 85 c9 test %ecx,%ecx 1169dd: 74 09 je 1169e8 return_status = RTEMS_RESOURCE_IN_USE; 1169df: bb 0c 00 00 00 mov $0xc,%ebx 1169e4: eb db jmp 1169c1 1169e6: 66 90 xchg %ax,%ax else { _Objects_Close( &_Region_Information, &the_region->Object ); 1169e8: 83 ec 08 sub $0x8,%esp 1169eb: 50 push %eax 1169ec: 68 c0 1f 14 00 push $0x141fc0 1169f1: 89 45 e4 mov %eax,-0x1c(%ebp) 1169f4: e8 8f 3a 00 00 call 11a488 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1169f9: 58 pop %eax 1169fa: 5a pop %edx 1169fb: 8b 45 e4 mov -0x1c(%ebp),%eax 1169fe: 50 push %eax 1169ff: 68 c0 1f 14 00 push $0x141fc0 116a04: e8 77 3d 00 00 call 11a780 <_Objects_Free> 116a09: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 116a0c: 31 db xor %ebx,%ebx 116a0e: eb b1 jmp 1169c1 =============================================================================== 00116a10 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 116a10: 55 push %ebp 116a11: 89 e5 mov %esp,%ebp 116a13: 56 push %esi 116a14: 53 push %ebx 116a15: 83 ec 10 sub $0x10,%esp 116a18: 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 ) 116a1b: 85 db test %ebx,%ebx 116a1d: 74 75 je 116a94 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 116a1f: 83 ec 0c sub $0xc,%esp 116a22: ff 35 60 21 14 00 pushl 0x142160 116a28: e8 87 23 00 00 call 118db4 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 116a2d: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 116a30: 8d 45 f0 lea -0x10(%ebp),%eax 116a33: 50 push %eax 116a34: ff 75 08 pushl 0x8(%ebp) 116a37: 68 c0 1f 14 00 push $0x141fc0 116a3c: e8 7f 3e 00 00 call 11a8c0 <_Objects_Get_no_protection> 116a41: 89 c6 mov %eax,%esi switch ( location ) { 116a43: 83 c4 10 add $0x10,%esp 116a46: 8b 45 f0 mov -0x10(%ebp),%eax 116a49: 85 c0 test %eax,%eax 116a4b: 74 1f je 116a6c break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 116a4d: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 116a52: 83 ec 0c sub $0xc,%esp 116a55: ff 35 60 21 14 00 pushl 0x142160 116a5b: e8 9c 23 00 00 call 118dfc <_API_Mutex_Unlock> return return_status; 116a60: 83 c4 10 add $0x10,%esp } 116a63: 89 d8 mov %ebx,%eax 116a65: 8d 65 f8 lea -0x8(%ebp),%esp 116a68: 5b pop %ebx 116a69: 5e pop %esi 116a6a: c9 leave 116a6b: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 116a6c: 8d 45 f4 lea -0xc(%ebp),%eax 116a6f: 50 push %eax 116a70: ff 75 10 pushl 0x10(%ebp) 116a73: 53 push %ebx 116a74: 8d 46 68 lea 0x68(%esi),%eax 116a77: 50 push %eax 116a78: e8 7b 2f 00 00 call 1199f8 <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 116a7d: 83 c4 10 add $0x10,%esp 116a80: 84 c0 test %al,%al 116a82: 74 20 je 116aa4 the_region->length += amount_extended; 116a84: 8b 45 f4 mov -0xc(%ebp),%eax 116a87: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 116a8a: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 116a8d: 31 db xor %ebx,%ebx 116a8f: eb c1 jmp 116a52 116a91: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 116a94: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 116a99: 89 d8 mov %ebx,%eax 116a9b: 8d 65 f8 lea -0x8(%ebp),%esp 116a9e: 5b pop %ebx 116a9f: 5e pop %esi 116aa0: c9 leave 116aa1: c3 ret 116aa2: 66 90 xchg %ax,%ax 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; 116aa4: bb 09 00 00 00 mov $0x9,%ebx 116aa9: eb a7 jmp 116a52 =============================================================================== 00116aac : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 116aac: 55 push %ebp 116aad: 89 e5 mov %esp,%ebp 116aaf: 53 push %ebx 116ab0: 83 ec 14 sub $0x14,%esp 116ab3: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 116ab6: 85 db test %ebx,%ebx 116ab8: 74 76 je 116b30 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 116aba: 83 ec 0c sub $0xc,%esp 116abd: ff 35 60 21 14 00 pushl 0x142160 116ac3: e8 ec 22 00 00 call 118db4 <_API_Mutex_Lock> 116ac8: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 116acb: 8d 45 f4 lea -0xc(%ebp),%eax 116ace: 50 push %eax 116acf: ff 75 08 pushl 0x8(%ebp) 116ad2: 68 c0 1f 14 00 push $0x141fc0 116ad7: e8 e4 3d 00 00 call 11a8c0 <_Objects_Get_no_protection> switch ( location ) { 116adc: 83 c4 10 add $0x10,%esp 116adf: 8b 55 f4 mov -0xc(%ebp),%edx 116ae2: 85 d2 test %edx,%edx 116ae4: 74 1e je 116b04 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 116ae6: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 116aeb: 83 ec 0c sub $0xc,%esp 116aee: ff 35 60 21 14 00 pushl 0x142160 116af4: e8 03 23 00 00 call 118dfc <_API_Mutex_Unlock> return return_status; 116af9: 83 c4 10 add $0x10,%esp } 116afc: 89 d8 mov %ebx,%eax 116afe: 8b 5d fc mov -0x4(%ebp),%ebx 116b01: c9 leave 116b02: c3 ret 116b03: 90 nop the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 116b04: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 116b0b: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 116b12: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 116b19: 83 ec 08 sub $0x8,%esp 116b1c: 53 push %ebx 116b1d: 83 c0 68 add $0x68,%eax 116b20: 50 push %eax 116b21: e8 ce 32 00 00 call 119df4 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 116b26: 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; 116b29: 31 db xor %ebx,%ebx break; 116b2b: eb be jmp 116aeb 116b2d: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 116b30: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 116b35: 89 d8 mov %ebx,%eax 116b37: 8b 5d fc mov -0x4(%ebp),%ebx 116b3a: c9 leave 116b3b: c3 ret =============================================================================== 00116bb4 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 116bb4: 55 push %ebp 116bb5: 89 e5 mov %esp,%ebp 116bb7: 57 push %edi 116bb8: 56 push %esi 116bb9: 53 push %ebx 116bba: 83 ec 2c sub $0x2c,%esp 116bbd: 8b 75 0c mov 0xc(%ebp),%esi 116bc0: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 116bc3: 85 db test %ebx,%ebx 116bc5: 0f 84 a1 00 00 00 je 116c6c return RTEMS_INVALID_ADDRESS; *segment = NULL; 116bcb: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 116bd1: 85 f6 test %esi,%esi 116bd3: 75 0f jne 116be4 return RTEMS_INVALID_SIZE; 116bd5: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 116bda: 8d 65 f4 lea -0xc(%ebp),%esp 116bdd: 5b pop %ebx 116bde: 5e pop %esi 116bdf: 5f pop %edi 116be0: c9 leave 116be1: c3 ret 116be2: 66 90 xchg %ax,%ax *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 116be4: 83 ec 0c sub $0xc,%esp 116be7: ff 35 60 21 14 00 pushl 0x142160 116bed: e8 c2 21 00 00 call 118db4 <_API_Mutex_Lock> executing = _Thread_Executing; 116bf2: a1 58 26 14 00 mov 0x142658,%eax 116bf7: 89 45 d4 mov %eax,-0x2c(%ebp) 116bfa: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 116bfd: 8d 45 e4 lea -0x1c(%ebp),%eax 116c00: 50 push %eax 116c01: ff 75 08 pushl 0x8(%ebp) 116c04: 68 c0 1f 14 00 push $0x141fc0 116c09: e8 b2 3c 00 00 call 11a8c0 <_Objects_Get_no_protection> 116c0e: 89 c7 mov %eax,%edi switch ( location ) { 116c10: 83 c4 10 add $0x10,%esp 116c13: 8b 45 e4 mov -0x1c(%ebp),%eax 116c16: 85 c0 test %eax,%eax 116c18: 75 2a jne 116c44 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 116c1a: 3b 77 5c cmp 0x5c(%edi),%esi 116c1d: 76 2d jbe 116c4c return_status = RTEMS_INVALID_SIZE; 116c1f: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116c24: 83 ec 0c sub $0xc,%esp 116c27: ff 35 60 21 14 00 pushl 0x142160 116c2d: 89 45 d0 mov %eax,-0x30(%ebp) 116c30: e8 c7 21 00 00 call 118dfc <_API_Mutex_Unlock> return return_status; 116c35: 83 c4 10 add $0x10,%esp 116c38: 8b 45 d0 mov -0x30(%ebp),%eax } 116c3b: 8d 65 f4 lea -0xc(%ebp),%esp 116c3e: 5b pop %ebx 116c3f: 5e pop %esi 116c40: 5f pop %edi 116c41: c9 leave 116c42: c3 ret 116c43: 90 nop break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 116c44: b8 04 00 00 00 mov $0x4,%eax 116c49: eb d9 jmp 116c24 116c4b: 90 nop * @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 ); 116c4c: 6a 00 push $0x0 116c4e: 6a 00 push $0x0 116c50: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 116c51: 8d 47 68 lea 0x68(%edi),%eax 116c54: 50 push %eax 116c55: e8 ca 2b 00 00 call 119824 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 116c5a: 83 c4 10 add $0x10,%esp 116c5d: 85 c0 test %eax,%eax 116c5f: 74 17 je 116c78 the_region->number_of_used_blocks += 1; 116c61: ff 47 64 incl 0x64(%edi) *segment = the_segment; 116c64: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 116c66: 31 c0 xor %eax,%eax 116c68: eb ba jmp 116c24 116c6a: 66 90 xchg %ax,%ax rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; 116c6c: b8 09 00 00 00 mov $0x9,%eax 116c71: e9 64 ff ff ff jmp 116bda 116c76: 66 90 xchg %ax,%ax 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 ) ) { 116c78: f6 45 10 01 testb $0x1,0x10(%ebp) 116c7c: 74 07 je 116c85 return_status = RTEMS_UNSATISFIED; 116c7e: b8 0d 00 00 00 mov $0xd,%eax 116c83: eb 9f jmp 116c24 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 116c85: a1 ac 20 14 00 mov 0x1420ac,%eax 116c8a: 40 inc %eax 116c8b: a3 ac 20 14 00 mov %eax,0x1420ac * 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(); 116c90: 83 ec 0c sub $0xc,%esp 116c93: ff 35 60 21 14 00 pushl 0x142160 116c99: e8 5e 21 00 00 call 118dfc <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 116c9e: 8d 47 10 lea 0x10(%edi),%eax 116ca1: 8b 55 d4 mov -0x2c(%ebp),%edx 116ca4: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 116ca7: 8b 4d 08 mov 0x8(%ebp),%ecx 116caa: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 116cad: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 116cb0: 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; 116cb3: 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 ); 116cba: 83 c4 0c add $0xc,%esp 116cbd: 68 58 bc 11 00 push $0x11bc58 116cc2: ff 75 14 pushl 0x14(%ebp) 116cc5: 50 push %eax 116cc6: e8 61 4c 00 00 call 11b92c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 116ccb: e8 b4 47 00 00 call 11b484 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 116cd0: 8b 55 d4 mov -0x2c(%ebp),%edx 116cd3: 8b 42 34 mov 0x34(%edx),%eax 116cd6: 83 c4 10 add $0x10,%esp 116cd9: e9 fc fe ff ff jmp 116bda =============================================================================== 00116d94 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 116d94: 55 push %ebp 116d95: 89 e5 mov %esp,%ebp 116d97: 56 push %esi 116d98: 53 push %ebx 116d99: 83 ec 20 sub $0x20,%esp 116d9c: 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 ) 116d9f: 85 db test %ebx,%ebx 116da1: 0f 84 89 00 00 00 je 116e30 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 116da7: 83 ec 0c sub $0xc,%esp 116daa: ff 35 60 21 14 00 pushl 0x142160 116db0: e8 ff 1f 00 00 call 118db4 <_API_Mutex_Lock> 116db5: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 116db8: 8d 45 f0 lea -0x10(%ebp),%eax 116dbb: 50 push %eax 116dbc: ff 75 08 pushl 0x8(%ebp) 116dbf: 68 c0 1f 14 00 push $0x141fc0 116dc4: e8 f7 3a 00 00 call 11a8c0 <_Objects_Get_no_protection> 116dc9: 89 c6 mov %eax,%esi switch ( location ) { 116dcb: 83 c4 10 add $0x10,%esp 116dce: 8b 45 f0 mov -0x10(%ebp),%eax 116dd1: 85 c0 test %eax,%eax 116dd3: 74 1f je 116df4 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116dd5: 83 ec 0c sub $0xc,%esp 116dd8: ff 35 60 21 14 00 pushl 0x142160 116dde: e8 19 20 00 00 call 118dfc <_API_Mutex_Unlock> return return_status; 116de3: 83 c4 10 add $0x10,%esp 116de6: b8 04 00 00 00 mov $0x4,%eax } 116deb: 8d 65 f8 lea -0x8(%ebp),%esp 116dee: 5b pop %ebx 116def: 5e pop %esi 116df0: c9 leave 116df1: c3 ret 116df2: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 116df4: 83 ec 0c sub $0xc,%esp 116df7: 8d 45 f4 lea -0xc(%ebp),%eax 116dfa: 50 push %eax 116dfb: 8d 45 ec lea -0x14(%ebp),%eax 116dfe: 50 push %eax 116dff: ff 75 10 pushl 0x10(%ebp) 116e02: ff 75 0c pushl 0xc(%ebp) 116e05: 8d 46 68 lea 0x68(%esi),%eax 116e08: 50 push %eax 116e09: e8 12 34 00 00 call 11a220 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 116e0e: 8b 55 ec mov -0x14(%ebp),%edx 116e11: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 116e13: 83 c4 20 add $0x20,%esp 116e16: 85 c0 test %eax,%eax 116e18: 75 22 jne 116e3c _Region_Process_queue( the_region ); /* unlocks allocator */ 116e1a: 83 ec 0c sub $0xc,%esp 116e1d: 56 push %esi 116e1e: e8 7d 7e 00 00 call 11eca0 <_Region_Process_queue> 116e23: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 116e26: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 116e28: 8d 65 f8 lea -0x8(%ebp),%esp 116e2b: 5b pop %ebx 116e2c: 5e pop %esi 116e2d: c9 leave 116e2e: c3 ret 116e2f: 90 nop rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) return RTEMS_INVALID_ADDRESS; 116e30: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 116e35: 8d 65 f8 lea -0x8(%ebp),%esp 116e38: 5b pop %ebx 116e39: 5e pop %esi 116e3a: c9 leave 116e3b: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 116e3c: 83 ec 0c sub $0xc,%esp 116e3f: ff 35 60 21 14 00 pushl 0x142160 116e45: 89 45 e4 mov %eax,-0x1c(%ebp) 116e48: e8 af 1f 00 00 call 118dfc <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 116e4d: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 116e50: 8b 45 e4 mov -0x1c(%ebp),%eax 116e53: 48 dec %eax 116e54: 0f 94 c0 sete %al 116e57: 0f b6 c0 movzbl %al,%eax 116e5a: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 116e61: 8d 65 f8 lea -0x8(%ebp),%esp 116e64: 5b pop %ebx 116e65: 5e pop %esi 116e66: c9 leave 116e67: c3 ret =============================================================================== 00116e68 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 116e68: 55 push %ebp 116e69: 89 e5 mov %esp,%ebp 116e6b: 53 push %ebx 116e6c: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 116e6f: ff 35 60 21 14 00 pushl 0x142160 116e75: e8 3a 1f 00 00 call 118db4 <_API_Mutex_Lock> 116e7a: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 116e7d: 8d 45 f4 lea -0xc(%ebp),%eax 116e80: 50 push %eax 116e81: ff 75 08 pushl 0x8(%ebp) 116e84: 68 c0 1f 14 00 push $0x141fc0 116e89: e8 32 3a 00 00 call 11a8c0 <_Objects_Get_no_protection> 116e8e: 89 c3 mov %eax,%ebx switch ( location ) { 116e90: 83 c4 10 add $0x10,%esp 116e93: 8b 45 f4 mov -0xc(%ebp),%eax 116e96: 85 c0 test %eax,%eax 116e98: 75 1e jne 116eb8 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 116e9a: 83 ec 08 sub $0x8,%esp 116e9d: ff 75 0c pushl 0xc(%ebp) 116ea0: 8d 43 68 lea 0x68(%ebx),%eax 116ea3: 50 push %eax 116ea4: e8 e7 2d 00 00 call 119c90 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 116ea9: 83 c4 10 add $0x10,%esp 116eac: 84 c0 test %al,%al 116eae: 75 28 jne 116ed8 return_status = RTEMS_INVALID_ADDRESS; 116eb0: bb 09 00 00 00 mov $0x9,%ebx 116eb5: eb 06 jmp 116ebd 116eb7: 90 nop break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 116eb8: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 116ebd: 83 ec 0c sub $0xc,%esp 116ec0: ff 35 60 21 14 00 pushl 0x142160 116ec6: e8 31 1f 00 00 call 118dfc <_API_Mutex_Unlock> return return_status; 116ecb: 83 c4 10 add $0x10,%esp } 116ece: 89 d8 mov %ebx,%eax 116ed0: 8b 5d fc mov -0x4(%ebp),%ebx 116ed3: c9 leave 116ed4: c3 ret 116ed5: 8d 76 00 lea 0x0(%esi),%esi _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 116ed8: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 116edb: 83 ec 0c sub $0xc,%esp 116ede: 53 push %ebx 116edf: e8 bc 7d 00 00 call 11eca0 <_Region_Process_queue> return RTEMS_SUCCESSFUL; 116ee4: 83 c4 10 add $0x10,%esp 116ee7: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 116ee9: 89 d8 mov %ebx,%eax 116eeb: 8b 5d fc mov -0x4(%ebp),%ebx 116eee: c9 leave 116eef: c3 ret =============================================================================== 0010a92c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10a92c: 55 push %ebp 10a92d: 89 e5 mov %esp,%ebp 10a92f: 57 push %edi 10a930: 56 push %esi 10a931: 53 push %ebx 10a932: 83 ec 3c sub $0x3c,%esp 10a935: 8b 75 08 mov 0x8(%ebp),%esi 10a938: 8b 5d 10 mov 0x10(%ebp),%ebx 10a93b: 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 ) ) 10a93e: 85 f6 test %esi,%esi 10a940: 74 4a je 10a98c return RTEMS_INVALID_NAME; if ( !id ) 10a942: 85 ff test %edi,%edi 10a944: 0f 84 f6 00 00 00 je 10aa40 <== NEVER TAKEN return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10a94a: 89 da mov %ebx,%edx 10a94c: 81 e2 c0 00 00 00 and $0xc0,%edx 10a952: 74 48 je 10a99c */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10a954: 89 d8 mov %ebx,%eax 10a956: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10a959: 83 f8 10 cmp $0x10,%eax 10a95c: 74 0e je 10a96c } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10a95e: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10a963: 8d 65 f4 lea -0xc(%ebp),%esp 10a966: 5b pop %ebx 10a967: 5e pop %esi 10a968: 5f pop %edi 10a969: c9 leave 10a96a: c3 ret 10a96b: 90 nop #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10a96c: f6 c3 04 test $0x4,%bl 10a96f: 74 ed je 10a95e _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10a971: 81 fa c0 00 00 00 cmp $0xc0,%edx 10a977: 74 e5 je 10a95e 10a979: 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 ) ) 10a97e: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10a982: 76 1f jbe 10a9a3 return RTEMS_INVALID_NUMBER; 10a984: b8 0a 00 00 00 mov $0xa,%eax 10a989: eb d8 jmp 10a963 10a98b: 90 nop 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; 10a98c: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10a991: 8d 65 f4 lea -0xc(%ebp),%esp 10a994: 5b pop %ebx 10a995: 5e pop %esi 10a996: 5f pop %edi 10a997: c9 leave 10a998: c3 ret 10a999: 8d 76 00 lea 0x0(%esi),%esi 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 ) ) 10a99c: 89 d9 mov %ebx,%ecx 10a99e: 83 e1 30 and $0x30,%ecx 10a9a1: 75 db jne 10a97e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a9a3: a1 ec 77 12 00 mov 0x1277ec,%eax 10a9a8: 40 inc %eax 10a9a9: a3 ec 77 12 00 mov %eax,0x1277ec * 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 ); 10a9ae: 83 ec 0c sub $0xc,%esp 10a9b1: 68 40 77 12 00 push $0x127740 10a9b6: 89 4d c4 mov %ecx,-0x3c(%ebp) 10a9b9: e8 86 13 00 00 call 10bd44 <_Objects_Allocate> 10a9be: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10a9c0: 83 c4 10 add $0x10,%esp 10a9c3: 85 c0 test %eax,%eax 10a9c5: 8b 4d c4 mov -0x3c(%ebp),%ecx 10a9c8: 0f 84 ba 00 00 00 je 10aa88 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10a9ce: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10a9d1: 85 c9 test %ecx,%ecx 10a9d3: 74 77 je 10aa4c /* * 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; 10a9d5: 31 c0 xor %eax,%eax 10a9d7: f6 c3 04 test $0x4,%bl 10a9da: 0f 95 c0 setne %al 10a9dd: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10a9e0: 83 f9 10 cmp $0x10,%ecx 10a9e3: 0f 84 ae 00 00 00 je 10aa97 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; 10a9e9: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10a9f0: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10a9f4: 50 push %eax 10a9f5: 31 c0 xor %eax,%eax 10a9f7: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10a9fb: 0f 94 c0 sete %al 10a9fe: 50 push %eax 10a9ff: 8d 45 d0 lea -0x30(%ebp),%eax 10aa02: 50 push %eax 10aa03: 8d 42 14 lea 0x14(%edx),%eax 10aa06: 50 push %eax 10aa07: 89 55 c4 mov %edx,-0x3c(%ebp) 10aa0a: e8 2d 0b 00 00 call 10b53c <_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 ) { 10aa0f: 83 c4 10 add $0x10,%esp 10aa12: 83 f8 06 cmp $0x6,%eax 10aa15: 8b 55 c4 mov -0x3c(%ebp),%edx 10aa18: 0f 84 a9 00 00 00 je 10aac7 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10aa1e: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10aa21: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10aa24: 8b 0d 5c 77 12 00 mov 0x12775c,%ecx 10aa2a: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10aa2d: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10aa30: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10aa32: e8 49 23 00 00 call 10cd80 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10aa37: 31 c0 xor %eax,%eax 10aa39: e9 25 ff ff ff jmp 10a963 10aa3e: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10aa40: b8 09 00 00 00 mov $0x9,%eax 10aa45: e9 19 ff ff ff jmp 10a963 10aa4a: 66 90 xchg %ax,%ax */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10aa4c: 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; 10aa53: 31 c0 xor %eax,%eax 10aa55: f6 c3 04 test $0x4,%bl 10aa58: 0f 95 c0 setne %al 10aa5b: 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; 10aa5e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10aa65: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10aa6c: 51 push %ecx 10aa6d: ff 75 0c pushl 0xc(%ebp) 10aa70: 8d 45 e0 lea -0x20(%ebp),%eax 10aa73: 50 push %eax 10aa74: 8d 42 14 lea 0x14(%edx),%eax 10aa77: 50 push %eax 10aa78: 89 55 c4 mov %edx,-0x3c(%ebp) 10aa7b: e8 4c 0d 00 00 call 10b7cc <_CORE_semaphore_Initialize> 10aa80: 83 c4 10 add $0x10,%esp 10aa83: 8b 55 c4 mov -0x3c(%ebp),%edx 10aa86: eb 96 jmp 10aa1e _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10aa88: e8 f3 22 00 00 call 10cd80 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10aa8d: b8 05 00 00 00 mov $0x5,%eax 10aa92: e9 cc fe ff ff jmp 10a963 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; 10aa97: 8b 45 14 mov 0x14(%ebp),%eax 10aa9a: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10aa9d: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10aaa4: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10aaa8: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10aaac: 0f 85 42 ff ff ff jne 10a9f4 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10aab2: f6 c3 40 test $0x40,%bl 10aab5: 74 30 je 10aae7 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10aab7: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10aabe: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10aac2: e9 2d ff ff ff jmp 10a9f4 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10aac7: 83 ec 08 sub $0x8,%esp 10aaca: 52 push %edx 10aacb: 68 40 77 12 00 push $0x127740 10aad0: e8 e3 15 00 00 call 10c0b8 <_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(); 10aad5: e8 a6 22 00 00 call 10cd80 <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10aada: 83 c4 10 add $0x10,%esp 10aadd: b8 13 00 00 00 mov $0x13,%eax 10aae2: e9 7c fe ff ff jmp 10a963 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 ) ) { 10aae7: 81 e3 80 00 00 00 and $0x80,%ebx 10aaed: 0f 84 01 ff ff ff je 10a9f4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10aaf3: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10aafa: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10aafe: e9 f1 fe ff ff jmp 10a9f4 =============================================================================== 0010ab04 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10ab04: 55 push %ebp 10ab05: 89 e5 mov %esp,%ebp 10ab07: 53 push %ebx 10ab08: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10ab0b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10ab0e: 50 push %eax 10ab0f: ff 75 08 pushl 0x8(%ebp) 10ab12: 68 40 77 12 00 push $0x127740 10ab17: e8 dc 16 00 00 call 10c1f8 <_Objects_Get> 10ab1c: 89 c3 mov %eax,%ebx switch ( location ) { 10ab1e: 83 c4 10 add $0x10,%esp 10ab21: 8b 4d f4 mov -0xc(%ebp),%ecx 10ab24: 85 c9 test %ecx,%ecx 10ab26: 74 0c je 10ab34 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ab28: b8 04 00 00 00 mov $0x4,%eax } 10ab2d: 8b 5d fc mov -0x4(%ebp),%ebx 10ab30: c9 leave 10ab31: c3 ret 10ab32: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 10ab34: 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) ) { 10ab37: 83 e0 30 and $0x30,%eax 10ab3a: 74 58 je 10ab94 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10ab3c: 8b 53 64 mov 0x64(%ebx),%edx 10ab3f: 85 d2 test %edx,%edx 10ab41: 75 15 jne 10ab58 10ab43: 83 f8 20 cmp $0x20,%eax 10ab46: 74 10 je 10ab58 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10ab48: e8 33 22 00 00 call 10cd80 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10ab4d: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ab52: 8b 5d fc mov -0x4(%ebp),%ebx 10ab55: c9 leave 10ab56: c3 ret 10ab57: 90 nop !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10ab58: 50 push %eax 10ab59: 6a 04 push $0x4 10ab5b: 6a 00 push $0x0 10ab5d: 8d 43 14 lea 0x14(%ebx),%eax 10ab60: 50 push %eax 10ab61: e8 ca 09 00 00 call 10b530 <_CORE_mutex_Flush> 10ab66: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10ab69: 83 ec 08 sub $0x8,%esp 10ab6c: 53 push %ebx 10ab6d: 68 40 77 12 00 push $0x127740 10ab72: e8 49 12 00 00 call 10bdc0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10ab77: 58 pop %eax 10ab78: 5a pop %edx 10ab79: 53 push %ebx 10ab7a: 68 40 77 12 00 push $0x127740 10ab7f: e8 34 15 00 00 call 10c0b8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10ab84: e8 f7 21 00 00 call 10cd80 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ab89: 83 c4 10 add $0x10,%esp 10ab8c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ab8e: 8b 5d fc mov -0x4(%ebp),%ebx 10ab91: c9 leave 10ab92: c3 ret 10ab93: 90 nop &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10ab94: 51 push %ecx 10ab95: 6a 02 push $0x2 10ab97: 6a 00 push $0x0 10ab99: 8d 43 14 lea 0x14(%ebx),%eax 10ab9c: 50 push %eax 10ab9d: e8 1e 0c 00 00 call 10b7c0 <_CORE_semaphore_Flush> 10aba2: 83 c4 10 add $0x10,%esp 10aba5: eb c2 jmp 10ab69 =============================================================================== 0010aba8 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10aba8: 55 push %ebp 10aba9: 89 e5 mov %esp,%ebp 10abab: 57 push %edi 10abac: 56 push %esi 10abad: 53 push %ebx 10abae: 83 ec 1c sub $0x1c,%esp 10abb1: 8b 5d 08 mov 0x8(%ebp),%ebx 10abb4: 8b 75 0c mov 0xc(%ebp),%esi 10abb7: 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 ); 10abba: 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 ); 10abbd: 50 push %eax 10abbe: 8d 45 e4 lea -0x1c(%ebp),%eax 10abc1: 50 push %eax 10abc2: 53 push %ebx 10abc3: 68 40 77 12 00 push $0x127740 10abc8: e8 d3 15 00 00 call 10c1a0 <_Objects_Get_isr_disable> switch ( location ) { 10abcd: 83 c4 10 add $0x10,%esp 10abd0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10abd3: 85 c9 test %ecx,%ecx 10abd5: 74 0d je 10abe4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10abd7: b8 04 00 00 00 mov $0x4,%eax } 10abdc: 8d 65 f4 lea -0xc(%ebp),%esp 10abdf: 5b pop %ebx 10abe0: 5e pop %esi 10abe1: 5f pop %edi 10abe2: c9 leave 10abe3: 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) ) { 10abe4: f6 40 10 30 testb $0x30,0x10(%eax) 10abe8: 74 36 je 10ac20 _CORE_mutex_Seize( 10abea: 83 ec 0c sub $0xc,%esp 10abed: ff 75 e0 pushl -0x20(%ebp) 10abf0: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10abf1: 83 e6 01 and $0x1,%esi 10abf4: 83 f6 01 xor $0x1,%esi 10abf7: 56 push %esi 10abf8: 53 push %ebx 10abf9: 83 c0 14 add $0x14,%eax 10abfc: 50 push %eax 10abfd: e8 32 0a 00 00 call 10b634 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10ac02: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10ac05: a1 98 7d 12 00 mov 0x127d98,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10ac0a: ff 70 34 pushl 0x34(%eax) 10ac0d: e8 12 01 00 00 call 10ad24 <_Semaphore_Translate_core_mutex_return_code> 10ac12: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10ac15: 8d 65 f4 lea -0xc(%ebp),%esp 10ac18: 5b pop %ebx 10ac19: 5e pop %esi 10ac1a: 5f pop %edi 10ac1b: c9 leave 10ac1c: c3 ret 10ac1d: 8d 76 00 lea 0x0(%esi),%esi { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10ac20: 8b 15 98 7d 12 00 mov 0x127d98,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10ac26: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10ac2d: 8b 48 5c mov 0x5c(%eax),%ecx 10ac30: 85 c9 test %ecx,%ecx 10ac32: 75 2c jne 10ac60 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10ac34: 83 e6 01 and $0x1,%esi 10ac37: 74 33 je 10ac6c _ISR_Enable( *level_p ); 10ac39: ff 75 e0 pushl -0x20(%ebp) 10ac3c: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10ac3d: 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( 10ac44: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10ac47: a1 98 7d 12 00 mov 0x127d98,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10ac4c: ff 70 34 pushl 0x34(%eax) 10ac4f: e8 e0 00 00 00 call 10ad34 <_Semaphore_Translate_core_semaphore_return_code> 10ac54: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10ac57: 8d 65 f4 lea -0xc(%ebp),%esp 10ac5a: 5b pop %ebx 10ac5b: 5e pop %esi 10ac5c: 5f pop %edi 10ac5d: c9 leave 10ac5e: c3 ret 10ac5f: 90 nop /* 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; 10ac60: 49 dec %ecx 10ac61: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10ac64: ff 75 e0 pushl -0x20(%ebp) 10ac67: 9d popf 10ac68: eb da jmp 10ac44 10ac6a: 66 90 xchg %ax,%ax 10ac6c: 8b 0d ec 77 12 00 mov 0x1277ec,%ecx 10ac72: 41 inc %ecx 10ac73: 89 0d ec 77 12 00 mov %ecx,0x1277ec 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; 10ac79: 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; 10ac80: 83 c0 14 add $0x14,%eax 10ac83: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10ac86: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10ac89: ff 75 e0 pushl -0x20(%ebp) 10ac8c: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10ac8d: 52 push %edx 10ac8e: 68 54 d5 10 00 push $0x10d554 10ac93: 57 push %edi 10ac94: 50 push %eax 10ac95: e8 8e 25 00 00 call 10d228 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10ac9a: e8 e1 20 00 00 call 10cd80 <_Thread_Enable_dispatch> 10ac9f: 83 c4 10 add $0x10,%esp 10aca2: eb a0 jmp 10ac44 =============================================================================== 0010aca4 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10aca4: 55 push %ebp 10aca5: 89 e5 mov %esp,%ebp 10aca7: 53 push %ebx 10aca8: 83 ec 18 sub $0x18,%esp 10acab: 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 ); 10acae: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10acb1: 50 push %eax 10acb2: 53 push %ebx 10acb3: 68 40 77 12 00 push $0x127740 10acb8: e8 3b 15 00 00 call 10c1f8 <_Objects_Get> switch ( location ) { 10acbd: 83 c4 10 add $0x10,%esp 10acc0: 8b 55 f4 mov -0xc(%ebp),%edx 10acc3: 85 d2 test %edx,%edx 10acc5: 74 0d je 10acd4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10acc7: b8 04 00 00 00 mov $0x4,%eax } 10accc: 8b 5d fc mov -0x4(%ebp),%ebx 10accf: c9 leave 10acd0: c3 ret 10acd1: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10acd4: f6 40 10 30 testb $0x30,0x10(%eax) 10acd8: 75 26 jne 10ad00 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10acda: 52 push %edx 10acdb: 6a 00 push $0x0 10acdd: 53 push %ebx 10acde: 83 c0 14 add $0x14,%eax 10ace1: 50 push %eax 10ace2: e8 25 0b 00 00 call 10b80c <_CORE_semaphore_Surrender> 10ace7: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10ace9: e8 92 20 00 00 call 10cd80 <_Thread_Enable_dispatch> return 10acee: 89 1c 24 mov %ebx,(%esp) 10acf1: e8 3e 00 00 00 call 10ad34 <_Semaphore_Translate_core_semaphore_return_code> 10acf6: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10acf9: 8b 5d fc mov -0x4(%ebp),%ebx 10acfc: c9 leave 10acfd: c3 ret 10acfe: 66 90 xchg %ax,%ax 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( 10ad00: 51 push %ecx 10ad01: 6a 00 push $0x0 10ad03: 53 push %ebx 10ad04: 83 c0 14 add $0x14,%eax 10ad07: 50 push %eax 10ad08: e8 c7 09 00 00 call 10b6d4 <_CORE_mutex_Surrender> 10ad0d: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10ad0f: e8 6c 20 00 00 call 10cd80 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10ad14: 89 1c 24 mov %ebx,(%esp) 10ad17: e8 08 00 00 00 call 10ad24 <_Semaphore_Translate_core_mutex_return_code> 10ad1c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ad1f: 8b 5d fc mov -0x4(%ebp),%ebx 10ad22: c9 leave 10ad23: c3 ret =============================================================================== 00117388 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117388: 55 push %ebp 117389: 89 e5 mov %esp,%ebp 11738b: 53 push %ebx 11738c: 83 ec 14 sub $0x14,%esp 11738f: 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 ) 117392: 85 db test %ebx,%ebx 117394: 75 0a jne 1173a0 return RTEMS_INVALID_NUMBER; 117396: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11739b: 8b 5d fc mov -0x4(%ebp),%ebx 11739e: c9 leave 11739f: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1173a0: 83 ec 08 sub $0x8,%esp 1173a3: 8d 45 f4 lea -0xc(%ebp),%eax 1173a6: 50 push %eax 1173a7: ff 75 08 pushl 0x8(%ebp) 1173aa: e8 f9 40 00 00 call 11b4a8 <_Thread_Get> switch ( location ) { 1173af: 83 c4 10 add $0x10,%esp 1173b2: 8b 55 f4 mov -0xc(%ebp),%edx 1173b5: 85 d2 test %edx,%edx 1173b7: 74 0b je 1173c4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1173b9: b8 04 00 00 00 mov $0x4,%eax } 1173be: 8b 5d fc mov -0x4(%ebp),%ebx 1173c1: c9 leave 1173c2: c3 ret 1173c3: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1173c4: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 1173ca: 8b 4a 0c mov 0xc(%edx),%ecx 1173cd: 85 c9 test %ecx,%ecx 1173cf: 74 3f je 117410 if ( asr->is_enabled ) { 1173d1: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1173d5: 74 25 je 1173fc rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1173d7: 9c pushf 1173d8: fa cli 1173d9: 59 pop %ecx *signal_set |= signals; 1173da: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1173dd: 51 push %ecx 1173de: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1173df: 8b 15 54 26 14 00 mov 0x142654,%edx 1173e5: 85 d2 test %edx,%edx 1173e7: 74 1b je 117404 1173e9: 3b 05 58 26 14 00 cmp 0x142658,%eax 1173ef: 75 13 jne 117404 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 1173f1: c6 05 64 26 14 00 01 movb $0x1,0x142664 1173f8: eb 0a jmp 117404 1173fa: 66 90 xchg %ax,%ax rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1173fc: 9c pushf 1173fd: fa cli 1173fe: 58 pop %eax *signal_set |= signals; 1173ff: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117402: 50 push %eax 117403: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117404: e8 7b 40 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117409: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11740b: 8b 5d fc mov -0x4(%ebp),%ebx 11740e: c9 leave 11740f: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117410: e8 6f 40 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117415: b8 0b 00 00 00 mov $0xb,%eax 11741a: e9 7c ff ff ff jmp 11739b =============================================================================== 00107570 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 107570: 55 push %ebp 107571: 89 e5 mov %esp,%ebp 107573: 57 push %edi 107574: 56 push %esi 107575: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 107578: 8b 48 08 mov 0x8(%eax),%ecx 10757b: 85 c9 test %ecx,%ecx 10757d: 74 15 je 107594 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 10757f: 8b b8 bc 00 00 00 mov 0xbc(%eax),%edi 107585: 83 c7 08 add $0x8,%edi 107588: be c0 93 12 00 mov $0x1293c0,%esi 10758d: b9 04 00 00 00 mov $0x4,%ecx 107592: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 107594: 5e pop %esi 107595: 5f pop %edi 107596: c9 leave 107597: c3 ret =============================================================================== 00107548 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 107548: 55 push %ebp 107549: 89 e5 mov %esp,%ebp 10754b: 57 push %edi 10754c: 8b 7d 0c mov 0xc(%ebp),%edi Stack_check_Initialize(); 10754f: e8 88 ff ff ff call 1074dc if (the_thread) 107554: 85 ff test %edi,%edi 107556: 74 12 je 10756a <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 107558: 8b 8f b8 00 00 00 mov 0xb8(%edi),%ecx 10755e: 8b 97 bc 00 00 00 mov 0xbc(%edi),%edx 107564: b0 a5 mov $0xa5,%al 107566: 89 d7 mov %edx,%edi 107568: f3 aa rep stos %al,%es:(%edi) return true; } 10756a: b0 01 mov $0x1,%al 10756c: 5f pop %edi 10756d: c9 leave 10756e: c3 ret =============================================================================== 001076ac : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 1076ac: 55 push %ebp 1076ad: 89 e5 mov %esp,%ebp 1076af: 57 push %edi 1076b0: 56 push %esi Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 1076b1: a1 78 9b 12 00 mov 0x129b78,%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 1076b6: 8b b0 bc 00 00 00 mov 0xbc(%eax),%esi 1076bc: 39 f5 cmp %esi,%ebp 1076be: 72 3c jb 1076fc <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 1076c0: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax 1076c6: 8d 04 06 lea (%esi,%eax,1),%eax } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 1076c9: 39 c5 cmp %eax,%ebp 1076cb: 0f 96 c0 setbe %al /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 1076ce: 8b 15 48 90 12 00 mov 0x129048,%edx 1076d4: 85 d2 test %edx,%edx 1076d6: 74 30 je 107708 <== NEVER TAKEN pattern_ok = (!memcmp( 1076d8: 83 c6 08 add $0x8,%esi 1076db: bf c0 93 12 00 mov $0x1293c0,%edi 1076e0: b9 10 00 00 00 mov $0x10,%ecx 1076e5: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 1076e7: 0f 94 c2 sete %dl /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { 1076ea: 84 c0 test %al,%al 1076ec: 74 1e je 10770c <== NEVER TAKEN 1076ee: 84 d2 test %dl,%dl 1076f0: 74 1a je 10770c <== NEVER TAKEN /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 1076f2: 31 c0 xor %eax,%eax 1076f4: 8d 65 f8 lea -0x8(%ebp),%esp 1076f7: 5e pop %esi 1076f8: 5f pop %edi 1076f9: c9 leave 1076fa: c3 ret 1076fb: 90 nop { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; 1076fc: 31 c0 xor %eax,%eax /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 1076fe: 8b 15 48 90 12 00 mov 0x129048,%edx <== NOT EXECUTED 107704: 85 d2 test %edx,%edx <== NOT EXECUTED 107706: 75 d0 jne 1076d8 <== 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; 107708: b2 01 mov $0x1,%dl <== NOT EXECUTED 10770a: eb de jmp 1076ea <== NOT EXECUTED /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 10770c: 57 push %edi <== NOT EXECUTED 10770d: 57 push %edi <== NOT EXECUTED 10770e: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107711: 52 push %edx <== NOT EXECUTED 107712: ff 35 78 9b 12 00 pushl 0x129b78 <== NOT EXECUTED 107718: e8 7b fe ff ff call 107598 <== NOT EXECUTED =============================================================================== 00107788 : void rtems_stack_checker_report_usage( void ) { 107788: 55 push %ebp <== NOT EXECUTED 107789: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10778b: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 10778e: 68 c4 91 10 00 push $0x1091c4 <== NOT EXECUTED 107793: 6a 00 push $0x0 <== NOT EXECUTED 107795: e8 86 ff ff ff call 107720 <== NOT EXECUTED 10779a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10779d: c9 leave <== NOT EXECUTED 10779e: c3 ret <== NOT EXECUTED =============================================================================== 00107720 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 107720: 55 push %ebp <== NOT EXECUTED 107721: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107723: 56 push %esi <== NOT EXECUTED 107724: 53 push %ebx <== NOT EXECUTED 107725: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 107728: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED if ( !print ) 10772b: 85 db test %ebx,%ebx <== NOT EXECUTED 10772d: 74 50 je 10777f <== NOT EXECUTED return; print_context = context; 10772f: 89 35 40 90 12 00 mov %esi,0x129040 <== NOT EXECUTED print_handler = print; 107735: 89 1d 44 90 12 00 mov %ebx,0x129044 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 10773b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10773e: 68 68 38 12 00 push $0x123868 <== NOT EXECUTED 107743: 56 push %esi <== NOT EXECUTED 107744: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 107746: 59 pop %ecx <== NOT EXECUTED 107747: 58 pop %eax <== NOT EXECUTED 107748: 68 ec 38 12 00 push $0x1238ec <== NOT EXECUTED 10774d: 56 push %esi <== NOT EXECUTED 10774e: 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 ); 107750: c7 04 24 70 73 10 00 movl $0x107370,(%esp) <== NOT EXECUTED 107757: e8 e4 6e 00 00 call 10e640 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 10775c: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 107763: e8 08 fc ff ff call 107370 <== NOT EXECUTED #endif print_context = NULL; 107768: c7 05 40 90 12 00 00 movl $0x0,0x129040 <== NOT EXECUTED 10776f: 00 00 00 print_handler = NULL; 107772: c7 05 44 90 12 00 00 movl $0x0,0x129044 <== NOT EXECUTED 107779: 00 00 00 10777c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10777f: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 107782: 5b pop %ebx <== NOT EXECUTED 107783: 5e pop %esi <== NOT EXECUTED 107784: c9 leave <== NOT EXECUTED 107785: c3 ret <== NOT EXECUTED =============================================================================== 00107654 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 107654: 55 push %ebp 107655: 89 e5 mov %esp,%ebp 107657: 57 push %edi 107658: 56 push %esi 107659: 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 = Stack_check_Get_pattern_area(the_stack); 10765c: 8b 90 bc 00 00 00 mov 0xbc(%eax),%edx 107662: 8d 72 08 lea 0x8(%edx),%esi ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 107665: 39 d5 cmp %edx,%ebp 107667: 72 0a jb 107673 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 107669: 03 90 b8 00 00 00 add 0xb8(%eax),%edx 10766f: 39 d5 cmp %edx,%ebp 107671: 76 1d jbe 107690 <== 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, 107673: bf c0 93 12 00 mov $0x1293c0,%edi <== NOT EXECUTED 107678: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED 10767d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED 10767f: 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 ); 107682: 56 push %esi <== NOT EXECUTED 107683: 56 push %esi <== NOT EXECUTED 107684: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107687: 52 push %edx <== NOT EXECUTED 107688: 50 push %eax <== NOT EXECUTED 107689: e8 0a ff ff ff call 107598 <== NOT EXECUTED 10768e: 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, 107690: bf c0 93 12 00 mov $0x1293c0,%edi 107695: b9 10 00 00 00 mov $0x10,%ecx (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 10769a: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10769c: 75 07 jne 1076a5 <== NEVER TAKEN Stack_check_report_blown_task( running, pattern_ok ); } } 10769e: 8d 65 f8 lea -0x8(%ebp),%esp 1076a1: 5e pop %esi 1076a2: 5f pop %edi 1076a3: c9 leave 1076a4: 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 ) { 1076a5: 31 d2 xor %edx,%edx <== NOT EXECUTED 1076a7: eb d9 jmp 107682 <== NOT EXECUTED =============================================================================== 0010fec0 : rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { 10fec0: 55 push %ebp 10fec1: 89 e5 mov %esp,%ebp 10fec3: 57 push %edi 10fec4: 56 push %esi 10fec5: 53 push %ebx 10fec6: 83 ec 2c sub $0x2c,%esp 10fec9: 8b 75 08 mov 0x8(%ebp),%esi 10fecc: 8b 5d 0c mov 0xc(%ebp),%ebx 10fecf: 8b 7d 10 mov 0x10(%ebp),%edi double result; char *end; if ( !n ) 10fed2: 85 db test %ebx,%ebx 10fed4: 0f 84 b2 00 00 00 je 10ff8c return RTEMS_INVALID_ADDRESS; errno = 0; 10feda: e8 29 37 00 00 call 113608 <__errno> 10fedf: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10fee5: c7 03 00 00 00 00 movl $0x0,(%ebx) 10feeb: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtod( s, &end ); 10fef2: 83 ec 08 sub $0x8,%esp 10fef5: 8d 45 e4 lea -0x1c(%ebp),%eax 10fef8: 50 push %eax 10fef9: 56 push %esi 10fefa: e8 09 61 00 00 call 116008 if ( endptr ) 10feff: 83 c4 10 add $0x10,%esp 10ff02: 85 ff test %edi,%edi 10ff04: 0f 84 92 00 00 00 je 10ff9c *endptr = end; 10ff0a: 8b 45 e4 mov -0x1c(%ebp),%eax 10ff0d: 89 07 mov %eax,(%edi) if ( end == s ) 10ff0f: 39 c6 cmp %eax,%esi 10ff11: 74 69 je 10ff7c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10ff13: dd 5d c8 fstpl -0x38(%ebp) 10ff16: e8 ed 36 00 00 call 113608 <__errno> 10ff1b: 83 38 22 cmpl $0x22,(%eax) 10ff1e: dd 45 c8 fldl -0x38(%ebp) 10ff21: 74 0d je 10ff30 (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; 10ff23: dd 1b fstpl (%ebx) return RTEMS_SUCCESSFUL; 10ff25: 31 c0 xor %eax,%eax } 10ff27: 8d 65 f4 lea -0xc(%ebp),%esp 10ff2a: 5b pop %ebx 10ff2b: 5e pop %esi 10ff2c: 5f pop %edi 10ff2d: c9 leave 10ff2e: c3 ret 10ff2f: 90 nop *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10ff30: d9 ee fldz 10ff32: d9 c9 fxch %st(1) 10ff34: dd e1 fucom %st(1) 10ff36: df e0 fnstsw %ax 10ff38: dd d9 fstp %st(1) 10ff3a: 80 e4 45 and $0x45,%ah 10ff3d: 80 fc 40 cmp $0x40,%ah 10ff40: 74 26 je 10ff68 <== NEVER TAKEN (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) 10ff42: dd 05 f0 5b 12 00 fldl 0x125bf0 10ff48: d9 c9 fxch %st(1) 10ff4a: dd e1 fucom %st(1) 10ff4c: df e0 fnstsw %ax 10ff4e: dd d9 fstp %st(1) 10ff50: f6 c4 45 test $0x45,%ah 10ff53: 74 17 je 10ff6c <== ALWAYS TAKEN 10ff55: dd 05 f8 5b 12 00 fldl 0x125bf8 <== NOT EXECUTED 10ff5b: dd e9 fucomp %st(1) <== NOT EXECUTED 10ff5d: df e0 fnstsw %ax <== NOT EXECUTED 10ff5f: f6 c4 45 test $0x45,%ah <== NOT EXECUTED 10ff62: 75 bf jne 10ff23 <== NOT EXECUTED 10ff64: dd d8 fstp %st(0) <== NOT EXECUTED 10ff66: eb 06 jmp 10ff6e <== NOT EXECUTED 10ff68: dd d8 fstp %st(0) <== NOT EXECUTED 10ff6a: eb 02 jmp 10ff6e <== NOT EXECUTED 10ff6c: dd d8 fstp %st(0) return RTEMS_INVALID_NUMBER; 10ff6e: b8 0a 00 00 00 mov $0xa,%eax *n = result; return RTEMS_SUCCESSFUL; } 10ff73: 8d 65 f4 lea -0xc(%ebp),%esp 10ff76: 5b pop %ebx 10ff77: 5e pop %esi 10ff78: 5f pop %edi 10ff79: c9 leave 10ff7a: c3 ret 10ff7b: 90 nop 10ff7c: dd d8 fstp %st(0) if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 10ff7e: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 10ff83: 8d 65 f4 lea -0xc(%ebp),%esp 10ff86: 5b pop %ebx 10ff87: 5e pop %esi 10ff88: 5f pop %edi 10ff89: c9 leave 10ff8a: c3 ret 10ff8b: 90 nop { double result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10ff8c: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 10ff91: 8d 65 f4 lea -0xc(%ebp),%esp 10ff94: 5b pop %ebx 10ff95: 5e pop %esi 10ff96: 5f pop %edi 10ff97: c9 leave 10ff98: c3 ret 10ff99: 8d 76 00 lea 0x0(%esi),%esi errno = 0; *n = 0; result = strtod( s, &end ); if ( endptr ) 10ff9c: 8b 45 e4 mov -0x1c(%ebp),%eax 10ff9f: e9 6b ff ff ff jmp 10ff0f =============================================================================== 0010ffa4 : rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { 10ffa4: 55 push %ebp 10ffa5: 89 e5 mov %esp,%ebp 10ffa7: 57 push %edi 10ffa8: 56 push %esi 10ffa9: 53 push %ebx 10ffaa: 83 ec 2c sub $0x2c,%esp 10ffad: 8b 75 08 mov 0x8(%ebp),%esi 10ffb0: 8b 5d 0c mov 0xc(%ebp),%ebx 10ffb3: 8b 7d 10 mov 0x10(%ebp),%edi float result; char *end; if ( !n ) 10ffb6: 85 db test %ebx,%ebx 10ffb8: 0f 84 aa 00 00 00 je 110068 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 10ffbe: e8 45 36 00 00 call 113608 <__errno> 10ffc3: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10ffc9: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtof( s, &end ); 10ffcf: 83 ec 08 sub $0x8,%esp 10ffd2: 8d 45 e4 lea -0x1c(%ebp),%eax 10ffd5: 50 push %eax 10ffd6: 56 push %esi 10ffd7: e8 48 60 00 00 call 116024 if ( endptr ) 10ffdc: 83 c4 10 add $0x10,%esp 10ffdf: 85 ff test %edi,%edi 10ffe1: 0f 84 91 00 00 00 je 110078 <== NEVER TAKEN *endptr = end; 10ffe7: 8b 45 e4 mov -0x1c(%ebp),%eax 10ffea: 89 07 mov %eax,(%edi) if ( end == s ) 10ffec: 39 c6 cmp %eax,%esi 10ffee: 74 68 je 110058 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10fff0: d9 5d c8 fstps -0x38(%ebp) 10fff3: e8 10 36 00 00 call 113608 <__errno> 10fff8: 83 38 22 cmpl $0x22,(%eax) 10fffb: d9 45 c8 flds -0x38(%ebp) 10fffe: 74 0c je 11000c (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; 110000: d9 1b fstps (%ebx) return RTEMS_SUCCESSFUL; 110002: 31 c0 xor %eax,%eax } 110004: 8d 65 f4 lea -0xc(%ebp),%esp 110007: 5b pop %ebx 110008: 5e pop %esi 110009: 5f pop %edi 11000a: c9 leave 11000b: c3 ret *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 11000c: d9 ee fldz 11000e: d9 c9 fxch %st(1) 110010: dd e1 fucom %st(1) 110012: df e0 fnstsw %ax 110014: dd d9 fstp %st(1) 110016: 80 e4 45 and $0x45,%ah 110019: 80 fc 40 cmp $0x40,%ah 11001c: 74 26 je 110044 <== NEVER TAKEN (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) 11001e: d9 05 00 5c 12 00 flds 0x125c00 110024: d9 c9 fxch %st(1) 110026: dd e1 fucom %st(1) 110028: df e0 fnstsw %ax 11002a: dd d9 fstp %st(1) 11002c: f6 c4 45 test $0x45,%ah 11002f: 74 17 je 110048 <== ALWAYS TAKEN 110031: d9 05 04 5c 12 00 flds 0x125c04 <== NOT EXECUTED 110037: dd e9 fucomp %st(1) <== NOT EXECUTED 110039: df e0 fnstsw %ax <== NOT EXECUTED 11003b: f6 c4 45 test $0x45,%ah <== NOT EXECUTED 11003e: 75 c0 jne 110000 <== NOT EXECUTED 110040: dd d8 fstp %st(0) <== NOT EXECUTED 110042: eb 06 jmp 11004a <== NOT EXECUTED 110044: dd d8 fstp %st(0) <== NOT EXECUTED 110046: eb 02 jmp 11004a <== NOT EXECUTED 110048: dd d8 fstp %st(0) return RTEMS_INVALID_NUMBER; 11004a: b8 0a 00 00 00 mov $0xa,%eax *n = result; return RTEMS_SUCCESSFUL; } 11004f: 8d 65 f4 lea -0xc(%ebp),%esp 110052: 5b pop %ebx 110053: 5e pop %esi 110054: 5f pop %edi 110055: c9 leave 110056: c3 ret 110057: 90 nop 110058: dd d8 fstp %st(0) if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 11005a: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 11005f: 8d 65 f4 lea -0xc(%ebp),%esp 110062: 5b pop %ebx 110063: 5e pop %esi 110064: 5f pop %edi 110065: c9 leave 110066: c3 ret 110067: 90 nop { float result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110068: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 11006d: 8d 65 f4 lea -0xc(%ebp),%esp 110070: 5b pop %ebx 110071: 5e pop %esi 110072: 5f pop %edi 110073: c9 leave 110074: c3 ret 110075: 8d 76 00 lea 0x0(%esi),%esi errno = 0; *n = 0; result = strtof( s, &end ); if ( endptr ) 110078: 8b 45 e4 mov -0x1c(%ebp),%eax 11007b: e9 6c ff ff ff jmp 10ffec =============================================================================== 00110080 : const char *s, int *n, char **endptr, int base ) { 110080: 55 push %ebp 110081: 89 e5 mov %esp,%ebp 110083: 57 push %edi 110084: 56 push %esi 110085: 53 push %ebx 110086: 83 ec 2c sub $0x2c,%esp 110089: 8b 75 08 mov 0x8(%ebp),%esi 11008c: 8b 5d 0c mov 0xc(%ebp),%ebx 11008f: 8b 7d 10 mov 0x10(%ebp),%edi long result; char *end; if ( !n ) 110092: 85 db test %ebx,%ebx 110094: 0f 84 82 00 00 00 je 11011c return RTEMS_INVALID_ADDRESS; errno = 0; 11009a: e8 69 35 00 00 call 113608 <__errno> 11009f: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1100a5: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtol( s, &end, base ); 1100ab: 50 push %eax 1100ac: ff 75 14 pushl 0x14(%ebp) 1100af: 8d 45 e4 lea -0x1c(%ebp),%eax 1100b2: 50 push %eax 1100b3: 56 push %esi 1100b4: e8 2b 61 00 00 call 1161e4 1100b9: 89 c2 mov %eax,%edx if ( endptr ) 1100bb: 83 c4 10 add $0x10,%esp 1100be: 85 ff test %edi,%edi 1100c0: 74 6a je 11012c *endptr = end; 1100c2: 8b 45 e4 mov -0x1c(%ebp),%eax 1100c5: 89 07 mov %eax,(%edi) if ( end == s ) 1100c7: 39 c6 cmp %eax,%esi 1100c9: 74 41 je 11010c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1100cb: 89 55 d4 mov %edx,-0x2c(%ebp) 1100ce: e8 35 35 00 00 call 113608 <__errno> 1100d3: 83 38 22 cmpl $0x22,(%eax) 1100d6: 8b 55 d4 mov -0x2c(%ebp),%edx 1100d9: 74 0d je 1100e8 errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 1100db: 89 13 mov %edx,(%ebx) return RTEMS_SUCCESSFUL; 1100dd: 31 c0 xor %eax,%eax } 1100df: 8d 65 f4 lea -0xc(%ebp),%esp 1100e2: 5b pop %ebx 1100e3: 5e pop %esi 1100e4: 5f pop %edi 1100e5: c9 leave 1100e6: c3 ret 1100e7: 90 nop *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1100e8: 85 d2 test %edx,%edx 1100ea: 74 10 je 1100fc <== NEVER TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) 1100ec: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 1100f2: 74 08 je 1100fc <== ALWAYS TAKEN 1100f4: 81 fa 00 00 00 80 cmp $0x80000000,%edx <== NOT EXECUTED 1100fa: 75 df jne 1100db <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 1100fc: b8 0a 00 00 00 mov $0xa,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 110101: 8d 65 f4 lea -0xc(%ebp),%esp 110104: 5b pop %ebx 110105: 5e pop %esi 110106: 5f pop %edi 110107: c9 leave 110108: c3 ret 110109: 8d 76 00 lea 0x0(%esi),%esi if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 11010c: b8 0b 00 00 00 mov $0xb,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 110111: 8d 65 f4 lea -0xc(%ebp),%esp 110114: 5b pop %ebx 110115: 5e pop %esi 110116: 5f pop %edi 110117: c9 leave 110118: c3 ret 110119: 8d 76 00 lea 0x0(%esi),%esi { long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 11011c: b8 09 00 00 00 mov $0x9,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 110121: 8d 65 f4 lea -0xc(%ebp),%esp 110124: 5b pop %ebx 110125: 5e pop %esi 110126: 5f pop %edi 110127: c9 leave 110128: c3 ret 110129: 8d 76 00 lea 0x0(%esi),%esi errno = 0; *n = 0; result = strtol( s, &end, base ); if ( endptr ) 11012c: 8b 45 e4 mov -0x1c(%ebp),%eax 11012f: eb 96 jmp 1100c7 =============================================================================== 00110200 : const char *s, long *n, char **endptr, int base ) { 110200: 55 push %ebp 110201: 89 e5 mov %esp,%ebp 110203: 57 push %edi 110204: 56 push %esi 110205: 53 push %ebx 110206: 83 ec 2c sub $0x2c,%esp 110209: 8b 75 08 mov 0x8(%ebp),%esi 11020c: 8b 5d 0c mov 0xc(%ebp),%ebx 11020f: 8b 7d 10 mov 0x10(%ebp),%edi long result; char *end; if ( !n ) 110212: 85 db test %ebx,%ebx 110214: 0f 84 82 00 00 00 je 11029c return RTEMS_INVALID_ADDRESS; errno = 0; 11021a: e8 e9 33 00 00 call 113608 <__errno> 11021f: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110225: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtol( s, &end, base ); 11022b: 50 push %eax 11022c: ff 75 14 pushl 0x14(%ebp) 11022f: 8d 45 e4 lea -0x1c(%ebp),%eax 110232: 50 push %eax 110233: 56 push %esi 110234: e8 ab 5f 00 00 call 1161e4 110239: 89 c2 mov %eax,%edx if ( endptr ) 11023b: 83 c4 10 add $0x10,%esp 11023e: 85 ff test %edi,%edi 110240: 74 6a je 1102ac *endptr = end; 110242: 8b 45 e4 mov -0x1c(%ebp),%eax 110245: 89 07 mov %eax,(%edi) if ( end == s ) 110247: 39 c6 cmp %eax,%esi 110249: 74 41 je 11028c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 11024b: 89 55 d4 mov %edx,-0x2c(%ebp) 11024e: e8 b5 33 00 00 call 113608 <__errno> 110253: 83 38 22 cmpl $0x22,(%eax) 110256: 8b 55 d4 mov -0x2c(%ebp),%edx 110259: 74 0d je 110268 (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 11025b: 89 13 mov %edx,(%ebx) return RTEMS_SUCCESSFUL; 11025d: 31 c0 xor %eax,%eax } 11025f: 8d 65 f4 lea -0xc(%ebp),%esp 110262: 5b pop %ebx 110263: 5e pop %esi 110264: 5f pop %edi 110265: c9 leave 110266: c3 ret 110267: 90 nop *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110268: 85 d2 test %edx,%edx 11026a: 74 10 je 11027c <== NEVER TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) 11026c: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 110272: 74 08 je 11027c 110274: 81 fa 00 00 00 80 cmp $0x80000000,%edx 11027a: 75 df jne 11025b <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 11027c: b8 0a 00 00 00 mov $0xa,%eax *n = result; return RTEMS_SUCCESSFUL; } 110281: 8d 65 f4 lea -0xc(%ebp),%esp 110284: 5b pop %ebx 110285: 5e pop %esi 110286: 5f pop %edi 110287: c9 leave 110288: c3 ret 110289: 8d 76 00 lea 0x0(%esi),%esi if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 11028c: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 110291: 8d 65 f4 lea -0xc(%ebp),%esp 110294: 5b pop %ebx 110295: 5e pop %esi 110296: 5f pop %edi 110297: c9 leave 110298: c3 ret 110299: 8d 76 00 lea 0x0(%esi),%esi { long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 11029c: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1102a1: 8d 65 f4 lea -0xc(%ebp),%esp 1102a4: 5b pop %ebx 1102a5: 5e pop %esi 1102a6: 5f pop %edi 1102a7: c9 leave 1102a8: c3 ret 1102a9: 8d 76 00 lea 0x0(%esi),%esi errno = 0; *n = 0; result = strtol( s, &end, base ); if ( endptr ) 1102ac: 8b 45 e4 mov -0x1c(%ebp),%eax 1102af: eb 96 jmp 110247 =============================================================================== 00110134 : const char *s, long long *n, char **endptr, int base ) { 110134: 55 push %ebp 110135: 89 e5 mov %esp,%ebp 110137: 57 push %edi 110138: 56 push %esi 110139: 53 push %ebx 11013a: 83 ec 2c sub $0x2c,%esp 11013d: 8b 5d 0c mov 0xc(%ebp),%ebx 110140: 8b 7d 10 mov 0x10(%ebp),%edi long long result; char *end; if ( !n ) 110143: 85 db test %ebx,%ebx 110145: 0f 84 9d 00 00 00 je 1101e8 return RTEMS_INVALID_ADDRESS; errno = 0; 11014b: e8 b8 34 00 00 call 113608 <__errno> 110150: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110156: c7 03 00 00 00 00 movl $0x0,(%ebx) 11015c: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtoll( s, &end, base ); 110163: 50 push %eax 110164: ff 75 14 pushl 0x14(%ebp) 110167: 8d 45 e4 lea -0x1c(%ebp),%eax 11016a: 50 push %eax 11016b: ff 75 08 pushl 0x8(%ebp) 11016e: e8 8d 60 00 00 call 116200 110173: 89 c6 mov %eax,%esi if ( endptr ) 110175: 83 c4 10 add $0x10,%esp 110178: 85 ff test %edi,%edi 11017a: 74 7c je 1101f8 *endptr = end; 11017c: 8b 45 e4 mov -0x1c(%ebp),%eax 11017f: 89 07 mov %eax,(%edi) if ( end == s ) 110181: 39 45 08 cmp %eax,0x8(%ebp) 110184: 74 52 je 1101d8 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110186: 89 55 d4 mov %edx,-0x2c(%ebp) 110189: e8 7a 34 00 00 call 113608 <__errno> 11018e: 83 38 22 cmpl $0x22,(%eax) 110191: 8b 55 d4 mov -0x2c(%ebp),%edx 110194: 74 12 je 1101a8 (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 110196: 89 33 mov %esi,(%ebx) 110198: 89 53 04 mov %edx,0x4(%ebx) return RTEMS_SUCCESSFUL; 11019b: 31 c0 xor %eax,%eax } 11019d: 8d 65 f4 lea -0xc(%ebp),%esp 1101a0: 5b pop %ebx 1101a1: 5e pop %esi 1101a2: 5f pop %edi 1101a3: c9 leave 1101a4: c3 ret 1101a5: 8d 76 00 lea 0x0(%esi),%esi *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1101a8: 89 d0 mov %edx,%eax 1101aa: 09 f0 or %esi,%eax 1101ac: 74 1a je 1101c8 <== NEVER TAKEN (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) 1101ae: 89 d1 mov %edx,%ecx 1101b0: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx 1101b6: 89 f0 mov %esi,%eax 1101b8: f7 d0 not %eax 1101ba: 09 c1 or %eax,%ecx 1101bc: 74 0a je 1101c8 1101be: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 1101c4: 09 f0 or %esi,%eax 1101c6: 75 ce jne 110196 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 1101c8: b8 0a 00 00 00 mov $0xa,%eax *n = result; return RTEMS_SUCCESSFUL; } 1101cd: 8d 65 f4 lea -0xc(%ebp),%esp 1101d0: 5b pop %ebx 1101d1: 5e pop %esi 1101d2: 5f pop %edi 1101d3: c9 leave 1101d4: c3 ret 1101d5: 8d 76 00 lea 0x0(%esi),%esi if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 1101d8: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1101dd: 8d 65 f4 lea -0xc(%ebp),%esp 1101e0: 5b pop %ebx 1101e1: 5e pop %esi 1101e2: 5f pop %edi 1101e3: c9 leave 1101e4: c3 ret 1101e5: 8d 76 00 lea 0x0(%esi),%esi { long long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 1101e8: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1101ed: 8d 65 f4 lea -0xc(%ebp),%esp 1101f0: 5b pop %ebx 1101f1: 5e pop %esi 1101f2: 5f pop %edi 1101f3: c9 leave 1101f4: c3 ret 1101f5: 8d 76 00 lea 0x0(%esi),%esi errno = 0; *n = 0; result = strtoll( s, &end, base ); if ( endptr ) 1101f8: 8b 45 e4 mov -0x1c(%ebp),%eax 1101fb: eb 84 jmp 110181 =============================================================================== 001102cc : const char *s, unsigned char *n, char **endptr, int base ) { 1102cc: 55 push %ebp 1102cd: 89 e5 mov %esp,%ebp 1102cf: 57 push %edi 1102d0: 56 push %esi 1102d1: 53 push %ebx 1102d2: 83 ec 2c sub $0x2c,%esp 1102d5: 8b 75 08 mov 0x8(%ebp),%esi 1102d8: 8b 5d 0c mov 0xc(%ebp),%ebx 1102db: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long result; char *end; if ( !n ) 1102de: 85 db test %ebx,%ebx 1102e0: 0f 84 92 00 00 00 je 110378 return RTEMS_INVALID_ADDRESS; errno = 0; 1102e6: e8 1d 33 00 00 call 113608 <__errno> 1102eb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1102f1: c6 03 00 movb $0x0,(%ebx) result = strtoul( s, &end, base ); 1102f4: 50 push %eax 1102f5: ff 75 14 pushl 0x14(%ebp) 1102f8: 8d 45 e4 lea -0x1c(%ebp),%eax 1102fb: 50 push %eax 1102fc: 56 push %esi 1102fd: e8 9e 63 00 00 call 1166a0 110302: 89 c2 mov %eax,%edx if ( endptr ) 110304: 83 c4 10 add $0x10,%esp 110307: 85 ff test %edi,%edi 110309: 74 7d je 110388 *endptr = end; 11030b: 8b 45 e4 mov -0x1c(%ebp),%eax 11030e: 89 07 mov %eax,(%edi) if ( end == s ) 110310: 39 c6 cmp %eax,%esi 110312: 74 54 je 110368 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110314: 89 55 d4 mov %edx,-0x2c(%ebp) 110317: e8 ec 32 00 00 call 113608 <__errno> 11031c: 83 38 22 cmpl $0x22,(%eax) 11031f: 8b 55 d4 mov -0x2c(%ebp),%edx 110322: 74 14 je 110338 <== NEVER TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { 110324: 81 fa ff 00 00 00 cmp $0xff,%edx 11032a: 77 24 ja 110350 <== NEVER TAKEN errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 11032c: 88 13 mov %dl,(%ebx) return RTEMS_SUCCESSFUL; 11032e: 31 c0 xor %eax,%eax } 110330: 8d 65 f4 lea -0xc(%ebp),%esp 110333: 5b pop %ebx 110334: 5e pop %esi 110335: 5f pop %edi 110336: c9 leave 110337: c3 ret if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) 110338: 8d 42 ff lea -0x1(%edx),%eax <== NOT EXECUTED *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 11033b: 83 f8 fd cmp $0xfffffffd,%eax <== NOT EXECUTED 11033e: 76 e4 jbe 110324 <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; 110340: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED #endif *n = result; return RTEMS_SUCCESSFUL; } 110345: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 110348: 5b pop %ebx <== NOT EXECUTED 110349: 5e pop %esi <== NOT EXECUTED 11034a: 5f pop %edi <== NOT EXECUTED 11034b: c9 leave <== NOT EXECUTED 11034c: c3 ret <== NOT EXECUTED 11034d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { errno = ERANGE; 110350: e8 b3 32 00 00 call 113608 <__errno> <== NOT EXECUTED 110355: c7 00 22 00 00 00 movl $0x22,(%eax) <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 11035b: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED #endif *n = result; return RTEMS_SUCCESSFUL; } 110360: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 110363: 5b pop %ebx <== NOT EXECUTED 110364: 5e pop %esi <== NOT EXECUTED 110365: 5f pop %edi <== NOT EXECUTED 110366: c9 leave <== NOT EXECUTED 110367: c3 ret <== NOT EXECUTED if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 110368: b8 0b 00 00 00 mov $0xb,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 11036d: 8d 65 f4 lea -0xc(%ebp),%esp 110370: 5b pop %ebx 110371: 5e pop %esi 110372: 5f pop %edi 110373: c9 leave 110374: c3 ret 110375: 8d 76 00 lea 0x0(%esi),%esi { unsigned long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110378: b8 09 00 00 00 mov $0x9,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 11037d: 8d 65 f4 lea -0xc(%ebp),%esp 110380: 5b pop %ebx 110381: 5e pop %esi 110382: 5f pop %edi 110383: c9 leave 110384: c3 ret 110385: 8d 76 00 lea 0x0(%esi),%esi errno = 0; *n = 0; result = strtoul( s, &end, base ); if ( endptr ) 110388: 8b 45 e4 mov -0x1c(%ebp),%eax 11038b: eb 83 jmp 110310 =============================================================================== 00110390 : const char *s, unsigned int *n, char **endptr, int base ) { 110390: 55 push %ebp 110391: 89 e5 mov %esp,%ebp 110393: 57 push %edi 110394: 56 push %esi 110395: 53 push %ebx 110396: 83 ec 2c sub $0x2c,%esp 110399: 8b 75 08 mov 0x8(%ebp),%esi 11039c: 8b 5d 0c mov 0xc(%ebp),%ebx 11039f: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long result; char *end; if ( !n ) 1103a2: 85 db test %ebx,%ebx 1103a4: 74 76 je 11041c return RTEMS_INVALID_ADDRESS; errno = 0; 1103a6: e8 5d 32 00 00 call 113608 <__errno> 1103ab: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1103b1: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtoul( s, &end, base ); 1103b7: 50 push %eax 1103b8: ff 75 14 pushl 0x14(%ebp) 1103bb: 8d 45 e4 lea -0x1c(%ebp),%eax 1103be: 50 push %eax 1103bf: 56 push %esi 1103c0: e8 db 62 00 00 call 1166a0 1103c5: 89 c2 mov %eax,%edx if ( endptr ) 1103c7: 83 c4 10 add $0x10,%esp 1103ca: 85 ff test %edi,%edi 1103cc: 74 5e je 11042c *endptr = end; 1103ce: 8b 45 e4 mov -0x1c(%ebp),%eax 1103d1: 89 07 mov %eax,(%edi) if ( end == s ) 1103d3: 39 c6 cmp %eax,%esi 1103d5: 74 35 je 11040c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1103d7: 89 55 d4 mov %edx,-0x2c(%ebp) 1103da: e8 29 32 00 00 call 113608 <__errno> 1103df: 83 38 22 cmpl $0x22,(%eax) 1103e2: 8b 55 d4 mov -0x2c(%ebp),%edx 1103e5: 74 0d je 1103f4 errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 1103e7: 89 13 mov %edx,(%ebx) return RTEMS_SUCCESSFUL; 1103e9: 31 c0 xor %eax,%eax } 1103eb: 8d 65 f4 lea -0xc(%ebp),%esp 1103ee: 5b pop %ebx 1103ef: 5e pop %esi 1103f0: 5f pop %edi 1103f1: c9 leave 1103f2: c3 ret 1103f3: 90 nop if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) 1103f4: 8d 42 ff lea -0x1(%edx),%eax *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1103f7: 83 f8 fd cmp $0xfffffffd,%eax 1103fa: 76 eb jbe 1103e7 <== NEVER TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; 1103fc: b8 0a 00 00 00 mov $0xa,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 110401: 8d 65 f4 lea -0xc(%ebp),%esp 110404: 5b pop %ebx 110405: 5e pop %esi 110406: 5f pop %edi 110407: c9 leave 110408: c3 ret 110409: 8d 76 00 lea 0x0(%esi),%esi if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 11040c: b8 0b 00 00 00 mov $0xb,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 110411: 8d 65 f4 lea -0xc(%ebp),%esp 110414: 5b pop %ebx 110415: 5e pop %esi 110416: 5f pop %edi 110417: c9 leave 110418: c3 ret 110419: 8d 76 00 lea 0x0(%esi),%esi { unsigned long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 11041c: b8 09 00 00 00 mov $0x9,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 110421: 8d 65 f4 lea -0xc(%ebp),%esp 110424: 5b pop %ebx 110425: 5e pop %esi 110426: 5f pop %edi 110427: c9 leave 110428: c3 ret 110429: 8d 76 00 lea 0x0(%esi),%esi errno = 0; *n = 0; result = strtoul( s, &end, base ); if ( endptr ) 11042c: 8b 45 e4 mov -0x1c(%ebp),%eax 11042f: eb a2 jmp 1103d3 =============================================================================== 001104fc : const char *s, unsigned long *n, char **endptr, int base ) { 1104fc: 55 push %ebp 1104fd: 89 e5 mov %esp,%ebp 1104ff: 57 push %edi 110500: 56 push %esi 110501: 53 push %ebx 110502: 83 ec 2c sub $0x2c,%esp 110505: 8b 75 08 mov 0x8(%ebp),%esi 110508: 8b 5d 0c mov 0xc(%ebp),%ebx 11050b: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long result; char *end; if ( !n ) 11050e: 85 db test %ebx,%ebx 110510: 74 76 je 110588 return RTEMS_INVALID_ADDRESS; errno = 0; 110512: e8 f1 30 00 00 call 113608 <__errno> 110517: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11051d: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtoul( s, &end, base ); 110523: 50 push %eax 110524: ff 75 14 pushl 0x14(%ebp) 110527: 8d 45 e4 lea -0x1c(%ebp),%eax 11052a: 50 push %eax 11052b: 56 push %esi 11052c: e8 6f 61 00 00 call 1166a0 110531: 89 c2 mov %eax,%edx if ( endptr ) 110533: 83 c4 10 add $0x10,%esp 110536: 85 ff test %edi,%edi 110538: 74 5e je 110598 *endptr = end; 11053a: 8b 45 e4 mov -0x1c(%ebp),%eax 11053d: 89 07 mov %eax,(%edi) if ( end == s ) 11053f: 39 c6 cmp %eax,%esi 110541: 74 35 je 110578 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110543: 89 55 d4 mov %edx,-0x2c(%ebp) 110546: e8 bd 30 00 00 call 113608 <__errno> 11054b: 83 38 22 cmpl $0x22,(%eax) 11054e: 8b 55 d4 mov -0x2c(%ebp),%edx 110551: 74 0d je 110560 (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 110553: 89 13 mov %edx,(%ebx) return RTEMS_SUCCESSFUL; 110555: 31 c0 xor %eax,%eax } 110557: 8d 65 f4 lea -0xc(%ebp),%esp 11055a: 5b pop %ebx 11055b: 5e pop %esi 11055c: 5f pop %edi 11055d: c9 leave 11055e: c3 ret 11055f: 90 nop if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) 110560: 8d 42 ff lea -0x1(%edx),%eax *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110563: 83 f8 fd cmp $0xfffffffd,%eax 110566: 76 eb jbe 110553 <== NEVER TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; 110568: b8 0a 00 00 00 mov $0xa,%eax *n = result; return RTEMS_SUCCESSFUL; } 11056d: 8d 65 f4 lea -0xc(%ebp),%esp 110570: 5b pop %ebx 110571: 5e pop %esi 110572: 5f pop %edi 110573: c9 leave 110574: c3 ret 110575: 8d 76 00 lea 0x0(%esi),%esi if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 110578: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 11057d: 8d 65 f4 lea -0xc(%ebp),%esp 110580: 5b pop %ebx 110581: 5e pop %esi 110582: 5f pop %edi 110583: c9 leave 110584: c3 ret 110585: 8d 76 00 lea 0x0(%esi),%esi { unsigned long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110588: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 11058d: 8d 65 f4 lea -0xc(%ebp),%esp 110590: 5b pop %ebx 110591: 5e pop %esi 110592: 5f pop %edi 110593: c9 leave 110594: c3 ret 110595: 8d 76 00 lea 0x0(%esi),%esi errno = 0; *n = 0; result = strtoul( s, &end, base ); if ( endptr ) 110598: 8b 45 e4 mov -0x1c(%ebp),%eax 11059b: eb a2 jmp 11053f =============================================================================== 00110434 : const char *s, unsigned long long *n, char **endptr, int base ) { 110434: 55 push %ebp 110435: 89 e5 mov %esp,%ebp 110437: 57 push %edi 110438: 56 push %esi 110439: 53 push %ebx 11043a: 83 ec 2c sub $0x2c,%esp 11043d: 8b 7d 08 mov 0x8(%ebp),%edi 110440: 8b 5d 0c mov 0xc(%ebp),%ebx 110443: 8b 75 10 mov 0x10(%ebp),%esi unsigned long long result; char *end; if ( !n ) 110446: 85 db test %ebx,%ebx 110448: 0f 84 96 00 00 00 je 1104e4 return RTEMS_INVALID_ADDRESS; errno = 0; 11044e: e8 b5 31 00 00 call 113608 <__errno> 110453: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110459: c7 03 00 00 00 00 movl $0x0,(%ebx) 11045f: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtoull( s, &end, base ); 110466: 50 push %eax 110467: ff 75 14 pushl 0x14(%ebp) 11046a: 8d 45 e4 lea -0x1c(%ebp),%eax 11046d: 50 push %eax 11046e: 57 push %edi 11046f: e8 48 62 00 00 call 1166bc 110474: 89 d1 mov %edx,%ecx 110476: 89 c2 mov %eax,%edx if ( endptr ) 110478: 83 c4 10 add $0x10,%esp 11047b: 85 f6 test %esi,%esi 11047d: 74 75 je 1104f4 *endptr = end; 11047f: 8b 45 e4 mov -0x1c(%ebp),%eax 110482: 89 06 mov %eax,(%esi) if ( end == s ) 110484: 39 c7 cmp %eax,%edi 110486: 74 4c je 1104d4 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110488: 89 55 d4 mov %edx,-0x2c(%ebp) 11048b: 89 4d d0 mov %ecx,-0x30(%ebp) 11048e: e8 75 31 00 00 call 113608 <__errno> 110493: 83 38 22 cmpl $0x22,(%eax) 110496: 8b 55 d4 mov -0x2c(%ebp),%edx 110499: 8b 4d d0 mov -0x30(%ebp),%ecx 11049c: 74 12 je 1104b0 (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 11049e: 89 13 mov %edx,(%ebx) 1104a0: 89 4b 04 mov %ecx,0x4(%ebx) return RTEMS_SUCCESSFUL; 1104a3: 31 c0 xor %eax,%eax } 1104a5: 8d 65 f4 lea -0xc(%ebp),%esp 1104a8: 5b pop %ebx 1104a9: 5e pop %esi 1104aa: 5f pop %edi 1104ab: c9 leave 1104ac: c3 ret 1104ad: 8d 76 00 lea 0x0(%esi),%esi if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_LONG_MAX ))) 1104b0: 89 d6 mov %edx,%esi 1104b2: 89 cf mov %ecx,%edi 1104b4: 83 c6 ff add $0xffffffff,%esi 1104b7: 83 d7 ff adc $0xffffffff,%edi *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1104ba: 83 ff ff cmp $0xffffffff,%edi 1104bd: 72 df jb 11049e <== NEVER TAKEN 1104bf: 83 fe fd cmp $0xfffffffd,%esi 1104c2: 76 da jbe 11049e <== NEVER TAKEN (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; 1104c4: b8 0a 00 00 00 mov $0xa,%eax *n = result; return RTEMS_SUCCESSFUL; } 1104c9: 8d 65 f4 lea -0xc(%ebp),%esp 1104cc: 5b pop %ebx 1104cd: 5e pop %esi 1104ce: 5f pop %edi 1104cf: c9 leave 1104d0: c3 ret 1104d1: 8d 76 00 lea 0x0(%esi),%esi if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 1104d4: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1104d9: 8d 65 f4 lea -0xc(%ebp),%esp 1104dc: 5b pop %ebx 1104dd: 5e pop %esi 1104de: 5f pop %edi 1104df: c9 leave 1104e0: c3 ret 1104e1: 8d 76 00 lea 0x0(%esi),%esi { unsigned long long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 1104e4: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1104e9: 8d 65 f4 lea -0xc(%ebp),%esp 1104ec: 5b pop %ebx 1104ed: 5e pop %esi 1104ee: 5f pop %edi 1104ef: c9 leave 1104f0: c3 ret 1104f1: 8d 76 00 lea 0x0(%esi),%esi errno = 0; *n = 0; result = strtoull( s, &end, base ); if ( endptr ) 1104f4: 8b 45 e4 mov -0x1c(%ebp),%eax 1104f7: eb 8b jmp 110484 =============================================================================== 00107394 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 107394: 55 push %ebp 107395: 89 e5 mov %esp,%ebp 107397: 57 push %edi 107398: 56 push %esi 107399: 53 push %ebx 10739a: 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( 1073a0: 31 c0 xor %eax,%eax 1073a2: b9 ff ff ff ff mov $0xffffffff,%ecx 1073a7: 8b 7d 08 mov 0x8(%ebp),%edi 1073aa: f2 ae repnz scas %es:(%edi),%al 1073ac: f7 d1 not %ecx 1073ae: 49 dec %ecx 1073af: 6a 00 push $0x0 1073b1: 8d 45 d0 lea -0x30(%ebp),%eax 1073b4: 89 85 2c fe ff ff mov %eax,-0x1d4(%ebp) 1073ba: 50 push %eax 1073bb: 6a 00 push $0x0 1073bd: 51 push %ecx 1073be: ff 75 08 pushl 0x8(%ebp) 1073c1: e8 9a 0a 00 00 call 107e60 1073c6: 89 85 44 fe ff ff mov %eax,-0x1bc(%ebp) strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 1073cc: 83 c4 20 add $0x20,%esp 1073cf: 85 c0 test %eax,%eax 1073d1: 0f 85 61 01 00 00 jne 107538 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 1073d7: 8b 45 dc mov -0x24(%ebp),%eax 1073da: 3d c0 67 12 00 cmp $0x1267c0,%eax 1073df: 0f 85 47 01 00 00 jne 10752c 1073e5: 31 db xor %ebx,%ebx * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 1073e7: 8d 45 bc lea -0x44(%ebp),%eax 1073ea: 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); 1073f0: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx 1073f6: 89 95 34 fe ff ff mov %edx,-0x1cc(%ebp) 1073fc: eb 15 jmp 107413 1073fe: 66 90 xchg %ax,%ax * 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) { 107400: 80 bd 53 fe ff ff 30 cmpb $0x30,-0x1ad(%ebp) 107407: 0f 84 43 01 00 00 je 107550 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 10740d: 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) 107413: 8d 83 00 02 00 00 lea 0x200(%ebx),%eax 107419: 89 85 54 fe ff ff mov %eax,-0x1ac(%ebp) 10741f: 8b 55 10 mov 0x10(%ebp),%edx 107422: 39 d0 cmp %edx,%eax 107424: 0f 87 18 01 00 00 ja 107542 <== NEVER TAKEN break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 10742a: 03 5d 0c add 0xc(%ebp),%ebx offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 10742d: 8d b3 01 01 00 00 lea 0x101(%ebx),%esi 107433: bf 08 68 12 00 mov $0x126808,%edi 107438: b9 05 00 00 00 mov $0x5,%ecx 10743d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10743f: 0f 85 fd 00 00 00 jne 107542 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 107445: 57 push %edi 107446: 6a 63 push $0x63 107448: 53 push %ebx 107449: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax 10744f: 50 push %eax 107450: e8 97 03 01 00 call 1177ec filename[MAX_NAME_FIELD_SIZE] = '\0'; 107455: c6 45 bb 00 movb $0x0,-0x45(%ebp) linkflag = hdr_ptr[156]; 107459: 8a 93 9c 00 00 00 mov 0x9c(%ebx),%dl 10745f: 88 95 53 fe ff ff mov %dl,-0x1ad(%ebp) file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 107465: 59 pop %ecx 107466: 5e pop %esi 107467: 6a 08 push $0x8 107469: 8d 43 64 lea 0x64(%ebx),%eax 10746c: 50 push %eax 10746d: e8 2a 7c 00 00 call 10f09c <_rtems_octal2ulong> 107472: 89 85 48 fe ff ff mov %eax,-0x1b8(%ebp) file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 107478: 58 pop %eax 107479: 5a pop %edx 10747a: 6a 0c push $0xc 10747c: 8d 43 7c lea 0x7c(%ebx),%eax 10747f: 50 push %eax 107480: e8 17 7c 00 00 call 10f09c <_rtems_octal2ulong> 107485: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp) hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 10748b: 5e pop %esi 10748c: 5f pop %edi 10748d: 6a 08 push $0x8 10748f: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax 107495: 50 push %eax 107496: e8 01 7c 00 00 call 10f09c <_rtems_octal2ulong> 10749b: 89 c6 mov %eax,%esi if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 10749d: 89 1c 24 mov %ebx,(%esp) 1074a0: e8 cb 80 00 00 call 10f570 <_rtems_tar_header_checksum> 1074a5: 83 c4 10 add $0x10,%esp 1074a8: 39 f0 cmp %esi,%eax 1074aa: 0f 85 92 00 00 00 jne 107542 <== 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) { 1074b0: 80 bd 53 fe ff ff 35 cmpb $0x35,-0x1ad(%ebp) 1074b7: 0f 85 43 ff ff ff jne 107400 strcpy(full_filename, mountpoint); 1074bd: 83 ec 08 sub $0x8,%esp 1074c0: ff 75 08 pushl 0x8(%ebp) 1074c3: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax 1074c9: 50 push %eax 1074ca: e8 b5 ff 00 00 call 117484 if (full_filename[strlen(full_filename)-1] != '/') 1074cf: 31 c0 xor %eax,%eax 1074d1: b9 ff ff ff ff mov $0xffffffff,%ecx 1074d6: 8b bd 34 fe ff ff mov -0x1cc(%ebp),%edi 1074dc: f2 ae repnz scas %es:(%edi),%al 1074de: f7 d1 not %ecx 1074e0: 49 dec %ecx 1074e1: 83 c4 10 add $0x10,%esp 1074e4: 80 bc 0d 57 fe ff ff cmpb $0x2f,-0x1a9(%ebp,%ecx,1) 1074eb: 2f 1074ec: 74 0a je 1074f8 <== ALWAYS TAKEN strcat(full_filename, "/"); 1074ee: 66 c7 84 0d 58 fe ff movw $0x2f,-0x1a8(%ebp,%ecx,1) <== NOT EXECUTED 1074f5: ff 2f 00 strcat(full_filename, filename); 1074f8: 83 ec 08 sub $0x8,%esp 1074fb: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx 107501: 52 push %edx 107502: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax 107508: 50 push %eax 107509: e8 c2 fd 00 00 call 1172d0 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 10750e: 5a pop %edx 10750f: 59 pop %ecx 107510: 68 ff 01 00 00 push $0x1ff 107515: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx 10751b: 52 push %edx 10751c: e8 fb 10 00 00 call 10861c 107521: 83 c4 10 add $0x10,%esp 107524: e9 e4 fe ff ff jmp 10740d 107529: 8d 76 00 lea 0x0(%esi),%esi 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 10752c: 3d 40 72 12 00 cmp $0x127240,%eax 107531: 0f 84 ae fe ff ff je 1073e5 <== NEVER TAKEN 107537: 90 nop return -1; 107538: c7 85 44 fe ff ff ff movl $0xffffffff,-0x1bc(%ebp) 10753f: ff ff ff nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 107542: 8b 85 44 fe ff ff mov -0x1bc(%ebp),%eax 107548: 8d 65 f4 lea -0xc(%ebp),%esp 10754b: 5b pop %ebx 10754c: 5e pop %esi 10754d: 5f pop %edi 10754e: c9 leave 10754f: c3 ret * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 107550: 8b bd 30 fe ff ff mov -0x1d0(%ebp),%edi 107556: 8b b5 2c fe ff ff mov -0x1d4(%ebp),%esi 10755c: b9 05 00 00 00 mov $0x5,%ecx 107561: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 107563: 50 push %eax 107564: 8d 45 e4 lea -0x1c(%ebp),%eax 107567: 50 push %eax 107568: 8d 55 bc lea -0x44(%ebp),%edx 10756b: 52 push %edx 10756c: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax 107572: 50 push %eax 107573: e8 d8 87 00 00 call 10fd50 107578: 83 c4 10 add $0x10,%esp 10757b: 85 c0 test %eax,%eax 10757d: 74 1d je 10759c <== ALWAYS TAKEN ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; 10757f: 8b 85 4c fe ff ff mov -0x1b4(%ebp),%eax 107585: 05 ff 01 00 00 add $0x1ff,%eax offset += 512 * nblocks; 10758a: 25 00 fe ff ff and $0xfffffe00,%eax 10758f: 01 85 54 fe ff ff add %eax,-0x1ac(%ebp) 107595: e9 73 fe ff ff jmp 10740d 10759a: 66 90 xchg %ax,%ax else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 10759c: 83 ec 0c sub $0xc,%esp 10759f: 6a 00 push $0x0 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 1075a1: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax 1075a7: 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( 1075ac: 80 cc 80 or $0x80,%ah 1075af: 50 push %eax 1075b0: ff 75 e4 pushl -0x1c(%ebp) 1075b3: 6a 06 push $0x6 1075b5: 8d 55 bc lea -0x44(%ebp),%edx 1075b8: 52 push %edx 1075b9: e8 9a 81 00 00 call 10f758 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 1075be: 8b 95 4c fe ff ff mov -0x1b4(%ebp),%edx 1075c4: 89 50 50 mov %edx,0x50(%eax) 1075c7: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.linearfile.direct = &tar_image[offset]; 1075ce: 8b 55 0c mov 0xc(%ebp),%edx 1075d1: 03 95 54 fe ff ff add -0x1ac(%ebp),%edx 1075d7: 89 50 58 mov %edx,0x58(%eax) 1075da: 83 c4 20 add $0x20,%esp 1075dd: eb a0 jmp 10757f =============================================================================== 0010ad44 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10ad44: 55 push %ebp 10ad45: 89 e5 mov %esp,%ebp 10ad47: 57 push %edi 10ad48: 56 push %esi 10ad49: 53 push %ebx 10ad4a: 83 ec 1c sub $0x1c,%esp 10ad4d: 8b 5d 08 mov 0x8(%ebp),%ebx 10ad50: 8b 7d 0c mov 0xc(%ebp),%edi 10ad53: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10ad56: 85 f6 test %esi,%esi 10ad58: 0f 84 3e 01 00 00 je 10ae9c return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10ad5e: 85 db test %ebx,%ebx 10ad60: 0f 84 d2 00 00 00 je 10ae38 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10ad66: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10ad6d: 75 17 jne 10ad86 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10ad6f: 85 ff test %edi,%edi 10ad71: 0f 84 b1 00 00 00 je 10ae28 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10ad77: 0f b6 05 54 35 12 00 movzbl 0x123554,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10ad7e: 39 c7 cmp %eax,%edi 10ad80: 0f 87 a2 00 00 00 ja 10ae28 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10ad86: 83 ec 0c sub $0xc,%esp 10ad89: ff 35 a0 78 12 00 pushl 0x1278a0 10ad8f: e8 c4 06 00 00 call 10b458 <_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 ); 10ad94: c7 04 24 80 77 12 00 movl $0x127780,(%esp) 10ad9b: e8 a4 0f 00 00 call 10bd44 <_Objects_Allocate> 10ada0: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10ada2: 83 c4 10 add $0x10,%esp 10ada5: 85 c0 test %eax,%eax 10ada7: 0f 84 cf 00 00 00 je 10ae7c /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10adad: 50 push %eax 10adae: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10adaf: 8b 45 14 mov 0x14(%ebp),%eax 10adb2: 83 e0 01 and $0x1,%eax 10adb5: 50 push %eax 10adb6: 6a 00 push $0x0 10adb8: 31 c0 xor %eax,%eax 10adba: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10adc1: 0f 95 c0 setne %al 10adc4: 50 push %eax 10adc5: 31 c0 xor %eax,%eax 10adc7: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10adce: 0f 94 c0 sete %al 10add1: 50 push %eax 10add2: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10add3: 8b 45 18 mov 0x18(%ebp),%eax 10add6: 83 e0 01 and $0x1,%eax 10add9: 50 push %eax 10adda: ff 75 10 pushl 0x10(%ebp) 10addd: 6a 00 push $0x0 10addf: 52 push %edx 10ade0: 68 80 77 12 00 push $0x127780 10ade5: 89 55 e4 mov %edx,-0x1c(%ebp) 10ade8: e8 2f 20 00 00 call 10ce1c <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10aded: 83 c4 30 add $0x30,%esp 10adf0: 84 c0 test %al,%al 10adf2: 8b 55 e4 mov -0x1c(%ebp),%edx 10adf5: 74 51 je 10ae48 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10adf7: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax * id - thread id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_task_create( 10adfd: 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; 10ae04: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10ae08: 8b 42 08 mov 0x8(%edx),%eax 10ae0b: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10ae0d: 83 ec 0c sub $0xc,%esp 10ae10: ff 35 a0 78 12 00 pushl 0x1278a0 10ae16: e8 85 06 00 00 call 10b4a0 <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10ae1b: 83 c4 10 add $0x10,%esp 10ae1e: 31 c0 xor %eax,%eax } 10ae20: 8d 65 f4 lea -0xc(%ebp),%esp 10ae23: 5b pop %ebx 10ae24: 5e pop %esi 10ae25: 5f pop %edi 10ae26: c9 leave 10ae27: 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; 10ae28: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ae2d: 8d 65 f4 lea -0xc(%ebp),%esp 10ae30: 5b pop %ebx 10ae31: 5e pop %esi 10ae32: 5f pop %edi 10ae33: c9 leave 10ae34: c3 ret 10ae35: 8d 76 00 lea 0x0(%esi),%esi if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10ae38: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ae3d: 8d 65 f4 lea -0xc(%ebp),%esp 10ae40: 5b pop %ebx 10ae41: 5e pop %esi 10ae42: 5f pop %edi 10ae43: c9 leave 10ae44: c3 ret 10ae45: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10ae48: 83 ec 0c sub $0xc,%esp 10ae4b: ff 72 08 pushl 0x8(%edx) 10ae4e: e8 d5 12 00 00 call 10c128 <_Objects_Get_information_id> 10ae53: 5a pop %edx 10ae54: 59 pop %ecx 10ae55: 8b 55 e4 mov -0x1c(%ebp),%edx 10ae58: 52 push %edx 10ae59: 50 push %eax 10ae5a: e8 59 12 00 00 call 10c0b8 <_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(); 10ae5f: 58 pop %eax 10ae60: ff 35 a0 78 12 00 pushl 0x1278a0 10ae66: e8 35 06 00 00 call 10b4a0 <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10ae6b: 83 c4 10 add $0x10,%esp 10ae6e: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ae73: 8d 65 f4 lea -0xc(%ebp),%esp 10ae76: 5b pop %ebx 10ae77: 5e pop %esi 10ae78: 5f pop %edi 10ae79: c9 leave 10ae7a: c3 ret 10ae7b: 90 nop */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10ae7c: 83 ec 0c sub $0xc,%esp 10ae7f: ff 35 a0 78 12 00 pushl 0x1278a0 10ae85: e8 16 06 00 00 call 10b4a0 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10ae8a: 83 c4 10 add $0x10,%esp 10ae8d: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ae92: 8d 65 f4 lea -0xc(%ebp),%esp 10ae95: 5b pop %ebx 10ae96: 5e pop %esi 10ae97: 5f pop %edi 10ae98: c9 leave 10ae99: c3 ret 10ae9a: 66 90 xchg %ax,%ax RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10ae9c: b8 09 00 00 00 mov $0x9,%eax 10aea1: eb 8a jmp 10ae2d =============================================================================== 0010aea4 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10aea4: 55 push %ebp 10aea5: 89 e5 mov %esp,%ebp 10aea7: 53 push %ebx 10aea8: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10aeab: ff 35 a0 78 12 00 pushl 0x1278a0 10aeb1: e8 a2 05 00 00 call 10b458 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10aeb6: 5a pop %edx 10aeb7: 59 pop %ecx 10aeb8: 8d 45 f4 lea -0xc(%ebp),%eax 10aebb: 50 push %eax 10aebc: ff 75 08 pushl 0x8(%ebp) 10aebf: e8 e0 1e 00 00 call 10cda4 <_Thread_Get> 10aec4: 89 c3 mov %eax,%ebx switch ( location ) { 10aec6: 83 c4 10 add $0x10,%esp 10aec9: 8b 45 f4 mov -0xc(%ebp),%eax 10aecc: 85 c0 test %eax,%eax 10aece: 75 44 jne 10af14 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10aed0: 83 ec 0c sub $0xc,%esp 10aed3: ff 73 08 pushl 0x8(%ebx) 10aed6: e8 4d 12 00 00 call 10c128 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10aedb: 5a pop %edx 10aedc: 59 pop %ecx 10aedd: 53 push %ebx 10aede: 50 push %eax 10aedf: e8 74 1b 00 00 call 10ca58 <_Thread_Close> 10aee4: 58 pop %eax 10aee5: ff 73 08 pushl 0x8(%ebx) 10aee8: e8 3b 12 00 00 call 10c128 <_Objects_Get_information_id> 10aeed: 5a pop %edx 10aeee: 59 pop %ecx 10aeef: 53 push %ebx 10aef0: 50 push %eax 10aef1: e8 c2 11 00 00 call 10c0b8 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10aef6: 58 pop %eax 10aef7: ff 35 a0 78 12 00 pushl 0x1278a0 10aefd: e8 9e 05 00 00 call 10b4a0 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10af02: e8 79 1e 00 00 call 10cd80 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10af07: 83 c4 10 add $0x10,%esp 10af0a: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10af0c: 8b 5d fc mov -0x4(%ebp),%ebx 10af0f: c9 leave 10af10: c3 ret 10af11: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10af14: 83 ec 0c sub $0xc,%esp 10af17: ff 35 a0 78 12 00 pushl 0x1278a0 10af1d: e8 7e 05 00 00 call 10b4a0 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10af22: 83 c4 10 add $0x10,%esp 10af25: b8 04 00 00 00 mov $0x4,%eax } 10af2a: 8b 5d fc mov -0x4(%ebp),%ebx 10af2d: c9 leave 10af2e: c3 ret =============================================================================== 0010ca6c : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10ca6c: 55 push %ebp 10ca6d: 89 e5 mov %esp,%ebp 10ca6f: 56 push %esi 10ca70: 53 push %ebx 10ca71: 83 ec 10 sub $0x10,%esp 10ca74: 8b 45 08 mov 0x8(%ebp),%eax 10ca77: 8b 75 0c mov 0xc(%ebp),%esi 10ca7a: 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() ) 10ca7d: 80 3d e4 74 12 00 00 cmpb $0x0,0x1274e4 10ca84: 74 6e je 10caf4 return RTEMS_NOT_CONFIGURED; if ( !note ) 10ca86: 85 db test %ebx,%ebx 10ca88: 74 7e je 10cb08 /* * 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 ) 10ca8a: 83 fe 0f cmp $0xf,%esi 10ca8d: 77 3d ja 10cacc /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10ca8f: 85 c0 test %eax,%eax 10ca91: 74 45 je 10cad8 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10ca93: 8b 15 98 c0 12 00 mov 0x12c098,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10ca99: 3b 42 08 cmp 0x8(%edx),%eax 10ca9c: 74 40 je 10cade api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10ca9e: 83 ec 08 sub $0x8,%esp 10caa1: 8d 55 f4 lea -0xc(%ebp),%edx 10caa4: 52 push %edx 10caa5: 50 push %eax 10caa6: e8 d1 21 00 00 call 10ec7c <_Thread_Get> switch ( location ) { 10caab: 83 c4 10 add $0x10,%esp 10caae: 8b 55 f4 mov -0xc(%ebp),%edx 10cab1: 85 d2 test %edx,%edx 10cab3: 75 4b jne 10cb00 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10cab5: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax 10cabb: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10cabf: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10cac1: e8 92 21 00 00 call 10ec58 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10cac6: 31 c0 xor %eax,%eax 10cac8: eb 07 jmp 10cad1 10caca: 66 90 xchg %ax,%ax * 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; 10cacc: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cad1: 8d 65 f8 lea -0x8(%ebp),%esp 10cad4: 5b pop %ebx 10cad5: 5e pop %esi 10cad6: c9 leave 10cad7: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10cad8: 8b 15 98 c0 12 00 mov 0x12c098,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10cade: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax 10cae4: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10cae8: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10caea: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10caec: 8d 65 f8 lea -0x8(%ebp),%esp 10caef: 5b pop %ebx 10caf0: 5e pop %esi 10caf1: c9 leave 10caf2: c3 ret 10caf3: 90 nop register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10caf4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10caf9: 8d 65 f8 lea -0x8(%ebp),%esp 10cafc: 5b pop %ebx 10cafd: 5e pop %esi 10cafe: c9 leave 10caff: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10cb00: b8 04 00 00 00 mov $0x4,%eax 10cb05: eb ca jmp 10cad1 10cb07: 90 nop if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10cb08: b8 09 00 00 00 mov $0x9,%eax 10cb0d: eb c2 jmp 10cad1 =============================================================================== 0011776c : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 11776c: 55 push %ebp 11776d: 89 e5 mov %esp,%ebp 11776f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 117772: 8d 45 f4 lea -0xc(%ebp),%eax 117775: 50 push %eax 117776: ff 75 08 pushl 0x8(%ebp) 117779: e8 2a 3d 00 00 call 11b4a8 <_Thread_Get> switch ( location ) { 11777e: 83 c4 10 add $0x10,%esp 117781: 8b 55 f4 mov -0xc(%ebp),%edx 117784: 85 d2 test %edx,%edx 117786: 74 08 je 117790 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117788: b8 04 00 00 00 mov $0x4,%eax } 11778d: c9 leave 11778e: c3 ret 11778f: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 117790: f6 40 10 02 testb $0x2,0x10(%eax) 117794: 74 0e je 1177a4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117796: e8 e9 3c 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11779b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1177a0: c9 leave 1177a1: c3 ret 1177a2: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 1177a4: e8 db 3c 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1177a9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1177ab: c9 leave 1177ac: c3 ret =============================================================================== 001128fc : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 1128fc: 55 push %ebp 1128fd: 89 e5 mov %esp,%ebp 1128ff: 57 push %edi 112900: 56 push %esi 112901: 53 push %ebx 112902: 83 ec 1c sub $0x1c,%esp 112905: 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 ) 112908: 85 c9 test %ecx,%ecx 11290a: 0f 84 40 01 00 00 je 112a50 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 112910: 8b 1d 98 7d 12 00 mov 0x127d98,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 112916: 8b bb e8 00 00 00 mov 0xe8(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 11291c: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 112920: 19 f6 sbb %esi,%esi 112922: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 112928: 8b 53 7c mov 0x7c(%ebx),%edx 11292b: 85 d2 test %edx,%edx 11292d: 0f 85 f1 00 00 00 jne 112a24 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 112933: 80 7f 08 01 cmpb $0x1,0x8(%edi) 112937: 19 d2 sbb %edx,%edx 112939: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 11293f: 89 55 e4 mov %edx,-0x1c(%ebp) 112942: 89 4d e0 mov %ecx,-0x20(%ebp) 112945: e8 12 b8 ff ff call 10e15c <_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; 11294a: 8b 55 e4 mov -0x1c(%ebp),%edx 11294d: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 11294f: 09 f0 or %esi,%eax 112951: 8b 4d e0 mov -0x20(%ebp),%ecx 112954: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 112956: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 11295d: 74 0b je 11296a executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 11295f: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 112966: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 11296a: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 112971: 74 1c je 11298f if ( _Modes_Is_timeslice(mode_set) ) { 112973: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 11297a: 0f 84 b8 00 00 00 je 112a38 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 112980: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 112987: a1 c0 77 12 00 mov 0x1277c0,%eax 11298c: 89 43 78 mov %eax,0x78(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 11298f: f6 45 0c 01 testb $0x1,0xc(%ebp) 112993: 74 0b je 1129a0 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 112995: f6 45 08 01 testb $0x1,0x8(%ebp) 112999: 0f 84 91 00 00 00 je 112a30 11299f: fa cli * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 1129a0: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1129a7: 74 3f je 1129e8 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 1129a9: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 1129b0: 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 ) { 1129b3: 38 47 08 cmp %al,0x8(%edi) 1129b6: 74 30 je 1129e8 asr->is_enabled = is_asr_enabled; 1129b8: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 1129bb: 9c pushf 1129bc: fa cli 1129bd: 58 pop %eax _signals = information->signals_pending; 1129be: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 1129c1: 8b 4f 14 mov 0x14(%edi),%ecx 1129c4: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 1129c7: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 1129ca: 50 push %eax 1129cb: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 1129cc: 8b 47 14 mov 0x14(%edi),%eax 1129cf: 85 c0 test %eax,%eax 1129d1: 0f 95 c0 setne %al needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 1129d4: 83 3d 80 79 12 00 03 cmpl $0x3,0x127980 1129db: 74 16 je 1129f3 <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 1129dd: 31 c0 xor %eax,%eax } 1129df: 83 c4 1c add $0x1c,%esp 1129e2: 5b pop %ebx 1129e3: 5e pop %esi 1129e4: 5f pop %edi 1129e5: c9 leave 1129e6: c3 ret 1129e7: 90 nop /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 1129e8: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 1129ea: 83 3d 80 79 12 00 03 cmpl $0x3,0x127980 1129f1: 75 ea jne 1129dd bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 1129f3: 8b 15 98 7d 12 00 mov 0x127d98,%edx if ( are_signals_pending || 1129f9: 84 c0 test %al,%al 1129fb: 75 0e jne 112a0b 1129fd: 3b 15 9c 7d 12 00 cmp 0x127d9c,%edx 112a03: 74 d8 je 1129dd (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 112a05: 80 7a 74 00 cmpb $0x0,0x74(%edx) 112a09: 74 d2 je 1129dd <== NEVER TAKEN _Thread_Dispatch_necessary = true; 112a0b: c6 05 a4 7d 12 00 01 movb $0x1,0x127da4 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 112a12: e8 f1 a1 ff ff call 10cc08 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 112a17: 31 c0 xor %eax,%eax } 112a19: 83 c4 1c add $0x1c,%esp 112a1c: 5b pop %ebx 112a1d: 5e pop %esi 112a1e: 5f pop %edi 112a1f: c9 leave 112a20: c3 ret 112a21: 8d 76 00 lea 0x0(%esi),%esi 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; 112a24: 81 ce 00 02 00 00 or $0x200,%esi 112a2a: e9 04 ff ff ff jmp 112933 112a2f: 90 nop 112a30: fb sti 112a31: e9 6a ff ff ff jmp 1129a0 112a36: 66 90 xchg %ax,%ax 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; 112a38: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112a3f: f6 45 0c 01 testb $0x1,0xc(%ebp) 112a43: 0f 84 57 ff ff ff je 1129a0 112a49: e9 47 ff ff ff jmp 112995 112a4e: 66 90 xchg %ax,%ax bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 112a50: b8 09 00 00 00 mov $0x9,%eax if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } 112a55: 83 c4 1c add $0x1c,%esp 112a58: 5b pop %ebx 112a59: 5e pop %esi 112a5a: 5f pop %edi 112a5b: c9 leave 112a5c: c3 ret =============================================================================== 0010e1c4 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10e1c4: 55 push %ebp 10e1c5: 89 e5 mov %esp,%ebp 10e1c7: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e1ca: 8d 45 f4 lea -0xc(%ebp),%eax 10e1cd: 50 push %eax 10e1ce: ff 75 08 pushl 0x8(%ebp) 10e1d1: e8 7e 1e 00 00 call 110054 <_Thread_Get> switch ( location ) { 10e1d6: 83 c4 10 add $0x10,%esp 10e1d9: 8b 55 f4 mov -0xc(%ebp),%edx 10e1dc: 85 d2 test %edx,%edx 10e1de: 74 08 je 10e1e8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10e1e0: b8 04 00 00 00 mov $0x4,%eax } 10e1e5: c9 leave 10e1e6: c3 ret 10e1e7: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10e1e8: f6 40 10 02 testb $0x2,0x10(%eax) 10e1ec: 75 0e jne 10e1fc _Thread_Resume( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10e1ee: e8 3d 1e 00 00 call 110030 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10e1f3: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e1f8: c9 leave 10e1f9: c3 ret 10e1fa: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread ); 10e1fc: 83 ec 08 sub $0x8,%esp 10e1ff: 6a 02 push $0x2 10e201: 50 push %eax 10e202: e8 c5 1a 00 00 call 10fccc <_Thread_Clear_state> _Thread_Enable_dispatch(); 10e207: e8 24 1e 00 00 call 110030 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10e20c: 83 c4 10 add $0x10,%esp 10e20f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e211: c9 leave 10e212: c3 ret =============================================================================== 0010cbe4 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10cbe4: 55 push %ebp 10cbe5: 89 e5 mov %esp,%ebp 10cbe7: 56 push %esi 10cbe8: 53 push %ebx 10cbe9: 83 ec 10 sub $0x10,%esp 10cbec: 8b 45 08 mov 0x8(%ebp),%eax 10cbef: 8b 5d 0c mov 0xc(%ebp),%ebx 10cbf2: 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() ) 10cbf5: 80 3d e4 74 12 00 00 cmpb $0x0,0x1274e4 10cbfc: 74 66 je 10cc64 /* * 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 ) 10cbfe: 83 fb 0f cmp $0xf,%ebx 10cc01: 77 39 ja 10cc3c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10cc03: 85 c0 test %eax,%eax 10cc05: 74 41 je 10cc48 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10cc07: 8b 15 98 c0 12 00 mov 0x12c098,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10cc0d: 3b 42 08 cmp 0x8(%edx),%eax 10cc10: 74 3c je 10cc4e api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10cc12: 83 ec 08 sub $0x8,%esp 10cc15: 8d 55 f4 lea -0xc(%ebp),%edx 10cc18: 52 push %edx 10cc19: 50 push %eax 10cc1a: e8 5d 20 00 00 call 10ec7c <_Thread_Get> switch ( location ) { 10cc1f: 83 c4 10 add $0x10,%esp 10cc22: 8b 55 f4 mov -0xc(%ebp),%edx 10cc25: 85 d2 test %edx,%edx 10cc27: 75 47 jne 10cc70 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10cc29: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax 10cc2f: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10cc33: e8 20 20 00 00 call 10ec58 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10cc38: 31 c0 xor %eax,%eax 10cc3a: eb 05 jmp 10cc41 * 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; 10cc3c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc41: 8d 65 f8 lea -0x8(%ebp),%esp 10cc44: 5b pop %ebx 10cc45: 5e pop %esi 10cc46: c9 leave 10cc47: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10cc48: 8b 15 98 c0 12 00 mov 0x12c098,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10cc4e: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax 10cc54: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10cc58: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc5a: 8d 65 f8 lea -0x8(%ebp),%esp 10cc5d: 5b pop %ebx 10cc5e: 5e pop %esi 10cc5f: c9 leave 10cc60: c3 ret 10cc61: 8d 76 00 lea 0x0(%esi),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10cc64: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc69: 8d 65 f8 lea -0x8(%ebp),%esp 10cc6c: 5b pop %ebx 10cc6d: 5e pop %esi 10cc6e: c9 leave 10cc6f: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10cc70: b8 04 00 00 00 mov $0x4,%eax } 10cc75: 8d 65 f8 lea -0x8(%ebp),%esp 10cc78: 5b pop %ebx 10cc79: 5e pop %esi 10cc7a: c9 leave 10cc7b: c3 ret =============================================================================== 0010ee88 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10ee88: 55 push %ebp 10ee89: 89 e5 mov %esp,%ebp 10ee8b: 56 push %esi 10ee8c: 53 push %ebx 10ee8d: 83 ec 10 sub $0x10,%esp 10ee90: 8b 5d 0c mov 0xc(%ebp),%ebx 10ee93: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10ee96: 85 db test %ebx,%ebx 10ee98: 74 0b je 10eea5 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 ) ); 10ee9a: 0f b6 05 34 74 12 00 movzbl 0x127434,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10eea1: 39 c3 cmp %eax,%ebx 10eea3: 77 5f ja 10ef04 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10eea5: 85 f6 test %esi,%esi 10eea7: 74 67 je 10ef10 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10eea9: 83 ec 08 sub $0x8,%esp 10eeac: 8d 45 f4 lea -0xc(%ebp),%eax 10eeaf: 50 push %eax 10eeb0: ff 75 08 pushl 0x8(%ebp) 10eeb3: e8 dc 1f 00 00 call 110e94 <_Thread_Get> switch ( location ) { 10eeb8: 83 c4 10 add $0x10,%esp 10eebb: 8b 55 f4 mov -0xc(%ebp),%edx 10eebe: 85 d2 test %edx,%edx 10eec0: 75 36 jne 10eef8 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10eec2: 8b 50 14 mov 0x14(%eax),%edx 10eec5: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10eec7: 85 db test %ebx,%ebx 10eec9: 74 1c je 10eee7 the_thread->real_priority = new_priority; 10eecb: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10eece: 8b 48 1c mov 0x1c(%eax),%ecx 10eed1: 85 c9 test %ecx,%ecx 10eed3: 74 05 je 10eeda 10eed5: 3b 58 14 cmp 0x14(%eax),%ebx 10eed8: 73 0d jae 10eee7 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10eeda: 52 push %edx 10eedb: 6a 00 push $0x0 10eedd: 53 push %ebx 10eede: 50 push %eax 10eedf: e8 54 1b 00 00 call 110a38 <_Thread_Change_priority> 10eee4: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10eee7: e8 84 1f 00 00 call 110e70 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10eeec: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10eeee: 8d 65 f8 lea -0x8(%ebp),%esp 10eef1: 5b pop %ebx 10eef2: 5e pop %esi 10eef3: c9 leave 10eef4: c3 ret 10eef5: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10eef8: b8 04 00 00 00 mov $0x4,%eax } 10eefd: 8d 65 f8 lea -0x8(%ebp),%esp 10ef00: 5b pop %ebx 10ef01: 5e pop %esi 10ef02: c9 leave 10ef03: 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; 10ef04: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ef09: 8d 65 f8 lea -0x8(%ebp),%esp 10ef0c: 5b pop %ebx 10ef0d: 5e pop %esi 10ef0e: c9 leave 10ef0f: 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; 10ef10: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ef15: 8d 65 f8 lea -0x8(%ebp),%esp 10ef18: 5b pop %ebx 10ef19: 5e pop %esi 10ef1a: c9 leave 10ef1b: c3 ret =============================================================================== 0010afec : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10afec: 55 push %ebp 10afed: 89 e5 mov %esp,%ebp 10afef: 53 push %ebx 10aff0: 83 ec 14 sub $0x14,%esp 10aff3: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10aff6: 85 db test %ebx,%ebx 10aff8: 74 4e je 10b048 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10affa: 83 ec 08 sub $0x8,%esp 10affd: 8d 45 f4 lea -0xc(%ebp),%eax 10b000: 50 push %eax 10b001: ff 75 08 pushl 0x8(%ebp) 10b004: e8 9b 1d 00 00 call 10cda4 <_Thread_Get> switch ( location ) { 10b009: 83 c4 10 add $0x10,%esp 10b00c: 8b 55 f4 mov -0xc(%ebp),%edx 10b00f: 85 d2 test %edx,%edx 10b011: 75 29 jne 10b03c case OBJECTS_LOCAL: if ( _Thread_Start( 10b013: 83 ec 0c sub $0xc,%esp 10b016: ff 75 10 pushl 0x10(%ebp) 10b019: 6a 00 push $0x0 10b01b: 53 push %ebx 10b01c: 6a 00 push $0x0 10b01e: 50 push %eax 10b01f: e8 e8 26 00 00 call 10d70c <_Thread_Start> 10b024: 83 c4 20 add $0x20,%esp 10b027: 84 c0 test %al,%al 10b029: 75 29 jne 10b054 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10b02b: e8 50 1d 00 00 call 10cd80 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10b030: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b035: 8b 5d fc mov -0x4(%ebp),%ebx 10b038: c9 leave 10b039: c3 ret 10b03a: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b03c: b8 04 00 00 00 mov $0x4,%eax } 10b041: 8b 5d fc mov -0x4(%ebp),%ebx 10b044: c9 leave 10b045: c3 ret 10b046: 66 90 xchg %ax,%ax { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10b048: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b04d: 8b 5d fc mov -0x4(%ebp),%ebx 10b050: c9 leave 10b051: c3 ret 10b052: 66 90 xchg %ax,%ax switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10b054: e8 27 1d 00 00 call 10cd80 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b059: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b05b: 8b 5d fc mov -0x4(%ebp),%ebx 10b05e: c9 leave 10b05f: c3 ret =============================================================================== 001107d4 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 1107d4: 55 push %ebp 1107d5: 89 e5 mov %esp,%ebp 1107d7: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 1107da: 8d 45 f4 lea -0xc(%ebp),%eax 1107dd: 50 push %eax 1107de: ff 75 08 pushl 0x8(%ebp) 1107e1: e8 be c5 ff ff call 10cda4 <_Thread_Get> switch ( location ) { 1107e6: 83 c4 10 add $0x10,%esp 1107e9: 8b 55 f4 mov -0xc(%ebp),%edx 1107ec: 85 d2 test %edx,%edx 1107ee: 74 08 je 1107f8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1107f0: b8 04 00 00 00 mov $0x4,%eax } 1107f5: c9 leave 1107f6: c3 ret 1107f7: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 1107f8: f6 40 10 02 testb $0x2,0x10(%eax) 1107fc: 74 0e je 11080c _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1107fe: e8 7d c5 ff ff call 10cd80 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 110803: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110808: c9 leave 110809: c3 ret 11080a: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 11080c: 83 ec 08 sub $0x8,%esp 11080f: 6a 02 push $0x2 110811: 50 push %eax 110812: e8 8d cd ff ff call 10d5a4 <_Thread_Set_state> _Thread_Enable_dispatch(); 110817: e8 64 c5 ff ff call 10cd80 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11081c: 83 c4 10 add $0x10,%esp 11081f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110821: c9 leave 110822: c3 ret =============================================================================== 0010bb48 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10bb48: 55 push %ebp 10bb49: 89 e5 mov %esp,%ebp 10bb4b: 57 push %edi 10bb4c: 56 push %esi 10bb4d: 53 push %ebx 10bb4e: 83 ec 1c sub $0x1c,%esp 10bb51: 8b 5d 0c mov 0xc(%ebp),%ebx 10bb54: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10bb57: 85 db test %ebx,%ebx 10bb59: 0f 84 9d 00 00 00 je 10bbfc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10bb5f: 83 ec 08 sub $0x8,%esp 10bb62: 8d 45 e4 lea -0x1c(%ebp),%eax 10bb65: 50 push %eax 10bb66: ff 75 08 pushl 0x8(%ebp) 10bb69: e8 ce 1e 00 00 call 10da3c <_Thread_Get> 10bb6e: 89 c6 mov %eax,%esi switch (location) { 10bb70: 83 c4 10 add $0x10,%esp 10bb73: 8b 45 e4 mov -0x1c(%ebp),%eax 10bb76: 85 c0 test %eax,%eax 10bb78: 74 0e je 10bb88 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bb7a: b8 04 00 00 00 mov $0x4,%eax } 10bb7f: 8d 65 f4 lea -0xc(%ebp),%esp 10bb82: 5b pop %ebx 10bb83: 5e pop %esi 10bb84: 5f pop %edi 10bb85: c9 leave 10bb86: c3 ret 10bb87: 90 nop case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10bb88: 8b 86 f4 00 00 00 mov 0xf4(%esi),%eax while (tvp) { 10bb8e: 85 c0 test %eax,%eax 10bb90: 75 44 jne 10bbd6 10bb92: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10bb94: 83 ec 0c sub $0xc,%esp 10bb97: 6a 14 push $0x14 10bb99: e8 56 2e 00 00 call 10e9f4 <_Workspace_Allocate> if (new == NULL) { 10bb9e: 83 c4 10 add $0x10,%esp 10bba1: 85 c0 test %eax,%eax 10bba3: 74 4b je 10bbf0 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10bba5: 8b 13 mov (%ebx),%edx 10bba7: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10bbaa: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10bbad: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10bbb0: 8b 96 f4 00 00 00 mov 0xf4(%esi),%edx 10bbb6: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10bbb8: 89 86 f4 00 00 00 mov %eax,0xf4(%esi) _Thread_Enable_dispatch(); 10bbbe: e8 55 1e 00 00 call 10da18 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bbc3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbc5: 8d 65 f4 lea -0xc(%ebp),%esp 10bbc8: 5b pop %ebx 10bbc9: 5e pop %esi 10bbca: 5f pop %edi 10bbcb: c9 leave 10bbcc: c3 ret 10bbcd: 8d 76 00 lea 0x0(%esi),%esi if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10bbd0: 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) { 10bbd2: 85 c0 test %eax,%eax 10bbd4: 74 be je 10bb94 if (tvp->ptr == ptr) { 10bbd6: 39 58 04 cmp %ebx,0x4(%eax) 10bbd9: 75 f5 jne 10bbd0 tvp->dtor = dtor; 10bbdb: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10bbde: e8 35 1e 00 00 call 10da18 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bbe3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbe5: 8d 65 f4 lea -0xc(%ebp),%esp 10bbe8: 5b pop %ebx 10bbe9: 5e pop %esi 10bbea: 5f pop %edi 10bbeb: c9 leave 10bbec: c3 ret 10bbed: 8d 76 00 lea 0x0(%esi),%esi * 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(); 10bbf0: e8 23 1e 00 00 call 10da18 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10bbf5: b8 1a 00 00 00 mov $0x1a,%eax 10bbfa: eb 83 jmp 10bb7f Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10bbfc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc01: 8d 65 f4 lea -0xc(%ebp),%esp 10bc04: 5b pop %ebx 10bc05: 5e pop %esi 10bc06: 5f pop %edi 10bc07: c9 leave 10bc08: c3 ret =============================================================================== 0010bc0c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10bc0c: 55 push %ebp 10bc0d: 89 e5 mov %esp,%ebp 10bc0f: 53 push %ebx 10bc10: 83 ec 14 sub $0x14,%esp 10bc13: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10bc16: 85 db test %ebx,%ebx 10bc18: 74 76 je 10bc90 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10bc1a: 83 ec 08 sub $0x8,%esp 10bc1d: 8d 45 f4 lea -0xc(%ebp),%eax 10bc20: 50 push %eax 10bc21: ff 75 08 pushl 0x8(%ebp) 10bc24: e8 13 1e 00 00 call 10da3c <_Thread_Get> switch (location) { 10bc29: 83 c4 10 add $0x10,%esp 10bc2c: 8b 55 f4 mov -0xc(%ebp),%edx 10bc2f: 85 d2 test %edx,%edx 10bc31: 74 0d je 10bc40 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bc33: b8 04 00 00 00 mov $0x4,%eax } 10bc38: 8b 5d fc mov -0x4(%ebp),%ebx 10bc3b: c9 leave 10bc3c: c3 ret 10bc3d: 8d 76 00 lea 0x0(%esi),%esi the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10bc40: 8b 88 f4 00 00 00 mov 0xf4(%eax),%ecx while (tvp) { 10bc46: 85 c9 test %ecx,%ecx 10bc48: 74 17 je 10bc61 if (tvp->ptr == ptr) { 10bc4a: 39 59 04 cmp %ebx,0x4(%ecx) 10bc4d: 75 0c jne 10bc5b 10bc4f: eb 49 jmp 10bc9a 10bc51: 8d 76 00 lea 0x0(%esi),%esi 10bc54: 39 5a 04 cmp %ebx,0x4(%edx) 10bc57: 74 17 je 10bc70 10bc59: 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; 10bc5b: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10bc5d: 85 d2 test %edx,%edx 10bc5f: 75 f3 jne 10bc54 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10bc61: e8 b2 1d 00 00 call 10da18 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10bc66: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc6b: 8b 5d fc mov -0x4(%ebp),%ebx 10bc6e: c9 leave 10bc6f: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10bc70: 8b 1a mov (%edx),%ebx 10bc72: 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 ); 10bc74: 83 ec 08 sub $0x8,%esp 10bc77: 52 push %edx 10bc78: 50 push %eax 10bc79: e8 b2 00 00 00 call 10bd30 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10bc7e: e8 95 1d 00 00 call 10da18 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bc83: 83 c4 10 add $0x10,%esp 10bc86: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc88: 8b 5d fc mov -0x4(%ebp),%ebx 10bc8b: c9 leave 10bc8c: c3 ret 10bc8d: 8d 76 00 lea 0x0(%esi),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10bc90: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc95: 8b 5d fc mov -0x4(%ebp),%ebx 10bc98: c9 leave 10bc99: 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; 10bc9a: 8b 11 mov (%ecx),%edx 10bc9c: 89 90 f4 00 00 00 mov %edx,0xf4(%eax) 10bca2: 89 ca mov %ecx,%edx 10bca4: eb ce jmp 10bc74 =============================================================================== 0010bca8 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10bca8: 55 push %ebp 10bca9: 89 e5 mov %esp,%ebp 10bcab: 56 push %esi 10bcac: 53 push %ebx 10bcad: 83 ec 10 sub $0x10,%esp 10bcb0: 8b 5d 0c mov 0xc(%ebp),%ebx 10bcb3: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10bcb6: 85 db test %ebx,%ebx 10bcb8: 74 56 je 10bd10 return RTEMS_INVALID_ADDRESS; if ( !result ) 10bcba: 85 f6 test %esi,%esi 10bcbc: 74 52 je 10bd10 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10bcbe: 83 ec 08 sub $0x8,%esp 10bcc1: 8d 45 f4 lea -0xc(%ebp),%eax 10bcc4: 50 push %eax 10bcc5: ff 75 08 pushl 0x8(%ebp) 10bcc8: e8 6f 1d 00 00 call 10da3c <_Thread_Get> switch (location) { 10bccd: 83 c4 10 add $0x10,%esp 10bcd0: 8b 55 f4 mov -0xc(%ebp),%edx 10bcd3: 85 d2 test %edx,%edx 10bcd5: 75 2d jne 10bd04 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10bcd7: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax while (tvp) { 10bcdd: 85 c0 test %eax,%eax 10bcdf: 75 09 jne 10bcea 10bce1: eb 39 jmp 10bd1c 10bce3: 90 nop */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10bce4: 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) { 10bce6: 85 c0 test %eax,%eax 10bce8: 74 32 je 10bd1c <== NEVER TAKEN if (tvp->ptr == ptr) { 10bcea: 39 58 04 cmp %ebx,0x4(%eax) 10bced: 75 f5 jne 10bce4 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10bcef: 8b 40 0c mov 0xc(%eax),%eax 10bcf2: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10bcf4: e8 1f 1d 00 00 call 10da18 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bcf9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bcfb: 8d 65 f8 lea -0x8(%ebp),%esp 10bcfe: 5b pop %ebx 10bcff: 5e pop %esi 10bd00: c9 leave 10bd01: c3 ret 10bd02: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bd04: b8 04 00 00 00 mov $0x4,%eax } 10bd09: 8d 65 f8 lea -0x8(%ebp),%esp 10bd0c: 5b pop %ebx 10bd0d: 5e pop %esi 10bd0e: c9 leave 10bd0f: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10bd10: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bd15: 8d 65 f8 lea -0x8(%ebp),%esp 10bd18: 5b pop %ebx 10bd19: 5e pop %esi 10bd1a: c9 leave 10bd1b: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10bd1c: e8 f7 1c 00 00 call 10da18 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10bd21: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bd26: 8d 65 f8 lea -0x8(%ebp),%esp 10bd29: 5b pop %ebx 10bd2a: 5e pop %esi 10bd2b: c9 leave 10bd2c: c3 ret =============================================================================== 0010bea8 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10bea8: 55 push %ebp 10bea9: 89 e5 mov %esp,%ebp 10beab: 53 push %ebx 10beac: 83 ec 14 sub $0x14,%esp 10beaf: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10beb2: 80 3d 9c 95 12 00 00 cmpb $0x0,0x12959c 10beb9: 0f 84 a9 00 00 00 je 10bf68 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10bebf: 85 db test %ebx,%ebx 10bec1: 0f 84 ad 00 00 00 je 10bf74 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10bec7: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10bece: 83 ec 0c sub $0xc,%esp 10bed1: 53 push %ebx 10bed2: e8 81 f4 ff ff call 10b358 <_TOD_Validate> 10bed7: 83 c4 10 add $0x10,%esp 10beda: 84 c0 test %al,%al 10bedc: 75 0a jne 10bee8 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10bede: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bee3: 8b 5d fc mov -0x4(%ebp),%ebx 10bee6: c9 leave 10bee7: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10bee8: 83 ec 0c sub $0xc,%esp 10beeb: 53 push %ebx 10beec: e8 db f3 ff ff call 10b2cc <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10bef1: 83 c4 10 add $0x10,%esp 10bef4: 3b 05 28 96 12 00 cmp 0x129628,%eax 10befa: 76 e2 jbe 10bede 10befc: 8b 15 8c 95 12 00 mov 0x12958c,%edx 10bf02: 42 inc %edx 10bf03: 89 15 8c 95 12 00 mov %edx,0x12958c return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10bf09: 83 ec 08 sub $0x8,%esp 10bf0c: 6a 10 push $0x10 10bf0e: ff 35 38 9b 12 00 pushl 0x129b38 10bf14: 89 45 f4 mov %eax,-0xc(%ebp) 10bf17: e8 50 25 00 00 call 10e46c <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10bf1c: 8b 15 38 9b 12 00 mov 0x129b38,%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( 10bf22: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bf25: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10bf2c: c7 42 64 94 da 10 00 movl $0x10da94,0x64(%edx) the_watchdog->id = id; 10bf33: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10bf36: 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( 10bf3d: 8b 45 f4 mov -0xc(%ebp),%eax 10bf40: 2b 05 28 96 12 00 sub 0x129628,%eax 10bf46: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10bf49: 58 pop %eax 10bf4a: 59 pop %ecx 10bf4b: 83 c2 48 add $0x48,%edx 10bf4e: 52 push %edx 10bf4f: 68 54 96 12 00 push $0x129654 10bf54: e8 db 2a 00 00 call 10ea34 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10bf59: e8 ea 1c 00 00 call 10dc48 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bf5e: 83 c4 10 add $0x10,%esp 10bf61: 31 c0 xor %eax,%eax 10bf63: e9 7b ff ff ff jmp 10bee3 ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10bf68: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bf6d: 8b 5d fc mov -0x4(%ebp),%ebx 10bf70: c9 leave 10bf71: c3 ret 10bf72: 66 90 xchg %ax,%ax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10bf74: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bf79: 8b 5d fc mov -0x4(%ebp),%ebx 10bf7c: c9 leave 10bf7d: c3 ret =============================================================================== 00109e74 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 109e74: 55 push %ebp 109e75: 89 e5 mov %esp,%ebp 109e77: 8b 45 08 mov 0x8(%ebp),%eax int baud_index; switch (termios_baud) { 109e7a: 83 f8 09 cmp $0x9,%eax 109e7d: 0f 84 f1 00 00 00 je 109f74 109e83: 7e 37 jle 109ebc 109e85: 83 f8 0e cmp $0xe,%eax 109e88: 0f 84 f6 00 00 00 je 109f84 109e8e: 7e 5c jle 109eec 109e90: 3d 02 10 00 00 cmp $0x1002,%eax 109e95: 0f 84 01 01 00 00 je 109f9c 109e9b: 0f 8e 97 00 00 00 jle 109f38 109ea1: 3d 03 10 00 00 cmp $0x1003,%eax 109ea6: 0f 84 e0 00 00 00 je 109f8c 109eac: 3d 04 10 00 00 cmp $0x1004,%eax 109eb1: 75 51 jne 109f04 <== 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; 109eb3: b8 13 00 00 00 mov $0x13,%eax default: baud_index = -1; break; } return baud_index; } 109eb8: c9 leave 109eb9: c3 ret 109eba: 66 90 xchg %ax,%ax rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109ebc: 83 f8 04 cmp $0x4,%eax 109ebf: 0f 84 b7 00 00 00 je 109f7c 109ec5: 7f 45 jg 109f0c 109ec7: 83 f8 01 cmp $0x1,%eax 109eca: 0f 84 8c 00 00 00 je 109f5c 109ed0: 0f 8e de 00 00 00 jle 109fb4 109ed6: 83 f8 02 cmp $0x2,%eax 109ed9: 0f 84 c5 00 00 00 je 109fa4 109edf: 83 f8 03 cmp $0x3,%eax 109ee2: 75 20 jne 109f04 <== 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; 109ee4: b8 03 00 00 00 mov $0x3,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109ee9: c9 leave 109eea: c3 ret 109eeb: 90 nop rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109eec: 83 f8 0b cmp $0xb,%eax 109eef: 0f 84 9f 00 00 00 je 109f94 109ef5: 7c 39 jl 109f30 109ef7: 83 f8 0c cmp $0xc,%eax 109efa: 74 50 je 109f4c 109efc: 83 f8 0d cmp $0xd,%eax 109eff: 74 62 je 109f63 <== ALWAYS TAKEN 109f01: 8d 76 00 lea 0x0(%esi),%esi 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; 109f04: b8 ff ff ff ff mov $0xffffffff,%eax } return baud_index; } 109f09: c9 leave 109f0a: c3 ret 109f0b: 90 nop rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109f0c: 83 f8 06 cmp $0x6,%eax 109f0f: 74 43 je 109f54 109f11: 7c 15 jl 109f28 109f13: 83 f8 07 cmp $0x7,%eax 109f16: 0f 84 90 00 00 00 je 109fac 109f1c: 83 f8 08 cmp $0x8,%eax 109f1f: 75 e3 jne 109f04 <== 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; 109f21: b8 08 00 00 00 mov $0x8,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f26: c9 leave 109f27: 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; 109f28: b8 05 00 00 00 mov $0x5,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f2d: c9 leave 109f2e: c3 ret 109f2f: 90 nop 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; 109f30: b8 0a 00 00 00 mov $0xa,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f35: c9 leave 109f36: c3 ret 109f37: 90 nop rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109f38: 83 f8 0f cmp $0xf,%eax 109f3b: 74 2f je 109f6c 109f3d: 3d 01 10 00 00 cmp $0x1001,%eax 109f42: 75 c0 jne 109f04 <== 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; 109f44: b8 10 00 00 00 mov $0x10,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f49: c9 leave 109f4a: c3 ret 109f4b: 90 nop 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; 109f4c: b8 0c 00 00 00 mov $0xc,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f51: c9 leave 109f52: c3 ret 109f53: 90 nop 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; 109f54: b8 06 00 00 00 mov $0x6,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f59: c9 leave 109f5a: c3 ret 109f5b: 90 nop { int baud_index; switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; 109f5c: b8 01 00 00 00 mov $0x1,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f61: c9 leave 109f62: 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; 109f63: b8 0d 00 00 00 mov $0xd,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f68: c9 leave 109f69: c3 ret 109f6a: 66 90 xchg %ax,%ax 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; 109f6c: b8 0f 00 00 00 mov $0xf,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f71: c9 leave 109f72: c3 ret 109f73: 90 nop 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; 109f74: b8 09 00 00 00 mov $0x9,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f79: c9 leave 109f7a: c3 ret 109f7b: 90 nop 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; 109f7c: b8 04 00 00 00 mov $0x4,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f81: c9 leave 109f82: c3 ret 109f83: 90 nop 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; 109f84: b8 0e 00 00 00 mov $0xe,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f89: c9 leave 109f8a: c3 ret 109f8b: 90 nop 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; 109f8c: b8 12 00 00 00 mov $0x12,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f91: c9 leave 109f92: c3 ret 109f93: 90 nop 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; 109f94: b8 0b 00 00 00 mov $0xb,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109f99: c9 leave 109f9a: c3 ret 109f9b: 90 nop 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; 109f9c: b8 11 00 00 00 mov $0x11,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109fa1: c9 leave 109fa2: c3 ret 109fa3: 90 nop int baud_index; switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 109fa4: b8 02 00 00 00 mov $0x2,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109fa9: c9 leave 109faa: c3 ret 109fab: 90 nop 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; 109fac: b8 07 00 00 00 mov $0x7,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109fb1: c9 leave 109fb2: c3 ret 109fb3: 90 nop rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109fb4: 85 c0 test %eax,%eax 109fb6: 0f 85 48 ff ff ff jne 109f04 case B0: baud_index = 0; break; 109fbc: 31 c0 xor %eax,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 109fbe: c9 leave 109fbf: c3 ret =============================================================================== 001084e0 : extern rtems_assoc_t termios_assoc_table[]; int32_t rtems_termios_baud_to_number( int termios_baud ) { 1084e0: 55 push %ebp 1084e1: 89 e5 mov %esp,%ebp 1084e3: 53 push %ebx 1084e4: 83 ec 0c sub $0xc,%esp 1084e7: 8b 5d 08 mov 0x8(%ebp),%ebx int baud; baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud ); 1084ea: 53 push %ebx 1084eb: 68 00 53 12 00 push $0x125300 1084f0: e8 57 6c 00 00 call 10f14c if ( baud == 0 && termios_baud != 0 ) 1084f5: 83 c4 10 add $0x10,%esp 1084f8: 85 c0 test %eax,%eax 1084fa: 74 08 je 108504 return -1; return baud; } 1084fc: 8b 5d fc mov -0x4(%ebp),%ebx 1084ff: c9 leave 108500: c3 ret 108501: 8d 76 00 lea 0x0(%esi),%esi ) { int baud; baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud ); if ( baud == 0 && termios_baud != 0 ) 108504: 83 fb 01 cmp $0x1,%ebx 108507: 19 c0 sbb %eax,%eax 108509: f7 d0 not %eax 10850b: eb ef jmp 1084fc =============================================================================== 00108a64 : } } rtems_status_code rtems_termios_close (void *arg) { 108a64: 55 push %ebp 108a65: 89 e5 mov %esp,%ebp 108a67: 56 push %esi 108a68: 53 push %ebx 108a69: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 108a6c: 8b 06 mov (%esi),%eax 108a6e: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain( 108a71: 52 push %edx 108a72: 6a 00 push $0x0 108a74: 6a 00 push $0x0 108a76: ff 35 cc 76 12 00 pushl 0x1276cc 108a7c: e8 27 21 00 00 call 10aba8 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 108a81: 83 c4 10 add $0x10,%esp 108a84: 85 c0 test %eax,%eax 108a86: 0f 85 9a 01 00 00 jne 108c26 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 108a8c: 8b 43 08 mov 0x8(%ebx),%eax 108a8f: 48 dec %eax 108a90: 89 43 08 mov %eax,0x8(%ebx) 108a93: 85 c0 test %eax,%eax 108a95: 0f 85 bf 00 00 00 jne 108b5a if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 108a9b: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 108aa1: c1 e0 05 shl $0x5,%eax 108aa4: 8b 80 44 73 12 00 mov 0x127344(%eax),%eax 108aaa: 85 c0 test %eax,%eax 108aac: 0f 84 0a 01 00 00 je 108bbc /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 108ab2: 83 ec 0c sub $0xc,%esp 108ab5: 53 push %ebx 108ab6: ff d0 call *%eax 108ab8: 83 c4 10 add $0x10,%esp } drainOutput (tty); rtems_semaphore_release (tty->osem); } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 108abb: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 108ac2: 0f 84 2c 01 00 00 je 108bf4 <== 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) 108ac8: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 108ace: 85 c0 test %eax,%eax 108ad0: 74 0d je 108adf (*tty->device.lastClose)(tty->major, tty->minor, arg); 108ad2: 51 push %ecx 108ad3: 56 push %esi 108ad4: ff 73 10 pushl 0x10(%ebx) 108ad7: ff 73 0c pushl 0xc(%ebx) 108ada: ff d0 call *%eax 108adc: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 108adf: 8b 03 mov (%ebx),%eax 108ae1: 85 c0 test %eax,%eax 108ae3: 0f 84 b7 00 00 00 je 108ba0 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 108ae9: 8b 53 04 mov 0x4(%ebx),%edx 108aec: 89 50 04 mov %edx,0x4(%eax) 108aef: 8b 53 04 mov 0x4(%ebx),%edx } if (tty->back == NULL) { 108af2: 85 d2 test %edx,%edx 108af4: 0f 84 8a 00 00 00 je 108b84 <== ALWAYS TAKEN rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 108afa: 89 02 mov %eax,(%edx) } rtems_semaphore_delete (tty->isem); 108afc: 83 ec 0c sub $0xc,%esp 108aff: ff 73 14 pushl 0x14(%ebx) 108b02: e8 fd 1f 00 00 call 10ab04 rtems_semaphore_delete (tty->osem); 108b07: 5a pop %edx 108b08: ff 73 18 pushl 0x18(%ebx) 108b0b: e8 f4 1f 00 00 call 10ab04 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 108b10: 58 pop %eax 108b11: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108b17: e8 e8 1f 00 00 call 10ab04 if ((tty->device.pollRead == NULL) || 108b1c: 83 c4 10 add $0x10,%esp 108b1f: 8b b3 a0 00 00 00 mov 0xa0(%ebx),%esi 108b25: 85 f6 test %esi,%esi 108b27: 74 4b je 108b74 108b29: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 108b30: 74 42 je 108b74 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 108b32: 83 ec 0c sub $0xc,%esp 108b35: ff 73 58 pushl 0x58(%ebx) 108b38: e8 f7 ea ff ff call 107634 free (tty->rawOutBuf.theBuf); 108b3d: 59 pop %ecx 108b3e: ff 73 7c pushl 0x7c(%ebx) 108b41: e8 ee ea ff ff call 107634 free (tty->cbuf); 108b46: 5a pop %edx 108b47: ff 73 1c pushl 0x1c(%ebx) 108b4a: e8 e5 ea ff ff call 107634 free (tty); 108b4f: 89 1c 24 mov %ebx,(%esp) 108b52: e8 dd ea ff ff call 107634 108b57: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 108b5a: 83 ec 0c sub $0xc,%esp 108b5d: ff 35 cc 76 12 00 pushl 0x1276cc 108b63: e8 3c 21 00 00 call 10aca4 return RTEMS_SUCCESSFUL; } 108b68: 31 c0 xor %eax,%eax 108b6a: 8d 65 f8 lea -0x8(%ebp),%esp 108b6d: 5b pop %ebx 108b6e: 5e pop %esi 108b6f: c9 leave 108b70: c3 ret 108b71: 8d 76 00 lea 0x0(%esi),%esi 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); 108b74: 83 ec 0c sub $0xc,%esp 108b77: ff 73 68 pushl 0x68(%ebx) 108b7a: e8 85 1f 00 00 call 10ab04 108b7f: 83 c4 10 add $0x10,%esp 108b82: eb ae jmp 108b32 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 108b84: a3 d4 76 12 00 mov %eax,0x1276d4 if ( rtems_termios_ttyHead != NULL ) { 108b89: 85 c0 test %eax,%eax 108b8b: 0f 84 6b ff ff ff je 108afc rtems_termios_ttyHead->back = NULL; 108b91: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 108b98: e9 5f ff ff ff jmp 108afc 108b9d: 8d 76 00 lea 0x0(%esi),%esi 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; 108ba0: 8b 53 04 mov 0x4(%ebx),%edx 108ba3: 89 15 d0 76 12 00 mov %edx,0x1276d0 if ( rtems_termios_ttyTail != NULL ) { 108ba9: 85 d2 test %edx,%edx 108bab: 74 d7 je 108b84 rtems_termios_ttyTail->forw = NULL; 108bad: c7 02 00 00 00 00 movl $0x0,(%edx) 108bb3: 8b 03 mov (%ebx),%eax 108bb5: e9 40 ff ff ff jmp 108afa 108bba: 66 90 xchg %ax,%ax 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); 108bbc: 50 push %eax 108bbd: 6a 00 push $0x0 108bbf: 6a 00 push $0x0 108bc1: ff 73 18 pushl 0x18(%ebx) 108bc4: e8 df 1f 00 00 call 10aba8 if (sc != RTEMS_SUCCESSFUL) { 108bc9: 83 c4 10 add $0x10,%esp 108bcc: 85 c0 test %eax,%eax 108bce: 75 56 jne 108c26 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 108bd0: 89 d8 mov %ebx,%eax 108bd2: e8 75 f9 ff ff call 10854c rtems_semaphore_release (tty->osem); 108bd7: 83 ec 0c sub $0xc,%esp 108bda: ff 73 18 pushl 0x18(%ebx) 108bdd: e8 c2 20 00 00 call 10aca4 108be2: 83 c4 10 add $0x10,%esp } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 108be5: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 108bec: 0f 85 d6 fe ff ff jne 108ac8 108bf2: 66 90 xchg %ax,%ax /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 108bf4: 83 ec 08 sub $0x8,%esp 108bf7: 6a 01 push $0x1 108bf9: ff b3 c4 00 00 00 pushl 0xc4(%ebx) 108bff: e8 40 1b 00 00 call 10a744 if (sc != RTEMS_SUCCESSFUL) 108c04: 83 c4 10 add $0x10,%esp 108c07: 85 c0 test %eax,%eax 108c09: 75 1b jne 108c26 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 108c0b: 83 ec 08 sub $0x8,%esp 108c0e: 6a 01 push $0x1 108c10: ff b3 c8 00 00 00 pushl 0xc8(%ebx) 108c16: e8 29 1b 00 00 call 10a744 if (sc != RTEMS_SUCCESSFUL) 108c1b: 83 c4 10 add $0x10,%esp 108c1e: 85 c0 test %eax,%eax 108c20: 0f 84 a2 fe ff ff je 108ac8 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 108c26: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108c29: 50 push %eax <== NOT EXECUTED 108c2a: e8 bd 25 00 00 call 10b1ec <== NOT EXECUTED =============================================================================== 0010a10c : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 10a10c: 55 push %ebp 10a10d: 89 e5 mov %esp,%ebp 10a10f: 83 ec 08 sub $0x8,%esp 10a112: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 10a115: 8b 55 0c mov 0xc(%ebp),%edx 10a118: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10a11e: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 10a125: 74 2d je 10a154 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 10a127: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 10a12e: 74 0c je 10a13c rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 10a130: 89 45 08 mov %eax,0x8(%ebp) } 10a133: c9 leave rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 10a134: e9 27 fd ff ff jmp 109e60 10a139: 8d 76 00 lea 0x0(%esi),%esi if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10a13c: 8b 15 f4 73 12 00 mov 0x1273f4,%edx 10a142: 85 d2 test %edx,%edx 10a144: 74 09 je 10a14f <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 10a146: 83 ec 0c sub $0xc,%esp 10a149: 50 push %eax 10a14a: ff d2 call *%edx 10a14c: 83 c4 10 add $0x10,%esp } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } 10a14f: 31 c0 xor %eax,%eax 10a151: c9 leave 10a152: c3 ret 10a153: 90 nop if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 10a154: 83 ec 08 sub $0x8,%esp 10a157: 6a 02 push $0x2 10a159: ff b0 c8 00 00 00 pushl 0xc8(%eax) 10a15f: e8 e0 05 00 00 call 10a744 if (sc != RTEMS_SUCCESSFUL) 10a164: 83 c4 10 add $0x10,%esp 10a167: 85 c0 test %eax,%eax 10a169: 74 e4 je 10a14f <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10a16b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a16e: 50 push %eax <== NOT EXECUTED 10a16f: e8 78 10 00 00 call 10b1ec <== NOT EXECUTED =============================================================================== 00109ae8 : * 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) { 109ae8: 55 push %ebp 109ae9: 89 e5 mov %esp,%ebp 109aeb: 57 push %edi 109aec: 56 push %esi 109aed: 53 push %ebx 109aee: 83 ec 3c sub $0x3c,%esp 109af1: 8b 5d 08 mov 0x8(%ebp),%ebx 109af4: 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) { 109af7: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 109afd: c1 e0 05 shl $0x5,%eax 109b00: 8b 80 50 73 12 00 mov 0x127350(%eax),%eax 109b06: 85 c0 test %eax,%eax 109b08: 0f 84 8a 00 00 00 je 109b98 while (len--) { 109b0e: 8b 4d 10 mov 0x10(%ebp),%ecx 109b11: 85 c9 test %ecx,%ecx 109b13: 74 2a je 109b3f <== NEVER TAKEN 109b15: 31 ff xor %edi,%edi 109b17: eb 12 jmp 109b2b 109b19: 8d 76 00 lea 0x0(%esi),%esi 109b1c: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 109b22: c1 e0 05 shl $0x5,%eax 109b25: 8b 80 50 73 12 00 mov 0x127350(%eax),%eax c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 109b2b: 83 ec 08 sub $0x8,%esp 109b2e: 53 push %ebx 109b2f: 0f be 14 3e movsbl (%esi,%edi,1),%edx 109b33: 52 push %edx 109b34: ff d0 call *%eax 109b36: 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--) { 109b37: 83 c4 10 add $0x10,%esp 109b3a: 3b 7d 10 cmp 0x10(%ebp),%edi 109b3d: 75 dd jne 109b1c } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 109b3f: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx 109b45: 85 d2 test %edx,%edx 109b47: 75 3b jne 109b84 <== NEVER TAKEN 109b49: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 109b4f: 85 c0 test %eax,%eax 109b51: 74 31 je 109b84 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 109b53: 83 ec 08 sub $0x8,%esp 109b56: ff b3 e0 00 00 00 pushl 0xe0(%ebx) 109b5c: 8d 53 30 lea 0x30(%ebx),%edx 109b5f: 52 push %edx 109b60: ff d0 call *%eax tty->tty_rcvwakeup = 1; 109b62: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) 109b69: 00 00 00 109b6c: 83 c4 10 add $0x10,%esp } return 0; 109b6f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 109b76: 8b 45 e0 mov -0x20(%ebp),%eax 109b79: 8d 65 f4 lea -0xc(%ebp),%esp 109b7c: 5b pop %ebx 109b7d: 5e pop %esi 109b7e: 5f pop %edi 109b7f: c9 leave 109b80: c3 ret 109b81: 8d 76 00 lea 0x0(%esi),%esi */ 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; 109b84: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 109b8b: 8b 45 e0 mov -0x20(%ebp),%eax 109b8e: 8d 65 f4 lea -0xc(%ebp),%esp 109b91: 5b pop %ebx 109b92: 5e pop %esi 109b93: 5f pop %edi 109b94: c9 leave 109b95: c3 ret 109b96: 66 90 xchg %ax,%ax 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) { 109b98: 8b 7d 10 mov 0x10(%ebp),%edi 109b9b: c6 45 db 00 movb $0x0,-0x25(%ebp) 109b9f: 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); 109ba6: 8d 43 30 lea 0x30(%ebx),%eax 109ba9: 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, 109bac: 8d 53 4a lea 0x4a(%ebx),%edx 109baf: 89 55 cc mov %edx,-0x34(%ebp) tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 109bb2: 85 ff test %edi,%edi 109bb4: 0f 84 0b 01 00 00 je 109cc5 <== NEVER TAKEN 109bba: 66 90 xchg %ax,%ax c = *buf++; 109bbc: 8a 06 mov (%esi),%al 109bbe: 88 45 e7 mov %al,-0x19(%ebp) 109bc1: 46 inc %esi /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 109bc2: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109bc8: f6 c4 02 test $0x2,%ah 109bcb: 74 1c je 109be9 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 109bcd: 0f be 45 e7 movsbl -0x19(%ebp),%eax 109bd1: 0f b6 53 4a movzbl 0x4a(%ebx),%edx 109bd5: 39 d0 cmp %edx,%eax 109bd7: 0f 84 07 01 00 00 je 109ce4 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 109bdd: 0f b6 53 49 movzbl 0x49(%ebx),%edx 109be1: 39 d0 cmp %edx,%eax 109be3: 0f 84 4f 01 00 00 je 109d38 <== NEVER TAKEN /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 109be9: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 109bed: 0f 85 0c 01 00 00 jne 109cff <== NEVER TAKEN } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 109bf3: 8b 43 60 mov 0x60(%ebx),%eax 109bf6: 8b 53 64 mov 0x64(%ebx),%edx 109bf9: 89 55 dc mov %edx,-0x24(%ebp) 109bfc: 40 inc %eax 109bfd: 31 d2 xor %edx,%edx 109bff: f7 75 dc divl -0x24(%ebp) 109c02: 89 d1 mov %edx,%ecx /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 109c04: 9c pushf 109c05: fa cli 109c06: 8f 45 d4 popl -0x2c(%ebp) if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 109c09: 8b 43 5c mov 0x5c(%ebx),%eax 109c0c: 89 45 c4 mov %eax,-0x3c(%ebp) 109c0f: 8b 43 64 mov 0x64(%ebx),%eax % tty->rawInBuf.Size) > tty->highwater) && 109c12: 8b 53 64 mov 0x64(%ebx),%edx 109c15: 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) 109c18: 2b 45 c4 sub -0x3c(%ebp),%eax 109c1b: 01 c8 add %ecx,%eax % tty->rawInBuf.Size) > tty->highwater) && 109c1d: 31 d2 xor %edx,%edx 109c1f: 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) 109c22: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx 109c28: 76 46 jbe 109c70 <== ALWAYS TAKEN % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 109c2a: 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) && 109c30: a8 01 test $0x1,%al <== NOT EXECUTED 109c32: 75 3c jne 109c70 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 109c34: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109c3a: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 109c3d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 109c43: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109c49: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 109c4e: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 109c53: 0f 84 22 01 00 00 je 109d7b <== 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) ) { 109c59: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109c5f: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 109c64: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 109c69: 0f 84 50 01 00 00 je 109dbf <== NOT EXECUTED 109c6f: 90 nop <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 109c70: ff 75 d4 pushl -0x2c(%ebp) 109c73: 9d popf if (newTail == tty->rawInBuf.Head) { 109c74: 8b 43 5c mov 0x5c(%ebx),%eax 109c77: 39 c8 cmp %ecx,%eax 109c79: 0f 84 b1 00 00 00 je 109d30 <== NEVER TAKEN dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 109c7f: 8b 43 58 mov 0x58(%ebx),%eax 109c82: 8a 55 e7 mov -0x19(%ebp),%dl 109c85: 88 14 08 mov %dl,(%eax,%ecx,1) tty->rawInBuf.Tail = newTail; 109c88: 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 )) { 109c8b: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax 109c91: 85 c0 test %eax,%eax 109c93: 75 27 jne 109cbc <== NEVER TAKEN 109c95: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 109c9b: 85 c0 test %eax,%eax 109c9d: 74 1d je 109cbc <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 109c9f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109ca2: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 109ca8: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 109cab: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 109cad: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 109cb4: 00 00 00 109cb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109cba: 66 90 xchg %ax,%ax <== NOT EXECUTED 109cbc: 4f dec %edi tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 109cbd: 85 ff test %edi,%edi 109cbf: 0f 85 f7 fe ff ff jne 109bbc <== NEVER TAKEN } } } } tty->rawInBufDropped += dropped; 109cc5: 8b 45 e0 mov -0x20(%ebp),%eax 109cc8: 01 43 78 add %eax,0x78(%ebx) rtems_semaphore_release (tty->rawInBuf.Semaphore); 109ccb: 83 ec 0c sub $0xc,%esp 109cce: ff 73 68 pushl 0x68(%ebx) 109cd1: e8 ce 0f 00 00 call 10aca4 return dropped; 109cd6: 83 c4 10 add $0x10,%esp } 109cd9: 8b 45 e0 mov -0x20(%ebp),%eax 109cdc: 8d 65 f4 lea -0xc(%ebp),%esp 109cdf: 5b pop %ebx 109ce0: 5e pop %esi 109ce1: 5f pop %edi 109ce2: c9 leave 109ce3: 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]) { 109ce4: 0f b6 53 49 movzbl 0x49(%ebx),%edx 109ce8: 39 d0 cmp %edx,%eax 109cea: 74 7e je 109d6a <== NEVER TAKEN tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 109cec: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109cf2: 83 c8 10 or $0x10,%eax 109cf5: 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--) { 109cfb: 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) { 109cff: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109d05: 83 e0 30 and $0x30,%eax 109d08: 83 f8 20 cmp $0x20,%eax 109d0b: 75 af jne 109cbc <== ALWAYS TAKEN /* disable interrupts */ rtems_interrupt_disable(level); 109d0d: 9c pushf <== NOT EXECUTED 109d0e: fa cli <== NOT EXECUTED 109d0f: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 109d10: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109d16: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 109d19: 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) { 109d1f: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 109d25: 85 c0 test %eax,%eax <== NOT EXECUTED 109d27: 75 20 jne 109d49 <== 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); 109d29: 52 push %edx <== NOT EXECUTED 109d2a: 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; 109d2b: 4f dec %edi <== NOT EXECUTED 109d2c: eb 8f jmp 109cbd <== NOT EXECUTED 109d2e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 109d30: 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; 109d33: 4f dec %edi <== NOT EXECUTED 109d34: eb 87 jmp 109cbd <== NOT EXECUTED 109d36: 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; 109d38: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109d3e: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 109d41: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 109d47: eb b2 jmp 109cfb <== 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); 109d49: 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)( 109d4f: 51 push %ecx <== NOT EXECUTED 109d50: 6a 01 push $0x1 <== NOT EXECUTED 109d52: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 109d55: 50 push %eax <== NOT EXECUTED 109d56: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109d59: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 109d5c: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 109d62: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109d65: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 109d68: eb bf jmp 109d29 <== 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; 109d6a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109d70: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 109d73: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 109d79: eb 80 jmp 109cfb <== 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) || 109d7b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109d81: a8 20 test $0x20,%al <== NOT EXECUTED 109d83: 75 0e jne 109d93 <== NOT EXECUTED 109d85: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 109d8b: 85 c0 test %eax,%eax <== NOT EXECUTED 109d8d: 0f 85 dd fe ff ff jne 109c70 <== 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; 109d93: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109d99: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 109d9c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 109da2: 52 push %edx <== NOT EXECUTED 109da3: 6a 01 push $0x1 <== NOT EXECUTED 109da5: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 109da8: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109dab: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 109dae: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 109db4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109db7: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 109dba: e9 b1 fe ff ff jmp 109c70 <== 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; 109dbf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109dc5: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 109dc8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 109dce: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 109dd4: 85 c0 test %eax,%eax <== NOT EXECUTED 109dd6: 0f 84 94 fe ff ff je 109c70 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 109ddc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109ddf: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109de2: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 109de5: ff d0 call *%eax <== NOT EXECUTED 109de7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109dea: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 109ded: e9 7e fe ff ff jmp 109c70 <== NOT EXECUTED =============================================================================== 00108510 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 108510: 55 push %ebp 108511: 89 e5 mov %esp,%ebp 108513: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 108516: a1 cc 76 12 00 mov 0x1276cc,%eax 10851b: 85 c0 test %eax,%eax 10851d: 74 05 je 108524 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 10851f: c9 leave 108520: c3 ret 108521: 8d 76 00 lea 0x0(%esi),%esi /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 108524: 83 ec 0c sub $0xc,%esp 108527: 68 cc 76 12 00 push $0x1276cc 10852c: 6a 00 push $0x0 10852e: 6a 54 push $0x54 108530: 6a 01 push $0x1 108532: 68 69 6d 52 54 push $0x54526d69 108537: e8 f0 23 00 00 call 10a92c 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) 10853c: 83 c4 20 add $0x20,%esp 10853f: 85 c0 test %eax,%eax 108541: 74 dc je 10851f rtems_fatal_error_occurred (sc); 108543: 83 ec 0c sub $0xc,%esp 108546: 50 push %eax 108547: e8 a0 2c 00 00 call 10b1ec =============================================================================== 00108c50 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 108c50: 55 push %ebp 108c51: 89 e5 mov %esp,%ebp 108c53: 57 push %edi 108c54: 56 push %esi 108c55: 53 push %ebx 108c56: 83 ec 20 sub $0x20,%esp 108c59: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 108c5c: 8b 03 mov (%ebx),%eax 108c5e: 8b 40 34 mov 0x34(%eax),%eax 108c61: 89 45 e4 mov %eax,-0x1c(%ebp) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 108c64: 8b 73 08 mov 0x8(%ebx),%esi rtems_status_code sc; args->ioctl_return = 0; 108c67: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108c6e: 6a 00 push $0x0 108c70: 6a 00 push $0x0 108c72: ff 70 18 pushl 0x18(%eax) 108c75: e8 2e 1f 00 00 call 10aba8 108c7a: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) { 108c7d: 83 c4 10 add $0x10,%esp 108c80: 85 c0 test %eax,%eax 108c82: 75 24 jne 108ca8 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 108c84: 8b 43 04 mov 0x4(%ebx),%eax 108c87: 83 f8 04 cmp $0x4,%eax 108c8a: 74 70 je 108cfc 108c8c: 77 2a ja 108cb8 108c8e: 83 f8 02 cmp $0x2,%eax 108c91: 0f 84 9d 00 00 00 je 108d34 108c97: 0f 86 3f 02 00 00 jbe 108edc if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 108c9d: 8b 45 e4 mov -0x1c(%ebp),%eax 108ca0: e8 a7 f8 ff ff call 10854c break; 108ca5: eb 69 jmp 108d10 108ca7: 90 nop 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; 108ca8: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; return sc; } 108cab: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108cae: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108cb1: 5b pop %ebx <== NOT EXECUTED 108cb2: 5e pop %esi <== NOT EXECUTED 108cb3: 5f pop %edi <== NOT EXECUTED 108cb4: c9 leave <== NOT EXECUTED 108cb5: c3 ret <== NOT EXECUTED 108cb6: 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) { 108cb8: 3d 7f 66 04 40 cmp $0x4004667f,%eax 108cbd: 0f 84 f1 01 00 00 je 108eb4 <== NEVER TAKEN 108cc3: 0f 87 33 02 00 00 ja 108efc 108cc9: 83 f8 05 cmp $0x5,%eax 108ccc: 0f 84 ae 02 00 00 je 108f80 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 108cd2: 8b 55 e4 mov -0x1c(%ebp),%edx 108cd5: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax 108cdb: c1 e0 05 shl $0x5,%eax 108cde: 8b 80 58 73 12 00 mov 0x127358(%eax),%eax 108ce4: 85 c0 test %eax,%eax 108ce6: 0f 84 b8 02 00 00 je 108fa4 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 108cec: 83 ec 08 sub $0x8,%esp 108cef: 53 push %ebx 108cf0: 52 push %edx 108cf1: ff d0 call *%eax 108cf3: 89 45 e0 mov %eax,-0x20(%ebp) 108cf6: 83 c4 10 add $0x10,%esp 108cf9: eb 15 jmp 108d10 108cfb: 90 nop case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 108cfc: 8b 06 mov (%esi),%eax 108cfe: 8b 56 04 mov 0x4(%esi),%edx 108d01: 8b 4d e4 mov -0x1c(%ebp),%ecx 108d04: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx) 108d0a: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx) *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 108d10: 83 ec 0c sub $0xc,%esp 108d13: 8b 45 e4 mov -0x1c(%ebp),%eax 108d16: ff 70 18 pushl 0x18(%eax) 108d19: e8 86 1f 00 00 call 10aca4 args->ioctl_return = sc; 108d1e: 8b 55 e0 mov -0x20(%ebp),%edx 108d21: 89 53 0c mov %edx,0xc(%ebx) return sc; 108d24: 83 c4 10 add $0x10,%esp } 108d27: 8b 45 e0 mov -0x20(%ebp),%eax 108d2a: 8d 65 f4 lea -0xc(%ebp),%esp 108d2d: 5b pop %ebx 108d2e: 5e pop %esi 108d2f: 5f pop %edi 108d30: c9 leave 108d31: c3 ret 108d32: 66 90 xchg %ax,%ax case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 108d34: 8b 73 08 mov 0x8(%ebx),%esi 108d37: 8b 4d e4 mov -0x1c(%ebp),%ecx 108d3a: 83 c1 30 add $0x30,%ecx 108d3d: 89 4d dc mov %ecx,-0x24(%ebp) 108d40: b9 09 00 00 00 mov $0x9,%ecx 108d45: 8b 7d dc mov -0x24(%ebp),%edi 108d48: 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) && 108d4a: 8b 55 e4 mov -0x1c(%ebp),%edx 108d4d: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 108d53: f6 c4 02 test $0x2,%ah 108d56: 74 44 je 108d9c 108d58: f6 42 31 04 testb $0x4,0x31(%edx) 108d5c: 75 3e jne 108d9c !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 108d5e: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 108d64: 25 ef fd ff ff and $0xfffffdef,%eax 108d69: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 108d6f: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 108d75: a8 20 test $0x20,%al 108d77: 74 23 je 108d9c <== ALWAYS TAKEN /* disable interrupts */ rtems_interrupt_disable(level); 108d79: 9c pushf <== NOT EXECUTED 108d7a: fa cli <== NOT EXECUTED 108d7b: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 108d7c: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 108d82: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 108d85: 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) { 108d8b: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED 108d91: 85 ff test %edi,%edi <== NOT EXECUTED 108d93: 0f 85 bb 02 00 00 jne 109054 <== 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); 108d99: 56 push %esi <== NOT EXECUTED 108d9a: 9d popf <== NOT EXECUTED 108d9b: 90 nop <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { 108d9c: 8b 4d e4 mov -0x1c(%ebp),%ecx 108d9f: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax 108da5: f6 c4 04 test $0x4,%ah 108da8: 74 24 je 108dce 108daa: f6 41 31 10 testb $0x10,0x31(%ecx) 108dae: 75 1e jne 108dce /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 108db0: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax 108db6: 80 e4 fb and $0xfb,%ah 108db9: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 108dbf: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax 108dc5: 83 e0 fd and $0xfffffffd,%eax 108dc8: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 108dce: 8b 55 e4 mov -0x1c(%ebp),%edx 108dd1: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 108dd7: f6 c4 01 test $0x1,%ah 108dda: 0f 84 bc 01 00 00 je 108f9c <== ALWAYS TAKEN 108de0: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 108de3: 8b 41 38 mov 0x38(%ecx),%eax <== NOT EXECUTED 108de6: 85 c0 test %eax,%eax <== NOT EXECUTED 108de8: 0f 88 12 02 00 00 js 109000 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 108dee: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 108df4: 80 e6 fe and $0xfe,%dh <== NOT EXECUTED 108df7: 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)) { 108dfd: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 108e03: 83 e2 04 and $0x4,%edx <== NOT EXECUTED 108e06: 74 1b je 108e23 <== NOT EXECUTED 108e08: 8b 91 b0 00 00 00 mov 0xb0(%ecx),%edx <== NOT EXECUTED 108e0e: 85 d2 test %edx,%edx <== NOT EXECUTED 108e10: 74 11 je 108e23 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 108e12: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e15: ff 71 10 pushl 0x10(%ecx) <== NOT EXECUTED 108e18: ff d2 call *%edx <== NOT EXECUTED 108e1a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108e1d: 8b 42 38 mov 0x38(%edx),%eax <== NOT EXECUTED 108e20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 108e23: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 108e26: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 108e2c: 83 e2 fb and $0xfffffffb,%edx <== NOT EXECUTED 108e2f: 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) { 108e35: 85 c0 test %eax,%eax 108e37: 0f 88 c3 01 00 00 js 109000 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 108e3d: 8b 4d e4 mov -0x1c(%ebp),%ecx 108e40: 8b 41 30 mov 0x30(%ecx),%eax 108e43: f6 c4 10 test $0x10,%ah 108e46: 74 0f je 108e57 tty->flow_ctrl |= FL_MDXOF; 108e48: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx 108e4e: 80 ce 04 or $0x4,%dh 108e51: 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) { 108e57: f6 c4 04 test $0x4,%ah 108e5a: 74 12 je 108e6e tty->flow_ctrl |= FL_MDXON; 108e5c: 8b 55 e4 mov -0x1c(%ebp),%edx 108e5f: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 108e65: 80 cc 02 or $0x2,%ah 108e68: 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) { 108e6e: 8b 4d e4 mov -0x1c(%ebp),%ecx 108e71: f6 41 3c 02 testb $0x2,0x3c(%ecx) 108e75: 0f 84 41 01 00 00 je 108fbc tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 108e7b: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 108e82: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 108e89: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 108e90: 8b 55 e4 mov -0x1c(%ebp),%edx 108e93: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax 108e99: 85 c0 test %eax,%eax 108e9b: 0f 84 6f fe ff ff je 108d10 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 108ea1: 83 ec 08 sub $0x8,%esp 108ea4: ff 75 dc pushl -0x24(%ebp) 108ea7: ff 72 10 pushl 0x10(%edx) 108eaa: ff d0 call *%eax 108eac: 83 c4 10 add $0x10,%esp 108eaf: e9 5c fe ff ff jmp 108d10 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 108eb4: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108eb7: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED 108eba: 89 d1 mov %edx,%ecx <== NOT EXECUTED 108ebc: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 108ebf: 29 d0 sub %edx,%eax <== NOT EXECUTED 108ec1: 0f 88 e9 00 00 00 js 108fb0 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 108ec7: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED 108eca: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 108ecd: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED 108ed0: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED 108ed3: 89 02 mov %eax,(%edx) <== NOT EXECUTED } break; 108ed5: e9 36 fe ff ff jmp 108d10 <== NOT EXECUTED 108eda: 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) { 108edc: 48 dec %eax 108edd: 0f 85 ef fd ff ff jne 108cd2 <== NEVER TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 108ee3: 8b 43 08 mov 0x8(%ebx),%eax 108ee6: 8b 75 e4 mov -0x1c(%ebp),%esi 108ee9: 83 c6 30 add $0x30,%esi 108eec: b9 09 00 00 00 mov $0x9,%ecx 108ef1: 89 c7 mov %eax,%edi 108ef3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 108ef5: e9 16 fe ff ff jmp 108d10 108efa: 66 90 xchg %ax,%ax sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 108efc: 3d 1a 74 04 40 cmp $0x4004741a,%eax 108f01: 74 69 je 108f6c 108f03: 3d 1b 74 04 80 cmp $0x8004741b,%eax 108f08: 0f 85 c4 fd ff ff jne 108cd2 <== NEVER TAKEN #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 108f0e: 8b 55 e4 mov -0x1c(%ebp),%edx 108f11: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax 108f17: c1 e0 05 shl $0x5,%eax 108f1a: 8b 80 44 73 12 00 mov 0x127344(%eax),%eax 108f20: 85 c0 test %eax,%eax 108f22: 74 0c je 108f30 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 108f24: 83 ec 0c sub $0xc,%esp 108f27: 52 push %edx 108f28: ff d0 call *%eax 108f2a: 89 45 e0 mov %eax,-0x20(%ebp) 108f2d: 83 c4 10 add $0x10,%esp } tty->t_line=*(int*)(args->buffer); 108f30: 8b 43 08 mov 0x8(%ebx),%eax 108f33: 8b 00 mov (%eax),%eax 108f35: 8b 4d e4 mov -0x1c(%ebp),%ecx 108f38: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx) tty->t_sc = NULL; /* ensure that no more valid data */ 108f3e: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx) 108f45: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 108f48: c1 e0 05 shl $0x5,%eax 108f4b: 8b 80 40 73 12 00 mov 0x127340(%eax),%eax 108f51: 85 c0 test %eax,%eax 108f53: 0f 84 b7 fd ff ff je 108d10 sc = rtems_termios_linesw[tty->t_line].l_open(tty); 108f59: 83 ec 0c sub $0xc,%esp 108f5c: 51 push %ecx 108f5d: ff d0 call *%eax 108f5f: 89 45 e0 mov %eax,-0x20(%ebp) 108f62: 83 c4 10 add $0x10,%esp 108f65: e9 a6 fd ff ff jmp 108d10 108f6a: 66 90 xchg %ax,%ax } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 108f6c: 8b 43 08 mov 0x8(%ebx),%eax 108f6f: 8b 4d e4 mov -0x1c(%ebp),%ecx 108f72: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx 108f78: 89 10 mov %edx,(%eax) break; 108f7a: e9 91 fd ff ff jmp 108d10 108f7f: 90 nop case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 108f80: 8b 06 mov (%esi),%eax 108f82: 8b 56 04 mov 0x4(%esi),%edx 108f85: 8b 4d e4 mov -0x1c(%ebp),%ecx 108f88: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx) 108f8e: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) break; 108f94: e9 77 fd ff ff jmp 108d10 108f99: 8d 76 00 lea 0x0(%esi),%esi /* 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)) { 108f9c: 8b 42 38 mov 0x38(%edx),%eax 108f9f: e9 91 fe ff ff jmp 108e35 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; 108fa4: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED 108fab: e9 60 fd ff ff jmp 108d10 <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 108fb0: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED 108fb3: 01 d0 add %edx,%eax <== NOT EXECUTED 108fb5: e9 0d ff ff ff jmp 108ec7 <== NOT EXECUTED 108fba: 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] * 108fbc: 8b 45 e4 mov -0x1c(%ebp),%eax 108fbf: 0f b6 70 46 movzbl 0x46(%eax),%esi rtems_clock_get_ticks_per_second() / 10; 108fc3: e8 74 15 00 00 call 10a53c 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] * 108fc8: 0f af c6 imul %esi,%eax rtems_clock_get_ticks_per_second() / 10; 108fcb: ba cd cc cc cc mov $0xcccccccd,%edx 108fd0: f7 e2 mul %edx 108fd2: 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] * 108fd5: 8b 4d e4 mov -0x1c(%ebp),%ecx 108fd8: 89 51 54 mov %edx,0x54(%ecx) rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 108fdb: 80 79 46 00 cmpb $0x0,0x46(%ecx) 108fdf: 74 36 je 109017 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 108fe1: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 108fe8: 89 51 70 mov %edx,0x70(%ecx) if (tty->termios.c_cc[VMIN]) 108feb: 80 79 47 00 cmpb $0x0,0x47(%ecx) 108fef: 74 49 je 10903a tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 108ff1: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) 108ff8: e9 93 fe ff ff jmp 108e90 108ffd: 8d 76 00 lea 0x0(%esi),%esi /* * 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; 109000: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109003: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 109009: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 10900c: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED 109012: e9 26 fe ff ff jmp 108e3d <== 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]) { 109017: 8b 55 e4 mov -0x1c(%ebp),%edx 10901a: 80 7a 47 00 cmpb $0x0,0x47(%edx) 10901e: 74 25 je 109045 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 109020: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 109027: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10902e: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED 109035: e9 56 fe ff ff jmp 108e90 <== 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; 10903a: 8b 45 e4 mov -0x1c(%ebp),%eax 10903d: 89 50 74 mov %edx,0x74(%eax) 109040: e9 4b fe ff ff jmp 108e90 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; 109045: 8b 4d e4 mov -0x1c(%ebp),%ecx 109048: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx) 10904f: e9 3c fe ff ff jmp 108e90 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); 109054: 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)( 10905a: 51 push %ecx <== NOT EXECUTED 10905b: 6a 01 push $0x1 <== NOT EXECUTED 10905d: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED 109060: 50 push %eax <== NOT EXECUTED 109061: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 109064: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED 10906a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10906d: e9 27 fd ff ff jmp 108d99 <== NOT EXECUTED =============================================================================== 0010a02c : extern rtems_assoc_t termios_assoc_table[]; int rtems_termios_number_to_baud( int32_t baud ) { 10a02c: 55 push %ebp 10a02d: 89 e5 mov %esp,%ebp 10a02f: 53 push %ebx 10a030: 83 ec 0c sub $0xc,%esp 10a033: 8b 5d 08 mov 0x8(%ebp),%ebx int termios_baud; termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud ); 10a036: 53 push %ebx 10a037: 68 00 8b 12 00 push $0x128b00 10a03c: e8 9b 6e 00 00 call 110edc if ( termios_baud == 0 && baud != 0 ) 10a041: 83 c4 10 add $0x10,%esp 10a044: 85 c0 test %eax,%eax 10a046: 74 08 je 10a050 return -1; return termios_baud; } 10a048: 8b 5d fc mov -0x4(%ebp),%ebx 10a04b: c9 leave 10a04c: c3 ret 10a04d: 8d 76 00 lea 0x0(%esi),%esi ) { int termios_baud; termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud ); if ( termios_baud == 0 && baud != 0 ) 10a050: 85 db test %ebx,%ebx 10a052: 74 f4 je 10a048 return -1; 10a054: b8 ff ff ff ff mov $0xffffffff,%eax 10a059: eb ed jmp 10a048 =============================================================================== 001085bc : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 1085bc: 55 push %ebp 1085bd: 89 e5 mov %esp,%ebp 1085bf: 57 push %edi 1085c0: 56 push %esi 1085c1: 53 push %ebx 1085c2: 83 ec 40 sub $0x40,%esp 1085c5: 8b 55 08 mov 0x8(%ebp),%edx struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 1085c8: 6a 00 push $0x0 1085ca: 6a 00 push $0x0 1085cc: ff 35 cc 76 12 00 pushl 0x1276cc 1085d2: 89 55 dc mov %edx,-0x24(%ebp) 1085d5: e8 ce 25 00 00 call 10aba8 1085da: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 1085dd: 83 c4 10 add $0x10,%esp 1085e0: 85 c0 test %eax,%eax 1085e2: 8b 55 dc mov -0x24(%ebp),%edx 1085e5: 75 6d jne 108654 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 1085e7: 8b 35 d4 76 12 00 mov 0x1276d4,%esi 1085ed: 85 f6 test %esi,%esi 1085ef: 0f 84 a7 00 00 00 je 10869c 1085f5: 89 f3 mov %esi,%ebx 1085f7: 8b 45 0c mov 0xc(%ebp),%eax 1085fa: eb 0a jmp 108606 1085fc: 8b 1b mov (%ebx),%ebx 1085fe: 85 db test %ebx,%ebx 108600: 0f 84 96 00 00 00 je 10869c <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) 108606: 39 53 0c cmp %edx,0xc(%ebx) 108609: 75 f1 jne 1085fc 10860b: 39 43 10 cmp %eax,0x10(%ebx) 10860e: 75 ec jne 1085fc <== NEVER TAKEN */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 108610: 8b 75 10 mov 0x10(%ebp),%esi 108613: 8b 06 mov (%esi),%eax 108615: 89 58 34 mov %ebx,0x34(%eax) if (!tty->refcount++) { 108618: 8b 43 08 mov 0x8(%ebx),%eax 10861b: 8d 48 01 lea 0x1(%eax),%ecx 10861e: 89 4b 08 mov %ecx,0x8(%ebx) 108621: 85 c0 test %eax,%eax 108623: 75 1e jne 108643 if (tty->device.firstOpen) 108625: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax 10862b: 85 c0 test %eax,%eax 10862d: 74 0b je 10863a (*tty->device.firstOpen)(major, minor, arg); 10862f: 57 push %edi 108630: 56 push %esi 108631: ff 75 0c pushl 0xc(%ebp) 108634: 52 push %edx 108635: ff d0 call *%eax 108637: 83 c4 10 add $0x10,%esp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10863a: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 108641: 74 1c je 10865f tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 108643: 83 ec 0c sub $0xc,%esp 108646: ff 35 cc 76 12 00 pushl 0x1276cc 10864c: e8 53 26 00 00 call 10aca4 return RTEMS_SUCCESSFUL; 108651: 83 c4 10 add $0x10,%esp } 108654: 8b 45 e4 mov -0x1c(%ebp),%eax 108657: 8d 65 f4 lea -0xc(%ebp),%esp 10865a: 5b pop %ebx 10865b: 5e pop %esi 10865c: 5f pop %edi 10865d: c9 leave 10865e: c3 ret /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start( 10865f: 56 push %esi 108660: 53 push %ebx 108661: 68 f4 9d 10 00 push $0x109df4 108666: ff b3 c4 00 00 00 pushl 0xc4(%ebx) 10866c: e8 7b 29 00 00 call 10afec tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 108671: 83 c4 10 add $0x10,%esp 108674: 85 c0 test %eax,%eax 108676: 0f 85 3f 03 00 00 jne 1089bb <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( 10867c: 51 push %ecx 10867d: 53 push %ebx 10867e: 68 a4 a0 10 00 push $0x10a0a4 108683: ff b3 c8 00 00 00 pushl 0xc8(%ebx) 108689: e8 5e 29 00 00 call 10afec tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10868e: 83 c4 10 add $0x10,%esp 108691: 85 c0 test %eax,%eax 108693: 74 ae je 108643 <== ALWAYS TAKEN 108695: e9 21 03 00 00 jmp 1089bb <== NOT EXECUTED 10869a: 66 90 xchg %ax,%ax <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 10869c: 83 ec 08 sub $0x8,%esp 10869f: 68 e8 00 00 00 push $0xe8 1086a4: 6a 01 push $0x1 1086a6: 89 55 dc mov %edx,-0x24(%ebp) 1086a9: e8 f6 ed ff ff call 1074a4 1086ae: 89 45 e0 mov %eax,-0x20(%ebp) 1086b1: 89 c3 mov %eax,%ebx if (tty == NULL) { 1086b3: 83 c4 10 add $0x10,%esp 1086b6: 85 c0 test %eax,%eax 1086b8: 8b 55 dc mov -0x24(%ebp),%edx 1086bb: 0f 84 75 02 00 00 je 108936 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 1086c1: a1 04 54 12 00 mov 0x125404,%eax 1086c6: 8b 4d e0 mov -0x20(%ebp),%ecx 1086c9: 89 41 64 mov %eax,0x64(%ecx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 1086cc: 8b 41 64 mov 0x64(%ecx),%eax 1086cf: 83 ec 0c sub $0xc,%esp 1086d2: 50 push %eax 1086d3: 89 55 dc mov %edx,-0x24(%ebp) 1086d6: e8 2d f2 ff ff call 107908 1086db: 89 45 c4 mov %eax,-0x3c(%ebp) 1086de: 8b 7d e0 mov -0x20(%ebp),%edi 1086e1: 89 47 58 mov %eax,0x58(%edi) if (tty->rawInBuf.theBuf == NULL) { 1086e4: 83 c4 10 add $0x10,%esp 1086e7: 85 c0 test %eax,%eax 1086e9: 8b 55 dc mov -0x24(%ebp),%edx 1086ec: 0f 84 61 02 00 00 je 108953 return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 1086f2: a1 08 54 12 00 mov 0x125408,%eax 1086f7: 8b 4d e0 mov -0x20(%ebp),%ecx 1086fa: 89 81 88 00 00 00 mov %eax,0x88(%ecx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 108700: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 108706: 83 ec 0c sub $0xc,%esp 108709: 50 push %eax 10870a: 89 55 dc mov %edx,-0x24(%ebp) 10870d: e8 f6 f1 ff ff call 107908 108712: 89 c7 mov %eax,%edi 108714: 8b 45 e0 mov -0x20(%ebp),%eax 108717: 89 78 7c mov %edi,0x7c(%eax) if (tty->rawOutBuf.theBuf == NULL) { 10871a: 83 c4 10 add $0x10,%esp 10871d: 85 ff test %edi,%edi 10871f: 8b 55 dc mov -0x24(%ebp),%edx 108722: 0f 84 4f 02 00 00 je 108977 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 108728: 83 ec 0c sub $0xc,%esp 10872b: ff 35 00 54 12 00 pushl 0x125400 108731: 89 55 dc mov %edx,-0x24(%ebp) 108734: e8 cf f1 ff ff call 107908 108739: 8b 4d e0 mov -0x20(%ebp),%ecx 10873c: 89 41 1c mov %eax,0x1c(%ecx) if (tty->cbuf == NULL) { 10873f: 83 c4 10 add $0x10,%esp 108742: 85 c0 test %eax,%eax 108744: 8b 55 dc mov -0x24(%ebp),%edx 108747: 0f 84 77 02 00 00 je 1089c4 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 10874d: 8b 7d e0 mov -0x20(%ebp),%edi 108750: c7 87 d4 00 00 00 00 movl $0x0,0xd4(%edi) 108757: 00 00 00 tty->tty_snd.sw_arg = NULL; 10875a: c7 87 d8 00 00 00 00 movl $0x0,0xd8(%edi) 108761: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 108764: c7 87 dc 00 00 00 00 movl $0x0,0xdc(%edi) 10876b: 00 00 00 tty->tty_rcv.sw_arg = NULL; 10876e: c7 87 e0 00 00 00 00 movl $0x0,0xe0(%edi) 108775: 00 00 00 tty->tty_rcvwakeup = 0; 108778: c7 87 e4 00 00 00 00 movl $0x0,0xe4(%edi) 10877f: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 108782: 89 37 mov %esi,(%edi) tty->back = NULL; 108784: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) if (rtems_termios_ttyHead != NULL) 10878b: 85 f6 test %esi,%esi 10878d: 74 03 je 108792 rtems_termios_ttyHead->back = tty; 10878f: 89 7e 04 mov %edi,0x4(%esi) rtems_termios_ttyHead = tty; 108792: 8b 45 e0 mov -0x20(%ebp),%eax 108795: a3 d4 76 12 00 mov %eax,0x1276d4 if (rtems_termios_ttyTail == NULL) 10879a: 8b 0d d0 76 12 00 mov 0x1276d0,%ecx 1087a0: 85 c9 test %ecx,%ecx 1087a2: 0f 84 af 02 00 00 je 108a57 rtems_termios_ttyTail = tty; tty->minor = minor; 1087a8: 8b 75 0c mov 0xc(%ebp),%esi 1087ab: 8b 4d e0 mov -0x20(%ebp),%ecx 1087ae: 89 71 10 mov %esi,0x10(%ecx) tty->major = major; 1087b1: 89 51 0c mov %edx,0xc(%ecx) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1087b4: 83 ec 0c sub $0xc,%esp 1087b7: 89 c8 mov %ecx,%eax 1087b9: 83 c0 14 add $0x14,%eax 1087bc: 50 push %eax 1087bd: 6a 00 push $0x0 1087bf: 6a 54 push $0x54 1087c1: 6a 01 push $0x1 rtems_build_name ('T', 'R', 'i', c), 1087c3: 0f be 05 0c 54 12 00 movsbl 0x12540c,%eax tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1087ca: 0d 00 69 52 54 or $0x54526900,%eax 1087cf: 50 push %eax 1087d0: 89 55 dc mov %edx,-0x24(%ebp) 1087d3: e8 54 21 00 00 call 10a92c 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) 1087d8: 83 c4 20 add $0x20,%esp 1087db: 85 c0 test %eax,%eax 1087dd: 8b 55 dc mov -0x24(%ebp),%edx 1087e0: 0f 85 d5 01 00 00 jne 1089bb rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 1087e6: 83 ec 0c sub $0xc,%esp 1087e9: 8b 45 e0 mov -0x20(%ebp),%eax 1087ec: 83 c0 18 add $0x18,%eax 1087ef: 50 push %eax 1087f0: 6a 00 push $0x0 1087f2: 6a 54 push $0x54 1087f4: 6a 01 push $0x1 rtems_build_name ('T', 'R', 'o', c), 1087f6: 0f be 05 0c 54 12 00 movsbl 0x12540c,%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 ( 1087fd: 0d 00 6f 52 54 or $0x54526f00,%eax 108802: 50 push %eax 108803: 89 55 dc mov %edx,-0x24(%ebp) 108806: e8 21 21 00 00 call 10a92c 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) 10880b: 83 c4 20 add $0x20,%esp 10880e: 85 c0 test %eax,%eax 108810: 8b 55 dc mov -0x24(%ebp),%edx 108813: 0f 85 a2 01 00 00 jne 1089bb rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 108819: 83 ec 0c sub $0xc,%esp 10881c: 8b 45 e0 mov -0x20(%ebp),%eax 10881f: 05 8c 00 00 00 add $0x8c,%eax 108824: 50 push %eax 108825: 6a 00 push $0x0 108827: 6a 20 push $0x20 108829: 6a 00 push $0x0 rtems_build_name ('T', 'R', 'x', c), 10882b: 0f be 05 0c 54 12 00 movsbl 0x12540c,%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 ( 108832: 0d 00 78 52 54 or $0x54527800,%eax 108837: 50 push %eax 108838: 89 55 dc mov %edx,-0x24(%ebp) 10883b: e8 ec 20 00 00 call 10a92c rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 108840: 83 c4 20 add $0x20,%esp 108843: 85 c0 test %eax,%eax 108845: 8b 55 dc mov -0x24(%ebp),%edx 108848: 0f 85 6d 01 00 00 jne 1089bb rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 10884e: 8b 7d e0 mov -0x20(%ebp),%edi 108851: c7 87 94 00 00 00 00 movl $0x0,0x94(%edi) 108858: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 10885b: 81 c7 98 00 00 00 add $0x98,%edi 108861: b9 08 00 00 00 mov $0x8,%ecx 108866: 8b 75 14 mov 0x14(%ebp),%esi 108869: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10886b: 8b 7d e0 mov -0x20(%ebp),%edi 10886e: 83 bf b4 00 00 00 02 cmpl $0x2,0xb4(%edi) 108875: 0f 84 64 01 00 00 je 1089df &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 10887b: 8b 45 e0 mov -0x20(%ebp),%eax 10887e: 8b 88 a0 00 00 00 mov 0xa0(%eax),%ecx 108884: 85 c9 test %ecx,%ecx 108886: 0f 84 fc 00 00 00 je 108988 10888c: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 108893: 0f 84 ef 00 00 00 je 108988 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 108899: 8b 4d e0 mov -0x20(%ebp),%ecx 10889c: c7 41 30 02 25 00 00 movl $0x2502,0x30(%ecx) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 1088a3: c7 41 34 05 18 00 00 movl $0x1805,0x34(%ecx) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 1088aa: c7 41 38 bd 08 00 00 movl $0x8bd,0x38(%ecx) tty->termios.c_lflag = 1088b1: c7 41 3c 3b 82 00 00 movl $0x823b,0x3c(%ecx) ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 1088b8: c6 41 41 03 movb $0x3,0x41(%ecx) tty->termios.c_cc[VQUIT] = '\034'; 1088bc: c6 41 42 1c movb $0x1c,0x42(%ecx) tty->termios.c_cc[VERASE] = '\177'; 1088c0: c6 41 43 7f movb $0x7f,0x43(%ecx) tty->termios.c_cc[VKILL] = '\025'; 1088c4: c6 41 44 15 movb $0x15,0x44(%ecx) tty->termios.c_cc[VEOF] = '\004'; 1088c8: c6 41 45 04 movb $0x4,0x45(%ecx) tty->termios.c_cc[VEOL] = '\000'; 1088cc: c6 41 4c 00 movb $0x0,0x4c(%ecx) tty->termios.c_cc[VEOL2] = '\000'; 1088d0: c6 41 51 00 movb $0x0,0x51(%ecx) tty->termios.c_cc[VSTART] = '\021'; 1088d4: c6 41 49 11 movb $0x11,0x49(%ecx) tty->termios.c_cc[VSTOP] = '\023'; 1088d8: c6 41 4a 13 movb $0x13,0x4a(%ecx) tty->termios.c_cc[VSUSP] = '\032'; 1088dc: c6 41 4b 1a movb $0x1a,0x4b(%ecx) tty->termios.c_cc[VREPRINT] = '\022'; 1088e0: c6 41 4d 12 movb $0x12,0x4d(%ecx) tty->termios.c_cc[VDISCARD] = '\017'; 1088e4: c6 41 4e 0f movb $0xf,0x4e(%ecx) tty->termios.c_cc[VWERASE] = '\027'; 1088e8: c6 41 4f 17 movb $0x17,0x4f(%ecx) tty->termios.c_cc[VLNEXT] = '\026'; 1088ec: c6 41 50 16 movb $0x16,0x50(%ecx) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 1088f0: c7 81 b8 00 00 00 00 movl $0x0,0xb8(%ecx) 1088f7: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 1088fa: 8b 41 64 mov 0x64(%ecx),%eax 1088fd: d1 e8 shr %eax 1088ff: 89 81 bc 00 00 00 mov %eax,0xbc(%ecx) tty->highwater = tty->rawInBuf.Size * 3/4; 108905: 8b 41 64 mov 0x64(%ecx),%eax 108908: 8d 04 40 lea (%eax,%eax,2),%eax 10890b: c1 e8 02 shr $0x2,%eax 10890e: 89 81 c0 00 00 00 mov %eax,0xc0(%ecx) /* * Bump name characer */ if (c++ == 'z') 108914: a0 0c 54 12 00 mov 0x12540c,%al 108919: 8d 48 01 lea 0x1(%eax),%ecx 10891c: 88 0d 0c 54 12 00 mov %cl,0x12540c 108922: 3c 7a cmp $0x7a,%al 108924: 0f 85 e6 fc ff ff jne 108610 c = 'a'; 10892a: c6 05 0c 54 12 00 61 movb $0x61,0x12540c 108931: e9 da fc ff ff jmp 108610 /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 108936: 83 ec 0c sub $0xc,%esp 108939: ff 35 cc 76 12 00 pushl 0x1276cc 10893f: e8 60 23 00 00 call 10aca4 return RTEMS_NO_MEMORY; 108944: 83 c4 10 add $0x10,%esp 108947: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) 10894e: e9 01 fd ff ff jmp 108654 * 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); 108953: 83 ec 0c sub $0xc,%esp 108956: 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); 108957: e8 d8 ec ff ff call 107634 rtems_semaphore_release (rtems_termios_ttyMutex); 10895c: 5f pop %edi 10895d: ff 35 cc 76 12 00 pushl 0x1276cc 108963: e8 3c 23 00 00 call 10aca4 return RTEMS_NO_MEMORY; 108968: 83 c4 10 add $0x10,%esp 10896b: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) 108972: e9 dd fc ff ff jmp 108654 * 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)); 108977: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10897a: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 10897d: e8 b2 ec ff ff call 107634 <== NOT EXECUTED free(tty); 108982: 58 pop %eax <== NOT EXECUTED 108983: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 108986: eb cf jmp 108957 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 108988: 83 ec 0c sub $0xc,%esp 10898b: 8b 45 e0 mov -0x20(%ebp),%eax 10898e: 83 c0 68 add $0x68,%eax 108991: 50 push %eax 108992: 6a 00 push $0x0 108994: 6a 24 push $0x24 108996: 6a 00 push $0x0 rtems_build_name ('T', 'R', 'r', c), 108998: 0f be 05 0c 54 12 00 movsbl 0x12540c,%eax rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 10899f: 0d 00 72 52 54 or $0x54527200,%eax 1089a4: 50 push %eax 1089a5: 89 55 dc mov %edx,-0x24(%ebp) 1089a8: e8 7f 1f 00 00 call 10a92c rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 1089ad: 83 c4 20 add $0x20,%esp 1089b0: 85 c0 test %eax,%eax 1089b2: 8b 55 dc mov -0x24(%ebp),%edx 1089b5: 0f 84 de fe ff ff je 108899 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); 1089bb: 83 ec 0c sub $0xc,%esp 1089be: 50 push %eax 1089bf: e8 28 28 00 00 call 10b1ec /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 1089c4: 83 ec 0c sub $0xc,%esp 1089c7: 57 push %edi 1089c8: e8 67 ec ff ff call 107634 free((void *)(tty->rawInBuf.theBuf)); 1089cd: 5e pop %esi 1089ce: ff 75 c4 pushl -0x3c(%ebp) 1089d1: e8 5e ec ff ff call 107634 free(tty); 1089d6: 5b pop %ebx 1089d7: ff 75 e0 pushl -0x20(%ebp) 1089da: e9 78 ff ff ff jmp 108957 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 1089df: 50 push %eax 1089e0: 50 push %eax 1089e1: 89 f8 mov %edi,%eax 1089e3: 05 c8 00 00 00 add $0xc8,%eax 1089e8: 50 push %eax 1089e9: 6a 00 push $0x0 1089eb: 68 00 05 00 00 push $0x500 1089f0: 68 00 04 00 00 push $0x400 1089f5: 6a 0a push $0xa rtems_build_name ('T', 'x', 'T', c), 1089f7: 0f be 05 0c 54 12 00 movsbl 0x12540c,%eax /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 1089fe: 0d 00 54 78 54 or $0x54785400,%eax 108a03: 50 push %eax 108a04: 89 55 dc mov %edx,-0x24(%ebp) 108a07: e8 38 23 00 00 call 10ad44 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 108a0c: 83 c4 20 add $0x20,%esp 108a0f: 85 c0 test %eax,%eax 108a11: 8b 55 dc mov -0x24(%ebp),%edx 108a14: 75 a5 jne 1089bb <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 108a16: 56 push %esi 108a17: 56 push %esi 108a18: 8b 45 e0 mov -0x20(%ebp),%eax 108a1b: 05 c4 00 00 00 add $0xc4,%eax 108a20: 50 push %eax 108a21: 6a 00 push $0x0 108a23: 68 00 05 00 00 push $0x500 108a28: 68 00 04 00 00 push $0x400 108a2d: 6a 09 push $0x9 rtems_build_name ('R', 'x', 'T', c), 108a2f: 0f be 05 0c 54 12 00 movsbl 0x12540c,%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 ( 108a36: 0d 00 54 78 52 or $0x52785400,%eax 108a3b: 50 push %eax 108a3c: 89 55 dc mov %edx,-0x24(%ebp) 108a3f: e8 00 23 00 00 call 10ad44 TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 108a44: 83 c4 20 add $0x20,%esp 108a47: 85 c0 test %eax,%eax 108a49: 8b 55 dc mov -0x24(%ebp),%edx 108a4c: 0f 84 29 fe ff ff je 10887b <== ALWAYS TAKEN 108a52: e9 64 ff ff ff jmp 1089bb <== 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; 108a57: a3 d0 76 12 00 mov %eax,0x1276d0 108a5c: e9 47 fd ff ff jmp 1087a8 =============================================================================== 00109074 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 109074: 55 push %ebp 109075: 89 e5 mov %esp,%ebp 109077: 57 push %edi 109078: 56 push %esi 109079: 53 push %ebx 10907a: 83 ec 1c sub $0x1c,%esp 10907d: 8b 45 08 mov 0x8(%ebp),%eax 109080: 8b 55 0c mov 0xc(%ebp),%edx 109083: 89 55 e4 mov %edx,-0x1c(%ebp) 109086: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 109089: 89 c6 mov %eax,%esi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 10908b: 8b 8b b4 00 00 00 mov 0xb4(%ebx),%ecx 109091: 85 c9 test %ecx,%ecx 109093: 0f 84 eb 00 00 00 je 109184 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 109099: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10909f: 89 45 e0 mov %eax,-0x20(%ebp) while (len) { 1090a2: 8b 55 e4 mov -0x1c(%ebp),%edx 1090a5: 85 d2 test %edx,%edx 1090a7: 0f 84 cf 00 00 00 je 10917c <== NEVER TAKEN 1090ad: 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; 1090b0: 8b 45 e0 mov -0x20(%ebp),%eax 1090b3: 40 inc %eax 1090b4: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 1090ba: 31 d2 xor %edx,%edx 1090bc: f7 f1 div %ecx 1090be: 89 55 dc mov %edx,-0x24(%ebp) 1090c1: 89 55 e0 mov %edx,-0x20(%ebp) rtems_interrupt_disable (level); 1090c4: 9c pushf 1090c5: fa cli 1090c6: 5f pop %edi while (newHead == tty->rawOutBuf.Tail) { 1090c7: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 1090cd: 3b 55 e0 cmp -0x20(%ebp),%edx 1090d0: 75 3e jne 109110 1090d2: 89 f8 mov %edi,%eax 1090d4: 89 f7 mov %esi,%edi 1090d6: 89 d6 mov %edx,%esi tty->rawOutBufState = rob_wait; 1090d8: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 1090df: 00 00 00 rtems_interrupt_enable (level); 1090e2: 50 push %eax 1090e3: 9d popf sc = rtems_semaphore_obtain( 1090e4: 50 push %eax 1090e5: 6a 00 push $0x0 1090e7: 6a 00 push $0x0 1090e9: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 1090ef: e8 b4 1a 00 00 call 10aba8 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 1090f4: 83 c4 10 add $0x10,%esp 1090f7: 85 c0 test %eax,%eax 1090f9: 0f 85 a0 00 00 00 jne 10919f <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 1090ff: 9c pushf 109100: fa cli 109101: 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) { 109102: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109108: 39 f2 cmp %esi,%edx 10910a: 74 cc je 1090d8 <== NEVER TAKEN 10910c: 89 fe mov %edi,%esi 10910e: 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++; 109110: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109116: 8b 4b 7c mov 0x7c(%ebx),%ecx 109119: 8a 16 mov (%esi),%dl 10911b: 88 14 01 mov %dl,(%ecx,%eax,1) tty->rawOutBuf.Head = newHead; 10911e: 8b 45 dc mov -0x24(%ebp),%eax 109121: 89 83 80 00 00 00 mov %eax,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 109127: 8b 8b 94 00 00 00 mov 0x94(%ebx),%ecx 10912d: 85 c9 test %ecx,%ecx 10912f: 75 23 jne 109154 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 109131: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109137: a8 10 test $0x10,%al 109139: 74 26 je 109161 <== 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; 10913b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109141: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 109144: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 10914a: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 109151: 00 00 00 } rtems_interrupt_enable (level); 109154: 57 push %edi 109155: 9d popf if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 109156: ff 4d e4 decl -0x1c(%ebp) 109159: 74 21 je 10917c 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++; 10915b: 46 inc %esi 10915c: e9 4f ff ff ff jmp 1090b0 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); 109161: 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, 109167: 52 push %edx 109168: 6a 01 push $0x1 10916a: 03 43 7c add 0x7c(%ebx),%eax 10916d: 50 push %eax 10916e: ff 73 10 pushl 0x10(%ebx) 109171: ff 93 a4 00 00 00 call *0xa4(%ebx) 109177: 83 c4 10 add $0x10,%esp 10917a: eb ce jmp 10914a tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 10917c: 8d 65 f4 lea -0xc(%ebp),%esp 10917f: 5b pop %ebx 109180: 5e pop %esi 109181: 5f pop %edi 109182: c9 leave 109183: 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); 109184: 89 55 10 mov %edx,0x10(%ebp) 109187: 89 45 0c mov %eax,0xc(%ebp) 10918a: 8b 43 10 mov 0x10(%ebx),%eax 10918d: 89 45 08 mov %eax,0x8(%ebp) 109190: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109196: 8d 65 f4 lea -0xc(%ebp),%esp 109199: 5b pop %ebx 10919a: 5e pop %esi 10919b: 5f pop %edi 10919c: 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); 10919d: 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); 10919f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1091a2: 50 push %eax <== NOT EXECUTED 1091a3: e8 44 20 00 00 call 10b1ec <== NOT EXECUTED =============================================================================== 00109780 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 109780: 55 push %ebp 109781: 89 e5 mov %esp,%ebp 109783: 57 push %edi 109784: 56 push %esi 109785: 53 push %ebx 109786: 83 ec 30 sub $0x30,%esp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109789: 8b 55 08 mov 0x8(%ebp),%edx 10978c: 8b 02 mov (%edx),%eax 10978e: 8b 58 34 mov 0x34(%eax),%ebx uint32_t count = args->count; 109791: 8b 4a 10 mov 0x10(%edx),%ecx 109794: 89 4d dc mov %ecx,-0x24(%ebp) char *buffer = args->buffer; 109797: 8b 42 0c mov 0xc(%edx),%eax 10979a: 89 45 d8 mov %eax,-0x28(%ebp) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10979d: 6a 00 push $0x0 10979f: 6a 00 push $0x0 1097a1: ff 73 14 pushl 0x14(%ebx) 1097a4: e8 ff 13 00 00 call 10aba8 1097a9: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) 1097ac: 83 c4 10 add $0x10,%esp 1097af: 85 c0 test %eax,%eax 1097b1: 75 35 jne 1097e8 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 1097b3: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1097b9: c1 e0 05 shl $0x5,%eax 1097bc: 8b 80 48 73 12 00 mov 0x127348(%eax),%eax 1097c2: 85 c0 test %eax,%eax 1097c4: 74 2e je 1097f4 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 1097c6: 83 ec 08 sub $0x8,%esp 1097c9: ff 75 08 pushl 0x8(%ebp) 1097cc: 53 push %ebx 1097cd: ff d0 call *%eax 1097cf: 89 45 e0 mov %eax,-0x20(%ebp) tty->tty_rcvwakeup = 0; 1097d2: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 1097d9: 00 00 00 rtems_semaphore_release (tty->isem); 1097dc: 59 pop %ecx 1097dd: ff 73 14 pushl 0x14(%ebx) 1097e0: e8 bf 14 00 00 call 10aca4 return sc; 1097e5: 83 c4 10 add $0x10,%esp } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 1097e8: 8b 45 e0 mov -0x20(%ebp),%eax 1097eb: 8d 65 f4 lea -0xc(%ebp),%esp 1097ee: 5b pop %ebx 1097ef: 5e pop %esi 1097f0: 5f pop %edi 1097f1: c9 leave 1097f2: c3 ret 1097f3: 90 nop tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 1097f4: 8b 53 20 mov 0x20(%ebx),%edx 1097f7: 39 53 24 cmp %edx,0x24(%ebx) 1097fa: 74 5f je 10985b <== ALWAYS TAKEN sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 1097fc: 8b 45 dc mov -0x24(%ebp),%eax 1097ff: 85 c0 test %eax,%eax 109801: 74 29 je 10982c <== NEVER TAKEN 109803: 8b 43 24 mov 0x24(%ebx),%eax 109806: 3b 43 20 cmp 0x20(%ebx),%eax 109809: 7d 21 jge 10982c <== NEVER TAKEN 10980b: 8b 55 d8 mov -0x28(%ebp),%edx 10980e: 8b 7d dc mov -0x24(%ebp),%edi 109811: eb 06 jmp 109819 109813: 90 nop 109814: 39 43 20 cmp %eax,0x20(%ebx) 109817: 7e 10 jle 109829 *buffer++ = tty->cbuf[tty->cindex++]; 109819: 8b 73 1c mov 0x1c(%ebx),%esi 10981c: 8a 0c 06 mov (%esi,%eax,1),%cl 10981f: 88 0a mov %cl,(%edx) 109821: 42 inc %edx 109822: 40 inc %eax 109823: 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)) { 109826: 4f dec %edi 109827: 75 eb jne 109814 109829: 89 7d dc mov %edi,-0x24(%ebp) *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 10982c: 8b 55 08 mov 0x8(%ebp),%edx 10982f: 8b 42 10 mov 0x10(%edx),%eax 109832: 2b 45 dc sub -0x24(%ebp),%eax 109835: 89 42 18 mov %eax,0x18(%edx) tty->tty_rcvwakeup = 0; 109838: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10983f: 00 00 00 rtems_semaphore_release (tty->isem); 109842: 83 ec 0c sub $0xc,%esp 109845: ff 73 14 pushl 0x14(%ebx) 109848: e8 57 14 00 00 call 10aca4 return sc; 10984d: 83 c4 10 add $0x10,%esp } 109850: 8b 45 e0 mov -0x20(%ebp),%eax 109853: 8d 65 f4 lea -0xc(%ebp),%esp 109856: 5b pop %ebx 109857: 5e pop %esi 109858: 5f pop %edi 109859: c9 leave 10985a: c3 ret rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 10985b: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) 109862: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) tty->read_start_column = tty->column; 109869: 8b 43 28 mov 0x28(%ebx),%eax 10986c: 89 43 2c mov %eax,0x2c(%ebx) if (tty->device.pollRead != NULL && 10986f: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 109875: 85 c0 test %eax,%eax 109877: 74 0e je 109887 109879: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx 10987f: 85 d2 test %edx,%edx 109881: 0f 84 82 01 00 00 je 109a09 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 109887: 8b 73 74 mov 0x74(%ebx),%esi rtems_status_code sc; int wait = (int)1; 10988a: 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)( 109891: 8d 4b 49 lea 0x49(%ebx),%ecx 109894: 89 4d d4 mov %ecx,-0x2c(%ebp) 109897: 90 nop while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 109898: 8b 53 5c mov 0x5c(%ebx),%edx 10989b: 8b 43 60 mov 0x60(%ebx),%eax 10989e: 39 c2 cmp %eax,%edx 1098a0: 0f 84 06 01 00 00 je 1099ac (tty->ccount < (CBUFSIZE-1))) { 1098a6: a1 00 54 12 00 mov 0x125400,%eax 1098ab: 48 dec %eax while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 1098ac: 3b 43 20 cmp 0x20(%ebx),%eax 1098af: 7f 3c jg 1098ed <== ALWAYS TAKEN 1098b1: e9 f6 00 00 00 jmp 1099ac <== NOT EXECUTED 1098b6: 66 90 xchg %ax,%ax <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) 1098b8: 0f b6 c1 movzbl %cl,%eax 1098bb: 89 da mov %ebx,%edx 1098bd: e8 9e fd ff ff call 109660 1098c2: 85 c0 test %eax,%eax 1098c4: 74 07 je 1098cd wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; 1098c6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) } timeout = tty->rawInBufSemaphoreTimeout; 1098cd: 8b 73 70 mov 0x70(%ebx),%esi while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 1098d0: 8b 53 5c mov 0x5c(%ebx),%edx 1098d3: 8b 43 60 mov 0x60(%ebx),%eax 1098d6: 39 c2 cmp %eax,%edx 1098d8: 0f 84 ce 00 00 00 je 1099ac (tty->ccount < (CBUFSIZE-1))) { 1098de: a1 00 54 12 00 mov 0x125400,%eax 1098e3: 48 dec %eax while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 1098e4: 39 43 20 cmp %eax,0x20(%ebx) 1098e7: 0f 8d bf 00 00 00 jge 1099ac <== NEVER TAKEN (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 1098ed: 8b 43 5c mov 0x5c(%ebx),%eax 1098f0: 8b 4b 64 mov 0x64(%ebx),%ecx 1098f3: 40 inc %eax 1098f4: 31 d2 xor %edx,%edx 1098f6: f7 f1 div %ecx c = tty->rawInBuf.theBuf[newHead]; 1098f8: 8b 43 58 mov 0x58(%ebx),%eax 1098fb: 8a 0c 10 mov (%eax,%edx,1),%cl tty->rawInBuf.Head = newHead; 1098fe: 89 53 5c mov %edx,0x5c(%ebx) if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 109901: 8b 43 60 mov 0x60(%ebx),%eax 109904: 8b 7b 64 mov 0x64(%ebx),%edi % tty->rawInBuf.Size) 109907: 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) 10990a: 8d 04 07 lea (%edi,%eax,1),%eax 10990d: 29 d0 sub %edx,%eax % tty->rawInBuf.Size) 10990f: 31 d2 xor %edx,%edx 109911: 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) 109913: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx 109919: 73 5d jae 109978 <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 10991b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109921: 83 e0 fe and $0xfffffffe,%eax 109924: 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)) 10992a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109930: 25 02 02 00 00 and $0x202,%eax 109935: 3d 02 02 00 00 cmp $0x202,%eax 10993a: 0f 84 94 00 00 00 je 1099d4 <== 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) { 109940: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109946: f6 c4 01 test $0x1,%ah 109949: 74 2d je 109978 <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; 10994b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109951: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 109954: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 10995a: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 109960: 85 c0 test %eax,%eax <== NOT EXECUTED 109962: 74 14 je 109978 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 109964: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109967: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10996a: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10996d: ff d0 call *%eax <== NOT EXECUTED 10996f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109972: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 109975: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 109978: f6 43 3c 02 testb $0x2,0x3c(%ebx) 10997c: 0f 85 36 ff ff ff jne 1098b8 <== ALWAYS TAKEN if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 109982: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 109985: 89 da mov %ebx,%edx <== NOT EXECUTED 109987: e8 d4 fc ff ff call 109660 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 10998c: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 109990: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 109993: 0f 8d 2d ff ff ff jge 1098c6 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 109999: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10999c: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 10999f: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 1099a2: 39 c2 cmp %eax,%edx <== NOT EXECUTED 1099a4: 0f 85 34 ff ff ff jne 1098de <== NOT EXECUTED 1099aa: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 1099ac: 8b 4d e4 mov -0x1c(%ebp),%ecx 1099af: 85 c9 test %ecx,%ecx 1099b1: 0f 84 45 fe ff ff je 1097fc sc = rtems_semaphore_obtain( 1099b7: 52 push %edx 1099b8: 56 push %esi 1099b9: ff 73 6c pushl 0x6c(%ebx) 1099bc: ff 73 68 pushl 0x68(%ebx) 1099bf: e8 e4 11 00 00 call 10aba8 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 1099c4: 83 c4 10 add $0x10,%esp 1099c7: 85 c0 test %eax,%eax 1099c9: 0f 84 c9 fe ff ff je 109898 <== ALWAYS TAKEN 1099cf: e9 28 fe ff ff jmp 1097fc <== 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) 1099d4: 8b bb 94 00 00 00 mov 0x94(%ebx),%edi <== NOT EXECUTED 1099da: 85 ff test %edi,%edi <== NOT EXECUTED 1099dc: 74 0e je 1099ec <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 1099de: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1099e4: a8 20 test $0x20,%al <== NOT EXECUTED 1099e6: 0f 84 54 ff ff ff je 109940 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 1099ec: 56 push %esi <== NOT EXECUTED 1099ed: 6a 01 push $0x1 <== NOT EXECUTED 1099ef: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 1099f2: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1099f5: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 1099f8: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 1099fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a01: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 109a04: e9 6f ff ff ff jmp 109978 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 109a09: f6 43 3c 02 testb $0x2,0x3c(%ebx) 109a0d: 75 1d jne 109a2c 109a0f: eb 39 jmp 109a4a 109a11: 8d 76 00 lea 0x0(%esi),%esi for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 109a14: 0f b6 c0 movzbl %al,%eax 109a17: 89 da mov %ebx,%edx 109a19: e8 42 fc ff ff call 109660 109a1e: 85 c0 test %eax,%eax 109a20: 0f 85 d6 fd ff ff jne 1097fc static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 109a26: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax for (;;) { n = (*tty->device.pollRead)(tty->minor); 109a2c: 83 ec 0c sub $0xc,%esp 109a2f: ff 73 10 pushl 0x10(%ebx) 109a32: ff d0 call *%eax if (n < 0) { 109a34: 83 c4 10 add $0x10,%esp 109a37: 85 c0 test %eax,%eax 109a39: 79 d9 jns 109a14 rtems_task_wake_after (1); 109a3b: 83 ec 0c sub $0xc,%esp 109a3e: 6a 01 push $0x1 109a40: e8 1b 16 00 00 call 10b060 109a45: 83 c4 10 add $0x10,%esp 109a48: eb dc jmp 109a26 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 109a4a: e8 01 0b 00 00 call 10a550 109a4f: 89 c6 mov %eax,%esi 109a51: 8d 76 00 lea 0x0(%esi),%esi for (;;) { n = (*tty->device.pollRead)(tty->minor); 109a54: 83 ec 0c sub $0xc,%esp 109a57: ff 73 10 pushl 0x10(%ebx) 109a5a: ff 93 a0 00 00 00 call *0xa0(%ebx) if (n < 0) { 109a60: 83 c4 10 add $0x10,%esp 109a63: 85 c0 test %eax,%eax 109a65: 78 25 js 109a8c break; } } rtems_task_wake_after (1); } else { siproc (n, tty); 109a67: 0f b6 c0 movzbl %al,%eax 109a6a: 89 da mov %ebx,%edx 109a6c: e8 ef fb ff ff call 109660 if (tty->ccount >= tty->termios.c_cc[VMIN]) 109a71: 8a 43 47 mov 0x47(%ebx),%al 109a74: 0f b6 d0 movzbl %al,%edx 109a77: 39 53 20 cmp %edx,0x20(%ebx) 109a7a: 0f 8d 7c fd ff ff jge 1097fc <== NEVER TAKEN break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 109a80: 84 c0 test %al,%al 109a82: 74 d0 je 109a54 <== NEVER TAKEN 109a84: 80 7b 46 00 cmpb $0x0,0x46(%ebx) 109a88: 74 ca je 109a54 <== NEVER TAKEN 109a8a: eb be jmp 109a4a then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 109a8c: 80 7b 47 00 cmpb $0x0,0x47(%ebx) 109a90: 74 1d je 109aaf <== NEVER TAKEN if (tty->termios.c_cc[VTIME] && tty->ccount) { 109a92: 80 7b 46 00 cmpb $0x0,0x46(%ebx) 109a96: 74 08 je 109aa0 <== NEVER TAKEN 109a98: 8b 43 20 mov 0x20(%ebx),%eax 109a9b: 85 c0 test %eax,%eax 109a9d: 75 1a jne 109ab9 109a9f: 90 nop now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 109aa0: 83 ec 0c sub $0xc,%esp 109aa3: 6a 01 push $0x1 109aa5: e8 b6 15 00 00 call 10b060 109aaa: 83 c4 10 add $0x10,%esp 109aad: eb a5 jmp 109a54 if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 109aaf: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109ab3: 0f 84 43 fd ff ff je 1097fc <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 109ab9: e8 92 0a 00 00 call 10a550 if ((now - then) > tty->vtimeTicks) { 109abe: 29 f0 sub %esi,%eax 109ac0: 3b 43 54 cmp 0x54(%ebx),%eax 109ac3: 76 db jbe 109aa0 109ac5: e9 32 fd ff ff jmp 1097fc =============================================================================== 00109e60 : * 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) { 109e60: 55 push %ebp 109e61: 89 e5 mov %esp,%ebp 109e63: 57 push %edi 109e64: 56 push %esi 109e65: 53 push %ebx 109e66: 83 ec 0c sub $0xc,%esp 109e69: 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)) 109e6c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109e72: 25 03 04 00 00 and $0x403,%eax 109e77: 3d 01 04 00 00 cmp $0x401,%eax 109e7c: 0f 84 62 01 00 00 je 109fe4 <== NEVER TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 109e82: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109e88: 83 e0 03 and $0x3,%eax 109e8b: 83 f8 02 cmp $0x2,%eax 109e8e: 0f 84 8c 01 00 00 je 10a020 <== NEVER TAKEN tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 109e94: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 109e9a: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 109ea0: 39 c2 cmp %eax,%edx 109ea2: 0f 84 a4 00 00 00 je 109f4c rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 109ea8: 9c pushf 109ea9: fa cli 109eaa: 58 pop %eax len = tty->t_dqlen; 109eab: 8b b3 90 00 00 00 mov 0x90(%ebx),%esi tty->t_dqlen = 0; 109eb1: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 109eb8: 00 00 00 rtems_interrupt_enable(level); 109ebb: 50 push %eax 109ebc: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 109ebd: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 109ec3: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 109ec9: 8d 04 06 lea (%esi,%eax,1),%eax 109ecc: 31 d2 xor %edx,%edx 109ece: f7 f1 div %ecx 109ed0: 89 d6 mov %edx,%esi tty->rawOutBuf.Tail = newTail; 109ed2: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 109ed8: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 109edf: 0f 84 e7 00 00 00 je 109fcc * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 109ee5: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109eeb: 39 f0 cmp %esi,%eax 109eed: 74 79 je 109f68 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)) 109eef: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109ef5: 25 10 02 00 00 and $0x210,%eax 109efa: 3d 10 02 00 00 cmp $0x210,%eax 109eff: 0f 84 57 01 00 00 je 10a05c <== NEVER TAKEN nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 109f05: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109f0b: 39 c6 cmp %eax,%esi 109f0d: 0f 87 91 00 00 00 ja 109fa4 nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 109f13: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi 109f19: 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)) { 109f1b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109f21: f6 c4 06 test $0x6,%ah 109f24: 0f 85 91 00 00 00 jne 109fbb 109f2a: 89 f8 mov %edi,%eax nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 109f2c: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 109f33: 00 00 00 (*tty->device.write)( 109f36: 52 push %edx 109f37: 50 push %eax 109f38: 8b 43 7c mov 0x7c(%ebx),%eax 109f3b: 01 f0 add %esi,%eax 109f3d: 50 push %eax 109f3e: ff 73 10 pushl 0x10(%ebx) 109f41: ff 93 a4 00 00 00 call *0xa4(%ebx) 109f47: 83 c4 10 add $0x10,%esp 109f4a: eb 48 jmp 109f94 } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 109f4c: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 109f53: 0f 84 2b 01 00 00 je 10a084 <== NEVER TAKEN /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 109f59: 31 ff xor %edi,%edi tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 109f5b: 89 f8 mov %edi,%eax 109f5d: 8d 65 f4 lea -0xc(%ebp),%esp 109f60: 5b pop %ebx 109f61: 5e pop %esi 109f62: 5f pop %edi 109f63: c9 leave 109f64: c3 ret 109f65: 8d 76 00 lea 0x0(%esi),%esi if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 109f68: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 109f6f: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 109f72: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 109f78: 85 c0 test %eax,%eax 109f7a: 0f 84 1c 01 00 00 je 10a09c <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 109f80: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109f83: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 109f89: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 109f8c: 52 push %edx <== NOT EXECUTED 109f8d: ff d0 call *%eax <== NOT EXECUTED 109f8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 109f92: 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*/ 109f94: 89 b3 84 00 00 00 mov %esi,0x84(%ebx) } return nToSend; } 109f9a: 89 f8 mov %edi,%eax 109f9c: 8d 65 f4 lea -0xc(%ebp),%esp 109f9f: 5b pop %ebx 109fa0: 5e pop %esi 109fa1: 5f pop %edi 109fa2: c9 leave 109fa3: c3 ret } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 109fa4: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 109faa: 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)) { 109fac: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109fb2: f6 c4 06 test $0x6,%ah 109fb5: 0f 84 6f ff ff ff je 109f2a <== ALWAYS TAKEN 109fbb: b8 01 00 00 00 mov $0x1,%eax nToSend = 1; 109fc0: bf 01 00 00 00 mov $0x1,%edi 109fc5: e9 62 ff ff ff jmp 109f2c 109fca: 66 90 xchg %ax,%ax tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 109fcc: 83 ec 0c sub $0xc,%esp 109fcf: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109fd5: e8 ca 0c 00 00 call 10aca4 109fda: 83 c4 10 add $0x10,%esp 109fdd: e9 03 ff ff ff jmp 109ee5 109fe2: 66 90 xchg %ax,%ax /* 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); 109fe4: 56 push %esi <== NOT EXECUTED 109fe5: 6a 01 push $0x1 <== NOT EXECUTED 109fe7: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 109fea: 50 push %eax <== NOT EXECUTED 109feb: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109fee: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED rtems_interrupt_disable(level); 109ff4: 9c pushf <== NOT EXECUTED 109ff5: fa cli <== NOT EXECUTED 109ff6: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 109ff7: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 109ffd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a003: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10a006: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 10a00c: 52 push %edx <== NOT EXECUTED 10a00d: 9d popf <== NOT EXECUTED 10a00e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend = 1; 10a011: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10a016: 89 f8 mov %edi,%eax <== NOT EXECUTED 10a018: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a01b: 5b pop %ebx <== NOT EXECUTED 10a01c: 5e pop %esi <== NOT EXECUTED 10a01d: 5f pop %edi <== NOT EXECUTED 10a01e: c9 leave <== NOT EXECUTED 10a01f: 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); 10a020: 51 push %ecx <== NOT EXECUTED 10a021: 6a 01 push $0x1 <== NOT EXECUTED 10a023: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 10a026: 50 push %eax <== NOT EXECUTED 10a027: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a02a: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED rtems_interrupt_disable(level); 10a030: 9c pushf <== NOT EXECUTED 10a031: fa cli <== NOT EXECUTED 10a032: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10a033: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 10a039: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a03f: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10a042: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 10a048: 52 push %edx <== NOT EXECUTED 10a049: 9d popf <== NOT EXECUTED 10a04a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend = 1; 10a04d: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10a052: 89 f8 mov %edi,%eax <== NOT EXECUTED 10a054: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a057: 5b pop %ebx <== NOT EXECUTED 10a058: 5e pop %esi <== NOT EXECUTED 10a059: 5f pop %edi <== NOT EXECUTED 10a05a: c9 leave <== NOT EXECUTED 10a05b: 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); 10a05c: 9c pushf <== NOT EXECUTED 10a05d: fa cli <== NOT EXECUTED 10a05e: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 10a05f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a065: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 10a068: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 10a06e: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 10a075: 00 00 00 rtems_interrupt_enable(level); 10a078: 52 push %edx <== NOT EXECUTED 10a079: 9d popf <== NOT EXECUTED nToSend = 0; 10a07a: 31 ff xor %edi,%edi <== NOT EXECUTED 10a07c: e9 13 ff ff ff jmp 109f94 <== NOT EXECUTED 10a081: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 10a084: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a087: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 10a08d: e8 12 0c 00 00 call 10aca4 <== NOT EXECUTED 10a092: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; 10a095: 31 ff xor %edi,%edi <== NOT EXECUTED 10a097: e9 bf fe ff ff jmp 109f5b <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 10a09c: 31 ff xor %edi,%edi 10a09e: e9 f1 fe ff ff jmp 109f94 =============================================================================== 00109df4 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 109df4: 55 push %ebp 109df5: 89 e5 mov %esp,%ebp 109df7: 57 push %edi 109df8: 56 push %esi 109df9: 53 push %ebx 109dfa: 83 ec 1c sub $0x1c,%esp 109dfd: 8b 5d 08 mov 0x8(%ebp),%ebx 109e00: 8d 75 e0 lea -0x20(%ebp),%esi 109e03: 8d 7d e7 lea -0x19(%ebp),%edi 109e06: eb 14 jmp 109e1c } /* * do something */ c = tty->device.pollRead(tty->minor); 109e08: 83 ec 0c sub $0xc,%esp 109e0b: ff 73 10 pushl 0x10(%ebx) 109e0e: ff 93 a0 00 00 00 call *0xa0(%ebx) if (c != EOF) { 109e14: 83 c4 10 add $0x10,%esp 109e17: 83 f8 ff cmp $0xffffffff,%eax 109e1a: 75 30 jne 109e4c while (1) { /* * wait for rtems event */ rtems_event_receive( 109e1c: 56 push %esi 109e1d: 6a 00 push $0x0 109e1f: 6a 02 push $0x2 109e21: 6a 03 push $0x3 109e23: e8 94 07 00 00 call 10a5bc (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) { 109e28: 83 c4 10 add $0x10,%esp 109e2b: f6 45 e0 01 testb $0x1,-0x20(%ebp) 109e2f: 74 d7 je 109e08 <== ALWAYS TAKEN tty->rxTaskId = 0; 109e31: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 109e38: 00 00 00 rtems_task_delete(RTEMS_SELF); 109e3b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109e3e: 6a 00 push $0x0 <== NOT EXECUTED 109e40: e8 5f 10 00 00 call 10aea4 <== NOT EXECUTED 109e45: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109e48: eb be jmp 109e08 <== NOT EXECUTED 109e4a: 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; 109e4c: 88 45 e7 mov %al,-0x19(%ebp) rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 109e4f: 50 push %eax 109e50: 6a 01 push $0x1 109e52: 57 push %edi 109e53: 53 push %ebx 109e54: e8 8f fc ff ff call 109ae8 109e59: 83 c4 10 add $0x10,%esp 109e5c: eb be jmp 109e1c =============================================================================== 0010a0a4 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 10a0a4: 55 push %ebp 10a0a5: 89 e5 mov %esp,%ebp 10a0a7: 56 push %esi 10a0a8: 53 push %ebx 10a0a9: 83 ec 10 sub $0x10,%esp 10a0ac: 8b 5d 08 mov 0x8(%ebp),%ebx 10a0af: 8d 75 f4 lea -0xc(%ebp),%esi 10a0b2: eb 28 jmp 10a0dc } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10a0b4: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a0ba: c1 e0 05 shl $0x5,%eax 10a0bd: 8b 80 54 73 12 00 mov 0x127354(%eax),%eax 10a0c3: 85 c0 test %eax,%eax 10a0c5: 74 09 je 10a0d0 <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 10a0c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a0ca: 53 push %ebx <== NOT EXECUTED 10a0cb: ff d0 call *%eax <== NOT EXECUTED 10a0cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 10a0d0: 83 ec 0c sub $0xc,%esp 10a0d3: 53 push %ebx 10a0d4: e8 87 fd ff ff call 109e60 } 10a0d9: 83 c4 10 add $0x10,%esp while (1) { /* * wait for rtems event */ rtems_event_receive( 10a0dc: 56 push %esi 10a0dd: 6a 00 push $0x0 10a0df: 6a 02 push $0x2 10a0e1: 6a 03 push $0x3 10a0e3: e8 d4 04 00 00 call 10a5bc (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) { 10a0e8: 83 c4 10 add $0x10,%esp 10a0eb: f6 45 f4 01 testb $0x1,-0xc(%ebp) 10a0ef: 74 c3 je 10a0b4 <== ALWAYS TAKEN tty->txTaskId = 0; 10a0f1: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 10a0f8: 00 00 00 rtems_task_delete(RTEMS_SELF); 10a0fb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a0fe: 6a 00 push $0x0 <== NOT EXECUTED 10a100: e8 9f 0d 00 00 call 10aea4 <== NOT EXECUTED 10a105: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a108: eb aa jmp 10a0b4 <== NOT EXECUTED =============================================================================== 001096b4 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 1096b4: 55 push %ebp 1096b5: 89 e5 mov %esp,%ebp 1096b7: 57 push %edi 1096b8: 56 push %esi 1096b9: 53 push %ebx 1096ba: 83 ec 20 sub $0x20,%esp 1096bd: 8b 7d 08 mov 0x8(%ebp),%edi rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1096c0: 8b 07 mov (%edi),%eax 1096c2: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1096c5: 6a 00 push $0x0 1096c7: 6a 00 push $0x0 1096c9: ff 76 18 pushl 0x18(%esi) 1096cc: e8 d7 14 00 00 call 10aba8 1096d1: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) 1096d4: 83 c4 10 add $0x10,%esp 1096d7: 85 c0 test %eax,%eax 1096d9: 75 29 jne 109704 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 1096db: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 1096e1: c1 e0 05 shl $0x5,%eax 1096e4: 8b 80 4c 73 12 00 mov 0x12734c(%eax),%eax 1096ea: 85 c0 test %eax,%eax 1096ec: 74 22 je 109710 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 1096ee: 83 ec 08 sub $0x8,%esp 1096f1: 57 push %edi 1096f2: 56 push %esi 1096f3: ff d0 call *%eax 1096f5: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_semaphore_release (tty->osem); 1096f8: 5f pop %edi 1096f9: ff 76 18 pushl 0x18(%esi) 1096fc: e8 a3 15 00 00 call 10aca4 return sc; 109701: 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; } 109704: 8b 45 e4 mov -0x1c(%ebp),%eax 109707: 8d 65 f4 lea -0xc(%ebp),%esp 10970a: 5b pop %ebx 10970b: 5e pop %esi 10970c: 5f pop %edi 10970d: c9 leave 10970e: c3 ret 10970f: 90 nop 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) { 109710: f6 46 34 01 testb $0x1,0x34(%esi) 109714: 74 4e je 109764 <== NEVER TAKEN uint32_t count = args->count; 109716: 8b 47 10 mov 0x10(%edi),%eax 109719: 89 45 e0 mov %eax,-0x20(%ebp) char *buffer = args->buffer; 10971c: 8b 47 0c mov 0xc(%edi),%eax while (count--) 10971f: 8b 5d e0 mov -0x20(%ebp),%ebx 109722: 85 db test %ebx,%ebx 109724: 74 56 je 10977c <== NEVER TAKEN 109726: 31 db xor %ebx,%ebx 109728: 89 7d dc mov %edi,-0x24(%ebp) 10972b: 89 c7 mov %eax,%edi 10972d: 8d 76 00 lea 0x0(%esi),%esi oproc (*buffer++, tty); 109730: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 109734: 89 f2 mov %esi,%edx 109736: e8 6d fa ff ff call 1091a8 10973b: 43 inc %ebx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10973c: 39 5d e0 cmp %ebx,-0x20(%ebp) 10973f: 75 ef jne 109730 109741: 8b 7d dc mov -0x24(%ebp),%edi 109744: 8b 47 10 mov 0x10(%edi),%eax oproc (*buffer++, tty); args->bytes_moved = args->count; 109747: 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); 10974a: 83 ec 0c sub $0xc,%esp 10974d: ff 76 18 pushl 0x18(%esi) 109750: e8 4f 15 00 00 call 10aca4 return sc; 109755: 83 c4 10 add $0x10,%esp } 109758: 8b 45 e4 mov -0x1c(%ebp),%eax 10975b: 8d 65 f4 lea -0xc(%ebp),%esp 10975e: 5b pop %ebx 10975f: 5e pop %esi 109760: 5f pop %edi 109761: c9 leave 109762: c3 ret 109763: 90 nop char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 109764: 51 push %ecx <== NOT EXECUTED 109765: 56 push %esi <== NOT EXECUTED 109766: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED 109769: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED 10976c: e8 03 f9 ff ff call 109074 <== NOT EXECUTED args->bytes_moved = args->count; 109771: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED 109774: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED 109777: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10977a: eb ce jmp 10974a <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10977c: 31 c0 xor %eax,%eax <== NOT EXECUTED 10977e: eb c7 jmp 109747 <== NOT EXECUTED =============================================================================== 00117cfc : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 117cfc: 55 push %ebp 117cfd: 89 e5 mov %esp,%ebp 117cff: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 117d02: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 117d05: 50 push %eax 117d06: ff 75 08 pushl 0x8(%ebp) 117d09: 68 e0 2a 14 00 push $0x142ae0 117d0e: e8 e9 2b 00 00 call 11a8fc <_Objects_Get> switch ( location ) { 117d13: 83 c4 10 add $0x10,%esp 117d16: 8b 55 f4 mov -0xc(%ebp),%edx 117d19: 85 d2 test %edx,%edx 117d1b: 74 07 je 117d24 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117d1d: b8 04 00 00 00 mov $0x4,%eax } 117d22: c9 leave 117d23: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 117d24: 83 78 38 04 cmpl $0x4,0x38(%eax) 117d28: 74 0f je 117d39 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 117d2a: 83 ec 0c sub $0xc,%esp 117d2d: 83 c0 10 add $0x10,%eax 117d30: 50 push %eax 117d31: e8 16 48 00 00 call 11c54c <_Watchdog_Remove> 117d36: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 117d39: e8 46 37 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117d3e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d40: c9 leave 117d41: c3 ret =============================================================================== 0010b4d8 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10b4d8: 55 push %ebp 10b4d9: 89 e5 mov %esp,%ebp 10b4db: 57 push %edi 10b4dc: 56 push %esi 10b4dd: 53 push %ebx 10b4de: 83 ec 0c sub $0xc,%esp 10b4e1: 8b 5d 08 mov 0x8(%ebp),%ebx 10b4e4: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10b4e7: 85 db test %ebx,%ebx 10b4e9: 74 6d je 10b558 return RTEMS_INVALID_NAME; if ( !id ) 10b4eb: 85 f6 test %esi,%esi 10b4ed: 0f 84 89 00 00 00 je 10b57c 10b4f3: a1 cc 91 12 00 mov 0x1291cc,%eax 10b4f8: 40 inc %eax 10b4f9: a3 cc 91 12 00 mov %eax,0x1291cc * 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 ); 10b4fe: 83 ec 0c sub $0xc,%esp 10b501: 68 c0 9b 12 00 push $0x129bc0 10b506: e8 f9 0d 00 00 call 10c304 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10b50b: 83 c4 10 add $0x10,%esp 10b50e: 85 c0 test %eax,%eax 10b510: 74 56 je 10b568 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10b512: 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; 10b519: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10b520: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10b527: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10b52e: 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 ), 10b535: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b538: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b53b: 8b 0d dc 9b 12 00 mov 0x129bdc,%ecx 10b541: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b544: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10b547: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10b549: e8 7a 1d 00 00 call 10d2c8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b54e: 31 c0 xor %eax,%eax } 10b550: 8d 65 f4 lea -0xc(%ebp),%esp 10b553: 5b pop %ebx 10b554: 5e pop %esi 10b555: 5f pop %edi 10b556: c9 leave 10b557: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b558: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b55d: 8d 65 f4 lea -0xc(%ebp),%esp 10b560: 5b pop %ebx 10b561: 5e pop %esi 10b562: 5f pop %edi 10b563: c9 leave 10b564: c3 ret 10b565: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10b568: e8 5b 1d 00 00 call 10d2c8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b56d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b572: 8d 65 f4 lea -0xc(%ebp),%esp 10b575: 5b pop %ebx 10b576: 5e pop %esi 10b577: 5f pop %edi 10b578: c9 leave 10b579: c3 ret 10b57a: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b57c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b581: 8d 65 f4 lea -0xc(%ebp),%esp 10b584: 5b pop %ebx 10b585: 5e pop %esi 10b586: 5f pop %edi 10b587: c9 leave 10b588: c3 ret =============================================================================== 00117df8 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 117df8: 55 push %ebp 117df9: 89 e5 mov %esp,%ebp 117dfb: 53 push %ebx 117dfc: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 117dff: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 117e02: 50 push %eax 117e03: ff 75 08 pushl 0x8(%ebp) 117e06: 68 e0 2a 14 00 push $0x142ae0 117e0b: e8 ec 2a 00 00 call 11a8fc <_Objects_Get> 117e10: 89 c3 mov %eax,%ebx switch ( location ) { 117e12: 83 c4 10 add $0x10,%esp 117e15: 8b 4d f4 mov -0xc(%ebp),%ecx 117e18: 85 c9 test %ecx,%ecx 117e1a: 75 38 jne 117e54 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 117e1c: 83 ec 08 sub $0x8,%esp 117e1f: 50 push %eax 117e20: 68 e0 2a 14 00 push $0x142ae0 117e25: e8 5e 26 00 00 call 11a488 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 117e2a: 8d 43 10 lea 0x10(%ebx),%eax 117e2d: 89 04 24 mov %eax,(%esp) 117e30: e8 17 47 00 00 call 11c54c <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 117e35: 58 pop %eax 117e36: 5a pop %edx 117e37: 53 push %ebx 117e38: 68 e0 2a 14 00 push $0x142ae0 117e3d: e8 3e 29 00 00 call 11a780 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 117e42: e8 3d 36 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117e47: 83 c4 10 add $0x10,%esp 117e4a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117e4c: 8b 5d fc mov -0x4(%ebp),%ebx 117e4f: c9 leave 117e50: c3 ret 117e51: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117e54: b8 04 00 00 00 mov $0x4,%eax } 117e59: 8b 5d fc mov -0x4(%ebp),%ebx 117e5c: c9 leave 117e5d: c3 ret =============================================================================== 0010b58c : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10b58c: 55 push %ebp 10b58d: 89 e5 mov %esp,%ebp 10b58f: 57 push %edi 10b590: 56 push %esi 10b591: 53 push %ebx 10b592: 83 ec 2c sub $0x2c,%esp 10b595: 8b 5d 0c mov 0xc(%ebp),%ebx 10b598: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10b59b: 85 db test %ebx,%ebx 10b59d: 0f 84 99 00 00 00 je 10b63c return RTEMS_INVALID_NUMBER; if ( !routine ) 10b5a3: 85 f6 test %esi,%esi 10b5a5: 0f 84 b1 00 00 00 je 10b65c Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10b5ab: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10b5ac: 8d 45 e4 lea -0x1c(%ebp),%eax 10b5af: 50 push %eax 10b5b0: ff 75 08 pushl 0x8(%ebp) 10b5b3: 68 c0 9b 12 00 push $0x129bc0 10b5b8: e8 fb 11 00 00 call 10c7b8 <_Objects_Get> 10b5bd: 89 c7 mov %eax,%edi switch ( location ) { 10b5bf: 83 c4 10 add $0x10,%esp 10b5c2: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b5c5: 85 c9 test %ecx,%ecx 10b5c7: 74 0f je 10b5d8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b5c9: b8 04 00 00 00 mov $0x4,%eax } 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 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10b5d8: 8d 50 10 lea 0x10(%eax),%edx 10b5db: 83 ec 0c sub $0xc,%esp 10b5de: 52 push %edx 10b5df: 89 55 d4 mov %edx,-0x2c(%ebp) 10b5e2: e8 95 2b 00 00 call 10e17c <_Watchdog_Remove> _ISR_Disable( level ); 10b5e7: 9c pushf 10b5e8: fa cli 10b5e9: 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 ) { 10b5ea: 83 c4 10 add $0x10,%esp 10b5ed: 8b 57 18 mov 0x18(%edi),%edx 10b5f0: 85 d2 test %edx,%edx 10b5f2: 8b 55 d4 mov -0x2c(%ebp),%edx 10b5f5: 75 55 jne 10b64c /* * 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; 10b5f7: 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; 10b5fe: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10b605: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10b608: 8b 4d 08 mov 0x8(%ebp),%ecx 10b60b: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10b60e: 8b 4d 14 mov 0x14(%ebp),%ecx 10b611: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10b614: 50 push %eax 10b615: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b616: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b619: 83 ec 08 sub $0x8,%esp 10b61c: 52 push %edx 10b61d: 68 a0 92 12 00 push $0x1292a0 10b622: e8 15 2a 00 00 call 10e03c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10b627: e8 9c 1c 00 00 call 10d2c8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b62c: 83 c4 10 add $0x10,%esp 10b62f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b631: 8d 65 f4 lea -0xc(%ebp),%esp 10b634: 5b pop %ebx 10b635: 5e pop %esi 10b636: 5f pop %edi 10b637: c9 leave 10b638: c3 ret 10b639: 8d 76 00 lea 0x0(%esi),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; 10b63c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b641: 8d 65 f4 lea -0xc(%ebp),%esp 10b644: 5b pop %ebx 10b645: 5e pop %esi 10b646: 5f pop %edi 10b647: c9 leave 10b648: c3 ret 10b649: 8d 76 00 lea 0x0(%esi),%esi * 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 ); 10b64c: 50 push %eax 10b64d: 9d popf _Thread_Enable_dispatch(); 10b64e: e8 75 1c 00 00 call 10d2c8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b653: 31 c0 xor %eax,%eax 10b655: e9 74 ff ff ff jmp 10b5ce 10b65a: 66 90 xchg %ax,%ax if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10b65c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b661: 8d 65 f4 lea -0xc(%ebp),%esp 10b664: 5b pop %ebx 10b665: 5e pop %esi 10b666: 5f pop %edi 10b667: c9 leave 10b668: c3 ret =============================================================================== 00117f40 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 117f40: 55 push %ebp 117f41: 89 e5 mov %esp,%ebp 117f43: 57 push %edi 117f44: 56 push %esi 117f45: 53 push %ebx 117f46: 83 ec 2c sub $0x2c,%esp 117f49: 8b 75 08 mov 0x8(%ebp),%esi 117f4c: 8b 7d 0c mov 0xc(%ebp),%edi 117f4f: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 117f52: 80 3d bc 20 14 00 00 cmpb $0x0,0x1420bc 117f59: 75 0d jne 117f68 return RTEMS_NOT_DEFINED; 117f5b: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117f60: 8d 65 f4 lea -0xc(%ebp),%esp 117f63: 5b pop %ebx 117f64: 5e pop %esi 117f65: 5f pop %edi 117f66: c9 leave 117f67: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 117f68: 83 ec 0c sub $0xc,%esp 117f6b: 57 push %edi 117f6c: e8 93 d4 ff ff call 115404 <_TOD_Validate> 117f71: 83 c4 10 add $0x10,%esp 117f74: 84 c0 test %al,%al 117f76: 74 1e je 117f96 return RTEMS_INVALID_CLOCK; if ( !routine ) 117f78: 85 db test %ebx,%ebx 117f7a: 0f 84 a4 00 00 00 je 118024 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 117f80: 83 ec 0c sub $0xc,%esp 117f83: 57 push %edi 117f84: e8 ef d3 ff ff call 115378 <_TOD_To_seconds> 117f89: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 117f8b: 83 c4 10 add $0x10,%esp 117f8e: 3b 05 48 21 14 00 cmp 0x142148,%eax 117f94: 77 0e ja 117fa4 return RTEMS_INVALID_CLOCK; 117f96: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117f9b: 8d 65 f4 lea -0xc(%ebp),%esp 117f9e: 5b pop %ebx 117f9f: 5e pop %esi 117fa0: 5f pop %edi 117fa1: c9 leave 117fa2: c3 ret 117fa3: 90 nop 117fa4: 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 ); 117fa5: 8d 45 e4 lea -0x1c(%ebp),%eax 117fa8: 50 push %eax 117fa9: 56 push %esi 117faa: 68 e0 2a 14 00 push $0x142ae0 117faf: e8 48 29 00 00 call 11a8fc <_Objects_Get> switch ( location ) { 117fb4: 83 c4 10 add $0x10,%esp 117fb7: 8b 4d e4 mov -0x1c(%ebp),%ecx 117fba: 85 c9 test %ecx,%ecx 117fbc: 75 5a jne 118018 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 117fbe: 8d 48 10 lea 0x10(%eax),%ecx 117fc1: 83 ec 0c sub $0xc,%esp 117fc4: 51 push %ecx 117fc5: 89 45 d0 mov %eax,-0x30(%ebp) 117fc8: 89 4d d4 mov %ecx,-0x2c(%ebp) 117fcb: e8 7c 45 00 00 call 11c54c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 117fd0: 8b 55 d0 mov -0x30(%ebp),%edx 117fd3: 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; 117fda: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 117fe1: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 117fe4: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 117fe7: 8b 45 14 mov 0x14(%ebp),%eax 117fea: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 117fed: 2b 3d 48 21 14 00 sub 0x142148,%edi 117ff3: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 117ff6: 58 pop %eax 117ff7: 5a pop %edx 117ff8: 8b 4d d4 mov -0x2c(%ebp),%ecx 117ffb: 51 push %ecx 117ffc: 68 74 21 14 00 push $0x142174 118001: e8 06 44 00 00 call 11c40c <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 118006: e8 79 34 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11800b: 83 c4 10 add $0x10,%esp 11800e: 31 c0 xor %eax,%eax 118010: e9 4b ff ff ff jmp 117f60 118015: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118018: b8 04 00 00 00 mov $0x4,%eax 11801d: e9 3e ff ff ff jmp 117f60 118022: 66 90 xchg %ax,%ax if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118024: b8 09 00 00 00 mov $0x9,%eax 118029: e9 32 ff ff ff jmp 117f60 =============================================================================== 001186bc : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 1186bc: 55 push %ebp 1186bd: 89 e5 mov %esp,%ebp 1186bf: 56 push %esi 1186c0: 53 push %ebx 1186c1: 83 ec 10 sub $0x10,%esp 1186c4: 8b 45 08 mov 0x8(%ebp),%eax 1186c7: 85 c0 test %eax,%eax 1186c9: 74 41 je 11870c ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 1186cb: 0f b6 15 f4 99 13 00 movzbl 0x1399f4,%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 1186d2: 39 d0 cmp %edx,%eax 1186d4: 76 42 jbe 118718 * 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 ) 1186d6: 40 inc %eax 1186d7: 75 33 jne 11870c return RTEMS_INVALID_PRIORITY; _priority = 0; 1186d9: 31 f6 xor %esi,%esi 1186db: 8b 15 ac 20 14 00 mov 0x1420ac,%edx 1186e1: 42 inc %edx 1186e2: 89 15 ac 20 14 00 mov %edx,0x1420ac /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 1186e8: 8a 1d e0 d9 13 00 mov 0x13d9e0,%bl initialized = true; 1186ee: c6 05 e0 d9 13 00 01 movb $0x1,0x13d9e0 _Thread_Enable_dispatch(); 1186f5: e8 8a 2d 00 00 call 11b484 <_Thread_Enable_dispatch> if ( tmpInitialized ) 1186fa: 84 db test %bl,%bl 1186fc: 74 1e je 11871c return RTEMS_INCORRECT_STATE; 1186fe: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 118703: 8d 65 f8 lea -0x8(%ebp),%esp 118706: 5b pop %ebx 118707: 5e pop %esi 118708: c9 leave 118709: c3 ret 11870a: 66 90 xchg %ax,%ax * 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; 11870c: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 118711: 8d 65 f8 lea -0x8(%ebp),%esp 118714: 5b pop %ebx 118715: 5e pop %esi 118716: c9 leave 118717: c3 ret 118718: 89 c6 mov %eax,%esi 11871a: eb bf jmp 1186db * 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( 11871c: 83 ec 08 sub $0x8,%esp 11871f: 8d 45 f4 lea -0xc(%ebp),%eax 118722: 50 push %eax 118723: 8b 45 10 mov 0x10(%ebp),%eax 118726: 80 cc 80 or $0x80,%ah 118729: 50 push %eax 11872a: 68 00 01 00 00 push $0x100 11872f: ff 75 0c pushl 0xc(%ebp) 118732: 56 push %esi 118733: 68 45 4d 49 54 push $0x54494d45 118738: e8 e3 ec ff ff call 117420 /* 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) { 11873d: 83 c4 20 add $0x20,%esp 118740: 85 c0 test %eax,%eax 118742: 74 10 je 118754 initialized = false; 118744: c6 05 e0 d9 13 00 00 movb $0x0,0x13d9e0 initialized = false; } #endif return status; } 11874b: 8d 65 f8 lea -0x8(%ebp),%esp 11874e: 5b pop %ebx 11874f: 5e pop %esi 118750: c9 leave 118751: c3 ret 118752: 66 90 xchg %ax,%ax * 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) 118754: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 118757: 0f b7 c8 movzwl %ax,%ecx 11875a: 8b 15 5c 20 14 00 mov 0x14205c,%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( 118760: 8b 14 8a mov (%edx,%ecx,4),%edx 118763: 89 15 60 d9 13 00 mov %edx,0x13d960 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 118769: c7 05 90 d9 13 00 94 movl $0x13d994,0x13d990 118770: d9 13 00 head->previous = NULL; 118773: c7 05 94 d9 13 00 00 movl $0x0,0x13d994 11877a: 00 00 00 tail->previous = head; 11877d: c7 05 98 d9 13 00 90 movl $0x13d990,0x13d998 118784: d9 13 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 118787: c7 05 c8 d9 13 00 cc movl $0x13d9cc,0x13d9c8 11878e: d9 13 00 head->previous = NULL; 118791: c7 05 cc d9 13 00 00 movl $0x0,0x13d9cc 118798: 00 00 00 tail->previous = head; 11879b: c7 05 d0 d9 13 00 c8 movl $0x13d9c8,0x13d9d0 1187a2: d9 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1187a5: c7 05 70 d9 13 00 00 movl $0x0,0x13d970 1187ac: 00 00 00 the_watchdog->routine = routine; 1187af: c7 05 84 d9 13 00 d0 movl $0x11b2d0,0x13d984 1187b6: b2 11 00 the_watchdog->id = id; 1187b9: a3 88 d9 13 00 mov %eax,0x13d988 the_watchdog->user_data = user_data; 1187be: c7 05 8c d9 13 00 00 movl $0x0,0x13d98c 1187c5: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1187c8: c7 05 a8 d9 13 00 00 movl $0x0,0x13d9a8 1187cf: 00 00 00 the_watchdog->routine = routine; 1187d2: c7 05 bc d9 13 00 d0 movl $0x11b2d0,0x13d9bc 1187d9: b2 11 00 the_watchdog->id = id; 1187dc: a3 c0 d9 13 00 mov %eax,0x13d9c0 the_watchdog->user_data = user_data; 1187e1: c7 05 c4 d9 13 00 00 movl $0x0,0x13d9c4 1187e8: 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; 1187eb: c7 05 64 d9 13 00 8c movl $0x11858c,0x13d964 1187f2: 85 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1187f5: 8b 15 e4 21 14 00 mov 0x1421e4,%edx 1187fb: 89 15 9c d9 13 00 mov %edx,0x13d99c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118801: 8b 15 48 21 14 00 mov 0x142148,%edx 118807: 89 15 d4 d9 13 00 mov %edx,0x13d9d4 ts->insert_chain = NULL; 11880d: c7 05 d8 d9 13 00 00 movl $0x0,0x13d9d8 118814: 00 00 00 ts->active = false; 118817: c6 05 dc d9 13 00 00 movb $0x0,0x13d9dc /* * The default timer server is now available. */ _Timer_server = ts; 11881e: c7 05 20 2b 14 00 60 movl $0x13d960,0x142b20 118825: d9 13 00 /* * Start the timer server */ status = rtems_task_start( 118828: 53 push %ebx 118829: 68 60 d9 13 00 push $0x13d960 11882e: 68 e0 83 11 00 push $0x1183e0 118833: 50 push %eax 118834: e8 a7 f2 ff ff call 117ae0 if (status) { initialized = false; } #endif return status; 118839: 83 c4 10 add $0x10,%esp 11883c: e9 d0 fe ff ff jmp 118711 =============================================================================== 001180b8 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 1180b8: 55 push %ebp 1180b9: 89 e5 mov %esp,%ebp 1180bb: 56 push %esi 1180bc: 53 push %ebx 1180bd: 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 ); 1180c0: 8d 45 f4 lea -0xc(%ebp),%eax 1180c3: 50 push %eax 1180c4: ff 75 08 pushl 0x8(%ebp) 1180c7: 68 e0 2a 14 00 push $0x142ae0 1180cc: e8 2b 28 00 00 call 11a8fc <_Objects_Get> 1180d1: 89 c3 mov %eax,%ebx switch ( location ) { 1180d3: 83 c4 10 add $0x10,%esp 1180d6: 8b 45 f4 mov -0xc(%ebp),%eax 1180d9: 85 c0 test %eax,%eax 1180db: 74 0f je 1180ec #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1180dd: b8 04 00 00 00 mov $0x4,%eax } 1180e2: 8d 65 f8 lea -0x8(%ebp),%esp 1180e5: 5b pop %ebx 1180e6: 5e pop %esi 1180e7: c9 leave 1180e8: c3 ret 1180e9: 8d 76 00 lea 0x0(%esi),%esi the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 1180ec: 8b 43 38 mov 0x38(%ebx),%eax 1180ef: 85 c0 test %eax,%eax 1180f1: 74 1d je 118110 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1180f3: 48 dec %eax 1180f4: 74 3a je 118130 /* * 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; 1180f6: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 1180fb: 89 45 e4 mov %eax,-0x1c(%ebp) 1180fe: e8 81 33 00 00 call 11b484 <_Thread_Enable_dispatch> return status; 118103: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118106: 8d 65 f8 lea -0x8(%ebp),%esp 118109: 5b pop %ebx 11810a: 5e pop %esi 11810b: c9 leave 11810c: c3 ret 11810d: 8d 76 00 lea 0x0(%esi),%esi the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 118110: 83 c3 10 add $0x10,%ebx 118113: 83 ec 0c sub $0xc,%esp 118116: 53 push %ebx 118117: e8 30 44 00 00 call 11c54c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 11811c: 59 pop %ecx 11811d: 5e pop %esi 11811e: 53 push %ebx 11811f: 68 80 21 14 00 push $0x142180 118124: e8 e3 42 00 00 call 11c40c <_Watchdog_Insert> 118129: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 11812c: 31 c0 xor %eax,%eax 11812e: eb cb jmp 1180fb 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; 118130: 8b 35 20 2b 14 00 mov 0x142b20,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118136: 83 ec 0c sub $0xc,%esp 118139: 8d 43 10 lea 0x10(%ebx),%eax 11813c: 50 push %eax 11813d: e8 0a 44 00 00 call 11c54c <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118142: 58 pop %eax 118143: 5a pop %edx 118144: 53 push %ebx 118145: 56 push %esi 118146: ff 56 04 call *0x4(%esi) 118149: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 11814c: 31 c0 xor %eax,%eax 11814e: eb ab jmp 1180fb =============================================================================== 00118150 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118150: 55 push %ebp 118151: 89 e5 mov %esp,%ebp 118153: 57 push %edi 118154: 56 push %esi 118155: 53 push %ebx 118156: 83 ec 2c sub $0x2c,%esp 118159: 8b 7d 0c mov 0xc(%ebp),%edi 11815c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 11815f: 8b 1d 20 2b 14 00 mov 0x142b20,%ebx if ( !timer_server ) 118165: 85 db test %ebx,%ebx 118167: 0f 84 9f 00 00 00 je 11820c return RTEMS_INCORRECT_STATE; if ( !routine ) 11816d: 85 f6 test %esi,%esi 11816f: 0f 84 a3 00 00 00 je 118218 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118175: 85 ff test %edi,%edi 118177: 75 0f jne 118188 return RTEMS_INVALID_NUMBER; 118179: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11817e: 8d 65 f4 lea -0xc(%ebp),%esp 118181: 5b pop %ebx 118182: 5e pop %esi 118183: 5f pop %edi 118184: c9 leave 118185: c3 ret 118186: 66 90 xchg %ax,%ax 118188: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118189: 8d 45 e4 lea -0x1c(%ebp),%eax 11818c: 50 push %eax 11818d: ff 75 08 pushl 0x8(%ebp) 118190: 68 e0 2a 14 00 push $0x142ae0 118195: e8 62 27 00 00 call 11a8fc <_Objects_Get> 11819a: 89 c2 mov %eax,%edx switch ( location ) { 11819c: 83 c4 10 add $0x10,%esp 11819f: 8b 45 e4 mov -0x1c(%ebp),%eax 1181a2: 85 c0 test %eax,%eax 1181a4: 75 56 jne 1181fc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 1181a6: 83 ec 0c sub $0xc,%esp 1181a9: 8d 42 10 lea 0x10(%edx),%eax 1181ac: 50 push %eax 1181ad: 89 55 d4 mov %edx,-0x2c(%ebp) 1181b0: e8 97 43 00 00 call 11c54c <_Watchdog_Remove> _ISR_Disable( level ); 1181b5: 9c pushf 1181b6: fa cli 1181b7: 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 ) { 1181b8: 83 c4 10 add $0x10,%esp 1181bb: 8b 55 d4 mov -0x2c(%ebp),%edx 1181be: 8b 4a 18 mov 0x18(%edx),%ecx 1181c1: 85 c9 test %ecx,%ecx 1181c3: 75 5f jne 118224 /* * 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; 1181c5: 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; 1181cc: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 1181d3: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 1181d6: 8b 4d 08 mov 0x8(%ebp),%ecx 1181d9: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 1181dc: 8b 4d 14 mov 0x14(%ebp),%ecx 1181df: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 1181e2: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 1181e5: 50 push %eax 1181e6: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 1181e7: 83 ec 08 sub $0x8,%esp 1181ea: 52 push %edx 1181eb: 53 push %ebx 1181ec: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1181ef: e8 90 32 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1181f4: 83 c4 10 add $0x10,%esp 1181f7: 31 c0 xor %eax,%eax 1181f9: eb 83 jmp 11817e 1181fb: 90 nop #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1181fc: b8 04 00 00 00 mov $0x4,%eax } 118201: 8d 65 f4 lea -0xc(%ebp),%esp 118204: 5b pop %ebx 118205: 5e pop %esi 118206: 5f pop %edi 118207: c9 leave 118208: c3 ret 118209: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 11820c: b8 0e 00 00 00 mov $0xe,%eax 118211: e9 68 ff ff ff jmp 11817e 118216: 66 90 xchg %ax,%ax if ( !routine ) return RTEMS_INVALID_ADDRESS; 118218: b8 09 00 00 00 mov $0x9,%eax 11821d: e9 5c ff ff ff jmp 11817e 118222: 66 90 xchg %ax,%ax * 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 ); 118224: 50 push %eax 118225: 9d popf _Thread_Enable_dispatch(); 118226: e8 59 32 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11822b: 31 c0 xor %eax,%eax 11822d: e9 4c ff ff ff jmp 11817e =============================================================================== 00118234 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118234: 55 push %ebp 118235: 89 e5 mov %esp,%ebp 118237: 57 push %edi 118238: 56 push %esi 118239: 53 push %ebx 11823a: 83 ec 2c sub $0x2c,%esp 11823d: 8b 7d 0c mov 0xc(%ebp),%edi 118240: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118243: 8b 1d 20 2b 14 00 mov 0x142b20,%ebx if ( !timer_server ) 118249: 85 db test %ebx,%ebx 11824b: 0f 84 d7 00 00 00 je 118328 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118251: 80 3d bc 20 14 00 00 cmpb $0x0,0x1420bc 118258: 0f 84 aa 00 00 00 je 118308 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 11825e: 85 f6 test %esi,%esi 118260: 0f 84 b2 00 00 00 je 118318 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118266: 83 ec 0c sub $0xc,%esp 118269: 57 push %edi 11826a: e8 95 d1 ff ff call 115404 <_TOD_Validate> 11826f: 83 c4 10 add $0x10,%esp 118272: 84 c0 test %al,%al 118274: 75 0e jne 118284 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118276: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11827b: 8d 65 f4 lea -0xc(%ebp),%esp 11827e: 5b pop %ebx 11827f: 5e pop %esi 118280: 5f pop %edi 118281: c9 leave 118282: c3 ret 118283: 90 nop return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118284: 83 ec 0c sub $0xc,%esp 118287: 57 push %edi 118288: e8 eb d0 ff ff call 115378 <_TOD_To_seconds> 11828d: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11828f: 83 c4 10 add $0x10,%esp 118292: 3b 05 48 21 14 00 cmp 0x142148,%eax 118298: 76 dc jbe 118276 11829a: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 11829b: 8d 45 e4 lea -0x1c(%ebp),%eax 11829e: 50 push %eax 11829f: ff 75 08 pushl 0x8(%ebp) 1182a2: 68 e0 2a 14 00 push $0x142ae0 1182a7: e8 50 26 00 00 call 11a8fc <_Objects_Get> 1182ac: 89 c2 mov %eax,%edx switch ( location ) { 1182ae: 83 c4 10 add $0x10,%esp 1182b1: 8b 45 e4 mov -0x1c(%ebp),%eax 1182b4: 85 c0 test %eax,%eax 1182b6: 75 7c jne 118334 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 1182b8: 83 ec 0c sub $0xc,%esp 1182bb: 8d 42 10 lea 0x10(%edx),%eax 1182be: 50 push %eax 1182bf: 89 55 d4 mov %edx,-0x2c(%ebp) 1182c2: e8 85 42 00 00 call 11c54c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 1182c7: 8b 55 d4 mov -0x2c(%ebp),%edx 1182ca: 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; 1182d1: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 1182d8: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 1182db: 8b 45 08 mov 0x8(%ebp),%eax 1182de: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 1182e1: 8b 45 14 mov 0x14(%ebp),%eax 1182e4: 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(); 1182e7: 2b 3d 48 21 14 00 sub 0x142148,%edi 1182ed: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 1182f0: 58 pop %eax 1182f1: 59 pop %ecx 1182f2: 52 push %edx 1182f3: 53 push %ebx 1182f4: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1182f7: e8 88 31 00 00 call 11b484 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1182fc: 83 c4 10 add $0x10,%esp 1182ff: 31 c0 xor %eax,%eax 118301: e9 75 ff ff ff jmp 11827b 118306: 66 90 xchg %ax,%ax if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118308: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11830d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118310: 5b pop %ebx <== NOT EXECUTED 118311: 5e pop %esi <== NOT EXECUTED 118312: 5f pop %edi <== NOT EXECUTED 118313: c9 leave <== NOT EXECUTED 118314: c3 ret <== NOT EXECUTED 118315: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118318: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11831d: 8d 65 f4 lea -0xc(%ebp),%esp 118320: 5b pop %ebx 118321: 5e pop %esi 118322: 5f pop %edi 118323: c9 leave 118324: c3 ret 118325: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118328: b8 0e 00 00 00 mov $0xe,%eax 11832d: e9 49 ff ff ff jmp 11827b 118332: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118334: b8 04 00 00 00 mov $0x4,%eax 118339: e9 3d ff ff ff jmp 11827b =============================================================================== 0010bc70 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10bc70: 55 push %ebp 10bc71: 89 e5 mov %esp,%ebp 10bc73: 57 push %edi 10bc74: 56 push %esi 10bc75: 53 push %ebx 10bc76: 83 ec 1c sub $0x1c,%esp 10bc79: 89 c3 mov %eax,%ebx 10bc7b: 89 d6 mov %edx,%esi 10bc7d: 89 cf mov %ecx,%edi int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 10bc7f: a9 00 00 00 20 test $0x20000000,%eax 10bc84: 74 2b je 10bcb1 if (rtems_panic_in_progress++) 10bc86: 8b 15 20 d5 12 00 mov 0x12d520,%edx 10bc8c: 8d 42 01 lea 0x1(%edx),%eax 10bc8f: a3 20 d5 12 00 mov %eax,0x12d520 10bc94: 85 d2 test %edx,%edx 10bc96: 74 10 je 10bca8 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bc98: a1 8c d6 12 00 mov 0x12d68c,%eax <== NOT EXECUTED 10bc9d: 40 inc %eax <== NOT EXECUTED 10bc9e: a3 8c d6 12 00 mov %eax,0x12d68c <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 10bca3: a1 20 d5 12 00 mov 0x12d520,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10bca8: 83 f8 02 cmp $0x2,%eax 10bcab: 0f 8f af 00 00 00 jg 10bd60 <== NEVER TAKEN return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10bcb1: 83 ec 0c sub $0xc,%esp 10bcb4: a1 c0 b2 12 00 mov 0x12b2c0,%eax 10bcb9: ff 70 08 pushl 0x8(%eax) 10bcbc: e8 73 c6 00 00 call 118334 status = error_flag & ~RTEMS_ERROR_MASK; 10bcc1: 89 d8 mov %ebx,%eax 10bcc3: 25 ff ff ff 8f and $0x8fffffff,%eax 10bcc8: 89 45 e4 mov %eax,-0x1c(%ebp) if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10bccb: 83 c4 10 add $0x10,%esp 10bcce: 81 e3 00 00 00 40 and $0x40000000,%ebx 10bcd4: 0f 85 be 00 00 00 jne 10bd98 rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; 10bcda: 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); 10bcdc: 50 push %eax 10bcdd: 57 push %edi 10bcde: 56 push %esi 10bcdf: a1 c0 b2 12 00 mov 0x12b2c0,%eax 10bce4: ff 70 0c pushl 0xc(%eax) 10bce7: e8 08 2b 01 00 call 11e7f4 10bcec: 89 c6 mov %eax,%esi if (status) 10bcee: 83 c4 10 add $0x10,%esp 10bcf1: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bcf4: 85 c9 test %ecx,%ecx 10bcf6: 75 74 jne 10bd6c chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 10bcf8: 83 fb 00 cmp $0x0,%ebx 10bcfb: 74 30 je 10bd2d if ((local_errno > 0) && *strerror(local_errno)) 10bcfd: 7e 15 jle 10bd14 10bcff: 83 ec 0c sub $0xc,%esp 10bd02: 53 push %ebx 10bd03: e8 74 d2 00 00 call 118f7c 10bd08: 83 c4 10 add $0x10,%esp 10bd0b: 80 38 00 cmpb $0x0,(%eax) 10bd0e: 0f 85 90 00 00 00 jne 10bda4 <== ALWAYS TAKEN chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10bd14: 52 push %edx 10bd15: 53 push %ebx 10bd16: 68 a9 6c 12 00 push $0x126ca9 10bd1b: a1 c0 b2 12 00 mov 0x12b2c0,%eax 10bd20: ff 70 0c pushl 0xc(%eax) 10bd23: e8 00 ca 00 00 call 118728 10bd28: 01 c6 add %eax,%esi 10bd2a: 83 c4 10 add $0x10,%esp } chars_written += fprintf(stderr, "\n"); 10bd2d: 83 ec 08 sub $0x8,%esp 10bd30: 68 ed 67 12 00 push $0x1267ed 10bd35: a1 c0 b2 12 00 mov 0x12b2c0,%eax 10bd3a: ff 70 0c pushl 0xc(%eax) 10bd3d: e8 e6 c9 00 00 call 118728 10bd42: 8d 34 30 lea (%eax,%esi,1),%esi (void) fflush(stderr); 10bd45: 58 pop %eax 10bd46: a1 c0 b2 12 00 mov 0x12b2c0,%eax 10bd4b: ff 70 0c pushl 0xc(%eax) 10bd4e: e8 e1 c5 00 00 call 118334 return chars_written; 10bd53: 83 c4 10 add $0x10,%esp } 10bd56: 89 f0 mov %esi,%eax 10bd58: 8d 65 f4 lea -0xc(%ebp),%esp 10bd5b: 5b pop %ebx 10bd5c: 5e pop %esi 10bd5d: 5f pop %edi 10bd5e: c9 leave 10bd5f: 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; 10bd60: 31 f6 xor %esi,%esi chars_written += fprintf(stderr, "\n"); (void) fflush(stderr); return chars_written; } 10bd62: 89 f0 mov %esi,%eax <== NOT EXECUTED 10bd64: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10bd67: 5b pop %ebx <== NOT EXECUTED 10bd68: 5e pop %esi <== NOT EXECUTED 10bd69: 5f pop %edi <== NOT EXECUTED 10bd6a: c9 leave <== NOT EXECUTED 10bd6b: c3 ret <== NOT EXECUTED chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10bd6c: 83 ec 0c sub $0xc,%esp 10bd6f: ff 75 e4 pushl -0x1c(%ebp) 10bd72: e8 e1 fe ff ff call 10bc58 10bd77: 83 c4 0c add $0xc,%esp 10bd7a: 50 push %eax 10bd7b: 68 8e 6c 12 00 push $0x126c8e 10bd80: a1 c0 b2 12 00 mov 0x12b2c0,%eax 10bd85: ff 70 0c pushl 0xc(%eax) 10bd88: e8 9b c9 00 00 call 118728 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 10bd8d: 01 c6 add %eax,%esi 10bd8f: 83 c4 10 add $0x10,%esp 10bd92: e9 61 ff ff ff jmp 10bcf8 10bd97: 90 nop (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; 10bd98: e8 ff c1 00 00 call 117f9c <__errno> 10bd9d: 8b 18 mov (%eax),%ebx 10bd9f: e9 38 ff ff ff jmp 10bcdc 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)); 10bda4: 83 ec 0c sub $0xc,%esp 10bda7: 53 push %ebx 10bda8: e8 cf d1 00 00 call 118f7c 10bdad: 83 c4 0c add $0xc,%esp 10bdb0: 50 push %eax 10bdb1: 68 9c 6c 12 00 push $0x126c9c 10bdb6: e9 60 ff ff ff jmp 10bd1b =============================================================================== 00107c34 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 107c34: 55 push %ebp 107c35: 89 e5 mov %esp,%ebp 107c37: 57 push %edi 107c38: 56 push %esi 107c39: 53 push %ebx 107c3a: 83 ec 1c sub $0x1c,%esp 107c3d: 89 c6 mov %eax,%esi 107c3f: 89 55 e0 mov %edx,-0x20(%ebp) int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 107c42: 31 ff xor %edi,%edi static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; unsigned int limit = INT_MAX; 107c44: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 107c4b: 31 db xor %ebx,%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 107c4d: 8b 46 04 mov 0x4(%esi),%eax 107c50: 48 dec %eax 107c51: 89 46 04 mov %eax,0x4(%esi) 107c54: 85 c0 test %eax,%eax 107c56: 78 52 js 107caa <== NEVER TAKEN 107c58: 8b 06 mov (%esi),%eax 107c5a: 0f b6 08 movzbl (%eax),%ecx 107c5d: 40 inc %eax 107c5e: 89 06 mov %eax,(%esi) if (c == ':') 107c60: 83 f9 3a cmp $0x3a,%ecx 107c63: 74 5f je 107cc4 break; if (sign == 0) { 107c65: 85 ff test %edi,%edi 107c67: 75 0e jne 107c77 if (c == '-') { 107c69: 83 f9 2d cmp $0x2d,%ecx 107c6c: 0f 84 8a 00 00 00 je 107cfc sign = -1; limit++; continue; } sign = 1; 107c72: bf 01 00 00 00 mov $0x1,%edi } if (!isdigit(c)) 107c77: a1 74 6e 12 00 mov 0x126e74,%eax 107c7c: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 107c81: 74 6d je 107cf0 return 0; d = c - '0'; if ((i > (limit / 10)) 107c83: b8 cd cc cc cc mov $0xcccccccd,%eax 107c88: f7 65 e4 mull -0x1c(%ebp) 107c8b: c1 ea 03 shr $0x3,%edx 107c8e: 39 d3 cmp %edx,%ebx 107c90: 77 5e ja 107cf0 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 107c92: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 107c95: 39 d3 cmp %edx,%ebx 107c97: 74 47 je 107ce0 return 0; i = i * 10 + d; 107c99: 8d 04 9b lea (%ebx,%ebx,4),%eax 107c9c: 8d 1c 41 lea (%ecx,%eax,2),%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 107c9f: 8b 46 04 mov 0x4(%esi),%eax 107ca2: 48 dec %eax 107ca3: 89 46 04 mov %eax,0x4(%esi) 107ca6: 85 c0 test %eax,%eax 107ca8: 79 ae jns 107c58 <== ALWAYS TAKEN 107caa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107cad: 56 push %esi <== NOT EXECUTED 107cae: ff 35 80 6e 12 00 pushl 0x126e80 <== NOT EXECUTED 107cb4: e8 57 d3 00 00 call 115010 <__srget_r> <== NOT EXECUTED 107cb9: 89 c1 mov %eax,%ecx <== NOT EXECUTED 107cbb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (c == ':') 107cbe: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED 107cc1: 75 a2 jne 107c65 <== NOT EXECUTED 107cc3: 90 nop <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 107cc4: 85 ff test %edi,%edi 107cc6: 74 28 je 107cf0 <== NEVER TAKEN return 0; *val = i * sign; 107cc8: 0f af df imul %edi,%ebx 107ccb: 8b 45 e0 mov -0x20(%ebp),%eax 107cce: 89 18 mov %ebx,(%eax) return 1; 107cd0: b8 01 00 00 00 mov $0x1,%eax } 107cd5: 8d 65 f4 lea -0xc(%ebp),%esp 107cd8: 5b pop %ebx 107cd9: 5e pop %esi 107cda: 5f pop %edi 107cdb: c9 leave 107cdc: c3 ret 107cdd: 8d 76 00 lea 0x0(%esi),%esi } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 107ce0: 8d 04 9b lea (%ebx,%ebx,4),%eax 107ce3: d1 e0 shl %eax 107ce5: 8b 55 e4 mov -0x1c(%ebp),%edx 107ce8: 29 c2 sub %eax,%edx 107cea: 39 d1 cmp %edx,%ecx 107cec: 76 ab jbe 107c99 <== NEVER TAKEN 107cee: 66 90 xchg %ax,%ax return 0; i = i * 10 + d; } if (sign == 0) return 0; 107cf0: 31 c0 xor %eax,%eax *val = i * sign; return 1; } 107cf2: 8d 65 f4 lea -0xc(%ebp),%esp 107cf5: 5b pop %ebx 107cf6: 5e pop %esi 107cf7: 5f pop %edi 107cf8: c9 leave 107cf9: c3 ret 107cfa: 66 90 xchg %ax,%ax if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 107cfc: ff 45 e4 incl -0x1c(%ebp) c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 107cff: bf ff ff ff ff mov $0xffffffff,%edi limit++; continue; 107d04: e9 44 ff ff ff jmp 107c4d =============================================================================== 00107d0c : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 107d0c: 55 push %ebp 107d0d: 89 e5 mov %esp,%ebp 107d0f: 57 push %edi 107d10: 56 push %esi 107d11: 53 push %ebx 107d12: 83 ec 0c sub $0xc,%esp 107d15: 89 c3 mov %eax,%ebx 107d17: 89 ce mov %ecx,%esi 107d19: 8b 7d 08 mov 0x8(%ebp),%edi int c; *name = *bufp; 107d1c: 8b 01 mov (%ecx),%eax 107d1e: 89 02 mov %eax,(%edx) 107d20: eb 26 jmp 107d48 107d22: 66 90 xchg %ax,%ax for (;;) { c = getc(fp); 107d24: 8b 13 mov (%ebx),%edx 107d26: 0f b6 02 movzbl (%edx),%eax 107d29: 42 inc %edx 107d2a: 89 13 mov %edx,(%ebx) if (c == ':') { 107d2c: 83 f8 3a cmp $0x3a,%eax 107d2f: 74 3b je 107d6c if (nlFlag) return 0; break; } if (c == '\n') { 107d31: 83 f8 0a cmp $0xa,%eax 107d34: 74 56 je 107d8c if (!nlFlag) return 0; break; } if (c == EOF) 107d36: 83 f8 ff cmp $0xffffffff,%eax 107d39: 74 59 je 107d94 return 0; if (*nleft < 2) 107d3b: 83 3f 01 cmpl $0x1,(%edi) 107d3e: 76 54 jbe 107d94 return 0; **bufp = c; 107d40: 8b 16 mov (%esi),%edx 107d42: 88 02 mov %al,(%edx) ++(*bufp); 107d44: ff 06 incl (%esi) --(*nleft); 107d46: ff 0f decl (%edi) { int c; *name = *bufp; for (;;) { c = getc(fp); 107d48: 8b 43 04 mov 0x4(%ebx),%eax 107d4b: 48 dec %eax 107d4c: 89 43 04 mov %eax,0x4(%ebx) 107d4f: 85 c0 test %eax,%eax 107d51: 79 d1 jns 107d24 107d53: 83 ec 08 sub $0x8,%esp 107d56: 53 push %ebx 107d57: ff 35 80 6e 12 00 pushl 0x126e80 107d5d: e8 ae d2 00 00 call 115010 <__srget_r> 107d62: 83 c4 10 add $0x10,%esp if (c == ':') { 107d65: 83 f8 3a cmp $0x3a,%eax 107d68: 75 c7 jne 107d31 <== ALWAYS TAKEN 107d6a: 66 90 xchg %ax,%ax if (nlFlag) 107d6c: 8b 55 0c mov 0xc(%ebp),%edx 107d6f: 85 d2 test %edx,%edx 107d71: 75 21 jne 107d94 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 107d73: 8b 06 mov (%esi),%eax 107d75: c6 00 00 movb $0x0,(%eax) ++(*bufp); 107d78: ff 06 incl (%esi) --(*nleft); 107d7a: ff 0f decl (%edi) return 1; 107d7c: b8 01 00 00 00 mov $0x1,%eax } 107d81: 8d 65 f4 lea -0xc(%ebp),%esp 107d84: 5b pop %ebx 107d85: 5e pop %esi 107d86: 5f pop %edi 107d87: c9 leave 107d88: c3 ret 107d89: 8d 76 00 lea 0x0(%esi),%esi if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 107d8c: 8b 45 0c mov 0xc(%ebp),%eax 107d8f: 85 c0 test %eax,%eax 107d91: 75 e0 jne 107d73 107d93: 90 nop break; } if (c == EOF) return 0; if (*nleft < 2) return 0; 107d94: 31 c0 xor %eax,%eax } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 107d96: 8d 65 f4 lea -0xc(%ebp),%esp 107d99: 5b pop %ebx 107d9a: 5e pop %esi 107d9b: 5f pop %edi 107d9c: c9 leave 107d9d: c3 ret =============================================================================== 00107da0 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 107da0: 55 push %ebp 107da1: 89 e5 mov %esp,%ebp 107da3: 57 push %edi 107da4: 56 push %esi 107da5: 53 push %ebx 107da6: 83 ec 34 sub $0x34,%esp 107da9: 89 c6 mov %eax,%esi 107dab: 89 d3 mov %edx,%ebx 107dad: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 107db0: 8d 7d d4 lea -0x2c(%ebp),%edi 107db3: 6a 00 push $0x0 107db5: 8d 45 08 lea 0x8(%ebp),%eax 107db8: 50 push %eax 107db9: 89 f9 mov %edi,%ecx 107dbb: 89 f0 mov %esi,%eax 107dbd: e8 4a ff ff ff call 107d0c 107dc2: 83 c4 10 add $0x10,%esp 107dc5: 85 c0 test %eax,%eax 107dc7: 75 0b jne 107dd4 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; 107dc9: 31 c0 xor %eax,%eax grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 107dcb: 8d 65 f4 lea -0xc(%ebp),%esp 107dce: 5b pop %ebx 107dcf: 5e pop %esi 107dd0: 5f pop %edi 107dd1: c9 leave 107dd2: c3 ret 107dd3: 90 nop int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 107dd4: 83 ec 08 sub $0x8,%esp 107dd7: 8d 53 04 lea 0x4(%ebx),%edx 107dda: 6a 00 push $0x0 107ddc: 8d 45 08 lea 0x8(%ebp),%eax 107ddf: 50 push %eax 107de0: 89 f9 mov %edi,%ecx 107de2: 89 f0 mov %esi,%eax 107de4: e8 23 ff ff ff call 107d0c 107de9: 83 c4 10 add $0x10,%esp 107dec: 85 c0 test %eax,%eax 107dee: 74 d9 je 107dc9 <== NEVER TAKEN || !scanInt(fp, &grgid) 107df0: 8d 55 e4 lea -0x1c(%ebp),%edx 107df3: 89 f0 mov %esi,%eax 107df5: e8 3a fe ff ff call 107c34 107dfa: 85 c0 test %eax,%eax 107dfc: 74 cb je 107dc9 <== NEVER TAKEN || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 107dfe: 83 ec 08 sub $0x8,%esp 107e01: 8d 55 e0 lea -0x20(%ebp),%edx 107e04: 6a 01 push $0x1 107e06: 8d 45 08 lea 0x8(%ebp),%eax 107e09: 50 push %eax 107e0a: 89 f9 mov %edi,%ecx 107e0c: 89 f0 mov %esi,%eax 107e0e: e8 f9 fe ff ff call 107d0c 107e13: 83 c4 10 add $0x10,%esp 107e16: 85 c0 test %eax,%eax 107e18: 74 af je 107dc9 <== NEVER TAKEN return 0; grp->gr_gid = grgid; 107e1a: 8b 45 e4 mov -0x1c(%ebp),%eax 107e1d: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107e21: 8b 7d e0 mov -0x20(%ebp),%edi 107e24: 8a 07 mov (%edi),%al 107e26: 84 c0 test %al,%al 107e28: 74 7d je 107ea7 <== NEVER TAKEN 107e2a: 89 fa mov %edi,%edx 107e2c: b9 01 00 00 00 mov $0x1,%ecx 107e31: eb 08 jmp 107e3b 107e33: 90 nop 107e34: 42 inc %edx 107e35: 8a 02 mov (%edx),%al 107e37: 84 c0 test %al,%al 107e39: 74 09 je 107e44 if(*cp == ',') 107e3b: 3c 2c cmp $0x2c,%al 107e3d: 75 f5 jne 107e34 memcount++; 107e3f: 41 inc %ecx 107e40: eb f2 jmp 107e34 107e42: 66 90 xchg %ax,%ax grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107e44: 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)) 107e4b: 39 45 08 cmp %eax,0x8(%ebp) 107e4e: 0f 82 75 ff ff ff jb 107dc9 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 107e54: 8b 75 d4 mov -0x2c(%ebp),%esi 107e57: 83 c6 0f add $0xf,%esi 107e5a: 83 e6 f0 and $0xfffffff0,%esi 107e5d: 89 73 0c mov %esi,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 107e60: 89 3e mov %edi,(%esi) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107e62: 8b 45 e0 mov -0x20(%ebp),%eax 107e65: 8a 10 mov (%eax),%dl 107e67: 84 d2 test %dl,%dl 107e69: 74 43 je 107eae <== NEVER TAKEN } /* * Extract a single group record from the database */ static int scangr( 107e6b: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107e6c: b9 01 00 00 00 mov $0x1,%ecx 107e71: eb 08 jmp 107e7b 107e73: 90 nop 107e74: 8a 10 mov (%eax),%dl 107e76: 40 inc %eax 107e77: 84 d2 test %dl,%dl 107e79: 74 15 je 107e90 if(*cp == ',') { 107e7b: 80 fa 2c cmp $0x2c,%dl 107e7e: 75 f4 jne 107e74 *cp = '\0'; 107e80: c6 40 ff 00 movb $0x0,-0x1(%eax) grp->gr_mem[memcount++] = cp + 1; 107e84: 8b 53 0c mov 0xc(%ebx),%edx 107e87: 89 04 8a mov %eax,(%edx,%ecx,4) 107e8a: 41 inc %ecx 107e8b: eb e7 jmp 107e74 107e8d: 8d 76 00 lea 0x0(%esi),%esi /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107e90: 8b 73 0c mov 0xc(%ebx),%esi 107e93: c1 e1 02 shl $0x2,%ecx if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 107e96: c7 04 0e 00 00 00 00 movl $0x0,(%esi,%ecx,1) return 1; 107e9d: b8 01 00 00 00 mov $0x1,%eax 107ea2: e9 24 ff ff ff jmp 107dcb grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107ea7: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED 107eac: eb 9d jmp 107e4b <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107eae: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED 107eb3: eb e1 jmp 107e96 <== NOT EXECUTED =============================================================================== 00107eb8 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 107eb8: 55 push %ebp 107eb9: 89 e5 mov %esp,%ebp 107ebb: 57 push %edi 107ebc: 56 push %esi 107ebd: 53 push %ebx 107ebe: 83 ec 34 sub $0x34,%esp 107ec1: 89 c6 mov %eax,%esi 107ec3: 89 d3 mov %edx,%ebx 107ec5: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107ec8: 8d 7d d4 lea -0x2c(%ebp),%edi 107ecb: 6a 00 push $0x0 107ecd: 8d 45 08 lea 0x8(%ebp),%eax 107ed0: 50 push %eax 107ed1: 89 f9 mov %edi,%ecx 107ed3: 89 f0 mov %esi,%eax 107ed5: e8 32 fe ff ff call 107d0c 107eda: 83 c4 10 add $0x10,%esp 107edd: 85 c0 test %eax,%eax 107edf: 75 0b jne 107eec || !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; 107ee1: 31 c0 xor %eax,%eax pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 107ee3: 8d 65 f4 lea -0xc(%ebp),%esp 107ee6: 5b pop %ebx 107ee7: 5e pop %esi 107ee8: 5f pop %edi 107ee9: c9 leave 107eea: c3 ret 107eeb: 90 nop ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 107eec: 83 ec 08 sub $0x8,%esp 107eef: 8d 53 04 lea 0x4(%ebx),%edx 107ef2: 6a 00 push $0x0 107ef4: 8d 45 08 lea 0x8(%ebp),%eax 107ef7: 50 push %eax 107ef8: 89 f9 mov %edi,%ecx 107efa: 89 f0 mov %esi,%eax 107efc: e8 0b fe ff ff call 107d0c 107f01: 83 c4 10 add $0x10,%esp 107f04: 85 c0 test %eax,%eax 107f06: 74 d9 je 107ee1 <== NEVER TAKEN || !scanInt(fp, &pwuid) 107f08: 8d 55 e4 lea -0x1c(%ebp),%edx 107f0b: 89 f0 mov %esi,%eax 107f0d: e8 22 fd ff ff call 107c34 107f12: 85 c0 test %eax,%eax 107f14: 74 cb je 107ee1 || !scanInt(fp, &pwgid) 107f16: 8d 55 e0 lea -0x20(%ebp),%edx 107f19: 89 f0 mov %esi,%eax 107f1b: e8 14 fd ff ff call 107c34 107f20: 85 c0 test %eax,%eax 107f22: 74 bd je 107ee1 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 107f24: 83 ec 08 sub $0x8,%esp 107f27: 8d 53 0c lea 0xc(%ebx),%edx 107f2a: 6a 00 push $0x0 107f2c: 8d 45 08 lea 0x8(%ebp),%eax 107f2f: 50 push %eax 107f30: 89 f9 mov %edi,%ecx 107f32: 89 f0 mov %esi,%eax 107f34: e8 d3 fd ff ff call 107d0c 107f39: 83 c4 10 add $0x10,%esp 107f3c: 85 c0 test %eax,%eax 107f3e: 74 a1 je 107ee1 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 107f40: 83 ec 08 sub $0x8,%esp 107f43: 8d 53 10 lea 0x10(%ebx),%edx 107f46: 6a 00 push $0x0 107f48: 8d 45 08 lea 0x8(%ebp),%eax 107f4b: 50 push %eax 107f4c: 89 f9 mov %edi,%ecx 107f4e: 89 f0 mov %esi,%eax 107f50: e8 b7 fd ff ff call 107d0c 107f55: 83 c4 10 add $0x10,%esp 107f58: 85 c0 test %eax,%eax 107f5a: 74 85 je 107ee1 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 107f5c: 83 ec 08 sub $0x8,%esp 107f5f: 8d 53 14 lea 0x14(%ebx),%edx 107f62: 6a 00 push $0x0 107f64: 8d 45 08 lea 0x8(%ebp),%eax 107f67: 50 push %eax 107f68: 89 f9 mov %edi,%ecx 107f6a: 89 f0 mov %esi,%eax 107f6c: e8 9b fd ff ff call 107d0c 107f71: 83 c4 10 add $0x10,%esp 107f74: 85 c0 test %eax,%eax 107f76: 0f 84 65 ff ff ff je 107ee1 <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 107f7c: 83 ec 08 sub $0x8,%esp 107f7f: 8d 53 18 lea 0x18(%ebx),%edx 107f82: 6a 01 push $0x1 107f84: 8d 45 08 lea 0x8(%ebp),%eax 107f87: 50 push %eax 107f88: 89 f9 mov %edi,%ecx 107f8a: 89 f0 mov %esi,%eax 107f8c: e8 7b fd ff ff call 107d0c 107f91: 83 c4 10 add $0x10,%esp 107f94: 85 c0 test %eax,%eax 107f96: 0f 84 45 ff ff ff je 107ee1 return 0; pwd->pw_uid = pwuid; 107f9c: 8b 45 e4 mov -0x1c(%ebp),%eax 107f9f: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 107fa3: 8b 45 e0 mov -0x20(%ebp),%eax 107fa6: 66 89 43 0a mov %ax,0xa(%ebx) return 1; 107faa: b8 01 00 00 00 mov $0x1,%eax 107faf: e9 2f ff ff ff jmp 107ee3 =============================================================================== 0010b3dc : #include int sched_get_priority_max( int policy ) { 10b3dc: 55 push %ebp 10b3dd: 89 e5 mov %esp,%ebp 10b3df: 83 ec 08 sub $0x8,%esp 10b3e2: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10b3e5: 85 c0 test %eax,%eax 10b3e7: 78 0a js 10b3f3 10b3e9: 83 f8 02 cmp $0x2,%eax 10b3ec: 7e 1a jle 10b408 10b3ee: 83 f8 04 cmp $0x4,%eax 10b3f1: 74 15 je 10b408 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10b3f3: e8 dc 86 00 00 call 113ad4 <__errno> 10b3f8: c7 00 16 00 00 00 movl $0x16,(%eax) 10b3fe: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10b403: c9 leave 10b404: c3 ret 10b405: 8d 76 00 lea 0x0(%esi),%esi default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10b408: 0f b6 05 dc 47 12 00 movzbl 0x1247dc,%eax 10b40f: 48 dec %eax } 10b410: c9 leave 10b411: c3 ret =============================================================================== 0010b414 : #include int sched_get_priority_min( int policy ) { 10b414: 55 push %ebp 10b415: 89 e5 mov %esp,%ebp 10b417: 83 ec 08 sub $0x8,%esp 10b41a: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10b41d: 85 c0 test %eax,%eax 10b41f: 78 0a js 10b42b 10b421: 83 f8 02 cmp $0x2,%eax 10b424: 7e 1a jle 10b440 <== ALWAYS TAKEN 10b426: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10b429: 74 15 je 10b440 <== NOT EXECUTED case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10b42b: e8 a4 86 00 00 call 113ad4 <__errno> 10b430: c7 00 16 00 00 00 movl $0x16,(%eax) 10b436: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10b43b: c9 leave 10b43c: c3 ret 10b43d: 8d 76 00 lea 0x0(%esi),%esi default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; 10b440: b8 01 00 00 00 mov $0x1,%eax } 10b445: c9 leave 10b446: c3 ret =============================================================================== 0010b448 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10b448: 55 push %ebp 10b449: 89 e5 mov %esp,%ebp 10b44b: 56 push %esi 10b44c: 53 push %ebx 10b44d: 8b 75 08 mov 0x8(%ebp),%esi 10b450: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10b453: 85 f6 test %esi,%esi 10b455: 75 21 jne 10b478 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 10b457: 85 db test %ebx,%ebx 10b459: 74 38 je 10b493 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10b45b: 83 ec 08 sub $0x8,%esp 10b45e: 53 push %ebx 10b45f: ff 35 20 8a 12 00 pushl 0x128a20 10b465: e8 66 33 00 00 call 10e7d0 <_Timespec_From_ticks> return 0; 10b46a: 83 c4 10 add $0x10,%esp 10b46d: 31 c0 xor %eax,%eax } 10b46f: 8d 65 f8 lea -0x8(%ebp),%esp 10b472: 5b pop %ebx 10b473: 5e pop %esi 10b474: c9 leave 10b475: c3 ret 10b476: 66 90 xchg %ax,%ax { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10b478: e8 d3 c8 ff ff call 107d50 10b47d: 39 f0 cmp %esi,%eax 10b47f: 74 d6 je 10b457 rtems_set_errno_and_return_minus_one( ESRCH ); 10b481: e8 4e 86 00 00 call 113ad4 <__errno> 10b486: c7 00 03 00 00 00 movl $0x3,(%eax) 10b48c: b8 ff ff ff ff mov $0xffffffff,%eax 10b491: eb dc jmp 10b46f if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10b493: e8 3c 86 00 00 call 113ad4 <__errno> 10b498: c7 00 16 00 00 00 movl $0x16,(%eax) 10b49e: b8 ff ff ff ff mov $0xffffffff,%eax 10b4a3: eb ca jmp 10b46f =============================================================================== 0010db9c : */ int sem_close( sem_t *sem ) { 10db9c: 55 push %ebp 10db9d: 89 e5 mov %esp,%ebp 10db9f: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10dba2: 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 ); 10dba5: 50 push %eax 10dba6: 8b 45 08 mov 0x8(%ebp),%eax 10dba9: ff 30 pushl (%eax) 10dbab: 68 00 ca 12 00 push $0x12ca00 10dbb0: e8 d7 1f 00 00 call 10fb8c <_Objects_Get> switch ( location ) { 10dbb5: 83 c4 10 add $0x10,%esp 10dbb8: 8b 55 f4 mov -0xc(%ebp),%edx 10dbbb: 85 d2 test %edx,%edx 10dbbd: 74 15 je 10dbd4 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10dbbf: e8 48 95 00 00 call 11710c <__errno> 10dbc4: c7 00 16 00 00 00 movl $0x16,(%eax) 10dbca: b8 ff ff ff ff mov $0xffffffff,%eax } 10dbcf: c9 leave 10dbd0: c3 ret 10dbd1: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 10dbd4: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10dbd7: 83 ec 0c sub $0xc,%esp 10dbda: 50 push %eax 10dbdb: e8 04 64 00 00 call 113fe4 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10dbe0: e8 37 2b 00 00 call 11071c <_Thread_Enable_dispatch> return 0; 10dbe5: 83 c4 10 add $0x10,%esp 10dbe8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10dbea: c9 leave 10dbeb: c3 ret =============================================================================== 0010dbec : */ int sem_destroy( sem_t *sem ) { 10dbec: 55 push %ebp 10dbed: 89 e5 mov %esp,%ebp 10dbef: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10dbf2: 8d 45 f4 lea -0xc(%ebp),%eax 10dbf5: 50 push %eax 10dbf6: 8b 45 08 mov 0x8(%ebp),%eax 10dbf9: ff 30 pushl (%eax) 10dbfb: 68 00 ca 12 00 push $0x12ca00 10dc00: e8 87 1f 00 00 call 10fb8c <_Objects_Get> switch ( location ) { 10dc05: 83 c4 10 add $0x10,%esp 10dc08: 8b 55 f4 mov -0xc(%ebp),%edx 10dc0b: 85 d2 test %edx,%edx 10dc0d: 74 15 je 10dc24 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10dc0f: e8 f8 94 00 00 call 11710c <__errno> 10dc14: c7 00 16 00 00 00 movl $0x16,(%eax) 10dc1a: b8 ff ff ff ff mov $0xffffffff,%eax } 10dc1f: c9 leave 10dc20: c3 ret 10dc21: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10dc24: 80 78 14 00 cmpb $0x0,0x14(%eax) 10dc28: 75 16 jne 10dc40 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10dc2a: 83 ec 0c sub $0xc,%esp 10dc2d: 50 push %eax 10dc2e: e8 b1 63 00 00 call 113fe4 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10dc33: e8 e4 2a 00 00 call 11071c <_Thread_Enable_dispatch> return 0; 10dc38: 83 c4 10 add $0x10,%esp 10dc3b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10dc3d: c9 leave 10dc3e: c3 ret 10dc3f: 90 nop /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { _Thread_Enable_dispatch(); 10dc40: e8 d7 2a 00 00 call 11071c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10dc45: e8 c2 94 00 00 call 11710c <__errno> 10dc4a: c7 00 16 00 00 00 movl $0x16,(%eax) 10dc50: b8 ff ff ff ff mov $0xffffffff,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10dc55: c9 leave 10dc56: c3 ret =============================================================================== 0010dc58 : int sem_getvalue( sem_t *sem, int *sval ) { 10dc58: 55 push %ebp 10dc59: 89 e5 mov %esp,%ebp 10dc5b: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10dc5e: 8d 45 f4 lea -0xc(%ebp),%eax 10dc61: 50 push %eax 10dc62: 8b 45 08 mov 0x8(%ebp),%eax 10dc65: ff 30 pushl (%eax) 10dc67: 68 00 ca 12 00 push $0x12ca00 10dc6c: e8 1b 1f 00 00 call 10fb8c <_Objects_Get> switch ( location ) { 10dc71: 83 c4 10 add $0x10,%esp 10dc74: 8b 55 f4 mov -0xc(%ebp),%edx 10dc77: 85 d2 test %edx,%edx 10dc79: 74 15 je 10dc90 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10dc7b: e8 8c 94 00 00 call 11710c <__errno> 10dc80: c7 00 16 00 00 00 movl $0x16,(%eax) 10dc86: b8 ff ff ff ff mov $0xffffffff,%eax } 10dc8b: c9 leave 10dc8c: c3 ret 10dc8d: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 10dc90: 8b 50 64 mov 0x64(%eax),%edx 10dc93: 8b 45 0c mov 0xc(%ebp),%eax 10dc96: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10dc98: e8 7f 2a 00 00 call 11071c <_Thread_Enable_dispatch> return 0; 10dc9d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10dc9f: c9 leave 10dca0: c3 ret =============================================================================== 0010dcec : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10dcec: 55 push %ebp 10dced: 89 e5 mov %esp,%ebp 10dcef: 57 push %edi 10dcf0: 56 push %esi 10dcf1: 53 push %ebx 10dcf2: 83 ec 2c sub $0x2c,%esp 10dcf5: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10dcf8: a1 ec c6 12 00 mov 0x12c6ec,%eax 10dcfd: 40 inc %eax 10dcfe: a3 ec c6 12 00 mov %eax,0x12c6ec POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10dd03: 8b 7d 0c mov 0xc(%ebp),%edi 10dd06: 81 e7 00 02 00 00 and $0x200,%edi 10dd0c: 0f 85 86 00 00 00 jne 10dd98 /* unsigned int value */ ) { va_list arg; mode_t mode; unsigned int value = 0; 10dd12: 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 ); 10dd19: 83 ec 08 sub $0x8,%esp 10dd1c: 8d 45 e4 lea -0x1c(%ebp),%eax 10dd1f: 50 push %eax 10dd20: 56 push %esi 10dd21: e8 0e 63 00 00 call 114034 <_POSIX_Semaphore_Name_to_id> 10dd26: 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 ) { 10dd28: 83 c4 10 add $0x10,%esp 10dd2b: 85 c0 test %eax,%eax 10dd2d: 74 25 je 10dd54 /* * 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) ) ) { 10dd2f: 83 f8 02 cmp $0x2,%eax 10dd32: 75 04 jne 10dd38 <== NEVER TAKEN 10dd34: 85 ff test %edi,%edi 10dd36: 75 6c jne 10dda4 _Thread_Enable_dispatch(); 10dd38: e8 df 29 00 00 call 11071c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10dd3d: e8 ca 93 00 00 call 11710c <__errno> 10dd42: 89 18 mov %ebx,(%eax) 10dd44: b8 ff ff ff ff mov $0xffffffff,%eax id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 10dd49: 8d 65 f4 lea -0xc(%ebp),%esp 10dd4c: 5b pop %ebx 10dd4d: 5e pop %esi 10dd4e: 5f pop %edi 10dd4f: c9 leave 10dd50: c3 ret 10dd51: 8d 76 00 lea 0x0(%esi),%esi /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10dd54: 8b 45 0c mov 0xc(%ebp),%eax 10dd57: 25 00 0a 00 00 and $0xa00,%eax 10dd5c: 3d 00 0a 00 00 cmp $0xa00,%eax 10dd61: 74 65 je 10ddc8 10dd63: 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 ); 10dd64: 8d 45 dc lea -0x24(%ebp),%eax 10dd67: 50 push %eax 10dd68: ff 75 e4 pushl -0x1c(%ebp) 10dd6b: 68 00 ca 12 00 push $0x12ca00 10dd70: e8 17 1e 00 00 call 10fb8c <_Objects_Get> 10dd75: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10dd78: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10dd7b: e8 9c 29 00 00 call 11071c <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10dd80: e8 97 29 00 00 call 11071c <_Thread_Enable_dispatch> goto return_id; 10dd85: 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; 10dd88: 8b 45 e0 mov -0x20(%ebp),%eax 10dd8b: 83 c0 08 add $0x8,%eax #endif return id; } 10dd8e: 8d 65 f4 lea -0xc(%ebp),%esp 10dd91: 5b pop %ebx 10dd92: 5e pop %esi 10dd93: 5f pop %edi 10dd94: c9 leave 10dd95: c3 ret 10dd96: 66 90 xchg %ax,%ax _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 ); 10dd98: 8b 45 14 mov 0x14(%ebp),%eax 10dd9b: 89 45 d4 mov %eax,-0x2c(%ebp) 10dd9e: e9 76 ff ff ff jmp 10dd19 10dda3: 90 nop /* * 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( 10dda4: 8d 45 e0 lea -0x20(%ebp),%eax 10dda7: 50 push %eax 10dda8: ff 75 d4 pushl -0x2c(%ebp) 10ddab: 6a 00 push $0x0 10ddad: 56 push %esi 10ddae: e8 25 61 00 00 call 113ed8 <_POSIX_Semaphore_Create_support> 10ddb3: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10ddb5: e8 62 29 00 00 call 11071c <_Thread_Enable_dispatch> if ( status == -1 ) 10ddba: 83 c4 10 add $0x10,%esp 10ddbd: 43 inc %ebx 10ddbe: 75 c8 jne 10dd88 return SEM_FAILED; 10ddc0: b8 ff ff ff ff mov $0xffffffff,%eax 10ddc5: eb c7 jmp 10dd8e 10ddc7: 90 nop /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 10ddc8: e8 4f 29 00 00 call 11071c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10ddcd: e8 3a 93 00 00 call 11710c <__errno> 10ddd2: c7 00 11 00 00 00 movl $0x11,(%eax) 10ddd8: b8 ff ff ff ff mov $0xffffffff,%eax 10dddd: eb af jmp 10dd8e =============================================================================== 0010dde0 : */ int sem_post( sem_t *sem ) { 10dde0: 55 push %ebp 10dde1: 89 e5 mov %esp,%ebp 10dde3: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10dde6: 8d 45 f4 lea -0xc(%ebp),%eax 10dde9: 50 push %eax 10ddea: 8b 45 08 mov 0x8(%ebp),%eax 10dded: ff 30 pushl (%eax) 10ddef: 68 00 ca 12 00 push $0x12ca00 10ddf4: e8 93 1d 00 00 call 10fb8c <_Objects_Get> switch ( location ) { 10ddf9: 83 c4 10 add $0x10,%esp 10ddfc: 8b 4d f4 mov -0xc(%ebp),%ecx 10ddff: 85 c9 test %ecx,%ecx 10de01: 74 15 je 10de18 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10de03: e8 04 93 00 00 call 11710c <__errno> 10de08: c7 00 16 00 00 00 movl $0x16,(%eax) 10de0e: b8 ff ff ff ff mov $0xffffffff,%eax } 10de13: c9 leave 10de14: c3 ret 10de15: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10de18: 52 push %edx 10de19: 6a 00 push $0x0 10de1b: ff 70 08 pushl 0x8(%eax) 10de1e: 83 c0 1c add $0x1c,%eax 10de21: 50 push %eax 10de22: e8 79 13 00 00 call 10f1a0 <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10de27: e8 f0 28 00 00 call 11071c <_Thread_Enable_dispatch> return 0; 10de2c: 83 c4 10 add $0x10,%esp 10de2f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10de31: c9 leave 10de32: c3 ret =============================================================================== 0010de34 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 10de34: 55 push %ebp 10de35: 89 e5 mov %esp,%ebp 10de37: 53 push %ebx 10de38: 83 ec 1c sub $0x1c,%esp 10de3b: 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 ); 10de3e: 8d 45 f4 lea -0xc(%ebp),%eax 10de41: 50 push %eax 10de42: ff 75 0c pushl 0xc(%ebp) 10de45: e8 1e 55 00 00 call 113368 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10de4a: 83 c4 10 add $0x10,%esp 10de4d: 83 f8 03 cmp $0x3,%eax 10de50: 74 16 je 10de68 <== ALWAYS TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10de52: 50 push %eax <== NOT EXECUTED 10de53: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10de56: 6a 00 push $0x0 <== NOT EXECUTED 10de58: 53 push %ebx <== NOT EXECUTED 10de59: e8 42 62 00 00 call 1140a0 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED 10de5e: 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; } 10de61: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10de64: c9 leave <== NOT EXECUTED 10de65: c3 ret <== NOT EXECUTED 10de66: 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 ); 10de68: 52 push %edx 10de69: ff 75 f4 pushl -0xc(%ebp) 10de6c: 6a 01 push $0x1 10de6e: 53 push %ebx 10de6f: e8 2c 62 00 00 call 1140a0 <_POSIX_Semaphore_Wait_support> 10de74: 83 c4 10 add $0x10,%esp lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 10de77: 8b 5d fc mov -0x4(%ebp),%ebx 10de7a: c9 leave 10de7b: c3 ret =============================================================================== 0010a89c : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 10a89c: 55 push %ebp 10a89d: 89 e5 mov %esp,%ebp 10a89f: 83 ec 08 sub $0x8,%esp if ( !value ) 10a8a2: 8b 55 0c mov 0xc(%ebp),%edx 10a8a5: 85 d2 test %edx,%edx 10a8a7: 74 33 je 10a8dc rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 10a8a9: 8b 45 10 mov 0x10(%ebp),%eax 10a8ac: 85 c0 test %eax,%eax 10a8ae: 74 2c je 10a8dc rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10a8b0: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10a8b4: 76 12 jbe 10a8c8 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a8b6: e8 39 8c 00 00 call 1134f4 <__errno> 10a8bb: c7 00 16 00 00 00 movl $0x16,(%eax) } 10a8c1: b8 ff ff ff ff mov $0xffffffff,%eax 10a8c6: c9 leave 10a8c7: c3 ret switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10a8c8: e8 27 8c 00 00 call 1134f4 <__errno> 10a8cd: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10a8d3: b8 ff ff ff ff mov $0xffffffff,%eax 10a8d8: c9 leave 10a8d9: c3 ret 10a8da: 66 90 xchg %ax,%ax { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) rtems_set_errno_and_return_minus_one( EFAULT ); 10a8dc: e8 13 8c 00 00 call 1134f4 <__errno> 10a8e1: c7 00 0e 00 00 00 movl $0xe,(%eax) 10a8e7: eb d8 jmp 10a8c1 =============================================================================== 0010b2ec : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10b2ec: 55 push %ebp 10b2ed: 89 e5 mov %esp,%ebp 10b2ef: 57 push %edi 10b2f0: 56 push %esi 10b2f1: 53 push %ebx 10b2f2: 83 ec 1c sub $0x1c,%esp 10b2f5: 8b 5d 08 mov 0x8(%ebp),%ebx 10b2f8: 8b 45 0c mov 0xc(%ebp),%eax 10b2fb: 8b 55 10 mov 0x10(%ebp),%edx ISR_Level level; if ( oact ) 10b2fe: 85 d2 test %edx,%edx 10b300: 74 13 je 10b315 *oact = _POSIX_signals_Vectors[ sig ]; 10b302: 8d 0c 5b lea (%ebx,%ebx,2),%ecx 10b305: 8d 34 8d 60 9d 12 00 lea 0x129d60(,%ecx,4),%esi 10b30c: b9 03 00 00 00 mov $0x3,%ecx 10b311: 89 d7 mov %edx,%edi 10b313: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10b315: 85 db test %ebx,%ebx 10b317: 74 77 je 10b390 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10b319: 8d 53 ff lea -0x1(%ebx),%edx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10b31c: 83 fa 1f cmp $0x1f,%edx 10b31f: 77 6f ja 10b390 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10b321: 83 fb 09 cmp $0x9,%ebx 10b324: 74 6a je 10b390 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10b326: 85 c0 test %eax,%eax 10b328: 74 62 je 10b38c <== 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 ); 10b32a: 9c pushf 10b32b: fa cli 10b32c: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10b32f: 8b 50 08 mov 0x8(%eax),%edx 10b332: 85 d2 test %edx,%edx 10b334: 74 36 je 10b36c _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 10b336: 83 ec 0c sub $0xc,%esp 10b339: 53 push %ebx 10b33a: 89 45 e0 mov %eax,-0x20(%ebp) 10b33d: e8 8a 57 00 00 call 110acc <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10b342: 8d 14 5b lea (%ebx,%ebx,2),%edx 10b345: 8d 14 95 60 9d 12 00 lea 0x129d60(,%edx,4),%edx 10b34c: b9 03 00 00 00 mov $0x3,%ecx 10b351: 8b 45 e0 mov -0x20(%ebp),%eax 10b354: 89 d7 mov %edx,%edi 10b356: 89 c6 mov %eax,%esi 10b358: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10b35a: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10b35d: ff 75 e4 pushl -0x1c(%ebp) 10b360: 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; 10b361: 31 c0 xor %eax,%eax } 10b363: 8d 65 f4 lea -0xc(%ebp),%esp 10b366: 5b pop %ebx 10b367: 5e pop %esi 10b368: 5f pop %edi 10b369: c9 leave 10b36a: c3 ret 10b36b: 90 nop * 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 ]; 10b36c: 8d 34 5b lea (%ebx,%ebx,2),%esi 10b36f: c1 e6 02 shl $0x2,%esi 10b372: 8d 86 60 9d 12 00 lea 0x129d60(%esi),%eax 10b378: 81 c6 80 32 12 00 add $0x123280,%esi 10b37e: b9 03 00 00 00 mov $0x3,%ecx 10b383: 89 c7 mov %eax,%edi 10b385: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10b387: eb d4 jmp 10b35d 10b389: 8d 76 00 lea 0x0(%esi),%esi * 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; 10b38c: 31 c0 xor %eax,%eax 10b38e: eb d3 jmp 10b363 <== 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 ); 10b390: e8 4b 8a 00 00 call 113de0 <__errno> 10b395: c7 00 16 00 00 00 movl $0x16,(%eax) 10b39b: b8 ff ff ff ff mov $0xffffffff,%eax 10b3a0: eb c1 jmp 10b363 =============================================================================== 0010b6b4 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10b6b4: 55 push %ebp 10b6b5: 89 e5 mov %esp,%ebp 10b6b7: 57 push %edi 10b6b8: 56 push %esi 10b6b9: 53 push %ebx 10b6ba: 83 ec 2c sub $0x2c,%esp 10b6bd: 8b 5d 08 mov 0x8(%ebp),%ebx 10b6c0: 8b 7d 0c mov 0xc(%ebp),%edi 10b6c3: 8b 75 10 mov 0x10(%ebp),%esi ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10b6c6: 85 db test %ebx,%ebx 10b6c8: 0f 84 9e 01 00 00 je 10b86c /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10b6ce: 85 f6 test %esi,%esi 10b6d0: 0f 84 3e 01 00 00 je 10b814 if ( !_Timespec_Is_valid( timeout ) ) 10b6d6: 83 ec 0c sub $0xc,%esp 10b6d9: 56 push %esi 10b6da: e8 f5 33 00 00 call 10ead4 <_Timespec_Is_valid> 10b6df: 83 c4 10 add $0x10,%esp 10b6e2: 84 c0 test %al,%al 10b6e4: 0f 84 82 01 00 00 je 10b86c rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10b6ea: 83 ec 0c sub $0xc,%esp 10b6ed: 56 push %esi 10b6ee: e8 49 34 00 00 call 10eb3c <_Timespec_To_ticks> if ( !interval ) 10b6f3: 83 c4 10 add $0x10,%esp 10b6f6: 85 c0 test %eax,%eax 10b6f8: 0f 84 6e 01 00 00 je 10b86c <== NEVER TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10b6fe: 85 ff test %edi,%edi 10b700: 0f 84 18 01 00 00 je 10b81e <== NEVER TAKEN the_thread = _Thread_Executing; 10b706: 8b 0d d8 a3 12 00 mov 0x12a3d8,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b70c: 8b 91 ec 00 00 00 mov 0xec(%ecx),%edx * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10b712: 9c pushf 10b713: fa cli 10b714: 8f 45 d0 popl -0x30(%ebp) if ( *set & api->signals_pending ) { 10b717: 8b 33 mov (%ebx),%esi 10b719: 89 75 d4 mov %esi,-0x2c(%ebp) 10b71c: 8b b2 d4 00 00 00 mov 0xd4(%edx),%esi 10b722: 85 75 d4 test %esi,-0x2c(%ebp) 10b725: 0f 85 fd 00 00 00 jne 10b828 return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10b72b: 8b 35 48 a6 12 00 mov 0x12a648,%esi 10b731: 85 75 d4 test %esi,-0x2c(%ebp) 10b734: 0f 85 96 00 00 00 jne 10b7d0 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 10b73a: c7 07 ff ff ff ff movl $0xffffffff,(%edi) 10b740: 8b 35 2c 9e 12 00 mov 0x129e2c,%esi 10b746: 46 inc %esi 10b747: 89 35 2c 9e 12 00 mov %esi,0x129e2c _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10b74d: c7 41 44 e0 a5 12 00 movl $0x12a5e0,0x44(%ecx) the_thread->Wait.return_code = EINTR; 10b754: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) the_thread->Wait.option = *set; 10b75b: 8b 33 mov (%ebx),%esi 10b75d: 89 71 30 mov %esi,0x30(%ecx) the_thread->Wait.return_argument = the_info; 10b760: 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; 10b763: c7 05 10 a6 12 00 01 movl $0x1,0x12a610 10b76a: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10b76d: ff 75 d0 pushl -0x30(%ebp) 10b770: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10b771: 51 push %ecx 10b772: 68 14 e8 10 00 push $0x10e814 10b777: 50 push %eax 10b778: 68 e0 a5 12 00 push $0x12a5e0 10b77d: 89 55 cc mov %edx,-0x34(%ebp) 10b780: e8 63 2d 00 00 call 10e4e8 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b785: e8 b6 28 00 00 call 10e040 <_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 ); 10b78a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b791: 6a 00 push $0x0 10b793: 57 push %edi 10b794: ff 37 pushl (%edi) 10b796: 8b 55 cc mov -0x34(%ebp),%edx 10b799: 52 push %edx 10b79a: e8 09 5a 00 00 call 1111a8 <_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) 10b79f: 83 c4 20 add $0x20,%esp 10b7a2: a1 d8 a3 12 00 mov 0x12a3d8,%eax 10b7a7: 83 78 34 04 cmpl $0x4,0x34(%eax) 10b7ab: 0f 85 d3 00 00 00 jne 10b884 || !(*set & signo_to_mask( the_info->si_signo )) ) { 10b7b1: 8b 37 mov (%edi),%esi 10b7b3: 8d 4e ff lea -0x1(%esi),%ecx 10b7b6: b8 01 00 00 00 mov $0x1,%eax 10b7bb: d3 e0 shl %cl,%eax 10b7bd: 85 03 test %eax,(%ebx) 10b7bf: 0f 84 bf 00 00 00 je 10b884 errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } 10b7c5: 89 f0 mov %esi,%eax 10b7c7: 8d 65 f4 lea -0xc(%ebp),%esp 10b7ca: 5b pop %ebx 10b7cb: 5e pop %esi 10b7cc: 5f pop %edi 10b7cd: c9 leave 10b7ce: c3 ret 10b7cf: 90 nop } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); 10b7d0: 83 ec 0c sub $0xc,%esp 10b7d3: 56 push %esi 10b7d4: 89 55 cc mov %edx,-0x34(%ebp) 10b7d7: e8 94 fe ff ff call 10b670 <_POSIX_signals_Get_lowest> 10b7dc: 89 c6 mov %eax,%esi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10b7de: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b7e5: 6a 01 push $0x1 10b7e7: 57 push %edi 10b7e8: 50 push %eax 10b7e9: 8b 55 cc mov -0x34(%ebp),%edx 10b7ec: 52 push %edx 10b7ed: e8 b6 59 00 00 call 1111a8 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10b7f2: ff 75 d0 pushl -0x30(%ebp) 10b7f5: 9d popf the_info->si_signo = signo; 10b7f6: 89 37 mov %esi,(%edi) the_info->si_code = SI_USER; 10b7f8: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi) the_info->si_value.sival_int = 0; 10b7ff: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) return signo; 10b806: 83 c4 20 add $0x20,%esp errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } 10b809: 89 f0 mov %esi,%eax 10b80b: 8d 65 f4 lea -0xc(%ebp),%esp 10b80e: 5b pop %ebx 10b80f: 5e pop %esi 10b810: 5f pop %edi 10b811: c9 leave 10b812: c3 ret 10b813: 90 nop /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; 10b814: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10b816: 85 ff test %edi,%edi 10b818: 0f 85 e8 fe ff ff jne 10b706 10b81e: 8d 7d dc lea -0x24(%ebp),%edi 10b821: e9 e0 fe ff ff jmp 10b706 10b826: 66 90 xchg %ax,%ax /* 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 ); 10b828: 83 ec 0c sub $0xc,%esp 10b82b: 56 push %esi 10b82c: 89 55 cc mov %edx,-0x34(%ebp) 10b82f: e8 3c fe ff ff call 10b670 <_POSIX_signals_Get_lowest> 10b834: 89 07 mov %eax,(%edi) _POSIX_signals_Clear_signals( 10b836: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b83d: 6a 00 push $0x0 10b83f: 57 push %edi 10b840: 50 push %eax 10b841: 8b 55 cc mov -0x34(%ebp),%edx 10b844: 52 push %edx 10b845: e8 5e 59 00 00 call 1111a8 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10b84a: ff 75 d0 pushl -0x30(%ebp) 10b84d: 9d popf the_info->si_code = SI_USER; 10b84e: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi) the_info->si_value.sival_int = 0; 10b855: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) return the_info->si_signo; 10b85c: 8b 37 mov (%edi),%esi 10b85e: 83 c4 20 add $0x20,%esp errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } 10b861: 89 f0 mov %esi,%eax 10b863: 8d 65 f4 lea -0xc(%ebp),%esp 10b866: 5b pop %ebx 10b867: 5e pop %esi 10b868: 5f pop %edi 10b869: c9 leave 10b86a: c3 ret 10b86b: 90 nop rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10b86c: e8 a3 8b 00 00 call 114414 <__errno> 10b871: c7 00 16 00 00 00 movl $0x16,(%eax) 10b877: be ff ff ff ff mov $0xffffffff,%esi 10b87c: e9 44 ff ff ff jmp 10b7c5 10b881: 8d 76 00 lea 0x0(%esi),%esi * 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; 10b884: e8 8b 8b 00 00 call 114414 <__errno> 10b889: 8b 15 d8 a3 12 00 mov 0x12a3d8,%edx 10b88f: 8b 52 34 mov 0x34(%edx),%edx 10b892: 89 10 mov %edx,(%eax) return -1; 10b894: be ff ff ff ff mov $0xffffffff,%esi 10b899: e9 27 ff ff ff jmp 10b7c5 =============================================================================== 0010d4dc : int sigwait( const sigset_t *set, int *sig ) { 10d4dc: 55 push %ebp 10d4dd: 89 e5 mov %esp,%ebp 10d4df: 53 push %ebx 10d4e0: 83 ec 08 sub $0x8,%esp 10d4e3: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10d4e6: 6a 00 push $0x0 10d4e8: 6a 00 push $0x0 10d4ea: ff 75 08 pushl 0x8(%ebp) 10d4ed: e8 e6 fd ff ff call 10d2d8 if ( status != -1 ) { 10d4f2: 83 c4 10 add $0x10,%esp 10d4f5: 83 f8 ff cmp $0xffffffff,%eax 10d4f8: 74 0e je 10d508 if ( sig ) 10d4fa: 85 db test %ebx,%ebx 10d4fc: 74 16 je 10d514 <== NEVER TAKEN *sig = status; 10d4fe: 89 03 mov %eax,(%ebx) return 0; 10d500: 31 c0 xor %eax,%eax } return errno; } 10d502: 8b 5d fc mov -0x4(%ebp),%ebx 10d505: c9 leave 10d506: c3 ret 10d507: 90 nop if ( sig ) *sig = status; return 0; } return errno; 10d508: e8 77 86 00 00 call 115b84 <__errno> 10d50d: 8b 00 mov (%eax),%eax } 10d50f: 8b 5d fc mov -0x4(%ebp),%ebx 10d512: c9 leave 10d513: c3 ret status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 10d514: 31 c0 xor %eax,%eax } return errno; } 10d516: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10d519: c9 leave <== NOT EXECUTED 10d51a: c3 ret <== NOT EXECUTED =============================================================================== 00109660 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 109660: 55 push %ebp 109661: 89 e5 mov %esp,%ebp 109663: 56 push %esi 109664: 53 push %ebx 109665: 89 d3 mov %edx,%ebx 109667: 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)) { 109669: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) 109670: 75 12 jne 109684 <== 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); 109672: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109675: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 109677: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10967a: 5b pop %ebx <== NOT EXECUTED 10967b: 5e pop %esi <== NOT EXECUTED 10967c: 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); 10967d: e9 92 fe ff ff jmp 109514 <== NOT EXECUTED 109682: 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); 109684: 52 push %edx 109685: 6a 00 push $0x0 109687: 6a 00 push $0x0 109689: ff 73 18 pushl 0x18(%ebx) 10968c: e8 17 15 00 00 call 10aba8 i = iproc (c, tty); 109691: 89 f2 mov %esi,%edx 109693: 0f b6 c2 movzbl %dl,%eax 109696: 89 da mov %ebx,%edx 109698: e8 77 fe ff ff call 109514 10969d: 89 c6 mov %eax,%esi rtems_semaphore_release (tty->osem); 10969f: 58 pop %eax 1096a0: ff 73 18 pushl 0x18(%ebx) 1096a3: e8 fc 15 00 00 call 10aca4 1096a8: 83 c4 10 add $0x10,%esp } else { i = iproc (c, tty); } return i; } 1096ab: 89 f0 mov %esi,%eax 1096ad: 8d 65 f8 lea -0x8(%ebp),%esp 1096b0: 5b pop %ebx 1096b1: 5e pop %esi 1096b2: c9 leave 1096b3: c3 ret =============================================================================== 00108464 : int _STAT_NAME( const char *path, struct stat *buf ) { 108464: 55 push %ebp 108465: 89 e5 mov %esp,%ebp 108467: 57 push %edi 108468: 56 push %esi 108469: 53 push %ebx 10846a: 83 ec 3c sub $0x3c,%esp 10846d: 8b 55 08 mov 0x8(%ebp),%edx 108470: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 108473: 85 f6 test %esi,%esi 108475: 74 65 je 1084dc rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 108477: b9 ff ff ff ff mov $0xffffffff,%ecx 10847c: 89 d7 mov %edx,%edi 10847e: 31 c0 xor %eax,%eax 108480: f2 ae repnz scas %es:(%edi),%al 108482: f7 d1 not %ecx 108484: 49 dec %ecx 108485: 83 ec 0c sub $0xc,%esp 108488: 6a 01 push $0x1 10848a: 8d 5d d4 lea -0x2c(%ebp),%ebx 10848d: 53 push %ebx 10848e: 6a 00 push $0x0 108490: 51 push %ecx 108491: 52 push %edx 108492: e8 1d f1 ff ff call 1075b4 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 108497: 83 c4 20 add $0x20,%esp 10849a: 85 c0 test %eax,%eax 10849c: 74 0e je 1084ac return -1; 10849e: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 1084a3: 8d 65 f4 lea -0xc(%ebp),%esp 1084a6: 5b pop %ebx 1084a7: 5e pop %esi 1084a8: 5f pop %edi 1084a9: c9 leave 1084aa: c3 ret 1084ab: 90 nop /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 1084ac: b9 48 00 00 00 mov $0x48,%ecx 1084b1: 89 f7 mov %esi,%edi 1084b3: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 1084b5: 83 ec 08 sub $0x8,%esp 1084b8: 56 push %esi 1084b9: 53 push %ebx 1084ba: 8b 45 dc mov -0x24(%ebp),%eax 1084bd: ff 50 18 call *0x18(%eax) rtems_filesystem_freenode( &loc ); 1084c0: 89 1c 24 mov %ebx,(%esp) 1084c3: 89 45 c4 mov %eax,-0x3c(%ebp) 1084c6: e8 c1 f1 ff ff call 10768c return status; 1084cb: 83 c4 10 add $0x10,%esp 1084ce: 8b 45 c4 mov -0x3c(%ebp),%eax } 1084d1: 8d 65 f4 lea -0xc(%ebp),%esp 1084d4: 5b pop %ebx 1084d5: 5e pop %esi 1084d6: 5f pop %edi 1084d7: c9 leave 1084d8: c3 ret 1084d9: 8d 76 00 lea 0x0(%esi),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 1084dc: e8 17 8d 00 00 call 1111f8 <__errno> 1084e1: c7 00 0e 00 00 00 movl $0xe,(%eax) 1084e7: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 1084ec: 8d 65 f4 lea -0xc(%ebp),%esp 1084ef: 5b pop %ebx 1084f0: 5e pop %esi 1084f1: 5f pop %edi 1084f2: c9 leave 1084f3: c3 ret =============================================================================== 0010a8d4 : #include int statvfs (const char *path, struct statvfs *sb) { 10a8d4: 55 push %ebp 10a8d5: 89 e5 mov %esp,%ebp 10a8d7: 57 push %edi 10a8d8: 56 push %esi 10a8d9: 53 push %ebx 10a8da: 83 ec 48 sub $0x48,%esp 10a8dd: 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 ) ) 10a8e0: 31 f6 xor %esi,%esi 10a8e2: b9 ff ff ff ff mov $0xffffffff,%ecx 10a8e7: 89 d7 mov %edx,%edi 10a8e9: 89 f0 mov %esi,%eax 10a8eb: f2 ae repnz scas %es:(%edi),%al 10a8ed: f7 d1 not %ecx 10a8ef: 49 dec %ecx 10a8f0: 6a 01 push $0x1 10a8f2: 8d 5d d4 lea -0x2c(%ebp),%ebx 10a8f5: 53 push %ebx 10a8f6: 6a 00 push $0x0 10a8f8: 51 push %ecx 10a8f9: 52 push %edx 10a8fa: e8 85 eb ff ff call 109484 10a8ff: 83 c4 20 add $0x20,%esp 10a902: 85 c0 test %eax,%eax 10a904: 74 0e je 10a914 <== ALWAYS TAKEN return -1; 10a906: 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; } 10a90b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a90e: 5b pop %ebx <== NOT EXECUTED 10a90f: 5e pop %esi <== NOT EXECUTED 10a910: 5f pop %edi <== NOT EXECUTED 10a911: c9 leave <== NOT EXECUTED 10a912: c3 ret <== NOT EXECUTED 10a913: 90 nop <== NOT EXECUTED */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; 10a914: 8b 55 e4 mov -0x1c(%ebp),%edx fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); 10a917: b9 38 00 00 00 mov $0x38,%ecx 10a91c: 8b 7d 0c mov 0xc(%ebp),%edi 10a91f: 89 f0 mov %esi,%eax 10a921: f3 aa rep stos %al,%es:(%edi) result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 10a923: 83 ec 08 sub $0x8,%esp 10a926: 8b 42 28 mov 0x28(%edx),%eax 10a929: 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; 10a92c: 83 c2 1c add $0x1c,%edx memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 10a92f: 52 push %edx 10a930: ff 50 44 call *0x44(%eax) rtems_filesystem_freenode( &loc ); 10a933: 89 1c 24 mov %ebx,(%esp) 10a936: 89 45 c4 mov %eax,-0x3c(%ebp) 10a939: e8 1e ec ff ff call 10955c return result; 10a93e: 83 c4 10 add $0x10,%esp 10a941: 8b 45 c4 mov -0x3c(%ebp),%eax } 10a944: 8d 65 f4 lea -0xc(%ebp),%esp 10a947: 5b pop %ebx 10a948: 5e pop %esi 10a949: 5f pop %edi 10a94a: c9 leave 10a94b: c3 ret =============================================================================== 0010a28c : int symlink( const char *actualpath, const char *sympath ) { 10a28c: 55 push %ebp 10a28d: 89 e5 mov %esp,%ebp 10a28f: 56 push %esi 10a290: 53 push %ebx 10a291: 83 ec 34 sub $0x34,%esp 10a294: 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 ); 10a297: 8d 5d dc lea -0x24(%ebp),%ebx 10a29a: 53 push %ebx 10a29b: 8d 45 f4 lea -0xc(%ebp),%eax 10a29e: 50 push %eax 10a29f: 56 push %esi 10a2a0: e8 0f ff ff ff call 10a1b4 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 10a2a5: 83 c4 0c add $0xc,%esp 10a2a8: 8d 45 f0 lea -0x10(%ebp),%eax 10a2ab: 50 push %eax 10a2ac: 53 push %ebx 10a2ad: 03 75 f4 add -0xc(%ebp),%esi 10a2b0: 56 push %esi 10a2b1: 8b 45 e8 mov -0x18(%ebp),%eax 10a2b4: ff 50 04 call *0x4(%eax) if ( result != 0 ) 10a2b7: 83 c4 10 add $0x10,%esp 10a2ba: 85 c0 test %eax,%eax 10a2bc: 74 0e je 10a2cc return -1; 10a2be: b8 ff ff ff ff mov $0xffffffff,%eax result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 10a2c3: 8d 65 f8 lea -0x8(%ebp),%esp 10a2c6: 5b pop %ebx 10a2c7: 5e pop %esi 10a2c8: c9 leave 10a2c9: c3 ret 10a2ca: 66 90 xchg %ax,%ax result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 10a2cc: 50 push %eax 10a2cd: ff 75 f0 pushl -0x10(%ebp) 10a2d0: ff 75 08 pushl 0x8(%ebp) 10a2d3: 53 push %ebx 10a2d4: 8b 45 e8 mov -0x18(%ebp),%eax 10a2d7: ff 50 38 call *0x38(%eax) rtems_filesystem_freenode( &loc ); 10a2da: 89 1c 24 mov %ebx,(%esp) 10a2dd: 89 45 d4 mov %eax,-0x2c(%ebp) 10a2e0: e8 47 ec ff ff call 108f2c return result; 10a2e5: 83 c4 10 add $0x10,%esp 10a2e8: 8b 45 d4 mov -0x2c(%ebp),%eax } 10a2eb: 8d 65 f8 lea -0x8(%ebp),%esp 10a2ee: 5b pop %ebx 10a2ef: 5e pop %esi 10a2f0: c9 leave 10a2f1: c3 ret =============================================================================== 00109770 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 109770: 55 push %ebp 109771: 89 e5 mov %esp,%ebp 109773: 53 push %ebx 109774: 83 ec 04 sub $0x4,%esp 109777: 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; 10977a: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx if ( this_reent ) { 109780: 85 d2 test %edx,%edx 109782: 74 33 je 1097b7 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 109784: 8b 0d 58 99 12 00 mov 0x129958,%ecx 10978a: 8b 99 e4 00 00 00 mov 0xe4(%ecx),%ebx _Thread_Executing->libc_reent = this_reent; 109790: 89 91 e4 00 00 00 mov %edx,0xe4(%ecx) _fwalk (t->libc_reent, sync_wrapper); 109796: 83 ec 08 sub $0x8,%esp 109799: 68 bc 97 10 00 push $0x1097bc 10979e: ff b0 e4 00 00 00 pushl 0xe4(%eax) 1097a4: e8 c3 b6 00 00 call 114e6c <_fwalk> _Thread_Executing->libc_reent = current_reent; 1097a9: a1 58 99 12 00 mov 0x129958,%eax 1097ae: 89 98 e4 00 00 00 mov %ebx,0xe4(%eax) 1097b4: 83 c4 10 add $0x10,%esp } } 1097b7: 8b 5d fc mov -0x4(%ebp),%ebx 1097ba: c9 leave 1097bb: c3 ret =============================================================================== 00110508 : int tcsetattr( int fd, int opt, struct termios *tp ) { 110508: 55 push %ebp 110509: 89 e5 mov %esp,%ebp 11050b: 56 push %esi 11050c: 53 push %ebx 11050d: 8b 5d 08 mov 0x8(%ebp),%ebx 110510: 8b 45 0c mov 0xc(%ebp),%eax 110513: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 110516: 85 c0 test %eax,%eax 110518: 74 2c je 110546 11051a: 48 dec %eax 11051b: 74 17 je 110534 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 11051d: e8 6e 3a 00 00 call 113f90 <__errno> 110522: c7 00 86 00 00 00 movl $0x86,(%eax) * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 110528: b8 ff ff ff ff mov $0xffffffff,%eax 11052d: 8d 65 f8 lea -0x8(%ebp),%esp 110530: 5b pop %ebx 110531: 5e pop %esi 110532: c9 leave 110533: c3 ret switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 110534: 50 push %eax 110535: 6a 00 push $0x0 110537: 6a 03 push $0x3 110539: 53 push %ebx 11053a: e8 55 fc ff ff call 110194 11053f: 83 c4 10 add $0x10,%esp 110542: 85 c0 test %eax,%eax 110544: 78 e2 js 110528 <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 110546: 89 75 10 mov %esi,0x10(%ebp) 110549: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 110550: 89 5d 08 mov %ebx,0x8(%ebp) } } 110553: 8d 65 f8 lea -0x8(%ebp),%esp 110556: 5b pop %ebx 110557: 5e pop %esi 110558: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 110559: e9 36 fc ff ff jmp 110194 =============================================================================== 0010aa98 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10aa98: 55 push %ebp 10aa99: 89 e5 mov %esp,%ebp 10aa9b: 56 push %esi 10aa9c: 53 push %ebx 10aa9d: 8b 5d 0c mov 0xc(%ebp),%ebx 10aaa0: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10aaa3: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10aaa7: 0f 85 db 00 00 00 jne 10ab88 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10aaad: 85 f6 test %esi,%esi 10aaaf: 0f 84 d3 00 00 00 je 10ab88 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10aab5: 85 db test %ebx,%ebx 10aab7: 74 21 je 10aada /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10aab9: 8b 03 mov (%ebx),%eax 10aabb: 48 dec %eax 10aabc: 83 f8 01 cmp $0x1,%eax 10aabf: 0f 87 c3 00 00 00 ja 10ab88 <== 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 ) 10aac5: 8b 43 04 mov 0x4(%ebx),%eax 10aac8: 85 c0 test %eax,%eax 10aaca: 0f 84 b8 00 00 00 je 10ab88 <== NEVER TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10aad0: 48 dec %eax rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10aad1: 83 f8 1f cmp $0x1f,%eax 10aad4: 0f 87 ae 00 00 00 ja 10ab88 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aada: a1 8c 9a 12 00 mov 0x129a8c,%eax 10aadf: 40 inc %eax 10aae0: a3 8c 9a 12 00 mov %eax,0x129a8c * 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 ); 10aae5: 83 ec 0c sub $0xc,%esp 10aae8: 68 e0 9d 12 00 push $0x129de0 10aaed: e8 b2 1c 00 00 call 10c7a4 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10aaf2: 83 c4 10 add $0x10,%esp 10aaf5: 85 c0 test %eax,%eax 10aaf7: 0f 84 a2 00 00 00 je 10ab9f 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; 10aafd: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10ab01: 8b 15 38 a0 12 00 mov 0x12a038,%edx 10ab07: 8b 52 08 mov 0x8(%edx),%edx 10ab0a: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10ab0d: 85 db test %ebx,%ebx 10ab0f: 74 11 je 10ab22 ptimer->inf.sigev_notify = evp->sigev_notify; 10ab11: 8b 13 mov (%ebx),%edx 10ab13: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10ab16: 8b 53 04 mov 0x4(%ebx),%edx 10ab19: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10ab1c: 8b 53 08 mov 0x8(%ebx),%edx 10ab1f: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10ab22: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10ab29: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10ab30: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10ab37: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10ab3e: 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; 10ab45: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10ab4c: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10ab53: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10ab5a: 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 ), 10ab61: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10ab64: 0f b7 da movzwl %dx,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ab67: 8b 0d fc 9d 12 00 mov 0x129dfc,%ecx 10ab6d: 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; 10ab70: 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; 10ab77: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10ab79: e8 ea 2b 00 00 call 10d768 <_Thread_Enable_dispatch> return 0; 10ab7e: 31 c0 xor %eax,%eax } 10ab80: 8d 65 f8 lea -0x8(%ebp),%esp 10ab83: 5b pop %ebx 10ab84: 5e pop %esi 10ab85: c9 leave 10ab86: c3 ret 10ab87: 90 nop 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 ); 10ab88: e8 f7 8f 00 00 call 113b84 <__errno> 10ab8d: c7 00 16 00 00 00 movl $0x16,(%eax) 10ab93: 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; } 10ab98: 8d 65 f8 lea -0x8(%ebp),%esp 10ab9b: 5b pop %ebx 10ab9c: 5e pop %esi 10ab9d: c9 leave 10ab9e: c3 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 10ab9f: e8 c4 2b 00 00 call 10d768 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10aba4: e8 db 8f 00 00 call 113b84 <__errno> 10aba9: c7 00 0b 00 00 00 movl $0xb,(%eax) 10abaf: b8 ff ff ff ff mov $0xffffffff,%eax 10abb4: eb ca jmp 10ab80 =============================================================================== 0010afdc : int timer_delete( timer_t timerid ) { 10afdc: 55 push %ebp 10afdd: 89 e5 mov %esp,%ebp 10afdf: 53 push %ebx 10afe0: 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 ); 10afe3: 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 ); 10afe6: 50 push %eax 10afe7: ff 75 08 pushl 0x8(%ebp) 10afea: 68 c0 9c 12 00 push $0x129cc0 10afef: e8 b4 1f 00 00 call 10cfa8 <_Objects_Get> 10aff4: 89 c3 mov %eax,%ebx switch ( location ) { 10aff6: 83 c4 10 add $0x10,%esp 10aff9: 8b 4d f4 mov -0xc(%ebp),%ecx 10affc: 85 c9 test %ecx,%ecx 10affe: 74 18 je 10b018 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b000: e8 7f 92 00 00 call 114284 <__errno> 10b005: c7 00 16 00 00 00 movl $0x16,(%eax) 10b00b: b8 ff ff ff ff mov $0xffffffff,%eax } 10b010: 8b 5d fc mov -0x4(%ebp),%ebx 10b013: c9 leave 10b014: c3 ret 10b015: 8d 76 00 lea 0x0(%esi),%esi ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); 10b018: 83 ec 08 sub $0x8,%esp 10b01b: 50 push %eax 10b01c: 68 c0 9c 12 00 push $0x129cc0 10b021: e8 4a 1b 00 00 call 10cb70 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10b026: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10b02a: 8d 43 10 lea 0x10(%ebx),%eax 10b02d: 89 04 24 mov %eax,(%esp) 10b030: e8 1f 3a 00 00 call 10ea54 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10b035: 58 pop %eax 10b036: 5a pop %edx 10b037: 53 push %ebx 10b038: 68 c0 9c 12 00 push $0x129cc0 10b03d: e8 26 1e 00 00 call 10ce68 <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10b042: e8 71 2a 00 00 call 10dab8 <_Thread_Enable_dispatch> return 0; 10b047: 83 c4 10 add $0x10,%esp 10b04a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b04c: 8b 5d fc mov -0x4(%ebp),%ebx 10b04f: c9 leave 10b050: c3 ret =============================================================================== 0010be98 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10be98: 55 push %ebp 10be99: 89 e5 mov %esp,%ebp 10be9b: 53 push %ebx 10be9c: 83 ec 18 sub $0x18,%esp int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); 10be9f: 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 ); 10bea2: 50 push %eax 10bea3: ff 75 08 pushl 0x8(%ebp) 10bea6: 68 80 b3 12 00 push $0x12b380 10beab: e8 3c 1f 00 00 call 10ddec <_Objects_Get> switch ( location ) { 10beb0: 83 c4 10 add $0x10,%esp 10beb3: 8b 55 f4 mov -0xc(%ebp),%edx 10beb6: 85 d2 test %edx,%edx 10beb8: 74 1a je 10bed4 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10beba: e8 45 8e 00 00 call 114d04 <__errno> 10bebf: c7 00 16 00 00 00 movl $0x16,(%eax) 10bec5: bb ff ff ff ff mov $0xffffffff,%ebx } 10beca: 89 d8 mov %ebx,%eax 10becc: 8b 5d fc mov -0x4(%ebp),%ebx 10becf: c9 leave 10bed0: c3 ret 10bed1: 8d 76 00 lea 0x0(%esi),%esi ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 10bed4: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10bed7: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10bede: e8 19 2a 00 00 call 10e8fc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10bee3: 89 d8 mov %ebx,%eax 10bee5: 8b 5d fc mov -0x4(%ebp),%ebx 10bee8: c9 leave 10bee9: c3 ret =============================================================================== 0010beec : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 10beec: 55 push %ebp 10beed: 89 e5 mov %esp,%ebp 10beef: 56 push %esi 10bef0: 53 push %ebx 10bef1: 83 ec 10 sub $0x10,%esp 10bef4: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 10bef7: 85 db test %ebx,%ebx 10bef9: 74 65 je 10bf60 rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 10befb: 83 ec 0c sub $0xc,%esp 10befe: 8d 45 ec lea -0x14(%ebp),%eax 10bf01: 50 push %eax 10bf02: e8 15 15 00 00 call 10d41c <_TOD_Get> 10bf07: 83 c4 0c add $0xc,%esp ptimer = _POSIX_Timer_Get( timerid, &location ); 10bf0a: 8d 45 f4 lea -0xc(%ebp),%eax 10bf0d: 50 push %eax 10bf0e: ff 75 08 pushl 0x8(%ebp) 10bf11: 68 80 b3 12 00 push $0x12b380 10bf16: e8 d1 1e 00 00 call 10ddec <_Objects_Get> 10bf1b: 89 c6 mov %eax,%esi switch ( location ) { 10bf1d: 83 c4 10 add $0x10,%esp 10bf20: 8b 45 f4 mov -0xc(%ebp),%eax 10bf23: 85 c0 test %eax,%eax 10bf25: 75 39 jne 10bf60 case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10bf27: a1 64 b1 12 00 mov 0x12b164,%eax _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10bf2c: 83 ec 08 sub $0x8,%esp 10bf2f: 8d 53 08 lea 0x8(%ebx),%edx 10bf32: 52 push %edx case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10bf33: 8b 56 1c mov 0x1c(%esi),%edx 10bf36: 03 56 24 add 0x24(%esi),%edx case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = 10bf39: 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 ); 10bf3b: 52 push %edx 10bf3c: e8 4f 34 00 00 call 10f390 <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 10bf41: 8b 46 54 mov 0x54(%esi),%eax 10bf44: 8b 56 58 mov 0x58(%esi),%edx 10bf47: 89 03 mov %eax,(%ebx) 10bf49: 89 53 04 mov %edx,0x4(%ebx) _Thread_Enable_dispatch(); 10bf4c: e8 ab 29 00 00 call 10e8fc <_Thread_Enable_dispatch> return 0; 10bf51: 83 c4 10 add $0x10,%esp 10bf54: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10bf56: 8d 65 f8 lea -0x8(%ebp),%esp 10bf59: 5b pop %ebx 10bf5a: 5e pop %esi 10bf5b: c9 leave 10bf5c: c3 ret 10bf5d: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10bf60: e8 9f 8d 00 00 call 114d04 <__errno> 10bf65: c7 00 16 00 00 00 movl $0x16,(%eax) 10bf6b: b8 ff ff ff ff mov $0xffffffff,%eax 10bf70: eb e4 jmp 10bf56 =============================================================================== 0010abb8 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10abb8: 55 push %ebp 10abb9: 89 e5 mov %esp,%ebp 10abbb: 57 push %edi 10abbc: 56 push %esi 10abbd: 53 push %ebx 10abbe: 83 ec 3c sub $0x3c,%esp 10abc1: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10abc4: 85 db test %ebx,%ebx 10abc6: 0f 84 50 01 00 00 je 10ad1c <== 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) ) ) { 10abcc: 83 ec 0c sub $0xc,%esp 10abcf: 8d 43 08 lea 0x8(%ebx),%eax 10abd2: 50 push %eax 10abd3: e8 48 36 00 00 call 10e220 <_Timespec_Is_valid> 10abd8: 83 c4 10 add $0x10,%esp 10abdb: 84 c0 test %al,%al 10abdd: 0f 84 39 01 00 00 je 10ad1c rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !_Timespec_Is_valid( &(value->it_interval) ) ) { 10abe3: 83 ec 0c sub $0xc,%esp 10abe6: 53 push %ebx 10abe7: e8 34 36 00 00 call 10e220 <_Timespec_Is_valid> 10abec: 83 c4 10 add $0x10,%esp 10abef: 84 c0 test %al,%al 10abf1: 0f 84 25 01 00 00 je 10ad1c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 10abf7: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10abfb: 0f 84 db 00 00 00 je 10acdc 10ac01: 8b 45 0c mov 0xc(%ebp),%eax 10ac04: 85 c0 test %eax,%eax 10ac06: 0f 85 10 01 00 00 jne 10ad1c rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10ac0c: 8d 45 cc lea -0x34(%ebp),%eax 10ac0f: 89 45 c4 mov %eax,-0x3c(%ebp) 10ac12: b9 04 00 00 00 mov $0x4,%ecx 10ac17: 89 c7 mov %eax,%edi 10ac19: 89 de mov %ebx,%esi 10ac1b: 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 ); 10ac1d: 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 ); 10ac1e: 8d 45 e4 lea -0x1c(%ebp),%eax 10ac21: 50 push %eax 10ac22: ff 75 08 pushl 0x8(%ebp) 10ac25: 68 e0 9d 12 00 push $0x129de0 10ac2a: e8 29 20 00 00 call 10cc58 <_Objects_Get> 10ac2f: 89 c2 mov %eax,%edx switch ( location ) { 10ac31: 83 c4 10 add $0x10,%esp 10ac34: 8b 7d e4 mov -0x1c(%ebp),%edi 10ac37: 85 ff test %edi,%edi 10ac39: 0f 85 dd 00 00 00 jne 10ad1c 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 ) { 10ac3f: 8b 75 d4 mov -0x2c(%ebp),%esi 10ac42: 85 f6 test %esi,%esi 10ac44: 75 0b jne 10ac51 10ac46: 8b 4d d8 mov -0x28(%ebp),%ecx 10ac49: 85 c9 test %ecx,%ecx 10ac4b: 0f 84 df 00 00 00 je 10ad30 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10ac51: 83 ec 0c sub $0xc,%esp 10ac54: 53 push %ebx 10ac55: 89 55 c0 mov %edx,-0x40(%ebp) 10ac58: e8 2b 36 00 00 call 10e288 <_Timespec_To_ticks> 10ac5d: 8b 55 c0 mov -0x40(%ebp),%edx 10ac60: 89 42 64 mov %eax,0x64(%edx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10ac63: 8d 45 d4 lea -0x2c(%ebp),%eax 10ac66: 89 04 24 mov %eax,(%esp) 10ac69: e8 1a 36 00 00 call 10e288 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10ac6e: 8b 55 c0 mov -0x40(%ebp),%edx 10ac71: 89 14 24 mov %edx,(%esp) 10ac74: 68 9c ad 10 00 push $0x10ad9c 10ac79: ff 72 08 pushl 0x8(%edx) 10ac7c: 50 push %eax 10ac7d: 8d 42 10 lea 0x10(%edx),%eax 10ac80: 50 push %eax 10ac81: e8 32 61 00 00 call 110db8 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10ac86: 83 c4 20 add $0x20,%esp 10ac89: 84 c0 test %al,%al 10ac8b: 8b 55 c0 mov -0x40(%ebp),%edx 10ac8e: 0f 84 e8 00 00 00 je 10ad7c /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10ac94: 8b 45 14 mov 0x14(%ebp),%eax 10ac97: 85 c0 test %eax,%eax 10ac99: 0f 84 ed 00 00 00 je 10ad8c *ovalue = ptimer->timer_data; 10ac9f: 8d 42 54 lea 0x54(%edx),%eax 10aca2: b9 04 00 00 00 mov $0x4,%ecx 10aca7: 8b 7d 14 mov 0x14(%ebp),%edi 10acaa: 89 c6 mov %eax,%esi 10acac: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10acae: b9 04 00 00 00 mov $0x4,%ecx 10acb3: 89 c7 mov %eax,%edi 10acb5: 8b 75 c4 mov -0x3c(%ebp),%esi 10acb8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10acba: c6 42 3c 03 movb $0x3,0x3c(%edx) _TOD_Get( &ptimer->time ); 10acbe: 83 ec 0c sub $0xc,%esp 10acc1: 83 c2 6c add $0x6c,%edx 10acc4: 52 push %edx 10acc5: e8 e2 15 00 00 call 10c2ac <_TOD_Get> _Thread_Enable_dispatch(); 10acca: e8 99 2a 00 00 call 10d768 <_Thread_Enable_dispatch> return 0; 10accf: 83 c4 10 add $0x10,%esp 10acd2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10acd4: 8d 65 f4 lea -0xc(%ebp),%esp 10acd7: 5b pop %ebx 10acd8: 5e pop %esi 10acd9: 5f pop %edi 10acda: c9 leave 10acdb: c3 ret if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10acdc: 8d 45 cc lea -0x34(%ebp),%eax 10acdf: 89 45 c4 mov %eax,-0x3c(%ebp) 10ace2: 89 c7 mov %eax,%edi 10ace4: 89 de mov %ebx,%esi 10ace6: 8b 4d 0c mov 0xc(%ebp),%ecx 10ace9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 10aceb: 83 ec 0c sub $0xc,%esp 10acee: 8d 75 dc lea -0x24(%ebp),%esi 10acf1: 56 push %esi 10acf2: e8 b5 15 00 00 call 10c2ac <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10acf7: 59 pop %ecx 10acf8: 5f pop %edi 10acf9: 8d 7d d4 lea -0x2c(%ebp),%edi 10acfc: 57 push %edi 10acfd: 56 push %esi 10acfe: e8 f9 34 00 00 call 10e1fc <_Timespec_Greater_than> 10ad03: 83 c4 10 add $0x10,%esp 10ad06: 84 c0 test %al,%al 10ad08: 75 12 jne 10ad1c rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10ad0a: 52 push %edx 10ad0b: 57 push %edi 10ad0c: 57 push %edi 10ad0d: 56 push %esi 10ad0e: e8 35 35 00 00 call 10e248 <_Timespec_Subtract> 10ad13: 83 c4 10 add $0x10,%esp 10ad16: e9 02 ff ff ff jmp 10ac1d 10ad1b: 90 nop #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10ad1c: e8 63 8e 00 00 call 113b84 <__errno> 10ad21: c7 00 16 00 00 00 movl $0x16,(%eax) 10ad27: b8 ff ff ff ff mov $0xffffffff,%eax 10ad2c: eb a6 jmp 10acd4 10ad2e: 66 90 xchg %ax,%ax 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 ); 10ad30: 83 ec 0c sub $0xc,%esp 10ad33: 8d 40 10 lea 0x10(%eax),%eax 10ad36: 50 push %eax 10ad37: 89 55 c0 mov %edx,-0x40(%ebp) 10ad3a: e8 7d 39 00 00 call 10e6bc <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10ad3f: 83 c4 10 add $0x10,%esp 10ad42: 8b 55 14 mov 0x14(%ebp),%edx 10ad45: 85 d2 test %edx,%edx 10ad47: 8b 55 c0 mov -0x40(%ebp),%edx 10ad4a: 74 48 je 10ad94 *ovalue = ptimer->timer_data; 10ad4c: 8d 42 54 lea 0x54(%edx),%eax 10ad4f: b9 04 00 00 00 mov $0x4,%ecx 10ad54: 8b 7d 14 mov 0x14(%ebp),%edi 10ad57: 89 c6 mov %eax,%esi 10ad59: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10ad5b: b9 04 00 00 00 mov $0x4,%ecx 10ad60: 89 c7 mov %eax,%edi 10ad62: 8b 75 c4 mov -0x3c(%ebp),%esi 10ad65: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10ad67: c6 42 3c 04 movb $0x4,0x3c(%edx) /* Returns with success */ _Thread_Enable_dispatch(); 10ad6b: e8 f8 29 00 00 call 10d768 <_Thread_Enable_dispatch> return 0; 10ad70: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10ad72: 8d 65 f4 lea -0xc(%ebp),%esp 10ad75: 5b pop %ebx 10ad76: 5e pop %esi 10ad77: 5f pop %edi 10ad78: c9 leave 10ad79: c3 ret 10ad7a: 66 90 xchg %ax,%ax ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 10ad7c: e8 e7 29 00 00 call 10d768 <_Thread_Enable_dispatch> return 0; 10ad81: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10ad83: 8d 65 f4 lea -0xc(%ebp),%esp 10ad86: 5b pop %ebx 10ad87: 5e pop %esi 10ad88: 5f pop %edi 10ad89: c9 leave 10ad8a: c3 ret 10ad8b: 90 nop 10ad8c: 8d 42 54 lea 0x54(%edx),%eax 10ad8f: e9 1a ff ff ff jmp 10acae 10ad94: 8d 42 54 lea 0x54(%edx),%eax 10ad97: eb c2 jmp 10ad5b =============================================================================== 0010a9b8 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 10a9b8: 55 push %ebp 10a9b9: 89 e5 mov %esp,%ebp 10a9bb: 56 push %esi 10a9bc: 53 push %ebx 10a9bd: 83 ec 10 sub $0x10,%esp 10a9c0: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10a9c3: 8b 0d fc 9f 12 00 mov 0x129ffc,%ecx 10a9c9: 85 c9 test %ecx,%ecx 10a9cb: 0f 84 8f 00 00 00 je 10aa60 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 10a9d1: 83 ec 0c sub $0xc,%esp 10a9d4: 68 e0 9f 12 00 push $0x129fe0 10a9d9: e8 4e 38 00 00 call 10e22c <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 10a9de: 83 e8 02 sub $0x2,%eax 10a9e1: 83 c4 10 add $0x10,%esp 10a9e4: 83 f8 01 cmp $0x1,%eax 10a9e7: 0f 86 a3 00 00 00 jbe 10aa90 <== ALWAYS TAKEN useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 10a9ed: 31 f6 xor %esi,%esi /* * 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 ) { 10a9ef: 85 db test %ebx,%ebx 10a9f1: 74 62 je 10aa55 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10a9f3: ba 83 de 1b 43 mov $0x431bde83,%edx 10a9f8: 89 d8 mov %ebx,%eax 10a9fa: f7 e2 mul %edx 10a9fc: c1 ea 12 shr $0x12,%edx 10a9ff: 89 55 f0 mov %edx,-0x10(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10aa02: 8d 04 92 lea (%edx,%edx,4),%eax 10aa05: 8d 04 80 lea (%eax,%eax,4),%eax 10aa08: 8d 04 80 lea (%eax,%eax,4),%eax 10aa0b: 8d 04 80 lea (%eax,%eax,4),%eax 10aa0e: 8d 04 80 lea (%eax,%eax,4),%eax 10aa11: 8d 04 80 lea (%eax,%eax,4),%eax 10aa14: c1 e0 06 shl $0x6,%eax 10aa17: 29 c3 sub %eax,%ebx 10aa19: 8d 04 9b lea (%ebx,%ebx,4),%eax 10aa1c: 8d 04 80 lea (%eax,%eax,4),%eax 10aa1f: 8d 04 80 lea (%eax,%eax,4),%eax 10aa22: c1 e0 03 shl $0x3,%eax 10aa25: 89 45 f4 mov %eax,-0xc(%ebp) ticks = _Timespec_To_ticks( &tp ); 10aa28: 83 ec 0c sub $0xc,%esp 10aa2b: 8d 5d f0 lea -0x10(%ebp),%ebx 10aa2e: 53 push %ebx 10aa2f: e8 4c 33 00 00 call 10dd80 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10aa34: 89 1c 24 mov %ebx,(%esp) 10aa37: e8 44 33 00 00 call 10dd80 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10aa3c: a3 ec 9f 12 00 mov %eax,0x129fec _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10aa41: 58 pop %eax 10aa42: 5a pop %edx 10aa43: 68 e0 9f 12 00 push $0x129fe0 10aa48: 68 00 97 12 00 push $0x129700 10aa4d: e8 9a 36 00 00 call 10e0ec <_Watchdog_Insert> 10aa52: 83 c4 10 add $0x10,%esp } return remaining; } 10aa55: 89 f0 mov %esi,%eax 10aa57: 8d 65 f8 lea -0x8(%ebp),%esp 10aa5a: 5b pop %ebx 10aa5b: 5e pop %esi 10aa5c: c9 leave 10aa5d: c3 ret 10aa5e: 66 90 xchg %ax,%ax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10aa60: c7 05 e8 9f 12 00 00 movl $0x0,0x129fe8 10aa67: 00 00 00 the_watchdog->routine = routine; 10aa6a: c7 05 fc 9f 12 00 7c movl $0x10a97c,0x129ffc 10aa71: a9 10 00 the_watchdog->id = id; 10aa74: c7 05 00 a0 12 00 00 movl $0x0,0x12a000 10aa7b: 00 00 00 the_watchdog->user_data = user_data; 10aa7e: c7 05 04 a0 12 00 00 movl $0x0,0x12a004 10aa85: 00 00 00 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 10aa88: 31 f6 xor %esi,%esi 10aa8a: e9 60 ff ff ff jmp 10a9ef 10aa8f: 90 nop * 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); 10aa90: a1 f4 9f 12 00 mov 0x129ff4,%eax 10aa95: 03 05 ec 9f 12 00 add 0x129fec,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10aa9b: 83 ec 08 sub $0x8,%esp 10aa9e: 8d 55 f0 lea -0x10(%ebp),%edx 10aaa1: 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); 10aaa2: 2b 05 f8 9f 12 00 sub 0x129ff8,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10aaa8: 50 push %eax 10aaa9: e8 4a 32 00 00 call 10dcf8 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10aaae: 8b 45 f0 mov -0x10(%ebp),%eax 10aab1: 8d 04 80 lea (%eax,%eax,4),%eax 10aab4: 8d 04 80 lea (%eax,%eax,4),%eax 10aab7: 8d 04 80 lea (%eax,%eax,4),%eax 10aaba: 8d 04 80 lea (%eax,%eax,4),%eax 10aabd: 8d 04 80 lea (%eax,%eax,4),%eax 10aac0: 8d 0c 80 lea (%eax,%eax,4),%ecx 10aac3: c1 e1 06 shl $0x6,%ecx remaining += tp.tv_nsec / 1000; 10aac6: 8b 75 f4 mov -0xc(%ebp),%esi 10aac9: b8 d3 4d 62 10 mov $0x10624dd3,%eax 10aace: f7 ee imul %esi 10aad0: 89 d0 mov %edx,%eax 10aad2: c1 f8 06 sar $0x6,%eax 10aad5: c1 fe 1f sar $0x1f,%esi 10aad8: 29 f0 sub %esi,%eax 10aada: 8d 34 08 lea (%eax,%ecx,1),%esi 10aadd: 83 c4 10 add $0x10,%esp 10aae0: e9 0a ff ff ff jmp 10a9ef =============================================================================== 0010b12c : #include int unlink( const char *path ) { 10b12c: 55 push %ebp 10b12d: 89 e5 mov %esp,%ebp 10b12f: 57 push %edi 10b130: 56 push %esi 10b131: 53 push %ebx 10b132: 83 ec 58 sub $0x58,%esp 10b135: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 10b138: 53 push %ebx 10b139: e8 16 d3 ff ff call 108454 if ( parentpathlen == 0 ) 10b13e: 83 c4 10 add $0x10,%esp 10b141: 85 c0 test %eax,%eax 10b143: 0f 85 d3 00 00 00 jne 10b21c rtems_filesystem_get_start_loc( path, &i, &parentloc ); 10b149: 50 push %eax 10b14a: 8d 45 d0 lea -0x30(%ebp),%eax 10b14d: 89 45 b4 mov %eax,-0x4c(%ebp) 10b150: 50 push %eax 10b151: 8d 45 e4 lea -0x1c(%ebp),%eax 10b154: 50 push %eax 10b155: 53 push %ebx 10b156: e8 b9 e2 ff ff call 109414 10b15b: 83 c4 10 add $0x10,%esp 10b15e: 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; 10b160: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10b164: 8d 7d bc lea -0x44(%ebp),%edi 10b167: b9 05 00 00 00 mov $0x5,%ecx 10b16c: 8b 75 b4 mov -0x4c(%ebp),%esi 10b16f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 10b171: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10b173: be ff ff ff ff mov $0xffffffff,%esi 10b178: 89 f1 mov %esi,%ecx 10b17a: 89 df mov %ebx,%edi 10b17c: 31 c0 xor %eax,%eax 10b17e: f2 ae repnz scas %es:(%edi),%al 10b180: f7 d1 not %ecx 10b182: 49 dec %ecx 10b183: 83 ec 08 sub $0x8,%esp 10b186: 51 push %ecx 10b187: 53 push %ebx 10b188: e8 0b d3 ff ff call 108498 10b18d: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10b18f: 89 f1 mov %esi,%ecx 10b191: 89 df mov %ebx,%edi 10b193: 31 c0 xor %eax,%eax 10b195: f2 ae repnz scas %es:(%edi),%al 10b197: f7 d1 not %ecx 10b199: 49 dec %ecx 10b19a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b1a1: 8d 75 bc lea -0x44(%ebp),%esi 10b1a4: 56 push %esi 10b1a5: 6a 00 push $0x0 10b1a7: 51 push %ecx 10b1a8: 53 push %ebx 10b1a9: e8 fa d1 ff ff call 1083a8 0, &loc, false ); if ( result != 0 ) { 10b1ae: 83 c4 20 add $0x20,%esp 10b1b1: 85 c0 test %eax,%eax 10b1b3: 75 53 jne 10b208 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 10b1b5: 83 ec 0c sub $0xc,%esp 10b1b8: 56 push %esi 10b1b9: 8b 45 c8 mov -0x38(%ebp),%eax 10b1bc: ff 50 10 call *0x10(%eax) 10b1bf: 83 c4 10 add $0x10,%esp 10b1c2: 48 dec %eax 10b1c3: 0f 84 83 00 00 00 je 10b24c if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 10b1c9: 83 ec 08 sub $0x8,%esp 10b1cc: 56 push %esi 10b1cd: ff 75 b4 pushl -0x4c(%ebp) 10b1d0: 8b 45 c8 mov -0x38(%ebp),%eax 10b1d3: ff 50 0c call *0xc(%eax) rtems_filesystem_freenode( &loc ); 10b1d6: 89 34 24 mov %esi,(%esp) 10b1d9: 89 45 ac mov %eax,-0x54(%ebp) 10b1dc: e8 07 d3 ff ff call 1084e8 if ( free_parentloc ) 10b1e1: 83 c4 10 add $0x10,%esp 10b1e4: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10b1e8: 8b 45 ac mov -0x54(%ebp),%eax 10b1eb: 74 11 je 10b1fe rtems_filesystem_freenode( &parentloc ); 10b1ed: 83 ec 0c sub $0xc,%esp 10b1f0: ff 75 b4 pushl -0x4c(%ebp) 10b1f3: e8 f0 d2 ff ff call 1084e8 10b1f8: 83 c4 10 add $0x10,%esp 10b1fb: 8b 45 ac mov -0x54(%ebp),%eax return result; } 10b1fe: 8d 65 f4 lea -0xc(%ebp),%esp 10b201: 5b pop %ebx 10b202: 5e pop %esi 10b203: 5f pop %edi 10b204: c9 leave 10b205: c3 ret 10b206: 66 90 xchg %ax,%ax 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 ) 10b208: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10b20c: 75 70 jne 10b27e <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); return -1; 10b20e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 10b213: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b216: 5b pop %ebx <== NOT EXECUTED 10b217: 5e pop %esi <== NOT EXECUTED 10b218: 5f pop %edi <== NOT EXECUTED 10b219: c9 leave <== NOT EXECUTED 10b21a: c3 ret <== NOT EXECUTED 10b21b: 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, 10b21c: 89 c2 mov %eax,%edx 10b21e: 83 ec 0c sub $0xc,%esp 10b221: 6a 00 push $0x0 10b223: 8d 45 d0 lea -0x30(%ebp),%eax 10b226: 89 45 b4 mov %eax,-0x4c(%ebp) 10b229: 50 push %eax 10b22a: 6a 02 push $0x2 10b22c: 52 push %edx 10b22d: 53 push %ebx 10b22e: 89 55 ac mov %edx,-0x54(%ebp) 10b231: e8 da d1 ff ff call 108410 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10b236: 83 c4 20 add $0x20,%esp 10b239: 85 c0 test %eax,%eax 10b23b: 8b 55 ac mov -0x54(%ebp),%edx 10b23e: 75 ce jne 10b20e <== NEVER TAKEN return -1; free_parentloc = true; 10b240: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 10b244: e9 1b ff ff ff jmp 10b164 10b249: 8d 76 00 lea 0x0(%esi),%esi rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 10b24c: 83 ec 0c sub $0xc,%esp 10b24f: 56 push %esi 10b250: e8 93 d2 ff ff call 1084e8 if ( free_parentloc ) 10b255: 83 c4 10 add $0x10,%esp 10b258: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10b25c: 74 0e je 10b26c rtems_filesystem_freenode( &parentloc ); 10b25e: 83 ec 0c sub $0xc,%esp 10b261: ff 75 b4 pushl -0x4c(%ebp) 10b264: e8 7f d2 ff ff call 1084e8 10b269: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EISDIR ); 10b26c: e8 27 b9 00 00 call 116b98 <__errno> 10b271: c7 00 15 00 00 00 movl $0x15,(%eax) 10b277: b8 ff ff ff ff mov $0xffffffff,%eax 10b27c: eb 80 jmp 10b1fe result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 10b27e: 83 ec 0c sub $0xc,%esp 10b281: ff 75 b4 pushl -0x4c(%ebp) 10b284: e8 5f d2 ff ff call 1084e8 10b289: 83 c4 10 add $0x10,%esp return -1; 10b28c: b8 ff ff ff ff mov $0xffffffff,%eax 10b291: e9 68 ff ff ff jmp 10b1fe =============================================================================== 0010b2fc : */ int unmount( const char *path ) { 10b2fc: 55 push %ebp 10b2fd: 89 e5 mov %esp,%ebp 10b2ff: 57 push %edi 10b300: 56 push %esi 10b301: 53 push %ebx 10b302: 83 ec 38 sub $0x38,%esp 10b305: 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 ) ) 10b308: 31 c0 xor %eax,%eax 10b30a: b9 ff ff ff ff mov $0xffffffff,%ecx 10b30f: 89 d7 mov %edx,%edi 10b311: f2 ae repnz scas %es:(%edi),%al 10b313: f7 d1 not %ecx 10b315: 49 dec %ecx 10b316: 6a 01 push $0x1 10b318: 8d 75 d4 lea -0x2c(%ebp),%esi 10b31b: 56 push %esi 10b31c: 6a 00 push $0x0 10b31e: 51 push %ecx 10b31f: 52 push %edx 10b320: e8 4f cf ff ff call 108274 10b325: 83 c4 20 add $0x20,%esp 10b328: 85 c0 test %eax,%eax 10b32a: 75 68 jne 10b394 return -1; mt_entry = loc.mt_entry; 10b32c: 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 ){ 10b32f: 8b 45 d4 mov -0x2c(%ebp),%eax 10b332: 39 43 1c cmp %eax,0x1c(%ebx) 10b335: 0f 85 c5 00 00 00 jne 10b400 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10b33b: 83 ec 0c sub $0xc,%esp 10b33e: 56 push %esi 10b33f: e8 08 d0 ff ff call 10834c * 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 ) 10b344: 83 c4 10 add $0x10,%esp 10b347: a1 50 7f 12 00 mov 0x127f50,%eax 10b34c: 39 58 14 cmp %ebx,0x14(%eax) 10b34f: 0f 84 cf 00 00 00 je 10b424 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 10b355: 83 ec 08 sub $0x8,%esp 10b358: ff 73 2c pushl 0x2c(%ebx) 10b35b: 68 e8 b2 10 00 push $0x10b2e8 10b360: e8 ab d7 ff ff call 108b10 10b365: 83 c4 10 add $0x10,%esp 10b368: 84 c0 test %al,%al 10b36a: 0f 85 b4 00 00 00 jne 10b424 * 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 ) 10b370: 83 ec 0c sub $0xc,%esp 10b373: 53 push %ebx 10b374: e8 03 d3 ff ff call 10867c 10b379: 83 c4 10 add $0x10,%esp 10b37c: 48 dec %eax 10b37d: 0f 84 a1 00 00 00 je 10b424 * 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 ) 10b383: 83 ec 0c sub $0xc,%esp 10b386: 8b 43 14 mov 0x14(%ebx),%eax 10b389: 53 push %ebx 10b38a: ff 50 28 call *0x28(%eax) 10b38d: 83 c4 10 add $0x10,%esp 10b390: 85 c0 test %eax,%eax 10b392: 74 10 je 10b3a4 <== 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; 10b394: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10b399: 8d 65 f4 lea -0xc(%ebp),%esp 10b39c: 5b pop %ebx 10b39d: 5e pop %esi 10b39e: 5f pop %edi 10b39f: c9 leave 10b3a0: c3 ret 10b3a1: 8d 76 00 lea 0x0(%esi),%esi * 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){ 10b3a4: 83 ec 0c sub $0xc,%esp 10b3a7: 8b 43 28 mov 0x28(%ebx),%eax 10b3aa: 53 push %ebx 10b3ab: ff 50 2c call *0x2c(%eax) 10b3ae: 83 c4 10 add $0x10,%esp 10b3b1: 85 c0 test %eax,%eax 10b3b3: 0f 85 83 00 00 00 jne 10b43c <== 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 ); 10b3b9: 52 push %edx 10b3ba: 6a 00 push $0x0 10b3bc: 6a 00 push $0x0 10b3be: ff 35 48 a2 12 00 pushl 0x12a248 10b3c4: e8 c7 0a 00 00 call 10be90 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10b3c9: 89 1c 24 mov %ebx,(%esp) 10b3cc: e8 c3 13 00 00 call 10c794 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10b3d1: 58 pop %eax 10b3d2: ff 35 48 a2 12 00 pushl 0x12a248 10b3d8: e8 af 0b 00 00 call 10bf8c 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; 10b3dd: 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 ); 10b3e0: 89 04 24 mov %eax,(%esp) 10b3e3: e8 64 cf ff ff call 10834c free( mt_entry ); 10b3e8: 89 1c 24 mov %ebx,(%esp) 10b3eb: e8 70 cf ff ff call 108360 return 0; 10b3f0: 83 c4 10 add $0x10,%esp 10b3f3: 31 c0 xor %eax,%eax } 10b3f5: 8d 65 f4 lea -0xc(%ebp),%esp 10b3f8: 5b pop %ebx 10b3f9: 5e pop %esi 10b3fa: 5f pop %edi 10b3fb: c9 leave 10b3fc: c3 ret 10b3fd: 8d 76 00 lea 0x0(%esi),%esi /* * 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 ); 10b400: 83 ec 0c sub $0xc,%esp 10b403: 56 push %esi 10b404: e8 43 cf ff ff call 10834c rtems_set_errno_and_return_minus_one( EACCES ); 10b409: e8 16 8a 00 00 call 113e24 <__errno> 10b40e: c7 00 0d 00 00 00 movl $0xd,(%eax) 10b414: 83 c4 10 add $0x10,%esp 10b417: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10b41c: 8d 65 f4 lea -0xc(%ebp),%esp 10b41f: 5b pop %ebx 10b420: 5e pop %esi 10b421: 5f pop %edi 10b422: c9 leave 10b423: 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 ); 10b424: e8 fb 89 00 00 call 113e24 <__errno> 10b429: c7 00 10 00 00 00 movl $0x10,(%eax) 10b42f: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10b434: 8d 65 f4 lea -0xc(%ebp),%esp 10b437: 5b pop %ebx 10b438: 5e pop %esi 10b439: 5f pop %edi 10b43a: c9 leave 10b43b: 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 ) 10b43c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b43f: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10b442: 53 push %ebx <== NOT EXECUTED 10b443: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10b446: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b449: 85 c0 test %eax,%eax <== NOT EXECUTED 10b44b: 0f 84 43 ff ff ff je 10b394 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10b451: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b454: 6a 00 push $0x0 <== NOT EXECUTED 10b456: e8 31 10 00 00 call 10c48c <== NOT EXECUTED =============================================================================== 0010b4b4 : int utime( const char *path, const struct utimbuf *times ) { 10b4b4: 55 push %ebp 10b4b5: 89 e5 mov %esp,%ebp 10b4b7: 57 push %edi 10b4b8: 56 push %esi 10b4b9: 53 push %ebx 10b4ba: 83 ec 48 sub $0x48,%esp 10b4bd: 8b 55 08 mov 0x8(%ebp),%edx 10b4c0: 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 ) ) 10b4c3: 31 c0 xor %eax,%eax 10b4c5: b9 ff ff ff ff mov $0xffffffff,%ecx 10b4ca: 89 d7 mov %edx,%edi 10b4cc: f2 ae repnz scas %es:(%edi),%al 10b4ce: f7 d1 not %ecx 10b4d0: 49 dec %ecx 10b4d1: 6a 01 push $0x1 10b4d3: 8d 75 d4 lea -0x2c(%ebp),%esi 10b4d6: 56 push %esi 10b4d7: 6a 00 push $0x0 10b4d9: 51 push %ecx 10b4da: 52 push %edx 10b4db: e8 a8 ca ff ff call 107f88 10b4e0: 83 c4 20 add $0x20,%esp 10b4e3: 85 c0 test %eax,%eax 10b4e5: 75 2d jne 10b514 return -1; if ( times == NULL ) { 10b4e7: 85 db test %ebx,%ebx 10b4e9: 74 39 je 10b524 10b4eb: 8b 53 04 mov 0x4(%ebx),%edx 10b4ee: 8b 03 mov (%ebx),%eax now.actime = now.modtime = time( NULL ); times = &now; } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 10b4f0: 51 push %ecx 10b4f1: 52 push %edx 10b4f2: 50 push %eax 10b4f3: 56 push %esi 10b4f4: 8b 45 e0 mov -0x20(%ebp),%eax 10b4f7: ff 50 30 call *0x30(%eax) rtems_filesystem_freenode( &temp_loc ); 10b4fa: 89 34 24 mov %esi,(%esp) 10b4fd: 89 45 c4 mov %eax,-0x3c(%ebp) 10b500: e8 73 ce ff ff call 108378 return result; 10b505: 83 c4 10 add $0x10,%esp 10b508: 8b 45 c4 mov -0x3c(%ebp),%eax } 10b50b: 8d 65 f4 lea -0xc(%ebp),%esp 10b50e: 5b pop %ebx 10b50f: 5e pop %esi 10b510: 5f pop %edi 10b511: c9 leave 10b512: c3 ret 10b513: 90 nop 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; 10b514: 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; } 10b519: 8d 65 f4 lea -0xc(%ebp),%esp 10b51c: 5b pop %ebx 10b51d: 5e pop %esi 10b51e: 5f pop %edi 10b51f: c9 leave 10b520: c3 ret 10b521: 8d 76 00 lea 0x0(%esi),%esi if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( times == NULL ) { now.actime = now.modtime = time( NULL ); 10b524: 83 ec 0c sub $0xc,%esp 10b527: 6a 00 push $0x0 10b529: e8 9a d2 00 00 call 1187c8